:root {
  --radio-ink: #101820;
  --radio-panel: rgba(18, 31, 39, .34);
  --radio-gold: #969da1;
  --radio-accent: #53d79b;
  --radio-muted: #d5e0e3;
}
.world-radio { position:absolute; z-index:30; top:2px; left:2px; width:min(420px,100%); max-width:100%; height:92px; pointer-events:none; font-family:Inter,system-ui,sans-serif; }
.radio-antenna-button { position:absolute; z-index:4; top:39px; left:8px; display:block; width:18px; height:15px; padding:0; border:0; background:transparent; color:var(--radio-gold); cursor:pointer; pointer-events:auto; touch-action:manipulation; transform:translate(1px,-1px); }
.radio-antenna-button:focus-visible { outline:2px solid var(--radio-gold); outline-offset:2px; border-radius:5px; }
.radio-antenna-button::before { content:""; position:absolute; z-index:2; left:1px; bottom:1px; width:12px; height:9px; border:1px solid #747c80; border-radius:2px 2px 1px 1px; background:linear-gradient(90deg,#343b3e,#697175 45%,#363d40); box-shadow:0 1px 2px #1119,inset 0 1px #c2c8c9a6; }
.radio-antenna-button::after { content:""; position:absolute; z-index:3; left:5px; bottom:3px; width:4px; height:4px; border-radius:50%; background:#d84c45; box-shadow:0 0 4px #d84c4566; transition:background .2s,box-shadow .2s; }
.world-radio.is-on .radio-antenna-button::after { background:#48dc91; box-shadow:0 0 7px #48dc91,0 0 13px #48dc9180; }
.radio-antenna-art { display:none; }
.radio-case { fill:url(#radioWood); stroke:#4d2e1a; stroke-width:1.4; }
.radio-face { fill:url(#radioFace); stroke:#e2b878; stroke-width:.8; }
.radio-grille-frame { fill:#53341f; stroke:#edc78e; stroke-width:.8; }
.radio-tuner { fill:url(#radioDial); stroke:#65472b; stroke-width:.8; }
.radio-tuner-mark,.radio-dial-line { fill:none; stroke:#684426; stroke-width:.72; stroke-linecap:round; }
.radio-dial-line { stroke:#a42f22; stroke-width:1.2; }
.radio-dial-label { fill:#553b27; font:700 3px/1 system-ui,sans-serif; letter-spacing:.15px; }
.radio-knob { fill:url(#radioKnob); stroke:#4e301c; stroke-width:1; }
.radio-knob-mark { fill:none; stroke:#f0cc8c; stroke-width:.9; stroke-linecap:round; }
.radio-screw { fill:#f2d6a4; stroke:#704a2d; stroke-width:.35; }
.radio-feet { fill:none; stroke:#452a19; stroke-width:2.5; stroke-linecap:round; }
.radio-piano-bed { fill:#55351f; stroke:#e2bd86; stroke-width:.7; }
.radio-piano-key { fill:#f1dfb8; stroke:#705337; stroke-width:.55; }
.radio-piano-key-dark { fill:#3b281d; stroke:#25180f; stroke-width:.35; }
.radio-cloud-broadcast { position:absolute; top:4px; left:37px; display:block; width:min(300px,calc(100% - 42px)); height:32px; overflow:hidden; pointer-events:none; }
.radio-cloud-broadcast::before { display:block; }
.radio-cloud-broadcast::before { content:"FM  88.1  ·  91.5  ·  98.3  ·  104.7 MHz"; color:var(--radio-gold); font-size:8px; line-height:1; font-weight:800; letter-spacing:.08em; opacity:.78; text-shadow:0 1px 2px #161b1e; }
.radio-marquee { width:100%; max-width:100%; overflow:hidden; clip-path:inset(0); white-space:nowrap; color:var(--radio-gold); background:none; -webkit-text-fill-color:var(--radio-gold); font-size:11px; line-height:1.2; font-weight:800; text-shadow:0 1px 2px #161b1e; opacity:.78; }
.radio-marquee span { display:inline-block; width:max-content; min-width:100%; padding-right:3em; animation:radio-marquee 20s linear infinite; animation-play-state:paused; }
.world-radio.is-on .radio-marquee span { animation-play-state:running; }
.radio-marquee span::after { content:attr(data-marquee); padding-left:3em; }
@keyframes radio-marquee { from { transform:translateX(-50%); } to { transform:translateX(0); } }
.radio-message.visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.world-radio audio { display:none; }
.world-radio::before { content:""; position:absolute; z-index:1; top:8px; left:0; width:33px; height:44px; pointer-events:none; background:center / 100% 100% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 66 88' fill='none'%3E%3Cpath d='M33 5 4 84h58L33 5Z' stroke='%23868e94' stroke-opacity='.8' stroke-width='3' stroke-linejoin='round'/%3E%3Cpath d='M33 5v79M12 62h42M17 47h32M22 32h22M9 74l48-29M57 74 9 45M7 84h52' stroke='%23939ba0' stroke-opacity='.67' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); }
/* Separate left/right wave groups pulse independently from the mast tip. */
.world-radio::after { content:""; position:absolute; z-index:3; top:-8px; left:-10px; width:52px; height:28px; pointer-events:none; opacity:0; transform:scale(.72); transform-origin:26px 14px; background:center / 100% 100% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 28' fill='none'%3E%3Cpath d='M23 8 Q11 14 23 20 M20 3 Q2 14 20 25' stroke='%23b0b8bc' stroke-opacity='.92' stroke-width='1.7' stroke-linecap='round'/%3E%3Ccircle cx='26' cy='14' r='2' fill='%23dce3e5'/%3E%3C/svg%3E"); }
.world-radio.is-on::after { opacity:.95; animation:mastSignalLeft 1.7s ease-out infinite; }
.radio-cloud-broadcast { overflow:visible; }
.radio-cloud-broadcast::before { position:relative; z-index:2; }
.radio-cloud-broadcast::after { content:""; position:absolute; z-index:1; top:-12px; left:-47px; width:52px; height:28px; pointer-events:none; opacity:0; transform:scale(.72); transform-origin:26px 14px; background:center / 100% 100% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 28' fill='none'%3E%3Cpath d='M29 8 Q41 14 29 20 M32 3 Q50 14 32 25' stroke='%23b0b8bc' stroke-opacity='.92' stroke-width='1.7' stroke-linecap='round'/%3E%3Ccircle cx='26' cy='14' r='2' fill='%23dce3e5'/%3E%3C/svg%3E"); }
.world-radio.is-on .radio-cloud-broadcast::after { opacity:.95; animation:mastSignalRight 2.05s ease-out -0.65s infinite; }
.radio-marquee { position:relative; z-index:2; }
@keyframes mastSignalLeft { 0% { opacity:.12; transform:scale(.62); } 48% { opacity:.96; } 100% { opacity:.12; transform:scale(1.12); } }
@keyframes mastSignalRight { 0% { opacity:.12; transform:scale(.62); } 48% { opacity:.96; } 100% { opacity:.12; transform:scale(1.12); } }
.world-radio.is-on .radio-case { stroke:#f2ce96; filter:brightness(1.08); }
.world-radio.is-on .radio-dial-line { stroke:#df3e28; }
/* Broader, brighter broadcast arcs make the mast read clearly as a radio transmitter. */
.world-radio::after { left:-18px; width:70px; height:36px; transform:scale(.58); transform-origin:35px 18px; filter:drop-shadow(0 0 3px #dce3e599); background:center / 100% 100% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 36' fill='none'%3E%3Cpath d='M32 10Q19 18 32 26M29 6Q10 18 29 30M26 2Q1 18 26 34' stroke='%23969da1' stroke-opacity='.98' stroke-width='1.8' stroke-linecap='round'/%3E%3Ccircle cx='35' cy='18' r='2.6' fill='%23969da1'/%3E%3C/svg%3E"); }
.world-radio.is-on::after { animation:mastSignalLeft 1.45s ease-out infinite; }
.radio-cloud-broadcast::after { left:-55px; width:70px; height:36px; transform:scale(.58); transform-origin:35px 18px; filter:drop-shadow(0 0 3px #dce3e599); background:center / 100% 100% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 36' fill='none'%3E%3Cpath d='M38 10Q51 18 38 26M41 6Q60 18 41 30M44 2Q69 18 44 34' stroke='%23969da1' stroke-opacity='.98' stroke-width='1.8' stroke-linecap='round'/%3E%3Ccircle cx='35' cy='18' r='2.6' fill='%23969da1'/%3E%3C/svg%3E"); }
.world-radio.is-on .radio-cloud-broadcast::after { animation:mastSignalRight 1.7s ease-out -0.5s infinite; }
@keyframes mastSignalLeft { 0% { opacity:.16; transform:scale(.55) translateX(0); } 45% { opacity:1; } 100% { opacity:.08; transform:scale(1.28) translateX(-2px); } }
@keyframes mastSignalRight { 0% { opacity:.16; transform:scale(.55) translateX(0); } 45% { opacity:1; } 100% { opacity:.08; transform:scale(1.28) translateX(2px); } }
@media (max-width:600px) {
  .world-radio { top:1px; left:1px; width:100%; max-width:100%; height:76px; }
  .radio-antenna-button { top:35px; left:6px; }
  .radio-antenna-art { display:none; }
  .radio-cloud-broadcast { top:17px; left:35px; width:calc(100% - 39px); height:32px; }
  .radio-cloud-broadcast::after { top:-29px; left:-53px; }
  .radio-marquee { font-size:10px; }
  .world-radio::before { width:30px; height:40px; }
  .world-radio::after { top:-8px; left:-11px; width:52px; height:28px; }
}
@media (prefers-reduced-motion:reduce) { .world-radio *, .world-radio *::before, .world-radio::after { animation-duration:.01ms!important; animation-iteration-count:1!important; scroll-behavior:auto!important; } }

/* Let the station ticker use the full plot width, stopping before the price scale. */
.world-radio { width:100%; max-width:100%; }
.radio-cloud-broadcast { width:calc(100% - 87px); }
.radio-wave-hitbox {
  position:absolute;
  z-index:6;
  top:-14px;
  width:42px;
  height:44px;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  pointer-events:auto;
  cursor:pointer;
  touch-action:manipulation;
}
.radio-wave-left { left:-12px; }
.radio-wave-right { left:20px; }
.radio-wave-hitbox:disabled { pointer-events:none; cursor:default; }
.radio-wave-hitbox:focus-visible { outline:2px solid var(--radio-gold); outline-offset:1px; }
@media (max-width:600px) {
  .radio-cloud-broadcast { width:calc(100% - 85px); }
  .radio-wave-hitbox { top:-15px; }
}

/* The station readouts follow the radio power state; next-station sits by the mast tip. */
.world-radio:not(.is-on) .radio-cloud-broadcast { visibility:hidden; }
.radio-tune-button {
  position:absolute;
  z-index:7;
  top:0px;
  left:13px;
  display:grid;
  place-items:center;
  width:10px;
  height:10px;
  padding:0;
  border:1px solid #55d99a;
  border-radius:50%;
  color:#62efa9;
  background:rgba(13,28,24,.9);
  box-shadow:0 0 7px rgba(75,224,150,.56), inset 0 0 4px rgba(87,232,159,.2);
  font:900 9px/1 system-ui,sans-serif;
  cursor:pointer;
  pointer-events:auto;
  opacity:0;
  visibility:hidden;
  transform:scale(.78);
  transition:opacity .18s ease,transform .18s ease,visibility .18s;
  touch-action:manipulation;
}
.world-radio.is-on .radio-tune-button:not(:disabled) {
  opacity:1;
  visibility:visible;
  transform:scale(1);
}
.radio-tune-button:hover { background:rgba(22,53,40,.96); box-shadow:0 0 10px rgba(75,224,150,.8); }
.radio-tune-button:focus-visible { outline:2px solid #8dffc1; outline-offset:2px; }
.radio-tune-button:disabled { cursor:default; pointer-events:none; }
@media (max-width:600px) {
  .radio-tune-button { top:0px; left:11px; }
}

/* Keep the station controls usable without bringing LAB frontier artwork to the main screen. */
.radio-wave-hitbox {
  position:absolute;
  z-index:6;
  top:-14px;
  width:42px;
  height:44px;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  pointer-events:auto;
  cursor:pointer;
  touch-action:manipulation;
}
.radio-wave-left { left:-12px; }
.radio-wave-right { left:20px; }
.radio-wave-hitbox:disabled { pointer-events:none; cursor:default; }
.radio-wave-hitbox:focus-visible { outline:2px solid var(--radio-gold); outline-offset:1px; }
.world-radio:not(.is-on) .radio-cloud-broadcast { visibility:hidden; }
.radio-tune-button {
  position:absolute;
  z-index:7;
  top:0;
  left:13px;
  display:grid;
  place-items:center;
  width:10px;
  height:10px;
  padding:0;
  border:1px solid #55d99a;
  border-radius:50%;
  color:#62efa9;
  background:rgba(13,28,24,.9);
  box-shadow:0 0 7px rgba(75,224,150,.56),inset 0 0 4px rgba(87,232,159,.2);
  font:900 9px/1 system-ui,sans-serif;
  cursor:pointer;
  pointer-events:auto;
  opacity:0;
  visibility:hidden;
  transform:scale(.78);
  transition:opacity .18s ease,transform .18s ease,visibility .18s;
  touch-action:manipulation;
}
.world-radio.is-on .radio-tune-button:not(:disabled) {
  opacity:1;
  visibility:visible;
  transform:scale(1);
}
.radio-tune-button:hover { background:rgba(22,53,40,.96); box-shadow:0 0 10px rgba(75,224,150,.8); }
.radio-tune-button:focus-visible { outline:2px solid #8dffc1; outline-offset:2px; }
.radio-tune-button:disabled { cursor:default; pointer-events:none; }
@media (max-width:600px) {
  .radio-wave-hitbox { top:-15px; }
  .radio-tune-button { top:0; left:11px; }
}

/* Return the mast to its chart-corner position; dock it over the price scale in game mode. */
.billiards-active #worldRadio::before { left:auto; right:5px; top:45px; }
.billiards-active #worldRadio::after { left:auto; right:-3px; top:32px; }
.billiards-active #worldRadio .radio-antenna-button { left:auto; right:3px; top:95px; }
.billiards-active #worldRadio .radio-cloud-broadcast { display:none !important; }
.billiards-active #worldRadio .radio-cloud-broadcast::after { left:auto; right:-42px; top:8px; }
.billiards-active #worldRadio .radio-wave-left { left:auto; right:22px; top:36px; }
.billiards-active #worldRadio .radio-wave-right { left:auto; right:-10px; top:36px; }
.billiards-active #worldRadio .radio-tune-button { left:auto; right:5px; top:40px; }
@media (max-width:600px) {
  .billiards-active #worldRadio::before { top:45px; }
  .billiards-active #worldRadio::after { top:32px; }
  .billiards-active #worldRadio .radio-antenna-button { top:95px; }
  .billiards-active #worldRadio .radio-cloud-broadcast::after { top:8px; }
  .billiards-active #worldRadio .radio-wave-left,
  .billiards-active #worldRadio .radio-wave-right { top:35px; }
  .billiards-active #worldRadio .radio-wave-left { top:35px; }
  .billiards-active #worldRadio .radio-tune-button { top:40px; }
}

/* Keep the radio mast off the pool table while leaving it available on the chart. */
.billiards-active #worldRadio { display:none !important; }
