/* Enamelled dispatch receiver, green VFD glass and a folding crew manifest. */
#radio-room {
  --phosphor:#c5e9a8; --cab-metal:#626c61; --paper-ink:#302f27;
  pointer-events:auto; position:absolute; top:50%; left:50%;
  transform:translate(-50%,-50%); width:min(508px,calc(100% - 32px));
  max-height:calc(100dvh - 76px); overflow:auto; overscroll-behavior:contain;
  padding:17px clamp(14px,3vw,27px) 16px; color:#e7e5d7; text-shadow:none;
  background:linear-gradient(113deg,#444d41ea,#303b31f5 57%,#384338f0),url("assets/enamel.png") center/cover;
  border:2px solid #202920; border-radius:6px;
  box-shadow:inset 0 2px #b2b4a1,inset 0 -3px #242c24,0 0 0 3px #737968,0 0 0 5px #222921,0 14px 35px #060908cf;
  outline:0; font:15px/1.35 var(--body);
}
#radio-room::before {content:"";position:absolute;inset:7px;pointer-events:none}
body[data-screen="radio"] #cab {transform:scale(1.15);filter:brightness(.67)}
#radio-room .dispatch-head {display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 11px}
#radio-room h2 {margin:0;color:#f0ead6;font:700 clamp(23px,3.5vw,31px)/1 var(--ui);letter-spacing:-.025em;text-transform:none;text-shadow:0 1px 1px #22281f}
#radio-room .dispatch-make {color:#d4d5c4;font:700 9px/1.1 var(--body);letter-spacing:.11em;text-align:right}
.dispatch-screen {
  position:relative; border:3px solid #20261e; border-radius:4px; overflow:hidden;
  padding:13px 15px 12px; margin:0 0 14px;
  color:var(--phosphor); background:repeating-linear-gradient(0deg,#09120d18 0 1px,transparent 1px 3px),linear-gradient(132deg,#344539,#1e2b21 55%,#1c281f);
  box-shadow:0 1px #a1a493,inset 0 2px 10px #0c160f;
}
.dispatch-screen::before {content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(127deg,#b7d5b414 4%,transparent 29%);border-top:1px solid #c0dfaf19}
.dispatch-lamp {display:inline-block;width:7px;height:7px;margin-right:8px;border-radius:50%;background:#bba172;box-shadow:0 0 4px #bba17280;vertical-align:1px}
#radio-room[data-mode="crew"] .dispatch-lamp {background:#b6e9a3;box-shadow:0 0 7px #c3efaa90}
#radio-room[aria-busy="true"] .dispatch-lamp {animation:crew-lamp .85s ease-in-out infinite alternate}
.dispatch-band {display:flex;align-items:center;justify-content:space-between;gap:10px;padding-bottom:6px;border-bottom:1px solid #a3c18b35;font:600 10px/1.2 "Courier New",monospace;letter-spacing:.12em;text-transform:uppercase}
.dispatch-meter {display:flex;gap:3px;align-items:flex-end;height:12px}
.dispatch-meter i {width:3px;background:currentColor;height:3px}
.dispatch-meter i:nth-child(2){height:5px}.dispatch-meter i:nth-child(3){height:7px}.dispatch-meter i:nth-child(4){height:9px}.dispatch-meter i:nth-child(5){height:11px}
.dispatch-meter i:nth-last-child(-n+3){opacity:.18}
#radio-room[data-mode="crew"] .dispatch-meter i {opacity:1}
#radio-room .dispatch-line {display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:8px}
#dispatch-readout {color:#d4f0b6;font:700 clamp(18px,3vw,25px)/1.1 "Courier New",monospace;text-shadow:0 0 7px #bde4a53b}
#radio-room[data-mode="crew"] #dispatch-readout {letter-spacing:.16em;user-select:all}
#copy-crew {border:1px solid #b6ca9d75;background:#152319;color:#d2e7bb;padding:4px 8px;font:700 12px var(--body);border-radius:2px}
#radio-room .dispatch-panel {border:0;padding:0;margin:0}
#radio-room .dispatch-panel label,#radio-room .dispatch-label {display:block;color:#e2e4d6;font:650 12px var(--body);letter-spacing:.045em;margin:0 0 5px}
#radio-room .dispatch-row {display:flex;align-items:stretch;gap:7px;margin:0}
#radio-room .dispatch-input {font:650 16px "Courier New",monospace;min-width:0;flex:1;padding:9px 10px;margin:0;width:100%;color:#e0efcc;background:#202b22;border:1px solid #87907d;border-radius:2px;box-shadow:inset 0 2px 4px #131c15}
#crew-code {text-transform:uppercase;letter-spacing:.15em}
#radio-room input::placeholder {color:#adc0a5;opacity:.74}
#radio-room .dispatch-key {background:linear-gradient(#d9d7c2,#b8b9a5);color:#293028;border:1px solid #242a22;border-bottom:3px solid #787e6e;box-shadow:0 2px #242b23;border-radius:3px;padding:8px 14px;font:700 14px/1.15 var(--body);letter-spacing:.012em;transition:filter .15s}
#radio-room .dispatch-key:hover:enabled,#copy-crew:hover{filter:brightness(1.1)}
#radio-room .dispatch-key:active:enabled{transform:translateY(1px);box-shadow:0 1px #252b23}
#radio-room .dispatch-key:disabled{opacity:.54;cursor:default}
#radio-room button:focus-visible,#radio-room input:focus-visible {outline:2px solid #f9d69d;outline-offset:2px}
#radio-room .dispatch-primary {background:linear-gradient(#e7c68b,#caab74);border-bottom-color:#8a7856;color:#332e25}
#radio-room .dispatch-rule {height:1px;border:0;background:#1e281f;box-shadow:0 1px #65705f;margin:14px 0}
#radio-room .dispatch-wide {width:100%}
#radio-room .dispatch-foot {display:flex;align-items:center;justify-content:space-between;gap:12px;margin:13px 0 0}
#radio-room .dispatch-flat {border:0;border-bottom:1px solid #8d9887;background:none;color:#e1e4d6;padding:2px 0;font:600 12px/1.3 var(--body)}
#radio-room #radio-message {font:14px/1.35 var(--body);color:#efdfc5;margin:10px 0 0;min-height:0}
#radio-message:empty {display:none}
#radio-room #radio-message[data-error="true"] {color:#ffe2be;border-left:2px solid #d9a371;padding-left:8px}
.crew-paper {color:var(--paper-ink);padding:12px 14px;margin-bottom:12px;background:linear-gradient(100deg,#cbc2a4,#e2d9bc 42%,#d4ccb1);box-shadow:0 2px 4px #1a201869;border-left:3px solid #afa589}
.paper-heading {display:flex;align-items:baseline;justify-content:space-between;padding-bottom:6px;border-bottom:2px solid #6c6e5b}
.paper-heading h3 {margin:0;font:700 17px/1.15 Georgia,serif}
#crew-count {font:700 11px/1 monospace;color:#535749}
#crew-list {list-style:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px;margin:0;padding:0}
#crew-list li {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1px 5px;padding:7px 0 4px;border-bottom:1px solid #88867264;font:600 13px var(--body)}
#crew-list small {color:#505947;font:600 10px/1.2 var(--body)}
#crew-list li[data-ready="true"] small {color:#345838}
#radio-room:not([hidden]) {animation:crew-receiver-in .36s cubic-bezier(.15,.6,.25,1)}
#radio-room .crew-paper {animation:crew-manifest-in .28s ease-out}
@keyframes crew-receiver-in {from{opacity:.4;transform:translate(-50%,calc(-50% + 12px)) rotate(.45deg)}to{opacity:1;transform:translate(-50%,-50%)}}
@keyframes crew-manifest-in {from{opacity:0;translate:0 -5px}to{opacity:1;translate:0 0}}
@keyframes crew-lamp {to{opacity:.25}}
@media(max-width:410px){#radio-room{padding:15px 13px}.dispatch-screen{padding:10px}.crew-paper{padding:9px}#crew-list{gap:0 8px}#radio-room .dispatch-key{padding:8px 10px}}
@media(max-height:460px){#radio-room{max-height:calc(100dvh - 18px)}body[data-screen="radio"] footer{display:none}}
@media(prefers-reduced-motion:reduce){#radio-room,#radio-room *{animation:none!important;transition:none!important}body[data-screen="radio"] #cab{transition:none}}
body:has(#cab.still) #radio-room,body:has(#cab.still) #radio-room *{animation:none;transition:none}
