/* ————————————————————————————————————————————————
   my next stop — design system (map-first)
   The map is the UI. Controls float on top; the answer
   lives in a bottom sheet with a category-gradient card.
   ———————————————————————————————————————————————— */

:root {
  --bg: #faf6ef;
  --panel: #ffffff;
  --panel-2: #f3ede2;
  --ink: #201c17;
  --muted: #6f675c;
  --line: #e6ddcf;
  --accent: #0e7a6c;
  --accent-soft: #d8ece8;
  --accent-ink: #ffffff;
  --saffron: #e8890c;
  --chip-bg: #ffffff;
  --shadow: 0 1px 2px rgba(32,28,23,.06), 0 8px 28px rgba(32,28,23,.09);
  --shadow-big: 0 2px 6px rgba(32,28,23,.10), 0 18px 50px rgba(32,28,23,.18);
  --peak: #0f9d6e;
  --shoulder: #e8890c;
  --off: #98928a;
  --avoid: #d4482c;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --top-h: calc(56px + var(--sat));
  /* surfaces */
  --glass: color-mix(in srgb, var(--panel) 72%, transparent);
  --glass-strong: color-mix(in srgb, var(--bg) 86%, transparent);
  --hairline: color-mix(in srgb, var(--line) 72%, transparent);
  --glass-hi: rgba(255, 255, 255, .5);
  --elev-1: 0 1px 2px rgba(24, 20, 15, .07), 0 6px 20px rgba(24, 20, 15, .08);
  --elev-2: 0 2px 6px rgba(24, 20, 15, .1), 0 16px 48px rgba(24, 20, 15, .2);
}

:root[data-theme="dark"] {
  --bg: #14110d;
  --panel: #1e1a15;
  --panel-2: #262119;
  --ink: #f0eae0;
  --muted: #a89e8f;
  --line: #363028;
  --accent: #2fae9c;
  --accent-soft: #143b36;
  --accent-ink: #06231f;
  --chip-bg: #1e1a15;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 28px rgba(0,0,0,.45);
  --shadow-big: 0 2px 6px rgba(0,0,0,.4), 0 18px 50px rgba(0,0,0,.6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14110d;
    --panel: #1e1a15;
    --panel-2: #262119;
    --ink: #f0eae0;
    --muted: #a89e8f;
    --line: #363028;
    --accent: #2fae9c;
    --accent-soft: #143b36;
    --accent-ink: #06231f;
    --chip-bg: #1e1a15;
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 28px rgba(0,0,0,.45);
    --shadow-big: 0 2px 6px rgba(0,0,0,.4), 0 18px 50px rgba(0,0,0,.6);
  }
}

:root[data-theme="dark"] { --glass-hi: rgba(255, 255, 255, .07); --elev-1: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.45); --elev-2: 0 2px 6px rgba(0,0,0,.45), 0 16px 48px rgba(0,0,0,.6); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --glass-hi: rgba(255, 255, 255, .07); --elev-1: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.45); --elev-2: 0 2px 6px rgba(0,0,0,.45), 0 16px 48px rgba(0,0,0,.6); }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* author styles must never resurrect a [hidden] element */
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  min-height: 100dvh;
}
h1, h2, h3 { line-height: 1.15; margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--accent); }
::selection { background: var(--accent); color: var(--accent-ink); }

/* ————— top bar ————— */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1200;
  height: var(--top-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sat) 14px 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}
/* ————— icon system: one line-icon set, sized per slot ————— */
.ic { width: 1em; height: 1em; display: inline-block; vertical-align: -0.14em; flex: 0 0 auto; }
.btn .ic, .icon-btn .ic, .card-act .ic { width: 17px; height: 17px; }
.chip .ic { width: 15px; height: 15px; margin-right: 6px; }
.card-meta .ic, .card-dist .ic { width: 14px; height: 14px; }
.origin-item .ic { width: 16px; height: 16px; color: var(--muted); margin-right: 4px; }
.cat-badge {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; flex: 0 0 auto;
}
.cat-badge .ic { width: 19px; height: 19px; }

.brand { display: flex; align-items: center; gap: 7px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-mark { width: 21px; height: 21px; color: var(--accent); }
.brand-name { font-family: Georgia, serif; font-style: italic; font-size: 17px; letter-spacing: .2px; white-space: nowrap; }
@media (max-width: 379px) { .brand-name { display: none; } }
.top-actions { display: flex; align-items: center; gap: 8px; }
.month-wrap {
  display: flex; align-items: center; gap: 6px;
  background: var(--glass); backdrop-filter: blur(12px);
  border: 1px solid var(--hairline);
  border-radius: 999px; padding: 6px 10px 6px 12px;
  box-shadow: inset 0 1px 0 var(--glass-hi);
}
.month-icon { width: 14px; height: 14px; color: var(--muted); }
#monthSel {
  appearance: none; -webkit-appearance: none;
  border: 0; background: transparent; color: var(--ink);
  font: 600 14px/1 inherit; padding-right: 2px; cursor: pointer; outline-offset: 3px;
}
.icon-btn {
  width: 36px; height: 36px; border-radius: 999px; font-size: 17px;
  background: var(--glass); backdrop-filter: blur(12px);
  border: 1px solid var(--hairline);
  box-shadow: inset 0 1px 0 var(--glass-hi);
  display: grid; place-items: center; flex: 0 0 auto;
  transition: transform .12s ease, background .13s ease;
}
.icon-btn:hover { background: var(--panel); }
.icon-btn:active { transform: scale(.92); }

main { padding-top: var(--top-h); }

/* ————— buttons: layered, tactile ————— */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; padding: 12px 20px; font-weight: 620; letter-spacing: .1px;
  transition: transform .14s cubic-bezier(.2,.9,.3,1.4), box-shadow .18s ease, filter .15s ease;
}
.btn-primary {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--accent) 84%, #fff) 0%,
    var(--accent) 42%,
    color-mix(in srgb, var(--accent) 84%, #000) 100%);
  color: var(--accent-ink);
  border: 1px solid color-mix(in srgb, var(--accent) 62%, #000);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.32),
              0 1px 2px rgba(12,20,17,.2),
              0 8px 22px color-mix(in srgb, var(--accent) 32%, transparent);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.32),
              0 2px 4px rgba(12,20,17,.22),
              0 12px 30px color-mix(in srgb, var(--accent) 42%, transparent);
}
.btn-primary:active {
  transform: translateY(0) scale(.985);
  box-shadow: inset 0 2px 5px rgba(0,0,0,.25), 0 1px 2px rgba(12,20,17,.15);
}
.btn-primary:disabled { opacity: .55; transform: none; cursor: default; }
.btn-ghost { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding: 10px 14px; }
.btn-ghost:hover { color: var(--ink); }
.btn-big { font-size: 17.5px; padding: 16px 30px; border-radius: 15px; }
.btn-wide { width: 100%; }

/* ————— home / hero ————— */
.screen-home { display: flex; flex-direction: column; min-height: calc(100dvh - var(--top-h)); }
.hero {
  max-width: 620px; margin: 0 auto; padding: 8vh 24px 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.hero-compass { animation: bob 5s ease-in-out infinite; filter: drop-shadow(0 12px 22px rgba(14,122,108,.35)); }
.hero-compass svg { width: 72px; height: 72px; color: var(--accent); }
@keyframes bob { 0%,100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-9px) rotate(6deg); } }
.hero h1 { font-family: Georgia, serif; font-style: italic; font-size: clamp(42px, 9vw, 64px); font-weight: 500; }
.hero-sub { font-size: 18px; color: var(--muted); margin: 0; max-width: 46ch; }
.hero-sub em, .hero-note em { color: var(--ink); font-style: italic; }
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 8px; }
.hero-note { font-size: 13.5px; color: var(--muted); max-width: 44ch; margin: 10px 0 0; }
.hero-strip {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  padding: 12px 20px 20px; opacity: .92;
}
.hero-strip span {
  font-size: 13px; background: var(--panel); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px; color: var(--muted); white-space: nowrap;
}
.foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 10px 16px 22px; margin-top: auto; }
.foot a { color: var(--muted); }

/* ————— map screen ————— */
.screen-map {
  position: fixed; top: var(--top-h); left: 0; right: 0; bottom: 0;
  overflow: hidden;
}
.map-el { position: absolute; inset: 0; background: var(--panel-2); }

.map-overlay-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 1050;
  padding: 10px 10px 0;
  pointer-events: none;
}
.overlay-row { display: flex; gap: 8px; align-items: center; pointer-events: none; }
.overlay-row > * { pointer-events: auto; }
/* frosted map controls */
.origin-btn, .filter-btn {
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid var(--hairline); border-radius: 999px;
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--elev-1);
  transition: transform .12s ease, box-shadow .15s ease;
}
.origin-btn:active, .filter-btn:active { transform: scale(.97); }
.origin-btn {
  display: inline-flex; align-items: center; gap: 7px; min-width: 0; flex: 0 1 auto;
  padding: 9px 15px; font-weight: 600; font-size: 14px;
}
#originLabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.origin-edit { color: var(--accent); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }

.filter-btn {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  padding: 9px 15px; font-weight: 650; font-size: 13.5px;
}

/* keep Leaflet's zoom control clear of the overlay pill row */
.screen-map .leaflet-right .leaflet-control-zoom { margin-top: 62px; }
.filter-count {
  background: var(--accent); color: var(--accent-ink);
  border-radius: 99px; min-width: 18px; height: 18px; padding: 0 4px;
  display: grid; place-items: center; font-size: 11px; font-weight: 800;
}
.filter-count[hidden] { display: none; }

/* chips (inside the filters sheet) — soft selected state, not solid fill */
.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  border-radius: 11px; padding: 8px 14px; font-size: 14px; font-weight: 600;
  transition: background .13s ease, border-color .13s ease, color .13s ease, transform .1s ease;
}
.chip:active { transform: scale(.96); }
.chip small { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.chip.is-on {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--accent); font-weight: 700;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}
.chip.is-on small { color: color-mix(in srgb, var(--accent) 70%, transparent); }

.f-label { font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin-top: 4px; }
.legend-inline { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13.5px; font-weight: 600; }
.legend-inline span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 99px; display: inline-block; }
.dot-peak { background: var(--peak); }
.dot-shoulder { background: var(--shoulder); }
.dot-off { background: var(--off); }
.dot-avoid { background: var(--avoid); }

/* Leaflet chrome follows the site theme (extra specificity to beat the
   later-injected leaflet.css) */
.screen-map .map-el .leaflet-bar a {
  background: var(--panel); color: var(--ink); border-bottom-color: var(--line);
}
.screen-map .map-el .leaflet-bar a.leaflet-disabled { color: var(--muted); }
.screen-map .map-el .leaflet-control-attribution {
  background: color-mix(in srgb, var(--panel) 82%, transparent); color: var(--muted);
}
.screen-map .map-el .leaflet-control-attribution a { color: var(--muted); }
.screen-map .map-el .leaflet-tooltip:not(.route-label) {
  background: var(--panel); color: var(--ink); border-color: var(--line);
}
.screen-map .map-el .leaflet-tooltip-top:not(.route-label)::before { border-top-color: var(--line); }

/* the single route label on the map */
.route-label {
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow);
  font: 700 11px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 3px 9px;
}
.route-label::before { display: none; }

/* UI chrome shouldn't be text-selectable (stray tap-selection highlights) */
.top, .map-overlay-top, .sheet, .origin-dlg, button { user-select: none; -webkit-user-select: none; }
body { -webkit-tap-highlight-color: transparent; }

/* ————— bottom sheet ————— */
.sheet {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 0; z-index: 1100;
  width: 100%; max-width: 560px;
  background: var(--glass-strong);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  border-radius: 24px 24px 0 0;
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 -10px 44px rgba(10, 8, 5, .28);
  border: 1px solid var(--hairline); border-bottom: 0;
  display: flex; flex-direction: column;
  max-height: 34dvh;
  transition: max-height .28s cubic-bezier(.3,.9,.3,1);
}
.sheet.is-expanded { max-height: calc(100% - 72px); }

/* collapsed = slim peek strip; expanded = the full card */
.sheet:not(.is-expanded) .sheet-full { display: none; }
.sheet.is-expanded .sheet-peek { display: none; }

.sheet-peek { display: flex; flex-direction: column; gap: 4px; padding: 2px 4px 4px; cursor: pointer; }
.peek-row1 { display: flex; align-items: center; gap: 9px; min-width: 0; }
.peek-next .ic { width: 14px; height: 14px; }
.peek-modes { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; }
.peek-modes .ic { width: 13.5px; height: 13.5px; }
.peek-name {
  font-family: Georgia, serif; font-style: italic; font-size: 21px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.peek-dot { width: 9px; height: 9px; border-radius: 99px; display: inline-block; flex: 0 0 auto; }
.peek-season { font-weight: 700; color: var(--ink); }
.peek-next { margin-left: auto; flex: 0 0 auto; padding: 8px 14px; font-size: 13.5px; border-radius: 11px; }
.peek-row2 { font-size: 13px; color: var(--muted); font-weight: 600; }
.peek-row2 b { color: var(--accent); }
.peek-why {
  font-size: 13.5px; color: var(--ink); font-style: italic;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sheet-handle {
  flex: 0 0 auto; padding: 9px 0 5px; display: grid; place-items: center; width: 100%;
  touch-action: none;
}
.sheet-handle span {
  width: 36px; height: 4px; border-radius: 99px;
  background: color-mix(in srgb, var(--ink) 22%, transparent); display: block;
  transition: width .15s ease;
}
.sheet-handle:hover span { width: 46px; }
.sheet-body {
  overflow-y: auto; overscroll-behavior: contain;
  padding: 0 12px calc(12px + var(--sab));
  display: flex; flex-direction: column; gap: 10px;
}

.sheet-empty {
  padding: 18px 10px 26px; color: var(--muted); font-size: 14.5px; text-align: center;
}
.sheet-empty b { display: block; color: var(--ink); margin-bottom: 6px; font-size: 16px; }

/* the gradient answer card inside the sheet */
.sheet-card {
  border-radius: 18px; color: #fff; padding: 15px 16px;
  display: flex; flex-direction: column; gap: 9px;
  isolation: isolate; overflow: hidden; position: relative;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), inset 0 1px 0 rgba(255,255,255,.2), var(--elev-1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .28);
}
.sheet-card .card-act, .sheet-card .badge { text-shadow: none; }
.sheet-kicker {
  font-size: 10.5px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,.9); display: flex; align-items: center; gap: 7px;
}
.rank-pill {
  background: rgba(255,255,255,.22); border-radius: 999px; padding: 2px 8px; letter-spacing: .5px;
}
.sheet-headline { display: flex; align-items: center; gap: 11px; }
.card-glyph {
  width: 42px; height: 42px; border-radius: 13px; flex: 0 0 auto;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.24);
  display: grid; place-items: center;
}
.card-glyph .ic { width: 23px; height: 23px; }
.card-name { font-family: Georgia, serif; font-style: italic; font-weight: 500; font-size: clamp(26px, 6.4vw, 34px); line-height: 1.02; text-shadow: 0 2px 14px rgba(0,0,0,.3); }
.card-state { font-size: 12.5px; font-weight: 650; opacity: .92; margin-top: 3px; }
.card-dist { font-size: 14px; font-weight: 700; }
.why-now {
  background: rgba(255,255,255,.14); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 12px; padding: 9px 12px; font-size: 14px; line-height: 1.42;
}
.why-now b { font-weight: 800; }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3.5px 10px;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(4px); color: #fff;
}
.badge-season-peak { background: rgba(16,185,129,.4); border-color: rgba(110,231,183,.6); }
.badge-season-shoulder { background: rgba(245,158,11,.36); border-color: rgba(253,230,138,.55); }
.badge-season-off { background: rgba(120,120,120,.42); }
.badge-season-avoid { background: rgba(212,72,44,.5); border-color: rgba(254,178,160,.6); }
.badge-festival { background: rgba(232,137,12,.42); border-color: rgba(253,186,116,.65); }
.badge-lw { background: rgba(99,102,241,.42); border-color: rgba(165,180,252,.6); }

.sheet-full { display: flex; flex-direction: column; gap: 10px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 5px 14px; font-size: 13px; opacity: .94; }
.card-meta b { font-weight: 750; }
.card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.vibe-line { font-style: italic; }
.rupee b { font-weight: 800; letter-spacing: .5px; }
.modes-meta .mode {
  display: inline-flex; align-items: center; gap: 5px; font-weight: 700;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px; padding: 3px 11px; font-size: 12px;
}
.mode .ic { width: 14px; height: 14px; }
.onward-meta { border-top: 1px dashed rgba(255,255,255,.35); padding-top: 8px; margin-top: 3px; }

.sheet-actions { display: flex; flex-direction: column; gap: 8px; }
.sheet-next { width: 100%; }
.sheet-acts { display: flex; gap: 8px; }
.card-act {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  color: var(--ink); padding: 9px 4px; font-size: 11px; font-weight: 700; text-decoration: none;
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 1px 2px rgba(24,20,15,.06);
  transition: background .12s ease, transform .12s ease, box-shadow .15s ease;
}
.card-act:hover { background: var(--panel-2); transform: translateY(-1px); box-shadow: inset 0 1px 0 var(--glass-hi), var(--elev-1); }
.card-act:active { transform: translateY(0) scale(.97); }
.card-act .ico { font-size: 16px; }
.card-act.is-done { background: var(--accent-soft); border-color: var(--accent); }

/* ————— alternates grid ————— */
.sheet-alts { padding-bottom: 6px; }
.alt-head { display: flex; align-items: baseline; justify-content: space-between; padding: 6px 4px 8px; }
.alt-head h3 { font-size: 15.5px; }
.alt-count { color: var(--muted); font-size: 12.5px; }
.alt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; }
.alt-card {
  position: relative; overflow: hidden; border-radius: 15px; color: #fff;
  padding: 13px 11px 11px; min-height: 96px; text-align: left;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 2px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.13), var(--elev-1);
  isolation: isolate;
  text-shadow: 0 1px 2px rgba(0,0,0,.32);
  transition: transform .13s ease, box-shadow .15s ease;
}
.alt-card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), var(--elev-2); }
.alt-card:active { transform: translateY(0) scale(.97); }
.alt-card .card-bg { position: absolute; inset: 0; z-index: -1; }
.alt-card .alt-glyph { position: absolute; top: 9px; right: 10px; opacity: .75; color: #fff; }
.alt-card .alt-glyph .ic { width: 18px; height: 18px; }
.alt-card .alt-status { position: absolute; top: 11px; left: 11px; width: 8px; height: 8px; border-radius: 99px; box-shadow: 0 0 0 3px rgba(255,255,255,.25); }
.alt-name { font-family: Georgia, serif; font-style: italic; font-size: 17px; line-height: 1.1; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.alt-sub { font-size: 11.5px; opacity: .9; font-weight: 600; }

/* ————— dialogs (origin + saved) ————— */
/* fallback for browsers without native <dialog>: they render the element
   as always-visible, so gate visibility on the open attribute ourselves */
dialog:not([open]) { display: none; }
dialog[open] { display: block; }

.origin-dlg {
  border: 1px solid var(--hairline); border-bottom: 0; border-radius: 24px 24px 0 0;
  padding: 0; margin: 0;
  width: 100%; max-width: 640px; max-height: 82dvh;
  background: var(--glass-strong); color: var(--ink);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); top: auto;
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--elev-2);
}
.origin-dlg::backdrop { background: rgba(15,12,8,.45); backdrop-filter: blur(3px); }
.origin-form { display: flex; flex-direction: column; gap: 12px; padding: 20px 18px calc(18px + var(--sab)); }
.origin-dlg-head { display: flex; align-items: center; justify-content: space-between; }
.origin-dlg-head h2 { font-size: 19px; font-family: Georgia, serif; font-style: italic; font-weight: 500; }
.origin-sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.origin-sep::before, .origin-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
#originSearch {
  width: 100%; border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--panel); color: var(--ink);
  padding: 13px 16px; font-size: 16px; outline: none;
}
#originSearch:focus { border-color: var(--accent); }
.origin-results { overflow-y: auto; max-height: 42dvh; display: flex; flex-direction: column; }
.origin-item {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 11px 10px; border-radius: 12px; font-size: 15px;
}
.origin-item:hover, .origin-item:focus { background: var(--panel-2); }
.origin-item .oi-type { margin-left: auto; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 700; }

/* saved lists inside dialog */
.saved-wrap { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: 58dvh; }
.saved-wrap h3 { font-size: 15.5px; padding-top: 6px; }
.saved-hint { color: var(--muted); font-size: 13px; margin: -4px 0 0; }
.saved-list { display: flex; flex-direction: column; gap: 8px; }
.saved-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 11px 13px;
}
.saved-item .s-main { all: unset; cursor: pointer; flex: 1; min-width: 0; }
.saved-item .s-name { font-weight: 700; font-size: 14.5px; }
.saved-item .s-sub { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-item .s-remove { color: var(--muted); font-size: 17px; padding: 6px; }
.saved-empty { color: var(--muted); font-size: 13.5px; padding: 4px 2px; }

/* ————— toast ————— */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(20px);
  top: calc(var(--top-h) + 12px); bottom: auto; z-index: 1300;
  background: var(--ink); color: var(--bg);
  border-radius: 999px; padding: 10px 18px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
  max-width: 88vw; text-align: center;
}
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ————— desktop ————— */
@media (min-width: 900px) {
  .sheet {
    left: auto; right: 18px; transform: none;
    width: 400px; border-radius: 20px;
    bottom: 18px; max-height: 52dvh;
    border-bottom: 1px solid var(--line);
  }
  .sheet.is-expanded { max-height: calc(100% - 36px); }
  .map-overlay-top { padding: 12px 14px 0; max-width: calc(100% - 450px); }
  .hero { padding-top: 12vh; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-compass { animation: none; }
  * { transition: none !important; }
}
