@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300;400;600&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --text: #2c2825;
  --muted: #8a7f75;
  --accent: #b5705b;
  --accent-hover: #9d5f4a;
  --accent-light: #f5ede8;
  --border: #e5ddd5;
  --success: #6b9e7e;
  --max-width: 660px;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Comfortaa', sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  min-height: 100vh;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
}

h1 {
  font-weight: 600;
  font-size: 2.2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h2 {
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

.sparkle {
  display: block;
  text-align: center;
  color: var(--accent);
  font-size: 1rem;
  margin: 2.5rem 0;
  opacity: 0.5;
  letter-spacing: 0.5rem;
}

/* ── Card page ─────────────────────────────── */

.card-header {
  padding: 3rem 0 2rem;
  text-align: center;
}

.home-link {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 2rem;
}

.card-number {
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
  font-weight: 400;
}

.tagline {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.75rem;
  margin-bottom: 0;
}

/* Journey */
.journey { margin-bottom: 0; }

.empty-state {
  color: var(--muted);
  font-style: italic;
  padding: 1rem 0;
}

.message-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.message-text {
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 0.75rem;
}

.message-meta {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0;
}

.message-meta .dot { opacity: 0.4; }

.found-where {
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* Leave a note form */
.leave-note { margin-bottom: 0; }

.section-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.field {
  margin-bottom: 0.875rem;
  position: relative;
}

input, textarea {
  width: 100%;
  font-family: 'Comfortaa', sans-serif;
  font-weight: 300;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}

input:focus, textarea:focus {
  border-color: var(--accent);
}

input::placeholder, textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

textarea {
  resize: vertical;
  min-height: 110px;
}

.char-count {
  font-size: 0.72rem;
  color: var(--muted);
  display: block;
  text-align: right;
  margin-top: 0.3rem;
}

.btn-primary {
  display: inline-block;
  font-family: 'Comfortaa', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.875rem 2rem;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 0.5rem;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hidden { display: none !important; }

#form-success {
  background: var(--accent-light);
  border-radius: 12px;
  padding: 1.75rem;
  text-align: center;
  color: var(--accent);
  line-height: 1.7;
}

/* What now */
.what-now { margin-bottom: 0; }

.kindness-act {
  background: var(--accent-light);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1.25rem;
}

.kindness-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.4rem;
  font-weight: 400;
}

.kindness-text {
  color: var(--text);
  font-style: italic;
  margin-bottom: 0;
}

.card-footer {
  text-align: center;
  padding-top: 3rem;
  color: var(--muted);
  font-size: 0.82rem;
}

/* ── Homepage ───────────────────────────────── */

.home-hero {
  padding: 4rem 0 1rem;
  text-align: center;
}

.home-hero h1 {
  font-size: 2.6rem;
  margin-bottom: 1rem;
}

.home-hero .subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.65;
}

.counter {
  display: flex;
  gap: 3rem;
  justify-content: center;
  margin: 2.5rem 0;
  flex-wrap: wrap;
}

.counter-item { text-align: center; }

.counter-number {
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  display: block;
}

.counter-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.3rem;
  letter-spacing: 0.04em;
}

.home-section {
  margin-bottom: 2.5rem;
}

.home-section p {
  color: var(--text);
  font-size: 0.97rem;
}

.home-footer {
  text-align: center;
  padding: 2.5rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

/* ── Admin ──────────────────────────────────── */

.admin-page { max-width: 760px; }

.admin-header {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.admin-header h1 { font-size: 1.6rem; }

.queue-count {
  font-size: 0.82rem;
  color: var(--muted);
}

.queue-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: opacity 0.2s;
}

.queue-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.875rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.queue-meta .card-tag {
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.queue-message {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border-radius: 8px;
  white-space: pre-wrap;
}

.queue-found {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 1rem;
}

.queue-actions {
  display: flex;
  gap: 0.625rem;
}

.btn-approve {
  font-family: 'Comfortaa', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  background: var(--success);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-approve:hover { opacity: 0.85; }

.btn-reject {
  font-family: 'Comfortaa', sans-serif;
  font-weight: 400;
  font-size: 0.88rem;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn-reject:hover {
  border-color: #d97070;
  color: #d97070;
}

.empty-queue {
  text-align: center;
  color: var(--muted);
  padding: 4rem 0;
  font-size: 1rem;
}

/* ── Journey map ────────────────────────────── */

.map-wrap {
  position: relative;
  margin-bottom: 1.75rem;
}

#card-map {
  height: 260px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #eee9e2;
}

/* Custom terracotta pin */
.map-pin {
  background: var(--accent);
  border: 2.5px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 6px rgba(181,112,91,0.5);
}

/* Leaflet popup */
.leaflet-popup-content-wrapper {
  border-radius: 8px !important;
  box-shadow: 0 2px 12px rgba(44,40,37,0.12) !important;
  font-family: 'Comfortaa', sans-serif !important;
  font-size: 0.82rem !important;
  padding: 6px 12px !important;
}
.leaflet-popup-content { margin: 6px 0 !important; }
.leaflet-popup-tip-container { display: none; }

.map-status {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}

/* ── Share buttons ──────────────────────────── */

.share-section { margin-bottom: 0; }

.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: 'Comfortaa', sans-serif;
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  line-height: 1;
}

.share-btn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.share-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.share-copied,
.share-copied:hover {
  background: #edf5f0;
  border-color: var(--success);
  color: var(--success);
}

/* ── Featured notes (homepage) ──────────────── */

.featured-more {
  text-align: right;
  margin-top: 0.25rem;
  font-size: 0.88rem;
}

@media (max-width: 480px) {
  h1 { font-size: 1.8rem; }
  .home-hero h1 { font-size: 2rem; }
  .counter { gap: 2rem; }
  .counter-number { font-size: 2.2rem; }
  #card-map { height: 200px; }
  .share-btn { font-size: 0.82rem; padding: 0.55rem 0.875rem; }
}
