/* Control surfaces and the operator's reference drawer. */
#panel:has(.evidence-drawer[open]:not([hidden])){width:min(950px,calc(100% - 26px))}
.panel-workspace{display:grid;align-items:start;min-width:0}
.evidence-drawer{min-width:0;margin:0 17px 7px;border:1px solid #577684;background:#0a1b28}
.evidence-drawer summary{padding:11px 13px;color:#d1eced;font-weight:750;cursor:pointer}
.evidence-drawer[open] summary{border-bottom:1px solid #355466}
.evidence-tools{padding:12px;display:grid;gap:8px}
.evidence-tools label{font-size:12px;color:#bcd0d7}
.evidence-tools select{width:100%;min-height:40px;padding:6px;color:#e4eef2;background:#122c3c;border:1px solid #607d8b;font:inherit}
.evidence-text{max-height:290px;overflow:auto;overscroll-behavior:contain;padding:0 6px;color:#eef2f5;font-size:14px;line-height:1.55}
.evidence-text h3{font-size:17px}
.evidence-text .transcript-source{font-size:11px}
@media(min-width:780px){
  .panel-workspace:has(.evidence-drawer[open]:not([hidden])){grid-template-columns:minmax(0,1.5fr) minmax(260px,1fr)}
  .evidence-drawer[open]{grid-column:2;grid-row:1;position:sticky;top:8px;margin-top:14px;margin-left:0}
  .panel-workspace:has(.evidence-drawer[open]:not([hidden])) .panel-body{grid-column:1;grid-row:1}
}
@media(max-width:779px){.evidence-text{max-height:180px}.evidence-tools select{min-height:36px}}
.instrument{border:1px solid #6a8490;background:linear-gradient(145deg,#172c38,#071622 78%);box-shadow:inset 0 0 0 3px #070f17,0 8px 18px #0006;padding:13px;margin:12px 0}
.instrument-label{display:flex;justify-content:space-between;align-items:center;gap:7px;border-bottom:1px solid #627480;padding:0 0 8px;color:#f3d595;font:700 12px/1.4 Consolas,monospace}
.instrument-label span{color:#a4c2cb;text-align:right;font-size:10px}
.instrument-actions{display:flex;flex-wrap:wrap;gap:8px}
.panel-body .instrument-actions button,.panel-body .relay-port{min-height:38px;margin:0;padding:7px 9px;border:1px solid #648292;background:#122f40;color:#eff5f7;font-size:13px}
.panel-body .instrument-actions button:hover,.panel-body .relay-port:not(:disabled):hover{border-color:#ffd786;background:#224a5e}
.panel-body .instrument-status{margin:8px 0 11px;color:#b8dadc;font:700 12px/1.4 Consolas,monospace}
.relay-field{display:grid;grid-template-columns:auto minmax(36px,1fr) auto;gap:3px;align-items:stretch;margin:13px 0;padding:5px;background:#070f18;border:1px solid #445a66}
.relay-ports{display:grid;grid-template-rows:repeat(5,minmax(38px,1fr));gap:2px}
.relay-field svg{width:100%;height:100%;min-height:190px;overflow:visible;background:repeating-linear-gradient(0deg,#102130 0 5px,#112635 6px 8px)}
.relay-field path{fill:none;stroke:var(--wire);stroke-width:4;vector-effect:non-scaling-stroke;filter:drop-shadow(0 1px 1px #000)}
.relay-console .amber{--wire:#ffbe4c}
.relay-console .blue{--wire:#56bafd}
.relay-console .white{--wire:#e0e9f1}
.relay-console .red{--wire:#ff7874}
.panel-body .relay-port{display:flex;align-items:center;gap:6px;white-space:nowrap}
.relay-port i{width:10px;height:10px;flex:none;border-radius:50%;border:2px solid #c1c9c9;background:var(--wire,#12191e);box-shadow:0 0 0 1px #0009}
.panel-body .relay-port[aria-pressed=true]{outline:2px solid var(--wire);outline-offset:-3px}
.panel-body .relay-port:disabled{opacity:.65;cursor:default}
.wheel-dial{touch-action:none;cursor:grab;user-select:none;width:min(100%,285px);margin:12px auto 0;filter:drop-shadow(0 7px 8px #0007)}
.wheel-dial svg{display:block;width:100%;height:auto}
.wheel-dial .bezel{fill:#846737;stroke:#ceaf67;stroke-width:3}
.wheel-dial .signal-ring{fill:#153649;stroke:#e2c589;stroke-width:2}
.wheel-dial .plain-ring{fill:#091a25;stroke:#6a827f;stroke-width:2}
.wheel-dial .dial-index{fill:#f4ffff}
.wheel-dial text{text-anchor:middle;dominant-baseline:central;fill:#e5eceed;font:700 12px Consolas,monospace}
.wheel-dial .outer{fill:#fff1c4}
.wheel-dial .inner{fill:#bcebf1}
.wheel-dial .index{fill:#fff;font-size:16px}
.wheel-dial .dial-center{fill:#c2d8d8;font-size:11px;letter-spacing:1px}
.cipher-console .instrument-status{text-align:center}
.cipher-console .instrument-actions{justify-content:center}
.cipher-output{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:12px}
.cipher-output>div{padding:9px;background:#061a28;border:1px solid #496a74;display:grid;gap:4px}
.cipher-output span{color:#bbd4da;font-size:11px}
.cipher-output strong{color:#99e8ba;font:700 clamp(15px,3vw,20px) Consolas,monospace;letter-spacing:.12em}
.battle-hud>div:has(meter){display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px}
.battle-hud meter{width:100%;height:9px;grid-column:1/-1;accent-color:#8addb6}
.battle-hud #batteryMeter{accent-color:#e7bd68}
.power-routing{border:1px solid #597482;padding:8px;margin:15px 0;min-width:0}
.power-routing legend{color:#c1d6dc;font:700 12px Consolas,monospace;padding:0 4px}
.power-options{display:flex;flex-wrap:wrap;gap:4px}
.power-options button{background:#122c3c;color:#e6f2f3;border:1px solid #577584;font-size:12px;padding:5px;min-height:35px}
.power-options button[aria-pressed=true]{color:#ffdfa0;background:#463923;border-color:#e9bf68}
.power-options kbd{font-size:10px;color:#b6c9cd}
.battle-controls #powerHelp{font-size:12px;color:#cde6df;margin:6px 0 0}
.combat-dock #fireBtn{width:100%}
@media(pointer:coarse){.power-options kbd{display:none}}
.terminal-copy h1{font-size:clamp(48px,6vw,90px)}
@media(max-width:480px){.terminal-copy h1{font-size:clamp(37px,10.6vw,52px)}.terminal-copy .login-form>div{flex-wrap:wrap}}
.wheel-dial text{text-anchor:middle;dominant-baseline:central;font:700 12px Consolas,monospace}
.wheel-dial text.outer{fill:#fff0bc}
.wheel-dial text.inner{fill:#b9ece5}
.wheel-dial text.index{fill:#fff;font-size:15px}
.wheel-dial text.dial-center{fill:#c9a968;letter-spacing:.09em;font-size:10px}
.patch-order{display:flex;gap:6px;flex-wrap:wrap;list-style:none;padding:0;margin:11px 0;color:#c1d9de;font:700 12px/1.4 Consolas,monospace}
.patch-order li{border-left:3px solid var(--wire);background:#233240;padding:4px 7px;text-transform:capitalize}
@media(max-width:600px){
  .battle{padding-top:12px}
  .battle-heading{display:flex;align-items:center;gap:8px;margin-bottom:12px}
  .battle-heading h2{font-size:clamp(27px,8vw,43px);margin:5px 0 0}
  .battle-heading p:not(.eyebrow){display:none}
  .battle-heading .eyebrow{font-size:9px}
  .battle-heading .battle-clock{display:flex;min-width:90px;padding:5px}
  .battle-clock strong{font-size:27px}
  .battle-hud>div{padding:7px}
  .battle-hud strong{font-size:20px}
  .battle-live{padding-bottom:calc(150px + env(safe-area-inset-bottom))}
  .battle-live .combat-dock{position:fixed;z-index:6;inset:auto 8px calc(6px + env(safe-area-inset-bottom));padding:6px;background:#0d2331;border:1px solid #668492;box-shadow:0 -8px 22px #061018a8;display:grid;grid-template-columns:1fr auto;align-items:start;gap:6px}
  .battle-live #fireBtn{margin:10px 0 0;min-height:48px;padding:8px;font-size:13px;grid-column:2;grid-row:1}
  .battle-live .power-routing{grid-column:1;grid-row:1;margin:0;padding:3px 4px}
  .battle-live .power-options button{min-height:36px}
  .battle-live #powerHelp{margin:3px 0 0}
  .battle-live #fireBtn:disabled{opacity:1;background:#243e49;color:#adbfc7;border-color:#648291}
  .battle-radar{height:clamp(208px,34dvh,300px)}
}
.attack-viewport{min-width:0;border:1px solid #557484;background:#071622;align-self:start}
.attack-flight{position:relative;background:#070f1c}
#attackCanvas{display:block;width:100%;height:auto;aspect-ratio:2/1;touch-action:none;cursor:crosshair}
#attackCanvas:focus-visible{outline:2px solid #dfc781;outline-offset:-3px}
.attack-ready{position:absolute;inset:0;display:grid;place-items:center;padding:12px;text-align:center;background:#041320d9}
.attack-ready>div{max-width:500px;padding:16px 21px;border:1px solid #7297a8;background:#102b3bed}
.attack-ready h3{margin:0;color:#ffe5a6;font:800 36px/.95 'Barlow Condensed',sans-serif}
.attack-ready p{color:#d6e6ea;font-size:14px;line-height:1.45;margin:10px 0}
.flight-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.flight-actions #fireBtn{grid-column:1/-1;margin:0}
.flight-actions button{min-height:40px;border:1px solid #64859a;color:#e5f1f5;background:#19394c;padding:5px;font-size:13px;touch-action:none}
.flight-actions #fireBtn:not(:disabled){background:#eac470;color:#071d29}
.flight-actions button[aria-pressed=true]{border-color:#92dfbb;color:#bef3d4;background:#20463d}
.flight-actions button:disabled{opacity:.52}
@media(max-width:600px){
  .attack-ready>div{padding:7px 10px}
  .attack-ready h3{font-size:25px}
  .attack-ready p{font-size:12px;margin:6px 0}
  .attack-ready button{min-height:34px;padding:6px 10px;font-size:12px}
  .battle-live .combat-dock{grid-template-columns:minmax(0,1fr);gap:4px}
  .battle-live .flight-actions{grid-template-columns:repeat(3,minmax(0,1fr));grid-row:1}
  .battle-live .flight-actions #fireBtn{grid-column:auto;grid-row:auto;min-height:40px;margin:0}
  .battle-live .power-routing{grid-row:2}
  .power-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
}
/* Title, incoming message, and the audio control shared by every screen. */
.sound-toggle{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;background:#102839;border:1px solid #557888;padding:6px 8px;color:#e6f2f5;font:700 12px Consolas,monospace}
.sound-toggle[aria-pressed=true]{color:#b2bec5;border-color:#596777}
#soundIcon{color:#ecc77d}
.operation-cover{position:relative;isolation:isolate;overflow:hidden;min-height:min(690px,77vh);display:grid;align-items:center;margin:16px 0 24px;background:#0b1c2c;border:1px solid #5d7789}
.cover-camera{position:absolute;z-index:-1;inset:0;background:linear-gradient(90deg,#061424f5,#0a192ba3 47%,#06142442),url('assets/shuttle-bay.png') center 52%/cover}
.cover-copy{padding:clamp(23px,7vw,100px);max-width:760px}
.cover-copy h1{font:800 clamp(56px,8vw,110px)/.85 'Barlow Condensed',Impact,sans-serif;text-transform:uppercase;margin:12px 0 19px}
.cover-copy h1 em{display:block;color:#efc878;font-style:normal}
.cover-copy>p:not(.eyebrow){max-width:39ch;font-size:clamp(16px,2vw,20px);line-height:1.55;color:#d5e1e9;margin:0 0 24px}
.cover-status{position:absolute;bottom:0;left:0;right:0;display:flex;justify-content:space-between;gap:6px;padding:10px 14px;background:#0a2033e8;border-top:1px solid #4c7188;color:#cee1ea;font:700 11px Consolas,monospace}
.briefing-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(260px,1fr)}
.briefing-copy,.briefing-console{padding:clamp(19px,4vw,52px)}
.briefing-copy h2{color:#edca80;font:800 clamp(38px,6vw,75px)/.95 'Barlow Condensed',Impact,sans-serif;margin:6px 0 19px}
.briefing-copy p:not(.terminal-prompt){color:#d3e1e8;font-size:16px;line-height:1.62}
.briefing-copy p strong{color:#f2d392}
.briefing-console{background:#0d2334;border-left:1px solid #4b687a}
.briefing-console .terminal-log{margin-top:0}
.briefing-console .login-form input{width:100%;max-width:none;margin-bottom:10px}
.briefing-console .login-form button{width:100%;white-space:normal}
@media(max-width:700px){
  .briefing-grid{grid-template-columns:1fr}
  .briefing-console{border-left:0;border-top:1px solid #4b687a}
  .operation-cover{min-height:510px}
  .cover-camera{background-position:62% center}
  .top-actions{gap:7px}
}
@media(max-width:390px){.sound-toggle{font-size:11px;padding-inline:5px}.brand strong{font-size:13px}.top-actions .text-button{font-size:10px}}
.panel-actions{display:flex;align-items:center;gap:7px;flex:none}

.command-message{margin:0;padding:0 0 0 15px;border-left:2px solid #688c98}

/* Live transmission. The unseen transcript reserves the same layout as the typed copy. */
.message-surface{position:relative}
.command-message{font-family:Consolas,'Courier New',monospace;background:#061724bd;border:1px solid #436474;border-left:3px solid #6eb6a6;padding:10px 15px}
.briefing-copy .command-message p{font-family:inherit;color:#c1e7dc;font-size:14px;line-height:1.7;margin:6px 0 13px}
.briefing-copy .command-message p:last-child{margin-bottom:6px}
.briefing-copy .command-message strong{color:#ffc77b}
.typing-source{opacity:0}
.typing-copy{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.typing-copy p:empty{display:none}
.terminal-caret{color:#8bf1bf;font-weight:900}
.briefing-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:13px}
.briefing-actions [hidden]{display:none}
/* Green phosphor terminal, isolated from the rest of the game interface. */
body:has(#briefing:not(.hidden)){overflow:hidden}
.receive-screen{
  --crt-ink:#9cdb98;--crt-bright:#cdf6ba;--crt-dim:#669865;--crt-line:#335f3d;
  position:fixed;inset:0;z-index:40;isolation:isolate;overflow:auto;overscroll-behavior:contain;
  background:#020602;color:var(--crt-ink);font-family:Consolas,'Courier New',monospace;
}
.receive-backdrop{
  position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:radial-gradient(ellipse at 49% 48%,#102615a8 0%,#030903 55%,#010301 95%);
}
.receive-screen::after{
  content:'';position:fixed;inset:0;z-index:4;pointer-events:none;
  background:repeating-linear-gradient(0deg,#0000 0 2px,#01070333 2px 3px),radial-gradient(ellipse at center,transparent 55%,#0006);
}
.receive-frame{
  position:relative;width:min(100%,1390px);min-height:100dvh;margin:auto;
  display:grid;align-content:center;gap:11px;padding:clamp(12px,3vw,43px);
  text-shadow:0 0 9px #6cc65b35;
}
.receive-screen:not(.hidden) .receive-frame{animation:crt-lock .38s ease-out both}
.receive-top,.receive-bottom{display:flex;align-items:center;justify-content:space-between;gap:12px}
.receive-top{border-block:1px solid var(--crt-line);padding:7px 0}
.receive-id{display:flex;align-items:center;gap:11px;min-width:0}
.receive-id small,.receive-id strong{display:block;text-transform:uppercase}
.receive-id small{color:var(--crt-dim);font-size:11px}
.receive-id strong{color:var(--crt-bright);font-size:clamp(15px,2vw,24px);letter-spacing:-.025em}
.crt-emblem{position:relative;display:block;width:59px;height:59px;flex:none;isolation:isolate;overflow:hidden}
.crt-emblem img{
  width:100%;height:100%;object-fit:contain;clip-path:circle(48%);mix-blend-mode:screen;
  filter:grayscale(1) brightness(1.12) contrast(1.7) sepia(1) hue-rotate(65deg) saturate(1.55);
}
.crt-emblem::after{content:'';position:absolute;inset:0;background:repeating-linear-gradient(0deg,transparent 0 2px,#06140775 2px 3px)}
.receive-link{margin-left:auto;display:grid;gap:4px;text-align:right;font-size:11px;color:var(--crt-dim)}
.receive-link .terminal-led{color:var(--crt-bright)}
.receive-link .terminal-led::before{background:#9fe19b;box-shadow:0 0 7px #9fe19b}
.receive-screen :is(.sound-toggle,.secondary,.primary){
  border:1px solid #59805a;border-radius:0;background:#0a1a0b;color:var(--crt-bright);
  font:700 12px/1.25 Consolas,'Courier New',monospace;letter-spacing:0;min-height:36px;padding:7px 10px;
}
.receive-screen button:hover:not(:disabled){background:#18351a;border-color:#b6e2a1}
.receive-screen button:focus-visible,.receive-screen input:focus-visible{outline-color:#c1f0ac}
.receive-grid{grid-template-columns:minmax(0,.94fr) minmax(0,1.06fr);gap:11px}
.receive-grid .briefing-copy,.crt-plot,.crt-status-cell{min-width:0;margin:0;border:1px solid var(--crt-line);background:#051107;padding:12px}
.receive-grid .briefing-copy h2{font:700 clamp(17px,2.2vw,27px)/1.2 Consolas,monospace;letter-spacing:0;text-transform:uppercase;color:var(--crt-bright);margin:0 0 6px}
.receive-grid .terminal-prompt{font-size:10px;letter-spacing:.035em;color:var(--crt-dim);margin:0 0 12px}
.receive-grid .command-message{box-shadow:none;border:0;border-left:1px solid #64855b;background:none;padding:0 0 0 9px}
.receive-grid .command-message p{font:400 clamp(13px,1.05vw,15px)/1.55 Consolas,monospace;color:var(--crt-ink);margin:0 0 11px}
.receive-grid .command-message p:last-child{margin-bottom:0}
.receive-grid .command-message strong{color:var(--crt-bright)}
.receive-screen .briefing-actions{gap:6px}
.receive-screen .terminal-caret{color:var(--crt-bright);animation:crt-caret .9s steps(1,end) infinite}
.crt-plot{display:grid;grid-template-rows:auto 1fr auto;align-content:start;gap:8px;padding:8px}
.crt-plot figcaption{display:flex;justify-content:space-between;gap:6px;color:var(--crt-bright);font-size:11px;padding:2px 3px}
.crt-plot figcaption span+span{color:var(--crt-dim);text-align:right}
.crt-map{display:block;width:100%;height:100%;max-height:420px;min-height:220px;background:#030d05;border:1px solid var(--crt-line);color:#79bf73}
.crt-map text{font:700 10px Consolas,monospace;letter-spacing:.035em}
.crt-returns{animation:crt-returns 2.7s ease-in-out infinite alternate}
.crt-sweep{transform-origin:307px 169px;animation:crt-sweep 9.5s linear infinite}
.receive-audio{display:grid;grid-template-columns:auto 1fr;gap:8px;align-items:center;color:var(--crt-dim);font-size:10px}
.receive-signal{display:grid;grid-template-columns:repeat(24,minmax(0,1fr));gap:2px;align-items:center;height:15px}
.receive-signal i{display:block;height:100%;background:#91c781;transform:scaleY(.07);box-shadow:0 0 5px #a2d68c4d}
.crt-status-row{display:grid;grid-template-columns:1fr 1fr 1.16fr;gap:11px}
.crt-status-cell{padding:9px 11px}
.crt-status-cell h3{font:700 11px Consolas,monospace;text-transform:uppercase;color:var(--crt-bright);margin:0 0 8px}
.crt-status-cell .terminal-log{padding:0;margin:0;gap:3px;background:none;border:0;color:var(--crt-ink);font-size:11px}
.crt-status-cell .terminal-log span:last-child{color:var(--crt-ink)}
.crt-status-cell:first-child .terminal-log span:last-child{color:#e9ab83}
.crt-command .login-form{display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px;align-items:center;margin:0}
.crt-command .login-form label{margin:0;color:var(--crt-dim);font-size:10px}
.crt-command .login-form input{
  padding:5px 7px;background:#030c04;border:1px solid var(--crt-line);max-width:none;min-width:0;color:var(--crt-bright);font:12px Consolas,monospace;
}
.crt-command .login-form button{grid-column:1/-1;justify-content:center;white-space:normal;text-align:center}
.receive-bottom{border-top:1px solid var(--crt-line);padding:7px 0 0;font-size:9px;letter-spacing:.09em;color:var(--crt-dim)}
@keyframes crt-lock{from{clip-path:inset(46% 0 46%);opacity:.45}to{clip-path:inset(0);opacity:1}}
@keyframes crt-sweep{to{transform:rotate(1turn)}}
@keyframes crt-caret{50%{opacity:.4}}
@keyframes crt-returns{from{opacity:.41}to{opacity:.95}}
@media(max-width:760px){
  .receive-frame{align-content:start;gap:8px}
  .receive-grid{grid-template-columns:1fr;gap:8px}
  .crt-status-row{grid-template-columns:1fr 1fr;gap:8px}
  .crt-command{grid-column:1/-1}
  .receive-top{gap:7px}
  .receive-link{font-size:8px}
  .receive-link .terminal-led::before{display:none}
  .crt-emblem{width:39px;height:39px}
  .receive-id{gap:6px}
  .receive-id small{font-size:8px}
  .receive-id strong{font-size:13px}
  .crt-map{height:auto;min-height:0;max-height:270px}
}
@media(prefers-reduced-motion:reduce){.receive-screen *{animation:none!important}}
