/* CRT terminal chrome. Camera pictures, clue artwork, and the combat canvas retain their own palettes. */
.crt-terminal{
  --crt-bkg:#030904;
  --crt-panel:#07120a;
  --crt-raised:#0b1b10;
  --crt-line:#355b3d;
  --crt-ink:#9cdb98;
  --crt-bright:#cdf6ba;
  --crt-dim:#82af7e;
  --crt-alert:#eeae8a;
  --crt-mono:Consolas,'Courier New',monospace;
  color:var(--crt-ink);
  background:radial-gradient(ellipse at 54% 10%,#102416 0%,#050e08 42%,var(--crt-bkg) 79%);
  font-family:var(--crt-mono);
}
.crt-terminal .noise{opacity:.025}
.crt-terminal .topbar{border-bottom-color:var(--crt-line);height:74px}
.crt-terminal .brand{gap:9px}
.crt-terminal .brand .crt-emblem{width:45px;height:45px}
.crt-terminal .brand .crt-emblem img{width:100%;height:100%}
.crt-terminal .brand strong{font:700 clamp(13px,2vw,21px)/1.1 var(--crt-mono);letter-spacing:.01em;color:var(--crt-bright)}
.crt-terminal :is(.eyebrow,.build-tag,.footer){font-family:var(--crt-mono);color:var(--crt-dim)}
.crt-terminal .brand .eyebrow{letter-spacing:.085em}
.crt-terminal .footer{border-top-color:var(--crt-line)}
.crt-terminal .text-button{color:var(--crt-ink)}
.crt-terminal :is(.sound-toggle,.secondary,.nav-arrow,.object-list button,.inventory-items button){
  color:var(--crt-bright);border-color:var(--crt-line);background:var(--crt-raised);border-radius:0;font-family:var(--crt-mono);
}
.crt-terminal :is(.primary:not(#briefing *),.panel-body button:not(.small-action):not(.pipe-tile):not(.relay-port):not(.launch-wheel *)){
  background:#b2df9c;color:#07150a;border-color:#9cce8c;border-radius:0;font-family:var(--crt-mono);text-shadow:none;
}
.crt-terminal :is(.sound-toggle,.secondary,.nav-arrow,.object-list button,.inventory-items button):hover:not(:disabled){background:#162f1a;border-color:#8ebd85}
.crt-terminal :is(.primary:not(#briefing *),.panel-body button:not(.small-action):not(.pipe-tile):not(.relay-port):not(.launch-wheel *)):hover:not(:disabled){background:#d0edb8}
.crt-terminal :is(button,input,select,summary):focus-visible{outline-color:var(--crt-bright)}
.crt-terminal #soundIcon{color:var(--crt-bright)}
.crt-link{display:inline-flex;align-items:center;gap:6px;color:var(--crt-bright);white-space:nowrap}
.crt-link::before{content:'';width:6px;height:6px;background:#acec9b;box-shadow:0 0 7px #a3ef83}
.crt-terminal .operation-cover{
  display:grid;grid-template-rows:auto 1fr;min-height:0;align-items:stretch;background:var(--crt-panel);
  border:1px solid var(--crt-line);margin:20px 0 32px;
}
.crt-terminal .cover-status,.camera-bar{
  position:relative;display:flex;justify-content:space-between;align-items:center;gap:8px;
  padding:9px 12px;border-bottom:1px solid var(--crt-line);background:var(--crt-raised);
  color:var(--crt-ink);font:700 11px/1.3 var(--crt-mono);
}
.crt-terminal .cover-status{inset:auto;border-top:0}
.cover-console{display:grid;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);min-height:clamp(430px,62vh,640px)}
.crt-terminal .cover-copy{align-self:center;max-width:none;padding:clamp(23px,4.8vw,75px)}
.crt-terminal .cover-copy h1{
  color:var(--crt-bright);font:800 clamp(35px,5.7vw,89px)/.98 var(--crt-mono);
  letter-spacing:-.055em;text-shadow:0 0 18px #86e47436;
}
.crt-terminal .cover-copy h1 em{color:var(--crt-ink)}
.crt-terminal .cover-copy>p:not(.eyebrow){color:var(--crt-ink);font-size:clamp(13px,1.3vw,17px);line-height:1.6}
.cover-monitor{margin:0;position:relative;isolation:isolate;overflow:hidden;border-left:1px solid var(--crt-line);min-width:0}
.crt-terminal .cover-camera{background:url('assets/shuttle-bay-hatch-locked.webp') 56% center/cover;z-index:0}
.cover-monitor .camera-bar{position:absolute;inset:auto 0 0;border-top:1px solid var(--crt-line);border-bottom:0;background:#06120aeb;z-index:3}
.camera-overlay{
  pointer-events:none;position:absolute;inset:0;z-index:1;
  background:repeating-linear-gradient(0deg,transparent 0 4px,#08100d25 4px 5px);
}
.camera-overlay::before,.camera-overlay::after{
  content:'';position:absolute;inset:11px;border:1px solid #b1e2ab77;mask:conic-gradient(at 22px 22px,#0000 25%,#000 0) 0 0/calc(100% - 22px) calc(100% - 22px);
}
.camera-overlay::after{inset:0;border:0;mask:none;background:linear-gradient(0deg,transparent 43%,#b3f4aa12 51%,transparent 58%);animation:bucket-refresh 7s linear infinite}
@keyframes bucket-refresh{from{transform:translateY(-62%)}to{transform:translateY(65%)}}
.crt-terminal .mission-strip{
  display:grid;grid-template-columns:1.1fr repeat(3,minmax(0,1fr));gap:0;
  padding:0;margin:14px 0 3px;border:1px solid var(--crt-line);background:var(--crt-panel);
}
.crt-terminal .mission-strip>div{padding:10px 12px;min-width:0}
.crt-terminal .mission-strip>div+div{border-left:1px solid var(--crt-line)}
.crt-terminal .mission-strip strong{font:700 clamp(12px,1.7vw,21px)/1.15 var(--crt-mono);letter-spacing:0;overflow-wrap:anywhere}
.crt-terminal .mission-strip .timer{color:var(--crt-bright);font-size:clamp(23px,3vw,35px)}
.crt-terminal .mission-strip .threat strong{color:var(--crt-alert)}
.crt-terminal .room-heading{margin-bottom:9px}
.crt-terminal .room-heading h2,.crt-terminal .side-card h3,.crt-terminal .panel-head h2{
  font:700 clamp(17px,2vw,28px)/1.2 var(--crt-mono);letter-spacing:0;color:var(--crt-bright)
}
.crt-terminal .room-heading p:not(.eyebrow){color:var(--crt-dim);line-height:1.5}
.camera-console{border:1px solid var(--crt-line);background:var(--crt-panel)}
.crt-terminal .camera-console .room{border:0;box-shadow:none}
.crt-terminal .room-vignette{background:linear-gradient(0deg,#04110840,transparent 17%)}
.crt-terminal .room-index,.crt-terminal .room .hotspot{
  color:#dcf8cf;background:#071b0ee8;border-color:#8db782;border-radius:0;
  box-shadow:0 0 0 1px #0812099e;font-family:var(--crt-mono);
}
.crt-terminal .room .hotspot .hotspot-icon{color:#c4edaa}
.crt-terminal .room .hotspot.complete{border-color:#aeedb4}
.crt-terminal .room .hotspot.alert{border-color:#eda582;color:#ffd4b4}
.crt-terminal .room .hotspot:hover{background:#18361c}
.crt-terminal .room-footer{font-family:var(--crt-mono);letter-spacing:0;line-height:1.5;color:var(--crt-dim)}
.crt-terminal .room-footer span:first-child,.crt-terminal .route-node.current{color:var(--crt-bright)}
.crt-terminal .pulse,.crt-terminal .route-node.current::before{background:#b1e693;box-shadow:0 0 8px #a8f29475}
.crt-terminal .route-node{color:var(--crt-dim)}
.crt-terminal .route-node::before{border-color:var(--crt-dim)}
.crt-terminal .route-node::after{background:var(--crt-line)}
.crt-terminal .side-card,.crt-terminal .ending-card{background:var(--crt-panel);border-color:var(--crt-line)}
.crt-terminal .side-card{padding:14px}
.crt-terminal .side-card h3{font-size:19px}
.crt-terminal .side-card p,.crt-terminal .checklist li,.crt-terminal .ending-card p{color:var(--crt-ink)}
.crt-terminal .checklist li{border-color:var(--crt-line);padding:6px 0}
.crt-terminal .checklist li::before,.crt-terminal .inventory-items .empty{color:var(--crt-dim)}
.crt-terminal .checklist li.done,.crt-terminal .checklist li.done::before,.crt-terminal .gripper-status{color:var(--crt-bright)}
.crt-terminal .saved-notice:not(:empty){background:#14271a;color:var(--crt-bright);border-color:#78ab70}
.crt-terminal #panel{background:var(--crt-panel);color:var(--crt-ink);border-color:var(--crt-line)}
.crt-terminal #panel::backdrop{background:#010703ce}
.crt-terminal .panel-head{background:var(--crt-raised);border-bottom-color:var(--crt-line)}
.crt-terminal .panel-head .close{background:#0f2012;color:var(--crt-bright);border-color:var(--crt-line)}
.crt-terminal .panel-body>p,.crt-terminal .evidence-tools label{color:var(--crt-ink)}
.crt-terminal .panel-body :is(input,select),.crt-terminal #evidencePicker{background:#030b05;border-color:var(--crt-line);color:var(--crt-bright)}
.crt-terminal .evidence-drawer,.crt-terminal .evidence-text,.crt-terminal .panel-body .readout{background:#050e08;border-color:var(--crt-line);color:var(--crt-ink)}
.crt-terminal .evidence-drawer summary,.crt-terminal .panel-body .readout strong{color:var(--crt-bright)}
.crt-terminal .evidence-drawer[open] summary{border-color:var(--crt-line)}
.crt-terminal .panel-body button.small-action{
  background:var(--crt-raised);border-color:var(--crt-line);color:var(--crt-bright);font-family:var(--crt-mono);
}
.crt-terminal .panel-body button.selected{background:#273d25;border-color:#aadc91}
.crt-terminal :is(.attack-viewport,.battle-controls,.battle-hud>div,.battle-clock,.battle-result,.attack-ready>div,.radar-top){
  background:var(--crt-panel);border-color:var(--crt-line);color:var(--crt-ink);
}
.crt-terminal :is(.battle-heading h2,.battle-clock strong,.battle-hud strong,.attack-ready h3,.battle-result h3,.ending-card h1){color:var(--crt-bright);font-family:var(--crt-mono)}
.crt-terminal :is(.battle-heading p:not(.eyebrow),.battle-controls p,.battle-hud span,.battle-result p,.attack-ready p,.radar-top span:last-child){color:var(--crt-ink)}
.crt-terminal :is(.flight-actions button,.power-options button){background:var(--crt-raised);border-color:var(--crt-line);color:var(--crt-bright)}
.crt-terminal .power-options button[aria-pressed=true]{background:#273d25;border-color:#aadc91;color:var(--crt-bright)}
.crt-terminal .flight-actions #fireBtn:not(:disabled){background:#b2df9c;color:#07150a}
@media(max-width:750px){
  .cover-console{grid-template-columns:1fr;min-height:0}
  .cover-monitor{border-left:0;border-top:1px solid var(--crt-line);min-height:clamp(164px,42vw,300px)}
  .crt-terminal .cover-copy{padding:25px 20px}
  .crt-terminal .cover-copy h1{font-size:clamp(34px,9.1vw,58px)}
  .crt-terminal .mission-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
  .crt-terminal .mission-strip>div:nth-child(n+3){border-top:1px solid var(--crt-line)}
  .crt-terminal .mission-strip>div:nth-child(3){border-left:0}
  .crt-terminal .mission-strip>div{padding:7px 8px}
  .crt-terminal .mission-strip .eyebrow{font-size:9px}
  .camera-bar{font-size:9px;padding:7px}
  .crt-terminal .brand .crt-emblem{width:34px;height:34px}
  .crt-terminal .brand{gap:5px}
  .crt-terminal .brand .eyebrow{font-size:8px}
  .crt-terminal .top-actions{gap:6px}
  .crt-terminal .battle-live .combat-dock{background:var(--crt-panel);border-color:var(--crt-line)}
}
@media(prefers-reduced-motion:reduce){.camera-overlay::after{animation:none}}
/* Bucket changes channels immediately. The location appears when the picture is ready. */
.camera-transition{position:absolute;inset:0;z-index:12;pointer-events:none}
.camera-snow{display:none;position:absolute;inset:0;background:#151815}
.camera-snow canvas{display:block;width:100%;height:100%;image-rendering:pixelated}
.camera-snow::after{content:'';position:absolute;inset:0;pointer-events:none;background:repeating-linear-gradient(0deg,#0003 0 1px,transparent 1px 3px);box-shadow:inset 0 0 28px #0006}
.camera-transition[data-phase=linking] .camera-snow{display:block;pointer-events:auto}
.crt-terminal .camera-console .room-art{transition:none}
.camera-room-title{
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);padding:9px 14px;
  background:#06150dec;border:1px solid #91c982;color:#dcf9ce;text-align:center;white-space:nowrap;
  font:700 clamp(14px,2.2vw,24px)/1.2 Consolas,monospace;opacity:0;
}
.camera-room-title span{display:block;color:#9fd595;font-size:10px;letter-spacing:.12em;margin-bottom:4px}
.camera-transition[data-phase=linked][data-announce=room] .camera-room-title{animation:bucket-location 1.45s ease-out both}
@keyframes bucket-location{0%,100%{opacity:0}9%,75%{opacity:1}}
@media(prefers-reduced-motion:reduce){
  .camera-transition[data-phase=linked][data-announce=room] .camera-room-title{animation:bucket-location-quiet 1.45s steps(1,end) both}
  @keyframes bucket-location-quiet{0%{opacity:1}100%{opacity:0}}
}

/* Fit the regular desktop layout to the visible browser window. */
@media (min-width:1051px) and (min-height:620px){
  .crt-terminal .shell{height:100dvh;min-height:0;display:grid;grid-template-rows:61px minmax(0,1fr) 29px}
  .crt-terminal .topbar{height:auto}
  .crt-terminal .footer{padding:7px 0;font-size:9px}
  .crt-terminal .operation-cover{margin:14px 0;min-height:0}
  .cover-console{min-height:0}
  .crt-terminal .cover-copy{padding:clamp(20px,4vw,58px)}
  .crt-terminal .cover-copy h1{font-size:clamp(36px,5.4vw,78px)}
  .crt-terminal #game{display:grid;grid-template-rows:auto minmax(0,1fr);min-height:0}
  .crt-terminal .mission-strip{margin:10px 0 3px}
  .crt-terminal .mission-strip>div{padding:6px 10px}
  .crt-terminal .game-grid{padding:9px 0;gap:15px;min-height:0}
  .crt-terminal .main-column{min-height:0;display:grid;grid-template-rows:auto minmax(150px,1fr) auto auto auto}
  .crt-terminal .room-heading{margin-bottom:6px}
  .crt-terminal .camera-console{min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr)}
  .crt-terminal .camera-console .room{height:auto;min-height:0}
  .crt-terminal .room-navigation{margin-top:6px}
  .crt-terminal .nav-arrow{min-height:33px}
  .crt-terminal .room-footer{padding:5px 2px}
  .crt-terminal .object-list{padding-top:5px}
  .crt-terminal .object-list>div{margin-top:4px;gap:5px}
  .crt-terminal .object-list button{padding:5px 8px;min-height:28px}
  .crt-terminal .sidebar{min-height:0;display:grid;grid-template-rows:repeat(3,auto);align-content:start;overflow:auto;gap:7px;scrollbar-width:thin;scrollbar-color:#53734d var(--crt-panel)}
  .crt-terminal .side-card{padding:9px 11px;flex:none}
  .crt-terminal .side-card h3{font-size:17px;margin:4px 0 3px}
  .crt-terminal .side-card p{font-size:12px;line-height:1.35}
  .crt-terminal .checklist ul{margin-top:5px}
  .crt-terminal .checklist li{padding:3px 0;font-size:12px}
  .crt-terminal .hint-card p{min-height:0;margin-bottom:4px}
  .crt-terminal .receive-frame{gap:8px;padding:14px 25px}
  .crt-terminal .receive-grid{grid-template-columns:minmax(0,1.18fr) minmax(0,.82fr)}
  .crt-terminal .receive-grid .command-message p{font-size:13px;line-height:1.48;margin-bottom:8px}
  .crt-terminal .receive-grid .command-message p:last-child{margin-bottom:0}
  .crt-terminal .crt-map{max-height:min(36dvh,395px)}
  .crt-terminal .battle{padding:10px 0;overflow:auto}
  .crt-terminal .battle-heading{margin-bottom:8px}
  .crt-terminal .battle-heading h2{font-size:clamp(30px,4.5vw,64px)}
  .crt-terminal .battle-hud{margin-bottom:8px}
  .crt-terminal .battle-hud>div,.crt-terminal .battle-controls{padding:9px 12px}
  .crt-terminal .attack-viewport{width:min(100%,calc((100dvh - 247px)*2))}
}
@media (min-width:1051px) and (min-height:620px) and (max-height:700px){
  .crt-terminal .shell{grid-template-rows:53px minmax(0,1fr) 23px}
  .crt-terminal .footer{padding:5px 0}
  .crt-terminal .side-card{padding:7px 9px}
  .crt-terminal .side-card h3{font-size:15px}
  .crt-terminal .checklist li{padding:2px 0}
  .crt-terminal .room-heading h2{font-size:21px}
  .crt-terminal .receive-frame{padding:9px 22px;gap:6px}
  .crt-terminal .receive-grid{grid-template-columns:minmax(0,1.34fr) minmax(0,.66fr);gap:8px}
  .crt-terminal .receive-grid .briefing-copy{padding:9px}
  .crt-terminal .receive-grid .command-message p{font-size:12px;line-height:1.4;margin-bottom:5px}
  .crt-terminal .receive-grid .terminal-prompt{margin-bottom:7px}
  .crt-terminal .receive-grid .crt-map{min-height:190px}
}
.inventory-deck{border-top:1px solid var(--crt-line);padding:7px 0 0;min-width:0}
.inventory-deck-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.inventory-deck :is(#openInventory,#openEvidence){display:inline-flex;align-items:center;gap:10px;min-height:34px;padding:5px 10px}
#inventoryCount{min-width:2ch;padding:1px 4px;border:1px solid var(--crt-line);background:var(--crt-panel);text-align:center}
.inventory-deck .gripper-status{margin:0;font-size:11px;color:var(--crt-bright);overflow-wrap:anywhere}
.inventory-deck .saved-notice{margin:5px 0 0;padding:3px 7px;font-size:10px;line-height:1.35}
#panel:is([data-view=inventory],[data-view=item],[data-view=hint]){width:min(860px,calc(100% - 26px))}
#panel:is([data-view=inventory],[data-view=item],[data-view=hint]) .panel-workspace{
  grid-template-columns:minmax(0,1fr) minmax(0,2.35fr);align-items:stretch;
  margin:0 clamp(12px,3vw,25px) 22px;border:1px solid var(--crt-line)
}
.inventory-pane{padding:7px;min-width:0;border-right:1px solid var(--crt-line);background:#08160d}
.inventory-pane,.inventory-pane:not([hidden])~.panel-body{height:clamp(250px,48dvh,375px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
.inventory-pane .inventory-items{display:grid;gap:5px;margin:0}
.inventory-pane .inventory-items button{
  display:flex;align-items:center;justify-content:flex-start;gap:8px;text-align:left;
  width:100%;min-width:0;min-height:42px;padding:7px 8px;overflow-wrap:anywhere;
}
.inventory-pane .inventory-items button span{color:inherit;background:none;border:0;padding:0;font:inherit}
.inventory-pane .inventory-items button[aria-pressed=true]{border-color:#a4d88d;background:#293f26;color:#ebffe3}
.inventory-pane .item-thumb{width:29px;height:27px;object-fit:contain}
.inventory-pane:not([hidden])~.panel-body{padding:clamp(11px,2.3vw,22px)}
.hint-history-label{margin:6px 0 0;color:var(--crt-dim);font-size:11px}
.hint-messages{margin:8px 0 0;padding-left:1.5em;line-height:1.5}
.hint-messages li+li{margin-top:8px}
.library-item-title{color:var(--crt-bright);font-size:clamp(16px,2vw,23px);margin:0 0 9px;overflow-wrap:anywhere}
.inventory-pane~.panel-body .inspection-art{margin:8px 0;max-width:360px}
.inventory-pane~.panel-body .inspection-art img{max-height:min(24vh,190px);object-fit:contain}
.inventory-pane~.panel-body .evidence-transcript{padding:0}
.library-tabs{display:flex;gap:5px;margin:0 clamp(16px,4vw,28px);border-bottom:1px solid var(--crt-line)}
.library-tabs[hidden]{display:none}
.library-tabs button{color:var(--crt-bright);background:var(--crt-panel);border:1px solid var(--crt-line);border-bottom:0;padding:8px 14px;font:700 13px var(--crt-mono)}
.library-tabs button[aria-selected=true]{color:#08130a;background:#b2df9c}
.camera-tools{display:flex;align-items:center;gap:8px}
#toggleLabels{border:1px solid var(--crt-line);padding:3px 6px;background:var(--crt-panel);color:var(--crt-bright);font:inherit}
#toggleLabels[aria-pressed=true]{background:#b2df9c;color:#08130a}
#viewportAdvice{width:min(440px,calc(100% - 26px));background:var(--crt-panel);border-color:var(--crt-line);color:var(--crt-ink)}
#viewportAdvice .advice-image{
  height:min(27vh,150px);background:linear-gradient(0deg,#07110cd0,transparent 65%),url("assets/shuttle-bay-hatch-locked.webp") center 44%/cover;
  border-bottom:1px solid var(--crt-line)
}
.advice-copy{padding:clamp(15px,4vw,24px)}
.advice-copy h2{color:var(--crt-bright);margin:6px 0 10px;font:700 clamp(21px,5.6vw,30px)/1.1 var(--crt-mono)}
.advice-copy p:not(.eyebrow){font-size:14px;line-height:1.55;margin:0 0 14px}
.advice-copy button{min-height:42px;padding:8px 12px}
@media(max-width:520px){.inventory-deck .gripper-status{font-size:10px}}
@media(max-width:600px){
  #panel:is([data-view=inventory],[data-view=item],[data-view=hint]) .panel-workspace{grid-template-columns:minmax(0,1fr) minmax(0,1.75fr);margin-inline:8px}
  .inventory-pane{padding:4px}
  .inventory-pane .inventory-items button{padding:6px 4px;gap:3px;font-size:10px}
  .inventory-pane .item-thumb{display:none}
  .inventory-pane:not([hidden])~.panel-body p{font-size:13px;line-height:1.5}
}

.crt-terminal .room.room-bay .hotspot.engineeringReader{left:28%;top:38%;max-width:146px}
.crt-terminal .room.room-bay .hotspot.engineeringReader:not(.complete){border-color:#d4aa68}
.crt-terminal .room .hotspot:is(.operationsHatch,.defenseHatch,.bayReturn,.engineeringReturn,.returnHatch){
  left:var(--hatch-x);top:var(--hatch-y,48%);translate:-50% -50%;
}
.crt-terminal .room .hotspot.operationsHatch{--hatch-x:25%}
.crt-terminal .room .hotspot.defenseHatch{--hatch-x:27%}
.crt-terminal .room .hotspot.bayReturn{--hatch-x:75%}
.crt-terminal .room .hotspot.engineeringReturn{--hatch-x:76%}
.crt-terminal .room .hotspot.returnHatch{--hatch-x:80%;--hatch-y:41%}
.crt-terminal .room .hotspot.hatch-ready{border-color:#d4aa68;color:#ffdd9e;box-shadow:0 0 15px #d4aa6838}
.crt-terminal .room.room-engineering .room-art[data-power="online"]{filter:brightness(1.17) saturate(1.12)}
.crt-terminal .room.room-engineering .hotspot.reactor{left:49%;top:51%}
.crt-terminal .room.room-engineering .hotspot.schematic{left:37%;top:31%}
.crt-terminal .room.room-engineering .hotspot.coolant{left:59%;right:auto;top:34%;bottom:auto}
.crt-terminal .room.room-engineering .hotspot.life{right:4%;top:39%}
.crt-terminal .room.room-engineering .hotspot.sweep{left:39%;top:66%}
.crt-terminal .room.room-engineering .hotspot.reactor,
.crt-terminal .room.room-operations .hotspot.comms{bottom:auto}
.crt-terminal .room.room-defense .hotspot.defense{right:4%;top:56%;bottom:auto}
.crt-terminal .room.room-defense .hotspot.launchProtocol{left:63%;right:auto;top:69%;bottom:auto}
.crt-terminal .room.room-operations .hotspot.decoder{left:39%;top:61%;bottom:auto}
@media(max-width:520px){
  .room.room-bay .room-art{background-position:43% center}
  .crt-terminal .room.room-bay .hotspot.engineeringReader{left:15%;top:27%;max-width:119px}
}
@media(max-width:720px){
  .crt-terminal .camera-console .room:is(.room-engineering,.room-operations,.room-defense){
    height:auto;aspect-ratio:16/9;
  }
  .crt-terminal .room .hotspot.returnHatch{--hatch-x:84%}
  .crt-terminal .room.room-engineering .hotspot.schematic{left:33%;top:14%}
  .crt-terminal .room.room-engineering .hotspot.reactor{left:37%;top:61%}
  .crt-terminal .room.room-engineering .hotspot.coolant{left:57%;top:17%}
  .crt-terminal .room.room-engineering .hotspot.life{right:4%;top:70%}
  .crt-terminal .room.room-engineering .hotspot.sweep{left:5%;top:76%}
  .crt-terminal .room.room-operations .hotspot.beacon{left:39%;top:12%}
  .crt-terminal .room.room-operations .hotspot.relay{bottom:7%}
  .crt-terminal .room.room-operations .hotspot.sensors{bottom:7%}
  .crt-terminal .room.room-operations .hotspot.decoder{left:35%;top:auto;bottom:4%}
  .crt-terminal .room.room-operations .hotspot.cipherWheel{left:41%;top:54%}
  .crt-terminal .room.room-defense .hotspot.defense{top:62%}
  .crt-terminal .room.room-defense .hotspot.launchProtocol{left:46%;top:78%}
}

/* Bucket marks interactable objects without obscuring the station camera. */
.crt-terminal .room .hotspot .hotspot-label small{display:block;margin-top:3px;color:#ffdf9e;font-size:.85em}
.crt-terminal .room .hotspot.gripper-match{border-color:#ffcf78;box-shadow:0 0 0 2px #ffcf784f,0 0 17px #ffcf7866}
.crt-terminal .room.room-engineering .room-art::after,
.crt-terminal .room.room-operations .room-art::after{
  content:'';position:absolute;inset:0;pointer-events:none;mix-blend-mode:screen
}
.crt-terminal .room.room-engineering .room-art[data-power=online]::after{background:radial-gradient(ellipse at 30% 24%,#ac692b39,transparent 67%)}
.crt-terminal .room.room-operations .room-art::after{background:linear-gradient(#226d9c24,transparent 64%)}
.crt-terminal .room.room-bay .hotspot.grate{left:65%;bottom:14%}
.crt-terminal .room.room-bay .hotspot.habLog{left:19%;bottom:19%}
.crt-terminal .room.room-bay .hotspot.shuttle{top:58%;right:10%}
@media(max-width:720px){
  .crt-terminal .room.room-bay .hotspot.grate{left:66%;bottom:10%}
  .crt-terminal .room.room-bay .hotspot.shuttle{right:4%;top:46%}
}
.scene-prop{
  display:block;width:clamp(20px,3.7vw,54px);aspect-ratio:1;flex:none;
  background-image:url("assets/station-props.webp");background-size:400% 300%;
  background-position:var(--prop-x) var(--prop-y);
  filter:brightness(.87) drop-shadow(1px 3px 2px #000b);
}
@media(min-width:721px) and (hover:hover) and (pointer:fine){
  .crt-terminal .room .hotspot{
    justify-content:center;width:42px;min-height:42px;height:42px;padding:0;
    border-radius:4px;background:#07150dbd;box-shadow:0 0 0 1px #061109b5
  }
  .crt-terminal .room .hotspot.gripper-match{box-shadow:0 0 0 2px #ffcf7870,0 0 17px #ffcf7866}
  .crt-terminal .room .hotspot.has-prop{width:55px;height:55px;background:#07150d30;border-color:#87a58777;box-shadow:none}
  .crt-terminal .room .hotspot.has-prop:hover .scene-prop{filter:brightness(1.13) drop-shadow(1px 3px 2px #000b)}
  .crt-terminal .room .hotspot:is(:hover,:focus-visible,.hatch-ready,.gripper-match){z-index:3}
  .crt-terminal .room .hotspot-label{
    position:absolute;left:50%;top:calc(100% + 4px);transform:translateX(-50%);
    display:none;max-width:160px;width:max-content;padding:5px 8px;
    color:#e0f3d7;background:#07150df2;border:1px solid #7baa72;
    pointer-events:none
  }
  .crt-terminal .room .hotspot:is(:hover,:focus-visible,.hatch-ready,.gripper-match,.exit-marker) .hotspot-label{display:block}
  .crt-terminal .room[data-labels=all] .hotspot-label{display:block}
}

.instrument-plate{
  display:grid;gap:12px;justify-items:center;margin:12px 0;padding:14px;
  color:#c8e8ba;background:linear-gradient(145deg,#16252c,#0a171c 80%);
  border:1px solid #63747c;border-radius:7px;box-shadow:inset 0 0 0 4px #070e12;
  font-family:var(--crt-mono);text-align:center
}
.sensor-radar{
  width:min(165px,65vw);aspect-ratio:1;border:3px solid #769b71;border-radius:50%;position:relative;
  background:repeating-radial-gradient(circle,#102617 0 20px,#436b473d 21px 22px,#102617 23px 27px);
  box-shadow:inset 0 0 25px #020a05;
}
.sensor-radar i{
  position:absolute;inset:4px;border-radius:50%;transform:rotate(var(--bearing));
  background:conic-gradient(from -30deg,#92e98500 0deg,#92e9859a 29deg,#c9fcb9 30deg,#92e98500 31deg);
  transition:transform 140ms ease-out
}
.sensor-instrument .instrument-actions{display:flex;gap:6px;justify-content:center;flex-wrap:wrap}
.sensor-instrument .signal-meter{display:flex;align-items:center;gap:8px;font-size:11px}
.signal-meter meter{width:90px;height:10px}
.instrument-plate output{color:#c9fcb9;background:#040b06;border:1px solid #4b7346;padding:4px 12px;font-size:23px;min-width:44px}
.sensor-instrument #sensorTrace{margin:0;font-size:13px}
.launch-wheels{display:grid;width:100%;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.launch-wheel{display:grid;gap:4px;justify-items:stretch;padding:4px;border:1px solid #60727a;border-radius:4px;color:#ead4a0;font-size:11px}
.launch-wheel output{display:block;padding:2px;min-width:0;box-shadow:inset 0 5px 9px #000}
.crt-terminal .panel-body .launch-wheel button{margin:0;min-height:34px;padding:2px;background:#293b44;border:1px solid #72838a;color:#edf5ed}
.crt-terminal .panel-body .launch-wheel button:hover{background:#36525d}
.launch-interlocks ol{list-style:none;padding:0;margin:0;display:flex;width:100%;justify-content:space-around;gap:6px;flex-wrap:wrap;font-size:11px}
.launch-interlocks strong{display:block;color:#eae5b9}
.crt-terminal .panel-body .launch-lever{margin:0;border:2px solid #ffe0a1;color:#111c11;background:#c2d79d;box-shadow:0 4px 0 #526541}
.aim-assist{display:flex;align-items:center;justify-content:center;gap:8px;color:var(--crt-bright);font:700 13px var(--crt-mono);margin:8px 0}
.aim-assist input{accent-color:#add894}
.practice-actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.ending{
  --report-accent:#caf2ae;--report-line:#466d53;--report-base:#09150f;--report-bar:#13251a;
  min-height:0;padding:18px 0;overflow:auto;align-items:safe center
}
.ending[data-outcome=lost]{
  --report-accent:#ffc49d;--report-line:#985c45;--report-base:#170e0c;--report-bar:#2b1813
}
.crt-terminal .ending .ending-card{
  width:min(1180px,100%);max-width:none;padding:0;text-align:left;
  background:var(--report-base);border-color:var(--report-line);box-shadow:0 18px 65px #0009
}
.ending-header,.ending-art figcaption{
  display:flex;justify-content:space-between;align-items:center;gap:8px;
  padding:10px 15px;color:#e4e9df;background:var(--report-bar);
  font:700 clamp(9px,1vw,12px)/1.35 var(--crt-mono);letter-spacing:.08em
}
.ending-header{border-bottom:1px solid var(--report-line)}
.ending-header strong,.ending-art figcaption strong{color:var(--report-accent)}
.ending-header strong::before{
  content:'';display:inline-block;width:7px;height:7px;margin-right:7px;
  background:currentColor;box-shadow:0 0 8px currentColor
}
.ending-layout{display:grid;grid-template-columns:minmax(0,1.42fr) minmax(0,1fr);gap:0}
.ending-art{display:flex;flex-direction:column;margin:0;min-width:0;border-right:1px solid var(--report-line)}
.ending-image{position:relative;flex:1 0 auto;aspect-ratio:1.41;overflow:hidden;background:#070d10}
.ending-image::after{
  content:'';position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(transparent 70%,#02080745),repeating-linear-gradient(transparent 0 4px,#0002 4px 5px)
}
.ending-card .ending-art img{
  position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;object-position:49% 52%;
  animation:ending-drift 1.8s ease-out both
}
.ending[data-outcome=lost] .ending-art img{object-position:53% 48%;animation:none}
.ending-art figcaption{border-block:1px solid var(--report-line)}
.ending-report{padding:clamp(12px,2vw,25px);min-width:0}
.crt-terminal .ending .ending-report h1{
  color:var(--report-accent);font-size:clamp(26px,3.45vw,58px);line-height:.98;
  letter-spacing:-.045em;margin:0 0 12px;overflow-wrap:break-word
}
.ending-report #endingBody{margin:0;color:#d8e3d5;font-size:clamp(12px,1.15vw,15px);line-height:1.5}
.ending-report .command-receipt{
  margin:13px 0;padding:9px 12px;background:var(--report-bar);
  border-left:2px solid var(--report-accent);font:13px/1.45 var(--crt-mono)
}
.command-receipt strong{display:block;color:var(--report-accent);font-size:11px;margin-bottom:4px}
.ending-report .command-receipt p{margin:0;color:#e3e6de}
.ending[data-outcome=won] .command-receipt{animation:command-ack .23s .55s both}
.ending-report .ending-stats{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;margin:13px 0;
  background:var(--report-line);border:1px solid var(--report-line);
  font:700 11px/1.25 var(--crt-mono);letter-spacing:0
}
.ending-stats div{padding:7px;background:var(--report-base)}
.ending-stats dt{color:#c5cdc3;font-size:9px}
.ending-stats dd{margin:3px 0 0;font-size:17px;color:var(--report-accent)}
.crt-terminal .ending-report .primary{margin:0;min-height:38px;padding:8px 13px}
#ending[data-outcome=lost] #endingRestart{background:#ffc49d;border-color:#ffc49d;color:#27140e}
#ending[data-outcome=lost] #endingRestart:hover{background:#ffdfca}
.mission-timing{margin:12px 0 0;text-align:left;font:13px var(--crt-mono)}
.mission-timing summary{cursor:pointer}
.mission-timing dl{display:grid;grid-template-columns:1fr auto;gap:5px 12px}
.mission-timing dd{margin:0}
@keyframes ending-drift{from{transform:scale(1.065)}to{transform:scale(1)}}
@keyframes command-ack{from{opacity:0}to{opacity:1}}
@media(min-width:721px) and (max-height:760px){
  .ending-image{height:min(55vh,365px);aspect-ratio:auto}
}
@media(max-width:720px){
  .ending{padding:10px 0}
  .ending-layout{grid-template-columns:1fr}
  .ending-art{border-right:0}
  .ending-image{aspect-ratio:1.78}
  .ending-report{padding:12px}
  .ending-header,.ending-art figcaption{padding:7px 9px}
  .crt-terminal .ending .ending-report h1{font-size:clamp(27px,8vw,39px)}
}
@media(pointer:coarse){
  .crt-terminal .panel-body .launch-wheel button{min-height:42px}
}
@media(prefers-reduced-motion:reduce){
  .sensor-radar i{transition:none}
  .ending-card .ending-art img,.ending[data-outcome=won] .command-receipt{animation:none}
}
