/* QuakeWave. App-shell patterns follow the Savannah Tour App (app/globals.css: --safe-*, --nav-h, --nav-bottom, --nav-clear, floating
   glass .lg-nav pill with icon + label items) and Chef Lynn Recipes (viewport-fit=cover, status strip, standalone meta, manifest). */
:root {
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --sl: env(safe-area-inset-left, 0px); --sr: env(safe-area-inset-right, 0px);
  --chrome: #070d1a; /* status strip + html/body: iOS samples these for the status bar (Savannah Tour App fix) */
  --top-push: 0px;  /* extra gap under the status bar in Home Screen mode (iOS 26 top-edge blur zone) */
  --nav-h: 66px; --nav-gap: 14px;
  --nav-bottom: calc(var(--safe-b) + 6px);
  --nav-clear: calc(var(--nav-h) + var(--nav-bottom) + var(--nav-gap));
  --page-end: calc(var(--nav-clear) + 32px);
  --bg: #070d1a; --bg2: #0d1628; --card: rgba(22, 34, 58, .72); --hair: rgba(160, 190, 230, .14);
  --text: #e8eef7; --text2: #9fb0c8; --accent: #38bdf8;
  /* disc palette, read by the painter */
  --disc: #0e2442; --land: #34566b; --edge: #86a9bf; --grid: rgba(140, 180, 225, .16);
  --s1: #fde68a; --s2: #fbbf24; --s3: #fb923c; --s4: #f43f5e; --s5: #e11d48;
  --c0: #38bdf8; --c1: #f472b6; --other: #6b7a90;
  --font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Plus Jakarta Sans", var(--font-sans);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { font-size: 106.25%; background-color: var(--chrome); }
/* solid chrome colour on html/body (iOS samples them for the status bar); the soft gradient lives on .app, below the strip */
body { color: var(--text); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  background-color: var(--chrome); }
.app { background: radial-gradient(120% 70% at 50% 18%, #132748 0%, var(--chrome) 62%); }
@media (display-mode: standalone) { html { min-height: calc(100% + env(safe-area-inset-top, 0px)); overscroll-behavior-y: none; } body { min-height: 100%; } :root { --top-push: 22px; } }
html.standalone { min-height: calc(100% + env(safe-area-inset-top, 0px)); overscroll-behavior-y: none; --top-push: 22px; }
html.standalone body { min-height: 100%; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.01em; margin: 0; }
h1 { font-size: 1.45rem; font-weight: 800; } h2 { font-size: 1.05rem; font-weight: 700; margin: 26px 0 8px; }
a { color: var(--accent); }
:focus-visible { outline: 2.5px solid #7cc7ff; outline-offset: 2px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: calc(var(--safe-t) + var(--top-push) + 8px); z-index: 99; background: #fff; color: #000; padding: 8px 12px; border-radius: 8px; }
/* solid, never blurred, above everything: nothing glass or animated shows through under the iOS status bar */
.status-strip { position: fixed; top: 0; left: 0; right: 0; height: calc(var(--safe-t) + var(--top-push)); background-color: var(--chrome); z-index: 70; pointer-events: none; }
[hidden] { display: none !important; }

/* app shell: full-height pages, one visible at a time */
.app { position: fixed; inset: 0; }
.page { position: absolute; inset: 0; }
.scroll { height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: calc(var(--safe-t) + var(--top-push) + 18px) max(16px, var(--sr)) var(--page-end) max(16px, var(--sl)); }
.scroll > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }

/* stage */
.stage { position: absolute; inset: 0; touch-action: none; }
.stage-gl { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.stage-gl:active { cursor: grabbing; }
.stage-slot { position: relative; }
.stage-slot.full { position: absolute; inset: 0; }
.page-split .stage-slot { height: min(52vh, 460px); margin-top: calc(var(--safe-t) + var(--top-push)); }
.page-split .panel { height: auto; position: absolute; top: calc(var(--safe-t) + var(--top-push) + min(52vh, 460px)); bottom: 0; left: 0; right: 0; padding-top: 14px;
  background: linear-gradient(180deg, rgba(7, 13, 26, 0), rgba(7, 13, 26, .92) 26px); }
@media (min-width: 900px) {
  .page-split .stage-slot { position: absolute; left: 0; top: 0; bottom: 0; width: 58%; height: auto; margin: 0; }
  .page-split .panel { top: 0; left: 58%; background: rgba(7, 13, 26, .6); border-left: 1px solid var(--hair); }
}
.nogl { padding: 40px 20px; color: var(--text2); text-align: center; }

/* glass, after the Savannah .lg-shell layers, flattened to one element for a dark UI */
.glass { background: linear-gradient(180deg, rgba(36, 52, 84, .72), rgba(18, 28, 48, .78)); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  border: .5px solid rgba(190, 215, 255, .18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 22px 48px -18px rgba(0, 0, 0, .6), 0 3px 10px -2px rgba(0, 0, 0, .3); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass { background: rgba(18, 28, 48, .96); } }

/* disc HUD */
.hud-top { position: absolute; z-index: 5; top: calc(var(--safe-t) + var(--top-push) + 12px); left: max(14px, var(--sl)); right: max(14px, var(--sr)); display: flex; align-items: center; justify-content: space-between; gap: 10px; pointer-events: none; }
.hud-top > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 9px; } .brand h1 { font-size: 1.2rem; white-space: nowrap; }
.logo { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, #f43f5e 0 14%, transparent 15%), radial-gradient(circle, transparent 0 34%, rgba(56, 189, 248, .9) 35% 41%, transparent 42% 60%, rgba(56, 189, 248, .5) 61% 66%, transparent 67%), #0e2442; box-shadow: 0 0 0 1px rgba(134, 169, 191, .6); }
.status-chip { font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 999px; background: rgba(18, 28, 48, .8); border: .5px solid var(--hair); white-space: nowrap; }
.status-chip::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: #94a3b8; vertical-align: 1px; }
.status-chip[data-kind="live"]::before { background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: ping 2s infinite; }
.status-chip[data-kind="warn"]::before { background: #fbbf24; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.hud-big { position: absolute; z-index: 5; top: calc(var(--safe-t) + var(--top-push) + 54px); left: max(14px, var(--sl)); max-width: min(78%, 420px); font-size: 13px; line-height: 1.35; pointer-events: none; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
.hud-big b { font-family: var(--font-display); font-size: 1.15rem; color: var(--s4); margin-right: 4px; } .hud-big span { display: block; color: var(--text2); font-size: 12px; }
.hud-bottom { position: absolute; z-index: 6; left: max(12px, var(--sl)); right: max(12px, var(--sr)); bottom: calc(var(--nav-clear) - 4px); display: flex; justify-content: center; align-items: flex-end; gap: 8px; pointer-events: none; }
.hud-bottom > * { pointer-events: auto; }

/* controls */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: rgba(18, 28, 48, .82); border: .5px solid var(--hair); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.seg.wrap { flex-wrap: wrap; border-radius: 18px; }
.seg button { font: inherit; font-size: 13px; font-weight: 600; color: var(--text2); background: none; border: 0; padding: 8px 12px; min-height: 36px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: rgba(56, 189, 248, .2); color: #fff; box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .35); }
.seg .n { font-size: 11px; opacity: .7; margin-left: 2px; font-variant-numeric: tabular-nums; }
.layers { position: relative; }
.layers summary { list-style: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: rgba(18, 28, 48, .82); border: .5px solid var(--hair); }
.layers summary::-webkit-details-marker { display: none; }
.layers summary svg { width: 22px; height: 22px; fill: none; stroke: var(--text); stroke-width: 1.7; stroke-linejoin: round; }
.layers[open] summary { background: rgba(56, 189, 248, .25); }
.layers-pop { position: absolute; right: 0; bottom: 54px; width: min(300px, calc(100vw - 28px)); border-radius: 20px; padding: 14px; display: grid; gap: 10px; font-size: 14px; }
.sw { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.sw input { width: 20px; height: 20px; accent-color: var(--accent); }
label.inline, .layers-pop > label:first-child { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--text2); margin: 10px 0; }
select, input[type="search"], input[type="number"] { font: inherit; font-size: 15px; color: var(--text); background: rgba(18, 28, 48, .9); border: 1px solid var(--hair); border-radius: 12px; padding: 8px 10px; min-height: 40px; }
input[type="search"] { flex: 1 1 180px; min-width: 0; }
input[type="number"] { width: 100px; }
.btn { font: inherit; font-weight: 700; font-size: 14px; color: #04121f; background: var(--accent); border: 0; border-radius: 999px; padding: 10px 18px; min-height: 42px; cursor: pointer; }
.btn.ghost { background: rgba(255, 255, 255, .08); color: var(--text); } .btn.small { min-height: 36px; padding: 7px 14px; font-size: 13px; }
.hint { margin: 0; font-size: 12px; line-height: 1.45; color: var(--text2); }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 4px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }

/* live */
.status-long { color: var(--text2); font-size: 13px; margin: 0 0 14px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.card { background: var(--card); border: .5px solid var(--hair); border-radius: 18px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card span { font-size: 12px; color: var(--text2); } .card b { font-family: var(--font-display); font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.card.wide { grid-column: 1 / -1; } .card small { color: var(--text2); font-size: 13px; }
.callout { background: rgba(251, 191, 36, .12); border: 1px solid rgba(251, 191, 36, .35); border-radius: 14px; padding: 10px 12px; font-size: 13px; line-height: 1.45; margin: 12px 0; }
.callout.soft { background: rgba(56, 189, 248, .08); border-color: rgba(56, 189, 248, .25); }
.muted { color: var(--text2); font-size: 13px; line-height: 1.45; }
.top { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.top button { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; font: inherit; color: var(--text); background: var(--card); border: .5px solid var(--hair); border-radius: 14px; padding: 10px 12px; cursor: pointer; }
.top b { font-family: var(--font-display); color: var(--s4); min-width: 48px; } .top .t { display: flex; flex-direction: column; font-size: 14px; } .top small { color: var(--text2); font-size: 12px; }
.chart-wrap { background: var(--card); border: .5px solid var(--hair); border-radius: 16px; padding: 10px 8px; }
.k { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 4px 0 8px; vertical-align: 0; }
.k0 { background: var(--c0); } .k1 { background: var(--c1); } .k2 { background: var(--other); } .ks { background: var(--text); }
.table-wrap { overflow-x: auto; border-radius: 14px; border: .5px solid var(--hair); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--hair); text-align: left; vertical-align: top; }
th { color: var(--text2); font-weight: 600; font-size: 12px; position: sticky; top: 0; background: #121d33; }
td a { color: var(--text); text-decoration: none; } td a:hover { color: var(--accent); }
.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.flag { color: var(--s2); font-weight: 600; white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12px; color: var(--text2); margin: 10px 0; }
.ramp { display: inline-block; width: 120px; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--s1), var(--s2), var(--s3), var(--s4), var(--s5)); }

/* replay player */
.player { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 8px; border-radius: 18px; padding: 10px; margin: 12px 0; }
.player input[type="range"] { width: 100%; accent-color: var(--accent); }
.clock { grid-column: 1 / -1; margin: 0; font-size: 12.5px; color: var(--text2); font-variant-numeric: tabular-nums; }

/* bottom sheet for a tapped quake */
.sheet { position: absolute; z-index: 8; left: max(12px, var(--sl)); right: max(12px, var(--sr)); bottom: calc(var(--nav-clear) + 52px); margin: 0 auto; max-width: 460px; border-radius: 20px; padding: 14px 44px 14px 14px; }
#sheet-body { display: flex; gap: 12px; align-items: flex-start; }
.sheet-mag { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: #0b1220; background: var(--mc); border-radius: 14px; padding: 8px 10px; }
.sheet-txt h3 { font-size: 1rem; margin-bottom: 2px; } .sheet-txt p { margin: 2px 0; font-size: 13px; color: var(--text2); } .sheet-txt a { font-size: 13px; font-weight: 600; }
.sheet-close { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); color: var(--text); font-size: 20px; cursor: pointer; }
.page-split .sheet { display: none; }

/* learn */
.prose { font-size: 15px; line-height: 1.6; } .prose .lead { font-size: 16px; color: #cdd8e8; } .prose ul { padding-left: 20px; } .prose li { margin: 6px 0; }
.prose h1 { font-size: 1.35rem; line-height: 1.25; }
.sources { list-style: none; padding: 0 !important; } .sources li { padding: 8px 0; border-bottom: 1px solid var(--hair); } .sources span { display: block; font-size: 12px; color: var(--text2); }

@media (min-width: 700px) { .cards { grid-template-columns: repeat(4, 1fr); } .card.wide { grid-column: auto; } }
@media (max-width: 380px) { .seg button { padding: 8px 9px; } .lg-item { font-size: 10px; } }
@media (prefers-reduced-motion: reduce) { *, *::before { transition: none !important; animation: none !important; } }

/* depth palette, matches depthRGB() in stage3d.ts */
.kd0 { background: #ff5c40; } .kd1 { background: #ffb847; } .kd2 { background: #db6bf2; } .kd3 { background: #73c7ff; }
.depth-key { margin: 0; font-size: 12px; color: var(--text2); display: grid; gap: 4px; }
.dramp { display: block; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #ff5c40 0%, #ffb847 40%, #db6bf2 72%, #73c7ff 100%); }
.dk { display: flex; justify-content: space-between; } .dk b { font-weight: 500; }

/* ---- Patterns ---- */
.pat-hud { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 3; pointer-events: none; padding: 8px 12px 10px; border-radius: 16px;
  background: rgba(8, 14, 28, .72); border: .5px solid var(--hair); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.pat-row { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.pat-row b { font-family: var(--font-display); font-size: 1.25rem; font-variant-numeric: tabular-nums; color: #fff; flex: none; min-width: 4.6em; }
.pat-row span { font-size: 12px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pat-track { position: relative; height: 4px; margin-top: 8px; border-radius: 2px; background: rgba(255, 255, 255, .12); }
.pat-track i { position: absolute; top: -3px; width: 2px; height: 10px; margin-left: -1px; border-radius: 1px; background: #fbbf24; }
.pat-track i.t0 { background: #ff5c7a; }
.pat-head { position: absolute; top: -4px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px rgba(56, 189, 248, .9); left: 0; }
.player .seg.mini { grid-column: 1 / -1; justify-self: start; }
.seg.mini button { min-height: 30px; padding: 5px 10px; font-size: 12px; }
.notpred { position: relative; padding-right: 40px; }
.info { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(251, 191, 36, .6); background: none;
  color: #fbbf24; font: italic 700 14px/1 Georgia, serif; cursor: pointer; }
.tip { background: var(--card); border: .5px solid var(--hair); border-radius: 14px; padding: 4px 12px; font-size: 13px; line-height: 1.5; color: var(--text2); margin: -4px 0 12px; }
.tip b { color: var(--text); }
.row.ctl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
#lb-custom { width: 90px; }
#spans { margin: 6px 0 2px; }
.pcards { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 10px; }
.pcard { background: var(--card); border: .5px solid var(--hair); border-radius: 18px; padding: 12px 14px; display: grid; gap: 6px; cursor: pointer;
  transition: border-color .2s, box-shadow .2s; }
.pcard.is-on { border-color: rgba(56, 189, 248, .55); box-shadow: 0 0 0 1px rgba(56, 189, 248, .25), 0 8px 30px rgba(56, 189, 248, .1); }
.pcard h3 { margin: 0; font-family: var(--font-display); font-size: 1.05rem; line-height: 1.3; }
.pcard .arr { color: var(--accent); }
.pc-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pc-span { font-size: 12px; color: var(--text2); margin-left: auto; }
.chip { font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 3px 8px; border-radius: 999px; border: 1px solid transparent; }
.chip.sig.significant { color: #86efac; background: rgba(34, 197, 94, .14); border-color: rgba(34, 197, 94, .4); }
.chip.sig.suggestive { color: #fcd34d; background: rgba(251, 191, 36, .12); border-color: rgba(251, 191, 36, .4); }
.chip.sig.chance { color: var(--text2); background: rgba(148, 163, 184, .1); border-color: rgba(148, 163, 184, .3); }
.chip.rec { color: #c4b5fd; background: rgba(167, 139, 250, .12); border-color: rgba(167, 139, 250, .4); }
.pc-stat, .pc-eg { margin: 0; font-size: 13px; color: var(--text2); line-height: 1.45; }
.pc-stat b, .pc-links b { color: var(--text); font-variant-numeric: tabular-nums; }
.pc-eg { font-size: 12px; } .pc-eg b { color: #fbbf24; font-weight: 600; }
.pc-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 13px; color: var(--text2); }
.pc-links li { display: flex; align-items: center; gap: 6px; } .pc-links li span { flex: 1; min-width: 0; }
.sig-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #64748b; }
.sig-dot.significant { background: #22c55e; } .sig-dot.suggestive { background: #fbbf24; }
.pc-act { display: flex; gap: 6px; align-items: center; }
.pc-act .btn.small { min-height: 34px; padding: 6px 14px; }
.pc-n { font-size: 12px; color: var(--text2); font-variant-numeric: tabular-nums; min-width: 3.5em; text-align: center; }
@media (prefers-reduced-motion: reduce) { .pcard { transition: none; } }
@media (min-width: 900px) { .pat-hud { top: calc(var(--safe-t) + var(--top-push) + 14px); bottom: auto; left: 16px; right: 16px; max-width: 560px; } }

/* ---- live arrivals: tab badge + toast ---- */
.tab-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #ff5c7a; color: #fff;
  font: 700 10px/16px var(--font-sans); text-align: center; box-shadow: 0 0 0 2px rgba(7, 13, 26, .9); }
.tab-badge[hidden] { display: none; }
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-bottom) + var(--nav-h) + 72px); z-index: 60; max-width: min(92vw, 440px); transform: translate(-50%, 8px); opacity: 0;
  font: 600 13px/1.3 var(--font-sans); color: #fff; text-align: left; padding: 10px 14px 10px 30px; border-radius: 999px; cursor: pointer;
  background: rgba(16, 24, 42, .94); border: .5px solid rgba(255, 92, 122, .45); box-shadow: 0 8px 28px rgba(0, 0, 0, .45);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .3s, transform .3s cubic-bezier(.32, .72, 0, 1); }
.toast::before { content: ""; position: absolute; left: 13px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #ff5c7a; box-shadow: 0 0 0 0 rgba(255, 92, 122, .7); animation: tping 1.6s infinite; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
@keyframes tping { 70% { box-shadow: 0 0 0 8px rgba(255, 92, 122, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 92, 122, 0); } }
@media (prefers-reduced-motion: reduce) { .toast { transition: opacity .2s; } .toast::before { animation: none; } }

/* ---- phone alerts ---- */
.hud-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: .5px solid var(--hair); background: rgba(18, 28, 48, .8); color: var(--text); display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.is-on { color: #fbbf24; border-color: rgba(251, 191, 36, .5); }
.alerts-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(3, 6, 14, .55); opacity: 0; transition: opacity .26s; }
.alerts { position: fixed; z-index: 71; left: 0; right: 0; bottom: 0; max-height: calc(100% - var(--safe-t) - var(--top-push) - 24px); overflow: auto; overscroll-behavior: contain;
  margin: 0 auto; max-width: 520px; padding: 16px 18px calc(18px + var(--safe-b)); border-radius: 24px 24px 0 0; background: #0d1628; border: .5px solid var(--hair);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .5); transform: translateY(102%); transition: transform .3s cubic-bezier(.32, .72, 0, 1); }
body.alerts-on .alerts { transform: none; } body.alerts-on .alerts-scrim { opacity: 1; }
.al-head { display: flex; align-items: center; justify-content: space-between; } .al-head .sheet-close { position: static; }
.al-head h2 { font-size: 1.3rem; }
.alerts .muted.small, .alerts .small { font-size: 12px; }
.al-mag { display: grid; gap: 8px; margin-top: 10px; font-weight: 600; } .al-mag b { color: #fbbf24; font-family: var(--font-display); font-size: 1.15rem; }
.al-mag input { width: 100%; accent-color: #fbbf24; }
.al-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--text2); margin-top: -2px; }
.al-region { border: 0; padding: 0; margin: 12px 0 6px; display: flex; gap: 6px; flex-wrap: wrap; } .al-region legend { font-weight: 600; margin-bottom: 6px; }
.rad { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .06); font-size: 13px; cursor: pointer; }
.rad input { accent-color: var(--accent); }
.al-regions { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin: 6px 0; }
.chk { display: flex; gap: 6px; align-items: center; font-size: 13px; } .chk input { accent-color: var(--accent); width: 17px; height: 17px; }
.al-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 14px 0 6px; }
.al-status { font-size: 13px; margin: 6px 0; padding: 8px 10px; border-radius: 12px; background: rgba(56, 189, 248, .08); }
.al-status[data-kind="ok"] { background: rgba(34, 197, 94, .1); color: #bbf7d0; } .al-status[data-kind="warn"] { background: rgba(251, 191, 36, .12); color: #fde68a; }
.share-ico { display: inline-block; padding: 0 4px; border-radius: 5px; background: rgba(255, 255, 255, .12); }
@media (prefers-reduced-motion: reduce) { .alerts, .alerts-scrim { transition: none; } }

/* =====================================================================
   Liquid-glass nav: port of the Savannah Tour App GlassNav (app/globals.css .lg-*), dark palette.
   Layers are siblings so each backdrop-filter sees the real disc; the shadow sits on the shell; NO filter on the shell.
   ===================================================================== */
.lg-nav { position: fixed; z-index: 50; left: 0; right: 0; bottom: var(--nav-bottom); padding: 0 max(14px, var(--sr)) 0 max(14px, var(--sl));
  display: flex; justify-content: center; pointer-events: none; }
.lg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.lg-shell { --lgx: .35; --lgy: .2; position: relative; pointer-events: auto; width: min(480px, 100%); height: var(--nav-h); border-radius: 999px;
  box-shadow: 0 22px 48px -18px rgba(0, 0, 0, .65), 0 3px 10px -2px rgba(0, 0, 0, .35); transition: transform .5s cubic-bezier(.2, 1.4, .4, 1), box-shadow .3s; }
.lg-shell.is-lifted { transform: scale(1.015); box-shadow: 0 28px 60px -18px rgba(0, 0, 0, .7), 0 4px 14px -2px rgba(0, 0, 0, .4); }
.lg-layer { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.lg-refract { -webkit-backdrop-filter: blur(20px) saturate(1.6) brightness(1.05); backdrop-filter: blur(16px) saturate(1.6) brightness(1.05) var(--lg-shell-filter, ); overflow: hidden; }
.lg-shell[data-refract="off"] .lg-refract { backdrop-filter: blur(22px) saturate(1.6) brightness(1.05); }
.lg-tint { background: linear-gradient(180deg, rgba(40, 58, 92, .58) 0%, rgba(20, 30, 52, .62) 45%, rgba(12, 20, 38, .72) 100%); }
.lg-spec { overflow: hidden; background:
  radial-gradient(120px 70px at calc(var(--lgx) * 100%) calc(var(--lgy) * 100%), rgba(170, 215, 255, .16), rgba(170, 215, 255, 0) 70%),
  linear-gradient(180deg, rgba(255, 255, 255, .12) 0, rgba(255, 255, 255, 0) 38%); }
.lg-rim { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(255, 255, 255, .06), inset 0 0 0 .75px rgba(190, 215, 255, .16),
  inset 0 -10px 18px -12px rgba(0, 0, 0, .5), inset 0 10px 16px -12px rgba(150, 200, 255, .22); border: .5px solid rgba(190, 215, 255, .14); }
.lg-track { position: relative; z-index: 1; height: 100%; display: flex; align-items: stretch; gap: 2px; padding: 6px; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; overscroll-behavior-x: contain; border-radius: inherit; touch-action: none; user-select: none; -webkit-user-select: none; }
.lg-track::-webkit-scrollbar { display: none; }
.lg-track.is-overflow { touch-action: pan-x; mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); }
.lg-item { position: relative; z-index: 2; flex: 1 0 auto; min-width: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 0 4px; border-radius: 999px; text-decoration: none; color: #a8b6cc; font-size: 10.5px; font-weight: 600; letter-spacing: .01em;
  -webkit-touch-callout: none; -webkit-user-drag: none; touch-action: inherit; transition: color .25s; }
.lg-item:focus-visible { outline-offset: -3px; }
.lg-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; display: block; }
.lg-icon, .lg-label { transition: transform .32s cubic-bezier(.2, 1.6, .4, 1); }
.lg-item.is-current { color: #fff; }
.lg-item.is-lensed .lg-icon { transform: scale(1.22) translateY(-1px); } .lg-item.is-lensed .lg-label { transform: scale(1.1); }
@media (hover: hover) and (pointer: fine) { .lg-item:hover { color: #fff; } }
.lg-drop { position: absolute; z-index: 1; left: 0; top: 6px; bottom: 6px; width: 64px; border-radius: 999px; pointer-events: none; opacity: 0;
  transform-origin: 50% 50%; will-change: transform, width; --drop-tint: rgba(56, 189, 248, .16); --drop-glow: rgba(56, 189, 248, .45); }
.lg-drop > span { position: absolute; inset: 0; border-radius: inherit; }
.lg-drop-refract { -webkit-backdrop-filter: blur(2px) saturate(1.6) brightness(1.15); backdrop-filter: blur(2px) saturate(1.6) brightness(1.15) var(--lg-drop-filter, ); }
.lg-drop-body { background: linear-gradient(180deg, rgba(150, 210, 255, .22), var(--drop-tint) 60%, rgba(120, 190, 255, .14));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 1px rgba(255, 255, 255, .12), inset 0 0 0 .75px rgba(170, 215, 255, .3),
    inset 0 -6px 12px -8px var(--drop-glow), 0 6px 16px -8px var(--drop-glow), 0 1px 2px rgba(0, 0, 0, .3);
  transition: background .35s, box-shadow .35s, opacity .25s; }
.lg-drop-spec { background: radial-gradient(60% 50% at 30% 18%, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 70%),
  radial-gradient(40% 30% at 72% 88%, rgba(255, 255, 255, .1), rgba(255, 255, 255, 0) 70%); }
.lg-drop.is-lifted .lg-drop-body { background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03) 60%, rgba(255, 255, 255, .08));
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .55), inset 0 -1px 1px rgba(255, 255, 255, .25), inset 0 0 0 1px rgba(190, 225, 255, .4),
    inset 0 0 14px rgba(150, 210, 255, .2), 0 12px 26px -10px rgba(0, 0, 0, .55), 0 2px 5px rgba(0, 0, 0, .3); }
.lg-drop.is-lifted .lg-drop-refract { backdrop-filter: blur(.5px) saturate(1.7) brightness(1.2) var(--lg-drop-filter, ); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .lg-tint { background: rgba(14, 22, 40, .96); } .lg-drop { --drop-tint: rgba(56, 189, 248, .3); } }
.lg-shell[data-backdrop="off"] .lg-tint { background: rgba(14, 22, 40, .96); }
@media (prefers-reduced-transparency: reduce) { .lg-tint { background: rgba(14, 22, 40, .97); } }
.tab-badge { position: absolute; top: 4px; left: calc(50% + 6px); z-index: 3; }

/* ---- More drawer (Savannah/Donnelly technique): no backdrop blur on the scrim, no overflow lock, transform/opacity only ---- */
:root { --more-ease: cubic-bezier(.32, .72, 0, 1); --more-dur: .3s; }
.more-drawer { position: fixed; inset: 0; z-index: 84; visibility: hidden; pointer-events: none; color: var(--text); }
.more-drawer.is-active { visibility: visible; pointer-events: auto; }
.more-scrim { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(2, 6, 14, .55); opacity: 0; transition: opacity var(--more-dur) ease; cursor: default; touch-action: none; will-change: opacity; }
.more-drawer.is-open .more-scrim { opacity: 1; }
.more-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(85vw, 380px); display: flex; flex-direction: column;
  padding: calc(10px + var(--safe-t) + var(--top-push)) 16px calc(18px + var(--safe-b)); overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y;
  background: rgba(13, 22, 40, .97); border-left: 1px solid var(--hair); border-radius: 24px 0 0 24px; box-shadow: -24px 0 60px -30px rgba(0, 0, 0, .8);
  transform: translate3d(100%, 0, 0); transition: transform var(--more-dur) var(--more-ease); will-change: transform; outline: none; backface-visibility: hidden; -webkit-overflow-scrolling: touch; }
.more-drawer.is-open .more-panel { transform: translate3d(0, 0, 0); }
.more-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 12px 8px; border-bottom: 1px solid var(--hair); }
.more-title { margin: 0; font-family: var(--font-display); font-size: 1.375rem; font-weight: 800; }
.more-close { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--text); background: rgba(255, 255, 255, .07); border: 1px solid var(--hair); cursor: pointer; }
.more-close svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.more-list { list-style: none; margin: 6px 0 0; padding: 0; }
.more-list li { border-bottom: 1px solid var(--hair); } .more-list li:last-child { border-bottom: 0; }
.more-link { position: relative; width: 100%; display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 10px 30px 10px 12px; border: 0; border-radius: 14px; background: none;
  text-align: left; color: var(--text); font: inherit; font-size: 1.0625rem; font-weight: 600; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.more-link::after { content: ""; position: absolute; right: 12px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-top: 1.8px solid currentColor; border-right: 1.8px solid currentColor; transform: rotate(45deg); opacity: .35; }
.more-link::before { content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 20px; margin-top: -10px; border-radius: 3px; background: var(--accent); opacity: 0; }
@media (hover: hover) and (pointer: fine) { .more-link:hover { background: rgba(56, 189, 248, .07); } }
.more-link[aria-current="page"] { color: #7dd3fc; font-weight: 750; background: rgba(56, 189, 248, .09); } .more-link[aria-current="page"]::before { opacity: 1; }
.more-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #7dd3fc; background: rgba(56, 189, 248, .1); }
.more-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.more-txt { min-width: 0; display: flex; flex-direction: column; } .more-label { line-height: 1.25; }
.more-sub { font-size: .875rem; font-weight: 500; color: var(--text2); line-height: 1.3; }
.more-foot { margin-top: auto; padding: 18px 8px 0; }
.more-stag { transform: translate3d(18px, 0, 0); transition: transform .36s var(--more-ease); transition-delay: calc(40ms + var(--i, 0) * 18ms); }
.more-drawer.is-open .more-stag { transform: none; }
/* right-edge strip: touch only, between the header and the nav, under the drawer */
.more-edge { position: fixed; right: 0; width: 22px; top: calc(var(--safe-t) + var(--top-push) + 64px); bottom: var(--nav-clear); z-index: 83; touch-action: none; -webkit-tap-highlight-color: transparent; }
html.more-lock .more-edge { display: none; }
@media (pointer: fine) { .more-edge { display: none; } }
@media (prefers-reduced-motion: reduce) { .more-scrim, .more-panel { transition-duration: .01s !important; } .more-stag { transition: none !important; transform: none; } }

/* ---- Low Power Mode (Chris's rule: simplify animations, never remove them) ---- */
html[data-lowpower] .lg-shell .lg-refract, html[data-lowpower] .lg-shell .lg-drop-refract, html[data-lowpower] .lg-shell[data-refract] .lg-refract { -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-lowpower] .lg-tint { background: rgba(14, 22, 40, .95); }
html[data-lowpower] .lg-shell { transition: transform .42s cubic-bezier(.2, 1.4, .4, 1); }
html[data-lowpower] .lg-drop-body { transition: opacity .2s; }
html[data-lowpower] { --more-dur: .26s; }
html[data-lowpower] .more-stag { transform: none; transition: none; }
html[data-lowpower] .more-list, html[data-lowpower] .more-foot { transform: translate3d(16px, 0, 0); transition: transform .3s var(--more-ease) 40ms; }
html[data-lowpower] .more-drawer.is-open .more-list, html[data-lowpower] .more-drawer.is-open .more-foot { transform: none; }
html[data-lowpower] .more-panel { box-shadow: -10px 0 24px -16px rgba(0, 0, 0, .7); }
html[data-lowpower] .toast::before { animation-duration: 2.4s; }
/* Patterns: 50-year source */
#chsrc { margin: 4px 0 2px; }
.y50-sum { margin: 10px 0 2px; font-size: 13px; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: .005em; }
#y50kind { margin: 2px 0 10px; display: flex; width: max-content; }
.pc-stat .muted, .pc-n .muted { color: var(--text2); font-weight: 500; }
.chip.sig.chance { opacity: .85; }
/* gesture isolation: while a finger is orbiting/pinching the disc, the nav and edge strip are click-through, so a second finger
   that lands on them still reaches the canvas */
html.qw-orbit .lg-shell, html.qw-orbit .more-edge { pointer-events: none; }
.hud-actions { display: flex; align-items: center; gap: 8px; }
.status-chip .sc-short { display: none; }
@media (max-width: 430px) { .status-chip .sc-full { display: none; } .status-chip .sc-short { display: inline; } }
.icon-btn.sm { width: 34px; height: 34px; } .icon-btn.sm svg { width: 18px; height: 18px; }
.hud-top .brand { min-width: 0; }
