#spacePanel{--sm-ink:#eef7ff;--sm-muted:#b8ccdf;--sm-edge:#35506b;--sm-mint:#80f6d7;color:var(--sm-ink);background:radial-gradient(ellipse at 80% 0,#29375f 0,transparent 44%),#10192c;border:1px solid #344e69;border-radius:24px;padding:clamp(16px,3vw,32px);box-shadow:0 14px 30px #24335228}
#spacePanel [hidden]{display:none!important}.sm-head{display:flex;align-items:end;justify-content:space-between;gap:18px;flex-wrap:wrap;margin-bottom:24px}.sm-kicker,.sm-label{font:700 .75rem/1.4 system-ui;letter-spacing:.15em;text-transform:uppercase;color:var(--sm-mint)}.sm-head h2{margin:4px 0;font-size:clamp(2rem,5vw,3.6rem);line-height:1.05;color:#fff}.sm-head p{margin:7px 0;color:var(--sm-muted)}.sm-progress{min-width:150px}.sm-progress span{display:block;color:var(--sm-mint);font-weight:bold}.sm-progress progress{width:100%;accent-color:#66e7c6;height:16px}.sm-board{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:16px}.sm-card{background:#19273e;border:1px solid var(--sm-edge);border-radius:16px;padding:16px;min-width:0}.sm-card h3{color:#fff;margin:6px 0 12px}.sm-map{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;padding:12px;background:repeating-linear-gradient(90deg,#293e54 0 1px,transparent 1px 24px),repeating-linear-gradient(#293e54 0 1px,#121f32 1px 24px);border:2px solid #3d5773;border-radius:20px}.sm-room{grid-column:span 2;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;min-height:88px!important}.sm-room:nth-child(n+4){grid-column:span 3}.sm-room-icon{font-size:1.4rem;color:#9dd5ff}.sm-room small{font-size:.7rem;color:var(--sm-muted)}#spacePanel button{font-family:inherit;border:1px solid #527290;border-radius:11px;background:#253d58;color:#fff;min-height:44px;padding:8px;cursor:pointer;font-weight:700}#spacePanel button:hover:not(:disabled){background:#345474}#spacePanel button:focus-visible{outline:3px solid #ffd174;outline-offset:2px}#spacePanel button:disabled{cursor:default;opacity:.85}#spacePanel .sm-room[aria-current=step]{border-color:#9ee9ff;box-shadow:inset 0 0 0 1px #9ee9ff}#spacePanel .sm-room[data-fixed=true],#spacePanel button[data-correct=true]{background:#215348;border-color:#80f6d7}#spacePanel button[data-wrong=true]{border-color:#ff9a9a}.sm-crew{display:flex;justify-content:space-around;gap:8px;margin:18px 0 0}.sm-crew>div{display:grid;justify-items:center;gap:6px;font-size:.8rem;font-weight:700}.sm-cleared>span:last-child::after{content:' ✓';color:#80f6d7}.sm-bot{width:42px;height:47px;border:2px solid #101927;border-radius:48% 48% 26% 26%;display:grid;justify-items:center;align-content:center;gap:2px;background:var(--suit);box-shadow:inset -5px -5px #0003,0 4px 0 #0d1727;color:#142d45}.sm-visor{background:#d3f5ff;line-height:1;border-radius:12px;padding:3px 7px;font-size:12px;letter-spacing:2px}.sm-badge{font-size:11px;line-height:1}.sm-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.sm-options button{font-size:1.05rem}#spacePanel .sm-primary{background:#92f2d8;color:#152e36;border-color:#92f2d8}#spacePanel .sm-primary:hover{background:#c2fff0}.sm-controls{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.sm-feedback{min-height:1.7em;color:#ffe1a2;margin-bottom:0}.sm-evidence{grid-column:1/-1}.sm-evidence ul{margin:0;padding-left:20px}.sm-evidence li{margin:5px 0}.sm-evidence p,.sm-instructions{color:var(--sm-muted);margin:6px 0}.sm-instructions{font-size:.88rem;margin-top:14px}@media(max-width:720px){.sm-board{grid-template-columns:minmax(0,1fr)}.sm-room{font-size:.8rem}.sm-evidence{grid-column:auto}}

/* Flight deck: buttons remain real controls, over the illustrated ship. */
#spacePanel .sm-board{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);align-items:start}
#spacePanel .sm-map{position:relative;display:block;width:100%;height:clamp(240px,33vw,345px);padding:0;overflow:hidden;background:#090e20 url('/space-deck.svg') center/100% 100% no-repeat;isolation:isolate}
#spacePanel .sm-room{position:absolute;z-index:1;left:var(--station-x);top:var(--station-y);transform:translate(-50%,-50%);width:21%;height:26%;min-height:44px!important;padding:3px 1px;gap:2px;background:#10192d44;border:1px solid #b7c5e449;border-radius:10px;box-shadow:none;text-shadow:0 1px 3px #000}
#spacePanel .sm-room:hover:not(:disabled),#spacePanel .sm-room[aria-current=step]{background:#142a41ae;border-color:#bbf2ff}
#spacePanel .sm-room[data-fixed=true]{background:#125745ad;border-color:#8ff7bf;color:#d2ffe5}
#spacePanel .sm-room[data-fixed=true] small{color:#ccffe4}
#spacePanel .sm-room strong{font-size:clamp(.59rem,1.28vw,.93rem);overflow-wrap:anywhere;max-width:100%}
#spacePanel .sm-room-icon{font-size:1.1rem;line-height:1}
.sm-player{position:absolute;z-index:3;left:50%;top:50%;transform:translate(-50%,-50%);pointer-events:none;display:grid;justify-items:center;gap:1px}
.sm-player .sm-bot{width:31px;height:35px;border-radius:46% 46% 25% 25%;box-shadow:inset -4px -4px #0003,0 4px 0 #071224}
.sm-player .sm-visor{padding:2px 5px;font-size:9px}.sm-player .sm-badge{font-size:9px}
.sm-player-tag{padding:1px 4px;border-radius:3px;background:#0c172b;color:#b8f9eb;font:800 9px/1.4 system-ui;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap}
#spacePanel[data-moving=true] .sm-player .sm-bot{animation:sm-step .19s ease-in-out infinite alternate}
@keyframes sm-step{to{transform:translateY(-4px) rotate(6deg)}}
.sm-repair-pop{position:absolute;z-index:4;width:37px;height:37px;pointer-events:none;filter:drop-shadow(0 0 9px #ffe28c);transform:translate(-50%,-50%)}
.sm-deck-controls{display:flex;justify-content:space-between;gap:8px;align-items:center;flex-wrap:wrap;margin-top:10px}
.sm-deck-controls p{flex:1 1 100px;color:var(--sm-muted);font-size:.8rem;margin:0}
.sm-pad{display:grid;grid-template-columns:repeat(4,44px);gap:5px}
#spacePanel .sm-pad button{font-size:1.2rem;padding:0}
#spacePanel .sm-vote-choice{display:flex;justify-content:center;align-items:center;gap:10px}
#spacePanel .sm-vote-choice .sm-bot{width:33px;height:37px}
#spacePanel[data-phase=win] .sm-crew .sm-bot{animation:sm-step .4s ease-in-out 6 alternate}
#spacePanel[data-phase=vote] #smQuestion{color:#ffe1a2}
@media(max-width:800px){#spacePanel .sm-board{grid-template-columns:minmax(0,1fr)}}
@media(prefers-reduced-motion:reduce){#spacePanel .sm-bot{animation:none!important}}
#spacePanel .sm-map{background:#090e20;touch-action:none}
.sm-world{position:absolute;inset:0;transform-origin:0 0;background:#090e20 url('/space-deck.svg') center/100% 100% no-repeat}
.sm-ship-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin-top:8px}
#smLocation{flex:1;color:#b8f9eb;font-weight:700;font-size:.84rem}
#spacePanel #smUse:not(:disabled){background:#92f2d8;color:#142a3d}
#spacePanel .sm-pad button{touch-action:none;user-select:none}

.sm-mini{--console:#86ddfb;margin:8px 0 12px;padding:12px;background:#101c2d;border:1px solid #3c5c75;border-radius:12px}
.sm-mini[data-station=power]{--console:#ffd184}.sm-mini[data-station=cargo]{--console:#ffba9d}.sm-mini[data-station=nav]{--console:#b9abff}.sm-mini[data-station=lab]{--console:#92f2d8}.sm-mini[data-station=radio]{--console:#8cdcff}
.sm-console-title{color:var(--console);font-size:.8rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.sm-console-display{min-height:66px;margin:8px 0;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--console);background:repeating-linear-gradient(0deg,#ffffff07 0 1px,transparent 1px 6px),#081222;border:1px solid #365169;border-radius:8px}
.sm-console-display svg{display:block;width:100%;height:70px;max-width:320px}
.sm-console-display svg path{fill:none;stroke:#43617c;stroke-width:3;stroke-linecap:round}
.sm-console-display svg circle{fill:#243e56;stroke:var(--console);stroke-width:2}.sm-console-display svg .sm-wire-base,.sm-console-display svg .sm-wire-live,.sm-console-display .sm-signal path{stroke:var(--console)}
.sm-mini[data-online=true] .sm-console-display{border-color:#8ff7bf;box-shadow:inset 0 0 20px #79ffc02b}
.sm-mini[data-online=true] .sm-wire-live,.sm-mini[data-online=true] .sm-signal path{stroke:#8ff7bf;filter:drop-shadow(0 0 4px #8ff7bf)}
.sm-console-hint{font-size:.84rem;color:#c7dbee;margin:6px 0}
#spacePanel .sm-console-action{width:100%;margin-top:5px}
.sm-crates{font-size:1.45rem;letter-spacing:.08em}
.sm-beacons,.sm-scan{display:flex;gap:8px;align-items:center;justify-content:center;flex-wrap:wrap;padding:7px}
.sm-beacons span,.sm-scan span{padding:5px 8px;border:1px solid #4b617e;border-radius:8px;text-align:center;min-width:35px}
.sm-beacons .sm-next-beacon{border-style:dashed;border-color:var(--console)}
.sm-scan span{display:grid}.sm-scan small{font-size:.68rem;color:#c7dbee}.sm-scan-wait{font-size:2rem}
#spacePanel .sm-console-choice{border-bottom-width:3px}
.sm-mini[data-station=power]:not([hidden])+.sm-options{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
