/* StormTrace app shell: pages, bottom nav, sheets, offline screen. Original design. */
:root {
  --tab-h: calc(3.7rem + var(--safe-bot));
  --bg: #16171b;
  --bg-2: #1b1d21;
  --card: #202226;
  --card-2: #26282d;
  --hair: rgba(200, 205, 215, 0.14);
  --soft: #d6d9de;
  --accent: #6cbcff;
  --accent-2: #5fe0c5;
  --warn: #f5b301;
  --bad: #ef4444;
}
html, body.shell { background: var(--bg); color: var(--text); overscroll-behavior: none; }
body.shell { -webkit-tap-highlight-color: transparent; user-select: none; }
body.shell input, body.shell select, body.shell textarea, body.shell pre { user-select: text; }

/* ---------------------------------------------------------------- pager */
.pager {
  position: fixed;
  left: 0; right: 0; top: 0;
  bottom: var(--tab-h);
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
  background: var(--bg);
}
.pager::-webkit-scrollbar { display: none; }
.page {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  /* Containment keeps each page's layout/paint to itself and makes the map
     page the containing block for its floating controls. */
  contain: strict;
  overflow: hidden;
}
.page-scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: calc(var(--safe-top) + 1.1rem) 1rem 1.6rem;
  -webkit-overflow-scrolling: touch;
}
.page-scroll > * + * { margin-top: 0.85rem; }

/* Map page: the map owns its gestures; the pager only moves from the edges and the nav. */
.page-map { background: #0b0f14; }
.page-map > *:not(.edge-swipe) { touch-action: pan-y; }
.page-map #map-wrap, .page-map #map, .page-map #map-b { touch-action: none; }
.edge-swipe { position: absolute; top: 0; bottom: 0; width: 18px; z-index: 30; touch-action: pan-x; }
.edge-l { left: 0; } .edge-r { right: 0; }
.page-map .stage { padding-bottom: 0; }



/* ---------------------------------------------------------------- nav */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--tab-h);
  padding-bottom: var(--safe-bot);
  z-index: 25;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(10, 13, 18, 0.96);
  border-top: 1px solid var(--hair);
}
.tabbar button {
  appearance: none; border: 0; background: none;
  color: #7d8896;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.18rem;
  font: 600 0.68rem/1 system-ui, sans-serif; letter-spacing: 0.02em;
  transition: color 0.18s;
}
.tabbar button svg { width: 1.45rem; height: 1.45rem; }
.tabbar button.on { color: var(--text); }
.tabbar button.on svg { color: var(--accent); }
.tab-ink {
  position: absolute; top: -1px; left: 0;
  width: 20%; height: 2px;
  display: flex; justify-content: center;
  will-change: transform;
  pointer-events: none;
}
.tab-ink::before { content: ""; width: 2.2rem; height: 2px; border-radius: 2px; background: var(--accent); }

/* ---------------------------------------------------------------- shared page chrome */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.75rem; }
.kicker { color: var(--muted); font: 700 0.7rem/1 system-ui, sans-serif; letter-spacing: 0.12em; text-transform: uppercase; }
.place { margin: 0.3rem 0 0; font: 700 1.45rem/1.15 system-ui, sans-serif; letter-spacing: -0.01em; }
.card {
  display: block; width: 100%;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--hair);
  border-radius: 20px;
  padding: 0.95rem 1rem;
  color: inherit; text-align: left; font: inherit;
}
.card h2 { margin: 0 0 0.6rem; font: 700 0.82rem/1 system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); }
.card-head { display: flex; align-items: center; justify-content: space-between; }
.card-head h2 { margin: 0; }
.link-btn { appearance: none; border: 0; background: none; color: var(--accent); font: 600 0.82rem/1 system-ui, sans-serif; padding: 0.4rem 0; }
.empty { color: var(--muted); }
.foot-note { color: #66717e; font-size: 0.72rem; text-align: center; padding: 0.4rem 1rem 0; }
.conn-pill {
  appearance: none; border: 1px solid var(--hair); border-radius: 999px;
  background: var(--card); color: var(--soft);
  font: 600 0.72rem/1 system-ui, sans-serif; padding: 0.45rem 0.7rem 0.45rem 1.4rem; position: relative;
}
.conn-pill::before { content: ""; position: absolute; left: 0.6rem; top: 50%; width: 0.42rem; height: 0.42rem; margin-top: -0.21rem; border-radius: 50%; background: var(--warn); }
.conn-pill[data-state="live"]::before { background: var(--live); box-shadow: 0 0 8px rgba(61,186,134,0.7); }
.conn-pill[data-state="down"]::before { background: var(--bad); }

/* ---------------------------------------------------------------- home */
.now-card {
  position: relative;
  border-radius: 26px;
  padding: 1.2rem 1.15rem 1rem;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(95, 224, 197, 0.13), transparent 55%),
    radial-gradient(110% 100% at 0% 100%, rgba(142, 192, 255, 0.14), transparent 60%),
    linear-gradient(180deg, #16202c, #101720);
  border: 1px solid var(--hair);
  overflow: hidden;
}
.now-main { display: flex; align-items: center; justify-content: space-between; }
.now-temp { font: 200 5.4rem/0.95 system-ui, sans-serif; letter-spacing: -0.04em; }
.now-glyph svg { width: 5.2rem; height: 5.2rem; }
.now-text { margin-top: 0.35rem; font: 600 1.12rem/1.25 system-ui, sans-serif; }
.now-hilo { color: var(--soft); margin-top: 0.2rem; font-size: 0.92rem; }
.now-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.55rem; margin-top: 1rem; }
.now-grid div { background: rgba(255,255,255,0.04); border-radius: 14px; padding: 0.55rem 0.6rem; }
.now-grid span { display: block; color: var(--muted); font-size: 0.68rem; letter-spacing: 0.04em; text-transform: uppercase; }
.now-grid b { display: block; margin-top: 0.22rem; font-size: 0.98rem; font-weight: 650; }
.now-src { margin-top: 0.75rem; color: #6f7b88; font-size: 0.7rem; }
.alert-banner {
  display: flex; width: 100%; gap: 0.7rem; align-items: center;
  appearance: none; border: 1px solid rgba(240, 120, 90, 0.4); border-radius: 18px;
  background: linear-gradient(90deg, rgba(224, 70, 60, 0.28), rgba(224, 107, 92, 0.12));
  color: #ffe3dc; padding: 0.8rem 0.95rem; text-align: left; font: 600 0.92rem/1.3 system-ui, sans-serif;
}
.alert-banner[hidden] { display: none; }
.radar-card { display: flex; align-items: center; gap: 0.85rem; }
.radar-ring {
  flex: 0 0 auto; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  border: 2px solid rgba(95, 224, 197, 0.55);
  background: radial-gradient(circle, rgba(95,224,197,0.35) 0 18%, transparent 19%), conic-gradient(from 30deg, rgba(95,224,197,0.45), transparent 35%);
}
.radar-thumb { position: relative; flex: 0 0 72px; width: 72px; height: 72px; border-radius: 14px; overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #16202c 0%, #0d131b 70%); box-shadow: inset 0 0 0 1px rgba(142,192,255,0.18); }
.radar-thumb img { position: absolute; width: 64px; height: 64px; image-rendering: auto; }
.radar-thumb .site-dot { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 2px rgba(10,13,18,0.85); }
.radar-copy { flex: 1; display: flex; flex-direction: column; gap: 0.2rem; }
.radar-copy span { color: var(--muted); font-size: 0.8rem; }
.radar-card .go { color: var(--muted); font-size: 1.6rem; }
.hour-strip { display: flex; gap: 0.5rem; overflow-x: auto; overscroll-behavior-x: contain; padding: 0.7rem 0 0.15rem; scrollbar-width: none; touch-action: pan-x pan-y; }
.hour-strip::-webkit-scrollbar { display: none; }
.hs-cell { flex: 0 0 3.6rem; text-align: center; padding: 0.55rem 0.2rem; border-radius: 14px; background: rgba(255,255,255,0.035); }
.hs-cell .t { color: var(--muted); font-size: 0.72rem; }
.hs-cell svg { width: 1.7rem; height: 1.7rem; margin: 0.3rem auto 0.2rem; display: block; }
.hs-cell .v { font-weight: 650; }
.hs-cell .p { color: var(--accent); font-size: 0.68rem; min-height: 0.8rem; margin-top: 0.15rem; }
.day-list { display: flex; flex-direction: column; margin-top: 0.4rem; }
.day-row { display: grid; grid-template-columns: minmax(3.6rem, auto) 1.9rem minmax(0, 1fr) auto; align-items: center; gap: 0.5rem; padding: 0.55rem 0; border-top: 1px solid var(--hair); }
.day-row:first-child { border-top: 0; }
.day-row .n { font-weight: 650; }
.day-row svg { width: 1.6rem; height: 1.6rem; }
.day-row .d { color: var(--muted); font-size: 0.8rem; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.25; }   /* 2 lines: the rain % was cut off (B111) */
.day-row .tt { font-weight: 650; white-space: nowrap; }
.day-row .tt i { font-style: normal; color: var(--muted); font-weight: 500; margin-left: 0.35rem; }
.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.55rem; }
.quick-grid button {
  appearance: none; border: 1px solid var(--hair); border-radius: 14px;
  background: rgba(255,255,255,0.035); color: var(--text);
  padding: 0.8rem 0.85rem; text-align: left; font: 600 0.9rem/1.2 system-ui, sans-serif;
}
.quick-grid button:active, .card:active { filter: brightness(1.15); }

/* ---------------------------------------------------------------- hourly */
.hourly-chart { background: var(--card); border: 1px solid var(--hair); border-radius: 20px; padding: 0.6rem 0.4rem 0.2rem; }
.hourly-chart canvas { width: 100%; height: 96px; display: block; }
.metric-chips { display: flex; gap: 0.4rem; padding: 0.15rem 0.4rem 0.5rem; }
.metric-chips button { flex: 1; min-height: 2.25rem; border-radius: 999px; border: 1px solid var(--hair); background: transparent; color: var(--soft); font: 600 0.8rem/1 system-ui, sans-serif; }
.metric-chips button.on { background: rgba(142,192,255,0.16); border-color: rgba(142,192,255,0.5); color: var(--text); }
/* Status bar scrim: scrolled content never shows under the clock/icons. */
body.shell::before { content: ""; position: fixed; left: 0; right: 0; top: 0; height: var(--safe-top); background: rgba(10,13,18,0.94); z-index: 24; pointer-events: none; }
.hourly-list { background: var(--card); border: 1px solid var(--hair); border-radius: 20px; padding: 0.2rem 0.9rem; }
.hl-day { position: sticky; top: calc(-1.1rem - 1px); background: var(--card); color: var(--soft); font: 700 0.74rem/1 system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.8rem 0 0.45rem; z-index: 1; }
.hl-row { display: grid; grid-template-columns: minmax(3rem, auto) 1.8rem minmax(2.6rem, auto) minmax(0, 1fr) auto; align-items: center; gap: 0.45rem; padding: 0.55rem 0; border-top: 1px solid var(--hair); }
.hl-row .t { color: var(--soft); font-size: 0.85rem; }
.hl-row svg { width: 1.5rem; height: 1.5rem; }
.hl-row .v { font-weight: 700; font-size: 1.05rem; }
.hl-row .d { color: var(--muted); font-size: 0.78rem; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.25; }
.hl-row .x { text-align: right; font-size: 0.74rem; color: var(--muted); line-height: 1.35; }
.hl-row .x b { color: var(--accent); font-weight: 650; }

/* ---------------------------------------------------------------- settings */
.set-card .field { display: block; margin-top: 0.8rem; color: var(--soft); font-size: 0.82rem; }
.set-card input, .set-card select {
  display: block; width: 100%; margin-top: 0.35rem;
  background: #0c1117; color: var(--text); border: 1px solid var(--hair); border-radius: 12px; padding: 0.7rem 0.75rem; font: 500 0.95rem system-ui, sans-serif;
}
.set-card input[type="range"] { padding: 0; background: none; border: 0; accent-color: var(--accent); }
.set-card .hint { color: #6f7b88; font-size: 0.74rem; line-height: 1.4; }
.set-card .row-btn, .set-card .conn-row button { border-radius: 12px; }
.pc-line { display: flex; align-items: center; gap: 0.5rem; color: var(--soft); font-size: 0.88rem; }
.pc-line .dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--warn); }
.pc-line .dot[data-state="live"] { background: var(--live); }
.pc-line .dot[data-state="down"] { background: var(--bad); }

/* ---------------------------------------------------------------- sheets */
body.shell .sheet { position: fixed; z-index: 26; background: rgba(16, 20, 27, 0.98); border: 1px solid var(--hair); border-bottom: 0; padding-top: 0.35rem; will-change: transform; }
body.shell .sheet:not([hidden]) { animation: st-sheet-in 0.26s var(--ease); }
body.shell .sheet.dragging { transition: none !important; }
body.shell .backdrop { position: fixed; z-index: 24; }
body.shell .backdrop:not([hidden]) { animation: st-fade 0.2s ease-out; }
.grip { width: 100%; height: 1.4rem; display: flex; align-items: center; justify-content: center; touch-action: none; cursor: grab; }
.grip::before { content: ""; width: 2.6rem; height: 0.3rem; border-radius: 99px; background: rgba(255,255,255,0.22); }
body.shell .sheet-head { touch-action: none; }
@keyframes st-sheet-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes st-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------------------------------------------------------------- offline */
.offline {
  position: fixed; inset: 0; z-index: 80;   /* above the top bar (70), B114 */
  display: grid; place-items: center; padding: 1.2rem;
  background: rgba(6, 8, 11, 0.975);
}
.offline[hidden] { display: none; }
.off-card { width: min(26rem, 100%); text-align: center; }
.off-ico { width: 4.2rem; height: 4.2rem; color: var(--soft); }
.off-card h2 { margin: 0.8rem 0 0.5rem; font: 700 1.45rem/1.2 system-ui, sans-serif; }
.off-detail { color: var(--soft); line-height: 1.45; font-size: 0.92rem; }
.off-target { color: var(--muted); font-size: 0.8rem; word-break: break-all; }
.off-target b { color: var(--soft); }
.off-next { color: var(--muted); font-size: 0.78rem; min-height: 1rem; }
.off-row { display: flex; gap: 0.5rem; justify-content: center; margin-top: 0.6rem; }
.off-manual[hidden] { display: none; }
.off-manual { display: flex; gap: 0.5rem; margin-top: 0.7rem; }
.off-manual input { flex: 1; min-width: 0; background: #0c1117; color: var(--text); border: 1px solid var(--hair); border-radius: 12px; padding: 0.7rem; font: 500 0.95rem system-ui, sans-serif; }
.btn-primary { appearance: none; border: 0; border-radius: 14px; background: var(--accent); color: #0a1626; font: 700 0.98rem/1 system-ui, sans-serif; padding: 0.9rem 1.4rem; margin-top: 0.6rem; }
.off-card > .btn-primary { width: 100%; }
.btn-ghost { appearance: none; border: 1px solid var(--hair); border-radius: 12px; background: rgba(255,255,255,0.04); color: var(--text); font: 600 0.86rem/1 system-ui, sans-serif; padding: 0.75rem 0.9rem; }
.btn-text { appearance: none; border: 0; background: none; color: var(--accent); font: 600 0.86rem/1 system-ui, sans-serif; padding: 1rem; margin-top: 0.4rem; }

/* ---------------------------------------------------------------- weather glyphs */
.wx { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.wx .sun { stroke: #ffc65c; stroke-width: 2; }
.wx .moon { stroke: #c9d6ff; stroke-width: 2; }
.wx .cloud { stroke: #c9d2dc; stroke-width: 2; fill: rgba(201, 210, 220, 0.08); }
.wx .rain { stroke: #6fb4ff; stroke-width: 2; }
.wx .snow { stroke: #e6f1ff; stroke-width: 2; }
.wx .bolt { stroke: #ffd24a; stroke-width: 2; fill: rgba(255, 210, 74, 0.25); }
.wx .fog { stroke: #9aa6b4; stroke-width: 2; }

@media (prefers-reduced-motion: reduce) {
  body.shell .sheet:not([hidden]), body.shell .backdrop:not([hidden]) { animation: none; }
}
#play-progress { width: 100% !important; transform-origin: 0 50%; will-change: transform; }
/* Timeline labels: keep the first and last inside the screen. */
body.shell .tick { font-size: 0.64rem; }
body.shell .tick:first-child { transform: none; }
body.shell .tick:last-child { transform: translateX(-100%); }
/* Radar drawer: room for about six choices instead of three. */
body.shell .mode-body { max-height: 40vh; overscroll-behavior: contain; }
/* Tap-to-read card: leave the locate and menu buttons uncovered. */
/* Keep the scrub thumb out of Android's edge back-gesture zone (~24dp). */
body.shell .stage .timeline { padding-left: 1.1rem; padding-right: 1.1rem; }
body.shell .stage .ticks { left: 1.25rem; right: 1.25rem; }
body.shell .page-map .stage { max-height: calc(100% - 5.2rem - var(--safe-top)); }

/* ===================================================================== theme 2026
   Navy "storm desk" look (2026-11-29). One theme for phone and PC: navy panels,
   white type, blue for what is selected, gold round map buttons, slate map.
   Loaded after app.css, so these rules win over the older dark/white ones. */
html, body, body.shell { background: var(--bg); color: var(--text); }
body.shell::before { background: rgba(22, 23, 27, 0.96); }
.pager, .page-map { background: #2c2f35; }
.tabbar { background: rgba(22, 23, 27, 0.98); border-top: 1px solid var(--hair); }
.tabbar button { color: #9ba1ac; }
.tabbar button.on { color: #ffffff; }
.tabbar button.on svg { color: #6cbcff; }
.tab-ink::before { background: #2b8ae6; }
.card { background: linear-gradient(180deg, #26282d, #202226); border: 1px solid var(--hair); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }
.card h2 { color: #c6cad2; }
.foot-note, .now-src { color: #8b919c; }
.empty, .hint, .muted { color: var(--muted); }
.link-btn { color: #6cbcff; }
.quick-grid button { background: #2a2d33; border: 1px solid var(--hair); color: var(--text); }
.conn-pill { background: #2a2d33; color: var(--soft); }
.now-grid div, .hs-cell { background: rgba(62, 166, 255, 0.07); }
.hs-cell .p { color: #6cbcff; }
.alert-banner { background: linear-gradient(90deg, rgba(245, 179, 1, 0.28), rgba(245, 179, 1, 0.08)); color: #fff4d6; border: 1px solid rgba(245, 179, 1, 0.45); }

/* Map chrome */
.time-card { background: rgba(30, 32, 37, 0.95); color: #ffffff; border: 1px solid rgba(200, 205, 215, 0.22); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45); }
.time-card #time-main { color: #ffffff; }
.time-card #time-updated { color: #b8bdc7; }
#chip[data-state="live"] #time-updated { color: #8ff0b3; }
#chip[data-state="stale"] #time-updated { color: #ffd479; }
#chip[data-state="old"] #time-updated, #chip[data-state="down"] #time-updated { color: #ff9b9b; }
.fab, .search-float { background: var(--gold); color: #13213f; border: 0; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4); }
.icon-btn:hover, .fab:hover, .search-float:hover { background: #ffc61f; color: #13213f; }
.alert-float { background: var(--gold); color: #13213f; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4); }
.alert-float .badge { background: #ef4444; color: #ffffff; }
.glass, .sheet, .panel, .locate-msg, .eta-chip {
  background: rgba(30, 32, 37, 0.97); color: var(--text); border-color: rgba(200, 205, 215, 0.18);
}





.stage, .stage .scale { background: #1c1e22; color: var(--text); border-color: rgba(200, 205, 215, 0.16); }
.mode-tabs { background: #222429; border-color: rgba(200, 205, 215, 0.12); }
.mode-tab { color: #c9cdd5; }
.mode-tab.on { color: #ffffff; background: transparent; }
.mode-tab.on::after { background: #2b8ae6; }
.sheet-toggle { color: #c9cdd5; }
.mode-body { background: #1c1e22; }
.sec-head { background: #2a2d33; color: #eceef1; border-top: 1px solid rgba(200, 205, 215, 0.12); }



.more-block { background: #222429; }
.more-block summary { color: #b8bdc7; }
.field-note { color: #ffd479; }
.status-bar { background: #222429; color: var(--text); border-color: rgba(200, 205, 215, 0.12); }
.status-kicker strong, .np-what { color: #ffffff; }
.status-kicker span, .np-state, .np-count, .np-when { color: #b8bdc7; }
#status-product { color: #6cbcff; }
.stage .playback { background: #1a1c20; color: var(--text); border-color: rgba(200, 205, 215, 0.12); }
.play-main, .play-main.is-playing { background: #2b8ae6; color: #ffffff; border-radius: 999px; }
.playback.is-playing .np-state { background: #1f8a4c; color: #ffffff; }
.play-progress { background: #6cbcff; }
.playback.is-playing .play-progress { background: #22c55e; }
.play-track { background: rgba(200, 205, 215, 0.14); }
.row-btn, .mini, .tab { background: #2c2f35; color: var(--text); }
.mini.on, .tab.on { background: #2b8ae6; color: #ffffff; }
.panel input, .field input, .field select, .sheet label select, .sheet > select, .sheet select {
  background: #16171b; color: var(--text); border: 1px solid rgba(200, 205, 215, 0.24);
}
.model-chip, .model-chips .model-chip, #model-bar .model-chip { background: #2a2d33; color: #f2f3f5; border: 1px solid rgba(200, 205, 215, 0.2); }
.model-chip.on, #model-bar .model-chip.on { background: #2b8ae6; color: #ffffff; border-color: #2b8ae6; }
.model-chip.on small, #model-bar .model-chip.on small { color: #e3f2ff; }
#model-bar.pill-row { background: #222429; }
.handle { background: #5b6068; }
.alert-card, .obs-card { background: #2a2d33; }
.backdrop { background: rgba(0, 0, 0, 0.5); }
.radar-legend-img { background: #e9eef7; }

/* dBZ color bar across the top of the map (radar mode) */
.dbz-bar { position: absolute; top: var(--safe-top); left: 0; right: 0; height: 1.25rem; z-index: 19; pointer-events: none; }
.dbz-bar[hidden] { display: none; }
.dbz-ramp { position: absolute; inset: 0; }
.dbz-ticks { position: absolute; inset: 0; }
.dbz-ticks span { position: absolute; top: 50%; transform: translate(-50%, -50%); font: 700 0.62rem/1 system-ui, sans-serif; color: #0d1830; text-shadow: 0 0 3px rgba(255, 255, 255, 0.9); }
.page-map .dbz-bar ~ .time-card { top: calc(0.45rem + var(--safe-top)); }

/* Drawer settings: groups, rows, sliders, switches */
.set-group { margin: 0.5rem 0.75rem 0.75rem; padding: 0.35rem 0.75rem; background: #222429; border: 1px solid rgba(200, 205, 215, 0.12); border-radius: 14px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.5rem 0; border-top: 1px solid rgba(200, 205, 215, 0.1); color: #e7e9ec; font: 600 0.88rem/1.2 system-ui, sans-serif; }
.set-group > :first-child { border-top: 0; }
.set-row .seg { display: flex; gap: 0.3rem; }
.set-row .mini { min-width: 2.6rem; min-height: 2.1rem; border-radius: 999px; border: 0; font: 700 0.8rem/1 system-ui, sans-serif; }
.set-slider { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 0.55rem; padding: 0.55rem 0; border-top: 1px solid rgba(200, 205, 215, 0.1); color: #e7e9ec; font: 600 0.88rem/1.2 system-ui, sans-serif; }
.set-slider > span { grid-column: 1 / -1; margin-bottom: 0.35rem; display: flex; justify-content: space-between; }
.set-slider > span b { color: #6cbcff; font-weight: 700; }
.set-slider small { color: #9ba1ac; font: 600 0.72rem/1 system-ui, sans-serif; }
.set-slider input[type="range"] { width: 100%; accent-color: #2b8ae6; }
.set-toggle { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.6rem 0; border-top: 1px solid rgba(200, 205, 215, 0.1); color: #e7e9ec; font: 600 0.9rem/1.25 system-ui, sans-serif; }
.set-toggle small { display: block; color: #9ba1ac; font: 500 0.74rem/1.3 system-ui, sans-serif; margin-top: 0.12rem; }
.set-toggle input[type="checkbox"], .sheet .toggle input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: 0 0 auto; width: 3rem; height: 1.7rem; margin: 0; border-radius: 999px;
  background: #474b53; position: relative; cursor: pointer; transition: background 0.2s var(--ease);
}
.set-toggle input[type="checkbox"]::after, .sheet .toggle input[type="checkbox"]::after {
  content: ""; position: absolute; top: 0.18rem; left: 0.18rem; width: 1.34rem; height: 1.34rem; border-radius: 50%; background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); transition: transform 0.2s var(--ease);
}
.set-toggle input[type="checkbox"]:checked, .sheet .toggle input[type="checkbox"]:checked { background: #2b8ae6; }
.set-toggle input[type="checkbox"]:checked::after, .sheet .toggle input[type="checkbox"]:checked::after { transform: translateX(1.3rem); }

/* Model drawer */
.run-line { margin: 0.4rem 0.95rem 0.1rem; color: #b8bdc7; font: 600 0.8rem/1.35 system-ui, sans-serif; }
.chip-grid { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.6rem 0.75rem 0.3rem; }
.fchip { appearance: none; border: 1px solid rgba(200, 205, 215, 0.22); background: #2a2d33; color: #e7e9ec; border-radius: 999px;
  padding: 0.5rem 0.8rem; min-height: 2.3rem; font: 700 0.82rem/1 system-ui, sans-serif; cursor: pointer; }
.fchip.on { background: #2b8ae6; border-color: #2b8ae6; color: #ffffff; }
.model-legend { display: block; width: calc(100% - 1.5rem); margin: 0.3rem 0.75rem 0; max-height: 52px; object-fit: contain; border-radius: 8px; background: #e9eef7; }
.model-legend[hidden] { display: none; }

/* Hourly page */
.day-chips { display: flex; gap: 0.45rem; overflow-x: auto; scrollbar-width: none; padding: 0.1rem 0 0.15rem; touch-action: pan-x pan-y; overscroll-behavior-x: contain; }
.day-chips::-webkit-scrollbar { display: none; }
.day-chip { flex: 0 0 auto; min-width: 4.4rem; appearance: none; border: 1px solid var(--hair); background: #202226; color: var(--text); border-radius: 14px;
  padding: 0.5rem 0.6rem; text-align: center; font: 700 0.82rem/1.2 system-ui, sans-serif; cursor: pointer; }
.day-chip b { display: block; }
.day-chip span { display: block; margin-top: 0.2rem; color: #ffd38a; font-weight: 700; }
.day-chip span i { font-style: normal; color: #8fc7ff; margin-left: 0.3rem; }
.day-chip.on { background: #2b8ae6; border-color: #2b8ae6; }
.day-chip.on span, .day-chip.on span i { color: #ffffff; }
.hourly-chart { background: linear-gradient(180deg, #26282d, #202226); border: 1px solid var(--hair); border-radius: 20px; padding: 0.6rem 0.5rem 0.4rem; }
.metric-chips button { border-color: var(--hair); color: #d6d9de; }
.metric-chips button.on { background: #2b8ae6; border-color: #2b8ae6; color: #ffffff; }
.chart-readout { margin: 0.1rem 0.35rem 0.4rem; padding: 0.55rem 0.7rem; background: rgba(62, 166, 255, 0.09); border-radius: 14px; min-height: 4.6rem; }
.ro-top { display: flex; align-items: center; gap: 0.5rem; }
.ro-when { font: 700 0.92rem/1 system-ui, sans-serif; flex: 1; }
.ro-top svg { width: 1.9rem; height: 1.9rem; }
.ro-temp { font: 700 1.6rem/1 system-ui, sans-serif; color: #ffd38a; }
.ro-sky { color: #c6cad2; font-size: 0.84rem; margin-top: 0.2rem; }
.ro-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.35rem; margin-top: 0.45rem; }
.ro-grid span { display: flex; flex-direction: column; }
.ro-grid i { font-style: normal; color: #9ba1ac; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.05em; }
.ro-grid b { font-size: 0.9rem; margin-top: 0.1rem; white-space: nowrap; }
.chart-wrap { position: relative; }
.hourly-chart canvas#hourly-spark { width: 100%; height: 170px; display: block; touch-action: pan-y; cursor: crosshair; }
.chart-hint { margin: 0.25rem 0.4rem 0.1rem; color: #8b919c; font-size: 0.72rem; text-align: center; }
.hourly-list { display: flex; flex-direction: column; gap: 0.55rem; }
.day-card { background: linear-gradient(180deg, #26282d, #202226); border: 1px solid var(--hair); border-radius: 18px; overflow: hidden; }
.day-card > summary { list-style: none; display: grid; grid-template-columns: minmax(4.2rem, auto) 2rem minmax(0, 1fr) auto; align-items: center; gap: 0.5rem; padding: 0.75rem 0.9rem; cursor: pointer; }
.day-card > summary::-webkit-details-marker { display: none; }
.dc-name b { display: block; font: 700 0.95rem/1.2 system-ui, sans-serif; }
.dc-name small { color: #9ba1ac; font-size: 0.72rem; }
.day-card > summary svg { width: 1.8rem; height: 1.8rem; }
.dc-sky { color: #c6cad2; font-size: 0.8rem; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.25; }
.dc-sky em { font-style: normal; color: #6cbcff; font-weight: 700; }
.dc-temp { font: 700 1rem/1 system-ui, sans-serif; color: #ffd38a; white-space: nowrap; }
.dc-temp i { font-style: normal; color: #8fc7ff; margin-left: 0.35rem; }
.day-card[open] > summary { border-bottom: 1px solid var(--hair); background: rgba(62, 166, 255, 0.06); }
.dc-hours { padding: 0.15rem 0.6rem 0.4rem; }
.dc-hours .hl-row { display: grid; grid-template-columns: 3.4rem 1.7rem 2.6rem 1fr auto; align-items: center; gap: 0.45rem; padding: 0.45rem 0.2rem; border-top: 1px solid rgba(200, 205, 215, 0.08); }
.dc-hours .hl-row:first-child { border-top: 0; }
.dc-hours .hl-row .t { color: #b8bdc7; font-size: 0.8rem; }
.dc-hours .hl-row svg { width: 1.5rem; height: 1.5rem; }
.dc-hours .hl-row .v { font-weight: 700; }
.dc-hours .hl-row .d { color: #c6cad2; font-size: 0.78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-hours .hl-row .x { text-align: right; font-size: 0.74rem; line-height: 1.2; }
.dc-hours .hl-row .x b { color: #6cbcff; }
.dc-hours .hl-row .x b.dry { color: #6b717c; }
.dc-hours .hl-row .x small { display: block; color: #9ba1ac; }

/* Alert button: warning triangle with a red count badge (WeatherWise-style). */
.alert-float { border-radius: 999px; overflow: visible; }
.alert-float::before {
  content: ""; width: 1.45rem; height: 1.45rem;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 3.2 2.6 19.6a1 1 0 0 0 .87 1.5h17.06a1 1 0 0 0 .87-1.5L12 3.2z' fill='none' stroke='%2313213f' stroke-width='2.2' stroke-linejoin='round'/><path d='M12 9.2v5.2' stroke='%2313213f' stroke-width='2.4' stroke-linecap='round'/><circle cx='12' cy='17.6' r='1.35' fill='%2313213f'/></svg>") center / contain no-repeat;
}
.alert-float .badge {
  position: absolute; top: -0.35rem; right: -0.35rem; min-width: 1.3rem; height: 1.3rem; padding: 0 0.32rem;
  border-radius: 999px; background: #ef4444; color: #ffffff; border: 2px solid #1c1e22;
  display: grid; place-items: center; font: 800 0.7rem/1 system-ui, sans-serif;
}

/* Now card: navy with a soft blue glow (was near-black). */
.now-card {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(62, 166, 255, 0.22), transparent 55%),
    radial-gradient(110% 100% at 0% 100%, rgba(62, 166, 255, 0.18), transparent 60%),
    linear-gradient(180deg, #2a2c31, #202226);
  border: 1px solid rgba(200, 205, 215, 0.2);
}
.now-grid div { background: rgba(0, 0, 0, 0.28); }
.radar-thumb { background: radial-gradient(circle at 50% 50%, #3a3d44 0%, #2c2f35 70%); }

/* Wide screens (PC browser): content column instead of edge-to-edge,
   and the product drawer stays open beside the map. */
@media (min-width: 960px) {
  .page:not(.page-map) .page-scroll > * { max-width: 920px; margin-left: auto; margin-right: auto; }
  .stage.collapsed .mode-body { display: block; }
  .stage .sheet-toggle { display: none; }
  body.shell .stage .mode-body { flex: 1 1 auto; overflow-y: auto; max-height: none; }
}

/* Sheets (Layers, Alerts, Discussion…) share the navy panels. */
body.shell .sheet { background: rgba(30, 32, 37, 0.98); border-color: rgba(200, 205, 215, 0.18); }
.text-btn { color: #6cbcff; font-weight: 700; }
.drawer-kicker { color: #9ba1ac; }
.drawer-block { border-color: rgba(200, 205, 215, 0.12); }
.sheet .toggle { display: flex; align-items: center; gap: 0.7rem; }

/* ===================================================================== StormTrace identity (2026-11-29b)
   Our own look: neutral charcoal, one sky-blue accent, tonal selection, round
   charcoal map buttons. Calm like a forecast app, dense like a radar app. */
:root { --st-accent: #3ea6ff; --st-accent-ink: #d6ecff; --st-tone: rgba(62, 166, 255, 0.16); --st-amber: #f5b301; }
.fab, .search-float {
  background: rgba(30, 32, 37, 0.94); color: #f2f3f5; border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}
.icon-btn:hover, .fab:hover, .search-float:hover { background: rgba(44, 47, 53, 0.98); color: #ffffff; }
.alert-float { background: rgba(30, 32, 37, 0.94); border: 1px solid rgba(245, 179, 1, 0.55); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45); }
.alert-float::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 3.2 2.6 19.6a1 1 0 0 0 .87 1.5h17.06a1 1 0 0 0 .87-1.5L12 3.2z' fill='none' stroke='%23f5b301' stroke-width='2.2' stroke-linejoin='round'/><path d='M12 9.2v5.2' stroke='%23f5b301' stroke-width='2.4' stroke-linecap='round'/><circle cx='12' cy='17.6' r='1.35' fill='%23f5b301'/></svg>");
}
.alert-float .badge { border-color: #1c1e22; }
.time-card { background: rgba(30, 32, 37, 0.94); border-color: rgba(255, 255, 255, 0.12); }
/* Tonal selection instead of solid pills */
.mini.on, .tab.on, .fchip.on, .model-chip.on, #model-bar .model-chip.on, .metric-chips button.on, .set-row .mini.on {
  background: var(--st-tone); color: var(--st-accent-ink); border: 1px solid var(--st-accent);
}
.model-chip.on small, #model-bar .model-chip.on small { color: #9fd2ff; }
.day-chip.on { background: var(--st-tone); border-color: var(--st-accent); }
.day-chip.on span { color: #ffd38a; } .day-chip.on span i { color: #8fc7ff; }
.mode-tab.on::after, .tab-ink::before { background: var(--st-accent); }
.tabbar button.on svg { color: var(--st-accent); }

.play-main, .play-main.is-playing { background: var(--st-accent); color: #0b1a2a; }
.set-toggle input[type="checkbox"]:checked, .sheet .toggle input[type="checkbox"]:checked { background: var(--st-accent); }
.set-slider input[type="range"] { accent-color: var(--st-accent); }
/* Section heads: quiet labels, not colored bands */
.sec-head { background: transparent; color: #9ba1ac; border-top: 1px solid rgba(255, 255, 255, 0.07);
  font: 700 0.72rem/1 system-ui, sans-serif; letter-spacing: 0.1em; text-transform: uppercase; padding-top: 0.95rem; }
.stage, .mode-body, .stage .scale { background: #1c1e22; }
.mode-tabs, .status-bar { background: #202226; }
.stage .playback { background: #1a1c20; }
.set-group { background: #222429; border-color: rgba(255, 255, 255, 0.07); }
.fchip, .model-chip, #model-bar .model-chip { background: #26282d; border-color: rgba(255, 255, 255, 0.1); }
#model-bar.pill-row { background: transparent; }
.card, .hourly-chart, .day-card { background: #202226; border-color: rgba(255, 255, 255, 0.07); box-shadow: none; }
.now-card {
  background: radial-gradient(120% 90% at 100% 0%, rgba(62, 166, 255, 0.14), transparent 55%), linear-gradient(180deg, #25272c, #1e2024);
  border-color: rgba(255, 255, 255, 0.08);
}
.alert-banner { background: rgba(245, 179, 1, 0.12); border-color: rgba(245, 179, 1, 0.45); color: #ffe6a6; }
body.shell .sheet { background: rgba(30, 32, 37, 0.98); }

/* ---------------------------------------------------------------- Dec 1: friendlier menu,
   Layers & customize, centre-on-me. Own design; layout only follows the owner's brief. */
.menu-sec { margin: 0.2rem 0 0.9rem; }
.menu-sec-title { font: 700 0.72rem/1.2 system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: #9ba1ac; margin: 0 0 0.4rem 0.2rem; }
.menu-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; }
.menu-item { display: flex; align-items: center; gap: 0.6rem; min-height: 3.5rem; padding: 0.55rem 0.65rem; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.06);
  background: #26282d; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.menu-item:active { background: #30333a; }
.menu-item[hidden] { display: none; }
.menu-item .mi-ico { flex: 0 0 2.1rem; height: 2.1rem; border-radius: 10px; display: grid; place-items: center; background: var(--st-tone); color: var(--st-accent); }
.menu-item .mi-ico svg { width: 1.25rem; height: 1.25rem; }
.menu-item .mi-text { display: flex; flex-direction: column; min-width: 0; }
.menu-item .mi-text b { font-size: 0.9rem; font-weight: 650; }
.menu-item .mi-text small { font-size: 0.72rem; color: #a3a8b3; line-height: 1.25; margin-top: 1px; }
.menu-item[aria-pressed="true"] { border-color: var(--st-accent); }
/* Dec 5 (UI review): the switch sits on the RIGHT like every other settings list, and the "?"
   follows the title on its line (the flex column put it on a line of its own). */
.sheet .toggle { flex-direction: row-reverse; justify-content: space-between; }
.sheet .toggle .tg-text { display: block; flex: 1 1 auto; min-width: 0; font-weight: 600; }
.sheet .toggle .tg-text small { display: block; font-weight: 400; font-size: 0.76rem; color: #a3a8b3; margin-top: 1px; }
.sheet .toggle .tg-text .help-q { margin: -2px 0 0 0.35rem; }
.cust-link { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; width: 100%; margin: 0.2rem 0 0.5rem; padding: 0.75rem 0.9rem;
  border-radius: 12px; border: 1px solid rgba(62, 166, 255, 0.45); background: var(--st-tone); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.cust-link span:first-child { display: flex; flex-direction: column; }
.cust-link small { font-size: 0.76rem; color: #a3a8b3; margin-top: 2px; }
.cust-link span:last-child { font-size: 1.4rem; color: var(--st-accent); }
.fab-layers { color: var(--st-accent-ink); }
.fab.off-center { color: var(--st-accent); border-color: var(--st-accent); box-shadow: 0 0 0 2px rgba(62, 166, 255, 0.35), 0 6px 16px rgba(0, 0, 0, 0.45); }
/* You on the map: bigger, with a ring that reads on any radar colour. */
.you-mark { width: 30px; height: 30px; }
.you-dot { inset: 4px; border-width: 3.5px; box-shadow: 0 0 0 2px rgba(10, 20, 35, 0.75), 0 2px 8px rgba(0, 0, 0, 0.6); }
.you-pulse { inset: -14px; background: rgba(62, 166, 255, 0.28); }

/* Dec 1: radar product grid (thumbnails are real scans drawn on the phone) */
.prod-hint { margin: 0 0 6px; font-size: 0.74rem; color: #9aa3ad; }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-bottom: 6px; }
.prod-tile { display: flex; flex-direction: column; align-items: stretch; gap: 3px; padding: 4px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.10); background: rgba(255,255,255,0.04); color: #e7e9ec; text-align: left; cursor: pointer; }
.prod-tile .pt-img { width: 100%; aspect-ratio: 1 / 1; border-radius: 7px; background: #15171b; object-fit: cover; display: block; }
.prod-tile .pt-img:not([src]) { background: linear-gradient(90deg, #15171b, #1e2228, #15171b); background-size: 200% 100%; animation: pt-wait 1.4s linear infinite; }
@keyframes pt-wait { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.prod-tile .pt-name { font-size: 0.78rem; font-weight: 600; line-height: 1.15; }
.prod-tile .pt-time { font-size: 0.66rem; color: #9aa3ad; }
.prod-tile.on { border-color: var(--st-accent, #2b8ae6); box-shadow: 0 0 0 1px var(--st-accent, #2b8ae6) inset; }
.prod-tile.nodata .pt-img { opacity: 0.45; }
.prod-help-btn { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0 2px; padding: 6px 10px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14); background: transparent; color: #cfd6de; font-size: 0.8rem; }
.prod-help-btn .ph-i { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,0.14); font-weight: 700; font-size: 0.72rem; }
.prod-help { margin: 4px 0 8px; font-size: 0.8rem; line-height: 1.4; color: #cfd6de; }
.prod-help[hidden] { display: none; }

/* Dec 1: press-and-hold spot menu */
.pt-coords { margin: -4px 0 8px; font-size: 0.8rem; color: #9aa3ad; display: flex; align-items: center; gap: 8px; }
.text-btn.small { font-size: 0.78rem; padding: 2px 8px; }
.pt-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 10px; }
.pt-act { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05); color: #eef1f4; text-align: left; }
.pt-act b { font-size: 0.86rem; }
.pt-act small { font-size: 0.7rem; color: #9aa3ad; }
.pt-now { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pt-now > div { padding: 8px; border-radius: 10px; background: rgba(255,255,255,0.05); display: flex; flex-direction: column; gap: 2px; }
.pt-now small { font-size: 0.68rem; color: #9aa3ad; }
.pt-now b { font-size: 1rem; color: #fff; }
.pt-hourly { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.pt-hour { flex: 0 0 74px; display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 10px; background: rgba(255,255,255,0.05); font-size: 0.72rem; }
.pt-hour b { font-size: 0.95rem; }
.pt-hour span { color: #6fc3ff; }
.pt-hour em, .pt-hour i { font-style: normal; color: #9aa3ad; font-size: 0.66rem; line-height: 1.2; }
.pt-daily { display: flex; flex-direction: column; gap: 4px; }
.pt-day { display: grid; grid-template-columns: 7.5em 3.5em 1fr; gap: 8px; align-items: baseline; padding: 6px 8px; border-radius: 8px; background: rgba(255,255,255,0.04); font-size: 0.8rem; }
.pt-day.night { opacity: 0.78; }
.pt-day small { color: #9aa3ad; }
.pt-sound-pick { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 6px; }
.pt-sound-time { flex: 1 1 160px; display: flex; flex-direction: column; font-size: 0.78rem; }
.pt-skewt { min-height: 120px; border-radius: 10px; background: #0d1117; overflow: hidden; }
.pt-skewt .empty { padding: 12px; }
.pt-skewt canvas, .pt-skewt svg, .pt-skewt img { display: block; width: 100%; height: auto; }
.pt-indices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; }
.pt-indices > div { padding: 6px; border-radius: 8px; background: rgba(255,255,255,0.05); display: flex; flex-direction: column; font-size: 0.7rem; color: #9aa3ad; }
.pt-indices b { color: #fff; font-size: 0.9rem; }
.pt-radars { display: flex; flex-direction: column; gap: 4px; }

/* Dec 1: storm cell panel */
.cell-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.cell-row { padding: 8px; border-radius: 10px; background: rgba(255,255,255,0.05); display: flex; flex-direction: column; gap: 2px; }
.cell-row small { font-size: 0.68rem; color: #9aa3ad; }
.cell-row b { font-size: 0.95rem; color: #fff; }
.cell-row em { font-style: normal; font-size: 0.66rem; color: #9aa3ad; }
.cell-warn { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.cell-alert { padding: 8px 10px; border-radius: 10px; border-left: 4px solid #ffb84d; background: rgba(255,184,77,0.08); display: flex; flex-direction: column; }
.cell-alert.warn { border-left-color: #ff3d6e; background: rgba(255,61,110,0.12); }
.cell-alert small { color: #b9c0c8; font-size: 0.72rem; }

/* Dec 1: Storm Track tool */
.eta-tool { position: fixed; left: 10px; right: 64px; top: calc(env(safe-area-inset-top, 0px) + 92px); z-index: 22; padding: 10px 12px; border-radius: 14px; }
.eta-tool[hidden] { display: none; }
.eta-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.eta-head strong { font-size: 0.9rem; }
.eta-step { margin: 4px 0; font-size: 0.76rem; color: #b9c0c8; }
.eta-big { font-size: 1.05rem; font-weight: 700; color: #fff; margin: 2px 0; }
.eta-lines { font-size: 0.76rem; color: #cfd6de; display: flex; flex-direction: column; gap: 1px; }
.eta-manual { margin-top: 6px; }
.eta-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.eta-btns .mini:disabled { opacity: 0.4; }
.eta-key { margin: 6px 0 0; font-size: 0.68rem; color: #9aa3ad; display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; }
.eta-key > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.eta-key .k-auto, .eta-key .k-man { display: inline-block; width: 18px; height: 0; border-top: 3px solid #ff8d3a; }
.eta-key .k-man { border-top: 3px dashed #38d6ff; }

/* Dec 1: Snow mode */
.snow-panel { position: fixed; left: 10px; top: calc(var(--safe-top, env(safe-area-inset-top, 0px)) + 6.6rem); width: min(260px, calc(100vw - 84px)); z-index: 21; padding: 8px 10px; border-radius: 14px; font-size: 0.76rem;
  max-height: calc(100vh - var(--safe-top, 0px) - 6.6rem - 140px); overflow-y: auto; }   /* below the time box (it covered it, Dec 5) */
@media (min-width: 760px) { .snow-panel { top: calc(var(--safe-top, env(safe-area-inset-top, 0px)) + 1.9rem); max-height: calc(100vh - var(--safe-top, 0px) - 1.9rem - 140px); } }   /* wide: beside the centred time box */
.snow-panel .snow-note { margin: 0 0 6px; color: #ffd98a; font-size: .74rem; line-height: 1.3; }
.snow-panel[hidden] { display: none; }
.snow-head { display: flex; align-items: center; gap: 8px; }
.snow-head strong { font-size: 0.86rem; }
.snow-time { flex: 1; color: #9aa3ad; font-size: 0.7rem; }
.snow-body[hidden] { display: none; }
.snow-key { display: flex; flex-direction: column; gap: 3px; margin: 6px 0; }
.sk-row { display: grid; grid-template-columns: 7.6em repeat(3, 1fr); gap: 4px; align-items: center; }
.sk-row .sw { height: 10px; border-radius: 3px; display: block; }
.sk-lbl small { text-align: center; color: #9aa3ad; font-size: 0.62rem; }
/* same colours as models/snow.js PALETTE */
.sw.sn1 { background: rgb(190,225,255); } .sw.sn2 { background: rgb(110,170,255); } .sw.sn3 { background: rgb(40,90,255); }
.sw.ip1 { background: rgb(215,160,255); } .sw.ip2 { background: rgb(180,100,240); } .sw.ip3 { background: rgb(140,50,210); }
.sw.zr1 { background: rgb(255,150,190); } .sw.zr2 { background: rgb(255,90,150); } .sw.zr3 { background: rgb(220,30,100); }
.sw.ra1 { background: rgb(70,170,90); } .sw.ra2 { background: rgb(40,140,60); } .sw.ra3 { background: rgb(20,100,40); }
.sw.ha1 { background: rgb(255,210,70); } .sw.ha2 { background: rgb(255,170,30); } .sw.ha3 { background: rgb(255,120,0); }
.snow-here { margin: 4px 0; color: #e7e9ec; }
.snow-vec { margin: 2px 0; }
.snow-fc { margin-top: 6px; }
.snow-fc-head { display: flex; justify-content: space-between; align-items: baseline; }
.snow-fc-head small { color: #9aa3ad; }
.snow-fc input[type=range] { width: 100%; }
.snow-fc-total { margin: 2px 0 4px; font-weight: 600; }

/* Dec 1: thumb-sized targets for the new controls; the Storm Track card hides Snow mode's panel */
.eta-btns .mini, #pt-sound-model .mini { min-height: 44px; padding: 0.4rem 0.8rem; }
.text-btn.small, .prod-help-btn, .snow-head .text-btn, #eta-close,
#pane-spot .sp-head .text-btn, #sheet-cell .sheet-head .text-btn { min-height: 44px; min-width: 44px; }
#pt-radars .site-item, .snow-panel .toggle.snow-vec { min-height: 44px; }
body.eta-open .snow-panel { display: none; }
.sk-row span small { color: #8b95a1; font-size: 0.85em; }

/* Dec 1 (owner): every small button gets at least a 44 px touch area. Sheet "Done"
   buttons grow for real, with negative margins so the header keeps its height; the
   rest get an invisible touch area around them, so nothing looks different. */
.sheet-head [data-close], .sheet-head .text-btn { min-height: 44px; min-width: 44px; margin-top: -7px; margin-bottom: -7px; }
.mini, .fab, .icon-btn:not(.search-float), .link-btn, .site-row, .row-btn, .text-btn, .metric-chips button { position: relative; }
.mini::after, .fab::after, .icon-btn::after, .link-btn::after, .site-row::after, .row-btn::after, .text-btn::after,
.metric-chips button::after, .conn-pill::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: max(100%, 44px); transform: translate(-50%, -50%);
}

/* Dec 1 (owner 7:12): the full radar panel. A sticky header (station, product,
   scan time, LIVE, scan mode, angle, play), a 3-column grid of real product
   pictures, then overlays and settings, all in the one scrolling drawer. */
/* On a phone the open panel takes the lower three quarters of the screen; the map
   buttons, the timeline and the status line step aside (the header has play). */
@media (max-width: 959px) {
  body.shell.rp-open .mode-body { max-height: 72vh; }
  body.rp-open .fabs, body.rp-open .stage .playback, body.rp-open .stage .status-bar { display: none; }
}
.rp-head { position: sticky; top: 0; z-index: 3; background: #1c1e22; padding: 6px 10px 4px; border-bottom: 1px solid rgba(200, 205, 215, 0.12); }
.rp-top { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.rp-head .site-row { flex: 1 1 auto; min-width: 0; margin: 0; align-items: center; }
.rp-head .site-row-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-head .site-row-auto { display: none; }
.rp-scan { display: flex; flex-direction: column; gap: 1px; font-size: 0.8rem; color: #cfd6de; }
.rp-prod { font-weight: 700; color: #eef3f9; font-size: 0.9rem; }
.rp-vcp { color: #9aa3ad; font-size: 0.74rem; }
.rp-live { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 4px; background: #c62f3a; color: #fff; font-size: 0.66rem; letter-spacing: 0.06em; vertical-align: 1px; }
.rp-live[hidden] { display: none; }
.rp-actions { display: flex; gap: 4px; flex: 0 0 auto; }
.rp-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1px solid rgba(200, 205, 215, 0.16); background: #26292f; color: #e8eef6; }
.rp-btn svg { width: 22px; height: 22px; }
.rp-btn.is-playing { background: #1f8a4c; border-color: #1f8a4c; }
.rp-btn .rp-ic-pause, .rp-btn.is-playing .rp-ic-play { display: none; }
.rp-btn.is-playing .rp-ic-pause { display: inline; }
.rp-head .tilt-row { margin: 2px 0 0; padding: 0; }
.rp-head .tilt-row .mini { min-width: 52px; }
.rp-head .tilt-row > span { font-size: 0.8rem; color: #9aa3ad; }
.rp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 10px; }
.rp-grid .prod-tile .pt-name { overflow-wrap: anywhere; }
.rp-grid .prod-tile .pt-what { display: none; }
.rp-grid .prod-tile.nodata .pt-img { opacity: 0.9; }
.rp-grid .prod-tile.nodata .pt-time { color: #e0b46a; }
.rp-grid.as-list { grid-template-columns: minmax(0, 1fr); }
.rp-grid.as-list .prod-tile { display: grid; grid-template-columns: 72px minmax(0, 1fr); column-gap: 10px; row-gap: 2px; text-align: left; align-items: start; }
.rp-grid.as-list .prod-tile .pt-img { grid-row: 1 / span 3; width: 72px; }
.rp-grid.as-list .prod-tile .pt-what { display: block; font-size: 0.7rem; line-height: 1.3; color: #b9c1ca; }
.rp-thumb-stats { margin: 2px 10px 4px; font-size: 0.68rem; color: #8b95a1; min-height: 1em; }
.rp-na { margin: 6px 0 4px; font-size: 0.74rem; line-height: 1.35; color: #9aa3ad; }
#pane-radar > .rp-na { margin: 8px 10px 12px; }
.rp-fixed { font-weight: 700; color: #cfd6de; }
.rp-swatches .rp-sw { min-width: 44px; }
.rp-swatches .rp-sw i { display: block; width: 18px; height: 18px; margin: 0 auto; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.5); }
#pane-radar .set-row > span small { display: block; font-size: 0.72rem; color: #9aa3ad; font-weight: 400; }

.rp-help { margin: 0.2rem 0 0.4rem; font: 0.8rem/1.4 system-ui, sans-serif; color: #c7cfdb; }
.rp-help summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: #8fc8ff; font-weight: 700; }
.rp-help ul { margin: 0.2rem 0 0.4rem; padding-left: 1.1rem; }
.rp-help p { margin: 0.3rem 0; }
/* Favorite site star, vibrate option, icon legend (Dec 1, owner 8:49). */
.rp-fav.on { color: #ffd166; }
.rp-fav.on svg path { fill: currentColor; }
.site-fav { font-style: normal; color: #ffd166; }
.rp-icons-btn { width: 100%; text-align: left; margin: 0.3rem 0; }
.icon-key { display: grid; gap: 0.15rem; padding: 0 0.2rem 1rem; }
.ik-sec { margin: 0.7rem 0 0.2rem; font: 700 0.74rem/1.2 system-ui, sans-serif; letter-spacing: 0.06em; text-transform: uppercase; color: #8fa0b5; }
.ik-row { display: grid; grid-template-columns: 44px 1fr; gap: 0.6rem; align-items: center; min-height: 44px; font: 0.82rem/1.35 system-ui, sans-serif; color: #c7cfdb; }
.ik-row b { display: block; color: #eef3f9; font-size: 0.88rem; }
.ik-ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: #26292f; color: #e8eef6; font-style: normal; }
.ik-ic svg { width: 24px; height: 24px; }
.ik-cell { width: 14px; height: 14px; border-radius: 50%; background: #ff8d6b; border: 2px solid #5a2214; display: block; }
.ik-site { width: 10px; height: 10px; border-radius: 50%; background: #3ea6ff; display: block; }
.ik-ring { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #cfe3ff; display: block; }

/* Deploy8 (Dec 1, owner): the six map buttons are drawn at 44 px, and sit just inside the
   18 px edge-swipe strips so their whole touch area stays theirs and the strips still page. */
body.shell .page-map .search-float, body.shell .page-map .fabs .fab,
body.shell .stage .play-row #btn-step-back, body.shell .stage .play-row #btn-step-fwd { width: 44px; height: 44px; }
body.shell .stage .play-row #btn-play { width: 44px; height: 44px; }
@media (max-width: 959px) {
  body.shell .page-map .search-float, body.shell .page-map .fabs { right: 19px; }
  body.shell .stage .play-row { padding-left: 6px; }
}

/* Dec 3c (UI review): the time box and the search button sit below the dBZ bar instead of
   covering its middle numbers; the right-side map buttons are a little smaller and closer. */
.page-map .dbz-bar:not([hidden]) ~ .time-card { top: calc(var(--safe-top) + 1.25rem + 0.4rem); padding: 0.3rem 0.85rem 0.28rem; }
body:has(.dbz-bar:not([hidden])) .page-map .search-float { top: calc(var(--safe-top) + 1.25rem + 0.4rem); }
@media (max-width: 959px) {
  body.shell .page-map .search-float, body.shell .page-map .fabs .fab { width: 40px; height: 40px; }
  body.shell .page-map .fabs { gap: 6px; }
  body.shell .page-map .fabs .fab svg, body.shell .page-map .search-float svg { width: 20px; height: 20px; }
}
/* Home radar card: a bigger scope picture. */
.radar-thumb { flex-basis: 88px; width: 88px; height: 88px; background: radial-gradient(circle at 50% 50%, #142233 0%, #0b1119 75%); }

/* ===================================================================== Big screens (Dec 3)
   Radar first: the map fills the window under a top bar (Radar, Satellite, Outlooks, Snow,
   Forecast, Hourly, search, alerts, settings). Forecast, Hourly and Settings float over the
   map as a panel on the left; the radar panel stays on the right. Phones are unchanged. */
/* Top bar parts (shown on big screens, and slim on the phone map, below). */
.topbar {
  display: none; align-items: center; gap: 14px;
  position: fixed; top: 0; left: 0; right: 0; height: var(--top-h); z-index: 70;
  padding: 0 14px 0 16px;
  background: rgba(20, 22, 26, 0.97); border-bottom: 1px solid rgba(200, 205, 215, 0.12);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}
.tb-brand { display: flex; align-items: center; gap: 9px; color: #f2f3f5; text-decoration: none; font: 600 1.08rem/1 system-ui, sans-serif; letter-spacing: 0.01em; flex: none; }
.tb-brand img { width: 30px; height: 30px; border-radius: 8px; }
.tb-brand b { color: var(--st-accent); font-weight: 800; }
.tb-nav { display: flex; align-items: center; gap: 4px; margin-left: 10px; min-width: 0; }   /* never runs under the search box: tbFit (16d) steps the labels down */
.tb-nav button, .tb-right button {
  appearance: none; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px;
  border: 1px solid transparent; border-radius: 10px; background: none; color: #c9ced6;
  font: 600 0.88rem system-ui, sans-serif; cursor: pointer; white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.topbar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tb-nav button:hover, .tb-right button:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.tb-nav button.on { background: var(--st-tone); border-color: rgba(62, 166, 255, 0.55); color: var(--st-accent-ink); }
.tb-nav button.on svg { color: var(--st-accent); }
.tb-nav button:focus-visible, .tb-right button:focus-visible, .tb-menu button:focus-visible { outline: 2px solid var(--st-accent); outline-offset: 1px; }
.tb-nav button.tb-dot { position: relative; }
.tb-nav button.tb-dot::after { content: ""; position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--st-accent); }   /* an outlook layer is on */
.tb-sep { width: 1px; height: 24px; background: rgba(200, 205, 215, 0.16); margin: 0 6px; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tb-search { display: flex; align-items: center; gap: 8px; width: 300px; height: 38px; padding: 0 12px; border-radius: 10px; cursor: text;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(200, 205, 215, 0.14); color: #9ba1ac; }
.tb-search:focus-within { border-color: rgba(62, 166, 255, 0.7); background: rgba(255, 255, 255, 0.09); color: var(--st-accent); }
#tb-search-slot { flex: 1; min-width: 0; display: flex; }
#tb-search-slot input { all: unset; flex: 1; min-width: 0; color: #f2f3f5; font: 500 0.88rem system-ui, sans-serif; user-select: text; }
#tb-search-slot input::placeholder { color: #8c929c; }
.tb-right .tb-icon.on { border-color: rgba(62, 166, 255, 0.55); color: #fff; }
.tb-right .tb-alerts { color: #f5b301; border-color: rgba(245, 179, 1, 0.45); background: rgba(245, 179, 1, 0.1); }
.tb-right .tb-alerts[hidden] { display: none; }
.tb-right .tb-icon { width: 38px; padding: 0; justify-content: center; }
.tb-menu { position: fixed; top: calc(var(--top-h) + 6px); z-index: 71; width: 300px; padding: 6px; border-radius: 14px;
  background: rgba(26, 28, 33, 0.98); border: 1px solid rgba(200, 205, 215, 0.16); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); }
.tb-menu[hidden] { display: none; }
.tb-menu button { appearance: none; display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px; border: 0; border-radius: 10px;
  background: none; color: #f2f3f5; text-align: left; cursor: pointer; font: inherit; }
.tb-menu button:hover { background: rgba(255, 255, 255, 0.06); }
.tb-menu img { width: 52px; height: 40px; object-fit: cover; border-radius: 7px; flex: none; }
.tb-menu span { flex: 1; display: flex; flex-direction: column; }
.tb-menu b { font-size: 0.86rem; } .tb-menu small { color: #9ba1ac; font-size: 0.74rem; }
.tb-menu i { width: 34px; height: 20px; border-radius: 10px; background: rgba(255, 255, 255, 0.16); position: relative; flex: none; transition: background 0.15s; }
.tb-menu i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.tb-menu button.on i { background: var(--st-accent); }
.tb-menu button.on i::after { transform: translateX(14px); }

@media (min-width: 1024px) {
  :root { --top-h: 58px; --tab-h: 0px; }
  .topbar { display: flex; }

  /* The map is the page; the other pages float over it. */
  .tabbar { display: none; }
  .pager { top: var(--top-h); bottom: 0; display: block; overflow: hidden; scroll-snap-type: none; }
  .page { position: absolute; }
  .page-map { inset: 0; width: auto; height: auto; }
  .edge-swipe { display: none; }
  .page:not(.page-map) {
    display: none; z-index: 45; left: 14px; top: 14px; bottom: 14px; width: 430px; height: auto;
    border-radius: 18px; background: rgba(24, 26, 30, 0.97); border: 1px solid rgba(200, 205, 215, 0.14);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  }
  body[data-page="home"] .page-home, body[data-page="hourly"] .page-hourly, body[data-page="outlook"] .page-outlook, body[data-page="settings"] .page-settings { display: block; }
  .page:not(.page-map) .page-scroll { padding-top: 1rem; }
  .page:not(.page-map) .page-scroll > * { max-width: none; }
  /* The map controls the top bar now has. */
  body.desk #btn-search { display: none; }
  /* Things on the map's left move out of the way of an open page panel. */
  body.desk:not([data-page="map"]) .time-card { left: calc(430px + 2rem); }
  /* Sheets (alert window, menus, layers...) float as a card, not across the whole width. */
  body.desk .sheet { left: 14px; right: auto; width: 440px; bottom: 14px; top: auto; max-height: calc(100vh - var(--top-h) - 28px); border-radius: 18px; }
  /* Tall sheets hang from below the top bar and are as tall as what is in them (Dec 5 UI
     review: Layers, Menu, Radar archive, Report a problem stretched to the bottom, half empty). */
  body.desk .sheet.sheet-tall { top: calc(var(--top-h) + 14px); bottom: auto; height: auto; }
  /* The "Welcome" Home panel (no place yet) is short: size the panel to it. */
  body.desk.noplace[data-page="home"] .page-home { bottom: auto; contain: layout paint; }
  body.desk.noplace[data-page="home"] .page-home .page-scroll { height: auto; max-height: calc(100vh - var(--top-h) - 28px); }
  body.desk #search-panel { position: fixed; top: calc(var(--top-h) + 6px); right: 62px; left: auto; width: 360px; z-index: 72; border-radius: 14px;
    max-height: calc(100vh - var(--top-h) - 30px); overflow-y: auto; }
  /* Page panels: room for the header pills. */
  .page:not(.page-map) .page-head { flex-wrap: wrap; row-gap: 6px; }
  /* A sheet keeps the map readable behind it. */
  body.desk .backdrop { background: rgba(0, 0, 0, 0.18); }
  /* B194 (Dec 5): the sounding (Skew-T + hodograph) was squeezed into the 400 px panel. While it
     is open the spot panel widens (the charts redraw at the new width, 12-snow-winter.js
     drawSounding) and the map buttons move with it. */
  body.desk.spot-on .page-map .stage:has(#pt-sounding:not([hidden])) { width: min(680px, calc(100vw - 340px)); }
  body.desk.spot-on .page-map:has(#pt-sounding:not([hidden])) .fabs,
  body.desk.spot-on .page-map:has(#pt-sounding:not([hidden])) .search-float,
  body.desk.spot-on .page-map:has(#pt-sounding:not([hidden])) .alert-float { right: calc(min(680px, calc(100vw - 340px)) + 2rem); }
}
/* (B105 used fixed "max-width: 1379px" / 1599px media steps; they failed whenever the alerts
   button showed. Replaced Dec 5 by measuring.) Narrower big screens: tbFit (16d-topbar.js) adds these steps one by one until the last
   button clears the search box, measured (the alerts button and fonts change the room).
   1: page names off; 2: every name off (icons, names in the tooltips and for screen readers);
   3: smaller search; 4: brand name off, smaller search; 5: tightest. */
.topbar.tb-fit1 .tb-nav [data-tb="home"] span, .topbar.tb-fit1 .tb-nav [data-tb="hourly"] span, .topbar.tb-fit1 .tb-nav [data-tb="outlook"] span { display: none; }
.topbar.tb-fit2 .tb-nav button span { display: none; }
.topbar.tb-fit2 .tb-nav button { padding: 0 10px; }
.topbar.tb-fit3 .tb-search { width: 220px; }
.topbar.tb-fit3 .tb-sep { margin: 0 2px; }
.topbar.tb-fit4 .tb-brand span { display: none; }
.topbar.tb-fit4 .tb-search { width: 196px; }
.topbar.tb-fit4 .tb-nav button { padding: 0 9px; }
/* 5: tightest (1024 px with the alerts button): shorter placeholder "Town or ZIP" (set by tbFit). */
.topbar.tb-fit5 { gap: 8px; padding: 0 10px; }
.topbar.tb-fit5 .tb-nav { gap: 2px; margin-left: 4px; }
.topbar.tb-fit5 .tb-nav button { padding: 0 8px; }
.topbar.tb-fit5 .tb-sep { display: none; }
.topbar.tb-fit5 .tb-search { width: 150px; }
.topbar.tb-fit5 .tb-right { gap: 6px; }

/* ===================================================================== Phone top bar (Dec 3, owner)
   The same map buttons as the website's top bar, slim, on the phone's map page only:
   Radar, Satellite, Outlooks, Snow, Tornado. It scrolls sideways if a phone is too narrow.
   --safe-top grows by the bar's height so everything at the top of the map moves down. */
@media (max-width: 1023.98px) {
  body.shell[data-page="map"] { --top-h: calc(env(safe-area-inset-top, 0px) + 44px); --safe-top: var(--top-h); }
  body.shell[data-page="map"] .topbar {
    display: flex; height: var(--top-h); padding: env(safe-area-inset-top, 0px) 4px 0; gap: 0;
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
  }
  body.shell[data-page="map"] .topbar::-webkit-scrollbar { display: none; }
  .topbar .tb-brand, .topbar .tb-sep, .topbar .tb-right, .topbar [data-tb="home"], .topbar [data-tb="hourly"], .topbar [data-tb="outlook"] { display: none; }
  .tb-nav { margin: 0 auto; gap: 2px; flex: none; }
  .tb-nav button { height: 34px; padding: 0 9px; gap: 5px; font-size: 0.8rem; border-radius: 9px; }
  .topbar svg { width: 16px; height: 16px; }
  .tb-menu { width: min(300px, calc(100vw - 16px)); }
  /* Dec 4 (owner, phone browser): a tall sheet (the "What the map shows" menu) slid up under the top
     bar, which hid its Done button - there was no way out. Sheets now stop below the top bar
     (dvh = the screen actually visible between the browser's own bars) and the header stays put. */
  body.shell[data-page="map"] .sheet { max-height: calc(100vh - var(--top-h) - 10px); max-height: calc(100dvh - var(--top-h) - 10px); }
  body.shell[data-page="map"] .sheet.sheet-tall { max-height: calc(100vh - var(--top-h) - 10px); max-height: min(86dvh, calc(100dvh - var(--top-h) - 10px)); }
  /* Layers: one fixed height, so the group tabs stay under the finger when the group changes. */
  body.shell[data-page="map"] #sheet-layers { height: calc(100vh - var(--top-h) - 10px); height: min(86dvh, calc(100dvh - var(--top-h) - 10px)); }
}
/* Sheet headers (title + Done/Close) stay visible while the sheet scrolls. */
body.shell .sheet > .sheet-head { position: sticky; top: -0.35rem; z-index: 2; margin-left: -0.9rem; margin-right: -0.9rem;
  padding: 0.45rem 0.9rem; background: inherit; background-color: rgba(16, 20, 27, 0.98); }
@media (max-width: 479.98px) {
  .tb-nav button { padding: 0 8px; font-size: 0.78rem; }
  .topbar svg { display: none; }
}
.snow-x { margin-left: 4px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 1.1rem; line-height: 1; cursor: pointer; }

/* ===================================================================== Dec 5 UI review
   Phones: in Satellite Mode the tray's top row held only the round close arrow (the product
   button is hidden there) - an empty 50 px row; the "Close" handle on the tray's edge does that job. */
@media (max-width: 1023.98px) {
  body.shell.sat-mode-on .page-map .stage:not(.collapsed) .mode-tabs { display: none; }
}
/* Phones turned sideways (short screens): the map buttons make a second column instead of
   running down over the folded bar's arrows, and the open tray is a side panel on the right
   (it was a 105 px scroll box for 4,000+ px of content, covering the map buttons). */
@media (max-width: 1023.98px) and (orientation: landscape) and (max-height: 540px) {
  body.shell .page-map .fabs { display: grid; grid-auto-flow: column; grid-template-rows: repeat(3, 40px); direction: rtl; gap: 6px; }
  body.shell .page-map .fabs > * { direction: ltr; }
  body.shell .page-map .fabs > [hidden] { display: none; }
  body.shell .page-map .stage:not(.collapsed) {
    left: auto; right: calc(env(safe-area-inset-right, 0px) + 8px); top: calc(var(--safe-top) + 6px); bottom: 6px;
    width: min(390px, 50vw); max-height: none; flex-direction: column;
    border: 1px solid rgba(200, 205, 215, 0.16); border-radius: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  }
  body.shell .page-map .stage:not(.collapsed) .mode-body { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; }
  body.shell .page-map .stage:not(.collapsed) .stage-grip { display: none; }
  body.shell.sat-mode-on .page-map .stage:not(.collapsed) .mode-tabs { display: flex; }   /* its close arrow is the way out here */
  /* The map buttons move left of the open side panel. */
  body.shell .page-map:has(.stage:not(.collapsed)) .fabs,
  body.shell .page-map:has(.stage:not(.collapsed)) .search-float { right: calc(min(390px, 50vw) + 18px); }
  body.shell .page-map:has(.stage:not(.collapsed)) .time-card { left: calc(env(safe-area-inset-left, 0px) + 12px); right: auto; transform: none; }
}
/* B193 (Dec 5): sideways phones / small tablets 960-1023 px wide keep the drawer open (min-width
   960 rule) as a right-hand panel from top: 1rem - its top row ("Map shows" + close) sat under
   the phone top bar and colour bar, and the map buttons were spaced for the 400 px drawer. */
@media (min-width: 960px) and (max-width: 1023.98px) and (orientation: landscape) and (max-height: 540px) {
  body.shell .page-map .stage { top: calc(var(--safe-top) + 1.25rem + 6px); bottom: 6px; max-height: none; }
  body.shell .page-map .fabs { top: calc(var(--safe-top) + 1.25rem + 3.4rem); }
  body.shell .page-map .stage .stage-grip { display: none; }   /* the drawer cannot fold at this width; the grip sat under the colour bar */
}
@media (max-width: 1023.98px) and (orientation: landscape) and (max-height: 380px) {
  body.shell .page-map .fabs { grid-template-rows: repeat(2, 40px); }
}

/* Dec 5 UI review: hover (mouse) and keyboard focus on everything you can press, subtle. */
@media (hover: hover) and (pointer: fine) {
  body.shell .menu-item:hover, body.shell .lg-preset:hover, body.shell .cust-link:hover { background: #2e3137; }
  body.shell .pm-tile:hover, body.shell .prod-tile:hover, body.shell .sat-card:hover, body.shell .sm-prod:hover, body.shell .rp-prod:hover { filter: brightness(1.12); }
  body.shell .rep-chip:not(.on):hover, body.shell .olp-chip:hover, body.shell .day-chip:not(.on):hover, body.shell .fchip:not(.on):hover { background: rgba(255, 255, 255, 0.1); }
  body.shell button.card:hover, body.shell .radar-card:hover, body.shell .alert-card:hover, body.shell .place-row:hover, body.shell .pt-act:hover, body.shell .aw-act:hover { background: #26292f; }
  body.shell .mini:not(.on):hover, body.shell .icon-btn:hover, body.shell .text-btn:hover { filter: brightness(1.18); }
  body.shell .help-q:hover { background: rgba(124, 200, 255, 0.28); color: #fff; }
}
body.shell button:focus-visible, body.shell [role="button"]:focus-visible, body.shell a:focus-visible, body.shell [role="tab"]:focus-visible,
body.shell select:focus-visible, body.shell textarea:focus-visible, body.shell input[type="checkbox"]:focus-visible, body.shell input[type="range"]:focus-visible,
body.shell [tabindex]:not([tabindex="-1"]):focus-visible { outline: 2px solid var(--st-accent); outline-offset: 2px; }
body.shell .fab:focus-visible { outline-offset: 3px; }
/* The open tray named the map four times ("Map shows Nationwide radar", the Nationwide tile, the
   status row "USA Every radar / Nationwide radar", the play row): the status row repeats the
   "Map shows" button above it, so it goes while that button is there (Dec 5 UI review). */
body.shell .stage:has(#prod-pick:not([hidden])) .status-bar { display: none; }
/* Road cameras (Dec 5, 16s-cameras.js): picture card + nearby list. */
#sheet-cam .cam-pic { position: relative; min-height: 120px; border-radius: 10px; overflow: hidden; background: rgba(127,127,127,.14); }
#sheet-cam #cam-img { display: block; width: 100%; height: auto; max-height: 46vh; object-fit: contain; background: #000; }
#sheet-cam #cam-img:not([src]) { display: none; }
#sheet-cam #cam-img.loading { opacity: .45; }
#sheet-cam #cam-msg { margin: 0; padding: 14px; }
#sheet-cam .cam-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0 4px; }
#sheet-cam .cam-near { display: flex; flex-direction: column; gap: 4px; }
#sheet-cam .cam-row { display: flex; justify-content: space-between; gap: 10px; text-align: left; padding: 9px 10px; border-radius: 8px;
  border: 0; background: rgba(127,127,127,.12); color: inherit; font: inherit; cursor: pointer; }
#sheet-cam .cam-row small { opacity: .75; white-space: nowrap; }
#sheet-cam .cam-row:focus-visible, #cams-nearest:focus-visible { outline: 2px solid #3ea6ff; outline-offset: 2px; }
.cams-nearest { margin: -2px 0 8px 52px; }
.cams-nearest[hidden] { display: none; }

/* B360: Home's calm severe storm risk line (SPC day 1, Marginal or higher); tap opens the Outlook page. */
.home-risk { display: flex; align-items: center; gap: 0.5rem; width: 100%; margin: 0; padding: 0.65rem 0.9rem; border-radius: 18px; appearance: none;
  border: 1px solid rgba(255, 196, 92, 0.35); background: rgba(255, 196, 92, 0.08); color: #ffe2a8; font: 600 0.88rem/1.3 system-ui, sans-serif;
  text-align: left; cursor: pointer; }
.home-risk::after { content: "›"; margin-left: auto; padding-left: 0.4rem; color: #c9a76a; font-size: 1.1rem; }
.home-risk[data-level="2"] { border-color: rgba(120, 200, 120, 0.35); background: rgba(120, 200, 120, 0.08); color: #c9efc4; }
.home-risk[data-level="2"]::after { color: #8cc489; }
.home-risk[hidden] { display: none; }
/* B362: Larger text (html.ts-big): Hourly rows wrap instead of running together or cutting words. */
html.ts-big .ro-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 0.5rem; }
html.ts-big .ro-grid b { white-space: normal; overflow-wrap: anywhere; }
html.ts-big .hl-row, html.ts-big .dc-hours .hl-row { grid-template-columns: max-content 1.4rem max-content minmax(0, 1fr) max-content; gap: 0.35rem; }
html.ts-big .dc-hours .hl-row .d { white-space: normal; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-height: 1.2; }
html.ts-big .hl-row .x small { display: block; white-space: normal; max-width: 4.4rem; margin-left: auto; }
html.ts-big .day-card > summary { grid-template-columns: max-content 1.6rem minmax(0, 1fr) max-content; gap: 0.4rem; padding: 0.7rem 0.7rem; }
html.ts-big .dc-temp i { display: block; margin: 0.15rem 0 0; }
/* ...and the open radar tray leaves about half the map (it took almost all of it at Larger). */
@media (max-width: 1023px) {
  html.ts-big body.shell:not(.ol-on):not(.rep-on):not(.chase-on) .page-map .stage:not(.collapsed) { max-height: 55%; }
}

/* B391: Outlooks drop-down, last row opens the full Outlook view. */
.tb-menu .tb-full { margin-top: 4px; border-top: 1px solid rgba(200, 205, 215, 0.12); border-radius: 0 0 10px 10px; padding: 9px 7px 7px; }
.tb-menu .tb-full svg { width: 18px; height: 18px; flex: none; color: #9ba1ac; }
