@font-face {
  font-family: "Afterwave Mono";
  src: url("assets/plex-mono-cyrillic.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Afterwave Display";
  src: url("assets/manrope-cyrillic.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Afterwave Mono";
  src: url("assets/plex-mono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2191, U+2193, U+2212;
}

@font-face {
  font-family: "Afterwave Display";
  src: url("assets/space-grotesk.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2191, U+2193, U+2212;
}

:root {
  color-scheme: dark;
  font-family: "Afterwave Mono", "IBM Plex Mono", "Lucida Console", monospace;
  background: #100b07;
  font-synthesis: weight;
  --texture: url("assets/grain.png");
  --display-font: "Afterwave Display", "Space Grotesk", "DIN Alternate", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-width: 280px; margin: 0; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
button:disabled { cursor: default; }
p, h1, h2, h3, dl, dd { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.screen {
  --signal: 255, 137, 54;
  --light: 255, 188, 119;
  --tube: 85, 46, 14;
  --ink: rgb(var(--light));
  --strong: rgb(var(--signal));
  --muted: color-mix(in srgb, var(--ink) 61%, #1f130a);
  --line: rgba(var(--signal), .31);
  --quiet-line: rgba(var(--signal), .17);
  --trace-glow: rgba(var(--signal), .36);
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  background: radial-gradient(ellipse 100% 110% at 43% 48%, rgba(var(--tube), .27), transparent 76%), #100b07;
  color: var(--ink);
  box-shadow: inset 0 0 45px 4px #0006;
  text-shadow: 0 0 9px rgba(var(--signal), .34);
}
.screen[data-phosphor="green"] { --signal: 140, 204, 103; --light: 188, 229, 151; --tube: 42, 71, 27; background-color: #0a0f08; }
.terminal {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  padding: clamp(15px, 3.7vh, 38px) clamp(16px, 4vw, 70px);
  filter: brightness(var(--brightness, 1));
}
.crt-layer, .glass-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit; }
.crt-layer {
  background: radial-gradient(ellipse at center, transparent 60%, #08050325 78%, #0007 100%);
  box-shadow: inset 0 1px 5px #040301, inset 0 -1px 3px #000;
}
.crt-layer::before {
  position: absolute; inset: 0; content: ""; border-radius: inherit;
  background: repeating-linear-gradient(0deg, #0000 0 2px, #05030055 2px 3px, #08050028 3px 4px);
  opacity: .47;
}
.crt-layer::after { position: absolute; inset: 0; content: ""; border-radius: inherit; background: var(--texture); mix-blend-mode: screen; opacity: .033; }
.screen[data-scanlines="false"] .crt-layer::before { display: none; }
.glass-layer {
  background:
    radial-gradient(ellipse 65% 6% at 44% 1%, #fff2cf31, transparent 100%),
    radial-gradient(ellipse 52% 10% at 57% 101%, #fbb7702b, transparent 100%),
    radial-gradient(ellipse 6% 33% at 0 20%, #fcd9a219, transparent 100%),
    linear-gradient(161deg, transparent 7%, #ffe2b207 15%, #ffc4850c 27%, transparent 37% 63%, #fcd29b06 72%, transparent 92%);
  box-shadow: inset 0 1px 2px #ffe2b534, inset 0 -1px 2px #ffcc8129, inset 7px 0 11px #20110740, inset -7px 0 13px #0006;
}
.screen[data-glass="false"] .glass-layer { display: none; }
.terminal-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 49px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.tablist { display: flex; gap: 5px; }
.header-readout { display: flex; align-items: center; justify-content: flex-end; gap: 15px; }
.header-readout time { color: var(--muted); font-size: .69rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tablist button {
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  min-height: 34px;
  padding: 0 15px;
  color: var(--muted);
  line-height: 1;
  font-size: .77rem;
  text-transform: uppercase;
  letter-spacing: .10em;
  transition: background .16s, color .16s, border-color .16s;
}
.tablist button:hover, .tablist button:focus-visible { color: var(--ink); border-color: var(--line); }
.tablist button[aria-selected="true"] { border-color: var(--strong); background: var(--strong); color: #231307; font-weight: 700; text-shadow: none; box-shadow: 0 0 13px rgba(var(--signal), .19); }
.screen-status { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 5px 9px; border: 1px solid var(--quiet-line); color: var(--ink); font-size: .68rem; letter-spacing: .10em; line-height: 1; white-space: nowrap; }
.screen-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--strong); box-shadow: 0 0 8px var(--strong); }
.screen-status[data-state="loading"] i, .screen-status[data-state="playing"] i { animation: beacon 2s ease-in-out infinite; }
.screen-status[data-state="paused"] i, .screen-status[data-state="error"] i { background: transparent; border: 1px solid var(--strong); box-shadow: none; }
@keyframes beacon { 48% { opacity: .37; } }

.panel-layout { display: grid; grid-template-columns: minmax(0, 2.14fr) minmax(0, 1fr); column-gap: 23px; padding-block: clamp(20px, 3.7vh, 38px) 20px; }
.main-pane, .side-pane { min-width: 0; }
.monitor { display: flex; flex-direction: column; }
.side-pane { border-left: 1px solid var(--line); padding-left: 22px; }
.pane-heading { margin-bottom: 16px; }
.monitor-heading-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.monitor-views button { flex: 0 0 auto; }
.eyebrow, .source-line, .section-title, .readout, .instrument-top, .transport-label { font-size: .70rem; letter-spacing: .105em; }
.eyebrow { display: flex; align-items: center; gap: 7px; color: var(--strong); font-weight: 600; line-height: 1.1; }
.crosshair { display: inline-block; position: relative; width: 10px; height: 10px; border: 1px solid currentColor; border-radius: 50%; }
.crosshair::before, .crosshair::after { position: absolute; content: ""; background: currentColor; }
.crosshair::before { width: 12px; height: 1px; top: 3.5px; left: -2px; }
.crosshair::after { height: 12px; width: 1px; left: 3.5px; top: -2px; }
.pane-heading h1, .pane-heading h2 {
  color: var(--ink);
  font: 700 clamp(1.95rem, 4.04vw, 3.52rem)/.99 var(--display-font);
  letter-spacing: -.035em;
  margin: 9px 0 9px;
  overflow-wrap: anywhere;
  text-shadow: 0 0 17px rgba(var(--signal), .28);
}
.source-line { display: flex; gap: 10px; min-width: 0; align-items: baseline; color: var(--muted); line-height: 1.25; }
.source-line [data-source-name] { color: var(--ink); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-transform: uppercase; }

.instrument {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  flex: 1;
  min-width: 0;
  padding: 10px 12px 9px;
  position: relative;
  border: 1px solid var(--line);
  background: radial-gradient(ellipse at center, rgba(var(--signal), .046), transparent 82%), #100b0666;
}
.instrument::before, .instrument::after { position: absolute; width: 8px; height: 8px; pointer-events: none; content: ""; }
.instrument::before { top: -1px; left: -1px; border-top: 1px solid var(--strong); border-left: 1px solid var(--strong); }
.instrument::after { bottom: -1px; right: -1px; border-bottom: 1px solid var(--strong); border-right: 1px solid var(--strong); }
.instrument-top { display: flex; justify-content: space-between; gap: 7px; align-items: center; color: var(--muted); font-size: .635rem; margin-bottom: 9px; text-transform: uppercase; }
.instrument-top > span:first-child { display: flex; align-items: center; gap: 7px; color: var(--ink); }
.instrument-top b { display: inline-block; width: 5px; height: 5px; background: var(--strong); box-shadow: 0 0 6px var(--strong); }
.plot-layout { display: grid; grid-template-columns: 24px minmax(0, 1fr); }
.plot-labels { display: flex; justify-content: space-between; flex-direction: column; color: var(--muted); font-size: .64rem; line-height: 1; }
.plot {
  position: relative;
  overflow: hidden;
  min-height: clamp(175px, 27vh, 260px);
  border: 1px solid var(--quiet-line);
  background-image: linear-gradient(to bottom, var(--quiet-line) 1px, transparent 1px), linear-gradient(to right, var(--quiet-line) 1px, transparent 1px), radial-gradient(rgba(var(--signal), .21) .7px, transparent 1px);
  background-size: 100% 25%, 12.5% 100%, 6px 6px;
  background-position: left top, left top, center center;
}
.plot canvas { position: absolute; width: 100%; height: 100%; display: block; }
.plot-sweep {
  position: absolute;
  inset: 0 auto 0 -9%;
  width: 9%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(var(--signal), .11) 95%, rgba(var(--signal), .27));
  opacity: 0;
}
.instrument.is-scanning .plot-sweep { animation: sweep 5.3s linear infinite; }
@keyframes sweep {
  0% { left: -9%; opacity: .06; }
  15%, 83% { opacity: .72; }
  100% { left: 100%; opacity: 0; }
}
.plot-axis { position: relative; height: .65rem; margin: 6px 0 0 24px; color: var(--muted); font-size: .64rem; font-variant-numeric: tabular-nums; line-height: 1; }
.plot-axis > span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.plot-axis > span:first-child { transform: none; }
.plot-axis > span:last-child { transform: translateX(-100%); }

.monitor-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 15px; margin-top: 12px; }
.readout { display: flex; flex: 1 1 236px; align-items: center; gap: 10px; color: var(--muted); white-space: nowrap; }
.level-bar { display: grid; grid-template-columns: repeat(24,1fr); gap: 3px; flex: 1; max-width: 202px; }
.level-bar i { height: 6px; background: var(--quiet-line); }
.level-bar i.lit { background: var(--strong); box-shadow: 0 0 5px var(--trace-glow); }
.level-value { color: var(--ink); font-variant-numeric: tabular-nums; }
.trace-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 5px; max-width: 100%; }
.trace-details { position: relative; }
.trace-details summary, .map-actions button, .map-station button {
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(var(--signal), .055);
  color: var(--ink);
  font-size: .72rem;
  white-space: nowrap;
}
.trace-details summary { cursor: pointer; }
.trace-details summary:hover, .trace-details[open] summary, .map-actions button:hover:not(:disabled), .map-station button:hover {
  border-color: var(--strong);
  background-color: rgba(var(--signal), .14);
}
.trace-details summary output { color: var(--strong); }
.trace-settings {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: calc(100% + 6px);
  width: 273px;
  max-width: calc(100vw - 32px);
  padding: 12px;
  border: 1px solid var(--line);
  background: rgb(14, 11, 8);
  box-shadow: 0 6px 22px #0009;
}
.screen[data-phosphor="green"] .trace-settings { background: #0c100a; }
.trace-settings .setting-range { margin: 0 0 6px; }
.trace-settings .telemetry { margin: 0; }

.map-toolbar, .map-toolbar-caption, .map-actions, .map-footer, .map-station { display: flex; align-items: center; gap: 7px; min-width: 0; }
.map-toolbar { flex-wrap: wrap; justify-content: space-between; margin-bottom: 9px; }
.map-toolbar-caption { color: var(--muted); font-size: .64rem; letter-spacing: .1em; }
.map-toolbar-caption i { width: 5px; height: 5px; background: var(--strong); box-shadow: 0 0 6px var(--strong); }
.map-actions { flex-wrap: wrap; gap: 4px; }
.map-actions button[aria-pressed="true"] { border-color: var(--strong); }
.map-actions button:disabled { opacity: .48; cursor: default; }
.map-plot { position: relative; min-height: clamp(205px, 34vh, 360px); border: 1px solid var(--quiet-line); background: radial-gradient(ellipse, rgba(var(--signal), .055), transparent 85%); }
.map-plot canvas { display: block; position: absolute; width: 100%; height: 100%; cursor: crosshair; }
.map-plot canvas.is-target { cursor: pointer; }
.map-plot canvas:focus-visible { outline: 1px solid var(--strong); outline-offset: -1px; }
.map-footer { flex-wrap: wrap; justify-content: space-between; min-height: 32px; padding-top: 8px; }
.map-readout { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 9px; min-width: 0; color: var(--muted); font-size: .66rem; }
.map-readout strong { color: var(--ink); text-transform: uppercase; letter-spacing: .06em; }
.map-station { flex: 0 1 250px; }
.map-station select { min-width: 0; flex: 1; }

.section-title { margin-bottom: 9px; display: flex; justify-content: space-between; gap: 7px; align-items: flex-start; color: var(--muted); }
.section-title h2, .section-title h3 { font-size: inherit; letter-spacing: inherit; color: var(--ink); font-weight: 600; }
.section-title > :is(span, output) { font-size: .65rem; font-variant-numeric: tabular-nums; }
.catalog-view { margin-bottom: 8px; }
.catalog-view button { min-width: 0; }
#favorite-count { margin-left: 3px; opacity: .75; font-variant-numeric: tabular-nums; }
.catalog-controls { display: grid; gap: 6px; margin-bottom: 8px; }
.catalog-search { position: relative; color: var(--muted); }
.catalog-search::before, .catalog-search::after { position: absolute; content: ""; pointer-events: none; }
.catalog-search::before { top: 11px; left: 9px; width: 9px; height: 9px; border: 1px solid currentColor; border-radius: 50%; }
.catalog-search::after { top: 20px; left: 16px; width: 5px; height: 1px; background: currentColor; transform: rotate(45deg); }
.catalog-search input {
  display: block;
  width: 100%;
  min-height: 33px;
  padding: 5px 8px 5px 26px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(var(--signal), .045);
  color: var(--ink);
  font-size: .73rem;
}
.catalog-search input::placeholder { color: var(--muted); opacity: 1; }
.catalog-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.catalog-filters .language-select {
  width: 100%;
  min-height: 29px;
  padding-inline: 5px 17px;
  background-position: right 8px center, right 4px center, center;
  font-size: .66rem;
}
.catalog-empty { padding: 7px 4px; }
.station-list { display: grid; gap: 2px; }
.catalog-scroll {
  max-height: clamp(173px, 37vh, 280px);
  align-content: start;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  padding-right: 3px;
}
.catalog-scroll:focus-visible { outline: 1px solid var(--line); outline-offset: 2px; }
.station-row { display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: 4px; align-items: stretch; border-bottom: 1px solid var(--quiet-line); }
.station-row:last-child { border-bottom-color: transparent; }
.station {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr) 9px;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 39px;
  text-align: left;
  padding: 4px 7px;
  border: 1px solid transparent;
  border-bottom-color: var(--quiet-line);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  transition: background .14s, border-color .14s;
}
.station:last-child { border-bottom-color: transparent; }
.station-row .station:not([aria-pressed="true"]) { border-bottom-color: transparent; }
.station:hover, .station:focus-visible { border-color: var(--line); background: rgba(var(--signal), .075); }
.station[aria-pressed="true"] { border-color: var(--line); border-left-color: var(--strong); background: rgba(var(--signal), .145); box-shadow: inset 1px 0 var(--strong), inset 0 0 13px rgba(var(--signal), .06); }
.station-number { font-size: .68rem; color: var(--muted); }
.station-name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; font-size: .76rem; line-height: 1.15; letter-spacing: .035em; }
.station-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-top: 3px; color: var(--muted); font-size: .66rem; line-height: 1.15; letter-spacing: .015em; }
.station-genre { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.station-codecs { flex: 0 0 auto; white-space: nowrap; }
.station-light { width: 5px; height: 5px; border: 1px solid var(--line); border-radius: 50%; justify-self: center; }
.station[aria-pressed="true"] .station-light { background: var(--strong); border-color: var(--strong); box-shadow: 0 0 7px var(--strong); }
.station[aria-pressed="true"] .station-number { color: var(--ink); }
.favorite-button {
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1;
}
.favorite-button::before { content: "☆"; }
.favorite-button[aria-pressed="true"] { color: var(--strong); text-shadow: 0 0 8px var(--trace-glow); }
.favorite-button[aria-pressed="true"]::before { content: "★"; }
.favorite-button:hover { border-color: var(--line); color: var(--ink); }
.catalog-scroll :is(.station, .favorite-button):focus-visible { outline-offset: -2px; }
.segmented button { border: 1px solid var(--line); border-radius: 2px; background: rgba(var(--signal), .03); color: var(--ink); }
.segmented button:hover { border-color: var(--strong); background: rgba(var(--signal), .12); }

.segmented { display: flex; gap: 4px; }
.segmented button { flex: 1; min-height: 34px; padding: 5px 8px; font-size: .74rem; }
.monitor-views button, .scope-modes button { min-height: 30px; white-space: nowrap; }
.scope-modes button { padding-inline: 6px; }
.segmented button[aria-pressed="true"] { background: var(--strong); border-color: var(--strong); color: #231307; font-weight: 700; }
.setting-range { display: grid; gap: 8px; margin-top: 18px; min-width: 0; color: var(--muted); font-size: .73rem; letter-spacing: .055em; }
.setting-range > span { display: flex; justify-content: space-between; gap: 9px; }
.setting-range output { color: var(--ink); }
.telemetry > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-block: 9px; border-bottom: 1px solid var(--quiet-line); font-size: .76rem; }
.telemetry dt { color: var(--muted); }
.telemetry dd { text-align: right; }
.muted-copy { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.6; }

.log { border: 1px solid var(--line); }
.log-list { max-height: 234px; overflow: auto; list-style: none; margin: 0; padding: 0; scrollbar-color: var(--line) transparent; }
.log-header, .log-list li { display: grid; grid-template-columns: minmax(56px, .8fr) minmax(101px, 1.4fr) minmax(0, 1.5fr); gap: 8px; padding: 10px 9px; font-size: .74rem; }
.log-header { background: rgba(var(--signal), .10); color: var(--muted); letter-spacing: .06em; }
.log-list li { border-top: 1px solid var(--quiet-line); }
.log-list li > :last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.settings-list { border: 1px solid var(--line); padding-inline: 12px; }
.setting-row { display: flex; min-height: 55px; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--quiet-line); font-size: .82rem; }
.language-select {
  appearance: none;
  max-width: 100%;
  min-height: 34px;
  padding: 4px 26px 4px 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--ink);
  background:
    linear-gradient(45deg, transparent 49%, var(--ink) 50% 68%, transparent 69%) right 12px center / 5px 5px no-repeat,
    linear-gradient(-45deg, transparent 49%, var(--ink) 50% 68%, transparent 69%) right 7px center / 5px 5px no-repeat,
    rgba(var(--signal), .06);
}
.language-select:hover { border-color: var(--strong); }
.setting-row .segmented { min-width: min(100%, 156px); }
.setting-row[for] { cursor: pointer; }
.brightness { padding-bottom: 13px; margin-top: 12px; }
.switch { appearance: none; position: relative; width: 34px; height: 18px; flex: 0 0 auto; margin: 0; border: 1px solid var(--line); border-radius: 2px; cursor: pointer; background: rgba(var(--signal), .08); }
.switch::before { position: absolute; inset: 3px auto 3px 3px; width: 10px; background: var(--muted); content: ""; transition: transform .16s; }
.switch:checked { border-color: var(--strong); }
.switch:checked::before { background: var(--strong); transform: translateX(16px); box-shadow: 0 0 7px var(--trace-glow); }

.transport { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding-top: 13px; border-top: 1px solid var(--line); }
.play-button { display: grid; place-items: center; width: 47px; height: 43px; border: 1px solid var(--strong); border-radius: 3px; background: var(--strong); color: #221307; box-shadow: 0 0 14px rgba(var(--signal), .24); }
.play-button:hover { background: var(--ink); }
.now-playing { min-width: 0; }
.transport-label { display: block; font-size: .64rem; line-height: 1; color: var(--muted); margin-bottom: 4px; }
.now-playing strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink); font-size: .85rem; font-weight: 600; }
.transport-controls { display: flex; align-items: center; gap: 8px; }
.mute-button, .fullscreen-button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid transparent; border-radius: 2px; background: transparent; color: var(--ink); }
.mute-button:hover, .fullscreen-button:hover { border-color: var(--line); }
.volume-control { display: flex; align-items: center; gap: 8px; }
.volume-control output { width: 4ch; text-align: right; font-size: .72rem; }
.range { --progress: 65%; appearance: none; display: block; width: 100%; height: 22px; margin: 0; background: transparent; cursor: pointer; accent-color: var(--strong); }
.volume-control .range { width: clamp(74px, 11vw, 135px); }
.range::-webkit-slider-runnable-track { height: 3px; border-radius: 1px; background: linear-gradient(to right, var(--strong) var(--progress), var(--line) var(--progress)); }
.range::-moz-range-track { height: 3px; border-radius: 1px; background: linear-gradient(to right, var(--strong) var(--progress), var(--line) var(--progress)); }
.range::-webkit-slider-thumb { appearance: none; width: 10px; height: 10px; margin-top: -3.5px; border: .5px solid var(--ink); background: var(--strong); transform: rotate(45deg); box-shadow: 0 0 7px var(--trace-glow); }
.range::-moz-range-thumb { width: 9px; height: 9px; border: .5px solid var(--ink); border-radius: 0; background: var(--strong); transform: rotate(45deg); box-shadow: 0 0 7px var(--trace-glow); }
.message { grid-column: 1 / -1; padding: 7px 8px; border: 1px solid var(--line); background: rgba(var(--signal), .07); font-size: .75rem; line-height: 1.5; color: var(--ink); }

.icon { position: relative; display: inline-block; flex: 0 0 auto; }
.icon-play { width: 0; height: 0; margin-left: 3px; border-block: 7px solid transparent; border-left: 11px solid currentColor; }
.play-button.is-active .icon-play { width: 10px; height: 13px; margin-left: 0; border: solid currentColor; border-width: 0 3px; }
.icon-speaker { width: 18px; height: 15px; }
.icon-speaker::before { position: absolute; inset: 1px auto 1px 0; width: 10px; background: currentColor; clip-path: polygon(0 30%, 42% 30%, 100% 0, 100% 100%, 42% 70%, 0 70%); content: ""; }
.icon-speaker::after { position: absolute; inset: 2px 1px 2px auto; width: 8px; border: 1px solid currentColor; border-width: 0 1px 0 0; border-radius: 100%; content: ""; }
.icon-speaker i { position: absolute; inset: 4px 4px 4px auto; width: 6px; border-right: 1px solid currentColor; border-radius: 100%; }
.mute-button[aria-pressed="true"] .icon-speaker::after { inset: 7px 0 auto auto; background: currentColor; border: 0; height: 1px; width: 7px; border-radius: 0; transform: rotate(-48deg); }
.mute-button[aria-pressed="true"] .icon-speaker i { inset: 7px 0 auto auto; background: currentColor; border: 0; height: 1px; width: 7px; border-radius: 0; transform: rotate(48deg); }

.fullscreen-button { border-color: var(--quiet-line); }
.fullscreen-button[aria-pressed="true"] { color: #231307; border-color: var(--strong); background: var(--strong); }
.icon-fullscreen {
  width: 14px;
  height: 14px;
  background:
    linear-gradient(currentColor, currentColor) top left / 5px 1px,
    linear-gradient(currentColor, currentColor) top left / 1px 5px,
    linear-gradient(currentColor, currentColor) top right / 5px 1px,
    linear-gradient(currentColor, currentColor) top right / 1px 5px,
    linear-gradient(currentColor, currentColor) bottom left / 5px 1px,
    linear-gradient(currentColor, currentColor) bottom left / 1px 5px,
    linear-gradient(currentColor, currentColor) bottom right / 5px 1px,
    linear-gradient(currentColor, currentColor) bottom right / 1px 5px;
  background-repeat: no-repeat;
}
kbd { display: inline-block; padding: 2px 5px; border: 1px solid var(--line); border-radius: 2px; color: var(--ink); font: inherit; line-height: 1; }

@media (min-width: 701px) {
  .station-pane { display: flex; flex-direction: column; }
  .catalog-scroll {
    flex: 1 1 0px;
    min-height: 0;
    max-height: none;
    contain: size;
  }
}

@media (min-width: 701px) and (max-height: 570px) {
  .terminal { padding-block: 12px; }
  .panel-layout { padding-block: 15px; }
  .station { min-height: 34px; }
}

@media (min-width: 701px) and (max-width: 900px) {
  .catalog-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-filters #station-codec { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .panel-layout { column-gap: 16px; }
  .side-pane { padding-left: 14px; }
  .station { grid-template-columns: 19px minmax(0, 1fr) 6px; gap: 5px; padding-inline: 5px; }
}

@media (max-width: 700px) {
  .terminal { padding: 11px clamp(13px, 4vw, 24px) 14px; }
  .terminal-header { gap: 5px; padding-bottom: 7px; flex-wrap: wrap; }
  .tablist { gap: 2px; }
  .tablist button { padding-inline: 8px; min-height: 38px; font-size: .68rem; letter-spacing: .025em; }
  .header-readout { margin-left: auto; gap: 8px; }
  .screen-status { gap: 5px; padding-inline: 6px; font-size: .6rem; letter-spacing: .025em; }
  .screen-status i { width: 5px; height: 5px; }
  .panel-layout { grid-template-columns: minmax(0, 1fr); padding-block: 17px 13px; row-gap: 16px; }
  .pane-heading { margin-bottom: 12px; }
  .pane-heading h1, .pane-heading h2 { font-size: clamp(1.55rem, 7vw, 2.55rem); }
  .plot { min-height: clamp(145px, 42vw, 265px); }
  .map-plot { min-height: clamp(170px, 50vw, 350px); }
  .trace-controls { margin-left: auto; }
  .monitor-views button, .scope-modes button, .trace-details summary, .map-actions button, .map-station button { min-height: 34px; }
  .side-pane { border-left: 0; border-top: 1px solid var(--line); padding: 11px 0 0; }
  .station { min-height: 43px; }
  .station-meta { font-size: .68rem; }
  .station-row { grid-template-columns: minmax(0, 1fr) 43px; }
  .transport { gap: 8px; padding-top: 9px; }
  .play-button { width: 39px; height: 39px; }
  .transport-controls { gap: 3px; }
  .volume-control { gap: 3px; }
  .volume-control .range { width: 55px; }
  .volume-control output { font-size: .64rem; }
  .transport-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
}

@media (max-width: 440px) {
  .header-readout time { display: none; }
  .setting-row { flex-wrap: wrap; padding-block: 6px; }
}

@media (max-width: 360px) {
  .tablist button { padding-inline: 5px; }
  .screen-status { border-color: transparent; }
  .now-playing strong { font-size: .73rem; }
  .volume-control .range { width: 39px; }
  .level-bar { gap: 2px; }
  .instrument-top { font-size: .58rem; letter-spacing: .025em; }
}

@media (prefers-reduced-motion: reduce) {
  .plot-sweep { display: none; }
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}
