/* Old Seaman: mobile-first chart UI */
:root {
  --pink: #FF6B9D; --pink-deep: #e0457f; --teal: #2fd3c0; --green: #3ddc97; --amber: #ffb85c; --red: #ff5a5f;
  --bg: #0b1526; --bg-2: #0e1b2e; --panel: rgba(11, 21, 38, 0.74); --panel-solid: #101e33; --line: rgba(255, 255, 255, 0.09);
  --text: #eaf0f7; --muted: #92a2b8; --dim: #607086; --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif; --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --panel-strong: rgba(11, 21, 38, 0.9); --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); --peek: 186px;
}
.day { --panel-strong: rgba(255, 255, 255, 0.94); --bg: #e4edf5; --bg-2: #ffffff; --panel: rgba(255, 255, 255, 0.8); --panel-solid: #ffffff; --line: rgba(16, 30, 51, 0.1); --text: #101e33; --muted: #4c5c72; --dim: #7d8ba0; --shadow: 0 10px 30px rgba(20, 40, 70, 0.18); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; height: 100%; background: #0b1526; color: var(--text); font-family: var(--font); font-size: 14px; overscroll-behavior: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
#app { position: fixed; inset: 0; overflow: hidden; background: var(--bg); color: var(--text); touch-action: none; }
.map { position: absolute; inset: 0; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.map-layer { position: absolute; inset: 0; display: block; }
.map-wind { pointer-events: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* glass */
.glass { background: var(--panel); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); border: 1px solid var(--line); box-shadow: var(--shadow); }

/* top bar */
.topbar { position: absolute; top: calc(8px + var(--sat)); left: 10px; right: 10px; display: flex; align-items: center; gap: 8px; z-index: 5; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px 0 6px; border-radius: 14px; font-weight: 700; letter-spacing: -0.01em; font-size: 15px; }
.brand img { width: 30px; height: 30px; border-radius: 9px; display: block; }
.brand span { display: none; }
.modes { display: flex; padding: 3px; border-radius: 15px; height: 50px; flex: 0 0 auto; margin-left: auto; margin-right: auto; }
.mode { position: relative; min-width: 84px; min-height: 44px; padding: 0 14px; border-radius: 11px; font-weight: 600; font-size: 13px; color: var(--muted); transition: background .18s, color .18s; }
.mode::after { content: ''; position: absolute; inset: -4px -2px; }
.mode.active { background: var(--pink); color: #14101a; box-shadow: 0 4px 14px rgba(255, 107, 157, 0.35); }
.iconbtn { width: 44px; height: 44px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; color: var(--text); flex: 0 0 auto; }
.iconbtn svg, .rail svg, .fab svg, .chip svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* layer rail */
.layer-rail { position: absolute; right: 10px; top: calc(62px + var(--sat)); display: flex; flex-direction: column; gap: 6px; z-index: 4; }
.rail { width: 48px; height: 48px; border-radius: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .02em; transition: color .15s, background .15s; }
.rail svg { width: 19px; height: 19px; }
.rail.on { color: var(--text); background: rgba(255, 107, 157, 0.16); border-color: rgba(255, 107, 157, 0.55); }
.day .rail.on { background: rgba(255, 107, 157, 0.18); }

/* crosshair */
.crosshair { position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; pointer-events: none; z-index: 3; }
.crosshair::before, .crosshair::after { content: ''; position: absolute; background: rgba(255, 255, 255, 0.9); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4); }
.crosshair::before { left: 17px; top: 0; width: 2px; height: 36px; }
.crosshair::after { top: 17px; left: 0; height: 2px; width: 36px; }
.crosshair i { position: absolute; inset: 9px; border: 2px solid var(--pink); border-radius: 50%; }

/* fabs */
.fabs { position: absolute; left: 10px; bottom: calc(var(--peek) + 14px + var(--sab)); display: flex; flex-direction: column; gap: 8px; z-index: 4; transition: opacity .2s, transform .2s; }
.fabs.hide { opacity: 0; pointer-events: none; transform: translateY(8px); }
.toast-open .fabs { opacity: 0; pointer-events: none; transform: translateY(8px); }
.fab { height: 46px; padding: 0 16px 0 12px; border-radius: 15px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; color: var(--text); }
.fab.primary { background: var(--pink); color: #14101a; border-color: transparent; box-shadow: 0 8px 22px rgba(255, 107, 157, 0.38); }
.fab.primary svg { stroke: #14101a; }
.fab.small { height: 44px; padding: 0 14px; font-size: 12.5px; }

.demo-badge { position: absolute; right: 10px; bottom: calc(var(--peek) + 16px + var(--sab)); z-index: 3; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; padding: 5px 10px; border-radius: 999px; background: rgba(255, 184, 92, 0.16); color: #ffcf8a; border: 1px solid rgba(255, 184, 92, 0.4); pointer-events: none; white-space: nowrap; }
.day .demo-badge { color: #8a5a00; background: rgba(255, 184, 92, 0.3); }

/* bottom sheet */
.sheet { position: absolute; left: 0; right: 0; bottom: 0; height: 90vh; height: 90dvh; border-radius: 24px 24px 0 0; z-index: 6; display: flex; flex-direction: column; will-change: transform; transform: translateY(calc(100% - var(--peek) - var(--sab))); }
.sheet.snap { transition: transform .32s cubic-bezier(.2, .8, .2, 1); }
.sheet-head { flex: 0 0 auto; padding: 6px 14px 8px; touch-action: none; cursor: grab; }
.handle { display: block; width: 88px; height: 44px; margin: -6px auto -10px; position: relative; border-radius: 14px; }
.handle::before { content: ''; position: absolute; left: 24px; right: 24px; top: 19px; height: 5px; border-radius: 3px; background: rgba(150, 170, 195, 0.5); }
.handle::after { content: ''; position: absolute; inset: -8px 0; }
.safety-strip { min-height: 26px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -2px 0 4px; padding: 3px 8px; border: 1px solid rgba(255, 184, 92, 0.42); border-radius: 9px; background: rgba(255, 184, 92, 0.12); color: #ffd08e; font-family: var(--mono); font-size: 9.5px; letter-spacing: .05em; }
.safety-strip span { color: var(--muted); letter-spacing: 0; }
.safety-strip span.offline { color: var(--amber); font-weight: 700; }
.day .safety-strip { color: #7b4e00; background: rgba(255, 184, 92, 0.24); }
.sensor-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 6px; }
.sensor-btn { min-width: 0; min-height: 44px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, 0.04); color: var(--text); display: flex; align-items: center; gap: 8px; text-align: left; }
.sensor-btn svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sensor-btn span { min-width: 0; font-size: 11.5px; font-weight: 700; line-height: 1.12; }
.sensor-btn small { display: block; overflow: hidden; color: var(--muted); font-family: var(--mono); font-size: 9.5px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.sensor-btn.active { color: var(--text); border-color: rgba(47, 211, 192, 0.65); background: rgba(47, 211, 192, 0.13); }
.sensor-btn.problem { border-color: rgba(255, 184, 92, 0.6); background: rgba(255, 184, 92, 0.1); }
.status-row { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.gonogo { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; border-radius: 13px; font-weight: 700; font-size: 13px; flex: 1 1 auto; min-width: 0; border: 1px solid transparent; }
.gonogo .dot { width: 24px; height: 24px; border-radius: 8px; flex: 0 0 auto; display: grid; place-items: center; color: #14101a; }
.gonogo .dot svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.gonogo .txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.gonogo .txt small { font-weight: 500; color: var(--muted); font-size: 11.5px; line-height: 1.18; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gonogo.go { background: rgba(61, 220, 151, 0.12); border-color: rgba(61, 220, 151, 0.35); } .gonogo.go .dot { background: var(--green); }
.gonogo.caution { background: rgba(255, 184, 92, 0.12); border-color: rgba(255, 184, 92, 0.4); } .gonogo.caution .dot { background: var(--amber); }
.gonogo.stop { background: rgba(255, 90, 95, 0.12); border-color: rgba(255, 90, 95, 0.4); } .gonogo.stop .dot { background: var(--red); }
.gonogo.nodata { background: rgba(154, 166, 184, 0.12); border-color: rgba(154, 166, 184, 0.45); } .gonogo.nodata .dot { background: #9aa6b8; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 11px; border-radius: 11px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); font-weight: 600; font-size: 12px; color: var(--text); white-space: nowrap; flex: 0 0 auto; }
.chip svg { width: 16px; height: 16px; }
.chip.model { font-family: var(--mono); font-size: 11px; }
.now-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; min-height: 28px; }
.spot-name { font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 auto; }
.spot-name small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }
.now-vals { display: flex; gap: 8px; font-family: var(--mono); font-size: 12px; font-weight: 600; flex: 0 0 auto; }
.now-vals b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.now-vals span { text-align: center; }
.now-vals small { display: block; color: var(--muted); font-family: var(--font); font-size: 10px; font-weight: 500; }
.warrow { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 auto; }
.warrow svg { width: 16px; height: 16px; fill: #14101a; }

/* scrubber */
.scrub { margin-top: 10px; display: flex; align-items: center; gap: 10px; }
.play { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto; }
.play svg { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.track-wrap { flex: 1 1 auto; position: relative; height: 44px; }
.track { position: absolute; left: 0; right: 0; top: 16px; height: 12px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.track canvas { width: 100%; height: 100%; display: block; }
.track-wrap input[type=range] { position: absolute; left: -8px; right: -8px; width: calc(100% + 16px); top: 0; height: 44px; margin: 0; -webkit-appearance: none; appearance: none; background: transparent; }
.track-wrap input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: 8px; border-radius: 50%; background: #fff; border: 3px solid var(--pink); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); cursor: pointer; }
.track-wrap input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 3px solid var(--pink); }
.track-wrap input[type=range]::-webkit-slider-runnable-track { height: 44px; background: transparent; }
.nowmark { position: absolute; top: 12px; width: 2px; height: 20px; background: var(--teal); border-radius: 1px; pointer-events: none; }
.time-label { font-family: var(--mono); font-size: 12px; font-weight: 600; text-align: right; min-width: 74px; flex: 0 0 auto; line-height: 1.1; }
.time-label small { display: block; color: var(--muted); font-size: 10px; font-family: var(--font); font-weight: 500; }
.ticks { display: flex; justify-content: space-between; margin: 2px 48px 0 48px; font-size: 10px; color: var(--dim); font-family: var(--mono); }

/* sheet body */
.sheet-body { position: relative; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 14px calc(24px + var(--sab)); touch-action: pan-y; }
.sheet-body.locked { overflow: hidden; touch-action: none; }
.tabs { display: flex; gap: 6px; padding: 4px 0 10px; overflow-x: auto; scrollbar-width: none; touch-action: pan-x; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; height: 44px; padding: 0 14px; border-radius: 10px; font-size: 12px; font-weight: 600; color: var(--muted); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); white-space: nowrap; }
.tab::after { content: ''; position: absolute; inset: -3px 0; }
.tab.active { color: var(--text); border-color: rgba(255, 107, 157, 0.5); background: rgba(255, 107, 157, 0.12); }
.section { padding: 12px 0 6px; border-top: 1px solid var(--line); }
.section h2 { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.section h2 .right { margin-left: auto; font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 12px; }
.card { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.035); border-radius: 14px; padding: 10px 12px; }
.day .card { background: rgba(16, 30, 51, 0.04); }
.card + .card { margin-top: 8px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.btn { min-height: 44px; padding: 0 14px; border-radius: 11px; font-weight: 600; font-size: 12.5px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); color: var(--text); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn.primary { background: var(--pink); color: #14101a; border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.danger { color: #ff8a8e; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:disabled { opacity: .45; cursor: default; }

/* forecast strip */
.strip-wrap { position: relative; margin: 0 -14px; padding: 0 14px; overflow-x: auto; scrollbar-width: none; touch-action: pan-x; }
.strip-wrap::-webkit-scrollbar { display: none; }
.strip-wrap canvas { display: block; height: 190px; }
.legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.legend.safe { margin: 0 0 10px; }
.legend .sw.red { background: rgb(236, 92, 96); }
.legend .sw.amber { background: rgb(247, 190, 96); }
.legend .sw.line { width: 16px; height: 0; border-radius: 0; border-top: 2.5px solid #ffd9c2; box-shadow: 0 0 0 1px rgba(7, 13, 24, 0.5); vertical-align: 3px; }
.day .legend .sw.line { border-top-color: #8a1c2b; box-shadow: none; }
.meta { margin: -2px 0 8px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.table-scroll { overflow-x: auto; margin: 0 -14px; padding: 0 14px; touch-action: pan-x; }

/* route table */
.legs { width: 100%; border-collapse: collapse; font-size: 12px; }
.legs th { text-align: left; font-weight: 600; color: var(--muted); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; padding: 4px 6px; }
.legs td { padding: 7px 6px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.legs td:first-child, .legs th:first-child { padding-left: 0; }
.legs .name { font-family: var(--font); font-weight: 600; white-space: normal; min-width: 90px; }
.pill { display: inline-block; padding: 2px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.pill.go { background: rgba(61, 220, 151, 0.18); color: #7ff0bf; } .pill.caution { background: rgba(255, 184, 92, 0.2); color: #ffd28f; } .pill.stop { background: rgba(255, 90, 95, 0.2); color: #ff9a9d; } .pill.nodata { background: rgba(154, 166, 184, 0.2); color: #c7d0dc; }
.day .pill.go { color: #0b6b43; } .day .pill.caution { color: #8a5200; } .day .pill.stop { color: #a3232a; } .day .pill.nodata { color: #46505e; }
.presets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.preset { text-align: left; padding: 11px 12px; min-height: 52px; border-radius: 13px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); }
.preset b { display: block; font-size: 12.5px; }
.preset small { color: var(--muted); font-size: 11px; }
.preset.active { border-color: rgba(255, 107, 157, 0.6); background: rgba(255, 107, 157, 0.12); }

/* windows */
.window { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 6px; text-align: left; min-height: 48px; }
.window .bar { flex: 1 1 auto; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); position: relative; overflow: hidden; }
.window .bar i { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: var(--green); }
.window.best .bar i { background: var(--pink); }
.window b { font-family: var(--mono); font-size: 12px; min-width: 132px; }
.window small { color: var(--muted); font-size: 11px; min-width: 70px; text-align: right; }
.stripe { height: 10px; border-radius: 5px; margin: 8px 0 4px; }

/* forms */
.field { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.field:first-child { border-top: 0; }
.field label, .field .flabel { font-size: 12.5px; font-weight: 600; }
.field label small, .field .flabel small { display: block; color: var(--muted); font-weight: 500; font-size: 11px; }
.stepper { display: inline-flex; flex: 0 0 auto; align-items: center; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.stepper button { flex: 0 0 44px; width: 44px; height: 44px; font-size: 19px; color: var(--text); background: rgba(255, 255, 255, 0.05); }
.stepper output { min-width: 62px; text-align: center; font-family: var(--mono); font-size: 12.5px; font-weight: 600; }
input[type=text] { height: 44px; font-size: 16px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); color: var(--text); width: 160px; }
select.sel { height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-solid); color: var(--text); padding: 0 8px; }
.alerts .card { display: flex; align-items: center; gap: 10px; }
.alerts .bell { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 107, 157, 0.14); color: var(--pink); flex: 0 0 auto; }
.alerts .bell svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.empty { color: var(--muted); font-size: 12.5px; padding: 6px 0; }

/* menu */
.menu { position: absolute; right: 10px; top: calc(58px + var(--sat)); width: 250px; border-radius: 16px; padding: 8px; z-index: 7; }
.menu .item { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; padding: 0 10px; border-radius: 10px; font-weight: 600; font-size: 13px; color: var(--text); }
.menu button.item:hover { background: rgba(255, 255, 255, 0.06); }
.menu .item .sel { max-width: 120px; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

/* toast */
.toast { position: absolute; left: 50%; bottom: calc(var(--peek) + var(--sab) + 10px); transform: translate(-50%, 10px); z-index: 8; background: #182a45; color: #fff; padding: 8px 10px 8px 14px; border-radius: 12px; font-size: 13px; font-weight: 500; box-shadow: var(--shadow); opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; max-width: min(92vw, 420px); display: flex; align-items: center; gap: 10px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: none; }
.toast button { color: var(--pink); font-weight: 700; min-height: 44px; padding: 0 8px; pointer-events: auto; }

/* splash (intro dialog). Scrolls on short screens; the photo and scrim stay put behind the text. */
.splash { position: fixed; inset: 0; z-index: 20; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; color: #fff;
  background: linear-gradient(180deg, rgba(11, 21, 38, 0.15) 0%, rgba(11, 21, 38, 0.55) 42%, rgba(11, 21, 38, 0.96) 74%), #0b1526 url('../assets/splash.jpg') center / cover no-repeat; }
.splash-inner { margin-top: auto; margin-bottom: auto; padding: calc(18px + var(--sat)) 22px calc(18px + var(--sab)); max-width: 520px; margin-left: auto; margin-right: auto; width: 100%; }
.splash .logo { width: 72px; height: 72px; border-radius: 20px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); display: block; margin-bottom: 14px; }
.splash h1 { margin: 0; font-size: 36px; letter-spacing: -0.035em; font-weight: 700; text-wrap: balance; outline: none; }
.splash h1 span { color: var(--pink); }
.splash p.lead { margin: 6px 0 16px; font-size: 15px; color: #c9d6e6; line-height: 1.45; max-width: 60ch; }
.splash ul { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 9px; }
.splash li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: #dfe8f3; line-height: 1.4; }
.splash li i { width: 26px; height: 26px; border-radius: 8px; background: rgba(255, 107, 157, 0.2); color: var(--pink); display: grid; place-items: center; flex: 0 0 auto; font-style: normal; }
.splash li i svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.splash .pick { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: #a9b8cc; }
.splash .presets { margin-bottom: 14px; }
.splash .preset { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.14); color: #fff; }
.splash .preset small { color: #a9b8cc; }
.splash .preset.active { border-color: rgba(255, 107, 157, 0.75); background: rgba(255, 107, 157, 0.18); }
.splash .cta { width: 100%; height: 52px; border-radius: 16px; background: var(--pink); color: #14101a; font-weight: 700; font-size: 16px; box-shadow: 0 10px 30px rgba(255, 107, 157, 0.4); }
.splash .fine { margin: 10px 0 0; font-size: 11px; color: #8ea0b8; text-align: center; font-family: var(--mono); }
.splash.hide { opacity: 0; transition: opacity .45s; pointer-events: none; }
.welcome-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; font-size: 23px; font-weight: 700; }
.welcome-brand b { color: var(--pink); }
.splash .welcome-brand .logo { width: 80px; height: 80px; margin: 0; }
.welcome-sensors { display: grid; gap: 10px; }
.welcome-sensor { width: 100%; min-height: 64px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 2px solid var(--pink); border-radius: 14px; background: var(--pink); color: #14101a; text-align: left; }
.welcome-sensor > svg { width: 25px; height: 25px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.9; }
.welcome-sensor > span:not(.welcome-check) { flex: 1; min-width: 0; }
.welcome-sensor b { display: block; font-size: 16px; }
.welcome-sensor small { display: block; font-size: 12px; line-height: 1.4; margin-top: 3px; overflow-wrap: anywhere; }
.welcome-sensor .welcome-check { font-size: 24px; font-weight: 700; }
.welcome-sensor.active { background: #12392f; border-color: #4fe0aa; color: #c7ffe7; }
.welcome-sensor.pending { background: #20354c; border-color: #9ac4e8; color: #eaf5ff; }
.welcome-sensor.problem { background: #403016; border-color: #ffc76b; color: #ffe0aa; }
.welcome-privacy { font-size: 11.5px; line-height: 1.45; color: #bccadd; margin: 10px 0 12px; }
.welcome-safety { border: 1px solid #b88c43; border-radius: 12px; padding: 10px 12px; color: #ffdb9c; background: rgba(24, 28, 35, .96); margin-bottom: 12px; font-size: 12px; line-height: 1.4; }
.welcome-safety p { margin: 4px 0 0; color: #d9e0e9; }
.welcome-boat summary { min-height: 44px; display: flex; align-items: center; justify-content: center; color: #c3cfdf; cursor: pointer; font-size: 12px; }
.welcome-boat[open] summary { justify-content: flex-start; }
.splash .fine { margin-top: 2px; }
@media (max-height: 740px) {
  .splash { background: linear-gradient(180deg, rgba(11, 21, 38, 0.55) 0%, rgba(11, 21, 38, 0.82) 30%, rgba(11, 21, 38, 0.97) 60%), #0b1526 url('../assets/splash.jpg') center / cover no-repeat; }
  .splash .logo { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 10px; }
  .splash h1 { font-size: 30px; }
  .splash .welcome-brand .logo { width: 56px; height: 56px; }
  .welcome-brand { margin-bottom: 8px; }
  .splash p.lead { margin-bottom: 12px; }
}

/* loading */
.loading { position: absolute; inset: 0; z-index: 15; display: grid; place-items: center; background: var(--bg); color: var(--muted); font-size: 13px; font-family: var(--mono); }
.loading .spin { width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(255, 107, 157, 0.25); border-top-color: var(--pink); animation: spin .9s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 900px) {
  .brand span { display: inline; }
  .sheet { left: 12px; right: auto; width: 420px; top: calc(64px + var(--sat)); bottom: 12px; height: auto; border-radius: 22px; transform: none !important; }
  .sheet-head { cursor: default; }
  .handle { display: none; }
  .fabs { left: 446px; bottom: 24px; }
  .demo-badge { bottom: 24px; left: auto; right: 12px; transform: none; }
  .toast { left: calc(50% + 210px); top: calc(60px + var(--sat)); bottom: auto; }
  .topbar { left: 12px; }
  .modes { margin-left: 12px; margin-right: auto; }
}
@media (max-width: 899px) and (max-height: 520px) {
  .layer-rail { left: 10px; right: auto; flex-direction: row; }
  .rail { width: 44px; height: 44px; font-size: 0; }
  .fabs { left: 262px; top: calc(62px + var(--sat)); bottom: auto; flex-direction: row; gap: 6px; }
  .fab, .fab.small { width: 44px; min-width: 44px; height: 44px; padding: 0; justify-content: center; gap: 0; font-size: 0; }
  .demo-badge { display: none; }
  .toast { top: calc(112px + var(--sat)); bottom: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* keyboard focus */
:focus { outline: none; }
:focus-visible { outline: 2.5px solid var(--pink); outline-offset: 2px; }
.map:focus-visible { outline-offset: -3px; }
.toast span { flex: 1 1 auto; }

/* Only the sheet and the menu blur the chart. Small controls over the animated chart use a near-solid
   panel, so WebKit is not re-blurring a dozen layers every frame. */
.topbar .glass, .layer-rail .glass, .fabs .glass, .scrub .glass { backdrop-filter: none; -webkit-backdrop-filter: none; }
.topbar .glass, .layer-rail .rail:not(.on), .fabs .fab:not(.primary), .scrub .play { background: var(--panel-strong); }
