/* Skywave · ink, paper and phosphor */
/* Windows has no flag emoji: borrow Twemoji's flags for the regional-indicator range only. */
@font-face {
  font-family: 'Flags';
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E007F;
  src: url('https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2') format('woff2');
  font-display: swap;
}
:root {
  --ink: #07090f;
  --ink-2: #0b0f19;
  --ink-3: #111726;
  --line: rgba(233, 223, 201, 0.09);
  --line-2: rgba(233, 223, 201, 0.16);
  --paper: #ece3cf;
  --paper-2: #c9c0ad;
  --dim: #878171;
  --amber: #ffb547;
  --amber-2: #ffcf85;
  --amber-glow: rgba(255, 181, 71, 0.18);
  --cyan: #79d2cc;
  --rose: #ef7a68;
  --leaf: #9fcf8a;
  --serif: 'Flags', 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Flags', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --panel-w: 420px;
  --dock-h: 156px;
  --r: 10px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--ink); color: var(--paper); font: 14px/1.45 var(--sans);
  display: grid; grid-template-rows: auto 1fr auto; overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--amber-2); }
kbd {
  font: 11px var(--mono); color: var(--dim); border: 1px solid var(--line-2);
  border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--ink-2);
}
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
:focus-visible { outline: 1.5px solid var(--amber); outline-offset: 2px; }

.grain {
  position: fixed; inset: -50%; pointer-events: none; z-index: 50; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- header ---------- */
.top {
  display: flex; align-items: center; gap: 28px; padding: 12px 22px;
  border-bottom: 1px solid var(--line); background: linear-gradient(var(--ink-2), var(--ink));
  position: relative; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 210px; }
.brand-mark { width: 44px; color: var(--amber); filter: drop-shadow(0 0 6px var(--amber-glow)); }
.brand h1 { font: italic 400 26px/1 var(--serif); letter-spacing: 0.01em; margin: 0; font-variation-settings: 'opsz' 96; }
.tagline { margin: 3px 0 0; font: 11px var(--mono); color: var(--dim); letter-spacing: 0.08em; text-transform: lowercase; }

.modes { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--ink-2); }
.modes button {
  border: 0; background: none; padding: 7px 16px; border-radius: 999px; color: var(--paper-2);
  display: flex; align-items: center; gap: 8px; letter-spacing: 0.01em;
}
.modes button .k { font: 10px var(--mono); color: var(--dim); }
.modes button[aria-selected='true'] { background: var(--paper); color: var(--ink); }
.modes button[aria-selected='true'] .k { color: #6b6455; }

.clocks { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.clock { display: flex; flex-direction: column; align-items: flex-end; }
.clock .lbl { font: 10px var(--mono); color: var(--dim); letter-spacing: 0.12em; text-transform: uppercase; }
.clock .mono { font-size: 19px; letter-spacing: 0.04em; }
#utc { color: var(--amber); text-shadow: 0 0 12px var(--amber-glow); }
.sky-chip {
  display: flex; align-items: center; gap: 9px; max-width: 360px; text-align: left;
  border: 1px solid var(--line-2); background: var(--ink-2); border-radius: 999px; padding: 6px 14px 6px 10px;
  color: var(--paper-2); font-size: 12.5px;
}
.sky-chip:hover { border-color: var(--amber); }
.sky-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 35%, #fff1c9, var(--amber) 60%, #a5611a); box-shadow: 0 0 10px var(--amber-glow); }
.sky-chip[data-mood='night'] .sky-dot { background: radial-gradient(circle at 65% 35%, transparent 40%, #dfe6ff 42%); box-shadow: none; transform: rotate(-20deg); }
.sky-chip[data-mood='grey'] .sky-dot { background: linear-gradient(180deg, var(--amber) 50%, #2a3350 50%); }
#sky-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- stage ---------- */
.stage { display: grid; grid-template-columns: 1fr var(--panel-w); min-height: 0; }
.atlas { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #070a12; }
#map { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#map.dragging { cursor: grabbing; }
#map .country { fill: #182033; stroke: #2a3550; stroke-width: 0.35; vector-effect: non-scaling-stroke; transition: fill 0.25s; }
body[data-mode='broadcast'] #map .country { cursor: pointer; }
#map .country.has { fill: color-mix(in srgb, #182033, var(--amber) calc(var(--d, 0) * 40%)); }
#map .country:hover { fill: #2a3757; }
body[data-mode='broadcast'] #map .country.has:hover { fill: color-mix(in srgb, #2a3757, var(--amber) 45%); }
#map .country.sel { fill: color-mix(in srgb, #2a3757, var(--amber) 55%) !important; stroke: var(--amber-2); stroke-width: 0.9; }
#graticule path { fill: none; stroke: rgba(236, 227, 207, 0.05); stroke-width: 0.5; vector-effect: non-scaling-stroke; }
#graticule path.eq { stroke: rgba(236, 227, 207, 0.09); stroke-dasharray: 3 4; }
#night { pointer-events: none; mix-blend-mode: normal; }
#paths path { fill: none; vector-effect: non-scaling-stroke; pointer-events: none; }
#paths .arc { stroke: var(--amber); stroke-width: 1.6; stroke-dasharray: 2 5; stroke-linecap: round; filter: url(#glow); animation: flow 1.2s linear infinite; }
#paths .arc.me { stroke: var(--cyan); stroke-width: 1.1; opacity: 0.8; }
#paths .hop { fill: var(--amber); }
@keyframes flow { to { stroke-dashoffset: -14; } }
.tx { fill: var(--amber); fill-opacity: 0.85; stroke: #000; stroke-opacity: 0.4; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill-opacity 0.2s; }
.tx:hover, .tx.sel { fill: #fff1c9; fill-opacity: 1; }
.tx-halo { fill: var(--amber); fill-opacity: 0.12; pointer-events: none; }
.rx { fill: var(--cyan); fill-opacity: 0.35; cursor: pointer; }
.rx:hover { fill-opacity: 1; }
.rx.pick { fill-opacity: 1; stroke: var(--cyan); stroke-width: 1; stroke-opacity: 0.6; vector-effect: non-scaling-stroke; }
.rx.busy { fill: var(--dim); }
.atlas.no-rx #rx-layer { display: none; }
.pin { fill: none; stroke: var(--amber-2); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.pin-core { fill: var(--amber-2); }
.ping { fill: none; stroke: var(--amber); vector-effect: non-scaling-stroke; animation: ping 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ping { from { transform: scale(0.4); opacity: 0.9; } to { transform: scale(4); opacity: 0; } }
.home { fill: var(--cyan); stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.home-ring { fill: none; stroke: var(--cyan); stroke-opacity: 0.5; vector-effect: non-scaling-stroke; stroke-dasharray: 2 2; }
.sun { fill: #fff1c9; filter: url(#glow); }
.sun-ray { stroke: var(--amber); stroke-width: 0.8; vector-effect: non-scaling-stroke; opacity: 0.7; }
.atlas.picking #map { cursor: crosshair; }

.map-tip {
  position: absolute; pointer-events: none; z-index: 3; transform: translate(-50%, calc(-100% - 12px));
  background: rgba(7, 9, 15, 0.92); border: 1px solid var(--line-2); padding: 6px 10px; border-radius: 8px;
  font-size: 12px; white-space: nowrap; backdrop-filter: blur(6px);
}
.map-tip b { font-weight: 600; }
.map-tip .d { color: var(--dim); font-family: var(--mono); font-size: 11px; }
.map-tools { position: absolute; top: 14px; left: 14px; display: flex; flex-direction: column; gap: 4px; }
.map-tools button {
  min-width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-2);
  background: rgba(11, 15, 25, 0.82); color: var(--paper-2); font: 13px var(--mono); backdrop-filter: blur(6px);
}
.map-tools button:hover { color: var(--amber); border-color: var(--amber); }
.map-tools #toggle-rx { font-size: 10px; letter-spacing: 0.05em; margin-top: 6px; }
.map-tools #toggle-rx.on { color: var(--cyan); border-color: rgba(121, 210, 204, 0.5); }
.legend {
  position: absolute; left: 16px; bottom: 14px; display: flex; gap: 16px; align-items: center;
  font: 11px var(--mono); color: var(--dim); pointer-events: none; text-shadow: 0 1px 2px #000;
}
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.legend .grey { background: linear-gradient(90deg, transparent, var(--amber), transparent); width: 22px; height: 3px; border-radius: 2px; vertical-align: 2px; }

/* ---------- panel ---------- */
.panel { border-left: 1px solid var(--line); background: var(--ink-2); display: flex; min-height: 0; flex-direction: column; }
.view { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.panel-head { padding: 16px 18px 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 11px; }
.crumbs { display: flex; align-items: baseline; gap: 10px; min-height: 34px; }
.crumbs .flag { font-family: 'Flags', system-ui; font-size: 26px; line-height: 1; }
.crumbs h2 { margin: 0; font: 400 24px/1.1 var(--serif); font-variation-settings: 'opsz' 72; }
.crumbs .count { font: 11px var(--mono); color: var(--dim); }
.crumbs button.back { border: 0; background: none; color: var(--dim); padding: 0; font: 12px var(--mono); }
.crumbs button.back:hover { color: var(--amber); }
.search { position: relative; }
.search input {
  width: 100%; background: var(--ink); border: 1px solid var(--line-2); border-radius: 9px; padding: 9px 36px 9px 12px; outline: none;
}
.search input:focus { border-color: var(--amber); }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line-2); background: none; border-radius: 999px; padding: 3px 11px; font-size: 12px; color: var(--paper-2);
}
.chip:hover { border-color: var(--paper-2); }
.chip[aria-pressed='true'] { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.chip.good { border-color: rgba(159, 207, 138, 0.5); color: var(--leaf); }

.list { overflow-y: auto; flex: 1; min-height: 0; padding: 6px 0 20px; scrollbar-width: thin; scrollbar-color: #2a3147 transparent; }
.sec-label { padding: 14px 18px 6px; font: 10.5px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.row-item {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; width: 100%;
  padding: 8px 18px; border: 0; background: none; text-align: left; border-left: 2px solid transparent;
}
.row-item:hover { background: rgba(236, 227, 207, 0.04); }
.row-item.active { background: linear-gradient(90deg, rgba(255, 181, 71, 0.12), transparent 70%); border-left-color: var(--amber); }
.row-item .logo {
  width: 40px; height: 40px; border-radius: 8px; background: var(--ink-3) center/cover no-repeat; display: grid; place-items: center;
  font: italic 500 17px var(--serif); color: var(--amber-2); overflow: hidden; border: 1px solid var(--line);
}
.row-item .logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.row-item .t { min-width: 0; }
.row-item .n { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-item .s { color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-item .r { font: 11px var(--mono); color: var(--dim); text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.row-item .r .ext { color: var(--paper-2); }
.row-item .fav-on { color: var(--amber); }
.country-row .logo { font: 24px/1 'Flags', system-ui; background: none; border: 0; }
.bar { display: inline-block; height: 3px; border-radius: 2px; background: var(--amber); opacity: 0.55; }

/* shortwave rows */
.sw-head { display: flex; justify-content: space-between; align-items: flex-start; }
.sw-title { margin: 0; font: 400 24px/1.1 var(--serif); font-variation-settings: 'opsz' 72; }
.sw-sub { margin: 4px 0 0; color: var(--dim); font-size: 12px; }
.sw-filters { display: grid; grid-template-columns: 1fr 140px; gap: 8px; }
.sw-filters select { background: var(--ink); border: 1px solid var(--line-2); border-radius: 9px; padding: 0 8px; }
.toggle { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--paper-2); cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--amber); }
.ribbon { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; height: 54px; }
.band {
  position: relative; border: 1px solid var(--line); border-radius: 6px; background: var(--ink); padding: 0; overflow: hidden;
}
.band:hover { border-color: var(--line-2); }
.band[aria-pressed='true'] { border-color: var(--amber); background: #15110a; }
.band .lbl { position: absolute; left: 0; right: 0; bottom: 3px; font: 9.5px var(--mono); color: var(--dim); text-align: center; }
.band.good .lbl { color: var(--leaf); }
.band.good::after { content: ''; position: absolute; top: 3px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--leaf); }
.band canvas { position: absolute; inset: 9px 2px 15px; width: calc(100% - 4px); height: calc(100% - 24px); }
.sw-row { grid-template-columns: 78px 1fr auto; }
.sw-row .f { font: 500 16px var(--mono); color: var(--amber); letter-spacing: 0.02em; }
.sw-row .f small { display: block; font-size: 10px; color: var(--dim); font-weight: 400; }
.sw-row .score { display: inline-flex; gap: 2px; }
.sw-row .score i { width: 3px; height: 9px; background: var(--line-2); border-radius: 1px; }
.sw-row .score i.on { background: var(--leaf); }
.sw-detail { border-bottom: 1px solid var(--line); padding: 14px 18px 16px; max-height: 52%; overflow-y: auto; flex: none; scrollbar-width: thin; background: linear-gradient(180deg, #12100b, transparent); }
.sw-detail .hd { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.sw-detail .hd h3 { margin: 0; font: 400 21px/1.15 var(--serif); }
.sw-detail .hd .f { font: 500 22px var(--mono); color: var(--amber); text-shadow: 0 0 14px var(--amber-glow); white-space: nowrap; }
.sw-detail .facts { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 10px 0 12px; font-size: 12.5px; }
.sw-detail .facts dt { color: var(--dim); font: 11px/1.7 var(--mono); }
.sw-detail .facts dd { margin: 0; }
.sw-detail .rxs { display: flex; flex-direction: column; gap: 6px; }
.rx-btn {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; border: 1px solid var(--line-2); background: var(--ink);
  border-radius: 9px; padding: 8px 11px; text-decoration: none; color: var(--paper);
}
.rx-btn:hover { border-color: var(--cyan); }
.rx-btn .a { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rx-btn .b { font: 11px var(--mono); color: var(--dim); grid-column: 1; }
.rx-btn .c { grid-row: 1 / span 2; grid-column: 2; align-self: center; font: 11px var(--mono); color: var(--cyan); }
.sw-detail .alt { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.btn {
  border: 1px solid var(--amber); background: var(--amber); color: var(--ink); border-radius: 8px; padding: 6px 12px; font-size: 12.5px;
  text-decoration: none; display: inline-flex; gap: 6px; align-items: center;
}
.btn.ghost { background: none; color: var(--paper-2); border-color: var(--line-2); }
.btn.ghost:hover { color: var(--amber); border-color: var(--amber); }
.empty { padding: 40px 24px; color: var(--dim); text-align: center; font-family: var(--serif); font-style: italic; font-size: 16px; }
.empty small { display: block; font: 12px var(--sans); font-style: normal; margin-top: 8px; }

/* ---------- sdr drawer ---------- */
.sdr-drawer {
  position: fixed; left: 0; right: var(--panel-w); bottom: var(--dock-h); height: min(58vh, 560px); z-index: 8;
  background: var(--ink); border-top: 1px solid var(--cyan); box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.6); display: flex; flex-direction: column;
}
.sdr-bar { display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-bottom: 1px solid var(--line); }
.sdr-title { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 8px var(--rose); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: 0.35; } }
.sdr-drawer iframe { flex: 1; border: 0; width: 100%; background: #000; }

/* ---------- dock ---------- */
.dock {
  height: var(--dock-h); border-top: 1px solid var(--line); background: linear-gradient(180deg, #0d1220, var(--ink));
  display: grid; grid-template-columns: minmax(300px, 1.1fr) 2fr; grid-template-rows: 64px 1fr; position: relative; z-index: 9;
}
.dial-wrap { grid-column: 1 / -1; grid-row: 1; position: relative; border-bottom: 1px solid var(--line); background: #0a0806; overflow: hidden; }
.dial-wrap::before, .dial-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 18%; z-index: 1; pointer-events: none;
}
.dial-wrap::before { left: 0; background: linear-gradient(90deg, #0a0806, transparent); }
.dial-wrap::after { right: 0; background: linear-gradient(270deg, #0a0806, transparent); }
#dial { width: 100%; height: 100%; display: block; cursor: ew-resize; touch-action: none; }
.needle {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--rose); z-index: 2; pointer-events: none;
  box-shadow: 0 0 10px var(--rose), 0 0 2px var(--rose);
}
.needle::before { content: ''; position: absolute; top: 0; left: -5px; border: 6px solid transparent; border-top-color: var(--rose); }
.display { grid-row: 2; display: flex; align-items: center; gap: 14px; padding: 0 18px; min-width: 0; border-right: 1px solid var(--line); }
#scope { width: 120px; height: 56px; flex: none; border-radius: 6px; background: #050403; border: 1px solid var(--line); }
.np { min-width: 0; }
.np-line1 { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.np-freq { color: var(--amber); font-size: 15px; white-space: nowrap; }
.np-freq:empty { display: none; }
.np-name { font: 400 21px/1.2 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-line2 { color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.controls { grid-row: 2; grid-column: 2; display: flex; align-items: center; gap: 8px; padding: 0 18px; min-width: 0; }
.ctl {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--ink-2); display: grid; place-items: center; flex: none;
  position: relative; color: var(--paper-2);
}
.ctl:hover { color: var(--amber); border-color: var(--amber); }
.ctl svg { width: 17px; height: 17px; fill: currentColor; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.ctl.wide { width: auto; border-radius: 999px; padding: 0 14px; display: flex; gap: 7px; }
.ctl.wide svg { fill: none; }
.ctl.big { width: 52px; height: 52px; background: var(--amber); border-color: var(--amber); color: var(--ink); box-shadow: 0 0 24px var(--amber-glow); }
.ctl.big:hover { color: var(--ink); background: var(--amber-2); }
.ctl.big svg { width: 20px; height: 20px; }
.ctl .i-stop, body.playing .ctl .i-play { display: none; }
body.playing .ctl .i-stop { display: block; }
.spinner { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--amber-2); opacity: 0; }
body.tuning .spinner { opacity: 1; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#btn-fav svg { fill: none; }
#btn-fav.on { color: var(--amber); border-color: var(--amber); }
#btn-fav.on svg { fill: var(--amber); }
.knobs { margin-left: auto; display: flex; gap: 16px; align-items: center; }
.knobs label { display: flex; flex-direction: column; gap: 2px; font: 10px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em; }
.knobs label.toggle { flex-direction: row; text-transform: none; letter-spacing: 0; font: 12px var(--sans); }
input[type='range'] { -webkit-appearance: none; appearance: none; width: 92px; height: 3px; background: var(--line-2); border-radius: 2px; outline: none; }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: var(--paper); border: 0; }
input[type='range']::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: var(--paper); border: 0; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--dock-h) + 16px); transform: translate(-50%, 20px); opacity: 0; transition: 0.3s;
  background: var(--paper); color: var(--ink); padding: 9px 16px; border-radius: 999px; font-size: 13px; z-index: 20; pointer-events: none; max-width: 80vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

dialog.sheet { border: 1px solid var(--line-2); background: var(--ink-2); color: var(--paper); border-radius: 14px; padding: 22px 24px; width: min(440px, 92vw); }
dialog.sheet::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); }
dialog h3 { font: 400 22px var(--serif); margin: 0 0 8px; }
dialog p { color: var(--paper-2); }
dialog .fine { font-size: 12px; color: var(--dim); }
dialog .row { display: flex; gap: 8px; margin: 12px 0; }
dialog .row.end { justify-content: flex-end; margin-bottom: 0; }
.keys { display: grid; grid-template-columns: 80px 1fr; gap: 6px 10px; margin: 12px 0; }
.keys dt { font-family: var(--mono); color: var(--amber); }
.keys dd { margin: 0; color: var(--paper-2); }

/* ---------- small screens ---------- */
@media (max-width: 1100px) {
  :root { --panel-w: 360px; }
  .sky-chip { max-width: 220px; }
  .knobs label:not(.toggle) input { width: 64px; }
}
@media (max-width: 820px) {
  :root { --dock-h: 190px; }
  body { overflow: auto; grid-template-rows: auto auto auto; height: auto; }
  .top { flex-wrap: wrap; gap: 12px; padding: 10px 14px; }
  .brand { min-width: 0; }
  .clocks { margin-left: 0; width: 100%; justify-content: space-between; gap: 12px; }
  .sky-chip { max-width: 55vw; }
  .stage { grid-template-columns: 1fr; }
  .atlas { height: 46vw; min-height: 220px; }
  .panel { border-left: 0; border-top: 1px solid var(--line); height: calc(100vh - var(--dock-h) - 60px); }
  .dock { position: sticky; bottom: 0; grid-template-columns: 1fr; grid-template-rows: 58px auto auto; }
  .display { grid-row: 2; }
  .controls { grid-row: 3; grid-column: 1; }
  .display { border-right: 0; padding: 8px 14px 0; }
  #scope { width: 80px; height: 40px; }
  .controls { padding: 6px 14px 10px; }
  .knobs { gap: 10px; }
  .knobs label:not(.toggle) span { display: none; }
  .sdr-drawer { right: 0; }
  .legend { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
