/* GlobalWeather Storm Ops */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2-variations"), url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations"), url("/assets/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800; font-style: normal; font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #06080c;
  --surface: #0c1016;
  --surface-2: #11161e;
  --surface-3: #18202b;
  --line: #1f2835;
  --line-2: #2c3747;
  --text: #e8eef6;
  --text-2: #a8b5c6;
  --text-3: #74839a;
  --accent: #4cc9f0;
  --accent-ink: #03141b;
  --ok: #3ee07f;
  --warn: #ffd166;
  --bad: #ff5d6c;
  --glass: rgba(9, 13, 19, 0.86);
  --r: 10px;
  --r-sm: 7px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --topbar: 54px;
  --rail: 304px;
  --panel: 420px;
  --mobilebar: 0px;
  --shadow: 0 10px 34px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 400 13.5px/1.45 var(--font); font-feature-settings: "cv11", "ss01", "tnum";
  -webkit-font-smoothing: antialiased; overflow: hidden; overscroll-behavior: none;
}
h1, h2, h3, p, ul, dl, dd, pre { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a { color: var(--accent); }
kbd { font: 600 11px var(--mono); padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--surface-3); color: var(--text-2); }
.mono { font-family: var(--mono); font-feature-settings: "zero"; }
.dim { color: var(--text-3); }
.sm { font-size: 12px; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: fixed; left: 8px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 8px; }

/* ---------------- layout ---------------- */

.app {
  display: grid; height: 100dvh;
  grid-template-columns: var(--rail) minmax(0, 1fr) var(--panel);
  grid-template-rows: var(--topbar) minmax(0, 1fr);
  grid-template-areas: "top top top" "rail stage panel";
  transition: grid-template-columns 0.22s ease;
}
.app[data-rail="closed"] { --rail: 0px; }
.app[data-panel="closed"] { --panel: 0px; }
.topbar { grid-area: top; }
.rail { grid-area: rail; }
.stage { grid-area: stage; }
.panel { grid-area: panel; }
.mobilebar { display: none; }

/* ---------------- top bar ---------------- */

.topbar {
  display: flex; align-items: center; gap: 14px; padding: 0 14px;
  background: var(--surface); border-bottom: 1px solid var(--line); z-index: 30; min-width: 0;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; flex: none; }
.brand-mark { width: 28px; height: 28px; color: var(--accent); stroke: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.brand-text i { font: 600 9.5px var(--mono); letter-spacing: 0.22em; color: var(--accent); font-style: normal; margin-top: 3px; }

.search { position: relative; flex: 1 1 260px; max-width: 380px; min-width: 120px; }
.search > svg { position: absolute; left: 11px; top: 50%; translate: 0 -50%; color: var(--text-3); width: 16px; height: 16px; pointer-events: none; }
.search input {
  width: 100%; height: 36px; padding: 0 38px 0 34px; border-radius: 9px; border: 1px solid var(--line-2);
  background: var(--surface-2); outline: none; transition: border-color 0.15s, background 0.15s;
}
.search input::placeholder { color: var(--text-3); }
.search input:focus { border-color: var(--accent); background: var(--surface-3); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { position: absolute; right: 9px; top: 50%; translate: 0 -50%; pointer-events: none; }
.search input:focus + kbd { display: none; }
#q-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60; padding: 5px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow);
}
#q-results li { display: flex; flex-direction: column; padding: 7px 10px; border-radius: 7px; cursor: pointer; }
#q-results li span { color: var(--text-3); font-size: 12px; }
#q-results li[aria-selected="true"], #q-results li:hover { background: var(--surface-3); }

.counts { display: flex; gap: 6px; flex: none; }
.count {
  display: flex; align-items: baseline; gap: 6px; height: 34px; padding: 0 10px; border-radius: 9px;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-3);
}
.count b { font: 700 15px var(--mono); color: var(--text-2); }
.count span { font: 600 10px var(--mono); letter-spacing: 0.1em; }
.count.on { border-color: color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 13%, var(--surface-2)); }
.count.on b, .count.on span { color: var(--c); }
.count:hover { border-color: var(--c); }

.clocks { display: flex; gap: 14px; margin-left: auto; flex: none; }
.clocks div { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.clocks b { font: 600 14px var(--mono); }
.clocks span { font: 600 9.5px var(--mono); letter-spacing: 0.14em; color: var(--text-3); margin-top: 2px; }
.clocks div:first-child b { color: var(--accent); }

.tools { display: flex; gap: 4px; flex: none; }
.tool {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; min-width: 36px; justify-content: center; padding: 0 9px;
  border-radius: 9px; border: 1px solid transparent; background: none; color: var(--text-2);
}
.tool span { font-weight: 600; font-size: 12.5px; }
.tool:hover { background: var(--surface-3); color: var(--text); }
.tool[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
#btn-chase { border-color: var(--line-2); padding: 0 12px; }
#btn-chase[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
#btn-chase[aria-pressed="true"] svg { fill: currentColor; }
#btn-sound[aria-pressed="false"] .wave { opacity: 0.25; }

/* ---------------- shared controls ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--surface-3); color: var(--text); font-weight: 600; font-size: 12.5px; white-space: nowrap;
}
.btn:hover { border-color: var(--text-3); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: none; }
.btn[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }

.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid transparent;
  background: none; color: var(--text-2); font-size: 19px; line-height: 1; flex: none;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }

select, input[type="text"] {
  height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2); min-width: 0; width: 100%;
}
select { padding-right: 26px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8b5c6' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 14px; }
select:focus, input[type="text"]:focus { border-color: var(--accent); outline: none; }
option, optgroup { background: var(--surface-2); color: var(--text); }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: none; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: var(--line-2); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line-2); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); margin-top: -6px; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--accent); }
input[type="range"]::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--accent); }

.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; font-weight: 600; color: var(--text-3); letter-spacing: 0.02em; }
.field > span b { color: var(--text-2); font-family: var(--mono); font-weight: 500; }
.field > span small { font-weight: 400; color: var(--text-3); }

.switch { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; min-width: 0; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch i { flex: none; position: relative; width: 32px; height: 18px; border-radius: 18px; background: var(--line-2); transition: background 0.15s; margin-top: 1px; }
.switch i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #cfd8e3; transition: translate 0.15s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { translate: 14px 0; background: #fff; }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch.sm { align-items: center; font-size: 12px; color: var(--text-2); gap: 7px; }

.seg { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); gap: 2px; max-width: 100%; }
.seg.wide { display: flex; }
.seg.wide button { flex: 1; }
.seg button { height: 26px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--text-3); font-weight: 600; font-size: 11.5px; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); box-shadow: 0 0 0 1px var(--line-2); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 20px;
  border: 1px solid var(--line-2); background: none; color: var(--text-3); font-size: 12px; font-weight: 500;
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); opacity: 0.35; }
.chip b { font: 600 11px var(--mono); color: inherit; }
.chip[aria-pressed="true"] { color: var(--text); background: var(--surface-3); border-color: color-mix(in srgb, var(--c) 45%, var(--line-2)); }
.chip[aria-pressed="true"] i { opacity: 1; }

.tag {
  display: inline-grid; place-items: center; min-width: 38px; height: 20px; padding: 0 6px; border-radius: 5px;
  background: var(--c); color: #05080c; font: 700 10.5px var(--mono); letter-spacing: 0.05em; flex: none;
}
.tag.lg { height: 30px; min-width: 52px; font-size: 13px; border-radius: 7px; }

.badge { white-space: nowrap; font: 600 10px var(--mono); letter-spacing: 0.08em; padding: 2px 7px; border-radius: 5px; color: var(--text-3); background: var(--surface-3); }
.badge:empty { display: none; }
.badge.live { color: #04140a; background: var(--ok); }
.badge.past { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.badge.bad { color: #fff; background: #c32535; }

.note { padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); font-size: 12.5px; }
.note.ok { border-color: color-mix(in srgb, var(--ok) 30%, transparent); color: #b9f2cf; background: color-mix(in srgb, var(--ok) 7%, var(--surface-2)); }
.note.bad { border-color: color-mix(in srgb, var(--bad) 40%, transparent); color: #ffc2c8; background: color-mix(in srgb, var(--bad) 9%, var(--surface-2)); }
.note.warn { border-color: color-mix(in srgb, var(--warn) 40%, transparent); color: #ffe8b0; background: color-mix(in srgb, var(--warn) 8%, var(--surface-2)); }

.empty { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 22px 16px; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--text-3); }
.empty b { color: var(--text); font-size: 14px; }
.empty.tall { padding: 34px 20px; gap: 10px; }
.empty .btn { margin-top: 6px; }

.loading { display: flex; align-items: center; gap: 10px; color: var(--text-2); padding: 8px 0; }
.spin { display: inline-block; width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { rotate: 360deg; } }

.src { color: var(--text-3); font-size: 11.5px; line-height: 1.5; }
.status { color: var(--text-3); font-size: 12px; }
.status.bad { color: var(--bad); }

/* ---------------- rail ---------------- */

.rail, .panel { background: var(--surface); min-width: 0; overflow: hidden; display: flex; flex-direction: column; z-index: 20; }
.rail { border-right: 1px solid var(--line); }
.panel { border-left: 1px solid var(--line); }
.app[data-rail="closed"] .rail, .app[data-panel="closed"] .panel { visibility: hidden; border: 0; }
.sheet-head { display: none; }

.rail-body { overflow-y: auto; padding: 14px 14px 20px; display: flex; flex-direction: column; gap: 18px; width: 304px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.rail-sec { display: flex; flex-direction: column; gap: 10px; }
.rail-h { display: flex; align-items: center; justify-content: space-between; }
.rail-h h2 { font: 600 10.5px var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.rail-sec + .rail-sec { padding-top: 16px; border-top: 1px solid var(--line); }
.rail-foot button { display: block; margin-bottom: 8px; padding: 0; border: 0; background: none; color: var(--accent); font-weight: 600; font-size: 12px; }
.rail-foot { color: var(--text-3); font-size: 11px; line-height: 1.5; padding-top: 14px; border-top: 1px solid var(--line); }

.layer { display: flex; flex-direction: column; gap: 2px; }
.layer-name { display: flex; flex-direction: column; font-weight: 500; color: var(--text-2); min-width: 0; }
.layer.on .layer-name { color: var(--text); }
.layer-name small { font-weight: 400; color: var(--text-3); font-size: 11.5px; line-height: 1.35; margin-top: 1px; }
.layer-hint { padding-left: 42px; color: var(--text-3); font-size: 11.5px; line-height: 1.35; }
.layer-status { padding-left: 42px; font: 500 10.5px var(--mono); color: var(--text-3); line-height: 1.35; }
.layer-status.ok { color: var(--text-2); }
.layer-status.loading { color: var(--accent); }
.layer-status.error { color: var(--bad); }
.layer-extra .seg { flex-wrap: wrap; }
.layer-extra .seg button { padding: 0 8px; }
.layer-extra { display: flex; flex-direction: column; gap: 6px; padding: 6px 0 2px 42px; align-items: flex-start; }

/* ---------------- stage ---------------- */

.stage { position: relative; min-width: 0; min-height: 0; background: #0a0e14; overflow: hidden; container: stage / inline-size; }
#map { position: absolute; inset: 0; }
.maplibregl-canvas { outline: none; }

.boot {
  position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: radial-gradient(60% 50% at 50% 45%, #0f1722, #06080c); color: var(--text-3); text-align: center; padding: 24px;
}
.boot b { color: var(--text); font-size: 16px; margin-top: 8px; }
.boot .spin { width: 26px; height: 26px; border-width: 3px; }
.boot.failed .spin { display: none; }
.boot.failed b { color: var(--bad); }

.hud, .timeline, .mapctl, .chase-hud, .measure, .readout {
  position: absolute; z-index: 10; background: var(--glass); border: 1px solid var(--line-2); border-radius: var(--r);
  backdrop-filter: blur(10px) saturate(1.3); -webkit-backdrop-filter: blur(10px) saturate(1.3); box-shadow: var(--shadow);
}

.hud { top: 12px; left: 12px; padding: 10px 12px; width: 252px; display: flex; flex-direction: column; gap: 3px; }
.hud-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hud-tag { font: 700 11px var(--mono); letter-spacing: 0.12em; color: var(--accent); }
.hud-name { font-weight: 600; font-size: 13.5px; }
.hud-time { font-size: 12.5px; color: var(--text-2); }
.hud-credit { font-size: 10.5px; color: var(--text-3); }
.hud[data-state="off"] .hud-legend, .hud[data-state="error"] .hud-legend { display: none; }
.hud[data-state="error"] .hud-time { color: var(--bad); font-family: var(--font); }
.hud-legend:empty { display: none; }
.hud-legend { margin: 6px 0 3px; }

.dbz { position: relative; padding-bottom: 14px; }
.dbz-bar { display: flex; height: 9px; border-radius: 3px; overflow: hidden; }
.dbz-bar i { flex: 1; }
.dbz-ticks { position: absolute; left: 0; right: 0; bottom: 0; height: 12px; font: 500 9.5px var(--mono); color: var(--text-3); }
.dbz-ticks span { position: absolute; translate: -50% 0; }
.dbz-unit { position: absolute; right: 0; bottom: 0; font: 500 9.5px var(--mono); color: var(--text-3); background: var(--glass); padding-left: 3px; }
.wms-legend summary { font-size: 11.5px; color: var(--text-2); cursor: pointer; font-weight: 500; }
.wms-legend img { display: block; margin-top: 6px; max-width: 100%; max-height: 40vh; border-radius: 4px; background: #fff; }

.mapctl { top: 12px; right: 12px; display: flex; flex-direction: column; padding: 3px; gap: 1px; }
.mapctl .sep { height: 1px; background: var(--line-2); margin: 3px 5px; }
.mapctl .icon-btn { width: 32px; height: 32px; }
.app[data-rail="open"] #btn-rail, .app[data-panel="open"] #btn-panel { color: var(--accent); }

.readout { left: 12px; bottom: 12px; padding: 5px 9px; font-size: 11.5px; color: var(--text-2); border-radius: 7px; pointer-events: none; }

.timeline { left: 50%; bottom: 12px; translate: -50% 0; display: flex; align-items: center; gap: 6px; padding: 6px 8px; max-width: calc(100% - 24px); }
.timeline[data-empty="true"] { opacity: 0.45; pointer-events: none; }
.timeline .icon-btn { width: 32px; height: 32px; }
.timeline .icon-btn svg { width: 16px; height: 16px; }
.timeline .play { background: var(--accent); color: var(--accent-ink); border-radius: 50%; width: 36px; height: 36px; }
.timeline .play:hover { background: var(--accent); filter: brightness(1.12); color: var(--accent-ink); }
.tl-track { display: flex; align-items: center; gap: 3px; padding: 0 6px; height: 32px; }
.tl-track button { width: 14px; height: 22px; padding: 0; border: 0; background: none; position: relative; }
.tl-track button::after { content: ""; position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 5px; height: 10px; border-radius: 3px; background: var(--line-2); transition: height 0.12s, background 0.12s; }
.tl-track button.past::after { background: color-mix(in srgb, var(--accent) 45%, var(--line-2)); }
.tl-track button.on::after { background: var(--accent); height: 20px; }
.tl-track button:hover::after { background: var(--text); }
.tl-info { display: flex; flex-direction: column; line-height: 1.15; min-width: 66px; padding: 0 4px; }
.tl-info b { font-size: 13px; }
.tl-info span { font-size: 10.5px; color: var(--text-3); }
.timeline select { height: 28px; width: auto; font-size: 12px; padding-left: 8px; }

.measure { top: 12px; left: 50%; translate: -50% 0; display: flex; align-items: center; gap: 9px; padding: 5px 6px 5px 12px; color: var(--accent); }
.measure b { color: var(--text); font-size: 13px; font-weight: 500; }
.measure .icon-btn { width: 26px; height: 26px; }

.maptip {
  position: absolute; left: 0; top: 0; z-index: 15; pointer-events: none; max-width: 300px; padding: 8px 10px; border-radius: 8px;
  background: rgba(8, 11, 16, 0.95); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 12.5px; line-height: 1.4;
}
.maptip small { color: var(--text-2); font-size: 11.5px; }
.maptip i { color: var(--text-3); }
.maptip .ok { color: var(--ok); } .maptip .bad { color: var(--bad); }
.tip-tag { display: inline-block; padding: 0 5px; border-radius: 4px; background: var(--c); color: #05080c; font: 700 10px/16px var(--mono); letter-spacing: 0.04em; vertical-align: 1px; }

.chase-banner {
  position: absolute; z-index: 12; top: 12px; left: 50%; translate: -50% 0; width: min(560px, calc(100% - 330px)); min-width: 300px;
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: var(--r);
  background: color-mix(in srgb, var(--c) 16%, rgba(8, 11, 16, 0.94)); border: 1px solid var(--c); box-shadow: var(--shadow);
}
.chase-banner.inside { background: var(--c); color: #05080c; animation: pulse 1.4s ease-in-out infinite; }
.chase-banner.inside .tag { background: #05080c; color: var(--c); }
.chase-banner.inside .cb-text span { color: rgba(5, 8, 12, 0.8); }
.chase-banner.inside .btn { background: rgba(5, 8, 12, 0.85); border-color: transparent; color: #fff; }
.cb-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.cb-text b { font-size: 13.5px; }
.cb-text span { font-size: 11.5px; color: var(--text-2); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 35%, transparent), var(--shadow); } }
.measure:not([hidden]) ~ .chase-banner, .chase-banner:not([hidden]) ~ .measure { top: 70px; }

/* when the map column is narrow the banner drops below the radar HUD instead of covering it */
@container stage (max-width: 900px) {
  .chase-banner { top: 156px; left: 12px; right: 58px; width: auto; min-width: 0; translate: none; }
  .measure { top: 100px; left: 12px; translate: none; }
  .chase-hud .ch-cell.wide { display: none; }
}

.chase-hud { left: 12px; bottom: 72px; display: flex; align-items: center; gap: 12px; padding: 8px 12px; flex-wrap: wrap; max-width: calc(100% - 24px); }
.ch-cell { display: flex; flex-direction: column; line-height: 1.15; }
.ch-cell span { font: 600 9.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.ch-cell b { font: 600 17px var(--mono); }
.ch-cell b small { font-size: 10.5px; color: var(--text-3); margin-left: 3px; font-weight: 500; }
.ch-cell.wide b { font-size: 12.5px; font-weight: 500; padding-top: 4px; }
.ch-wait { display: flex; gap: 8px; align-items: center; color: var(--text-2); }
.app[data-chase="on"] .readout { display: none; }

.pin { width: 26px; height: 26px; display: grid; place-items: center; cursor: grab; }
.pin i { width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid #fff; background: var(--accent); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.6), 0 0 0 7px color-mix(in srgb, var(--accent) 28%, transparent); }
.gps { position: relative; width: 44px; height: 44px; pointer-events: none; }
.gps-dot { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; translate: -50% -50%; border-radius: 50%; background: #2f8bff; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.55), 0 0 0 10px rgba(47, 139, 255, 0.22); }
.gps-cone { position: absolute; inset: 0; rotate: var(--hdg, 0deg); display: none; }
.gps-cone::before { content: ""; position: absolute; left: 50%; top: -6px; translate: -50% 0; border: 9px solid transparent; border-bottom: 16px solid #2f8bff; filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.8)); }
.gps.has-heading .gps-cone { display: block; }

.ctx-pop .maplibregl-popup-content { background: rgba(8, 11, 16, 0.96); border: 1px solid var(--line-2); border-radius: var(--r); padding: 9px; box-shadow: var(--shadow); color: var(--text); font: inherit; }
.ctx-pop .maplibregl-popup-tip { display: none; }
.ctx { display: flex; align-items: center; gap: 7px; }
.ctx p { font-size: 11.5px; color: var(--text-2); padding: 0 5px 0 3px; white-space: nowrap; }

.maplibregl-ctrl-bottom-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding: 0 12px 66px 0; }
.maplibregl-ctrl-bottom-right .maplibregl-ctrl { margin: 0; float: none; }
.maplibregl-ctrl-scale { background: var(--glass); border: 1px solid var(--text-3); border-top: 0; color: var(--text-2); font: 500 10px var(--mono); padding: 0 5px; }
.maplibregl-ctrl.maplibregl-ctrl-attrib { background: var(--glass); color: var(--text-3); font-size: 10.5px; border-radius: 12px; }
.maplibregl-ctrl-attrib a { color: var(--text-2); }
.maplibregl-ctrl-attrib-button { filter: invert(1); opacity: 0.7; }

/* ---------------- panel ---------------- */

.tabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 8px; flex: none; width: 420px; max-width: 100vw; }
.tabs button {
  position: relative; flex: 1; height: 44px; border: 0; background: none; color: var(--text-3); font-weight: 600; font-size: 12.5px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.n { font: 600 10px var(--mono); padding: 1px 5px; border-radius: 8px; background: var(--surface-3); color: var(--text-2); }
.n.hot { background: #ff2b2b; color: #fff; }

.tabpanes { flex: 1; min-height: 0; width: 420px; max-width: 100vw; }
.tabpane { height: 100%; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.list { display: flex; flex-direction: column; gap: 7px; }

.alert, .report {
  display: flex; flex-direction: column; gap: 5px; text-align: left; width: 100%; padding: 10px 12px 10px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface-2); position: relative; overflow: hidden;
}
.alert::before, .report::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); }
.alert:hover, .report:hover { border-color: var(--line-2); background: var(--surface-3); }
.alert.hot { background: color-mix(in srgb, var(--c) 9%, var(--surface-2)); border-color: color-mix(in srgb, var(--c) 35%, var(--line)); }
.alert-top { display: flex; align-items: center; gap: 8px; }
.alert-name { font-weight: 600; flex: 1; min-width: 0; }
.alert-exp { font: 500 11.5px var(--mono); color: var(--text-2); white-space: nowrap; }
.alert-exp.soon { color: var(--warn); }
.alert-flags { display: flex; flex-wrap: wrap; gap: 5px; }
.flag { font: 600 9.5px var(--mono); letter-spacing: 0.08em; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--text-2); }
.flag.crit { background: #fff; color: #b3001b; border-color: #fff; }
.alert-area { color: var(--text-2); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.alert-meta, .report-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 11.5px; color: var(--text-3); }
.prox { color: var(--accent); font-family: var(--mono); font-size: 11px; }
.prox.inside { color: #fff; background: #c32535; padding: 0 5px; border-radius: 4px; font-weight: 600; }

.report { flex-direction: row; gap: 10px; align-items: flex-start; }
.report .tag { min-width: 22px; width: 22px; height: 22px; border-radius: 50%; padding: 0; margin-top: 1px; }
.report.hl { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.report-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.report-top { display: flex; justify-content: space-between; gap: 8px; }
.report-top span { font: 500 11px var(--mono); color: var(--text-3); white-space: nowrap; }
.report-loc { color: var(--text-2); font-size: 12.5px; }
.report p { color: var(--text-3); font-size: 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.block { display: flex; flex-direction: column; gap: 9px; }
.block > h3, .prod-head h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font: 600 10.5px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.block > h3 .sub { font-weight: 500; letter-spacing: 0.02em; text-transform: none; font-size: 11px; }
.block + .block, .note + .block, .block + .note { padding-top: 12px; border-top: 1px solid var(--line); }

.pt-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pt-head h2 { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.25; }
.pt-head p { color: var(--text-3); font-size: 11.5px; margin-top: 3px; }
.pt-actions { display: flex; align-items: center; gap: 2px; flex: none; }

.now { display: flex; align-items: center; gap: 14px; }
.now-t { font: 600 40px/1 var(--mono); letter-spacing: -0.03em; }
.now-d { display: flex; flex-direction: column; color: var(--text-2); font-size: 12.5px; min-width: 0; }
.now-d b { color: var(--text); font-size: 14px; }
.now-d span:last-child { color: var(--text-3); font-size: 11.5px; }
.metar { font-size: 11px; color: var(--text-3); padding: 7px 9px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); overflow-wrap: anywhere; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.tiles.env { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile { display: flex; flex-direction: column; gap: 3px; padding: 8px 9px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); min-width: 0; position: relative; }
.tile-k { font-size: 10.5px; color: var(--text-3); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-v { font: 600 14.5px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-v small { font-size: 10px; color: var(--text-3); font-weight: 500; margin-left: 3px; }
.tile.l1, .tile.l2, .tile.l3, .tile.l4 { border-color: color-mix(in srgb, var(--lv) 45%, var(--line)); background: color-mix(in srgb, var(--lv) 9%, var(--surface-2)); }
.tile.l1 .tile-v, .tile.l2 .tile-v, .tile.l3 .tile-v, .tile.l4 .tile-v { color: var(--lv); }
.l1 { --lv: #d9e86b; } .l2 { --lv: #ffb84d; } .l3 { --lv: #ff6b5e; } .l4 { --lv: #ff5de0; }
span.l1, span.l2, span.l3, span.l4, b.l1, b.l2, b.l3, b.l4 { color: var(--lv); }

.sparks { display: flex; flex-direction: column; gap: 4px; }
.spark-row { display: grid; grid-template-columns: 82px minmax(0, 1fr) 74px; gap: 10px; align-items: center; }
.spark-k, .spark-p { display: flex; flex-direction: column; line-height: 1.2; }
.spark-k b { font-size: 11.5px; font-weight: 500; color: var(--text-2); }
.spark-k span { font: 600 13px var(--mono); }
.spark-p { align-items: flex-end; font-size: 10.5px; color: var(--text-3); }
.spark-p b { font: 600 12px var(--mono); color: var(--text); }
canvas.spark { width: 100%; height: 34px; display: block; border-radius: 4px; background: var(--surface-2); }

.periods { display: flex; flex-direction: column; gap: 6px; }
.period { padding: 9px 11px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.period-h { display: flex; justify-content: space-between; align-items: baseline; }
.period-t { font: 600 14px var(--mono); }
.period.day .period-t { color: #ffb36b; } .period.night .period-t { color: #8cc4ff; }
.period p { color: var(--text-2); font-size: 12.5px; }
.period-w { color: var(--text-3); font-size: 11.5px; }

details.pt-alert, details.mcd { border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface-2); overflow: hidden; }
details.pt-alert.warn { border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
details summary { display: flex; justify-content: space-between; gap: 10px; padding: 9px 11px; cursor: pointer; list-style: none; align-items: baseline; }
details summary::-webkit-details-marker { display: none; }
details summary span { color: var(--text-3); font-size: 11.5px; white-space: nowrap; }
details.pt-alert.warn summary b { color: #ff9aa4; }
details[open] summary { border-bottom: 1px solid var(--line); }
details .product { border: 0; border-radius: 0; max-height: 46vh; }

.product {
  font: 400 11.5px/1.55 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-2);
  padding: 11px 12px; border-radius: var(--r-sm); background: #080b10; border: 1px solid var(--line); overflow: auto;
}
.prod-body { display: flex; flex-direction: column; gap: 9px; }
.prod-head { display: flex; flex-direction: column; gap: 3px; }
.prod-head h3 { color: var(--text-2); }
.prod-head span { color: var(--text-3); font-size: 11.5px; }

.otl-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.otl-legend, .legend-row { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--text-2); }
.otl-legend span, .legend-row span, .legend-col span { display: inline-flex; align-items: center; gap: 6px; }
.otl-legend i { width: 11px; height: 11px; border-radius: 3px; }
.legend-row i, .legend-col i { width: 16px; height: 3px; border-radius: 2px; }
.legend-row i.dash { background: repeating-linear-gradient(90deg, #ffd166 0 5px, transparent 5px 8px) !important; }
.legend-col { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--text-2); }

.fh { gap: 7px; }
.fh-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.fh-label b { font: 600 14px var(--mono); color: var(--accent); }
.fh-label span { color: var(--text-2); font-size: 12px; }
.fh-ctl { display: flex; align-items: center; gap: 6px; }
.fh-ctl .icon-btn { width: 28px; height: 28px; border-color: var(--line-2); }
#snd-body { display: flex; flex-direction: column; gap: 12px; }
#snd-body > .block { padding-top: 12px; border-top: 1px solid var(--line); }
.skew-wrap { border-radius: var(--r-sm); background: #080b10; border: 1px solid var(--line); padding: 4px; }
canvas.skewt { display: block; width: 100%; height: 430px; }
.hodo-block { flex-direction: row; gap: 12px; align-items: stretch; }
.hodo-wrap { flex: none; width: 226px; border-radius: var(--r-sm); background: #080b10; border: 1px solid var(--line); }
canvas.hodo { display: block; width: 226px; height: 226px; }
.hodo-side { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-width: 0; flex: 1; }

.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.kv.tight { grid-template-columns: 1fr; gap: 6px; }
.kv dt { font-size: 10.5px; color: var(--text-3); font-weight: 500; }
.kv dd { font-size: 13px; font-weight: 500; }
.kv.tight dd { font-family: var(--mono); font-size: 12.5px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th { text-align: left; font-weight: 500; color: var(--text-3); padding: 5px 6px; font-size: 11px; }
.tbl thead th { border-bottom: 1px solid var(--line-2); }
.tbl td { font-family: var(--mono); padding: 6px; text-align: right; }
.tbl thead th:not(:first-child) { text-align: right; }
.tbl tbody tr + tr td, .tbl tbody tr + tr th { border-top: 1px solid var(--line); }
.tbl tbody th { color: var(--text-2); }

/* ---------------- dialogs & toasts ---------------- */

.dlg {
  width: min(600px, calc(100vw - 24px)); max-height: min(86dvh, 900px); padding: 22px; border-radius: 14px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7); overflow-y: auto;
}
.dlg.wide { width: min(820px, calc(100vw - 24px)); }
.dlg::backdrop { background: rgba(2, 4, 7, 0.7); backdrop-filter: blur(3px); }
.dlg > form[method="dialog"] { position: sticky; top: 0; height: 0; display: flex; justify-content: flex-end; z-index: 2; }
.dlg-x { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-3); color: var(--text-2); font-size: 19px; line-height: 1; margin: -8px -8px 0 0; }
.dlg-x:hover { color: var(--text); }
.dlg h2 { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; padding-right: 36px; }
.dlg h3 { font: 600 10.5px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
#dlg-alert-body, #settings-form { display: flex; flex-direction: column; gap: 14px; }
.dlg-head { display: flex; gap: 12px; align-items: flex-start; padding-right: 36px; }
.dlg-head p { color: var(--text-2); font-size: 12.5px; margin-top: 3px; }
.dlg-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.headline { font-weight: 600; color: var(--text); }
.dlg .product { max-height: none; }
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
legend { font: 600 10.5px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); padding: 0 6px; }
legend small { letter-spacing: 0.02em; text-transform: none; font-weight: 400; }

#dlg-help { display: none; flex-direction: column; gap: 16px; }
#dlg-help[open] { display: flex; }
.help-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px 26px; }
.help-grid .span { grid-column: 1 / -1; }
.help-grid ul { display: flex; flex-direction: column; gap: 7px; color: var(--text-2); font-size: 13px; }
.help-grid li { padding-left: 14px; position: relative; }
.help-grid li::before { content: ""; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.help-grid li b { color: var(--text); font-weight: 600; }
.keys { display: flex; flex-direction: column; gap: 6px; }
.keys div { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.keys dd { color: var(--text-2); font-size: 12.5px; text-align: right; }
.sources { display: flex; flex-direction: column; margin-bottom: 10px; }
.sources div { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.sources dt { color: var(--text-2); }
.sources dd { color: var(--text); }

.toasts { position: fixed; z-index: 90; right: 14px; top: calc(var(--topbar) + 12px); display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 28px)); pointer-events: none; }
.toast {
  --c: var(--accent); pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 11px 10px 11px 14px; border-radius: var(--r);
  background: rgba(10, 14, 20, 0.97); border: 1px solid var(--line-2); border-left: 3px solid var(--c); box-shadow: var(--shadow); animation: toast-in 0.22s ease-out;
}
.toast.ok { --c: var(--ok); } .toast.bad { --c: var(--bad); }
.toast.alert { background: color-mix(in srgb, var(--c) 14%, rgba(10, 14, 20, 0.97)); border-color: var(--c); }
.toast-body { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.35; }
.toast-body span { color: var(--text-2); font-size: 12px; overflow-wrap: anywhere; }
.toast-x { border: 0; background: none; color: var(--text-3); font-size: 18px; width: 26px; height: 26px; border-radius: 6px; flex: none; }
.toast-x:hover { color: var(--text); background: var(--surface-3); }
@keyframes toast-in { from { opacity: 0; translate: 12px 0; } }

.noscript { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; background: var(--bg); text-align: center; color: var(--text-2); }

/* ---------------- responsive ---------------- */

@media (max-width: 1240px) {
  :root { --panel: 380px; --rail: 280px; }
  .tabs, .tabpanes { width: 380px; }
  .rail-body { width: 280px; }
  .clocks div:last-child { display: none; }
  .tool span { display: none; }
  #btn-chase { padding: 0 9px; }
  canvas.skewt { height: 400px; }
  .hodo-wrap, canvas.hodo { width: 200px; }
  canvas.hodo { height: 200px; }
}

@media (max-width: 1040px) {
  .count span { display: none; }
  .count { padding: 0 9px; box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--c) 70%, transparent); }
  .brand-text { display: none; }
}

@media (max-width: 900px) {
  :root { --topbar: 50px; --mobilebar: calc(56px + env(safe-area-inset-bottom, 0px)); }
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--topbar) minmax(0, 1fr) var(--mobilebar); grid-template-areas: "top" "stage" "bar"; transition: none; }
  .topbar { gap: 8px; padding: 0 10px; }
  .clocks, #btn-measure, #btn-share { display: none; }
  .search { max-width: none; flex: 1 1 0; }
  .search kbd { display: none; }
  .search input { padding-right: 10px; font-size: 16px; }
  .count { height: 32px; padding: 0 8px; }
  .count:nth-child(n+3) { display: none; }

  .rail, .panel {
    position: fixed; left: 0; right: 0; bottom: var(--mobilebar); z-index: 50; height: min(72dvh, 640px); border: 0; border-top: 1px solid var(--line-2);
    border-radius: 16px 16px 0 0; box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.6); transition: translate 0.24s ease, visibility 0.24s; visibility: visible;
  }
  .app[data-rail="closed"] .rail, .app[data-panel="closed"] .panel { translate: 0 105%; visibility: hidden; border-top: 1px solid var(--line-2); }
  .sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 0 16px; flex: none; }
  .sheet-head h2 { font: 600 10.5px var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
  .panel .sheet-head { display: none; }
  .rail-body, .tabs, .tabpanes { width: 100%; }
  .tabs { padding: 4px 6px 0; overflow-x: auto; scrollbar-width: none; }
  .tabs button { flex: 1 0 auto; padding: 0 12px; }
  .tabpane { padding-bottom: 24px; }

  .mobilebar {
    grid-area: bar; display: flex; background: var(--surface); border-top: 1px solid var(--line); z-index: 55; padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .mobilebar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: var(--text-3); font-size: 10.5px; font-weight: 600; position: relative; min-width: 0; }
  .mobilebar button[aria-current="true"] { color: var(--accent); }
  .mobilebar svg { width: 20px; height: 20px; }
  .mobilebar .n { position: absolute; top: 6px; left: calc(50% + 5px); }

  .hud { top: 8px; left: 8px; width: auto; max-width: 62vw; padding: 7px 10px; }
  .hud-credit, .hud-name { display: none; }
  .hud-legend { margin: 4px 0 0; min-width: 170px; }
  .mapctl { top: 8px; right: 8px; }
  #btn-rail, #btn-panel, .mapctl .sep:first-of-type { display: none; }
  .readout { display: none; }
  .timeline { bottom: 8px; gap: 3px; padding: 5px; width: calc(100% - 16px); translate: none; left: 8px; }
  .timeline select, #tl-live, #tl-span { display: none; }
  .tl-track { flex: 1; justify-content: space-between; gap: 0; min-width: 0; }
  .tl-track button { flex: 1; width: auto; max-width: 16px; }
  .tl-info { min-width: 52px; }
  .chase-banner { top: auto; bottom: 62px; left: 8px; right: 8px; width: auto; min-width: 0; translate: none; }
  .chase-hud { bottom: 62px; left: 8px; right: 8px; max-width: none; gap: 10px; padding: 7px 10px; }
  .chase-banner:not([hidden]) ~ .chase-hud { bottom: 126px; }
  .ch-cell.wide { display: none; }
  .measure { top: 64px; }
  .maplibregl-ctrl-bottom-right { padding: 0 8px 60px 0; }
  .toasts { top: calc(var(--topbar) + 8px); right: 8px; left: 8px; width: auto; }
  .help-grid { grid-template-columns: 1fr; }
  .sources div { grid-template-columns: 1fr; gap: 2px; }
  .dlg { padding: 18px; }
  canvas.skewt { height: 380px; }
}

@media (max-width: 420px) {
  .hodo-block { flex-direction: column; }
  .hodo-wrap { width: 100%; display: grid; place-items: center; }
  .tiles.env { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tile-v { font-size: 13px; }
  #btn-help { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
