/* ══════════════════════════════════════════════════════════════
   FORAGE — Design System
   Generated 2026-03-15 as part of Phase 3.1 UI overhaul
   ══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600&display=swap');

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

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --forest:       #0f1f0f;
  --forest-mid:   #1a3320;
  --forest-light: #2d5a3d;
  --sage:         #7a9e7e;
  --sage-light:   #b8cfba;
  --cream:        #f5f0e8;
  --cream-dark:   #e8e0d0;
  --amber:        #c8860a;
  --amber-light:  #e8a825;
  --blue-mark:    #4a7fa5;
  --surface-1:    #162a1c;
  --surface-2:    #1e3527;
  --surface-3:    #243d2e;
  --surface-border: rgba(255,255,255,0.07);
  --card-shadow:  0 4px 20px rgba(0,0,0,0.35);
  --card-shadow-hover: 0 8px 32px rgba(0,0,0,0.5);
  --radius-sm:    8px;
  --radius-md:    16px;
  --radius-lg:    24px;
}

/* ── Base ──────────────────────────────────────────────────── */
html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: var(--forest);
  color: var(--cream);
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--forest);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(26,51,32,0.7) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(13,32,16,0.5) 0%, transparent 55%);
  min-height: 100vh;
}

a { color: var(--sage-light); text-decoration: none; }
a:hover { color: var(--amber-light); }

/* ── App shell ─────────────────────────────────────────────── */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.app-content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 80px; /* space for bottom nav */
}

/* ── App header ────────────────────────────────────────────── */
.app-header {
  background: var(--forest);
  padding: 16px 20px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--surface-border);
}

.header-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--sage-light);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s;
  text-decoration: none;
}
.back-btn:hover { color: var(--cream); }

.header-action {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.header-action:hover { background: rgba(255,255,255,0.14); }

/* App logo style (home header) */
.app-logo {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Bottom nav ────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  height: 72px;
  background: var(--forest);
  display: flex;
  align-items: stretch;
  border-top: 1px solid rgba(255,255,255,0.06);
  z-index: 100;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  padding: 8px 4px 12px;
  position: relative;
  text-decoration: none;
  transition: background 0.2s;
}
.nav-item:hover { background: rgba(255,255,255,0.04); }

.nav-item .nav-icon { color: var(--sage); transition: color 0.2s; }
.nav-item .nav-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--sage);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.nav-item.active .nav-icon { color: var(--amber-light); }
.nav-item.active .nav-label { color: var(--amber-light); }
.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--amber-light);
  border-radius: 1px;
}

/* ── Section headers ────────────────────────────────────────── */
.section-header {
  padding: 20px 20px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--cream);
}

.section-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--sage-light);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s;
}
.section-link:hover { color: var(--amber-light); }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.2s, transform 0.2s;
  overflow: hidden;
}
.card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-1px);
}

/* ── Pills ──────────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.pill-green { background: rgba(45,90,61,0.45); color: var(--sage-light); border: 1px solid rgba(120,180,120,0.18); }
.pill-amber { background: rgba(200,134,10,0.22); color: var(--amber-light); border: 1px solid rgba(200,134,10,0.3); }
.pill-sage  { background: rgba(45,90,61,0.35); color: var(--sage-light); border: 1px solid rgba(120,160,120,0.18); }

/* ── Form elements ──────────────────────────────────────────── */
select,
.styled-select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(255,255,255,0.12);
  background: var(--forest);
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  color: var(--cream);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a9e7e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
  transition: border-color 0.2s;
}
select:focus,
.styled-select:focus { outline: none; border-color: var(--sage); }
select option { background: var(--forest-mid); color: var(--cream); }

input[type="text"],
input[type="password"],
input[type="date"],
input[type="number"],
textarea,
.styled-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(255,255,255,0.12);
  background: var(--forest);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--cream);
  transition: border-color 0.2s;
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
textarea:focus { outline: none; border-color: var(--sage); }
input::placeholder,
textarea::placeholder { color: var(--sage); }

/* Date input calendar icon colour (Webkit) */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.7) sepia(1) saturate(0.5) hue-rotate(90deg);
  cursor: pointer;
}

textarea.styled-textarea {
  resize: none;
  height: 100px;
  line-height: 1.6;
  font-size: 13px;
}
textarea.styled-textarea::placeholder { color: var(--sage); }

label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sage-light);
  display: block;
  margin-bottom: 8px;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-primary,
input[type="submit"],
button[type="submit"],
button {
  width: 100%;
  padding: 14px 20px;
  background: var(--forest-light);
  color: var(--cream);
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  display: inline-block;
  text-align: center;
}
.btn-primary:hover,
input[type="submit"]:hover,
button[type="submit"]:hover,
button:hover { background: var(--forest-light); filter: brightness(1.15); }
.btn-primary:active,
input[type="submit"]:active,
button:active { transform: scale(0.98); }

.btn-amber {
  background: var(--amber);
  box-shadow: 0 4px 16px rgba(200,134,10,0.35);
}
.btn-amber:hover { background: var(--amber-light) !important; filter: none !important; }

/* ── Form steps ─────────────────────────────────────────────── */
.form-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-step {
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--card-shadow);
}

.form-step-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-light);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-step-title {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 12px;
}

/* ── Photo upload area ──────────────────────────────────────── */
.photo-drop {
  border: 2px dashed rgba(255,255,255,0.14);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(0,0,0,0.2);
  position: relative;
}
.photo-drop:hover {
  border-color: var(--sage);
  background: rgba(45,90,61,0.15);
}
.photo-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.photo-drop-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--cream);
  pointer-events: none;
}
.photo-drop-sub {
  font-size: 11px;
  color: var(--sage);
  pointer-events: none;
}

/* ── Toggle pills (confirmed/tentative) ─────────────────────── */
.toggle-pills {
  display: flex;
  background: rgba(0,0,0,0.3);
  border-radius: 100px;
  padding: 3px;
  gap: 2px;
}
.toggle-pill {
  flex: 1;
  padding: 9px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--sage);
  letter-spacing: 0.02em;
}
.toggle-pill.active {
  background: var(--forest-light);
  color: var(--cream);
  box-shadow: 0 2px 8px rgba(15,31,15,0.4);
}

/* ── Season strip ───────────────────────────────────────────── */
.season-strip {
  padding: 14px 20px;
  background: var(--forest-mid);
}
.season-strip-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage-light);
  margin-bottom: 10px;
}
.season-plants {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.season-plant-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 100px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 12px;
  font-weight: 500;
  color: var(--cream);
}

/* ── Home header ────────────────────────────────────────────── */
.home-header-bg {
  background: linear-gradient(180deg, var(--forest) 0%, var(--forest-mid) 100%);
  padding: 16px 20px 20px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.home-logo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.date-greeting {
  font-size: 12px;
  color: var(--sage-light);
  font-weight: 400;
  margin-top: 2px;
}

/* ── Splash image ───────────────────────────────────────────── */
#splash-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  position: fixed;
  inset: 0;
  background: var(--forest);
  z-index: 200;
  transition: opacity 1s ease;
}
#splash-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  width: 100%;
  height: 100%;
}
#splash-container.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* ── Recipe screens ─────────────────────────────────────────── */
.recipes-toggle {
  padding: 12px 20px 4px;
  display: flex;
  background: var(--forest);
  gap: 4px;
}
.recipe-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--sage);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.03em;
}
.recipe-tab.active {
  background: rgba(255,255,255,0.12);
  color: var(--cream);
}

.recipe-month {
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sage-light);
  padding: 20px 20px 8px;
}

.recipe-card {
  margin: 0 20px 10px;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.recipe-section-head {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 8px;
  margin-top: 14px;
}
.recipe-section-head:first-child { margin-top: 0; }

/* ── Harvest notes ──────────────────────────────────────────── */
.harvest-note-card {
  margin: 10px 20px;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--card-shadow);
}

/* ── Medicinal ──────────────────────────────────────────────── */
.medicinal-pill {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--cream);
  border: 1px solid rgba(255,255,255,0.1);
  margin: 3px;
}
.medicinal-warning {
  margin: 16px 20px;
  padding: 12px 14px;
  background: rgba(200,134,10,0.13);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--amber);
  font-size: 12px;
  color: var(--amber-light);
  line-height: 1.6;
}

/* ── Confidence dots ────────────────────────────────────────── */
.confidence-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-confirmed { background: #4caf50; box-shadow: 0 0 6px rgba(76,175,80,0.5); }
.dot-tentative { background: var(--amber); box-shadow: 0 0 6px rgba(200,134,10,0.4); }

/* ── Auth pages (login/register) ────────────────────────────── */
.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--forest);
  background-image:
    radial-gradient(ellipse at 30% 20%, rgba(26,51,32,0.8) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(13,32,16,0.6) 0%, transparent 50%);
  padding: 40px 24px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.6);
}
.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.15em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.auth-logo-sub {
  font-size: 12px;
  color: var(--sage);
  font-weight: 400;
  letter-spacing: 0.08em;
  margin-top: 6px;
}
.auth-form-group {
  margin-bottom: 16px;
}
.auth-error {
  background: rgba(200,60,60,0.15);
  border: 1px solid rgba(200,60,60,0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: #e07070;
  margin-bottom: 16px;
}
.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--sage);
}
.auth-footer a {
  color: var(--sage-light);
  font-weight: 600;
}

/* ── Confirmation / error pages ─────────────────────────────── */
.confirm-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
}
.confirm-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}
.confirm-icon-success { background: rgba(76,175,80,0.2); border: 2px solid rgba(76,175,80,0.4); }
.confirm-icon-error   { background: rgba(200,80,80,0.2); border: 2px solid rgba(200,80,80,0.4); }
.confirm-icon-warning { background: rgba(200,134,10,0.2); border: 2px solid rgba(200,134,10,0.4); }
.confirm-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 12px;
}
.confirm-body {
  font-size: 14px;
  color: var(--sage-light);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 300px;
}
.confirm-btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--forest-light);
  color: var(--cream);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}
.confirm-btn:hover { background: var(--sage); color: var(--forest); }

/* ── Events ─────────────────────────────────────────────────── */
.event-card {
  margin: 0 20px 10px;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--card-shadow);
}
.event-date {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 6px;
}
.event-name {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 4px;
}
.event-desc {
  font-size: 13px;
  color: var(--sage-light);
  line-height: 1.5;
}
.event-repeat {
  font-size: 11px;
  color: var(--sage);
  margin-top: 6px;
}

/* ── Settings ───────────────────────────────────────────────── */
.settings-section {
  margin: 0 20px 16px;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--card-shadow);
}
.settings-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-light);
  margin-bottom: 16px;
}

/* ── Projects ───────────────────────────────────────────────── */
.projects-chart-wrap {
  margin: 0 20px 20px;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--card-shadow);
}

/* ── Map search page ────────────────────────────────────────── */
.map-search-body {
  padding: 20px;
}
.map-instructions {
  font-size: 13px;
  color: var(--sage-light);
  line-height: 1.7;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  margin-bottom: 20px;
}

/* ── Recipe result page ─────────────────────────────────────── */
.recipe-result {
  margin: 0 20px;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--card-shadow);
}
.recipe-result-header {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--surface-border);
}
.recipe-result-body {
  font-size: 13px;
  color: var(--sage-light);
  line-height: 1.8;
  white-space: pre-wrap;
}

/* ── Plantlist result page ──────────────────────────────────── */
.plant-result-list {
  margin: 0 20px;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--card-shadow);
  font-size: 14px;
  color: var(--sage-light);
  line-height: 1.8;
}
.plant-result-list b { color: var(--cream); }

/* ── Monthly hints table (home page) ───────────────────────── */
.monthly-hint {
  margin: 0 20px 20px;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--card-shadow);
}
.monthly-hint-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage-light);
  margin-bottom: 10px;
}
.monthly-hint-body {
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  color: var(--cream);
  line-height: 1.7;
  font-style: italic;
}

/* ── Chart.js dark theme overrides ─────────────────────────── */
.chart-container {
  position: relative;
  height: 280px;
}

/* ── Utility ────────────────────────────────────────────────── */
.text-sage     { color: var(--sage); }
.text-cream    { color: var(--cream); }
.text-amber    { color: var(--amber-light); }
.text-center   { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.px-20 { padding-left: 20px; padding-right: 20px; }
.pb-80 { padding-bottom: 80px; }

/* ── Plant library ──────────────────────────────────────────── */
.plant-card-hidden { display: none !important; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

/* ── Map mode toggle ────────────────────────────────────────── */
.map-mode-toggle {
  display: flex;
  margin: 16px 20px 0;
  background: var(--surface-1);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.map-mode-seg {
  flex: 1;
  padding: 10px 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--sage);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  user-select: none;
}
.map-mode-seg.active {
  background: var(--forest-light);
  color: var(--cream);
}

/* ── Log-mode map container ─────────────────────────────────── */
#log-map-panel {
  display: none;
  position: relative;
  flex-direction: column;
}
#log-map-panel.visible {
  display: flex;
}
#log-map {
  width: 100%;
  /* height set directly by JS _sizeMap() — no flex sizing */
  z-index: 1;
}

/* ── Map hint / loading banner ──────────────────────────────── */
.map-hint-banner {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: rgba(15, 31, 15, 0.85);
  border: 1px solid var(--surface-border);
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--sage-light);
  white-space: nowrap;
  pointer-events: none;
  letter-spacing: 0.02em;
}

/* ── "You are here" pulse ───────────────────────────────────── */
@keyframes geo-pulse {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(1.6); }
}
.geo-pulse-ring {
  animation: geo-pulse 2s ease-in-out infinite;
}

/* ── Slide-up form sheet ────────────────────────────────────── */
#sighting-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--forest-mid);
  border-top: 1px solid var(--surface-border);
  border-radius: 18px 18px 0 0;
  padding: 0 20px 32px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  max-height: 60vh;
  overflow-y: auto;
}
#sighting-sheet.open {
  transform: translateY(0);
}
.sheet-drag-handle {
  width: 36px;
  height: 4px;
  background: var(--surface-border);
  border-radius: 2px;
  margin: 12px auto 16px;
  cursor: pointer;
}
.sheet-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 16px;
}
.sheet-cancel {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 13px;
  color: var(--sage);
  text-decoration: none;
  cursor: pointer;
}

/* ── Home CTA card ──────────────────────────────────────────── */
.map-cta-card {
  margin: 16px 20px 0;
  padding: 16px;
  background: linear-gradient(135deg, var(--forest-light), var(--surface-2));
  border: 1px solid rgba(120, 180, 120, 0.2);
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.map-cta-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(45, 90, 61, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.map-cta-text-title {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 2px;
}
.map-cta-text-sub {
  font-size: 12px;
  color: var(--sage-light);
}
