/* ============================================================
   HornLark — Map shell + sidebar + regulations + Mapbox overrides
   Brand tokens (design-status §brand):
     #1E2A1F  Deep Canopy   — map UI bg
     #2D3B2E  Spruce Shadow — sidebar, panels
     #3A4B3B  Field Dusk    — elevated surfaces, popups
     #C9A96E  Dry Grass Tan — accent, parcel borders, active states
     #D4622A  Permission Orange — CTAs, "Get PRO"
     #9A9487  Lichen        — muted text
     #EDE9E0  Snow          — primary text/headings
   ============================================================ */

:root {
  --t-canopy:     #1E2A1F;
  --t-spruce:     #2D3B2E;
  --t-dusk:       #3A4B3B;
  --t-tan:        #C9A96E;
  --t-orange:     #D4622A;
  --t-lichen:     #9A9487;
  --t-snow:       #EDE9E0;
  --t-snow-dim:   #D6BC8A;
}

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

html, body { height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--t-canopy);
  color: var(--t-snow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ─── TOP NAV ─── */
.top-nav {
  height: 52px; background: var(--t-spruce);
  border-bottom: 1px solid rgba(154,148,135,0.3);
  flex-shrink: 0; z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; position: relative; overflow: visible;
}
.nav-left  { display: flex; align-items: center; gap: 12px; }
.nav-right { display: flex; align-items: center; gap: 8px; }
/* The text-based wordmark span has been replaced by the nano-brand.png image
 * (see .nav-wordmark-img below + LOGO_HANDOFF.md 2026-05-09). The .nav-logo-text
 * rule is the active wordmark style — production switched from image to live
 * text in wireframe v1.0.1 (2026-05-10) so the wordmark is selectable, scalable,
 * and accessible. Weight 900 was chosen to match the visual heft of the original
 * nano-brand.png reference. */
.nav-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 26px; font-weight: 900; color: var(--t-snow);
  letter-spacing: 0.02em; line-height: 1;
}
.btn-signin {
  padding: 6px 14px; border-radius: 8px;
  background: rgba(201,169,110,0.15);
  border: 1px solid rgba(201,169,110,0.3);
  font-size: 12px; font-weight: 600; color: var(--t-tan);
  cursor: pointer; font-family: inherit;
}
.btn-signin:hover { background: rgba(201,169,110,0.25); }
.btn-about {
  padding: 6px 14px; border-radius: 8px;
  background: transparent; border: none;
  font-size: 12px; font-weight: 600; color: rgba(237,233,224,0.7);
  cursor: pointer; font-family: inherit;
}
.btn-about:hover { color: var(--t-snow); }

/* The Tussock grass-strip header animation was removed in the 2026-10-08
 * HornLark rebrand. nav-left/nav-right keep their stacking context. */
.top-nav .nav-left,
.top-nav .nav-right { position: relative; z-index: 2; }

/* ─── MAIN ─── */
.main { display: flex; flex: 1; overflow: hidden; min-height: 0; }

.map-area { flex: 1; position: relative; overflow: hidden; background: var(--t-canopy); }
#map { position: absolute; inset: 0; z-index: 1; }

/* Mapbox attribution scaled down */
.mapboxgl-ctrl-attrib { font-size: 9px !important; }

.map-token-banner {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 5; background: rgba(212,98,42,0.15); border: 1px solid var(--t-orange);
  color: var(--t-snow);
  padding: 8px 14px; border-radius: 8px; font-size: 12px; font-weight: 600;
}
.map-token-banner code {
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace; font-size: 11px;
}

/* ─── MAP CONTROLS — TOP-LEFT (home + zoom) ─── */
/* Per design-status.md "Map controls" — Home button (own card) above the
 * zoom card with an 8px gap; both cards 54px wide for easier tapping. */
.map-controls-left {
  position: absolute; top: 16px; left: 16px; z-index: 10;
  display: flex; flex-direction: column; gap: 8px;
}
.map-btn-group {
  background: var(--t-dusk); border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4); overflow: hidden;
  display: flex; flex-direction: column; width: 54px;
}
.map-btn {
  width: 54px; height: 54px; background: var(--t-dusk); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 700; color: var(--t-snow);
  font-family: inherit;
  border-bottom: 1px solid rgba(154,148,135,0.18);
  transition: background 0.12s;
}
.map-btn:last-child { border-bottom: none; }
.map-btn:hover { background: rgba(201,169,110,0.1); }
.map-btn.zoom-level {
  font-size: 13px; height: 42px; color: var(--t-tan); pointer-events: none;
}
.map-btn svg {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
/* Home button is its own group, rounded all corners */
.map-btn.home-btn { border-radius: 10px; }

/* ─── MAP CONTROLS — TOP-RIGHT ─── */
.map-controls-right {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
}

/* 5-button style switcher */
.map-style-group {
  background: var(--t-dusk); border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4); overflow: hidden;
  width: 108px;
}
.map-style-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; width: 100%;
  background: var(--t-dusk); color: var(--t-snow); border: none;
  border-bottom: 1px solid rgba(154,148,135,0.15);
  cursor: pointer; font-size: 11px; font-weight: 600;
  font-family: inherit; text-align: left; transition: background 0.12s;
}
.map-style-btn:last-child { border-bottom: none; }
.map-style-btn:hover { background: rgba(201,169,110,0.08); }
.map-style-btn.active { background: var(--t-tan); color: var(--t-canopy); }
.map-style-btn.active svg { stroke: var(--t-canopy); }
.map-style-btn svg {
  width: 15px; height: 15px; flex-shrink: 0;
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* GPS / My Location */
.gps-wrap {
  background: var(--t-dusk); border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4); overflow: hidden;
  width: 108px;
}
.gps-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; width: 100%;
  background: var(--t-dusk); color: var(--t-snow); border: none; cursor: pointer;
  font-size: 11px; font-weight: 600;
  font-family: inherit; text-align: left; transition: background 0.12s;
}
.gps-btn:hover { background: rgba(201,169,110,0.1); }
.gps-btn.active { background: var(--t-tan); color: var(--t-canopy); }
.gps-btn.locating { background: rgba(201,169,110,0.15); }
.gps-btn svg {
  width: 15px; height: 15px; flex-shrink: 0;
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.gps-zoom-badge {
  margin-left: auto; font-size: 9px; font-weight: 800;
  background: rgba(0,0,0,0.3); color: inherit;
  padding: 1px 5px; border-radius: 4px; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.gps-btn.locating svg { animation: spin 1s linear infinite; }

/* ─── WEATHER ATTRIBUTION (bottom-right, required by OpenWeather licence) ─── */
.weather-attribution {
  position: absolute;
  bottom: 6px; right: 8px;
  z-index: 10;
  background: rgba(26,31,18,0.55);
  color: rgba(237,233,224,0.78);
  font-size: 9px; font-weight: 500;
  padding: 2px 7px; border-radius: 6px;
  letter-spacing: 0.02em;
  pointer-events: auto;
}
.weather-attribution a {
  color: var(--t-tan);
  text-decoration: none;
  font-weight: 600;
}
.weather-attribution a:hover { text-decoration: underline; }
body.sat-mode .weather-attribution {
  background: rgba(0,0,0,0.55);
}

/* ─── WEATHER WIDGET (bottom-left) ─── */
.weather-widget {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 10;
  background: rgba(26,31,18,0.76);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px;
  padding: 8px 12px; min-width: 80px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.weather-widget:hover { background: rgba(26,31,18,0.88); border-color: rgba(201,169,110,0.45); }
.weather-widget:active { transform: scale(0.98); }
.weather-widget:focus-visible { outline: 2px solid var(--t-tan); outline-offset: 2px; }
.weather-temp {
  font-size: 22px; font-weight: 700; color: var(--t-snow);
  line-height: 1.1; letter-spacing: -0.02em;
}
.weather-feels-line {
  font-size: 11px; font-weight: 400;
  color: rgba(255,255,255,0.78);
  line-height: 1.3; margin-top: 1px;
}
.weather-location {
  display: flex; align-items: center; gap: 4px;
  margin-top: 5px; padding-top: 5px;
  border-top: 1px solid rgba(255,255,255,0.10);
  font-size: 10px; font-weight: 600;
  color: var(--t-tan); letter-spacing: 0.02em;
}
.weather-location svg {
  width: 9px; height: 9px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

/* ─── SIDEBAR ─── */
.sidebar {
  width: 340px; flex-shrink: 0;
  background: var(--t-spruce);
  border-left: 1px solid rgba(154,148,135,0.25);
  display: flex; flex-direction: column; overflow: hidden;
}

/* Sidebar tabs (Boundaries · Regulations · Search) */
.sidebar-tabs {
  display: flex; flex-shrink: 0;
  background: var(--t-spruce);
  border-bottom: 2px solid rgba(154,148,135,0.25);
}
.sidebar-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 9px 4px;
  border: none; background: none; cursor: pointer;
  font-family: inherit; color: var(--t-lichen);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: color 0.12s, background 0.12s;
}
.sidebar-tab.active {
  color: var(--t-tan); border-bottom-color: var(--t-tan); background: none;
}
.sidebar-tab:hover:not(.active) {
  color: var(--t-snow); background: var(--t-dusk);
}
.sidebar-tab svg {
  width: 15px; height: 15px;
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.sidebar-tab span { font-size: 10px; font-weight: 800; letter-spacing: 0.3px; }

/* Panes */
.sidebar-pane {
  flex: 1; overflow-y: auto;
  background: var(--t-spruce);
  display: none; min-height: 0; flex-direction: column;
}
.sidebar-pane.active { display: flex; }

/* ─── BOUNDARIES PANE — Layers list ─── */
.layers-list { flex: 1; overflow-y: auto; padding: 10px; background: var(--t-spruce); }
.layers-loading {
  font-size: 12px; color: var(--t-lichen);
  padding: 14px 8px; text-align: center;
}

/* ─── LANDOWNER ACCORDION (PRO, amber) ─── */
.lm-accordion {
  border: 1.5px solid rgba(201,169,110,0.22);
  border-radius: 11px; overflow: hidden;
  background: rgba(201,169,110,0.05);
  margin-bottom: 8px;
}
.lm-accordion-header {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; cursor: pointer; user-select: none;
}
.lm-accordion-header:hover { background: rgba(201,169,110,0.08); }
.lm-acc-icon {
  width: 28px; height: 28px; border-radius: 7px;
  background: rgba(201,169,110,0.14);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.lm-acc-icon svg {
  width: 14px; height: 14px; fill: none; stroke: var(--t-tan);
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.lm-acc-text { flex: 1; min-width: 0; }
.lm-acc-title { font-size: 13px; font-weight: 700; color: var(--t-snow); }
.lm-acc-meta { font-size: 11px; color: var(--t-snow-dim); margin-top: 1px; }
.pro-badge-sm {
  font-size: 9px; font-weight: 800; letter-spacing: 0.5px;
  padding: 2px 6px; border-radius: 5px;
  background: var(--t-tan); color: var(--t-canopy); flex-shrink: 0;
}
.lm-all-btn {
  font-size: 10px; font-weight: 800; letter-spacing: 0.4px;
  padding: 3px 8px; border-radius: 6px;
  border: 1.5px solid rgba(154,148,135,0.25);
  background: var(--t-dusk); color: var(--t-lichen);
  cursor: pointer; font-family: inherit; flex-shrink: 0;
}
.lm-all-btn:hover { background: rgba(201,169,110,0.1); color: var(--t-snow); }
.lm-chevron {
  width: 16px; height: 16px; flex-shrink: 0;
  fill: none; stroke: var(--t-tan); stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.2s;
}
.lm-chevron.open { transform: rotate(180deg); }

/* County search bar (inside Landowner accordion) */
.lm-search-bar {
  padding: 8px 10px;
  border-top: 1px solid rgba(201,169,110,0.15);
  border-bottom: 1px solid rgba(201,169,110,0.15);
  background: var(--t-spruce);
  display: none;
}
.lm-search-bar.open { display: block; }
.lm-search-inner { position: relative; }
.lm-search-input {
  width: 100%; padding: 6px 10px 6px 28px;
  border: 1.5px solid rgba(154,148,135,0.2);
  border-radius: 8px;
  font-size: 11px; color: var(--t-snow);
  background: var(--t-canopy); outline: none;
  font-family: inherit; box-sizing: border-box;
}
.lm-search-input:focus { border-color: var(--t-tan); }
.lm-search-icon {
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  width: 12px; height: 12px;
  fill: none; stroke: var(--t-lichen);
  stroke-width: 2; stroke-linecap: round; pointer-events: none;
}

/* County list */
.lm-county-list-wrap { position: relative; display: none; }
.lm-county-list-wrap.open { display: block; }
.lm-county-list-wrap::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 28px;
  background: linear-gradient(transparent, var(--t-spruce));
  pointer-events: none; z-index: 2;
}
.lm-county-list {
  border-top: 1px solid rgba(201,169,110,0.15);
  overflow-y: auto;
  background: rgba(58,75,59,0.6);
  max-height: 188px;
}
.lm-county-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px 7px 12px;
  border-bottom: 1px solid rgba(201,169,110,0.08);
  cursor: pointer;
}
.lm-county-row:last-child { border-bottom: none; }
.lm-county-row:hover { background: rgba(201,169,110,0.07); }
.lm-county-text { flex: 1; min-width: 0; }
.lm-county-name { font-size: 12px; font-weight: 600; color: var(--t-snow); }
.lm-county-sub { font-size: 10px; color: var(--t-snow-dim); margin-top: 1px; }
.lm-county-sub-soon { color: #B45309; font-weight: 700; }

/* ─── BOUNDARY MAPS / WMU ACCORDION (free, green-tinged) ─── */
.wmu-accordion {
  border: 1.5px solid rgba(154,148,135,0.2);
  border-radius: 11px; overflow: hidden;
  background: var(--t-dusk);
  margin-top: 8px;
}
.wmu-accordion-header {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; cursor: pointer; user-select: none;
  background: var(--t-spruce);
}
.wmu-accordion-header:hover { background: var(--t-dusk); }
.wmu-acc-icon {
  width: 28px; height: 28px; border-radius: 7px;
  background: rgba(201,169,110,0.1);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.wmu-acc-icon svg {
  width: 14px; height: 14px; fill: none; stroke: var(--t-tan);
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.wmu-acc-text { flex: 1; min-width: 0; }
.wmu-acc-title { font-size: 13px; font-weight: 700; color: var(--t-snow); }
.wmu-acc-meta { font-size: 11px; color: var(--t-lichen); margin-top: 1px; }
.wmu-acc-meta strong { color: var(--t-tan); }
.free-badge-sm {
  font-size: 9px; font-weight: 800; letter-spacing: 0.5px;
  padding: 2px 6px; border-radius: 5px;
  background: rgba(201,169,110,0.14); color: var(--t-tan); flex-shrink: 0;
}
.wmu-all-btn {
  font-size: 10px; font-weight: 800; letter-spacing: 0.4px;
  padding: 3px 8px; border-radius: 6px;
  border: 1.5px solid rgba(154,148,135,0.25);
  background: var(--t-dusk); color: var(--t-lichen);
  cursor: pointer; font-family: inherit; flex-shrink: 0;
}
.wmu-all-btn.all-on {
  background: var(--t-tan); border-color: var(--t-tan); color: var(--t-canopy);
}
.wmu-chevron {
  width: 16px; height: 16px; flex-shrink: 0;
  fill: none; stroke: var(--t-lichen);
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.2s;
}
.wmu-chevron.open { transform: rotate(180deg); }
.wmu-body { display: none; border-top: 1px solid rgba(154,148,135,0.2); }
.wmu-body.open { display: block; }

.wmu-series-row {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px 8px 12px; cursor: pointer;
  border-bottom: 1px solid rgba(154,148,135,0.1);
  transition: background 0.1s;
}
.wmu-series-row:last-child { border-bottom: none; }
.wmu-series-row:hover { background: rgba(201,169,110,0.05); }
.wmu-series-row.on { background: rgba(201,169,110,0.05); }
.wmu-swatch {
  width: 26px; height: 26px; border-radius: 6px;
  background: rgba(154,148,135,0.18);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.15s;
}
.wmu-series-text { flex: 1; min-width: 0; }
.wmu-series-name { font-size: 12px; font-weight: 600; color: var(--t-snow); }
.wmu-series-sub  { font-size: 10px; color: var(--t-lichen); margin-top: 1px; }

/* Zoom-to-boundary frame-corners button */
.zoom-to-btn {
  width: 32px; height: 32px;
  border: 1px solid rgba(154,148,135,0.2);
  background: var(--t-dusk);
  border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.12s; padding: 0;
}
.zoom-to-btn:hover { background: rgba(201,169,110,0.1); }
.zoom-to-btn svg {
  width: 12px; height: 12px; fill: none; stroke: var(--t-lichen);
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  transition: stroke 0.12s;
}
.zoom-to-btn:hover svg { stroke: var(--t-tan); }

/* Toggle (shared: WMU series + county rows) */
.toggle {
  width: 38px; height: 22px; border-radius: 11px;
  border: none; cursor: pointer; position: relative; flex-shrink: 0;
  background: rgba(154,148,135,0.28); transition: background 0.18s; padding: 0;
}
.toggle.on { background: var(--t-tan); }
.toggle.greyed,
.toggle[disabled] { background: rgba(154,148,135,0.12); cursor: not-allowed; opacity: 0.5; }
.toggle.loading { opacity: 0.6; }
.toggle-knob {
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; position: absolute; top: 2px; left: 2px;
  transition: left 0.18s cubic-bezier(.4,.2,.2,1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.4); pointer-events: none;
}
.toggle.on .toggle-knob { left: 18px; }

/* Master-toggle "partial" state — series is ON but some sub-WMUs are individually OFF.
 * Striped Tan-on-Field Dusk gradient to read at a glance against the dark sidebar.
 * Per parity contract §3.4: applies when `activeWMU.has(series) && wmuOff[series].size > 0`. */
.toggle.on.partial {
  background: repeating-linear-gradient(45deg, var(--t-tan) 0 5px, rgba(201,169,110,0.55) 5px 9px);
}

/* Compact toggle used inside the per-WMU sub-list rows. Half the width of the
 * series-level toggle so the row fits chevron + name + zoom-to + toggle on one line. */
.toggle.small { width: 30px; height: 16px; border-radius: 8px; }
.toggle.small .toggle-knob { width: 12px; height: 12px; top: 2px; left: 2px; }
.toggle.small.on .toggle-knob { left: 16px; }

/* ─── WMU SUB-LIST (per-WMU expand inside each series row) ─── */
/* Chevron sits between the existing zoom-to-button and the master toggle inside
 * each .wmu-series-row. Rotates 180deg when its sub-list is open. */
.wmu-series-row .row-chevron {
  background: none; border: none; padding: 4px 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.wmu-series-row .row-chevron svg {
  width: 14px; height: 14px; fill: none; stroke: var(--t-lichen);
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.2s;
}
.wmu-series-row .row-chevron:hover svg { stroke: var(--t-tan); }
.wmu-series-row .row-chevron.open svg { transform: rotate(180deg); }

/* Sub-list container — sibling of its .wmu-series-row.
 * Hidden by default; flipped open via .open class set by toggleWMUExpand(). */
.wmu-sub-list {
  display: none;
  padding: 8px 12px 10px 16px;
  background: rgba(201,169,110,0.04);
  border-bottom: 1px solid rgba(154,148,135,0.15);
}
.wmu-sub-list.open { display: block; }

.wmu-sub-search-wrap { position: relative; margin-bottom: 6px; }
.wmu-sub-search {
  width: 100%;
  padding: 5px 8px 5px 24px;
  font-size: 11px;
  color: var(--t-snow);
  background: var(--t-canopy);
  border: 1px solid rgba(154,148,135,0.2);
  border-radius: 6px;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
}
.wmu-sub-search:focus { border-color: var(--t-tan); }
.wmu-sub-search-icon {
  position: absolute; left: 7px; top: 50%;
  transform: translateY(-50%);
  width: 11px; height: 11px;
  fill: none; stroke: var(--t-lichen);
  stroke-width: 2; stroke-linecap: round;
  pointer-events: none;
}

.wmu-sub-actions { display: flex; gap: 6px; margin-bottom: 6px; }
.wmu-sub-action {
  font-size: 9px; font-weight: 800; letter-spacing: 0.4px;
  padding: 3px 8px; border-radius: 5px;
  border: 1px solid rgba(154,148,135,0.2);
  background: var(--t-canopy);
  color: var(--t-lichen);
  cursor: pointer; font-family: inherit;
}
.wmu-sub-action:hover {
  background: rgba(201,169,110,0.1);
  color: var(--t-tan);
  border-color: var(--t-tan);
}

.wmu-sub-rows { max-height: 240px; overflow-y: auto; }

.wmu-sub-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 4px;
  border-bottom: 1px solid rgba(154,148,135,0.1);
  cursor: pointer;
}
.wmu-sub-row:last-child { border-bottom: none; }
.wmu-sub-row:hover { background: rgba(201,169,110,0.06); }
.wmu-sub-row.hide { display: none; }

.wmu-sub-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700;
  color: var(--t-snow);
  min-width: 38px; flex-shrink: 0;
}
.wmu-sub-name {
  flex: 1; min-width: 0;
  font-size: 11px;
  color: var(--t-lichen);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wmu-sub-empty {
  padding: 10px 4px;
  font-size: 11px;
  color: var(--t-lichen);
  text-align: center;
  font-style: italic;
}

/* Sub-list zoom button is a smaller variant of the series-level zoom-to-btn. */
.zoom-to-btn.wmu-sub-zoom { width: 22px; height: 22px; border-radius: 5px; }
.zoom-to-btn.wmu-sub-zoom svg { width: 10px; height: 10px; }

/* ─── REGULATIONS PANE ─── */
.reg-loading {
  font-size: 12px; color: var(--t-lichen);
  padding: 14px 12px; text-align: center;
}

/* Monthly calendar legend */
.reg-calendar {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 1px;
  padding: 8px 8px 6px;
  background: var(--t-spruce);
  border-bottom: 1px solid rgba(154,148,135,0.18);
  flex-shrink: 0;
}
/* v2 — icon row + count badge per month (regulations-monthly-calendar-v2.md).
 * Cell layout: month letter (top) → icon column (3 fixed slots stacked
 * vertically, predator/bigGame/birds, 17px slots) → count below. Empty
 * months: only dimmed letter. v2.2 raised cell min-height from 56→86px to
 * accommodate the vertical icon stack. */
.reg-cal-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 5px 0 6px;
  cursor: pointer; border-radius: 5px; user-select: none;
  min-height: 86px; gap: 3px;
}
.reg-cal-cell:hover { background: rgba(201,169,110,0.08); }
.reg-cal-cell.current  { background: rgba(201,169,110,0.16); }
.reg-cal-cell.next-up  { background: rgba(212,98,42,0.14); }
.reg-cal-cell.selected { background: var(--t-tan); }
.reg-cal-cell.dim      { opacity: 0.45; }
.reg-cal-mo {
  font-size: 8px; font-weight: 800; letter-spacing: 0.3px;
  color: var(--t-lichen);
}
.reg-cal-cell.empty .reg-cal-mo { color: rgba(154,148,135,0.55); }
.reg-cal-cell.current .reg-cal-mo { color: var(--t-tan); }
.reg-cal-cell.next-up .reg-cal-mo { color: var(--t-orange); }
.reg-cal-cell.selected .reg-cal-mo,
.reg-cal-cell.selected .reg-cal-count { color: var(--t-canopy); }
/* v2.2 (2026-05-08): calendar icons are emoji glyphs sourced from
 * REG_CAT_LABELS — the same source the section-header `.reg-cat-emoji`
 * consumes. Emoji are full-colour by font-rendering and ignore CSS `color`,
 * so the prior per-category SVG colour overrides have been removed. The
 * cell-background/state styling (current / next-up / selected) carries
 * category state without recolouring icons. Icons are stacked vertically
 * (column flex) so the column-order top→bottom == predator → bigGame →
 * birds. Empty slots stay visible-hidden so the count baseline never moves. */
.reg-cal-icons {
  display: flex; flex-direction: column; gap: 2px;
  align-items: center; justify-content: center;
  line-height: 1;
}
.reg-cal-icon {
  width: 17px; height: 17px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1; font-style: normal;
}
.reg-cal-icon.empty { visibility: hidden; }
.reg-cal-count {
  font-size: 10px; font-weight: 800;
  color: var(--t-snow);
  line-height: 1;
}
.reg-cal-cell.current .reg-cal-count { color: var(--t-tan); font-weight: 800; }

/* Regulation search bar */
.reg-search-bar {
  padding: 8px 12px;
  background: var(--t-spruce);
  border-bottom: 1px solid rgba(154,148,135,0.18);
  flex-shrink: 0;
}
.reg-search-inner { position: relative; }
.reg-search-input {
  width: 100%; padding: 6px 10px 6px 28px;
  border: 1.5px solid rgba(154,148,135,0.2);
  border-radius: 8px; font-size: 11px;
  color: var(--t-snow); background: var(--t-canopy);
  outline: none; font-family: inherit; box-sizing: border-box;
}
.reg-search-input:focus { border-color: var(--t-tan); }
.reg-search-icon {
  position: absolute; left: 8px; top: 50%; transform: translateY(-50%);
  width: 12px; height: 12px;
  fill: none; stroke: var(--t-lichen);
  stroke-width: 2; stroke-linecap: round; pointer-events: none;
}

.reg-empty-state {
  font-size: 12px; color: var(--t-lichen);
  padding: 14px 12px; text-align: center;
  background: var(--t-spruce);
  border-bottom: 1px solid rgba(154,148,135,0.15);
}

/* Filter bar — "In Season Now" toggle */
.reg-filter-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  background: var(--t-dusk);
  border-bottom: 1px solid rgba(154,148,135,0.2);
  flex-shrink: 0;
}
.reg-filter-text { flex: 1; }
.reg-filter-label { font-size: 12px; font-weight: 600; color: var(--t-snow); }
.reg-filter-sub   { font-size: 10px; color: var(--t-lichen); margin-top: 1px; }
.reg-toggle {
  width: 38px; height: 22px; border-radius: 11px;
  border: none; cursor: pointer; position: relative;
  background: rgba(154,148,135,0.28); transition: background 0.18s;
  padding: 0; flex-shrink: 0;
}
.reg-toggle.on { background: var(--t-tan); }
.reg-toggle .knob {
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; position: absolute; top: 2px; left: 2px;
  transition: left 0.18s; box-shadow: 0 1px 3px rgba(0,0,0,0.4);
  pointer-events: none;
}
.reg-toggle.on .knob { left: 18px; }

/* Category accordions */
.reg-cat-acc {
  border-bottom: 1px solid rgba(154,148,135,0.18);
  background: var(--t-dusk);
}
.reg-cat-header {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 12px; cursor: pointer; user-select: none;
}
.reg-cat-header:hover { background: rgba(201,169,110,0.06); }
.reg-cat-emoji { font-size: 18px; flex-shrink: 0; line-height: 1; }
.reg-cat-title { font-size: 13px; font-weight: 700; color: var(--t-snow); flex: 1; }
.reg-open-badge {
  font-size: 9px; font-weight: 800;
  padding: 2px 6px; border-radius: 5px; flex-shrink: 0;
}
.reg-open-badge.has  { background: rgba(201,169,110,0.15); color: var(--t-tan); }
.reg-open-badge.none { background: rgba(154,148,135,0.12); color: var(--t-lichen); }
.reg-cat-chevron {
  width: 14px; height: 14px;
  fill: none; stroke: var(--t-lichen);
  stroke-width: 2.2; stroke-linecap: round;
  transition: transform 0.2s; flex-shrink: 0;
}
.reg-cat-chevron.open { transform: rotate(180deg); }
.reg-cat-body {
  display: none;
  border-top: 1px solid rgba(154,148,135,0.15);
  background: var(--t-spruce);
}
.reg-cat-body.open { display: block; }

/* Species rows */
.reg-species-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(154,148,135,0.1);
  cursor: pointer;
}
.reg-species-row:last-child { border-bottom: none; }
.reg-species-row:hover { background: rgba(201,169,110,0.05); }
.reg-sp-row.expanded {
  background: rgba(201,169,110,0.10) !important;
  border-bottom-color: var(--t-tan);
}
.reg-sp-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.reg-sp-dot.open  { background: #4ADE80; }
.reg-sp-dot.ended { background: #DC2626; opacity: 0.4; }
.reg-sp-text { flex: 1; min-width: 0; }
.reg-sp-name  { font-size: 12px; font-weight: 700; color: var(--t-snow); }
.reg-sp-dates { font-size: 10px; color: #C4BFB6; margin-top: 1px; }
.reg-sp-badge {
  font-size: 9px; font-weight: 800;
  padding: 2px 6px; border-radius: 5px; flex-shrink: 0;
}
.reg-sp-badge.open  { background: rgba(74,222,128,0.18); color: #4ADE80; }
.reg-sp-badge.yr    { background: rgba(201,169,110,0.18); color: var(--t-tan); }
.reg-sp-badge.ended { background: rgba(154,148,135,0.18); color: var(--t-lichen); }
.reg-sp-chev-down {
  width: 12px; height: 12px;
  fill: none; stroke: var(--t-lichen); stroke-width: 2.2; stroke-linecap: round;
  flex-shrink: 0; transition: transform 0.18s;
}
.reg-sp-chev-down.rot { transform: rotate(180deg); stroke: var(--t-tan); }

/* Inline species detail */
.reg-sp-detail {
  display: none;
  background: var(--t-canopy);
  border-bottom: 1px solid rgba(154,148,135,0.15);
  padding: 0; overflow: hidden;
}
.reg-sp-detail.vis { display: block; }
.reg-sp-detail-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: var(--t-tan); color: var(--t-canopy);
  font-size: 11px; font-weight: 600;
}
.reg-sp-detail-banner svg {
  width: 12px; height: 12px; flex-shrink: 0;
  fill: none; stroke: var(--t-canopy);
  stroke-width: 2.2; stroke-linecap: round;
}
.reg-sp-detail-clear {
  margin-left: auto;
  padding: 3px 8px; background: rgba(30,42,31,0.25);
  border: none; border-radius: 5px;
  color: var(--t-canopy); font-size: 10px; font-weight: 700;
  cursor: pointer; font-family: inherit;
}
.reg-sp-detail-clear:hover { background: rgba(30,42,31,0.45); }
.reg-sp-detail-season {
  padding: 8px 14px;
  border-bottom: 1px solid rgba(154,148,135,0.12);
}
.reg-sp-detail-season:last-child { border-bottom: none; padding-bottom: 12px; }
.reg-sp-detail-shdr {
  display: flex; align-items: center; gap: 6px; margin-bottom: 4px;
}
.reg-sp-detail-stitle { font-size: 11px; font-weight: 700; color: var(--t-snow); flex: 1; }
.reg-sp-detail-sdate  { font-size: 10px; color: #C4BFB6; margin-bottom: 6px; }
.reg-sp-detail-snote  {
  font-size: 10px; color: var(--t-lichen); line-height: 1.4;
  margin-top: 5px; padding-top: 5px;
  border-top: 1px solid rgba(154,148,135,0.12);
}
.reg-sp-detail-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.reg-sp-chip {
  font-size: 10px; font-weight: 700;
  padding: 3px 7px; border-radius: 5px; color: #fff;
}

/* ─── SEARCH PANE ─── */
.search-panel-inner {
  flex: 1; overflow-y: auto;
  padding: 12px 14px; background: var(--t-spruce);
}
.search-tabs {
  display: flex; margin-bottom: 12px;
  border-bottom: 1px solid rgba(154,148,135,0.2);
  background: var(--t-spruce);
}
.search-tab {
  flex: 1; padding: 7px 10px;
  font-size: 12px; font-weight: 700; color: var(--t-lichen);
  border: none; background: none; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  font-family: inherit;
}
.search-tab.active {
  color: var(--t-tan); border-bottom-color: var(--t-tan);
}

/* Province pill */
.province-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  border: 1.5px solid rgba(201,169,110,0.25);
  border-radius: 10px;
  background: rgba(201,169,110,0.07);
  margin-bottom: 10px; cursor: pointer;
}
.province-ab {
  width: 22px; height: 16px; border-radius: 3px;
  background: rgba(201,169,110,0.2); color: var(--t-tan);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 800; flex-shrink: 0;
}
.province-text { font-size: 12px; font-weight: 600; color: var(--t-snow); flex: 1; }

.search-input-wrap { position: relative; margin-bottom: 8px; }
.search-input {
  width: 100%; padding: 10px 12px 10px 36px;
  border: 1.5px solid rgba(154,148,135,0.22); border-radius: 10px;
  font-size: 14px; color: var(--t-snow);
  background: var(--t-canopy); outline: none;
  font-family: inherit;
}
.search-input:focus { border-color: var(--t-tan); }
.search-icon {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px;
  fill: none; stroke: var(--t-lichen);
  stroke-width: 2; stroke-linecap: round; pointer-events: none;
}

.format-hint {
  font-size: 11px; color: var(--t-tan); font-weight: 600;
  cursor: pointer; margin-bottom: 8px;
  display: inline-flex; align-items: center; gap: 3px;
}
.format-examples {
  background: rgba(201,169,110,0.07); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 8px; display: none;
}
.format-examples.open { display: block; }
.format-examples p { font-size: 11px; color: var(--t-lichen); margin-bottom: 5px; line-height: 1.5; }
.format-examples code {
  display: block;
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 11px; color: var(--t-tan); line-height: 2;
  white-space: pre-wrap;
}

.coord-tabs { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.coord-tab {
  padding: 4px 9px; border-radius: 6px;
  font-size: 11px; font-weight: 700;
  background: var(--t-dusk); color: var(--t-lichen);
  border: none; cursor: pointer; font-family: inherit;
}
.coord-tab.active { background: var(--t-tan); color: var(--t-canopy); }

.btn-lookup {
  width: 100%; padding: 12px; border: none; border-radius: 10px;
  background: var(--t-orange); color: #fff;
  font-size: 14px; font-weight: 700;
  cursor: pointer; margin-bottom: 10px; font-family: inherit;
}
.btn-lookup:hover { background: #b5511e; }

/* Result card */
.result-card-empty {
  background: rgba(201,169,110,0.05);
  border: 1px dashed rgba(201,169,110,0.22);
  border-radius: 10px;
  padding: 16px; margin-bottom: 8px;
  font-size: 12px; color: var(--t-lichen);
  text-align: center; line-height: 1.5;
}
.result-card {
  background: rgba(201,169,110,0.05);
  border: 1.5px solid rgba(201,169,110,0.22);
  border-radius: 13px;
  padding: 11px; margin-bottom: 8px;
}
.result-card-lsd {
  font-family: 'Libre Baskerville', serif;
  font-size: 14px; font-weight: 700; color: var(--t-snow);
  letter-spacing: -0.3px; margin-bottom: 6px;
}
.result-card-meta {
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: 11px; color: var(--t-snow);
  line-height: 1.5; margin-bottom: 8px;
}
.result-card-source {
  display: inline-block;
  font-size: 9px; font-weight: 800; letter-spacing: 0.4px;
  padding: 2px 7px; border-radius: 5px;
}
.result-card-source.sdk      { background: rgba(74,222,128,0.18); color: #4ADE80; }
.result-card-source.database { background: rgba(201,169,110,0.18); color: var(--t-tan); }

.lookups-remaining {
  font-size: 12px; color: var(--t-snow-dim);
  text-align: center; padding-top: 4px;
}

/* History pane */
.history-empty {
  font-size: 12px; color: var(--t-lichen);
  padding: 24px 14px; text-align: center;
}
.history-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(154,148,135,0.15);
  cursor: pointer;
  color: var(--t-snow);
}
.history-row > div:first-child > div:first-child {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 600;
}
.history-row-sub { font-size: 11px; color: var(--t-lichen); margin-top: 1px; }

/* ─── COPYRIGHT + VERSION FOOTER ──────────────────────────────────────
 * Pinned at the very bottom of the body flex column, BELOW the PRO promo
 * footer. Stays visible even when the user dismisses the PRO promo footer
 * (the dismiss handler hides #promo-footer but doesn't touch this strip).
 * The .cf-version span text is injected at boot from TUSSOCK_VERSION in
 * /public/javascript/map-shell.js — bump that one constant per dev-builder
 * session per semver. */
.copyright-footer {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 10px; height: 22px;
  font-size: 10px; letter-spacing: 0.02em;
  background: var(--t-canopy);
  border-top: 1px solid rgba(154,148,135,0.18);
  color: var(--t-lichen);
}
.copyright-footer .cf-sep { color: rgba(154,148,135,0.4); }
.copyright-footer .cf-version {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; color: var(--t-tan);
}

/* ─── PRO PROMO FOOTER ─── */
.promo-footer {
  flex-shrink: 0;
  background: rgba(58,75,59,0.95);
  border-top: 2px solid rgba(201,169,110,0.2);
  display: flex; align-items: center;
  min-height: 114px; z-index: 20;
  position: relative; gap: 0;
}
.promo-footer-dismiss {
  position: absolute; top: 8px; right: 10px;
  width: 24px; height: 24px;
  border: none; background: rgba(154,148,135,0.18);
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: rgba(237,233,224,0.6);
  font-size: 14px; line-height: 1; padding: 0;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
  z-index: 5;
}
.promo-footer-dismiss:hover {
  background: rgba(212,98,42,0.25); color: var(--t-snow);
}
.promo-pro-main {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 28px; flex: 1; min-width: 0;
  border-right: 1px solid rgba(201,169,110,0.2);
}
.promo-pro-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: rgba(201,169,110,0.12);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.promo-pro-icon svg {
  width: 26px; height: 26px;
  fill: none; stroke: var(--t-tan);
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.promo-pro-label {
  font-size: 10px; font-weight: 800; letter-spacing: 0.9px;
  text-transform: uppercase;
  background: var(--t-tan); color: var(--t-canopy);
  padding: 2px 8px; border-radius: 5px;
  display: inline-block; margin-bottom: 5px;
}
.promo-pro-title {
  font-family: 'Libre Baskerville', serif;
  font-size: 16px; font-weight: 700;
  color: var(--t-snow);
  letter-spacing: -0.3px; margin-bottom: 4px;
}
.promo-pro-sub {
  font-size: 13px; color: var(--t-snow-dim); line-height: 1.45;
}
.promo-value {
  padding: 18px 28px;
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: center; gap: 4px;
  border-right: 1px solid rgba(201,169,110,0.2);
  flex-shrink: 0;
}
.promo-value-item { display: flex; align-items: center; gap: 8px; }
.promo-value-check {
  width: 18px; height: 18px; border-radius: 5px;
  background: rgba(201,169,110,0.12);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.promo-value-check svg {
  width: 10px; height: 10px;
  fill: none; stroke: var(--t-tan);
  stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}
.promo-value-text { font-size: 12px; font-weight: 600; color: var(--t-snow); }
.promo-cta {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px;
  padding: 18px 28px; flex-shrink: 0;
}
.btn-get-pro {
  padding: 13px 28px; border: none; border-radius: 10px;
  background: var(--t-orange); color: #fff;
  font-size: 15px; font-weight: 800; cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 3px 12px rgba(212,98,42,0.38);
  font-family: inherit;
}
.btn-get-pro:hover { background: #b5511e; }
.promo-price {
  font-size: 12px; color: var(--t-lichen);
  font-weight: 600; text-align: center;
}
.promo-learn {
  font-size: 12px; color: var(--t-tan); font-weight: 700;
  cursor: pointer;
  border-bottom: 1px solid rgba(201,169,110,0.28);
  text-decoration: none;
}
.promo-learn:hover { color: var(--t-snow); }

@media (max-width: 620px) {
  .promo-footer { flex-direction: column; align-items: stretch; min-height: auto; }
  .promo-pro-main { border-right: none; border-bottom: 1px solid rgba(201,169,110,0.2); }
  .promo-value { border-right: none; border-bottom: 1px solid rgba(201,169,110,0.2); padding: 12px 20px; }
  .promo-cta { padding: 12px 20px; }
}

/* ─── MODALS ─── */
.modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.55); z-index: 600;
  align-items: flex-end; justify-content: center;
}
.modal-backdrop.open { display: flex; }
.paywall-sheet {
  background: var(--t-spruce);
  border-radius: 20px 20px 0 0;
  padding: 8px 0 28px;
  width: 100%; max-width: 440px;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
}
.sheet-handle { display: flex; justify-content: center; padding: 10px 0 4px; }
.sheet-handle div {
  width: 36px; height: 5px; border-radius: 3px;
  background: rgba(154,148,135,0.35);
}
.sheet-close-row {
  display: flex; justify-content: flex-end; padding: 4px 18px 4px;
}
.sheet-close {
  width: 28px; height: 28px;
  border: none; background: var(--t-dusk);
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.sheet-close svg {
  width: 13px; height: 13px;
  fill: none; stroke: var(--t-lichen);
  stroke-width: 2.2; stroke-linecap: round;
}
.sheet-body { padding: 4px 24px 0; overflow-y: auto; }
.sheet-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: rgba(201,169,110,0.07);
  border: 1.5px solid rgba(201,169,110,0.18);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.sheet-icon svg {
  width: 28px; height: 28px;
  fill: none; stroke: var(--t-tan);
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.sheet-eyebrow {
  font-size: 10px; font-weight: 800; letter-spacing: 0.8px;
  color: var(--t-tan); text-transform: uppercase; margin-bottom: 5px;
}
.sheet-title {
  font-family: 'Libre Baskerville', serif;
  font-size: 22px; font-weight: 700;
  color: var(--t-snow);
  letter-spacing: -0.5px; line-height: 1.2; margin-bottom: 7px;
}
.sheet-sub {
  font-size: 14px; color: var(--t-lichen); line-height: 1.5; margin-bottom: 18px;
}
.sheet-features { display: flex; flex-direction: column; margin-bottom: 20px; }
.sheet-feat {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(154,148,135,0.15);
}
.feat-check {
  width: 22px; height: 22px; border-radius: 6px;
  background: rgba(201,169,110,0.12);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.feat-check svg {
  width: 12px; height: 12px;
  fill: none; stroke: var(--t-tan);
  stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}
.feat-text { font-size: 14px; font-weight: 600; color: var(--t-snow); line-height: 1.4; }
.btn-pro-cta {
  display: block; width: 100%;
  padding: 15px; border-radius: 13px;
  background: var(--t-orange); border: none;
  color: #fff; font-size: 16px; font-weight: 800;
  cursor: pointer; margin-bottom: 8px;
  box-shadow: 0 4px 14px rgba(212,98,42,0.38);
  font-family: inherit;
}
.btn-pro-cta:hover { background: #b5511e; }
.sheet-note {
  font-size: 11px; color: var(--t-lichen);
  text-align: center; margin-bottom: 12px;
}
.sheet-restore { display: flex; justify-content: center; }
.sheet-restore button {
  background: none; border: none;
  color: var(--t-tan); font-size: 12px; font-weight: 700;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
  font-family: inherit;
}

/* ─── TOAST ─── */
.toast {
  position: fixed; bottom: 130px; left: 50%; transform: translateX(-50%);
  background: var(--t-dusk); color: var(--t-snow);
  border: 1px solid rgba(154,148,135,0.25);
  font-size: 13px; font-weight: 600;
  padding: 9px 18px; border-radius: 100px;
  z-index: 999; opacity: 0; transition: opacity 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; }
.toast.t-error   { border-color: var(--t-orange); color: #FFB89A; }
.toast.t-success { border-color: rgba(74,222,128,0.4); color: #BBF7D0; }

/* ─── MAPBOX WMU POPUP OVERRIDES (v2 — see map-popup-card-v2.md) ───
 * Card structure (top → bottom):
 *   1. WMU title row    (cream-on-tan icon chip + WMU number/name)
 *   2. Landowner row    (chevron-row: tap → inline manage panel)
 *   3. Season-status strip (Big Game / Predators / Birds icons)
 *   4. Weather row      (chevron-row: tap → inline detail body)
 *   5. Sunrise row      (chevron-row: tap → inline detail body)
 *   6. Action buttons   (waypoint / walk / drive)
 *
 * Lat/long row was removed in v2 — was redundant noise.
 * Title icon chips brightened to bright cream silhouette on warm Tan-tinted
 * dark chip (was tan-on-tan = invisible).
 */
.mapboxgl-popup.wmu-popup .mapboxgl-popup-content {
  padding: 0;
  border-radius: 12px;
  /* Match the wireframe's --wf-dusk popup body — slightly darker than
   * Spruce Shadow so the popup stands off the dark map. */
  background: #2A3220;
  box-shadow: 0 4px 20px rgba(0,0,0,0.55);
  border: 1px solid rgba(154,148,135,0.25);
  width: 250px;
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.mapboxgl-popup.wmu-popup .mapboxgl-popup-tip {
  border-top-color: #2A3220;
  border-bottom-color: #2A3220;
}
.mapboxgl-popup.wmu-popup .mapboxgl-popup-close-button {
  color: var(--t-lichen); background: none;
  font-size: 18px; top: 4px; right: 6px; z-index: 2;
}

/* Title + landowner rows (chevron-row with icon chip + body + chevron) */
.wmu-popup-row {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(154,148,135,0.15);
  cursor: pointer; transition: background 0.1s;
}
.wmu-popup-row:hover { background: rgba(201,169,110,0.06); }
.wmu-popup-icon {
  width: 26px; height: 26px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
/* v2 contrast fix — bright cream silhouette on warm Tan-tinted dark chip.
 * Was: bg 0.10 Tan tint + stroke Tan → dark on darker, icon disappeared. */
.wmu-popup-icon.green { background: rgba(201,169,110,0.18); }
.wmu-popup-icon.amber { background: rgba(201,169,110,0.18); }
.wmu-popup-icon svg {
  width: 13px; height: 13px;
  fill: none; stroke: var(--t-snow);
  stroke-width: 2.0; stroke-linecap: round; stroke-linejoin: round;
}
.wmu-popup-row-body { flex: 1; min-width: 0; }
.wmu-popup-title { font-size: 13px; font-weight: 700; color: var(--t-snow); }
.wmu-popup-sub   { font-size: 10px; color: var(--t-lichen); margin-top: 1px; }
.wmu-popup-caret {
  width: 12px; height: 12px;
  fill: none; stroke: rgba(154,148,135,0.5);
  stroke-width: 2.2; stroke-linecap: round; flex-shrink: 0;
}

/* Action buttons row (waypoint / walk / drive) */
.wmu-popup-actions {
  display: flex; border-top: 1px solid rgba(154,148,135,0.15);
}
.wmu-popup-action {
  flex: 1; height: 38px; border: none;
  border-right: 1px solid rgba(154,148,135,0.15);
  background: #2A3220; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.1s;
}
.wmu-popup-action:last-child { border-right: none; }
.wmu-popup-action:hover { background: var(--t-dusk); }
.wmu-popup-action svg {
  width: 14px; height: 14px;
  fill: none; stroke: var(--t-lichen);
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* WMU SEASON-STATUS STRIP */
.wmu-popup-strip {
  display: flex;
  border-top: 1px solid rgba(255,255,255,0.09);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding-top: 8px; padding-bottom: 6px;
  gap: 0;
}
.wmu-strip-cell {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 4px 2px; position: relative;
  cursor: pointer; transition: background 0.1s;
}
.wmu-strip-cell:hover { background: rgba(201,169,110,0.06); }
.wmu-strip-cell:focus-visible { outline: 2px solid var(--t-tan); outline-offset: -2px; border-radius: 4px; }
.wmu-strip-cell + .wmu-strip-cell::before {
  content: ''; position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 1px; background: rgba(255,255,255,0.09);
}
.wmu-strip-icon { width: 20px; height: 20px; flex-shrink: 0; }
.wmu-strip-cell--active .wmu-strip-icon { color: var(--t-orange); }
.wmu-strip-cell--active .wmu-strip-dot {
  display: block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22C55E;
  margin-top: -2px;
}
/* v2 — inactive bumped 0.40 → 0.65 for legibility parity across categories */
.wmu-strip-cell--inactive .wmu-strip-icon { color: rgba(154,148,135,0.65); }
.wmu-strip-cell--inactive .wmu-strip-dot { display: none; }
.wmu-strip-label {
  font-size: 9px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  text-align: center; line-height: 1.2;
}
/* v2 — bumped from 0.80 to solid Snow so the dot meaning reads at a glance */
.wmu-strip-cell--active .wmu-strip-label   { color: var(--t-snow); }
.wmu-strip-cell--inactive .wmu-strip-label { color: rgba(154,148,135,0.5); }

/* ─── POPUP EXPANDABLE ROWS (weather + sunrise + landowner) ─── */
.pp-exp-row {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 14px;
  border-top: 1px solid rgba(154,148,135,0.15);
  cursor: pointer; transition: background 0.1s;
}
.pp-exp-row:hover { background: var(--t-dusk); }
.pp-exp-title { font-size: 12px; font-weight: 700; color: var(--t-snow); }
.pp-exp-sub   { font-size: 10px; color: var(--t-lichen); margin-top: 1px; }
.pp-exp-chev {
  width: 11px; height: 11px;
  fill: none; stroke: rgba(154,148,135,0.65);
  stroke-width: 2.5; stroke-linecap: round;
  flex-shrink: 0; transition: transform 0.15s;
}
.pp-exp-chev.rot { transform: rotate(180deg); }
.pp-exp-body {
  display: none;
  padding: 8px 14px 10px;
  background: var(--t-canopy);
  border-top: 1px solid rgba(154,148,135,0.1);
}
.pp-exp-body.vis { display: block; }
.pp-exp-detail-row {
  display: flex; padding: 3px 0; font-size: 11px;
}
.pp-exp-detail-label { color: var(--t-lichen); font-weight: 600; width: 96px; flex-shrink: 0; }
.pp-exp-detail-val   { color: var(--t-snow); font-weight: 600; }
.pp-exp-detail-val.hunt { color: var(--t-tan); }
/* Weather row split temp — bold-primary + softer feels-like */
.pp-exp-temp-primary { color: var(--t-snow); font-weight: 700; }
.pp-exp-temp-feels   { color: rgba(154,148,135,0.7); font-weight: 400; }

/* ─── DESKTOP WIDE-CARD POPUP LAYOUT (≥720px) ───
 * Per map-popup-card-v2.md §4. Below 720px the popup keeps the existing
 * 250px-wide compact layout with the 3-cell category strip; at desktop widths
 * it grows to 440px and shows three stacked category rows in place of the
 * strip, so the user can see all three categories at once without tab
 * switching. Both markup variants are emitted by showWMUPopupAt(); CSS
 * handles the swap. NOTE: a previous wireframe iteration shipped these
 * rules then reverted them on user feedback (2026-05-08) in favour of the
 * mobile strip pattern at all widths. The current dev brief explicitly
 * re-instates the desktop wide-card variant — see PROGRESS_LOG.md
 * Session 14 for context on this re-introduction.
 */
@media (min-width: 720px) {
  .mapboxgl-popup.wmu-popup .mapboxgl-popup-content { width: 440px; }
  .wmu-popup-strip { display: none; }
  .wmu-popup-cat-rows { display: flex; flex-direction: column; gap: 6px; padding: 8px 14px; }
  .wmu-popup-cat-row {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 8px; border-radius: 8px;
    background: rgba(255,255,255,0.02);
    cursor: pointer; transition: background 0.1s;
  }
  .wmu-popup-cat-row:hover { background: rgba(201,169,110,0.07); }
  .wmu-popup-cat-icon {
    width: 28px; height: 28px; border-radius: 7px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    background: rgba(201,169,110,0.14);
  }
  .wmu-popup-cat-icon svg { width: 18px; height: 18px; }
  .wmu-popup-cat-row--active .wmu-popup-cat-icon svg { color: var(--t-orange); }
  .wmu-popup-cat-row--inactive .wmu-popup-cat-icon svg { color: rgba(154,148,135,0.65); }
  .wmu-popup-cat-body { flex: 1; min-width: 0; }
  .wmu-popup-cat-label {
    font-size: 9px; font-weight: 800; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--t-lichen); line-height: 1.2;
  }
  .wmu-popup-cat-row--active .wmu-popup-cat-label { color: var(--t-snow); }
  .wmu-popup-cat-summary {
    font-size: 11px; color: var(--t-lichen); margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .wmu-popup-cat-row--active .wmu-popup-cat-summary { color: var(--t-snow); }
  .wmu-popup-cat-status {
    display: flex; align-items: center; gap: 6px; flex-shrink: 0;
    font-size: 10px; font-weight: 700;
  }
  .wmu-popup-cat-status .wmu-cat-status-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(154,148,135,0.5);
    border: 1.5px solid rgba(154,148,135,0.5);
    box-sizing: border-box;
  }
  .wmu-popup-cat-row--active .wmu-cat-status-dot {
    background: #22C55E; border-color: #22C55E;
  }
  .wmu-popup-cat-row--active .wmu-popup-cat-status { color: #22C55E; }
  .wmu-popup-cat-row--inactive .wmu-popup-cat-status { color: var(--t-lichen); }
  .wmu-popup-cat-chev {
    width: 11px; height: 11px;
    fill: none; stroke: rgba(154,148,135,0.5);
    stroke-width: 2.2; stroke-linecap: round; flex-shrink: 0;
  }
}
@media (max-width: 719px) {
  .wmu-popup-cat-rows { display: none; }
}

/* ─── EXPANDED WEATHER + SUNRISE BODIES — Today/Tomorrow grid ───
 * Per map-popup-card-v2.md §5 and design-status.md §weather/sunrise rows.
 * Two-column grid (Today | Tomorrow) inside the expanded body of the
 * weather and sunrise rows. Today header tinted Tan (dark mode) / dark
 * green (light mode); Tomorrow header tinted Permission Orange / amber. */
.pp-exp-body-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-bottom: 6px;
}
.pp-exp-body-col { min-width: 0; }
.pp-exp-body-col + .pp-exp-body-col {
  padding-left: 10px;
  border-left: 1px solid rgba(154,148,135,0.15);
}
.pp-exp-body-col-head {
  font-size: 9px; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(154,148,135,0.15);
  margin-bottom: 4px;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.pp-exp-body-col-head .pp-exp-body-col-date {
  font-size: 9px; font-weight: 600; color: var(--t-lichen);
  text-transform: none; letter-spacing: 0.2px;
}
.pp-exp-body-col.today .pp-exp-body-col-head { color: var(--t-tan); }
.pp-exp-body-col.tomorrow .pp-exp-body-col-head { color: var(--t-orange); }
.pp-exp-body-col .pp-exp-detail-row {
  padding: 2px 0; font-size: 10.5px;
}
.pp-exp-body-col .pp-exp-detail-label {
  width: auto; flex: 1;
}
.pp-exp-body-col .pp-exp-detail-val {
  font-size: 10.5px;
}
.pp-exp-body-row-shared {
  font-size: 10.5px;
  color: var(--t-snow);
  padding: 2px 0;
}
.pp-exp-body-row-shared .pp-exp-detail-label {
  color: var(--t-lichen); width: 96px;
}
.pp-exp-body-foot {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(154,148,135,0.12);
  font-size: 9.5px;
  color: var(--t-lichen);
  letter-spacing: 0.02em;
}

/* Landowner-management inline expand body */
.pp-lm-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0 8px;
  border-bottom: 1px solid rgba(154,148,135,0.15);
  margin-bottom: 6px;
}
.pp-lm-toggle-label { font-size: 11px; font-weight: 700; color: var(--t-snow); }
.pp-lm-toggle {
  width: 32px; height: 18px; border-radius: 999px;
  background: var(--t-dusk); position: relative; cursor: pointer;
  transition: background 0.15s; flex-shrink: 0; border: none; padding: 0;
}
.pp-lm-toggle.on { background: var(--t-orange); }
.pp-lm-toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--t-snow); transition: transform 0.15s;
}
.pp-lm-toggle.on::after { transform: translateX(14px); }
.pp-lm-zoom-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 8px 10px; margin-top: 8px;
  border-radius: 8px;
  border: 1px solid rgba(154,148,135,0.25);
  background: var(--t-dusk); color: var(--t-tan);
  font-size: 11px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: background 0.1s, border-color 0.1s;
}
.pp-lm-zoom-btn:hover {
  background: rgba(201,169,110,0.10); border-color: var(--t-tan);
}
.pp-lm-zoom-btn svg {
  width: 11px; height: 11px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

/* ─── WMU MAP LABELS (HTML markers — pill chips) ─────────────────────────
 * Per claude/uiux-sources/design-status.md §"Production parity contract":
 * WMU labels render as **rounded color-coded chip** divs anchored at each
 * polygon centroid via mapboxgl.Marker. Background = WMU_COLORS[series]
 * (set inline by JS from layerDef.swatchColor). White text. Pill-shaped
 * (border-radius: 999px). Min-width 28px so single-digit IDs still read
 * as a chip and not a dot. The Session 8 symbol-layer-with-halo
 * approach drew text but no chip background — superseded.
 *
 * Visibility (display: none/'') is toggled by JS on `zoomend` so the
 * chips only render at zoom >= WMU_LABEL_MIN_ZOOM (7). */
/* Canonical WMU chip — rounded-square per claude/tussock-brand/wmu-marker-style.md.
 * DO NOT change values here without updating that doc (and the wireframe mirror).
 * Earlier pill/oval (border-radius: 999px, padding 4px 8px, min-width 28px) was
 * explicitly rejected by the user 2026-05-08; values below match the wireframe
 * verbatim so all four surfaces stay in lock-step.
 *
 *   Box   : height 22px, min-width 24px, padding 0 5px, border-radius 6px
 *   Type  : 11px / 700, line-height 1, white text
 *   Aspect: 24×22 for 1-2 digits (~square), ~32×22 for 3 digits (rounded rect) */
.wmu-map-label {
  height: 22px; min-width: 24px;
  padding: 0 5px; border-radius: 6px;
  box-sizing: border-box;
  font-size: 11px; font-weight: 700;
  line-height: 1;
  color: #fff;
  cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.45);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: 0.2px;
  transition: opacity 0.15s, transform 0.1s;
  user-select: none;
  -webkit-user-select: none;
}
.wmu-map-label:hover { opacity: 0.85; transform: scale(1.08); }
body.sat-mode .wmu-map-label {
  box-shadow: 0 0 0 1.5px rgba(0,0,0,0.85), 0 2px 10px rgba(0,0,0,0.9);
}

/* ─── SERIES-OVERVIEW LABELS (zoom <= 6) ───
 * At provincial-overview zoom levels the per-WMU polygon detail is illegible,
 * so we replace them with 5 big region labels (Prairie / Parkland / Foothills /
 * Mountain / Northern Boreal) anchored at each series' centroid. Each label is a
 * Mapbox HTML marker; clicking flies to that series at zoom 7. Ported verbatim
 * from the Leaflet wireframe (`02-map-app-shell.html` → `.series-overview-label*`).
 *
 * `.series-overview-label-wrap` is the marker root and is positioned by Mapbox
 * via translate3d() on its parent. The inner `.series-overview-label` does its
 * own translate(-50%,-50%) so the pill is centred on the LngLat anchor. */
.series-overview-label-wrap { pointer-events: auto; cursor: pointer; }
.series-overview-label {
  display: inline-block;
  transform: translate(-50%, -50%);
  padding: 6px 14px;
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #fff;
  text-align: center;
  line-height: 1.15;
  white-space: nowrap;
  background: rgba(26, 31, 18, 0.78);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85), 0 0 6px rgba(0, 0, 0, 0.6);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out;
}
.series-overview-label-wrap:hover .series-overview-label {
  transform: translate(-50%, -50%) scale(1.06);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
}
.series-overview-label-name { font-size: 15px; font-weight: 800; }
.series-overview-label-range {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.85;
  letter-spacing: 0.5px;
}
/* Satellite contrast — bump shadow + opacity so the pill stands out on bright imagery. */
body.sat-mode .series-overview-label {
  background: rgba(26, 31, 18, 0.86);
  box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.6), 0 4px 18px rgba(0, 0, 0, 0.85);
}

/* Satellite contrast — heavier control shadow against bright imagery so the
 * dark HornLark controls stay visually distinct on satellite tiles. */
body.sat-mode .map-btn-group,
body.sat-mode .map-style-group,
body.sat-mode .gps-wrap {
  box-shadow: 0 2px 14px rgba(0,0,0,0.42);
}
body.sat-mode .sidebar {
  border-left-color: rgba(201,169,110,0.5);
  box-shadow: -3px 0 12px rgba(0,0,0,0.25);
}
/* Heavier weather-widget border in sat mode for the same reason */
body.sat-mode .weather-widget {
  background: rgba(26,31,18,0.86);
  border-color: rgba(201,169,110,0.35);
}

/* ─── NAV LOGO (HornLark mark + wordmark) ─── */
/* 2026-10-08: the HornLark mark (/public/images/hornlark-mark.svg) carries its
 * own Field Dusk badge + Tan hairline, so the img itself has no border/bg.
 * Wordmark is live text (.nav-logo-text above). Lockup gap: 12px. */
.nav-logo-img {
  height: 36px; width: 36px;
  display: block;
  flex-shrink: 0;
}
.nav-wordmark-img {
  height: 28px; width: auto;
  display: block;
  flex-shrink: 0;
}
