/* МКС над Землёй — стили. Без внешних шрифтов и картинок. */

:root {
  --bg: #04070d;
  --bg-soft: #071019;
  --ink: #e7eef6;
  --dim: #8ea4b8;
  --faint: #5b7183;
  --accent: #5eead4;
  --accent-dim: rgba(94, 234, 212, 0.55);
  --accent-soft: rgba(94, 234, 212, 0.14);
  --line: rgba(140, 190, 205, 0.14);
  --panel: rgba(6, 14, 21, 0.82);
  --warn: #fcd34d;
  --crit: #fda4af;
  --radius: 16px;
  --tap: 40px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, p, dl, dd, dt { margin: 0; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  color: var(--accent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important; }

/* ---------- каркас ---------- */

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(120% 70% at 50% -10%, #0a1a24 0%, transparent 62%),
    var(--bg);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(8px + env(safe-area-inset-top)) 16px 6px;
  flex: 0 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(94, 234, 212, 0.12), 0 0 12px rgba(94, 234, 212, 0.6);
  flex: 0 0 auto;
}

.brand-title {
  font-size: clamp(14px, 4.1vw, 17px);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  color: var(--dim);
  font-weight: 400;
  letter-spacing: 0.04em;
}

.clock {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 18, 26, 0.6);
  flex: 0 0 auto;
}

.clock-val {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  letter-spacing: 0.05em;
}

.clock-zone {
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--faint);
}

/* ---------- сцена ---------- */

.stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

#globe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
  outline: none;
}

#globe.is-dragging { cursor: grabbing; }

.hint {
  position: absolute;
  top: 10px;
  right: 16px;
  max-width: 46%;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--faint);
  text-align: right;
  pointer-events: none;
  opacity: 0;
}

@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
  .hint { opacity: 1; }
}

/* ---------- бейджи ---------- */

.badges {
  position: absolute;
  top: 10px;
  left: 14px;
  right: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none;
  z-index: 3;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(6, 14, 21, 0.78);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--dim);
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
}

.badge-warn { color: var(--warn); border-color: rgba(252, 211, 77, 0.3); }
.badge-crit { color: var(--crit); border-color: rgba(253, 164, 175, 0.32); }
.badge-wait { color: var(--faint); }
.badge-wait::before { animation: blink 1.4s ease-in-out infinite; }

@keyframes blink {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

/* ---------- нижний док ---------- */

.dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 10px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(4, 7, 13, 0) 0%, rgba(4, 7, 13, 0.6) 30%, rgba(4, 7, 13, 0.94) 100%);
  z-index: 4;
  pointer-events: none;
}

.dock-inner {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 40px -24px #000, inset 0 1px 0 rgba(255, 255, 255, 0.04);
  pointer-events: auto;
}

.controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

@media (min-width: 560px) {
  .controls { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 559px) {
  #btn-share { grid-column: span 2; }
}

.btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 7px 6px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(11, 24, 33, 0.72);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover { border-color: rgba(140, 190, 205, 0.3); background: rgba(16, 33, 44, 0.85); }

.btn[aria-pressed="true"] {
  border-color: rgba(94, 234, 212, 0.42);
  background: var(--accent-soft);
  color: #d7fff8;
}

.btn-primary {
  border-color: rgba(94, 234, 212, 0.34);
  color: #d7fff8;
  background: rgba(94, 234, 212, 0.09);
}

.btn-primary:hover { background: rgba(94, 234, 212, 0.17); }

.btn-primary[aria-pressed="false"] {
  background: rgba(11, 24, 33, 0.72);
  border-color: var(--line);
  color: var(--ink);
}

.btn-primary[aria-pressed="false"]:hover {
  background: rgba(16, 33, 44, 0.85);
  border-color: rgba(140, 190, 205, 0.3);
}

.btn:active { transform: translateY(1px); }

.btn:focus-visible,
#globe:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hud {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 12px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(140, 190, 205, 0.1);
}

@media (min-width: 560px) {
  .hud { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.hud-item { min-width: 0; }

.hud-item-wide { grid-column: span 2; }

@media (min-width: 560px) {
  .hud-item-wide { grid-column: auto; }
}

.hud dt {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud dd {
  margin-top: 1px;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud dd .unit {
  font-size: 10.5px;
  color: var(--faint);
  margin-left: 2px;
}

.dock-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--dim);
  letter-spacing: 0.02em;
}

.dock-src { color: var(--faint); }

.dock-foot.is-old { color: var(--warn); }
.dock-foot.is-stale { color: var(--crit); }

#tle-note { min-width: 0; }

/* ---------- тост ---------- */

.toast {
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top) + 54px);
  transform: translateX(-50%);
  max-width: min(92vw, 560px);
  padding: 8px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(6, 14, 21, 0.95);
  color: var(--ink);
  font-size: 12px;
  text-align: center;
  z-index: 20;
  box-shadow: 0 12px 28px -18px #000;
  overflow-wrap: anywhere;
}

/* ---------- гейт ---------- */

.gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gate-card {
  position: relative;
  width: min(100%, 420px);
  padding: 34px 26px 30px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(7, 16, 24, 0.9);
  text-align: center;
  box-shadow: 0 30px 70px -40px #000, inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.gate-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(60% 60% at 50% 0%, rgba(94, 234, 212, 0.16), transparent 70%);
}

.gate-kicker {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.gate-title {
  margin-top: 10px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.gate-text {
  margin-top: 10px;
  color: var(--dim);
  font-size: 14px;
}

.gate-note {
  margin-top: 18px;
  font-size: 11.5px;
  color: var(--faint);
}

.noscript {
  max-width: 460px;
  margin: 32px auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--dim);
  font-size: 13px;
}

/* ---------- заглушка до первого TLE ---------- */

.stage-load {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  background:
    radial-gradient(120% 70% at 50% 12%, #0a1a24 0%, transparent 62%),
    var(--bg);
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  padding: 20px;
  pointer-events: none;
}

.stage-load-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(94, 234, 212, 0.1), 0 0 16px rgba(94, 234, 212, 0.55);
  animation: blink 1.3s ease-in-out infinite;
}

/* ---------- панели радио и частот ---------- */

.panel {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: calc(8px + env(safe-area-inset-bottom));
  z-index: 9;
  display: flex;
  flex-direction: column;
  max-height: min(62dvh, 460px);
  border: 1px solid rgba(140, 190, 205, 0.24);
  border-radius: 16px;
  background: rgba(6, 14, 21, 0.97);
  box-shadow: 0 24px 60px -28px #000, inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(calc(100% + 28px));
  transition: transform 0.26s var(--ease), opacity 0.2s var(--ease), visibility 0.26s;
}

.panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.panel:focus { outline: none; }

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 9px 11px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 24, 0.92);
}

.panel-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-close {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(11, 24, 33, 0.8);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  touch-action: manipulation;
}

.panel-close:hover { border-color: rgba(140, 190, 205, 0.34); }

.panel-close:focus-visible,
.freq-copy:focus-visible,
.station-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.panel-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 11px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 0 0 9px;
  padding: 0;
  border: 0;
}

.filters legend {
  width: 100%;
  padding: 0;
  font-size: 9.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--faint);
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(11, 24, 33, 0.62);
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

.check:hover { border-color: rgba(140, 190, 205, 0.3); }

.check input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.check:has(input:checked) {
  border-color: rgba(94, 234, 212, 0.38);
  background: rgba(94, 234, 212, 0.09);
}

.panel-note {
  margin-bottom: 9px;
  font-size: 10.5px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--dim);
}

.panel-sub {
  margin: 0 0 9px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--faint);
}

.panel-tools { margin-bottom: 9px; }

.btn-layer { width: 100%; }

.btn:disabled,
.seg-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.mode-switch {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.seg-btn {
  -webkit-appearance: none;
  appearance: none;
  flex: 1 1 0;
  min-width: 0;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(11, 24, 33, 0.62);
  color: var(--ink);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
  touch-action: manipulation;
}

.seg-btn[aria-pressed="true"] {
  border-color: rgba(94, 234, 212, 0.4);
  background: rgba(94, 234, 212, 0.1);
  color: #d7fff8;
}

.seg-btn:focus-visible,
.retry-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.legend-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
  font-size: 11px;
  color: var(--dim);
}

.legend-list li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 20px;
  font-variant-numeric: tabular-nums;
}

.sw {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  flex: 0 0 auto;
}

.sw-1 { background: #38bdf8; }
.sw-2 { background: #34d399; }
.sw-3 { background: #facc15; }
.sw-4 { background: #fb923c; }
.sw-5 { background: #f43f5e; }
.sw-6 { background: #ec4899; }
.sw-7 { background: #d946ef; }
.sw-8 { background: #c026d3; }
.sw-vhf { background: #38bdf8; }
.sw-uhf { background: #fb923c; }
.sw-both { background: #5eead4; }

.coverage-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px 8px;
  margin: 0;
  padding-top: 9px;
  border-top: 1px solid rgba(140, 190, 205, 0.1);
}

.coverage-stats div { min-width: 0; }

.coverage-stats dt {
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coverage-stats dd {
  margin-top: 1px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.panel-note.is-bad { color: var(--crit); }

.retry-btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  margin: 0 0 10px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid rgba(253, 164, 175, 0.32);
  background: rgba(253, 164, 175, 0.08);
  color: #ffd7dc;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  touch-action: manipulation;
}

.retry-btn:hover { background: rgba(253, 164, 175, 0.14); }

.retry-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.panel-tip {
  margin-top: 10px;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--faint);
}

.panel-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(140, 190, 205, 0.1);
  font-size: 10.5px;
  color: var(--faint);
}

.panel-foot a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* карточка станции */

.station-card {
  padding: 10px 11px;
  border: 1px solid rgba(94, 234, 212, 0.22);
  border-radius: 12px;
  background: rgba(94, 234, 212, 0.05);
}

.station-kicker {
  font-size: 9px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--faint);
}

.station-name {
  margin-top: 3px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.station-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 10px;
  margin-top: 9px;
}

.station-meta div { min-width: 0; }

.station-meta dt {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.station-meta dd {
  margin-top: 1px;
  font-size: 12.5px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.station-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

/* список частот */

.freq-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.freq-item {
  display: grid;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10, 22, 30, 0.62);
}

.freq-item.is-dead { opacity: 0.55; }

.freq-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.freq-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.freq-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  flex: 0 0 auto;
}

.freq-tag {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}

.freq-tag.is-live {
  color: var(--accent);
  border-color: rgba(94, 234, 212, 0.3);
}

.freq-tag.is-dead {
  color: var(--warn);
  border-color: rgba(252, 211, 77, 0.3);
}

.freq-sub {
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--faint);
  overflow-wrap: anywhere;
}

.freq-freqs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.freq-copy {
  -webkit-appearance: none;
  appearance: none;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid rgba(94, 234, 212, 0.28);
  border-radius: 9px;
  background: rgba(94, 234, 212, 0.07);
  color: #d7fff8;
  font: inherit;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  cursor: pointer;
  touch-action: manipulation;
}

.freq-copy:hover { background: rgba(94, 234, 212, 0.14); }

.freq-empty {
  font-size: 11px;
  color: var(--faint);
}

#val-zone { color: #d9fff8; }

@media (min-width: 900px) {
  .panel {
    left: auto;
    right: 12px;
    top: 12px;
    bottom: auto;
    width: min(360px, 38vw);
    max-height: min(560px, calc(100% - 236px));
    transform: translateX(calc(100% + 28px));
  }

  .panel.is-open { transform: translateX(0); }
}

/* ---------- адаптив ---------- */

@media (max-width: 430px) {
  .btn { font-size: 11px; padding: 7px 4px; }
  .hud { gap: 5px 10px; margin-top: 8px; padding-top: 7px; }
  .hud dt { font-size: 8.5px; }
  .hud dd { font-size: 13px; }
  .dock { padding-top: 14px; }
  .dock-inner { padding: 8px; }
}

@media (max-width: 359px) {
  .brand-title { font-size: 13px; }
  .btn { font-size: 10px; padding: 6px 3px; letter-spacing: 0; }
  .hud dd { font-size: 12px; }
  .hud dt { font-size: 8px; letter-spacing: 0.07em; }
  .dock { padding-left: 8px; padding-right: 8px; }
  .dock-inner { padding: 7px; }
  .dock-foot { font-size: 9px; }
}

@media (max-height: 620px) and (orientation: landscape) {
  .topbar { padding-top: calc(4px + env(safe-area-inset-top)); }
  .dock { padding-top: 12px; }
  .dock-inner { padding: 8px; }
  .hud { gap: 4px 10px; margin-top: 7px; padding-top: 7px; }
  .hud dt { font-size: 8px; }
  .hud dd { font-size: 12px; }
  .btn { min-height: 38px; }
  .dock-foot { margin-top: 5px; font-size: 9.5px; }
}

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

@media (prefers-contrast: more) {
  :root { --dim: #b8cbd9; --faint: #93a8b7; --line: rgba(160, 205, 220, 0.32); }
}
