/* ============================================================
   Cairn · app.css
   "WPA park poster meets Palo Duro at golden hour."
   Canyon-red primary, river-blue accent, gold favorites.
   Light chrome floating over satellite imagery — legible at noon.
   ============================================================ */

/* Besley — a Clarendon revival: the letterform family of real
   national-park trail signage. Display voice of the app. */
@font-face {
  font-family: 'Besley';
  src: url('fonts/besley-latin.woff2') format('woff2');
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* palette (seed: oklch(0.40 0.13 20) → canyon country) */
  --bg:            oklch(1 0 0);
  --surface:       oklch(0.972 0.007 75);
  --surface-2:     oklch(0.945 0.010 70);
  --ink:           oklch(0.26 0.020 40);
  --muted:         oklch(0.46 0.018 40);
  --line:          oklch(0.885 0.010 65);
  --canyon:        oklch(0.46 0.145 27);
  --canyon-deep:   oklch(0.37 0.120 28);
  --canyon-tint:   oklch(0.94 0.022 30);
  --river:         oklch(0.47 0.085 225);
  --river-tint:    oklch(0.93 0.020 225);
  --gold:          oklch(0.76 0.130 80);
  --gold-deep:     oklch(0.52 0.110 70);
  --gold-tint:     oklch(0.95 0.045 85);
  --juniper:       oklch(0.45 0.075 155);
  --juniper-tint:  oklch(0.93 0.022 155);
  --danger:        oklch(0.50 0.160 25);

  /* dusk (gate scene chrome) */
  --dusk-ink:      oklch(0.16 0.020 320);
  --dusk-cream:    oklch(0.93 0.040 85);

  --font-display: 'Besley', 'Rockwell', Georgia, serif;
  --font-ui: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;

  /* type scale (fixed rem — product register) */
  --fs-xs: .8125rem;
  --fs-sm: .875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-h3: 1.375rem;
  --fs-h2: 1.75rem;
  --fs-h1: 2.125rem;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --shadow-1: 0 1px 2px oklch(0.2 0.02 40 / .10), 0 2px 10px oklch(0.2 0.02 40 / .08);
  --shadow-2: 0 4px 10px oklch(0.2 0.02 40 / .14), 0 12px 32px oklch(0.2 0.02 40 / .16);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);   /* quint-ish */
  --t-fast: 160ms;
  --t-med: 320ms;

  /* z scale: leaflet tops out at 1000 */
  --z-chrome: 1100;
  --z-card: 1150;
  --z-backdrop: 1200;
  --z-sheet: 1300;
  --z-toast: 1400;

  --safe-b: env(safe-area-inset-bottom, 0px);
  --tabbar-h: calc(60px + var(--safe-b));
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
h1, h2, h3 { text-wrap: balance; margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--river);
  outline-offset: 2px;
}
input, textarea, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* ============================================================
   GATE
   ============================================================ */
.gate {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  justify-content: space-between;
  background: #1e1214;
  color: var(--dusk-cream);
  z-index: var(--z-toast);
  overflow: hidden;
  transition: opacity 550ms var(--ease-out), transform 550ms var(--ease-out);
}
.gate.leave { opacity: 0; transform: translateY(-3%); pointer-events: none; }

.gate-scene {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}

.gate-brand {
  position: relative; z-index: 1;
  text-align: center;
  padding-top: clamp(40px, 9dvh, 92px);
  animation: gate-in 900ms var(--ease-out) both;
}
.gate-mark {
  width: 46px; height: 46px;
  color: var(--dusk-cream);
  opacity: .95;
}
.gate-word {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(3rem, 13vw, 4.25rem);
  letter-spacing: .015em;
  line-height: 1;
  margin-top: 2px;
  text-shadow: 0 2px 24px oklch(0.2 0.05 320 / .55);
}
.gate-tag {
  margin: 10px 0 0;
  font-size: var(--fs-lg);
  color: oklch(0.90 0.045 85 / .92);
  letter-spacing: .01em;
}

.gate-pad {
  position: relative; z-index: 1;
  padding: 12px 20px calc(22px + var(--safe-b));
  max-width: 340px;
  width: 100%;
  margin: 0 auto;
  animation: gate-in 900ms 120ms var(--ease-out) both;
}
.gate-dots {
  display: flex; justify-content: center; gap: 14px;
  min-height: 16px; margin-bottom: 6px;
}
.gate-dots .dot {
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid oklch(0.9 0.04 85 / .55);
  transition: background var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.gate-dots .dot.fill {
  background: var(--dusk-cream);
  border-color: var(--dusk-cream);
  transform: scale(1.12);
}
.gate-err {
  min-height: 22px;
  margin: 2px 0 4px;
  text-align: center;
  font-size: var(--fs-sm);
  color: oklch(0.86 0.09 45);
}
.gate-pad.shake .gate-dots { animation: shake 420ms var(--ease-out); }

.gate-keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  justify-items: center;
}
.key {
  width: min(76px, 20vw); height: min(76px, 20vw);
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.65rem;
  font-weight: 500;
  color: var(--dusk-cream);
  background: oklch(0.95 0.04 85 / .10);
  border: 1px solid oklch(0.95 0.04 85 / .16);
  -webkit-tap-highlight-color: transparent;
  transition: background var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.key:active { background: oklch(0.95 0.04 85 / .26); transform: scale(.94); }
.key-ghost { background: transparent; border-color: transparent; }
.key-go {
  background: var(--canyon);
  border-color: transparent;
  color: #fff;
}
.key-go:not([disabled]):active { background: var(--canyon-deep); }
.key-go[disabled] { opacity: .35; cursor: default; }

@keyframes gate-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}

/* ============================================================
   APP SHELL
   ============================================================ */
.app { position: fixed; inset: 0; display: flex; flex-direction: column; }
.view { position: absolute; inset: 0; bottom: var(--tabbar-h); }
.mapbox { position: absolute; inset: 0; background: oklch(0.30 0.02 250); }

/* leaflet chrome tune-up */
.leaflet-container { font-family: var(--font-ui); }
.leaflet-control-attribution {
  font-size: 10px;
  background: oklch(1 0 0 / .72) !important;
  color: var(--muted);
  border-radius: 8px 0 0 0;
}
.leaflet-control-attribution a { color: var(--muted); }
.leaflet-div-icon { background: none; border: none; }
.leaflet-tooltip {
  font-family: var(--font-ui);
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}

/* ---------- floating map chrome ---------- */
.map-chrome {
  position: absolute;
  top: max(12px, env(safe-area-inset-top, 0px));
  left: 12px; right: 12px;
  z-index: var(--z-chrome);
  pointer-events: none;
}
.map-chrome > * { pointer-events: auto; }
.searchwrap { max-width: 520px; }

.searchbar {
  display: flex; align-items: center; gap: 10px;
  height: 50px;
  padding: 0 8px 0 16px;
  background: var(--bg);
  border-radius: 25px;
  box-shadow: var(--shadow-2);
}
.searchbar-ic { color: var(--canyon); flex: none; }
.searchbar input {
  flex: 1; min-width: 0;
  border: 0; background: none; outline: none;
  font-size: var(--fs-md);
  height: 100%;
}
.searchbar input::placeholder { color: var(--muted); }
.searchbar input::-webkit-search-cancel-button { display: none; }
.searchbar-x {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--muted);
}
.searchbar-x:active { background: var(--surface-2); }

.chips {
  display: flex; gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  height: 38px;
  padding: 0 15px;
  border-radius: 19px;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.chip.is-on {
  background: var(--canyon);
  border-color: var(--canyon);
  color: #fff;
}

.search-results {
  margin-top: 10px;
  background: var(--bg);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  max-height: min(48dvh, 420px);
  overflow-y: auto;
}
.sr-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--surface-2);
}
.sr-row:last-child { border-bottom: 0; }
.sr-row:active { background: var(--surface); }
.sr-glyph {
  flex: none;
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--canyon-tint);
  color: var(--canyon);
}
.sr-glyph.no-camp { background: var(--surface-2); color: var(--muted); }
.sr-main { flex: 1; min-width: 0; }
.sr-name { font-weight: 650; }
.sr-meta { font-size: var(--fs-xs); color: var(--muted); margin-top: 1px; }
.sr-badges { display: flex; gap: 5px; flex: none; }
.sr-empty { padding: 20px 16px; color: var(--muted); font-size: var(--fs-sm); text-align: center; }

.basemap-btn {
  position: absolute;
  right: 0; top: 0;
  height: 50px;
  padding: 0 16px;
  border-radius: 25px;
  background: var(--bg);
  box-shadow: var(--shadow-2);
  font-weight: 650;
  font-size: var(--fs-sm);
  color: var(--ink);
}
.basemap-park {
  position: absolute;
  right: 12px;
  bottom: 18px;
  top: auto;
  z-index: var(--z-chrome);
}

/* ---------- park markers (divIcon) ---------- */
.pk {
  position: relative;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--canyon);
  color: #fff;
  border: 2px solid oklch(1 0 0 / .92);
  box-shadow: 0 2px 6px oklch(0.1 0.02 40 / .45);
  transition: transform var(--t-fast) var(--ease-out);
}
.pk:hover { transform: scale(1.12); }
.pk.pk-day {
  width: 22px; height: 22px;
  background: oklch(0.42 0.03 50);
}
.pk.pk-day svg { width: 12px; height: 12px; }
.pk.has-saved { box-shadow: 0 0 0 3.5px var(--gold), 0 2px 8px oklch(0.1 0.02 40 / .5); }
.pk .pk-flag {
  position: absolute;
  top: -7px; right: -7px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--river);
  color: #fff;
  display: grid; place-items: center;
  border: 1.5px solid oklch(1 0 0 / .95);
}
.pk .pk-flag svg { width: 9px; height: 9px; }

/* numbered campsite dots on park map */
.site {
  min-width: 26px; height: 26px;
  padding: 0 4px;
  border-radius: 13px;
  display: grid; place-items: center;
  background: oklch(1 0 0 / .95);
  color: var(--ink);
  font-size: 12px; font-weight: 700;
  border: 1.5px solid oklch(0.72 0.03 50);
  box-shadow: 0 1px 3px oklch(0.1 0.02 40 / .4);
  transition: transform var(--t-fast) var(--ease-out);
}
.site:hover { transform: scale(1.18); z-index: 10; }
.site.bc { background: var(--juniper-tint); border-color: var(--juniper); color: var(--juniper); }
/* named camping-section marker — a forest trail sign, centered on its point */
.camp-tag {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  padding: 2px 8px 2px 6px; border-radius: 999px;
  background: oklch(0.32 0.055 152 / .9);
  color: oklch(0.97 0.02 110);
  font-size: 10px; font-weight: 650; letter-spacing: .01em;
  border: 1px solid oklch(0.74 0.10 140 / .5);
  box-shadow: 0 1px 4px oklch(0.1 0.02 40 / .5);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.camp-tag svg { width: 10px; height: 10px; opacity: .9; flex: 0 0 auto; }
.camp-tag:hover { background: oklch(0.42 0.07 152 / .98); transform: translate(-50%, -50%) scale(1.08); z-index: 20; }

/* saved spot markers */
.spot {
  position: relative;
  min-width: 38px; height: 38px;
  padding: 0 6px;
  border-radius: 13px;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 750;
  color: #fff;
  border: 2px solid oklch(1 0 0 / .95);
  box-shadow: 0 3px 8px oklch(0.1 0.02 40 / .5);
  transition: transform var(--t-fast) var(--ease-out);
}
.spot::after {
  content: '';
  position: absolute;
  bottom: -7px; left: 50%;
  width: 10px; height: 10px;
  background: inherit;
  border-right: 2px solid oklch(1 0 0 / .95);
  border-bottom: 2px solid oklch(1 0 0 / .95);
  transform: translateX(-50%) rotate(45deg);
  border-radius: 0 0 3px 0;
}
.spot:hover { transform: scale(1.1); }
.spot.favorite { background: var(--gold); color: oklch(0.28 0.06 60); }
.spot.consider { background: var(--river); }
.spot.stayed   { background: var(--juniper); }
.spot.pop { animation: pop 500ms var(--ease-out); }
@keyframes pop {
  0% { transform: scale(.4); }
  70% { transform: scale(1.14); }
  100% { transform: scale(1); }
}

/* ---------- park quick-card ---------- */
.park-card {
  position: absolute;
  left: 12px; right: 12px;
  bottom: 14px;
  z-index: var(--z-card);
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  padding: 16px;
  animation: rise var(--t-med) var(--ease-out);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.pc-top { display: flex; align-items: flex-start; gap: 10px; }
.pc-name {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: var(--fs-h3);
  line-height: 1.15;
  flex: 1;
}
.pc-close {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--muted);
  background: var(--surface);
}
.pc-region { color: var(--muted); font-size: var(--fs-sm); margin: 2px 0 10px; }
.pc-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.fact {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: 15px;
  font-size: var(--fs-xs);
  font-weight: 650;
  background: var(--surface);
  color: var(--ink);
}
.fact svg { width: 13px; height: 13px; }
.fact.f-camp { background: var(--canyon-tint); color: var(--canyon-deep); }
.fact.f-sites { background: var(--river-tint); color: var(--river); }
.fact.f-saved { background: var(--gold-tint); color: var(--gold-deep); }
.fact.f-none { color: var(--muted); }
.pc-actions { display: flex; gap: 10px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px;
  padding: 0 20px;
  border-radius: var(--r-md);
  font-weight: 650;
  font-size: var(--fs-md);
  background: var(--canyon);
  color: #fff;
  transition: background var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { background: var(--canyon-deep); transform: scale(.98); }
.btn.grow { flex: 1; }
.btn-ghost {
  background: var(--bg);
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-ghost:active { background: var(--surface); }
.btn-icon {
  flex: none;
  width: 48px; height: 48px;
  padding: 0;
  border-radius: var(--r-md);
  background: var(--bg);
  color: var(--ink);
  border: 1.5px solid var(--line);
  display: grid; place-items: center;
}
.btn-icon:active { background: var(--surface); }
.btn-icon.is-on { background: var(--river); border-color: var(--river); color: #fff; }
.btn-danger { background: none; color: var(--danger); height: 44px; font-weight: 650; }

/* ============================================================
   PARK DETAIL
   ============================================================ */
.view-park { display: flex; flex-direction: column; }
.view-park .mapbox { position: relative; inset: auto; flex: 1; }

.park-hero {
  position: relative;
  flex: none;
  color: #fff;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.075' stroke-width='1.4'%3E%3Cpath d='M-20 60 Q 70 20 130 62 T 290 55'/%3E%3Cpath d='M-20 105 Q 80 62 140 108 T 290 98'/%3E%3Cpath d='M-20 152 Q 90 106 150 154 T 290 143'/%3E%3Cpath d='M-20 200 Q 100 152 160 202 T 290 190'/%3E%3Cpath d='M-20 246 Q 105 200 165 248 T 290 236'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(155deg, var(--canyon-deep) 0%, var(--canyon) 62%, oklch(0.52 0.14 45) 100%);
  padding: max(10px, env(safe-area-inset-top, 0px)) 14px 14px;
  max-height: 46vh;               /* mobile: never let the header swallow the map */
  overflow-y: auto;
  overscroll-behavior: contain;
}
.ph-nav { display: flex; align-items: center; gap: 8px; }
.ph-back {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: oklch(1 0 0 / .16);
  color: #fff;
  flex: none;
}
.ph-back:active { background: oklch(1 0 0 / .3); }
.ph-spacer { flex: 1; }
.ph-bucket {
  height: 40px;
  padding: 0 14px;
  border-radius: 20px;
  display: inline-flex; align-items: center; gap: 7px;
  background: oklch(1 0 0 / .16);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 650;
}
.ph-bucket.is-on { background: var(--river); }

/* Stayed-here (park-level "we've been") — twin of bucket, in juniper green */
.ph-stayed {
  height: 40px; padding: 0 13px; border-radius: 20px;
  display: inline-flex; align-items: center; gap: 6px;
  background: oklch(1 0 0 / .16); color: #fff;
  font-size: var(--fs-sm); font-weight: 650;
}
.ph-stayed svg { width: 16px; height: 16px; }
.ph-stayed.is-on { background: var(--juniper); }
.stayed-toggle.is-on { background: var(--juniper); border-color: var(--juniper); color: #fff; }
.pk .pk-stayed {
  position: absolute; top: -7px; left: -7px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--juniper); color: #fff;
  display: grid; place-items: center;
  border: 1.5px solid oklch(1 0 0 / .95);
}
.pk .pk-stayed svg { width: 10px; height: 10px; }

/* honest coverage note in the park hero */
.ph-cov {
  margin: 9px 2px 0; font-size: 12px; line-height: 1.45;
  color: oklch(1 0 0 / .82); display: flex; gap: 7px; align-items: flex-start;
  max-width: 640px;
}
.ph-cov b { color: #fff; font-weight: 700; }
.ph-cov-dot {
  flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; margin-top: 5px;
  background: var(--gold); box-shadow: 0 0 0 3px oklch(0.76 0.13 80 / .25);
}

/* curated per-park detail: official map link + sites-at-a-glance guide */
.fact.fact-map { background: var(--juniper-tint); color: var(--juniper); }
.ph-guide { margin: 10px 0 0; max-width: 640px; }
.ph-guide-sum {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 13px; border-radius: 17px;
  background: oklch(1 0 0 / .16); color: #fff;
  font-size: var(--fs-sm); font-weight: 650; user-select: none;
}
.ph-guide-sum::-webkit-details-marker { display: none; }
.ph-guide-sum svg { width: 15px; height: 15px; }
.ph-guide-chev { display: inline-flex; transition: transform var(--t-fast, .15s) ease; opacity: .8; }
.ph-guide[open] .ph-guide-chev { transform: rotate(90deg); }
.ph-guide-blurb { margin: 9px 2px 8px; font-size: 12px; line-height: 1.45; color: oklch(1 0 0 / .86); }
.ph-guide-rows { display: grid; gap: 6px; }
.guide-row {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 10px;
  padding: 7px 11px; border-radius: 10px;
  background: oklch(1 0 0 / .1); border-left: 3px solid oklch(1 0 0 / .4);
}
.guide-type { font-size: 12.5px; font-weight: 700; color: #fff; }
.guide-meta { font-size: 11.5px; color: oklch(1 0 0 / .8); }
.guide-row.g-electric  { border-left-color: var(--gold); }
.guide-row.g-water     { border-left-color: var(--river); }
.guide-row.g-tent      { border-left-color: var(--juniper); }
.guide-row.g-primitive { border-left-color: oklch(0.72 0.02 60); }

/* ===== Epic Adventures ===== */
.chip-adv.is-on { background: var(--gold); color: #3a2708; border-color: var(--gold); }
.adv-pin {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 34%, var(--gold), var(--gold-deep));
  border: 2.5px solid #fff; color: #fff;
  box-shadow: 0 3px 9px oklch(0.1 0.02 40 / .55);
}
.adv-pin svg { filter: drop-shadow(0 1px 1px oklch(0.2 0.05 60 / .5)); }
.adv-th {
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 3px solid var(--gold-deep);
  box-shadow: 0 1px 4px oklch(0.1 0.02 40 / .5);
}
.adv-add {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
  z-index: var(--z-chrome);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 18px; border-radius: 22px;
  background: var(--gold); color: #3a2708;
  font-size: var(--fs-sm); font-weight: 700; cursor: pointer;
  border: none; box-shadow: 0 6px 18px oklch(0.1 0.02 40 / .4);
}
.adv-add:active { transform: translateX(-50%) scale(.97); }
body.adv-dropping .mapbox, body.adv-dropping .leaflet-container { cursor: crosshair; }
.sc-num.adv { background: var(--gold-tint); color: var(--gold-deep); }
.sc-num.adv svg { width: 26px; height: 26px; }
.kind-tag.adv { background: var(--gold-tint); color: var(--gold-deep); }
.seg2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg2-btn {
  height: 40px; border-radius: var(--r-md);
  border: 1.5px solid var(--line); background: var(--bg);
  color: var(--muted); font-size: var(--fs-xs); font-weight: 650; cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}
.seg2-btn.is-on { background: var(--gold); border-color: var(--gold); color: #3a2708; }
.ph-bucket svg { width: 15px; height: 15px; }
.ph-name {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: var(--fs-h2);
  line-height: 1.08;
  margin: 8px 2px 2px;
  letter-spacing: .002em;
}
.ph-sub { margin: 0 2px; font-size: var(--fs-sm); color: oklch(1 0 0 / .82); }
.ph-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.ph-facts .fact { background: oklch(1 0 0 / .16); color: #fff; }
.ph-facts a.fact { text-decoration: none; }
.ph-facts a.fact:active { background: oklch(1 0 0 / .3); }

/* the booking cheat strip — favorites, bold + scannable */
.cheat {
  display: flex; gap: 8px;
  margin: 12px -14px 0;
  padding: 0 14px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cheat::-webkit-scrollbar { display: none; }
.cheat-pill {
  flex: none;
  display: inline-flex; align-items: center; gap: 9px;
  height: 44px;
  padding: 0 14px 0 8px;
  border-radius: 22px;
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--shadow-1);
  font-size: var(--fs-sm);
  max-width: 78vw;
}
.cheat-num {
  flex: none;
  min-width: 30px; height: 30px;
  padding: 0 5px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 15px;
}
.cheat-pill.favorite .cheat-num { background: var(--gold); color: oklch(0.28 0.06 60); }
.cheat-pill.consider .cheat-num { background: var(--river); color: #fff; }
.cheat-pill.stayed   .cheat-num { background: var(--juniper); color: #fff; }
.cheat-label { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cheat-stars { color: var(--gold-deep); font-size: 11px; letter-spacing: .12em; white-space: nowrap; }

.drop-hint {
  position: absolute;
  bottom: 18px; left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-chrome);
  background: oklch(0.24 0.02 40 / .88);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 20px;
  pointer-events: none;
  max-width: calc(100vw - 32px);
  text-align: center;
  line-height: 1.3;
}

/* ============================================================
   SHEET (bottom on mobile → side panel on desktop)
   ============================================================ */
.sheet-backdrop {
  position: fixed; inset: 0;
  background: oklch(0.15 0.02 40 / .42);
  z-index: var(--z-backdrop);
  opacity: 0;
  transition: opacity var(--t-med) var(--ease-out);
}
.sheet-backdrop.show { opacity: 1; }
.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: var(--z-sheet);
  background: var(--bg);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 40px oklch(0.1 0.02 40 / .3);
  max-height: 88dvh;
  display: flex; flex-direction: column;
  transform: translateY(104%);
  transition: transform var(--t-med) var(--ease-out);
}
.sheet.show { transform: none; }
.sheet-grip {
  flex: none;
  width: 44px; height: 5px;
  border-radius: 3px;
  background: var(--line);
  margin: 10px auto 2px;
}
.sheet-body {
  overflow-y: auto;
  padding: 10px 20px calc(20px + var(--safe-b));
  -webkit-overflow-scrolling: touch;
}

.sheet-h {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: var(--fs-h3);
  margin: 6px 0 2px;
}
.sheet-sub { color: var(--muted); font-size: var(--fs-sm); margin: 0 0 14px; }

/* ---------- form ---------- */
.f-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 650;
  margin: 16px 0 7px;
}
.f-input, .f-area {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg);
  padding: 12px 14px;
  font-size: var(--fs-md);
  transition: border-color var(--t-fast) var(--ease-out);
}
.f-input { height: 50px; }
.f-area { min-height: 96px; resize: vertical; }
.f-input:focus, .f-area:focus { border-color: var(--canyon); outline: none; }
.f-input::placeholder, .f-area::placeholder { color: var(--muted); }

.kind-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kind-btn {
  height: 74px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: var(--fs-xs);
  font-weight: 650;
  color: var(--muted);
  background: var(--bg);
  transition: all var(--t-fast) var(--ease-out);
}
.kind-btn svg { width: 24px; height: 24px; }
.kind-btn.is-on.favorite { background: var(--gold-tint); border-color: var(--gold-deep); color: var(--gold-deep); }
.kind-btn.is-on.consider { background: var(--river-tint); border-color: var(--river); color: var(--river); }
.kind-btn.is-on.stayed   { background: var(--juniper-tint); border-color: var(--juniper); color: var(--juniper); }

.stars { display: flex; gap: 2px; }
.star-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  color: var(--line);
  transition: color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.star-btn svg { width: 30px; height: 30px; }
.star-btn.on { color: var(--gold); }
.star-btn:active { transform: scale(1.15); }

.photo-row { display: flex; flex-wrap: wrap; gap: 10px; }
.photo-thumb {
  position: relative;
  width: 76px; height: 76px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-2);
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-del {
  position: absolute; top: 4px; right: 4px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: oklch(0.2 0.02 40 / .72);
  color: #fff;
  display: grid; place-items: center;
}
.photo-add {
  width: 76px; height: 76px;
  border-radius: var(--r-sm);
  border: 1.5px dashed var(--line);
  display: grid; place-items: center;
  color: var(--muted);
}
.photo-add:active { background: var(--surface); }

.form-actions { display: flex; gap: 10px; margin-top: 22px; }
.form-foot { text-align: center; margin-top: 6px; }

/* ---------- spot card (view mode) ---------- */
.sc-head { display: flex; align-items: center; gap: 12px; margin: 6px 0 4px; }
.sc-num {
  flex: none;
  min-width: 54px; height: 54px;
  padding: 0 8px;
  border-radius: 16px;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 22px;
}
.sc-num.favorite { background: var(--gold); color: oklch(0.28 0.06 60); }
.sc-num.consider { background: var(--river); color: #fff; }
.sc-num.stayed   { background: var(--juniper); color: #fff; }
.sc-titles { flex: 1; min-width: 0; }
.sc-title { font-family: var(--font-display); font-weight: 650; font-size: var(--fs-h3); line-height: 1.12; }
.sc-park { color: var(--muted); font-size: var(--fs-sm); margin-top: 1px; }
.sc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 2px; }
.kind-tag {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px;
  padding: 0 11px;
  border-radius: 14px;
  font-size: var(--fs-xs);
  font-weight: 700;
}
.kind-tag svg { width: 13px; height: 13px; }
.kind-tag.favorite { background: var(--gold-tint); color: var(--gold-deep); }
.kind-tag.consider { background: var(--river-tint); color: var(--river); }
.kind-tag.stayed   { background: var(--juniper-tint); color: var(--juniper); }
.sc-stars { color: var(--gold-deep); letter-spacing: .14em; font-size: var(--fs-sm); }
.sc-notes { margin: 10px 0 0; white-space: pre-wrap; max-width: 65ch; }
.sc-byline { color: var(--muted); font-size: var(--fs-xs); margin-top: 12px; }
.sc-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 14px; }
.sc-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); }

/* ============================================================
   OUR SPOTS
   ============================================================ */
.view-spots {
  overflow-y: auto;
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.spots-head {
  background: var(--bg);
  padding: max(18px, env(safe-area-inset-top, 0px)) 18px 14px;
  border-bottom: 1px solid var(--surface-2);
  position: sticky; top: 0;
  z-index: 5;
}
.spots-head h2 {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: var(--fs-h1);
  letter-spacing: .002em;
}
.spots-sub { margin: 3px 0 12px; color: var(--muted); font-size: var(--fs-sm); }
.spots-head .chips { margin-top: 0; }
.spots-head .chip { box-shadow: none; background: var(--surface); border-color: transparent; }
.spots-head .chip.is-on { background: var(--canyon); color: #fff; }

.spots-list { padding: 16px 14px calc(24px + var(--safe-b)); max-width: 760px; margin: 0 auto; }
.sl-park {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: var(--fs-lg);
  margin: 18px 4px 10px;
}
.sl-park:first-child { margin-top: 2px; }
.sl-park .n { color: var(--muted); font-family: var(--font-ui); font-weight: 600; font-size: var(--fs-sm); }

.spot-row {
  display: flex; gap: 13px;
  width: 100%;
  text-align: left;
  background: var(--bg);
  border-radius: var(--r-lg);
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-1);
  transition: transform var(--t-fast) var(--ease-out);
}
.spot-row:active { transform: scale(.985); }
.sr-thumb {
  flex: none;
  width: 76px; height: 76px;
  border-radius: var(--r-md);
  overflow: hidden;
  display: grid; place-items: center;
  font-weight: 800; font-size: 22px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.22' stroke-width='1.3'%3E%3Cpath d='M-10 30 Q 30 12 60 32 T 130 26'/%3E%3Cpath d='M-10 58 Q 36 36 66 60 T 130 52'/%3E%3Cpath d='M-10 86 Q 42 62 72 88 T 130 80'/%3E%3Cpath d='M-10 112 Q 46 90 76 114 T 130 106'/%3E%3C/g%3E%3C/svg%3E");
}
.sr-thumb.favorite { background-color: var(--gold); color: oklch(0.28 0.06 60); }
.sr-thumb.consider { background-color: var(--river); color: #fff; }
.sr-thumb.stayed   { background-color: var(--juniper); color: #fff; }
.sr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sr-body { flex: 1; min-width: 0; align-self: center; }
.sr-title { font-weight: 700; line-height: 1.25; }
.sr-sub { color: var(--muted); font-size: var(--fs-sm); margin-top: 1px; }
.sr-tags { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.sr-tags .kind-tag { height: 24px; padding: 0 9px; }
.sr-tags .sc-stars { font-size: var(--fs-xs); }

/* bucket park rows */
.bucket-row {
  display: flex; align-items: center; gap: 13px;
  width: 100%; text-align: left;
  background: var(--bg);
  border-radius: var(--r-lg);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-1);
}
.bucket-flag {
  flex: none;
  width: 46px; height: 46px;
  border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--river-tint);
  color: var(--river);
}
.bucket-flag svg { width: 21px; height: 21px; }

/* empty state */
.empty {
  text-align: center;
  padding: 52px 24px;
  color: var(--muted);
}
.empty svg { width: 64px; height: 64px; color: var(--line); margin-bottom: 10px; }
.empty h3 {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: var(--fs-h3);
  color: var(--ink);
  margin-bottom: 6px;
}
.empty p { margin: 0 auto 18px; max-width: 34ch; }

/* ============================================================
   TAB BAR
   ============================================================ */
.tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: var(--tabbar-h);
  padding-bottom: var(--safe-b);
  display: flex;
  background: var(--bg);
  border-top: 1px solid var(--surface-2);
  z-index: var(--z-chrome);
}
.tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.tab.is-on { color: var(--canyon); }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  left: 50%; bottom: calc(var(--tabbar-h) + 14px);
  transform: translateX(-50%);
  z-index: var(--z-toast);
  background: oklch(0.24 0.02 40);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 22px;
  box-shadow: var(--shadow-2);
  animation: toast-in var(--t-med) var(--ease-out);
  max-width: calc(100vw - 32px);
  text-align: center;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%); }
}

/* ============================================================
   DESKTOP
   ============================================================ */
@media (min-width: 900px) {
  .map-chrome { left: 20px; right: 20px; top: 20px; }
  .park-card {
    left: auto; right: 20px; bottom: 22px;
    width: 400px;
  }
  .sheet {
    left: auto; right: 22px; bottom: 22px;
    width: 420px;
    border-radius: var(--r-lg);
    max-height: calc(100dvh - 44px);
    transform: translateX(115%);
  }
  .sheet-grip { display: none; }
  .sheet-body { padding-top: 20px; }

  /* park hero floats over a full-bleed map */
  .view-park { display: block; }
  .view-park .mapbox { position: absolute; inset: 0; }
  .park-hero {
    position: absolute;
    top: 20px; left: 20px;
    z-index: var(--z-chrome);
    width: 400px;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-2);
    padding: 16px;
    max-height: calc(100dvh - 40px);   /* desktop card can use full height */
  }
  .cheat { margin: 12px -16px 0; padding: 0 16px 2px; }
  .cheat-pill { max-width: 350px; }
  .basemap-park { bottom: 22px; right: 22px; }
  .drop-hint { bottom: 26px; }
  .tabbar { justify-content: center; gap: 40px; }
  .tab { flex: 0 0 120px; flex-direction: row; gap: 8px; font-size: var(--fs-sm); }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .gate.leave { transform: none; }
  .sheet, .sheet.show { transition: none; }
}
