/* 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: auto; cursor: pointer; border: 0; background: transparent; color: inherit; padding: 0; margin: 0; text-align: left; font: inherit; text-shadow: 0 1px 6px rgba(0, 0, 0, .8); -webkit-tap-highlight-color: transparent; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-big:active { opacity: .72; transform: scale(.98); }
.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; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-bottom { position: absolute; z-index: 6; left: max(10px, var(--sl)); right: max(10px, var(--sr)); bottom: calc(var(--nav-clear) - 4px); display: flex; justify-content: flex-start; align-items: flex-end; gap: 6px; pointer-events: none; }
.hud-bottom > * { pointer-events: auto; }
/* Time window shares the row with mag-chip + Layers; scroll so Hour stays visible at 390 px */
.hud-bottom .seg.win { flex: 1 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; overscroll-behavior-x: contain; }
.hud-bottom .seg.win::-webkit-scrollbar { display: none; }
.hud-bottom .seg.win button { flex: 0 0 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: 55; left: max(12px, var(--sl)); right: max(12px, var(--sr)); bottom: calc(var(--nav-clear) + 10px); margin: 0 auto; max-width: 460px; border-radius: 20px; padding: 14px 44px 14px 14px; transform: translateZ(0); } /* z above .lg-nav (50); bottom clears the tab bar */
#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; }
#spans { margin: 6px 0 2px; }
/* horizontal lookback pill */
.lb-scroll { margin: 4px 0 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.lb-scroll::-webkit-scrollbar { display: none; }
.seg.pill-scroll { display: inline-flex; flex-wrap: nowrap; width: max-content; gap: 0; min-width: 100%; }
.seg.pill-scroll button { flex: 0 0 auto; white-space: nowrap; padding: 8px 14px; }

.pcards { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.pcard { background: var(--card); border: .5px solid var(--hair); border-radius: 16px; padding: 0; display: grid; gap: 0; cursor: pointer;
  transition: border-color .2s, box-shadow .2s; overflow: hidden; }
.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 .pc-sum { display: grid; gap: 4px; padding: 10px 12px; text-align: left; background: transparent; border: 0; color: inherit; font: inherit; cursor: pointer; width: 100%; }
.pcard h3 { margin: 0; font-family: var(--font-display); font-size: .98rem; line-height: 1.3; }
.pcard .arr { color: var(--accent); }
.pc-lag { color: var(--text2); font-weight: 500; font-size: .85em; }
.pc-body { padding: 0 12px 12px; display: grid; gap: 6px; }
.pc-body[hidden] { display: none; }
.pc-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pc-span { font-size: 11.5px; 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); }
.chip.nx { color: #7dd3fc; background: rgba(56, 189, 248, .12); border-color: rgba(56, 189, 248, .35); font-variant-numeric: tabular-nums; }
.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; }

/* Disc / Globe map-shape toggle: a compact glass pill above the time-window bar, right edge (thumb reach on phones) */
.seg.shape:not(.mini) { position: absolute; z-index: 6; right: max(12px, var(--sr)); bottom: calc(var(--nav-clear) + 46px); }
.seg.shape:not(.mini) button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 10px; min-height: 34px; font-size: 12.5px; }
.seg.shape svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.seg.shape.mini { padding: 2px; }
.seg.shape.mini button { min-height: 30px; padding: 5px 12px; font-size: 12px; }

/* recenter: glides to the home framing of the current shape (Disc or Globe) */
.recenter { position: absolute; z-index: 6; left: max(12px, var(--sl)); bottom: calc(var(--nav-clear) + 46px); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: rgba(18, 28, 48, .82); border: .5px solid var(--hair); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: var(--text); padding: 0; }
.recenter svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.recenter:active { transform: scale(.94); }

/* GlassSeg: every segmented control gets the tab bar's liquid-glass pill (see src/glassseg.ts) */
.seg.gs { position: relative; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.seg.gs > button { position: relative; z-index: 1; background: none !important; box-shadow: none !important; transition: color .25s; -webkit-tap-highlight-color: transparent; }
.seg.gs > button .n, .seg.gs > button svg { transition: transform .32s cubic-bezier(.2, 1.6, .4, 1); }
.seg.gs > button.gs-on { color: #fff; }
.seg.gs > button.gs-lens { color: #fff; }
.seg.gs > button.gs-lens svg { transform: scale(1.12); }
.gs-drop { position: absolute; z-index: 0; left: 0; top: 0; width: 40px; height: 30px; border-radius: 999px; pointer-events: none; opacity: 0;
  transform-origin: 50% 50%; will-change: transform, width; }
.gs-drop > span { position: absolute; inset: 0; border-radius: inherit; }
.gs-drop-body { background: linear-gradient(180deg, rgba(150, 210, 255, .24), rgba(56, 189, 248, .18) 60%, rgba(120, 190, 255, .16));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 0 0 1px rgba(56, 189, 248, .35), 0 4px 12px -6px rgba(56, 189, 248, .45);
  -webkit-backdrop-filter: blur(2px) saturate(1.5); backdrop-filter: blur(2px) saturate(1.5); transition: background .3s, box-shadow .3s; }
.gs-drop-spec { background: radial-gradient(60% 50% at 30% 18%, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 70%); }
.gs-drop.is-lifted .gs-drop-body { background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04) 60%, rgba(255, 255, 255, .09));
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, .55), inset 0 0 0 1px rgba(190, 225, 255, .45), inset 0 0 12px rgba(150, 210, 255, .2), 0 10px 22px -10px rgba(0, 0, 0, .55); }
html[data-lowpower] .gs-drop-body { -webkit-backdrop-filter: none; backdrop-filter: none; }
.seg[data-backdrop="off"] .gs-drop-body { background: rgba(56, 189, 248, .28); }

/* More > Check for updates (no chevron: it acts in place) */
.more-upd::after { display: none; }
.more-upd[data-state="updating"] .more-sub, .more-upd[data-state="latest"] .more-sub { color: #7dd3fc; }
.upd-spin svg { animation: upd-spin .9s linear infinite; } @keyframes upd-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .upd-spin svg { animation-duration: 2.4s; } }

/* focused on a quake (list tap or map tap): the recenter button becomes a labelled "Overview" pill */
.recenter .rc-label { display: none; font-size: 14px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }
.recenter { transition: width .28s cubic-bezier(.2, .9, .3, 1.15), background-color .2s, box-shadow .2s; }
.recenter.is-focus { width: auto; padding: 0 15px 0 11px; grid-auto-flow: column; gap: 7px; border-radius: 20px; color: #04121f;
  background: rgba(125, 211, 252, .92); border-color: rgba(255, 255, 255, .5); box-shadow: 0 6px 22px rgba(56, 189, 248, .35); }
.recenter.is-focus .rc-label { display: inline; }
/* Live list: the place opens the quake on the map */
.qlink { all: unset; cursor: pointer; color: var(--text); text-decoration: underline; text-decoration-color: rgba(125, 211, 252, .45); text-underline-offset: 3px; }
.qlink:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
tr.qrow { cursor: pointer; } a.usgs { color: var(--text2); text-decoration: none; font-size: .85em; padding: 0 2px; }

/* Layers popover: grabber + swipe-down + genie (src/genie.ts) */
.layers-pop { max-height: calc(100dvh - var(--nav-clear) - 190px); overflow-y: auto; overscroll-behavior: contain; padding-top: 4px; will-change: transform; }
.pop-grab { display: grid; place-items: center; height: 22px; margin: -2px -14px 0; cursor: grab; touch-action: none; }
.pop-grab i { display: block; width: 36px; height: 5px; border-radius: 3px; background: rgba(200, 220, 245, .42); }
.layers.is-dragging .layers-pop { transition: none; } .layers.is-dragging .pop-grab { cursor: grabbing; }
.layers.is-dragging .pop-grab i { background: rgba(200, 220, 245, .7); }

/* an open quake sheet lifts the Overview button and the Disc|Globe pill above it */
.recenter, .seg.shape:not(.mini) { bottom: calc(var(--nav-clear) + 46px + var(--sheet-lift, 0px)); transition: bottom .28s cubic-bezier(.2, .9, .3, 1.1), width .28s cubic-bezier(.2, .9, .3, 1.15), background-color .2s, box-shadow .2s; }

/* Auto-spin: small glass toggle by the recenter crosshair (Chris: map stays still unless you turn this on) */
.autospin { position: absolute; z-index: 6; left: max(12px, var(--sl)); bottom: calc(var(--nav-clear) + 94px + var(--sheet-lift, 0px));
  height: 34px; padding: 0 12px 0 10px; border-radius: 17px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: rgba(18, 28, 48, .82); border: .5px solid var(--hair); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  color: var(--text2); font: 650 12.5px/1 var(--font-sans); letter-spacing: .01em; transition: bottom .28s cubic-bezier(.2, .9, .3, 1.1), background-color .2s, color .2s, box-shadow .2s; }
.autospin svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.autospin[aria-pressed="true"] { color: #04121f; background: rgba(125, 211, 252, .92); border-color: rgba(255, 255, 255, .5); box-shadow: 0 4px 16px rgba(56, 189, 248, .3); }
.autospin:active { transform: scale(.96); }
/* North-up compass: same glass circle size as Overview/recenter; needle rotates to true north */
.northup { position: absolute; z-index: 6; left: max(12px, var(--sl)); bottom: calc(var(--nav-clear) + 134px + var(--sheet-lift, 0px));
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0;
  background: rgba(18, 28, 48, .82); border: .5px solid var(--hair); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  color: var(--text2); box-shadow: 0 4px 16px rgba(0,0,0,.28);
  transition: bottom .28s cubic-bezier(.2, .9, .3, 1.1), background-color .2s, box-shadow .2s, opacity .2s, transform .2s; }
.northup[hidden] { display: none !important; }
.northup-needle { display: grid; place-items: center; width: 22px; height: 22px; transform-origin: 50% 50%; will-change: transform; }
.northup svg { width: 22px; height: 22px; display: block; overflow: visible; }
.northup .nu-ring { fill: none; stroke: rgba(200, 220, 245, .55); stroke-width: 1.5; }
.northup .nu-north { fill: #f0433a; stroke: none; }
.northup .nu-south { fill: rgba(200, 220, 245, .55); stroke: none; }
.northup .nu-n { fill: #fff; font: 700 5.5px/1 var(--font-sans, system-ui, sans-serif); stroke: none; }
.northup:active { transform: scale(.94); background: rgba(125, 211, 252, .92); }
.northup:active .nu-n { fill: #04121f; }
.page:has(#sheet:not([hidden])) .northup { bottom: calc(var(--nav-clear) + 98px + var(--sheet-lift, 0px)); }
@media (prefers-reduced-motion: reduce) { .northup { transition: none; } .northup-needle { transition: none; } }
@media (prefers-reduced-motion: reduce) { .autospin { transition: none; } }

/* swipe-to-dismiss sheets (quake card, alerts, …) — grabber from .pop-grab */
.swipe-sheet { touch-action: none; will-change: transform; }
.swipe-sheet.is-dragging, .swipe-sheet.is-dragging * { cursor: grabbing; }
#sheet.swipe-sheet { padding-top: 4px; }
#sheet .pop-grab { margin: -2px -44px 4px -14px; }
.alerts.swipe-sheet .pop-grab { margin: 0 0 4px; }
.alerts { touch-action: pan-y; } /* scrollable body; grabber / header still own the dismiss drag */


/* ---- Mag floor chip (left of Layers) ---- */
.mag-chip { flex: none; min-width: 44px; height: 36px; padding: 0 12px; border-radius: 999px; border: .5px solid var(--hair);
  background: rgba(18, 28, 48, .82); color: #fff; font: 600 12.5px/1 var(--font, inherit); letter-spacing: .01em;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); cursor: pointer; touch-action: none;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform .22s cubic-bezier(.2, 1.6, .4, 1), background .2s; }
.mag-chip.is-lifted { transform: scale(1.08); background: rgba(56, 189, 248, .28); }
/* v0.1.29 (Chris t153u): the strength chip opens a "drop-up" — a vertical glass pill rising above the chip with a fine
   minimum-magnitude track (All, M1.0 … M7.0 in 0.5 steps). Positioned by JS (fixed, centred on the chip). */
.mag-pop { position: fixed; z-index: 40; left: 0; top: 0; width: 64px; padding: 14px 0 12px; border-radius: 32px;
  border: .5px solid rgba(160, 190, 230, .22); box-shadow: 0 14px 40px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(30, 44, 72, .94), rgba(12, 20, 36, .96)); touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
  transform-origin: 50% 100%; opacity: 0; transform: translateY(10px) scaleY(.82);
  transition: opacity .16s ease, transform .26s cubic-bezier(.2, 1.3, .4, 1); }
.mag-pop.is-open { opacity: 1; transform: none; }
.mag-pop[hidden] { display: none !important; }
.mp-track { position: relative; height: var(--mp-h, 280px); width: 100%; cursor: ns-resize; outline: none; }
.mp-rail { position: absolute; left: 41px; width: 7px; top: var(--mp-pad, 6px); bottom: var(--mp-pad, 6px); border-radius: 4px;
  background: linear-gradient(0deg, #8193ad 0%, #8193ad 2%, #24d960 6%, #24d960 32%, #f5d119 37%, #f5d119 63%, #ff7a14 68%, #ff7a14 79%, #f52e2e 83%, #f52e2e 100%);
  box-shadow: 0 0 10px rgba(255,255,255,.08); opacity: .95; }
.mp-ticks { position: absolute; inset: 0; pointer-events: none; }
.mp-tick { position: absolute; left: 0; width: 100%; height: 0; }
.mp-tick::after { content: ""; position: absolute; left: 36px; width: 4px; height: 1.5px; margin-top: -.75px; border-radius: 1px; background: rgba(232,238,247,.35); }
.mp-tick.whole::after { width: 7px; left: 33px; background: rgba(232,238,247,.55); }
.mp-tick span { position: absolute; right: 36px; transform: translateY(-50%); font: 600 10.5px/1 var(--font, inherit); color: var(--text2);
  font-variant-numeric: tabular-nums; transition: color .15s, transform .15s; }
.mp-tick.is-on span { color: #fff; transform: translateY(-50%) scale(1.12); }
.mp-tick.is-below span { opacity: .45; }
.mp-thumb { position: absolute; left: 30.5px; width: 28px; height: 28px; margin-bottom: -14px; bottom: var(--ty, 0px); border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #fff 0 34%, var(--mc, #8193ad) 36% 100%);
  box-shadow: 0 0 0 2px rgba(7,13,26,.85), 0 0 16px 3px color-mix(in srgb, var(--mc, #8193ad) 70%, transparent), 0 4px 10px rgba(0,0,0,.45);
  transition: bottom .18s cubic-bezier(.2, 1.4, .4, 1), background .15s; will-change: bottom; }
.mag-pop.is-drag .mp-thumb { transition: background .15s; }
.mp-thumb.tick { animation: mp-tick .16s ease-out; }
@keyframes mp-tick { 0% { transform: scale(1.18); } 100% { transform: scale(1); } }
.mp-read { position: absolute; right: calc(100% + 10px); bottom: calc(var(--ty, 0px) + 12px + var(--mp-pb, 12px)); transform: translateY(50%);
  white-space: nowrap; padding: 8px 12px; border-radius: 999px; font: 600 13px/1 var(--font, inherit); color: var(--text2);
  background: rgba(12, 20, 36, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: .5px solid rgba(160,190,230,.22);
  box-shadow: 0 8px 22px rgba(0,0,0,.45); pointer-events: none; transition: bottom .18s cubic-bezier(.2, 1.4, .4, 1); font-variant-numeric: tabular-nums; }
.mag-pop.is-drag .mp-read { transition: none; }
.mag-pop.read-right .mp-read { right: auto; left: calc(100% + 10px); }
.mp-read b { color: var(--mc, #fff); margin-right: 5px; font-size: 14px; }
.mag-chip-dots i.off { opacity: .22; transform: scale(.8); }
.mag-chip-dots i { transition: opacity .15s, transform .15s; }
.hap-sw { position: fixed; left: -200px; top: 0; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .mag-pop, .mp-thumb, .mp-read { transition: none; } .mp-thumb.tick { animation: none; } }
.hud-bottom .seg.win button { padding: 7px 9px; font-size: 12.5px; min-height: 34px; }
.hud-bottom .mag-chip { height: 34px; padding: 0 9px; font-size: 12px; gap: 5px; min-width: 0; }
.hud-bottom .mag-chip-dots { gap: 2px; }
.hud-bottom .layers summary { width: 34px; height: 34px; }
@media (max-width: 430px) {
  .hud-bottom { gap: 5px; }
  .hud-bottom .seg.win button { padding: 6px 7px; font-size: 11.5px; min-height: 32px; }
  .hud-bottom .seg.win .n { font-size: 10px; }
  .hud-bottom .mag-chip { padding: 0 8px; font-size: 11.5px; height: 32px; }
  .hud-bottom .mag-chip-dots i { width: 5px; height: 5px; }
  .hud-bottom .layers summary { width: 32px; height: 32px; }
  .hud-bottom .layers summary svg { width: 18px; height: 18px; }
}

/* Patterns shape pill — same compact size as Map (must not inherit bottom: from .seg.shape:not(.mini)) */
.page[data-page="patterns"] .pat-shape {
  position: absolute; z-index: 6; right: max(12px, var(--sr)); top: calc(10px + var(--safe-t));
  bottom: auto !important; left: auto; height: auto !important; width: auto; max-height: none;
  align-self: flex-start; }
.page[data-page="patterns"] .pat-shape button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 10px; min-height: 32px; font-size: 12.5px; }
.page[data-page="patterns"] .pat-shape svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; flex: none; }
.page[data-page="patterns"] .pat-shape.gs { display: inline-flex; flex-direction: row; align-items: center; }

/* Patterns idle: one slim player row; fat panel player + Day bar stay gone. Focus mode expands on play. */
.page[data-page="patterns"] .pat-panel-player { display: none !important; }
.page[data-page="patterns"] .pat-hud { display: none !important; }
.page[data-page="patterns"] .pat-slim {
  position: absolute; z-index: 7; left: max(10px, var(--sl)); right: max(10px, var(--sr));
  bottom: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: nowrap;
  padding: 6px 10px; border-radius: 14px; border: .5px solid var(--hair);
  background: rgba(8, 14, 28, .72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  pointer-events: auto; }
.page[data-page="patterns"] .pat-slim .btn { min-height: 30px; padding: 4px 12px; font-size: 12.5px; flex: none; }
.page[data-page="patterns"] .pat-slim .clock { margin: 0; flex: 1; min-width: 0; font-size: 12px; color: var(--text2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page[data-page="patterns"] .pat-slim .seg.mini { flex: none; }
.page[data-page="patterns"].is-playing .pat-slim { display: none; }
.page[data-page="patterns"].is-playing .panel { transform: translateY(110%); pointer-events: none; opacity: 0; transition: transform .38s cubic-bezier(.2,.9,.3,1), opacity .28s; }
.page[data-page="patterns"] .panel { transition: transform .38s cubic-bezier(.2,.9,.3,1), opacity .28s; }
.page[data-page="patterns"].is-playing .stage-slot { bottom: calc(var(--nav-clear) + 8px); }
.page[data-page="patterns"] .focus-player {
  position: absolute; z-index: 7; left: max(10px, var(--sl)); right: max(10px, var(--sr));
  bottom: 8px; display: none; flex-direction: column; gap: 6px;
  padding: 10px 12px; border-radius: 18px; border: .5px solid var(--hair);
  background: rgba(8, 14, 28, .78); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  pointer-events: auto; }
.page[data-page="patterns"].is-playing .focus-player { display: flex; bottom: calc(var(--nav-clear) - 2px); }
.page[data-page="patterns"].is-playing .pat-hud { display: none !important; }
.focus-player .f-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.focus-player .btn { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.focus-player input[type=range] { flex: 1 1 100px; min-width: 70px; }
.focus-player .clock { margin: 0; font-size: 12px; color: var(--text2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.focus-player .f-track { position: relative; height: 10px; border-radius: 999px; background: rgba(148,163,184,.18); overflow: visible; }
.focus-player .f-track #f-ticks { position: absolute; inset: 0; }
.focus-player .f-track #f-ticks i, .focus-player .f-track .pat-head {
  position: absolute; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #38bdf8; box-shadow: 0 0 0 2px rgba(8,14,28,.7); }
.focus-player .f-track #f-ticks i.t0 { background: #fbbf24; }
.focus-player .f-track .pat-head { width: 10px; height: 10px; margin: -5px 0 0 -5px; background: #fff; box-shadow: 0 0 0 2px rgba(56,189,248,.8); z-index: 2; }
.focus-player .f-meta { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.focus-player .f-meta b { font-size: 12.5px; color: #e8eef7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.focus-player .f-hop { font-size: 12px; color: var(--text2); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* quake card open: hide the window/mag/layers row so the card has the full dock; Overview stays */
.page:has(#sheet:not([hidden])) .hud-bottom { visibility: hidden; pointer-events: none; }
/* v0.1.15: hud-bottom hidden → drop +46px; add the sheet's own 10px inset so --sheet-lift(=height+10) yields ~10px gap */
.page:has(#sheet:not([hidden])) .recenter,
.page:has(#sheet:not([hidden])) .seg.shape:not(.mini) { bottom: calc(var(--nav-clear) + 10px + var(--sheet-lift, 0px)); }
.page:has(#sheet:not([hidden])) .autospin { bottom: calc(var(--nav-clear) + 58px + var(--sheet-lift, 0px)); }
.page:has(#sheet:not([hidden])) #sheet { bottom: calc(var(--nav-clear) + 10px); }

/* History: stats strip + decade timeline */
.page[data-page="history"] .hist-stats {
  position: absolute; z-index: 6; left: max(10px, var(--sl)); right: max(10px, var(--sr));
  top: calc(10px + var(--safe-t)); display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  padding: 8px 12px; border-radius: 14px; border: .5px solid var(--hair);
  background: rgba(8, 14, 28, .72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  font: 600 12px/1.3 var(--font, inherit); color: #e8eef7; }
.page[data-page="history"] .hist-stats span { white-space: nowrap; }
.page[data-page="history"] .hist-stats #hs-hot { color: #fbbf24; }
.page[data-page="history"] .hist-decade {
  position: absolute; z-index: 6; left: max(10px, var(--sl)); right: max(10px, var(--sr));
  bottom: 8px; display: none; gap: 8px; align-items: center;
  padding: 8px 10px; border-radius: 14px; border: .5px solid var(--hair);
  background: rgba(8, 14, 28, .78); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.page[data-page="history"] .hist-decade:not([hidden]) { display: flex; }
.page[data-page="history"] .hist-decade input[type=range] { flex: 1; min-width: 80px; }
.page[data-page="history"] .hist-decade b { font-variant-numeric: tabular-nums; min-width: 4.5em; text-align: right; font-size: 13px; }
.page[data-page="history"] .hist-decade .btn { min-height: 34px; padding: 6px 12px; font-size: 13px; }

/* Patterns: shorter map so lookback + first cards show without scrolling */
.page[data-page="patterns"].page-split .stage-slot { height: min(36vh, 300px); }
.page[data-page="patterns"].page-split .panel {
  top: calc(var(--safe-t) + var(--top-push) + min(36vh, 300px)); padding-top: 8px; }
.page[data-page="patterns"] .page-head { margin: 0 0 6px; }
.page[data-page="patterns"] .page-head h1 { font-size: 1.15rem; }
.page[data-page="patterns"] #psec { margin-bottom: 6px; }
.page[data-page="patterns"] .callout.compact { padding: 6px 10px; margin: 6px 0; font-size: 12px; line-height: 1.35; }
.page[data-page="patterns"] #pat-status { margin: 4px 0 6px; font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.page[data-page="patterns"] .lb-scroll { margin: 2px 0 6px; }
.page[data-page="patterns"] #spans { margin: 4px 0 2px; }

/* Mag-coloured dots legend */
.mag-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 11px; color: var(--text2); margin: 8px 0 0; }
.mag-key .mk, .mag-chip-dots i { display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0,0,0,.55); }
.mag-key .m-lo, .mag-chip-dots .m-lo { background: #24d960; }
.mag-key .m-md, .mag-chip-dots .m-md { background: #f5d119; }
.mag-key .m-hi, .mag-chip-dots .m-hi { background: #ff7a14; }
.mag-key .m-sv, .mag-chip-dots .m-sv { background: #f52e2e; }
.mag-chip { display: inline-flex; align-items: center; gap: 6px; }
.mag-chip-dots { display: inline-flex; gap: 2px; align-items: center; }
.mag-chip-dots i { width: 6px; height: 6px; }
.mag-badge { display: inline-block; min-width: 2.4em; padding: 2px 7px; border-radius: 999px; font-weight: 800; font-variant-numeric: tabular-nums;
  font-size: 12px; color: #0b1220; text-align: center; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.mag-badge.m-lo { background: #24d960; } .mag-badge.m-md { background: #f5d119; }
.mag-badge.m-hi { background: #ff7a14; } .mag-badge.m-sv { background: #f52e2e; }
/* v0.1.20 cluster spread overlay (leaders + displaced dots); taps go to the WebGL canvas and Stage.pick */
.spider-cv { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
/* v0.1.23: pattern playback = full-screen map. The patterns page-split slot height (min(36vh,300px)) out-ranked the
   .is-playing rule, so the map stayed a 300 px strip and the focus player (inside the slot) sat at the top. */
.page[data-page="patterns"].page-split.is-playing .stage-slot { position: absolute; inset: 0; width: auto; height: auto; margin: 0; transform: none; }

/* ───────── v0.1.25 tablet layouts (iPad: ≥768 px wide and ≥500 px tall, so phones in landscape keep the phone layout) ───────── */
@media (min-width: 768px) and (min-height: 500px) {
  /* t143u/t144u: the time window is a compact centred pill, not a full-width bar; mag chip + Layers stay at the right */
  .hud-bottom { justify-content: flex-end; }
  .hud-bottom .seg.win { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); flex: 0 0 auto; width: max-content; overflow: visible; }
  /* t146u: one centred column (max 900 px). Several blocks (.callout, .controls, .status-long, lists) set their own
     margin shorthand, which zeroed the auto side margins of `.scroll > *` — so cards sat centred while the rest hugged the left. */
  .scroll:not(.prose) > *, .panel > * { max-width: 900px; margin-left: auto !important; margin-right: auto !important; }
  .scroll { padding-left: max(28px, var(--sl)); padding-right: max(28px, var(--sr)); }
  .page-split .panel { padding-left: max(22px, var(--sl)); padding-right: max(22px, var(--sr)); }
  .scroll, .page-split .panel { padding-bottom: calc(var(--page-end) + 24px); }
  .prose > * { margin-left: auto !important; margin-right: auto !important; }
}
/* t145u: Patterns on iPad landscape — map column left (full height), panel column right scrolling on its own */
@media (min-width: 768px) and (min-height: 500px) and (orientation: landscape) {
  .page[data-page="patterns"].page-split:not(.is-playing) .stage-slot { position: absolute; left: 0; top: 0; bottom: 0; right: clamp(380px, 38vw, 420px); width: auto; height: auto; margin: 0; }
  .page[data-page="patterns"].page-split .panel { top: 0; bottom: 0; left: auto; right: 0; width: clamp(380px, 38vw, 420px);
    padding-top: calc(var(--safe-t) + var(--top-push) + 14px); background: rgba(7, 13, 26, .6); border-left: 1px solid var(--hair); }
  .page[data-page="patterns"].page-split .panel > * { max-width: none; }
  .page[data-page="patterns"]:not(.is-playing) .pat-slim { bottom: calc(var(--nav-clear) + 6px); max-width: 560px; margin: 0 auto; }
  .page[data-page="patterns"] .pat-shape { top: calc(var(--safe-t) + var(--top-push) + 12px); }
  /* the panel slides out to the right in focus mode (was: down) */
  .page[data-page="patterns"].is-playing .panel { transform: translateX(110%); }
}
/* t145u: Patterns on iPad portrait — map on top (55 %), panel below */
@media (min-width: 768px) and (min-height: 500px) and (orientation: portrait) {
  .page[data-page="patterns"].page-split:not(.is-playing) .stage-slot { position: absolute; left: 0; right: 0; top: 0; width: auto; height: 55vh; margin: 0; }
  .page[data-page="patterns"].page-split .panel { top: 55vh; left: 0; right: 0; bottom: 0; padding-top: 16px; border-left: 0; background: none; }
  .page[data-page="patterns"] .pat-shape { top: calc(var(--safe-t) + var(--top-push) + 12px); }
  .page[data-page="patterns"]:not(.is-playing) .pat-slim { max-width: 620px; margin: 0 auto; }
}

/* v0.1.26 volcano card */
.sheet-mag.sheet-volc { display: grid; place-items: center; background: rgba(255,255,255,.06); border: 1px solid color-mix(in srgb, var(--mc) 55%, transparent); padding: 6px 8px; }
.sheet-volc svg { width: 30px; height: 30px; fill: var(--mc); stroke: rgba(0,0,0,.5); stroke-width: 1; }
.sheet .v-status { color: var(--text); } .sheet .v-hot { color: #ff6a3d; } .sheet .v-warm { color: #f0a040; }

/* v0.1.28 experimental forecasts (Patterns → Forecasts) */
/* ───────── v0.1.30 Forecasts: zone cards, tabs, live track record, guide, map pill ───────── */
#fc-body .callout.notpred { padding-right: 46px; position: relative; }
.linkish { font: inherit; font-weight: 700; color: var(--accent); background: none; border: 0; padding: 2px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(56,189,248,.4); }
.fc-upd { margin: 14px 0 4px; font-size: 12px; line-height: 1.45; }
.fc-empty { margin: 12px 2px; }
/* track record */
.fc-score { margin: 10px 0 12px; padding: 12px 12px 10px; border-radius: 18px; border: .5px solid rgba(255, 210, 122, .28);
  background: linear-gradient(180deg, rgba(255, 196, 92, .09), rgba(22, 34, 58, .72) 55%); }
.fc-score-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.fc-score-h { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: .98rem; color: #ffe2a8; }
.fc-score-n { font-size: 11.5px; color: var(--text2); font-variant-numeric: tabular-nums; }
.fc-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 8px; }
.fc-kpi { background: rgba(7, 13, 26, .45); border: .5px solid var(--hair); border-radius: 14px; padding: 8px 9px 7px; min-width: 0; }
.fc-kpi-v { font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.fc-kpi-l { font-size: 12px; font-weight: 700; color: var(--text); margin-top: 2px; line-height: 1.2; }
.fc-kpi-s { font-size: 10.5px; color: var(--text2); line-height: 1.25; margin-top: 3px; }
.fc-kpi-bar { display: block; height: 4px; border-radius: 2px; background: rgba(148, 163, 184, .16); margin-top: 6px; overflow: hidden; }
.fc-kpi-bar i { display: block; height: 100%; border-radius: 2px; }
.k-hit .fc-kpi-v { color: #86efac; } .k-hit .fc-kpi-bar i { background: #4ade80; }
.k-mod .fc-kpi-v { color: #ffd27a; } .k-mod .fc-kpi-bar i { background: #fbbf24; }
.k-nrm .fc-kpi-v { color: #cbd5e1; } .k-nrm .fc-kpi-bar i { background: #94a3b8; }
.fc-score-p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--text2); } .fc-score-p b { color: var(--text); }
.fc-rel { margin-top: 8px; padding-top: 6px; }
.fc-rels { list-style: none; margin: 6px 0 2px; padding: 0; display: grid; gap: 6px; }
.fc-rels li { display: grid; grid-template-columns: 4.6em 1fr auto 2.4em; gap: 8px; align-items: center; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text2); }
.fc-rl { white-space: nowrap; } .fc-rn { text-align: right; font-size: 11px; opacity: .8; } .fc-rv b { color: #86efac; }
.fc-rb { position: relative; height: 10px; border-radius: 5px; background: rgba(148, 163, 184, .12); overflow: hidden; }
.fc-rb i { position: absolute; left: 0; height: 4px; border-radius: 2px; } .fc-rb .said { top: 0; background: #fbbf24; } .fc-rb .was { bottom: 0; background: #4ade80; }
/* tabs + tools */
.fc-tabs { display: flex; width: 100%; margin: 4px 0 8px; }
.fc-tabs button { flex: 1 1 0; min-width: 0; padding-left: 6px; padding-right: 6px; }
.fc-tools { display: flex; gap: 6px; align-items: center; overflow-x: auto; scrollbar-width: none; margin: 0 -2px 8px; padding: 2px; -webkit-overflow-scrolling: touch; }
.fc-tools::-webkit-scrollbar { display: none; }
@media (max-width: 440px) { .fc-tools-l { display: none; } }
.fc-tools-l { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text2); flex: none; margin-right: 2px; }
.fc-chip { flex: none; font: inherit; font-size: 12.5px; font-weight: 650; color: var(--text2); background: rgba(255, 255, 255, .05); border: .5px solid var(--hair);
  border-radius: 999px; padding: 6px 11px; min-height: 34px; cursor: pointer; white-space: nowrap; }
.fc-chip[aria-pressed="true"] { color: #fff; background: rgba(255, 196, 92, .16); border-color: rgba(255, 210, 122, .55); }
/* cards */
.fcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fcard { background: var(--card); border: .5px solid var(--hair); border-radius: 18px; padding: 0 0 10px; display: grid; gap: 6px; transition: border-color .2s, box-shadow .2s, background .2s; }
.fcard.is-sel { border-color: rgba(255, 210, 122, .7); box-shadow: 0 0 0 1px rgba(255, 210, 122, .25), 0 10px 30px -18px rgba(255, 180, 60, .6); background: rgba(30, 40, 62, .86); }
.fc-sum { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; text-align: left; font: inherit; color: inherit;
  background: none; border: 0; padding: 10px 12px 2px; cursor: pointer; border-radius: 18px 18px 0 0; min-height: 52px; }
.fc-badge { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums;
  color: #fff; background: radial-gradient(circle, rgba(6, 10, 20, .75) 55%, transparent 56%), color-mix(in srgb, var(--mc, #ffd27a) 30%, transparent);
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--mc, #ffd27a) 60%, #ffd27a), 0 0 0 4.5px color-mix(in srgb, var(--mc, #ffd27a) 22%, transparent), 0 0 14px color-mix(in srgb, var(--mc, #ffd27a) 45%, transparent); flex: none; }
.fc-badge.watch { --mc: #a78bfa; font-size: 18px; color: #c4b5fd; }
.fc-ttl { min-width: 0; }
.fc-ttl h3 { margin: 0; font-family: var(--font-display); font-size: .95rem; line-height: 1.25; overflow-wrap: anywhere; }
.fc-ttl h3 .chip { vertical-align: 1px; }
.fc-ttl small { display: block; margin-top: 2px; font-size: 12px; color: var(--text2); line-height: 1.3; }
.fc-hero { text-align: right; display: grid; justify-items: end; }
.fc-hero b { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; line-height: 1; color: #ffd27a; font-variant-numeric: tabular-nums; }
.fc-hero small { font-size: 11px; color: var(--text2); margin-top: 3px; white-space: nowrap; }
.fc-hero.yes b { color: #86efac; } .fc-hero.no b { color: var(--text2); }
.fc-plain { margin: 0 12px; font-size: 13px; line-height: 1.45; color: var(--text2); } .fc-plain b { color: var(--text); }
.fc-xs { color: #ffd27a; font-weight: 700; }
.fc-hitline { color: #bbf7d0; } .fc-hitline a { color: var(--accent); font-weight: 600; }
.fc-rows { list-style: none; margin: 2px 12px 0; padding: 0; display: grid; gap: 6px; }
.fc-rows li { display: grid; grid-template-columns: minmax(5.6em, 8.4em) minmax(40px, 1fr) 3.4em 5.2em; gap: 8px; align-items: center; font-size: 13px; font-variant-numeric: tabular-nums; min-height: 20px; }
.fc-rows li.wide { grid-template-columns: minmax(0, 1fr) 54px 3.4em 5.2em; }
.fc-rows b { text-align: right; }
.fc-t { min-width: 0; } .fc-tl { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .fc-ts { display: none; }
.fc-rows li.wide .fc-tl { white-space: normal; font-size: 12px; line-height: 1.3; color: var(--text2); }
.fc-x { text-align: right; font-size: 11.5px; font-weight: 700; color: #ffd27a; white-space: nowrap; }
.fc-res { text-align: right; font-size: 11.5px; font-weight: 700; white-space: nowrap; } .fc-res.yes { color: #86efac; } .fc-res.no { color: var(--text2); font-weight: 600; }
.fc-bar { position: relative; height: 7px; border-radius: 4px; background: rgba(148, 163, 184, .16); }
.fc-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: linear-gradient(90deg, #ffb03a, #ffd27a); box-shadow: 0 0 8px rgba(255, 190, 80, .35); }
.fc-bar s { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: #cbd5e1; opacity: .85; text-decoration: none; }
.fc-rows.scored .fc-bar i { background: linear-gradient(90deg, #64748b, #94a3b8); box-shadow: none; }
.fcard.hit { border-color: rgba(74, 222, 128, .35); }
.fc-detail { display: none; margin: 4px 12px 0; padding-top: 8px; border-top: .5px solid var(--hair); font-size: 13px; line-height: 1.45; color: var(--text2); }
.fc-detail p { margin: 0 0 6px; } .fc-detail b { color: var(--text); } .fc-detail a { color: var(--accent); }
.fcard.is-sel .fc-detail { display: block; animation: fcIn .22s ease-out; }
@keyframes fcIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.fc-meta { font-size: 12px; } .fc-oaf { font-size: 12.5px; }
.fc-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; } .fc-acts .btn { text-decoration: none; display: inline-flex; align-items: center; }
.fc-grp { list-style: none; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #c4b5fd; margin: 6px 2px 0; }
.fc-watch-intro { margin: 4px 0 10px; } .fc-watch-intro .chip { margin-right: 4px; }
.fc-more { margin-top: 10px; border-top: .5px solid var(--hair); padding-top: 8px; }
.fc-more summary { cursor: pointer; font-weight: 650; font-size: 13.5px; display: flex; gap: 6px; align-items: center; color: var(--text); min-height: 32px; }
/* guide */
.fc-guide { padding: 10px 14px 8px; margin: 0 0 10px; }
.fc-guide h3 { margin: 4px 0 6px; font-family: var(--font-display); font-size: 1rem; color: var(--text); }
.fc-guide dl { margin: 0; } .fc-guide dt { font-weight: 750; color: var(--text); margin-top: 8px; font-size: 13px; } .fc-guide dd { margin: 2px 0 0; font-size: 13px; line-height: 1.5; }
.fc-fine { font-size: 11.5px; line-height: 1.45; opacity: .85; margin-top: 10px; }
/* map pill: the selected zone, at the bottom of the map (never over the list) */
.fc-pill { position: absolute; z-index: 6; left: max(10px, var(--sl)); right: max(10px, var(--sr)); bottom: 10px; margin: 0 auto; max-width: 520px;
  display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 8px; border-radius: 18px; cursor: pointer; border: .5px solid rgba(255, 210, 122, .45); animation: fcIn .2s ease-out; }
.fc-pill[hidden] { display: none; }
.fc-pill .fc-badge { width: 34px; height: 34px; font-size: 12.5px; }
.fc-pill-t { min-width: 0; flex: 1; display: grid; }
.fc-pill-t b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-pill-t small { font-size: 12px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .fc-pill-t small b { font-size: 12px; color: #ffd27a; }
.fc-pill-x { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; }
.page[data-page="patterns"].is-playing .fc-pill { display: none; }
@media (min-width: 768px) and (min-height: 500px) and (orientation: landscape) { .fc-pill { bottom: calc(var(--nav-clear) + 6px); } }
@media (max-width: 380px) {
  .fc-rows li { grid-template-columns: 4.4em minmax(30px, 1fr) 3.2em 4.4em; gap: 6px; }
  .fc-tl { display: none; } .fc-ts { display: block; white-space: nowrap; }
  .fc-rows li.wide .fc-tl { display: block; } .fc-rows li.wide .fc-ts { display: none; }
  .fc-kpi-s { display: none; } .fc-kpi-v { font-size: 1.25rem; }
}
.fc-trackline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; width: 100%; text-align: left; font: inherit; color: var(--text2);
  margin: 0 0 8px; padding: 8px 12px; border-radius: 14px; cursor: pointer; border: .5px solid rgba(255, 210, 122, .25); background: linear-gradient(90deg, rgba(255, 196, 92, .08), rgba(22, 34, 58, .6)); min-height: 44px; }
.fc-tl-h { grid-column: 1; font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #ffe2a8; }
.fc-tl-k { grid-column: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 4px 0 2px; }
.fc-tl-k span { display: grid; font-size: 11px; line-height: 1.2; color: var(--text2); }
.fc-tl-k b { font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; color: #cbd5e1; font-variant-numeric: tabular-nums; } .fc-tl-k b.g { color: #86efac; } .fc-tl-k b.y { color: #ffd27a; }
.fc-tl-b { grid-column: 1; font-size: 12.5px; line-height: 1.4; } .fc-tl-b b { color: var(--text); }
.fc-tl-go { grid-column: 2; grid-row: 1 / 4; font-size: 22px; color: #ffd27a; }
.fc-score { margin-top: 0; }
@media (max-width: 380px) { .fc-rows.scored li { grid-template-columns: 4.4em minmax(24px, 1fr) 3.2em 5.9em; } }
#fc-body .callout.notpred { min-height: 46px; }
