/* Quake Disc. 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);
  --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: var(--bg); }
body { color: var(--text); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow: hidden;
  background: radial-gradient(120% 70% at 50% 0%, #142a4d 0%, var(--bg) 60%) fixed, var(--bg); }
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) + 8px); z-index: 99; background: #fff; color: #000; padding: 8px 12px; border-radius: 8px; }
.status-strip { position: fixed; top: 0; left: 0; right: 0; height: var(--safe-t); background: rgba(7, 13, 26, .85); z-index: 30; 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) + 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: var(--safe-t); }
.page-split .panel { height: auto; position: absolute; top: calc(var(--safe-t) + 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); } }

/* bottom tab bar: floating pill with icon + label items and a sliding highlight (Savannah GlassNav, simplified) */
.tabbar { position: fixed; z-index: 50; left: 0; right: 0; bottom: var(--nav-bottom); display: flex; justify-content: center; pointer-events: none;
  padding: 0 max(14px, var(--sr)) 0 max(14px, var(--sl)); }
.tab-shell { position: relative; pointer-events: auto; width: min(480px, 100%); height: var(--nav-h); border-radius: 999px; display: flex; padding: 6px; gap: 2px; }
.tab { position: relative; z-index: 1; flex: 1 1 0; min-width: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 999px; text-decoration: none; color: #a8b6cc; font-size: 10.5px; font-weight: 600; letter-spacing: .01em; transition: color .25s; -webkit-touch-callout: none; }
.tab svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .32s cubic-bezier(.2, 1.6, .4, 1); }
.tab.is-current { color: #fff; } .tab.is-current svg { transform: scale(1.08) translateY(-1px); }
.tab-drop { position: absolute; z-index: 0; left: 0; top: 6px; bottom: 6px; border-radius: 999px; opacity: 0;
  background: linear-gradient(180deg, rgba(120, 190, 255, .28), rgba(56, 189, 248, .16)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 16px -8px rgba(56, 189, 248, .5);
  transition: transform .45s cubic-bezier(.2, 1.25, .4, 1), width .45s cubic-bezier(.2, 1.25, .4, 1), opacity .2s; }

/* disc HUD */
.hud-top { position: absolute; z-index: 5; top: calc(var(--safe-t) + 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) + 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; } .tab { font-size: 10px; } }
@media (prefers-reduced-motion: reduce) { *, *::before { transition: none !important; animation: none !important; } }
