/* ═══════════════════════════════════════════════════════════════
   Local Forecast — broadcast display

   90s weather-channel look: deep gradients, heavy type with hard
   drop shadows, beveled panels, scanlines, CRT vignette, crawl.

   Every size is expressed in var(--u), a single scaling unit tied to
   the stage. In landscape it tracks stage height; in portrait it
   tracks width, so the phone layout stays readable instead of
   shrinking into a letterboxed strip.
   ═══════════════════════════════════════════════════════════════ */

:root {
    --sky-1: #0d3fa8;
    --sky-2: #072a70;
    --sky-3: #03153f;
    --panel-1: #1450b8;
    --panel-2: #0a2a6e;
    --bevel-l: #4f9fe8;
    --bevel-d: #051a45;
    --gold: #ffd23f;
    --cyan: #7fe3ff;
    --ink: #ffffff;
    --alert: #d81f2a;
    --alert-2: #7d0f16;

    --sans: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
    --ds: 0.085em 0.085em 0 rgba(0, 0, 0, .72);
}

/* Time-of-day palettes — the screen shifts as the sun moves. */
:root[data-phase="day"]   { --sky-1: #1050c4; --sky-2: #0a3183; --sky-3: #04184a; }
:root[data-phase="dawn"]  { --sky-1: #9a5a2e; --sky-2: #4a2a63; --sky-3: #06183f; --gold: #ffd98a; }
:root[data-phase="dusk"]  { --sky-1: #b2532c; --sky-2: #48245c; --sky-3: #05123a; --gold: #ffc46a; }
:root[data-phase="night"] { --sky-1: #0a2456; --sky-2: #051636; --sky-3: #020a1f; --cyan: #6fc9e8; }

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; background: #000; overflow: hidden; }
body { font-family: var(--sans); color: var(--ink); -webkit-font-smoothing: antialiased; }

/* ── Boot card ────────────────────────────────────────────────── */

.boot {
    position: fixed; inset: 0; z-index: 200;
    display: grid; place-items: center; padding: 5vmin;
    background:
        radial-gradient(900px 600px at 50% 30%, rgba(20, 80, 184, .5), transparent 70%),
        linear-gradient(170deg, var(--sky-3), #01091f);
    transition: opacity .6s ease, visibility .6s;
    overflow-y: auto;
}
.boot.gone { opacity: 0; visibility: hidden; }
.boot-card { max-width: 620px; text-align: center; }
.boot-kicker {
    font-family: var(--mono); font-size: clamp(10px, 1.5vw, 13px);
    letter-spacing: .26em; text-transform: uppercase; color: var(--cyan); margin-bottom: 16px;
}
.boot-title {
    font-size: clamp(32px, 7vw, 68px); font-weight: 800; line-height: .98;
    letter-spacing: -.02em; text-shadow: 3px 3px 0 rgba(0, 0, 0, .5); margin-bottom: 18px;
}
.boot-title span { color: var(--gold); }
.boot-copy {
    font-size: clamp(13px, 2vw, 16px); line-height: 1.7;
    color: rgba(255, 255, 255, .74); margin-bottom: 24px;
}
.boot-field {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    font-family: var(--mono); font-size: 12px; letter-spacing: .14em;
    text-transform: uppercase; color: var(--cyan); margin-bottom: 22px;
}
.boot-field select, .ctl-select {
    font-family: var(--mono); font-size: 12px; color: #04173f;
    background: var(--cyan); border: none; border-radius: 100px;
    padding: 8px 14px; cursor: pointer;
}
.boot-btn {
    font-family: var(--sans); font-size: clamp(14px, 2.2vw, 18px); font-weight: 700;
    color: #04173f; background: linear-gradient(180deg, #ffe9a3, var(--gold));
    border: none; border-radius: 100px; padding: 16px 34px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 12px;
    box-shadow: 0 10px 30px -10px rgba(255, 210, 63, .7);
    transition: transform .22s cubic-bezier(.19,1,.22,1), box-shadow .22s;
}
.boot-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px rgba(255, 210, 63, .8); }
.boot-btn-icon { font-size: .85em; }
.boot-note {
    margin-top: 16px; font-family: var(--mono); font-size: 11px;
    letter-spacing: .06em; color: rgba(255, 255, 255, .45);
}

/* ── Stage ────────────────────────────────────────────────────── */

.shell { height: 100vh; display: grid; place-items: center; background: #000; }

.stage {
    position: relative;
    width: min(100vw, calc(100vh * 16 / 9));
    aspect-ratio: 16 / 9;
    container-type: size;
    overflow: hidden;
    background: linear-gradient(178deg, var(--sky-1) 0%, var(--sky-2) 52%, var(--sky-3) 100%);
    display: grid;
    grid-template-rows: auto 1fr auto;
    --u: 1cqh;
    transition: background .8s linear;
}

.crt {
    position: absolute; inset: 0; z-index: 50; pointer-events: none;
    background: radial-gradient(120% 100% at 50% 50%, transparent 52%, rgba(0, 0, 0, .55) 100%);
}
.scanlines {
    position: absolute; inset: 0; z-index: 51; pointer-events: none; opacity: .2;
    background: repeating-linear-gradient(to bottom,
        rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,.28) 3px, rgba(0,0,0,.28) 4px);
}

/* ── Header bar ───────────────────────────────────────────────── */

.bar {
    position: relative; z-index: 10;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    gap: 2cqw; padding: calc(1.6 * var(--u)) 2.4cqw;
    background: linear-gradient(180deg, rgba(4,20,60,.85), rgba(4,20,60,.45));
    border-bottom: calc(.35 * var(--u)) solid var(--gold);
}
.bar-left { display: flex; align-items: center; gap: 1.2cqw; min-width: 0; }
.bar-mark {
    width: calc(1.6 * var(--u)); height: calc(1.6 * var(--u)); border-radius: 50%;
    background: var(--gold); animation: pip 2.2s ease-out infinite; flex-shrink: 0;
}
@keyframes pip {
    0%   { box-shadow: 0 0 0 0 rgba(255,210,63,.7); }
    70%  { box-shadow: 0 0 0 calc(1.6 * var(--u)) rgba(255,210,63,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,210,63,0); }
}
.bar-place {
    font-family: var(--mono); font-size: calc(2.1 * var(--u)); font-weight: 600;
    letter-spacing: .16em; color: var(--cyan); text-shadow: var(--ds);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bar-mid {
    font-size: calc(2.4 * var(--u)); font-weight: 800; letter-spacing: .18em;
    text-transform: uppercase; text-shadow: var(--ds); white-space: nowrap;
}
.bar-mid span { color: var(--cyan); font-weight: 600; }
.bar-right {
    justify-self: end; display: flex; align-items: baseline; gap: 1.2cqw;
    font-family: var(--mono); text-shadow: var(--ds);
}
.bar-clock { font-size: calc(2.6 * var(--u)); font-weight: 600; color: var(--gold); }
.bar-date  { font-size: calc(1.7 * var(--u)); color: rgba(255,255,255,.7); letter-spacing: .08em; }
.bar-stale {
    font-size: calc(1.5 * var(--u)); letter-spacing: .1em;
    padding: calc(.3 * var(--u)) calc(.9 * var(--u));
    border-radius: 100px; border: 1px solid transparent; white-space: nowrap;
}
.bar-stale[data-state="ok"]   { color: rgba(255,255,255,.5); }
.bar-stale[data-state="warn"] { color: #04173f; background: var(--gold); }
.bar-stale[data-state="bad"]  { color: #fff; background: var(--alert); }

/* ── Panels ───────────────────────────────────────────────────── */

.panels { position: relative; overflow: hidden; }
.panel {
    position: absolute; inset: 0;
    padding: calc(3.4 * var(--u)) 3.6cqw;
    display: flex; flex-direction: column;
    opacity: 0; visibility: hidden; transform: translateX(6%);
    transition: opacity .5s ease, transform .6s cubic-bezier(.19,1,.22,1), visibility .6s;
}
.panel.on  { opacity: 1; visibility: visible; transform: none; }
.panel.out { opacity: 0; transform: translateX(-6%); }

.panel-head {
    font-size: calc(3.6 * var(--u)); font-weight: 800; letter-spacing: .12em;
    text-transform: uppercase; color: var(--gold); text-shadow: var(--ds);
    margin-bottom: calc(2.2 * var(--u)); padding-bottom: calc(1.1 * var(--u));
    border-bottom: calc(.3 * var(--u)) solid rgba(127,227,255,.35);
    flex-shrink: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 2cqw;
}
.head-note {
    font-family: var(--mono); font-size: calc(1.9 * var(--u)); font-weight: 500;
    letter-spacing: .1em; color: var(--cyan); text-transform: none;
}

.bevel, .cur-metrics > div, .fc-col, .alm-cell, .bay-cell, .bay-tides {
    background: linear-gradient(180deg, var(--panel-1), var(--panel-2));
    border-top: calc(.3 * var(--u)) solid var(--bevel-l);
    border-left: calc(.3 * var(--u)) solid var(--bevel-l);
    border-right: calc(.3 * var(--u)) solid var(--bevel-d);
    border-bottom: calc(.3 * var(--u)) solid var(--bevel-d);
}

/* ── Title card ───────────────────────────────────────────────── */

.panel-intro { align-items: center; justify-content: center; text-align: center; }
.intro-mark { margin-bottom: calc(2.5 * var(--u)); color: var(--cyan); }
.intro-mark svg { width: calc(15 * var(--u)); height: calc(15 * var(--u)); }
.intro-head {
    font-size: calc(9 * var(--u)); font-weight: 800; line-height: .96; letter-spacing: -.02em;
    text-shadow: 0.16em 0.16em 0 rgba(0,0,0,.5); margin-bottom: calc(3 * var(--u));
}
.intro-strip {
    font-family: var(--mono); font-size: calc(1.9 * var(--u)); letter-spacing: .14em;
    text-transform: uppercase; color: #04173f; background: var(--gold);
    padding: calc(.9 * var(--u)) 2.6cqw; display: inline-block;
}

/* ── Current conditions ───────────────────────────────────────── */

.cur-grid {
    flex: 1; display: grid; grid-template-columns: 1.05fr 1fr;
    gap: 3cqw; align-items: center; min-height: 0;
}
.cur-main { text-align: center; }
.cur-icon { color: var(--cyan); margin-bottom: calc(1 * var(--u)); }
.cur-icon svg { width: calc(12 * var(--u)); height: calc(12 * var(--u)); }
.cur-temp {
    font-size: calc(19 * var(--u)); font-weight: 800; line-height: .88;
    letter-spacing: -.04em; text-shadow: 0.12em 0.12em 0 rgba(0,0,0,.45);
}
.cur-temp span { color: var(--gold); }
.cur-cond {
    font-size: calc(3.2 * var(--u)); font-weight: 700; letter-spacing: .04em;
    color: var(--cyan); text-shadow: var(--ds); margin-top: calc(.6 * var(--u));
}
.cur-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: calc(1.5 * var(--u)) 1.6cqw; }
.cur-metrics > div { padding: calc(1.7 * var(--u)) 1.6cqw; }
.cur-metrics dt {
    font-family: var(--mono); font-size: calc(1.5 * var(--u)); letter-spacing: .16em;
    text-transform: uppercase; color: var(--cyan); margin-bottom: calc(.4 * var(--u));
}
.cur-metrics dd { font-size: calc(4.2 * var(--u)); font-weight: 800; text-shadow: var(--ds); }

/* ── Radar ────────────────────────────────────────────────────── */

.radar-wrap {
    flex: 1; position: relative; min-height: 0;
    border-top: calc(.3 * var(--u)) solid var(--bevel-l);
    border-left: calc(.3 * var(--u)) solid var(--bevel-l);
    border-right: calc(.3 * var(--u)) solid var(--bevel-d);
    border-bottom: calc(.3 * var(--u)) solid var(--bevel-d);
    background: #03101f; overflow: hidden;
}
.radar-canvas { display: block; width: 100%; height: 100%; }
/* `hidden` must win over the display rule below, or the fallback shows
   on top of a perfectly good radar loop. */
.radar-fallback[hidden] { display: none; }
.radar-fallback {
    position: absolute; inset: 0; display: grid; place-items: center;
    font-family: var(--mono); font-size: calc(2.2 * var(--u));
    letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55);
}
.radar-legend {
    position: absolute; left: calc(1.4 * var(--u)); bottom: calc(1.4 * var(--u));
    display: flex; align-items: center; gap: calc(.8 * var(--u));
    background: rgba(3,16,31,.72); padding: calc(.6 * var(--u)) calc(1 * var(--u));
    border-radius: 4px;
}
.lg-label {
    font-family: var(--mono); font-size: calc(1.3 * var(--u));
    letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.7);
}
.lg-bar {
    width: calc(12 * var(--u)); height: calc(1 * var(--u)); border-radius: 2px;
    background: linear-gradient(90deg, #29b6f6, #66bb6a, #ffee58, #ef5350, #ab47bc);
}
.radar-credit {
    position: absolute; right: calc(1.4 * var(--u)); bottom: calc(1.4 * var(--u));
    font-family: var(--mono); font-size: calc(1.2 * var(--u));
    letter-spacing: .08em; color: rgba(255,255,255,.42);
}

/* ── Hourly ───────────────────────────────────────────────────── */

.hourly-wrap {
    flex: 1; min-height: 0;
    background: linear-gradient(180deg, rgba(20,80,184,.42), rgba(10,42,110,.28));
    border-top: calc(.3 * var(--u)) solid var(--bevel-l);
    border-left: calc(.3 * var(--u)) solid var(--bevel-l);
    border-right: calc(.3 * var(--u)) solid var(--bevel-d);
    border-bottom: calc(.3 * var(--u)) solid var(--bevel-d);
}
.hourly-canvas { display: block; width: 100%; height: 100%; }

/* ── Extended forecast ────────────────────────────────────────── */

.fc-row { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.2cqw; min-height: 0; }
.fc-col {
    padding: calc(1.6 * var(--u)) 1cqw; display: flex; flex-direction: column;
    align-items: center; text-align: center; gap: calc(.8 * var(--u));
}
.fc-day {
    font-family: var(--mono); font-size: calc(1.7 * var(--u)); font-weight: 600;
    letter-spacing: .1em; text-transform: uppercase; color: var(--gold);
    min-height: calc(3.6 * var(--u)); display: flex; align-items: center;
}
.fc-ico { color: var(--cyan); }
.fc-ico svg { width: calc(9 * var(--u)); height: calc(9 * var(--u)); }
.fc-t { font-size: calc(6.6 * var(--u)); font-weight: 800; text-shadow: var(--ds); line-height: 1; }
/* the night low, deliberately smaller and dimmer than the high */
.fc-lo {
    font-family: var(--mono); font-size: calc(2.4 * var(--u)); font-weight: 500;
    color: rgba(127,227,255,.78); line-height: 1;
}
.fc-s {
    font-size: calc(1.7 * var(--u)); font-weight: 500; line-height: 1.32;
    color: rgba(255,255,255,.86); display: flex; align-items: center; justify-content: center;
}
.fc-w {
    margin-top: auto; font-family: var(--mono); font-size: calc(1.45 * var(--u));
    letter-spacing: .06em; color: rgba(255,255,255,.6); text-transform: uppercase;
}
.fc-p {
    font-family: var(--mono); font-size: calc(1.6 * var(--u)); color: var(--cyan);
    letter-spacing: .06em; padding-top: calc(.7 * var(--u));
    border-top: 1px solid rgba(127,227,255,.28); width: 100%;
}

/* ── Forecast detail ──────────────────────────────────────────── */

.detail-inner {
    flex: 1; display: grid; grid-template-columns: auto 1fr;
    gap: 0 3.4cqw; align-items: center; min-height: 0;
}
.detail-icon { color: var(--cyan); }
.detail-icon svg { width: calc(18 * var(--u)); height: calc(18 * var(--u)); }
.detail-body { display: flex; flex-direction: column; gap: calc(1.6 * var(--u)); min-width: 0; }
.detail-when {
    font-size: calc(5.2 * var(--u)); font-weight: 800; letter-spacing: -.01em;
    color: var(--gold); text-shadow: 0.09em 0.09em 0 rgba(0,0,0,.5); line-height: 1.05;
}
.detail-text {
    font-size: calc(2.5 * var(--u)); line-height: 1.5;
    color: rgba(255,255,255,.92); max-width: 62ch;
}

/* ── Alert ────────────────────────────────────────────────────── */

.panel-alert { background: linear-gradient(172deg, var(--alert), var(--alert-2)); }
.alert-head { color: #fff; border-bottom-color: rgba(255,255,255,.5); }
.alert-inner {
    flex: 1; display: grid; grid-template-columns: auto 1fr;
    gap: 0 3.4cqw; align-items: center; min-height: 0;
}
.alert-glyph {
    width: calc(18 * var(--u)); height: calc(18 * var(--u));
    color: rgba(255,255,255,.5); filter: drop-shadow(0.06em 0.06em 0 rgba(0,0,0,.35));
}
.alert-body { display: flex; flex-direction: column; gap: calc(1.3 * var(--u)); min-width: 0; }
.alert-event {
    font-size: calc(6.4 * var(--u)); font-weight: 800; line-height: 1.02;
    letter-spacing: -.01em; text-shadow: 0.1em 0.1em 0 rgba(0,0,0,.45);
}
.alert-meta {
    font-family: var(--mono); font-size: calc(1.9 * var(--u)); letter-spacing: .14em;
    text-transform: uppercase; color: #ffd7d7;
}
.alert-rows { display: grid; gap: calc(.9 * var(--u)); }
.alert-row {
    display: grid; grid-template-columns: calc(13 * var(--u)) 1fr;
    gap: 0 1.6cqw; align-items: baseline;
    border-left: calc(.35 * var(--u)) solid rgba(255,255,255,.4);
    padding-left: 1.4cqw;
}
.alert-row dt {
    font-family: var(--mono); font-size: calc(1.6 * var(--u)); letter-spacing: .12em;
    text-transform: uppercase; color: #ffd7d7;
}
.alert-row dd { font-size: calc(2.1 * var(--u)); line-height: 1.45; color: rgba(255,255,255,.95); }

/* ── On the water ─────────────────────────────────────────────── */

.bay-grid {
    flex: 1; display: grid; grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1.5fr 1fr; gap: calc(1.5 * var(--u)) 1.4cqw; min-height: 0;
}
.bay-cell {
    padding: calc(1.8 * var(--u)) 1.4cqw;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; gap: calc(.7 * var(--u));
}
.bay-cell dt, .bay-tides dt {
    font-family: var(--mono); font-size: calc(1.5 * var(--u)); letter-spacing: .16em;
    text-transform: uppercase; color: var(--cyan);
}
.bay-cell dd { font-size: calc(6 * var(--u)); font-weight: 800; text-shadow: var(--ds); line-height: 1; }
.bay-tides {
    grid-column: 1 / -1; padding: calc(1.4 * var(--u)) 1.6cqw;
    display: flex; align-items: center; justify-content: space-between;
    gap: 2cqw; flex-wrap: wrap;
}
.tide-list { display: flex; gap: 2.2cqw; flex-wrap: wrap; }
.tide {
    font-family: var(--mono); font-size: calc(2 * var(--u));
    color: rgba(255,255,255,.9); white-space: nowrap;
}
.tide b { color: var(--gold); font-weight: 600; }
.tide i { color: rgba(127,227,255,.75); font-style: normal; }
.tide.past { opacity: .42; }

/* ── Almanac ──────────────────────────────────────────────────── */

.alm-grid {
    flex: 1; display: grid; grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 2.1fr 1fr; gap: calc(1.5 * var(--u)) 1.4cqw; min-height: 0;
}
.alm-cell {
    padding: calc(1.8 * var(--u)) 1.4cqw; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center; gap: calc(.7 * var(--u));
}
.alm-wide { grid-column: 1 / -1; flex-direction: row; gap: 2.4cqw; }
.alm-ico { width: calc(5.5 * var(--u)); height: calc(5.5 * var(--u)); color: var(--cyan); }
.alm-cell dt {
    font-family: var(--mono); font-size: calc(1.5 * var(--u)); letter-spacing: .16em;
    text-transform: uppercase; color: var(--cyan);
}
.alm-cell dd { font-size: calc(5 * var(--u)); font-weight: 800; text-shadow: var(--ds); line-height: 1; }
.alm-wide dd { font-size: calc(6 * var(--u)); }

/* ── Crawl ────────────────────────────────────────────────────── */

.crawl {
    position: relative; z-index: 10; display: flex; align-items: stretch;
    background: linear-gradient(180deg, rgba(4,20,60,.6), rgba(2,10,34,.95));
    border-top: calc(.35 * var(--u)) solid var(--gold);
    height: calc(8 * var(--u)); overflow: hidden;
}
.crawl-tag {
    flex-shrink: 0; display: flex; align-items: center; padding: 0 2cqw;
    background: var(--gold); color: #04173f; font-family: var(--mono);
    font-size: calc(1.9 * var(--u)); font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
}
.crawl-track { flex: 1; overflow: hidden; display: flex; align-items: center; }
.crawl-text {
    white-space: nowrap; font-size: calc(2.3 * var(--u)); font-weight: 600;
    letter-spacing: .04em; text-shadow: var(--ds);
    animation: crawl 48s linear infinite; will-change: transform;
}
@keyframes crawl { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.crawl-text .sep { color: var(--gold); margin: 0 1.6cqw; }

/* ── Dots ─────────────────────────────────────────────────────── */

.dots {
    position: absolute; z-index: 12; right: 2.4cqw;
    bottom: calc(9.4 * var(--u)); display: flex; gap: .8cqw;
}
.dot {
    width: calc(1 * var(--u)); height: calc(1 * var(--u)); border-radius: 50%;
    background: rgba(255,255,255,.28); transition: background .3s, transform .3s;
}
.dot.on { background: var(--gold); transform: scale(1.35); }

/* ── Controls ─────────────────────────────────────────────────── */

.controls {
    position: fixed; z-index: 100; bottom: 14px; left: 50%;
    transform: translateX(-50%); display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; background: rgba(3,12,34,.86);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(127,227,255,.22); border-radius: 100px;
    opacity: 0; transition: opacity .35s;
}
.controls.show, .controls:hover { opacity: 1; }
.ctl {
    font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
    color: #cfe9ff; background: rgba(255,255,255,.06);
    border: 1px solid rgba(127,227,255,.2); border-radius: 100px;
    padding: 7px 13px; cursor: pointer; white-space: nowrap;
    transition: background .2s, color .2s, border-color .2s;
}
.ctl:hover { background: rgba(127,227,255,.16); color: #fff; border-color: rgba(127,227,255,.5); }
.ctl-select { padding: 7px 10px; }
.ctl-vol { width: 84px; accent-color: var(--gold); cursor: pointer; }

/* ── Portrait / narrow ────────────────────────────────────────── */

/* The 16:9 letterbox left a 219px strip floating in black on a phone.
   In portrait the stage fills the screen and --u switches to a
   width-based unit so type stays proportional. */
@media (orientation: portrait), (max-width: 700px) {
    .stage {
        width: 100vw;
        height: 100dvh;
        aspect-ratio: auto;
        --u: 1.5cqw;
    }
    .bar { gap: 1.5cqw; padding: calc(2 * var(--u)) 3cqw; }
    .bar-mid { display: none; }
    .bar-right { flex-direction: column; align-items: flex-end; gap: 0; }
    .panel { padding: calc(3 * var(--u)) 4cqw; }
    .panel-head { font-size: calc(4.4 * var(--u)); flex-direction: column; align-items: flex-start; gap: calc(.6 * var(--u)); }
    .head-note { font-size: calc(2.6 * var(--u)); }

    .intro-head { font-size: calc(11 * var(--u)); }
    .intro-mark svg { width: calc(20 * var(--u)); height: calc(20 * var(--u)); }
    .intro-strip { font-size: calc(2.6 * var(--u)); }

    .cur-grid { grid-template-columns: 1fr; gap: calc(2 * var(--u)); align-content: center; }
    .cur-icon svg { width: calc(16 * var(--u)); height: calc(16 * var(--u)); }
    .cur-temp { font-size: calc(26 * var(--u)); }
    .cur-cond { font-size: calc(4.4 * var(--u)); }
    .cur-metrics dt { font-size: calc(2.1 * var(--u)); }
    .cur-metrics dd { font-size: calc(5.4 * var(--u)); }

    /* five columns is unreadable at phone width — stack into rows */
    .fc-row { grid-template-columns: 1fr; grid-auto-rows: 1fr; gap: calc(1.2 * var(--u)); }
    .fc-col {
        flex-direction: row; align-items: center; text-align: left;
        gap: 3cqw; padding: calc(1.4 * var(--u)) 3cqw;
    }
    .fc-day { min-height: 0; width: 26%; font-size: calc(2.4 * var(--u)); }
    .fc-ico svg { width: calc(7 * var(--u)); height: calc(7 * var(--u)); }
    .fc-t { font-size: calc(6 * var(--u)); }
    .fc-lo { font-size: calc(3 * var(--u)); }
    .fc-s { flex: 1; font-size: calc(2.2 * var(--u)); justify-content: flex-start; text-align: left; }
    .fc-w, .fc-p { display: none; }

    .detail-inner, .alert-inner { grid-template-columns: 1fr; gap: calc(1.6 * var(--u)); align-content: center; }
    .detail-icon, .alert-glyph { display: none; }
    .detail-when { font-size: calc(6 * var(--u)); }
    .detail-text { font-size: calc(3.2 * var(--u)); }
    .alert-event { font-size: calc(7 * var(--u)); }
    .alert-meta { font-size: calc(2.5 * var(--u)); }
    .alert-row { grid-template-columns: 1fr; gap: calc(.3 * var(--u)); }
    .alert-row dt { font-size: calc(2.2 * var(--u)); }
    .alert-row dd { font-size: calc(2.7 * var(--u)); }

    .alm-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: 1fr 1fr 1fr; }
    .alm-cell dt { font-size: calc(2 * var(--u)); }
    .alm-cell dd { font-size: calc(6 * var(--u)); }
    .alm-wide { grid-column: 1 / -1; }
    .alm-wide dd { font-size: calc(7 * var(--u)); }

    .bay-grid { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr auto; }
    .bay-cell dd { font-size: calc(5 * var(--u)); }
    .bay-cell dt, .bay-tides dt { font-size: calc(1.9 * var(--u)); }
    .bay-tides { flex-direction: column; align-items: flex-start; gap: calc(1 * var(--u)); }
    .tide { font-size: calc(2.4 * var(--u)); }

    .crawl { height: calc(9 * var(--u)); }
    .crawl-tag { font-size: calc(2.2 * var(--u)); }
    .crawl-text { font-size: calc(2.8 * var(--u)); }
    .dots { bottom: calc(10.6 * var(--u)); }
    .lg-bar { width: calc(14 * var(--u)); }
    .lg-label, .radar-credit { font-size: calc(1.8 * var(--u)); }

    .controls { gap: 5px; padding: 6px 8px; bottom: 8px; }
    .ctl { font-size: 9.5px; padding: 6px 8px; }
    .ctl-vol { width: 54px; }
}

@media (prefers-reduced-motion: reduce) {
    .panel { transition: opacity .3s ease; transform: none !important; }
    .crawl-text { animation-duration: 110s; }
    .bar-mark { animation: none; }
}
