/* ═══════════════════════════════════════════════════════════
   CoveyCast v4 — OKLCH Design System
   Nature editorial × tactical field intelligence
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;0,9..144,700;1,9..144,400&family=JetBrains+Mono:wght@400;500;600&family=Inter:wght@400;500;600&display=swap');

:root {
  --ink:        oklch(0.22 0.012 60);
  --ink-2:      oklch(0.28 0.015 62);
  --ink-3:      oklch(0.18 0.01 65);
  --paper:      oklch(0.955 0.008 85);
  --paper-2:    oklch(0.92 0.012 82);
  --dun:        oklch(0.84 0.02 80);
  --clay:       oklch(0.62 0.095 55);
  --clay-deep:  oklch(0.48 0.085 50);
  --clay-dim:   oklch(0.62 0.095 55 / 0.18);
  --sage:       oklch(0.58 0.04 140);
  --sage-dim:   oklch(0.58 0.04 140 / 0.18);
  --gold:       oklch(0.76 0.12 80);
  --gold-dim:   oklch(0.76 0.12 80 / 0.2);
  --topo:       oklch(0.55 0.06 230);
  --topo-dim:   oklch(0.55 0.06 230 / 0.2);
  --alert:      oklch(0.62 0.16 35);
  --alert-dim:  oklch(0.62 0.16 35 / 0.2);
  --rain:       oklch(0.62 0.1 240);
  --frost:      oklch(0.78 0.05 215);
  --line:       oklch(0.22 0.012 60 / 0.12);
  --line-str:   oklch(0.22 0.012 60 / 0.28);
  --dk-line:    oklch(0.93 0.01 85 / 0.1);
  --dk-line-str:oklch(0.93 0.01 85 / 0.25);
  --dk-text:    oklch(0.93 0.01 85);
  --dk-muted:   oklch(0.62 0.015 75);
  --f-serif: 'Fraunces', 'GT Sectra', Georgia, serif;
  --f-sans:  'Inter', system-ui, sans-serif;
  --f-mono:  'JetBrains Mono', ui-monospace, monospace;
  --sidebar-w: 56px;
  --topbar-h:  64px;
  --r: 4px;
  --r-lg: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body { display: flex; font-family: var(--f-sans); background: var(--ink-3); color: var(--dk-text); -webkit-font-smoothing: antialiased; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-str); border-radius: 3px; }

/* ═══════════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  height: 100vh;
  background: var(--ink-3);
  border-right: 1px solid var(--dk-line-str);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0 16px;
  z-index: 200;
  flex-shrink: 0;
}
.sidebar-logo {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  position: relative;
}
.sidebar-logo svg { opacity: 0.9; }
.nav-item {
  width: 40px; height: 40px;
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--dk-muted);
  transition: color 0.15s, background 0.15s;
  position: relative;
  font-size: 18px;
  border: none; background: transparent;
  margin-bottom: 2px;
}
.nav-item:hover { color: var(--dk-text); background: oklch(0.93 0.01 85 / 0.06); }
.nav-item.active { color: var(--clay); background: oklch(0.62 0.095 55 / 0.12); }
.nav-item::after {
  content: attr(data-label);
  position: absolute; left: calc(100% + 12px); top: 50%;
  transform: translateY(-50%);
  background: var(--ink-3);
  color: var(--dk-text);
  font-family: var(--f-mono);
  font-size: 10px; letter-spacing: 0.12em; font-weight: 500;
  white-space: nowrap;
  padding: 5px 10px;
  border: 1px solid var(--dk-line-str);
  border-radius: var(--r);
  pointer-events: none;
  opacity: 0; transition: opacity 0.12s;
  z-index: 300;
}
.nav-item:hover::after { opacity: 1; }
.sidebar-spacer { flex: 1; }
.sidebar-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--sage); opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════════
   MAIN LAYOUT
═══════════════════════════════════════════════════════════ */
.main-wrap { flex: 1; height: 100vh; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }

/* ── TOPBAR ── */
.topbar {
  height: var(--topbar-h);
  background: var(--ink-3);
  border-bottom: 1px solid var(--dk-line-str);
  display: flex; align-items: center; gap: 14px;
  padding: 0 18px;
  flex-shrink: 0;
}
.topbar-brand {
  font-family: var(--f-serif);
  font-size: 20px; font-weight: 600;
  color: var(--dk-text); letter-spacing: -0.01em;
  flex-shrink: 0; white-space: nowrap;
}
.topbar-sub { font-family: var(--f-mono); font-size: 8px; letter-spacing: 0.18em; color: var(--dk-muted); margin-top: 1px; }
.topbar-divider { width: 1px; height: 28px; background: var(--dk-line-str); flex-shrink: 0; }

/* Search */
.search-field { position: relative; flex: 1; max-width: 380px; }
.search-input {
  width: 100%; padding: 9px 14px;
  background: oklch(0.93 0.01 85 / 0.06);
  border: 1px solid var(--dk-line-str);
  border-radius: var(--r);
  color: var(--dk-text); font-size: 13px; font-family: var(--f-sans);
  outline: none; transition: border-color 0.2s, background 0.2s;
}
.search-input:focus { border-color: oklch(0.62 0.095 55 / 0.7); background: oklch(0.93 0.01 85 / 0.1); }
.search-input::placeholder { color: var(--dk-muted); }
.search-btn {
  padding: 9px 16px;
  background: var(--clay); border: none; border-radius: var(--r);
  color: var(--paper); font-size: 12px; font-weight: 600;
  font-family: var(--f-mono); letter-spacing: 0.06em;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
}
.search-btn:hover { background: var(--clay-deep); transform: translateY(-1px); }
.autocomplete {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 500;
  background: var(--ink-2); border: 1px solid var(--dk-line-str);
  border-top: none; border-radius: 0 0 var(--r) var(--r);
  display: none; box-shadow: 0 8px 24px oklch(0 0 0 / 0.5);
}
.ac-item { padding: 9px 14px; cursor: pointer; border-bottom: 1px solid var(--dk-line); transition: background 0.12s; }
.ac-item:last-child { border-bottom: none; }
.ac-item:hover { background: oklch(0.93 0.01 85 / 0.05); }
.ac-name { font-size: 13px; color: var(--dk-text); }
.ac-detail { font-size: 11px; color: var(--dk-muted); font-family: var(--f-mono); margin-top: 1px; }

/* Species pills */
.sp-pills { display: flex; gap: 3px; flex-wrap: wrap; }
.sp-pill {
  padding: 5px 11px; border-radius: 2px; cursor: pointer;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.1em; font-weight: 500;
  border: 1px solid var(--dk-line-str); background: transparent;
  color: var(--dk-muted); transition: all 0.14s; white-space: nowrap;
}
.sp-pill:hover { color: var(--dk-text); border-color: oklch(0.93 0.01 85 / 0.35); }
.sp-pill.active { background: var(--clay); color: var(--dk-text); border-color: var(--clay); }

/* eBird / iNat badges */
.api-badge {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.1em;
  padding: 3px 8px; border-radius: 2px;
  background: oklch(0.58 0.04 140 / 0.18); color: var(--sage);
  border: 1px solid oklch(0.58 0.04 140 / 0.3);
  display: none; white-space: nowrap;
}

/* ── CONTENT AREA ── */
.content-area {
  flex: 1; overflow: hidden; display: flex; flex-direction: column; position: relative; min-height: 0;
}

/* Error bar */
.err-bar {
  background: oklch(0.62 0.16 35 / 0.12); border-bottom: 1px solid oklch(0.62 0.16 35 / 0.3);
  color: oklch(0.62 0.16 35); font-size: 13px; font-family: var(--f-mono);
  padding: 10px 18px; display: none;
}

/* Loading */
#loadingState {
  position: absolute; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--ink-3);
}
.spinner {
  width: 36px; height: 36px;
  border: 2.5px solid oklch(0.93 0.01 85 / 0.1);
  border-top-color: var(--clay);
  border-radius: 50%; animation: spin 0.85s linear infinite;
  margin-bottom: 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }
#loadMsg { color: var(--dk-text); font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.12em; }
#loadSub { color: var(--dk-muted); font-family: var(--f-mono); font-size: 10px; margin-top: 4px; }

/* Empty state */
#emptyState {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--dk-text); text-align: center; padding: 40px;
}
.empty-reticle { opacity: 0.25; margin-bottom: 24px; }
.empty-title { font-family: var(--f-serif); font-size: 26px; font-weight: 600; color: var(--dk-text); margin-bottom: 10px; }
.empty-sub { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--dk-muted); max-width: 360px; line-height: 1.7; }

/* Sections wrapper */
#contentWrap { flex: 1; overflow: hidden; display: none; flex-direction: column; min-height: 0; }
.section { display: none; flex: 1; min-height: 0; }
.section.active { display: flex; flex-direction: column; animation: secIn 0.25s ease; }
@keyframes secIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.sec-scroll { flex: 1; overflow-y: auto; padding: 20px; background: var(--ink-3); }

/* ═══════════════════════════════════════════════════════════
   SHARED PANEL STYLES
═══════════════════════════════════════════════════════════ */
/* Dark tactical panel */
.panel-dark {
  background: var(--ink-3);
  border: 1px solid var(--dk-line-str);
  border-radius: var(--r-lg);
  position: relative;
}
/* Ticked corners on dark panels */
.panel-dark::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 8px; height: 8px;
  border-top: 1.5px solid var(--clay); border-left: 1.5px solid var(--clay);
  pointer-events: none;
}
.panel-dark::after {
  content: ''; position: absolute; bottom: 0; right: 0;
  width: 8px; height: 8px;
  border-bottom: 1.5px solid var(--clay); border-right: 1.5px solid var(--clay);
  pointer-events: none;
}
/* Parchment panel */
.panel-paper {
  background: var(--paper);
  border: 1px solid oklch(0.22 0.012 60 / 0.18);
  border-radius: var(--r-lg);
  position: relative;
  color: var(--ink);
  box-shadow: 0 4px 20px oklch(0 0 0 / 0.25);
}
.panel-paper::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 8px; height: 8px;
  border-top: 1.5px solid var(--clay); border-left: 1.5px solid var(--clay);
  pointer-events: none;
}

.panel-title {
  font-family: var(--f-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 12px 16px 0;
}
.panel-dark .panel-title { color: var(--gold); }
.panel-paper .panel-title { color: var(--clay-deep); }
.panel-paper .ev-desc, .panel-paper .sight-name, .panel-paper .hs-name { color: var(--ink); }
.panel-paper .ev-detail, .panel-paper .sight-detail, .panel-paper .ev-date { color: oklch(0.22 0.012 60 / 0.55); }
.panel-inner { padding: 12px 16px 16px; }

/* Chart canvas */
.chart-canvas { position: relative; height: 240px; padding: 0 16px 16px; }
.chart-canvas-lg { height: 300px; }

/* ═══════════════════════════════════════════════════════════
   LOCATION BANNER
═══════════════════════════════════════════════════════════ */
#locBanner { display: none; padding: 14px 20px 0; }
.loc-name { font-family: var(--f-serif); font-size: 22px; font-weight: 600; color: var(--dk-text); }
.loc-detail { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.12em; color: var(--dk-muted); margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════
   METRIC CARDS
═══════════════════════════════════════════════════════════ */
.cards-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; padding: 14px 20px 0; }
.mcard {
  background: var(--ink-3); border: 1px solid var(--dk-line-str); border-radius: var(--r-lg);
  padding: 14px; position: relative; overflow: hidden;
  animation: cardIn 0.4s ease both;
  transition: border-color 0.2s, transform 0.2s;
}
.mcard:hover { border-color: oklch(0.62 0.095 55 / 0.4); transform: translateY(-2px); }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.mcard::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; }
.mcard.c-rain::before   { background: var(--rain); }
.mcard.c-hail::before   { background: var(--alert); }
.mcard.c-temp::before   { background: var(--gold); }
.mcard.c-frost::before  { background: var(--frost); }
.mcard.c-score::before  { background: linear-gradient(90deg, var(--alert), var(--gold), var(--sage)); }
.mcard.c-bird::before   { background: var(--sage); }
.mcard-lbl { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dk-muted); margin-bottom: 5px; }
.mcard-val { font-family: var(--f-mono); font-size: 28px; font-weight: 600; color: var(--dk-text); line-height: 1; }
.mcard-unit { font-family: var(--f-mono); font-size: 10px; color: var(--dk-muted); margin-top: 2px; }
.mcard-sub  { font-size: 11px; color: var(--dk-muted); margin-top: 6px; line-height: 1.4; }
.score-row  { display: flex; align-items: baseline; gap: 8px; }
.score-badge { font-family: var(--f-mono); font-size: 9px; font-weight: 700; letter-spacing: 0.1em; padding: 2px 7px; border-radius: 2px; display: inline-block; }
.grade-ex { background: oklch(0.58 0.04 140 / 0.2); color: var(--sage); border: 1px solid oklch(0.58 0.04 140 / 0.3); }
.grade-gd { background: oklch(0.76 0.12 80 / 0.2);  color: var(--gold); border: 1px solid oklch(0.76 0.12 80 / 0.3); }
.grade-fa { background: oklch(0.62 0.095 55 / 0.2); color: var(--clay); border: 1px solid oklch(0.62 0.095 55 / 0.3); }
.grade-po { background: oklch(0.62 0.16 35 / 0.15); color: var(--alert); border: 1px solid oklch(0.62 0.16 35 / 0.3); }
.grade-vp { background: oklch(0.62 0.16 35 / 0.25); color: oklch(0.75 0.18 35); border: 1px solid oklch(0.62 0.16 35 / 0.4); }

/* ═══════════════════════════════════════════════════════════
   DASHBOARD GRID
═══════════════════════════════════════════════════════════ */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 20px; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.sight-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.sight-row:last-child { border-bottom: none; }
.sight-dot  { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.sight-name { flex: 1; color: var(--ink); font-weight: 500; }
.sight-detail { color: oklch(0.22 0.012 60 / 0.5); font-size: 10px; font-family: var(--f-mono); }
.sight-count { font-family: var(--f-mono); font-weight: 700; color: var(--clay-deep); font-size: 13px; }
.inat-tag { color: var(--gold); opacity: 0.7; }
.ev-row { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.ev-row:last-child { border-bottom: none; }
.ev-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 3px; }
.ev-body { flex: 1; }
.ev-date { font-family: var(--f-mono); font-size: 10px; color: oklch(0.22 0.012 60 / 0.5); }
.ev-desc { font-size: 12px; color: var(--ink); font-weight: 500; }
.ev-detail { font-size: 11px; color: oklch(0.22 0.012 60 / 0.5); }
.empty-list { font-style: italic; font-size: 12px; color: oklch(0.22 0.012 60 / 0.45); padding: 8px 0; }

/* Insight panel */
.insight-panel { margin: 0 20px 20px; }
.insight-species { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--clay-deep); margin-bottom: 10px; font-weight: 700; }
.insight-panel p { font-size: 13px; line-height: 1.75; color: var(--ink); margin-bottom: 8px; }
.insight-panel p:last-child { margin-bottom: 0; }
.insight-panel strong { color: var(--clay-deep); }
.insight-panel em { font-style: normal; font-weight: 600; color: var(--ink); }

/* ═══════════════════════════════════════════════════════════
   PERIOD CONTROLS (Radar / Hatch)
═══════════════════════════════════════════════════════════ */
.controls-bar { display: flex; align-items: center; gap: 8px; padding: 14px 20px 0; flex-wrap: wrap; }
.ctrl-label { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dk-muted); margin-right: 4px; }
.per-btn {
  padding: 5px 12px; border-radius: var(--r); cursor: pointer;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.08em; font-weight: 500;
  background: transparent; border: 1px solid var(--dk-line-str); color: var(--dk-muted);
  transition: all 0.14s;
}
.per-btn:hover { color: var(--dk-text); border-color: oklch(0.93 0.01 85 / 0.3); }
.per-btn.active { background: var(--clay); color: var(--dk-text); border-color: var(--clay); }
.map-btn {
  padding: 5px 12px; border-radius: var(--r); cursor: pointer;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.08em;
  background: transparent; border: 1px solid var(--dk-line-str); color: var(--dk-muted);
  transition: all 0.14s;
}
.map-btn:hover { color: var(--dk-text); border-color: oklch(0.93 0.01 85 / 0.3); }
.map-btn.active { background: oklch(0.62 0.095 55 / 0.2); color: var(--clay); border-color: var(--clay-dim); }

/* ═══════════════════════════════════════════════════════════
   HATCH SECTION
═══════════════════════════════════════════════════════════ */
.yoy-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0 20px; }
.yoy-card {
  background: var(--paper); border: 1px solid oklch(0.22 0.012 60 / 0.18); border-radius: var(--r-lg);
  padding: 16px; text-align: center;
  color: var(--ink);
  box-shadow: 0 4px 20px oklch(0 0 0 / 0.25);
  transition: border-color 0.2s; animation: cardIn 0.4s ease both;
}
.yoy-card.best { border-color: oklch(0.58 0.04 140 / 0.5); background: oklch(0.96 0.005 80); }
.yoy-year { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.12em; color: oklch(0.22 0.012 60 / 0.55); margin-bottom: 4px; }
.yoy-score { font-family: var(--f-mono); font-size: 38px; font-weight: 700; color: var(--ink); line-height: 1; }
.yoy-stats { font-size: 11px; color: oklch(0.22 0.012 60 / 0.6); line-height: 1.8; margin-top: 6px; }
.yoy-stats b { color: var(--ink); }

/* ═══════════════════════════════════════════════════════════
   HOTSPOTS SECTION
═══════════════════════════════════════════════════════════ */
#sec-hotspots.active { flex-direction: row; }
#hotspots-map { flex: 1; min-width: 0; }
.hotspots-panel {
  width: 300px; flex-shrink: 0;
  background: var(--paper); border-left: 1px solid oklch(0.22 0.012 60 / 0.2);
  color: var(--ink);
  display: flex; flex-direction: column; overflow: hidden;
}
.hotspots-panel-header { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.hotspots-panel-title { font-family: var(--f-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--clay-deep); }
.hotspots-panel-sub { font-family: var(--f-mono); font-size: 10px; color: oklch(0.22 0.012 60 / 0.5); margin-top: 3px; }
.hotspots-list { flex: 1; overflow-y: auto; padding: 8px 0; }
.hs-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 16px;
  border-bottom: 1px solid var(--line); cursor: pointer; transition: background 0.12s;
}
.hs-row:last-child { border-bottom: none; }
.hs-row:hover { background: var(--paper-2); }
.hs-rank { font-family: var(--f-mono); font-size: 11px; font-weight: 700; color: var(--clay); width: 18px; flex-shrink: 0; }
.hs-name { font-size: 12px; font-weight: 500; color: var(--ink); }
.hs-detail { font-family: var(--f-mono); font-size: 10px; color: oklch(0.22 0.012 60 / 0.5); margin-top: 1px; }
.hotspots-controls { padding: 10px 16px; border-top: 1px solid var(--line); display: flex; gap: 5px; flex-wrap: wrap; }

/* eBird key strip in hotspots */
.ebird-key-strip { padding: 8px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 6px; align-items: center; }
.ebird-key-input {
  flex: 1; font-family: var(--f-mono); font-size: 11px;
  background: transparent; border: none; border-bottom: 1px solid var(--line-str);
  color: var(--ink); padding: 2px 0; outline: none;
}

/* ═══════════════════════════════════════════════════════════
   WEATHER WINDOWS
═══════════════════════════════════════════════════════════ */
.win-day-cards { display: flex; gap: 8px; padding: 14px 20px 0; }
.win-day-card {
  flex: 1; background: var(--ink-3); border: 1px solid var(--dk-line-str); border-radius: var(--r-lg);
  padding: 12px; text-align: center; min-width: 0;
}
.win-day-name { font-family: var(--f-mono); font-size: 11px; font-weight: 700; color: var(--dk-text); }
.win-day-date { font-family: var(--f-mono); font-size: 9px; color: var(--dk-muted); }
.win-day-score { font-family: var(--f-mono); font-size: 24px; font-weight: 700; line-height: 1.3; }
.win-day-detail { font-family: var(--f-mono); font-size: 9px; color: var(--dk-muted); }
.win-grid-wrap { padding: 14px 20px; overflow-x: auto; }
.win-table { border-collapse: collapse; min-width: 600px; width: 100%; }
.win-th-hour { width: 50px; }
.win-th-day { text-align: center; font-family: var(--f-mono); font-size: 10px; font-weight: 700; color: var(--dk-text); padding: 6px 4px; letter-spacing: 0.08em; }
.win-th-date { font-size: 9px; color: var(--dk-muted); font-weight: 400; }
.win-hour { font-family: var(--f-mono); font-size: 10px; color: var(--dk-muted); text-align: right; padding-right: 10px; white-space: nowrap; }
.win-cell {
  border: 1px solid oklch(0 0 0 / 0.15);
  text-align: center; cursor: default; transition: transform 0.1s;
  height: 32px; padding: 0;
}
.win-cell:hover { transform: scale(1.12); z-index: 2; position: relative; }
.win-cell-label { font-family: var(--f-mono); font-size: 10px; color: oklch(0.22 0.012 60); font-weight: 700; }
.win-cell-score { font-family: var(--f-mono); font-size: 8px; color: oklch(0.22 0.012 60 / 0.7); display: block; }
.win-legend { display: flex; gap: 12px; padding: 0 20px 20px; }
.win-legend-item { display: flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: 10px; color: var(--dk-muted); }
.win-legend-dot { width: 14px; height: 14px; border-radius: 2px; }

/* ═══════════════════════════════════════════════════════════
   DAY MODAL
═══════════════════════════════════════════════════════════ */
#modalBg { position: fixed; inset: 0; background: oklch(0 0 0 / 0.65); backdrop-filter: blur(4px); z-index: 1000; display: none; align-items: center; justify-content: center; }
#modalBg.open { display: flex; }
.modal {
  background: var(--ink-2); border: 1px solid var(--dk-line-str);
  border-radius: var(--r-lg); padding: 22px; max-width: 400px; width: 90%;
  box-shadow: 0 20px 60px oklch(0 0 0 / 0.6); animation: modalIn 0.18s ease;
  position: relative;
}
.modal::before { content: ''; position: absolute; top: 0; left: 0; width: 10px; height: 10px; border-top: 2px solid var(--clay); border-left: 2px solid var(--clay); }
.modal::after  { content: ''; position: absolute; bottom: 0; right: 0; width: 10px; height: 10px; border-bottom: 2px solid var(--clay); border-right: 2px solid var(--clay); }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-title { font-family: var(--f-serif); font-size: 17px; color: var(--gold); }
.modal-close { background: none; border: none; color: var(--dk-muted); font-size: 16px; cursor: pointer; padding: 0; }
.modal-close:hover { color: var(--dk-text); }
.modal-date { font-family: var(--f-mono); font-size: 10px; color: var(--dk-muted); letter-spacing: 0.1em; margin-bottom: 14px; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.modal-stat { background: oklch(0.93 0.01 85 / 0.05); border: 1px solid var(--dk-line); border-radius: var(--r); padding: 8px 10px; }
.modal-stat-label { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dk-muted); }
.modal-stat-val   { font-family: var(--f-mono); font-size: 16px; font-weight: 700; color: var(--dk-text); margin-top: 3px; }
.modal-risk-bar   { height: 6px; background: oklch(0.93 0.01 85 / 0.1); border-radius: 3px; overflow: hidden; }

/* ═══════════════════════════════════════════════════════════
   LIGHT THEME OVERRIDES  [data-theme="light"]
   All dark structural elements flip to parchment-based system.
   Parchment panels (panel-paper, yoy-card) already work in both.
═══════════════════════════════════════════════════════════ */
[data-theme="light"] body { background: var(--paper); color: var(--ink); }

[data-theme="light"] .sidebar {
  background: var(--paper-2);
  border-color: var(--line-str);
}
[data-theme="light"] .nav-item { color: oklch(0.22 0.012 60 / 0.4); }
[data-theme="light"] .nav-item:hover { color: var(--ink); background: oklch(0.22 0.012 60 / 0.06); }
[data-theme="light"] .nav-item.active { color: var(--clay); background: oklch(0.62 0.095 55 / 0.12); }
[data-theme="light"] .nav-item::after { background: var(--paper-2); border-color: var(--line-str); color: var(--ink); }
[data-theme="light"] .sidebar-dot { background: var(--clay); }

[data-theme="light"] .topbar { background: var(--paper); border-color: var(--line-str); }
[data-theme="light"] .topbar-brand { color: var(--ink); }
[data-theme="light"] .topbar-sub { color: oklch(0.22 0.012 60 / 0.45); }
[data-theme="light"] .topbar-divider { background: var(--line-str); }
[data-theme="light"] .search-input {
  background: oklch(0.22 0.012 60 / 0.05);
  border-color: var(--line-str);
  color: var(--ink);
}
[data-theme="light"] .search-input::placeholder { color: oklch(0.22 0.012 60 / 0.38); }
[data-theme="light"] .search-input:focus { border-color: var(--clay); background: oklch(0.22 0.012 60 / 0.07); }
[data-theme="light"] .autocomplete { background: var(--paper); border-color: var(--line-str); box-shadow: 0 8px 24px oklch(0 0 0 / 0.12); }
[data-theme="light"] .ac-item:hover { background: var(--paper-2); }
[data-theme="light"] .ac-name { color: var(--ink); }
[data-theme="light"] .ac-detail { color: oklch(0.22 0.012 60 / 0.5); }
[data-theme="light"] .sp-pill { border-color: var(--line-str); color: oklch(0.22 0.012 60 / 0.55); }
[data-theme="light"] .sp-pill:hover { color: var(--ink); border-color: oklch(0.22 0.012 60 / 0.4); }
[data-theme="light"] .sp-pill.active { background: var(--clay); color: var(--paper); border-color: var(--clay); }

[data-theme="light"] .sec-scroll { background: var(--paper); }
[data-theme="light"] #sec-hatch .sec-scroll,
[data-theme="light"] #sec-windows .sec-scroll { background: var(--paper-2); }

[data-theme="light"] .mcard {
  background: var(--paper-2);
  border-color: var(--line-str);
}
[data-theme="light"] .mcard-lbl { color: oklch(0.22 0.012 60 / 0.48); }
[data-theme="light"] .mcard-val { color: var(--ink); }
[data-theme="light"] .mcard-unit { color: oklch(0.22 0.012 60 / 0.48); }
[data-theme="light"] .mcard-sub { color: oklch(0.22 0.012 60 / 0.5); }
[data-theme="light"] .moon-emoji + .mcard-val { color: var(--ink); }

[data-theme="light"] .panel-dark {
  background: var(--paper-2);
  border-color: var(--line-str);
}
[data-theme="light"] .panel-dark .panel-title { color: var(--clay-deep); }
[data-theme="light"] .panel-dark .panel-title span { color: oklch(0.22 0.012 60 / 0.45); }

[data-theme="light"] #loadingState { background: var(--paper); }
[data-theme="light"] #loadMsg { color: var(--ink); }
[data-theme="light"] #loadSub { color: oklch(0.22 0.012 60 / 0.5); }
[data-theme="light"] .spinner { border-color: oklch(0.22 0.012 60 / 0.08); border-top-color: var(--clay); }

[data-theme="light"] #emptyState { color: var(--ink); }
[data-theme="light"] .empty-title { color: var(--ink); }
[data-theme="light"] .empty-sub { color: oklch(0.22 0.012 60 / 0.5); }
[data-theme="light"] .empty-reticle svg path, [data-theme="light"] .empty-reticle svg circle { stroke: oklch(0.22 0.012 60 / 0.25) !important; }

[data-theme="light"] .controls-bar .ctrl-label { color: oklch(0.22 0.012 60 / 0.5); }
[data-theme="light"] .per-btn { border-color: var(--line-str); color: oklch(0.22 0.012 60 / 0.55); background: transparent; }
[data-theme="light"] .per-btn:hover { color: var(--ink); border-color: oklch(0.22 0.012 60 / 0.4); }
[data-theme="light"] .per-btn.active { background: var(--clay); color: var(--paper); border-color: var(--clay); }
[data-theme="light"] .map-btn { border-color: var(--line-str); color: oklch(0.22 0.012 60 / 0.55); }
[data-theme="light"] .map-btn:hover { color: var(--ink); }
[data-theme="light"] .map-btn.active { background: oklch(0.62 0.095 55 / 0.12); color: var(--clay); border-color: var(--clay-dim); }

[data-theme="light"] .loc-name { color: var(--ink); }
[data-theme="light"] .loc-detail { color: oklch(0.22 0.012 60 / 0.5); }

[data-theme="light"] .win-day-card { background: var(--dun); border-color: var(--line-str); }
[data-theme="light"] .win-day-name { color: var(--ink); }
[data-theme="light"] .win-day-date { color: oklch(0.22 0.012 60 / 0.5); }
[data-theme="light"] .win-day-detail { color: oklch(0.22 0.012 60 / 0.5); }

[data-theme="light"] .modal { background: var(--paper); border-color: var(--line-str); }
[data-theme="light"] .modal-title { color: var(--clay-deep); }
[data-theme="light"] .modal-close { color: oklch(0.22 0.012 60 / 0.45); }
[data-theme="light"] .modal-date { color: oklch(0.22 0.012 60 / 0.5); }
[data-theme="light"] .modal-stat { background: oklch(0.22 0.012 60 / 0.04); border-color: var(--line); }
[data-theme="light"] .modal-stat-label { color: oklch(0.22 0.012 60 / 0.5); }
[data-theme="light"] .modal-stat-val { color: var(--ink); }
[data-theme="light"] .modal-risk-bar { background: oklch(0.22 0.012 60 / 0.08); }

[data-theme="light"] .settings-drawer { background: var(--paper); border-color: var(--line-str); }
[data-theme="light"] .settings-hdr { border-color: var(--line-str); }
[data-theme="light"] .settings-title { color: var(--clay-deep); }
[data-theme="light"] .settings-close { color: oklch(0.22 0.012 60 / 0.45); }
[data-theme="light"] .setting-label { color: oklch(0.22 0.012 60 / 0.5); }
[data-theme="light"] .setting-desc { color: oklch(0.22 0.012 60 / 0.5); }
[data-theme="light"] .setting-reset { border-color: var(--line-str); color: oklch(0.22 0.012 60 / 0.5); }
[data-theme="light"] .setting-slider { background: var(--line-str); }
[data-theme="light"] .settings-overlay { background: oklch(0 0 0 / 0.15); }

/* Theme toggle button */
.theme-toggle {
  width: 34px; height: 34px; border-radius: var(--r);
  background: transparent; border: 1px solid var(--dk-line-str);
  color: var(--dk-muted); cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0; font-size: 15px;
}
.theme-toggle:hover { color: var(--dk-text); border-color: oklch(0.93 0.01 85 / 0.35); }
[data-theme="light"] .theme-toggle {
  border-color: var(--line-str); color: oklch(0.22 0.012 60 / 0.5);
}
[data-theme="light"] .theme-toggle:hover { color: var(--ink); }

/* ═══════════════════════════════════════════════════════════
   MOON + PRESSURE CARDS
═══════════════════════════════════════════════════════════ */
.moon-emoji { font-size: 30px; line-height: 1; margin-bottom: 4px; display: block; }
.moon-stars { font-size: 12px; letter-spacing: 2px; }
.pressure-val { display: flex; align-items: baseline; gap: 6px; }
.pressure-arrow {
  font-size: 18px; font-weight: 700; line-height: 1;
  transition: color 0.3s;
}

/* ═══════════════════════════════════════════════════════════
   SETTINGS DRAWER
═══════════════════════════════════════════════════════════ */
.settings-drawer {
  position: fixed; top: 0; right: -320px; width: 300px; height: 100vh;
  background: var(--ink-2); border-left: 1px solid var(--dk-line-str);
  z-index: 400; display: flex; flex-direction: column;
  transition: right 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 32px oklch(0 0 0 / 0.5);
}
.settings-drawer.open { right: 0; }
.settings-hdr {
  padding: 16px 18px; border-bottom: 1px solid var(--dk-line-str);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.settings-title {
  font-family: var(--f-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold);
}
.settings-close {
  background: none; border: none; color: var(--dk-muted); font-size: 16px;
  cursor: pointer; padding: 0; line-height: 1;
}
.settings-close:hover { color: var(--dk-text); }
.settings-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.setting-group { margin-bottom: 22px; }
.setting-label {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--dk-muted); margin-bottom: 8px;
  display: flex; justify-content: space-between; align-items: center;
}
.setting-val { font-family: var(--f-mono); font-size: 12px; font-weight: 600; color: var(--clay); }
.setting-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 3px; background: var(--dk-line-str);
  border-radius: 2px; cursor: pointer; accent-color: var(--clay);
  outline: none;
}
.setting-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--clay); cursor: pointer;
  border: 2px solid var(--ink-2);
}
.setting-desc { font-size: 11px; color: var(--dk-muted); margin-top: 5px; line-height: 1.55; }
.setting-reset {
  padding: 8px 14px; background: transparent;
  border: 1px solid var(--dk-line-str); border-radius: var(--r);
  color: var(--dk-muted); font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.08em; cursor: pointer; transition: all 0.14s; width: 100%;
}
.setting-reset:hover { color: var(--dk-text); border-color: oklch(0.93 0.01 85 / 0.35); }
.settings-overlay {
  position: fixed; inset: 0; z-index: 399;
  background: oklch(0 0 0 / 0.35); display: none;
}
.settings-overlay.open { display: block; }

/* ═══════════════════════════════════════════════════════════
   PACK LIST
═══════════════════════════════════════════════════════════ */
.pack-list-wrap {
  margin: 14px 20px 20px;
  background: var(--paper-2);
  border: 1px solid oklch(0.22 0.012 60 / 0.15);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.pack-list-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; cursor: pointer;
  border-bottom: 1px solid oklch(0.22 0.012 60 / 0.1);
  font-family: var(--f-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--clay-deep);
  user-select: none;
}
.pack-toggle { margin-left: auto; color: oklch(0.22 0.012 60 / 0.35); font-size: 14px; transition: transform 0.18s; }
.pack-list-body { padding: 2px 16px 14px; }
.pack-cat {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.14em;
  text-transform: uppercase; color: oklch(0.22 0.012 60 / 0.42);
  margin: 12px 0 5px;
}
.pack-item {
  display: flex; align-items: flex-start; gap: 9px; padding: 5px 0;
  border-bottom: 1px solid oklch(0.22 0.012 60 / 0.06);
  font-size: 12px; color: var(--ink); line-height: 1.5;
}
.pack-item:last-child { border-bottom: none; }
.pack-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.pack-item.warn .pack-dot  { background: var(--alert); }
.pack-item:not(.warn) .pack-dot { background: oklch(0.22 0.012 60 / 0.22); }

/* ═══════════════════════════════════════════════════════════
   WINDOWS — dawn/dusk shading + wind + migration badge
═══════════════════════════════════════════════════════════ */
.win-cell-dark { filter: brightness(0.55); }
.win-dir-chip {
  display: inline-block;
  font-family: var(--f-mono); font-size: 9px; font-weight: 600;
  background: oklch(0.22 0.012 60 / 0.1); border-radius: 2px;
  padding: 1px 5px; margin-top: 3px;
  color: oklch(0.22 0.012 60 / 0.7);
}
.migration-badge {
  display: inline-block;
  background: oklch(0.58 0.04 140 / 0.18);
  border: 1px solid oklch(0.58 0.04 140 / 0.4);
  color: var(--sage);
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.08em;
  padding: 2px 8px; border-radius: 2px; margin-left: 6px; vertical-align: middle;
}

/* Public land map legend */
.pl-legend {
  display: flex; gap: 10px; padding: 8px 16px;
  border-top: 1px solid var(--line); flex-wrap: wrap;
}
.pl-legend-item {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--f-mono); font-size: 9px; color: oklch(0.22 0.012 60 / 0.55);
}
.pl-legend-swatch { width: 12px; height: 12px; border-radius: 2px; }

/* ═══════════════════════════════════════════════════════════
   MAP-CENTRIC DASHBOARD
═══════════════════════════════════════════════════════════ */
#sec-dash.active { position: relative; overflow: hidden; }
#dashMap { position: absolute; inset: 0; z-index: 0; }

/* Floating overlay panels */
.dash-panel {
  position: absolute; z-index: 10;
  background: var(--ink-2);
  border: 1px solid var(--dk-line-str);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 32px oklch(0 0 0 / 0.5);
  overflow: hidden;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}
[data-theme="light"] .dash-panel {
  background: var(--paper);
  border-color: oklch(0.22 0.012 60 / 0.2);
  box-shadow: 0 8px 32px oklch(0 0 0 / 0.14);
}
.dash-panel-left  { top: 14px; left: 14px; width: 272px; }
.dash-panel-right { top: 14px; right: 14px; width: 272px; }

.dash-region-tag {
  font-family: var(--f-mono); font-size: 8px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--dk-muted); padding: 12px 14px 0;
}
[data-theme="light"] .dash-region-tag { color: oklch(0.22 0.012 60 / 0.45); }
.dash-region-name {
  font-family: var(--f-serif); font-size: 22px; font-weight: 700;
  color: var(--clay); padding: 4px 14px 2px; line-height: 1.1; letter-spacing: -0.01em;
}
.dash-region-sub {
  font-family: var(--f-mono); font-size: 10px; color: var(--dk-muted);
  padding: 0 14px 10px;
}
[data-theme="light"] .dash-region-sub { color: oklch(0.22 0.012 60 / 0.5); }

/* Mini stat trio */
.dash-mini-stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 1px; border-top: 1px solid var(--dk-line-str); border-bottom: 1px solid var(--dk-line-str);
  background: var(--dk-line-str);
}
[data-theme="light"] .dash-mini-stats {
  background: var(--line-str); border-color: var(--line-str);
}
.dash-mini-stat {
  background: var(--ink-2); padding: 9px 12px;
}
[data-theme="light"] .dash-mini-stat { background: var(--paper-2); }
.dash-mini-stat-lbl {
  font-family: var(--f-mono); font-size: 8px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--dk-muted); margin-bottom: 3px;
}
[data-theme="light"] .dash-mini-stat-lbl { color: oklch(0.22 0.012 60 / 0.45); }
.dash-mini-stat-val {
  font-family: var(--f-mono); font-size: 16px; font-weight: 700; color: var(--dk-text); line-height: 1;
}
[data-theme="light"] .dash-mini-stat-val { color: var(--ink); }
.dash-mini-stat-sub {
  font-family: var(--f-mono); font-size: 9px; color: var(--dk-muted); margin-top: 2px;
}
[data-theme="light"] .dash-mini-stat-sub { color: oklch(0.22 0.012 60 / 0.45); }

/* Sparkline inside left panel */
.dash-spark-wrap { padding: 10px 14px 4px; }
.dash-spark-lbl {
  font-family: var(--f-mono); font-size: 8px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--dk-muted); margin-bottom: 6px;
}
[data-theme="light"] .dash-spark-lbl { color: oklch(0.22 0.012 60 / 0.45); }

/* eBird/sightings list inside left panel */
.dash-list-lbl {
  font-family: var(--f-mono); font-size: 8px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--dk-muted);
  padding: 8px 14px 4px; border-top: 1px solid var(--dk-line);
}
[data-theme="light"] .dash-list-lbl { color: oklch(0.22 0.012 60 / 0.45); border-color: var(--line); }
.dash-sight-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 14px; font-size: 11px;
  border-bottom: 1px solid var(--dk-line);
}
[data-theme="light"] .dash-sight-row { border-color: var(--line); }
.dash-sight-row:last-child { border-bottom: none; }
.dash-sight-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.dash-sight-name { flex: 1; color: var(--dk-text); font-weight: 500; }
[data-theme="light"] .dash-sight-name { color: var(--ink); }
.dash-sight-ct { font-family: var(--f-mono); font-size: 11px; font-weight: 700; color: var(--clay); }

/* Right panel: score gauge */
.dash-right-lbl {
  font-family: var(--f-mono); font-size: 8px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold); padding: 12px 14px 4px;
}
[data-theme="light"] .dash-right-lbl { color: var(--clay-deep); }
.dash-gauge-wrap { padding: 0 14px 10px; text-align: center; }
.dash-gauge-svg { width: 100%; max-width: 200px; display: block; margin: 0 auto; }
.dash-gauge-score {
  font-family: var(--f-mono); font-size: 48px; font-weight: 700;
  color: var(--dk-text); line-height: 1; margin-top: -20px;
}
[data-theme="light"] .dash-gauge-score { color: var(--ink); }
.dash-gauge-label {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--dk-muted); margin-top: 2px;
}
[data-theme="light"] .dash-gauge-label { color: oklch(0.22 0.012 60 / 0.45); }
.dash-gauge-grade { margin-top: 6px; display: inline-block; }

/* Composite inputs */
.dash-composite-lbl {
  font-family: var(--f-mono); font-size: 8px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--dk-muted);
  padding: 8px 14px 6px; border-top: 1px solid var(--dk-line-str);
}
[data-theme="light"] .dash-composite-lbl { color: oklch(0.22 0.012 60 / 0.45); border-color: var(--line-str); }
.dash-comp-row { padding: 5px 14px 8px; }
.dash-comp-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.dash-comp-name { font-size: 11px; color: var(--dk-text); font-weight: 500; }
[data-theme="light"] .dash-comp-name { color: var(--ink); }
.dash-comp-score { font-family: var(--f-mono); font-size: 11px; font-weight: 700; color: var(--gold); }
[data-theme="light"] .dash-comp-score { color: var(--clay-deep); }
.dash-comp-bar { height: 3px; background: var(--dk-line-str); border-radius: 2px; overflow: hidden; margin-bottom: 2px; }
[data-theme="light"] .dash-comp-bar { background: var(--line-str); }
.dash-comp-fill { height: 100%; border-radius: 2px; transition: width 1s ease; }
.dash-comp-detail { font-family: var(--f-mono); font-size: 9px; color: var(--dk-muted); }
[data-theme="light"] .dash-comp-detail { color: oklch(0.22 0.012 60 / 0.45); }

/* Field call quote */
.dash-field-call {
  margin: 6px 14px 14px;
  padding: 10px 12px;
  background: oklch(0.62 0.095 55 / 0.12);
  border-left: 3px solid var(--clay);
  border-radius: 0 var(--r) var(--r) 0;
}
.dash-field-call-text {
  font-family: var(--f-serif); font-size: 13px; font-style: italic;
  color: var(--dk-text); line-height: 1.55;
}
[data-theme="light"] .dash-field-call-text { color: var(--ink); }
.dash-field-call-credit {
  font-family: var(--f-mono); font-size: 8px; letter-spacing: 0.1em;
  color: var(--dk-muted); margin-top: 6px; text-transform: uppercase;
}
[data-theme="light"] .dash-field-call-credit { color: oklch(0.22 0.012 60 / 0.45); }

/* Bottom huntable-days strip */
.dash-bottom-strip {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 10;
  background: var(--ink-3); border-top: 1px solid var(--dk-line-str);
  display: flex; align-items: stretch; gap: 0;
  height: 88px; overflow-x: auto;
}
[data-theme="light"] .dash-bottom-strip {
  background: var(--paper-2); border-color: var(--line-str);
}
.dash-strip-meta {
  padding: 10px 14px; flex-shrink: 0; border-right: 1px solid var(--dk-line-str);
  min-width: 120px; display: flex; flex-direction: column; justify-content: center;
}
[data-theme="light"] .dash-strip-meta { border-color: var(--line-str); }
.dash-strip-label {
  font-family: var(--f-mono); font-size: 8px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--dk-muted);
}
[data-theme="light"] .dash-strip-label { color: oklch(0.22 0.012 60 / 0.45); }
.dash-strip-count {
  font-family: var(--f-mono); font-size: 28px; font-weight: 700; color: var(--dk-text); line-height: 1;
}
[data-theme="light"] .dash-strip-count { color: var(--ink); }
.dash-strip-total { font-size: 14px; color: var(--dk-muted); }
[data-theme="light"] .dash-strip-total { color: oklch(0.22 0.012 60 / 0.5); }
.dash-strip-vs { font-family: var(--f-mono); font-size: 9px; color: var(--sage); }
.dash-strip-days { display: flex; align-items: flex-end; gap: 2px; padding: 8px 10px 0; flex: 1; }
.dash-day-col { display: flex; flex-direction: column; align-items: center; min-width: 40px; }
.dash-day-bar-wrap { flex: 1; display: flex; align-items: flex-end; height: 44px; }
.dash-day-bar { width: 22px; border-radius: 3px 3px 0 0; transition: height 0.6s ease; }
.dash-day-date { font-family: var(--f-mono); font-size: 8px; color: var(--dk-muted); margin-top: 3px; white-space: nowrap; }
[data-theme="light"] .dash-day-date { color: oklch(0.22 0.012 60 / 0.45); }
.dash-day-score-lbl { font-family: var(--f-mono); font-size: 9px; font-weight: 700; color: var(--dk-muted); }
[data-theme="light"] .dash-day-score-lbl { color: oklch(0.22 0.012 60 / 0.5); }
.dash-day-score { font-family: var(--f-mono); font-size: 9px; font-weight: 700; color: var(--dk-muted); margin-bottom: 2px; }
[data-theme="light"] .dash-day-score { color: oklch(0.22 0.012 60 / 0.5); }
.dash-day-label { font-family: var(--f-mono); font-size: 8px; font-weight: 600; color: var(--dk-text); margin-top: 2px; }
[data-theme="light"] .dash-day-label { color: var(--ink); }

/* Action button inside dash panel */
.dash-action-btn {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--dk-line-str);
  border-radius: var(--r);
  color: var(--dk-muted);
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.14em;
  cursor: pointer; transition: all .15s;
  white-space: nowrap;
}
.dash-action-btn:hover { color: var(--dk-text); border-color: var(--clay); }
[data-theme="light"] .dash-action-btn { color: oklch(0.22 0.012 60 / 0.5); border-color: var(--line-str); }
[data-theme="light"] .dash-action-btn:hover { color: var(--ink); border-color: var(--clay); }

/* ═══════════════════════════════════════════════════════════
   HATCH TRACKER — Timeline chart + bottom panels
═══════════════════════════════════════════════════════════ */
.hatch-timeline-wrap {
  margin: 14px 20px 0;
  background: var(--ink-3);
  border: 1px solid var(--dk-line-str);
  border-radius: var(--r-lg);
  overflow: hidden;
}
[data-theme="light"] .hatch-timeline-wrap {
  background: var(--paper-2);
  border-color: var(--line-str);
}
.hatch-phase-strip {
  display: flex; height: 26px;
  border-bottom: 1px solid var(--dk-line-str);
}
[data-theme="light"] .hatch-phase-strip { border-color: var(--line-str); }
.hatch-phase-seg {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 8px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  overflow: hidden; white-space: nowrap;
}
.hatch-timeline-canvas-wrap { height: 260px; padding: 8px 12px 4px; position: relative; }
.hatch-timeline-legend {
  display: flex; gap: 16px; padding: 6px 12px 10px; flex-wrap: wrap;
}
.hatch-tl-leg-item {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--f-mono); font-size: 9px; color: var(--dk-muted);
}
[data-theme="light"] .hatch-tl-leg-item { color: oklch(0.22 0.012 60 / 0.5); }
.hatch-tl-leg-line {
  width: 18px; height: 2px; border-radius: 1px;
}

/* Hatch bottom 3-panel row */
.hatch-bottom-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 10px; padding: 14px 20px 20px;
}
@media (max-width: 1000px) { .hatch-bottom-row { grid-template-columns: 1fr; } }

/* Conditions ledger panel */
.conditions-panel {
  background: var(--paper); border: 1px solid oklch(0.22 0.012 60 / 0.18);
  border-radius: var(--r-lg); padding: 14px 16px;
  color: var(--ink);
}
.conditions-title {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--clay-deep); margin-bottom: 10px; font-weight: 700;
}
.led-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 0; border-bottom: 1px solid var(--line);
}
.led-row:last-child { border-bottom: none; }
.led-label { font-size: 12px; color: var(--ink); }
.led-badge {
  font-family: var(--f-mono); font-size: 9px; font-weight: 700;
  letter-spacing: 0.08em; padding: 3px 8px; border-radius: 2px;
}
.led-good  { background: oklch(0.58 0.04 140 / 0.18); color: var(--sage); border: 1px solid oklch(0.58 0.04 140 / 0.35); }
.led-norm  { background: oklch(0.76 0.12 80 / 0.18);  color: var(--gold); border: 1px solid oklch(0.76 0.12 80 / 0.35); }
.led-warn  { background: oklch(0.62 0.095 55 / 0.18); color: var(--clay); border: 1px solid oklch(0.62 0.095 55 / 0.35); }
.led-alert { background: oklch(0.62 0.16 35 / 0.14);  color: var(--alert); border: 1px solid oklch(0.62 0.16 35 / 0.35); }

/* Brood estimate panel */
.brood-panel {
  background: var(--ink-3); border: 1px solid var(--dk-line-str);
  border-radius: var(--r-lg); padding: 14px 16px;
}
.brood-title {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 6px; font-weight: 700;
}
.brood-number {
  font-family: var(--f-serif); font-size: 52px; font-weight: 700;
  color: var(--dk-text); line-height: 1; letter-spacing: -0.03em;
}
.brood-unit { font-family: var(--f-mono); font-size: 10px; color: var(--dk-muted); margin-top: 2px; }
.brood-delta { font-family: var(--f-mono); font-size: 11px; margin-top: 6px; }
.brood-model { font-size: 11px; color: var(--dk-muted); margin-top: 8px; font-style: italic; line-height: 1.5; }

/* Cumulative rain sparkline panel */
.cumrain-panel {
  background: var(--paper); border: 1px solid oklch(0.22 0.012 60 / 0.18);
  border-radius: var(--r-lg); padding: 14px 16px; color: var(--ink);
}
.cumrain-title {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--clay-deep); margin-bottom: 4px; font-weight: 700;
}
.cumrain-sub { font-family: var(--f-mono); font-size: 9px; color: oklch(0.22 0.012 60 / 0.45); margin-bottom: 6px; }
.cumrain-val {
  font-family: var(--f-serif); font-size: 36px; font-weight: 700;
  color: var(--ink); line-height: 1;
}
.cumrain-unit { font-family: var(--f-mono); font-size: 12px; color: oklch(0.22 0.012 60 / 0.55); margin-left: 4px; }
.cumrain-spark { margin-top: 10px; height: 50px; }
.cumrain-badge {
  display: inline-block; margin-top: 6px;
  font-family: var(--f-mono); font-size: 9px; font-weight: 600; letter-spacing: 0.08em;
  padding: 3px 8px; border-radius: 2px;
  background: oklch(0.55 0.06 230 / 0.12);
  border: 1px solid oklch(0.55 0.06 230 / 0.3);
  color: var(--topo);
}

/* ═══════════════════════════════════════════════════════════
   PARCHMENT SECTIONS — Hatch + Weather Windows
   These sections use warm paper base; radar/dash stay dark.
═══════════════════════════════════════════════════════════ */
#sec-hatch .sec-scroll,
#sec-windows .sec-scroll {
  background: var(--paper);
}

/* Controls bar flipped to ink on hatch */
#sec-hatch .ctrl-label { color: oklch(0.22 0.012 60 / 0.5); }
#sec-hatch .per-btn {
  border-color: oklch(0.22 0.012 60 / 0.22);
  color: oklch(0.22 0.012 60 / 0.6);
  background: transparent;
}
#sec-hatch .per-btn:hover {
  color: var(--ink);
  border-color: oklch(0.22 0.012 60 / 0.42);
  background: oklch(0.22 0.012 60 / 0.04);
}
#sec-hatch .per-btn.active {
  background: var(--clay);
  color: var(--paper);
  border-color: var(--clay);
}

/* Hatch hero header */
.hatch-hero { padding: 22px 20px 0; }
.hatch-hero-title {
  font-family: var(--f-serif);
  font-size: 30px; font-weight: 700;
  color: var(--ink); letter-spacing: -0.02em; line-height: 1.1;
}
.hatch-hero-sub {
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: oklch(0.22 0.012 60 / 0.45); margin-top: 5px;
}

/* Phase timeline bar */
.phase-bar-wrap {
  margin: 14px 20px 0;
  padding: 14px 16px;
  background: var(--paper-2);
  border: 1px solid oklch(0.22 0.012 60 / 0.13);
  border-radius: var(--r-lg);
}
.phase-bar-label {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.16em;
  text-transform: uppercase; color: oklch(0.22 0.012 60 / 0.45);
  margin-bottom: 8px;
}
.phase-months { display: flex; gap: 2px; }
.phase-month {
  flex: 1; height: 26px; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 9px; font-weight: 600;
  transition: transform 0.12s; cursor: default;
}
.phase-month:hover { transform: scaleY(1.1); }
.ph-off   { background: oklch(0.84 0.015 80 / 0.45); color: oklch(0.22 0.012 60 / 0.35); }
.ph-hatch { background: oklch(0.76 0.12 80 / 0.65);  color: oklch(0.22 0.012 60 / 0.85); }
.ph-brood { background: oklch(0.62 0.095 55 / 0.5);  color: oklch(0.22 0.012 60 / 0.85); }
.ph-hunt  { background: oklch(0.58 0.04 140 / 0.5);  color: oklch(0.22 0.012 60 / 0.85); }
.ph-now   { outline: 2px solid var(--clay); outline-offset: -1px; }
.phase-legend {
  display: flex; gap: 14px; margin-top: 8px; flex-wrap: wrap;
}
.phase-legend-item {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--f-mono); font-size: 9px;
  color: oklch(0.22 0.012 60 / 0.55);
}
.phase-legend-swatch { width: 9px; height: 9px; border-radius: 2px; }

/* Weather Windows on parchment */
#sec-windows .win-th-day    { color: var(--ink); }
#sec-windows .win-th-date   { color: oklch(0.22 0.012 60 / 0.5); }
#sec-windows .win-hour      { color: oklch(0.22 0.012 60 / 0.55); }
#sec-windows .win-day-card  {
  background: var(--paper-2);
  border-color: oklch(0.22 0.012 60 / 0.18);
}
#sec-windows .win-day-name   { color: var(--ink); }
#sec-windows .win-day-date   { color: oklch(0.22 0.012 60 / 0.5); }
#sec-windows .win-day-detail { color: oklch(0.22 0.012 60 / 0.5); }
#sec-windows .win-legend-item { color: oklch(0.22 0.012 60 / 0.6); }
/* Win table wider for 17-column hour layout */
#sec-windows .win-table { min-width: 860px; }
#sec-windows .win-th-day { min-width: 44px; }

/* ═══════════════════════════════════════════════════════════
   PRINT
═══════════════════════════════════════════════════════════ */
@media print {
  *, *::before, *::after { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sidebar, .topbar, #emptyState, #loadingState, #modalBg { display: none !important; }
  body { background: #fff !important; color: #111 !important; overflow: visible; }
  .main-wrap { height: auto; overflow: visible; }
  .section { display: block !important; overflow: visible; animation: none; }
  .sec-scroll { overflow: visible; }
  .print-hdr { display: block !important; border-bottom: 2px solid #555; padding-bottom: 8px; margin-bottom: 14px; }
}
.print-hdr { display: none; }
.print-img { display: none; width: 100%; }
