:root {
  --radio-red: #c12838;
  --ham-gold: #d7af58;
  --air-blue: #6ca6c8;
  --marine-teal: #5bb8ad;
  --glass: rgba(9, 9, 9, 0.9);
  --earth-tint: #c12838;
}

html:has(.signal-page),
.signal-page {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.signal-page { background: #020203; }
.signal-header {
  position: fixed;
  top: 0;
  right: 32px;
  left: 32px;
  z-index: 20;
  width: auto;
  margin: 0;
  background: linear-gradient(180deg, rgba(4, 4, 4, 0.96), rgba(4, 4, 4, 0.78));
  backdrop-filter: blur(14px);
}

.signal-app { position: fixed; inset: 0; }
.globe-map { position: absolute; z-index: 0; inset: 0; background: #020203; }
.signal-app::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 48% 43%, color-mix(in srgb, var(--earth-tint), transparent 72%), transparent 38%),
    linear-gradient(120deg, color-mix(in srgb, var(--earth-tint), transparent 88%), transparent 48%);
  content: "";
  mix-blend-mode: color;
  opacity: 0.55;
}
.signal-app::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.24), transparent 25%, transparent 75%, rgba(0, 0, 0, 0.24)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.012) 0, rgba(255, 255, 255, 0.012) 1px, transparent 1px, transparent 4px);
  content: "";
}

.instrument-panel,
.now-playing {
  position: absolute;
  z-index: 5;
  border: 1px solid var(--ng-line);
  background: var(--glass);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.mobile-panel-tabs { display: none; }

.layer-panel {
  top: 108px;
  left: 32px;
  width: 330px;
}

.instrument-title { padding: 20px; border-bottom: 1px solid var(--ng-line); }
.instrument-title p,
.instrument-title span,
.layer-switch small,
.layer-switch > strong,
.layer-switches legend,
.layer-toggle,
.colour-control,
.mobile-search-hint,
.globe-tools button,
.system-message,
.source-credit,
.signal-search,
.selection-card__eyebrow,
.selection-tags,
.selection-actions button,
.cluster-results,
.saved-stations,
.now-playing {
  font-family: var(--ng-mono);
}

.instrument-title p,
.instrument-title span,
.layer-switches legend,
.source-credit,
.selection-card__eyebrow {
  margin: 0;
  color: var(--ng-muted);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.instrument-title h1 {
  margin: 8px 0 7px;
  font-size: 2.05rem;
  line-height: 1;
  letter-spacing: -0.055em;
}

.layer-switches { margin: 0; padding: 12px 14px 14px; border: 0; }
.radio-index {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  min-height: 104px;
  padding: 23px 20px;
  border-bottom: 1px solid var(--ng-line);
}
.radio-index span,
.radio-index small,
.radio-index strong {
  font-family: var(--ng-mono);
}
.radio-index span {
  color: var(--ng-muted);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.radio-index strong {
  grid-row: 1 / 3;
  grid-column: 2;
  align-self: center;
  font-size: 1.15rem;
  font-weight: 400;
}
.radio-index small {
  color: var(--ng-bone);
  font-size: 0.64rem;
}
.layer-switches legend { padding: 13px 6px 7px; }
.signal-controls {
  display: grid;
  gap: 0;
  border-bottom: 1px solid var(--ng-line);
}

.layer-toggle,
.colour-control {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 11px;
  align-items: center;
  min-height: 56px;
  padding: 9px 18px;
  border-top: 1px solid var(--ng-faint-line);
  cursor: pointer;
}

.colour-control {
  grid-template-columns: 1fr auto;
  cursor: default;
}

.layer-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.layer-toggle__mark {
  position: relative;
  width: 15px;
  height: 15px;
  border: 1px solid #656159;
  background: #0c0c0b;
}

.layer-toggle input:focus-visible + .layer-toggle__mark {
  outline: 1px solid var(--ng-bone);
  outline-offset: 3px;
}

.layer-toggle input:checked + .layer-toggle__mark::after {
  position: absolute;
  inset: 3px;
  background: var(--radio-red);
  content: "";
}

.layer-toggle b,
.colour-control b {
  display: block;
  margin-bottom: 3px;
  color: var(--ng-bone);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.layer-toggle small,
.colour-control small,
.mobile-search-hint {
  color: var(--ng-muted);
  font-size: 0.52rem;
  line-height: 1.3;
}

.colour-control input {
  width: 42px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--ng-line);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}

.mobile-search-hint {
  display: none;
  margin: 0;
  padding: 10px 18px;
  border-bottom: 1px solid var(--ng-line);
}

.layer-switch {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 11px;
  align-items: center;
  min-height: 56px;
  padding: 8px 7px;
  border-bottom: 1px solid var(--ng-faint-line);
  cursor: pointer;
}

.layer-switch:last-of-type { border-bottom: 0; }
.layer-switch input { position: absolute; opacity: 0; pointer-events: none; }
.layer-switch__mark {
  position: relative;
  width: 15px;
  height: 15px;
  border: 1px solid #656159;
  background: #0c0c0b;
}

.layer-switch input:focus-visible + .layer-switch__mark { outline: 1px solid var(--ng-bone); outline-offset: 3px; }
.layer-switch input:checked + .layer-switch__mark::after {
  position: absolute;
  inset: 3px;
  background: var(--layer-color);
  content: "";
}

.layer-switch--radio { --layer-color: var(--radio-red); }
.layer-switch--ham { --layer-color: var(--ham-gold); }
.layer-switch--air { --layer-color: var(--air-blue); }
.layer-switch--marine { --layer-color: var(--marine-teal); }
.layer-switch > span:nth-child(3) { display: grid; gap: 4px; }
.layer-switch b { font-size: 0.82rem; font-weight: 500; }
.layer-switch small { color: var(--ng-muted); font-size: 0.52rem; line-height: 1.25; }
.layer-switch > strong { color: var(--ng-muted); font-size: 0.58rem; font-weight: 400; }
.globe-tools { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ng-line); }
.globe-tools button {
  min-height: 42px;
  border: 0;
  border-right: 1px solid var(--ng-line);
  border-radius: 0;
  background: transparent;
  color: var(--ng-bone);
  font-size: 0.57rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.globe-tools button:last-child { border-right: 0; }
.globe-tools button:hover:not(:disabled),
.globe-tools button:focus-visible:not(:disabled) { background: var(--ng-bone); color: var(--ng-ink); outline: none; }
.globe-tools button:disabled { color: #56534d; cursor: not-allowed; }
.system-message { min-height: 46px; margin: 0; padding: 13px 20px; border-top: 1px solid var(--ng-line); color: var(--ng-muted); font-size: 0.56rem; line-height: 1.45; }
.source-credit { margin: 0; padding: 0 20px 18px; font-size: 0.48rem; line-height: 1.55; }

.receiver-panel {
  top: 108px;
  right: 32px;
  width: 370px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.signal-search { padding: 16px; border-bottom: 1px solid var(--ng-line); }
.signal-search label { display: block; margin-bottom: 8px; color: var(--ng-muted); font-size: 0.55rem; letter-spacing: 0.12em; text-transform: uppercase; }
.signal-search > div { display: grid; grid-template-columns: 1fr auto; }
.signal-search input,
.signal-search button {
  min-height: 40px;
  border: 1px solid var(--ng-line);
  border-radius: 0;
  background: #0d0d0c;
  color: var(--ng-bone);
  font: 400 0.7rem/1 var(--ng-mono);
}

.signal-search input { min-width: 0; padding: 0 11px; border-right: 0; }
.signal-search button { padding: 0 12px; text-transform: uppercase; cursor: pointer; }
.signal-search input:focus,
.signal-search button:focus-visible { border-color: var(--ng-bone); outline: none; }
.signal-search input:disabled,
.signal-search button:disabled { color: #55524d; cursor: not-allowed; }
.signal-search p { min-height: 1.2em; margin: 9px 0 0; color: var(--ng-muted); font-size: 0.54rem; line-height: 1.4; text-transform: none; letter-spacing: 0; }
.selection-card { padding: 20px; }
.selection-card h2 { margin: 12px 0 8px; font-size: clamp(1.55rem, 2.1vw, 2.25rem); line-height: 0.98; letter-spacing: -0.05em; }
.selection-card > p { margin: 0; color: var(--ng-muted); font-size: 0.8rem; line-height: 1.5; }
.selection-tags { display: flex; flex-wrap: wrap; gap: 6px; min-height: 22px; margin: 16px 0; }
.selection-tags span { padding: 5px 7px; border: 1px solid var(--ng-line); color: var(--ng-muted); font-size: 0.52rem; letter-spacing: 0.06em; text-transform: uppercase; }
.selection-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.selection-actions button {
  min-height: 40px;
  border: 1px solid var(--ng-bone);
  border-radius: 0;
  background: var(--ng-bone);
  color: var(--ng-ink);
  font-size: 0.59rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.selection-actions button:last-child { background: transparent; color: var(--ng-bone); }
.selection-actions button:hover:not(:disabled),
.selection-actions button:focus-visible:not(:disabled) { border-color: var(--radio-red); outline: none; }
.selection-actions button:disabled { border-color: var(--ng-line); background: #11110f; color: #55524d; cursor: not-allowed; }
.cluster-results { border-top: 1px solid var(--ng-line); }
.cluster-results > div:first-child { display: flex; justify-content: space-between; align-items: center; min-height: 38px; padding: 0 14px; border-bottom: 1px solid var(--ng-line); color: var(--ng-muted); font-size: 0.55rem; text-transform: uppercase; }
.cluster-results button { border: 0; background: transparent; color: var(--ng-bone); font: inherit; cursor: pointer; }
#clusterList { max-height: 260px; overflow-y: auto; }
#clusterList button { display: grid; width: 100%; padding: 11px 14px; border-bottom: 1px solid var(--ng-faint-line); color: var(--ng-bone); text-align: left; }
#clusterList button span { color: var(--ng-muted); font-size: 0.5rem; }
.saved-stations { border-top: 1px solid var(--ng-line); }
.saved-stations summary { padding: 15px 18px; color: var(--ng-bone); font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; }
.saved-stations summary span { float: right; color: var(--ng-muted); }
#savedList { border-top: 1px solid var(--ng-line); }
#savedList > p { margin: 0; padding: 14px 18px; color: var(--ng-muted); font-size: 0.7rem; }
.saved-item { display: grid; grid-template-columns: 1fr auto; width: 100%; border-bottom: 1px solid var(--ng-faint-line); }
.saved-item button { min-height: 46px; padding: 9px 14px; border: 0; background: transparent; color: var(--ng-bone); text-align: left; cursor: pointer; }
.saved-item button:last-child { padding: 9px 12px; color: var(--ng-muted); }
.saved-item small { display: block; margin-top: 3px; color: var(--ng-muted); }

.now-playing {
  right: 32px;
  bottom: 20px;
  left: 32px;
  display: grid;
  grid-template-columns: auto auto minmax(140px, 1fr) auto auto;
  gap: 13px;
  align-items: center;
  min-height: 54px;
  padding: 0 18px;
  color: var(--ng-muted);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.now-playing strong { overflow: hidden; color: var(--ng-bone); font: 700 0.82rem var(--ng-font); letter-spacing: 0; text-overflow: ellipsis; text-transform: none; white-space: nowrap; }
.now-playing b { color: var(--ng-bone); font-weight: 400; }
.now-playing__light { width: 6px; height: 6px; border-radius: 50%; background: #57544d; }
.now-playing__light.is-live { background: var(--radio-red); box-shadow: 0 0 12px rgba(193, 40, 56, 0.8); }

.maplibregl-ctrl-bottom-left { bottom: 82px; left: 382px; }
.maplibregl-ctrl-bottom-right { bottom: 80px; }
.maplibregl-ctrl-group { border: 1px solid var(--ng-line); border-radius: 0; background: #10100f; box-shadow: none; }
.maplibregl-ctrl button .maplibregl-ctrl-icon { filter: invert(1); }
.maplibregl-ctrl-attrib { background: rgba(0, 0, 0, 0.68) !important; color: #77736a; font: 9px var(--ng-mono); }
.maplibregl-ctrl-attrib a { color: #aaa59b; }

@media (max-width: 900px) {
  .signal-header { right: 16px; left: 16px; }
  .layer-panel { top: 104px; left: 16px; width: 290px; }
  .receiver-panel { top: 104px; right: 16px; width: 330px; }
  .now-playing { right: 16px; left: 16px; }
  .maplibregl-ctrl-bottom-left { left: 316px; }
}

@media (max-width: 700px) {
  .signal-header { min-height: 82px; }
  .signal-header .ng-nav { gap: 19px; }
  .signal-header .ng-nav a { padding-top: 20px; }
  .mobile-panel-tabs {
    position: absolute;
    top: 94px;
    right: 10px;
    z-index: 7;
    display: flex;
    border: 1px solid var(--ng-line);
    background: rgba(9, 9, 9, 0.92);
  }
  .mobile-panel-tabs button {
    min-height: 34px;
    padding: 0 11px;
    border: 0;
    border-right: 1px solid var(--ng-line);
    border-radius: 0;
    background: transparent;
    color: var(--ng-muted);
    font: 400 0.53rem var(--ng-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .mobile-panel-tabs button:last-child { border-right: 0; }
  .mobile-panel-tabs button[aria-pressed="true"] { background: var(--ng-bone); color: var(--ng-ink); }
  .layer-panel { top: 138px; left: 10px; width: min(270px, calc(100% - 20px)); }
  .instrument-title { padding: 13px 15px; }
  .instrument-title h1 { font-size: 1.45rem; }
  .instrument-title span { display: none; }
  .layer-switches { padding: 7px 10px 9px; }
  .layer-switches legend { padding-top: 8px; }
  .layer-switch { min-height: 43px; padding: 5px; }
  .layer-switch small { white-space: nowrap; }
  .signal-controls { border-top: 1px solid var(--ng-line); }
  .layer-toggle,
  .colour-control { min-height: 47px; padding: 8px 14px; }
  .mobile-search-hint { display: block; }
  .system-message,
  .source-credit { display: none; }
  .receiver-panel { top: auto; right: 10px; bottom: 72px; width: min(350px, calc(100% - 20px)); max-height: 40vh; }
  .instrument-panel.is-mobile-hidden { display: none; }
  .selection-card { padding: 14px; }
  .selection-card h2 { font-size: 1.35rem; }
  .saved-stations { display: none; }
  .now-playing { right: 10px; bottom: 9px; left: 10px; grid-template-columns: auto 1fr auto; gap: 9px; min-height: 52px; padding: 0 12px; }
  .now-playing > span:nth-child(2),
  #playingLocation { display: none; }
  .maplibregl-ctrl-bottom-left { bottom: 74px; left: auto; }
}

@media (max-height: 720px) and (min-width: 701px) {
  .instrument-title { padding: 13px 18px; }
  .instrument-title h1 { font-size: 1.5rem; }
  .layer-switch { min-height: 45px; }
  .source-credit { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
/* World receiver: give the Earth the screen, keep instruments within reach. */
.signal-page{--ng-line:#293c49;--ng-muted:#a2b1ba;--glass:rgba(7,17,27,.88);--earth-tint:#679fbd}
.signal-header{min-height:72px;right:24px;left:24px;background:rgba(3,9,16,.82);border-color:#243644}
.signal-header .ng-nav{flex-wrap:nowrap;overflow-x:auto;gap:20px;padding:8px 0}
.signal-header .ng-nav a{font-size:13px;white-space:nowrap;padding:12px 0}
.signal-app{top:74px}.globe-map{right:310px;bottom:64px;background:#020711}
.signal-app::before,.signal-app::after{display:none}
.globe-caption{position:absolute;top:25px;left:28px;z-index:3;pointer-events:none;display:grid;gap:10px;max-width:calc(100% - 360px)}
.globe-caption span{font:12px/1.4 var(--ng-mono);letter-spacing:.18em;color:#90b7c9}
.globe-caption strong{font-size:clamp(22px,2.4vw,38px);letter-spacing:-.045em;font-weight:400;color:#e8f0f2}
.globe-caption small{font:13px/1.5 var(--ng-mono);color:#9caeba}
.mobile-panel-tabs{display:flex;position:absolute;top:22px;right:20px;z-index:8;background:#0b1823;border:1px solid #344d5d;border-radius:6px;overflow:hidden}
.mobile-panel-tabs button{min-height:42px;padding:0 14px;border:0;background:transparent;color:#b7c7d0;font:13px var(--ng-mono);cursor:pointer}
.mobile-panel-tabs button[aria-pressed=true]{background:#bdd9e4;color:#081723}
.instrument-panel{border-color:#304653;border-radius:8px;box-shadow:0 16px 60px #0006;scrollbar-color:#4f6878 transparent;max-height:calc(100dvh - 244px);overflow:auto}
.instrument-panel.is-mobile-hidden{display:none}
.layer-panel{top:78px;left:auto;right:20px;width:290px}
.receiver-panel{top:78px;right:20px;width:290px}
.instrument-title{padding:20px}.instrument-title h1{font-size:28px}.instrument-title p,.instrument-title span,.selection-card__eyebrow{font-size:12px;line-height:1.6}
.radio-index{min-height:84px;padding:18px}.radio-index span,.radio-index small{font-size:13px;letter-spacing:0}.radio-index strong{font-size:22px}
.layer-toggle b,.colour-control b{font-size:14px;letter-spacing:0}.layer-toggle small,.colour-control small{font-size:12px;line-height:1.5}
.globe-tools{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:14px}.globe-tools button{min-height:40px;font-size:12px;border:1px solid #405966;border-radius:4px}
.signal-search{padding:18px}.signal-search label{font-size:12px}.signal-search input,.signal-search button{font-size:14px;min-height:44px}.signal-search p{font-size:12px;line-height:1.6}
.selection-card{padding:20px}.selection-card h2{font-size:26px;line-height:1.12}.selection-card>p{font-size:14px}.selection-actions button{font-size:13px;min-height:44px}.selection-tags span{font-size:11px}
.saved-stations summary,.saved-item button,#savedList>p{font-size:13px}.system-message{font-size:12px;line-height:1.6}.source-credit{font-size:11px;line-height:1.6}
.now-playing{left:20px;right:20px;bottom:12px;min-height:48px;border-radius:6px;font-size:12px;letter-spacing:.03em;background:#09141e}.now-playing strong{font-size:16px}
.maplibregl-ctrl-bottom-left{left:24px;bottom:20px}.maplibregl-ctrl-bottom-right{bottom:12px;right:12px}.maplibregl-ctrl-attrib{font-size:11px}.maplibregl-ctrl-group{border-radius:5px;background:#152632}
.signal-page :is(button,a,input,summary):focus-visible{outline:2px solid #b8e6f7;outline-offset:3px}
@media(max-width:900px){.signal-header{display:flex;padding-top:0;gap:20px}.signal-header .ng-brand{font-size:12px}.signal-header .ng-nav{gap:15px}.globe-caption strong{font-size:24px}}
@media(max-width:700px){.signal-header{left:12px;right:12px;min-height:62px}.signal-header .ng-nav a{font-size:12px;padding:10px 0}.signal-app{top:64px}.globe-map{right:0;bottom:66px}.globe-caption{top:74px;left:18px;max-width:calc(100% - 36px);gap:7px}.globe-caption strong{font-size:24px}.globe-caption span{font-size:11px}.globe-caption small{font-size:12px}.mobile-panel-tabs{top:12px;right:14px;left:14px;justify-content:space-between}.mobile-panel-tabs button{flex:1}.layer-panel,.receiver-panel{top:66px;bottom:auto;right:14px;left:auto;width:min(320px,calc(100% - 28px));max-height:calc(100dvh - 214px)}.system-message,.source-credit,.saved-stations{display:block}.now-playing{left:12px;right:12px;bottom:10px}.maplibregl-ctrl-bottom-left{left:12px;bottom:28px}.maplibregl-ctrl-bottom-right{bottom:2px}.mobile-search-hint{display:none}}

