:root{color-scheme:dark;font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans",sans-serif;background:#080c15;color:#f5f5fb;-webkit-text-size-adjust:100%}*{box-sizing:border-box}body{margin:0}button{font:inherit;color:inherit;border:1px solid #77879b;background:#1c293d;border-radius:10px;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:disabled{opacity:.45}button:focus-visible{outline:3px solid #ffe4a7;outline-offset:-3px}[hidden]{display:none!important}.shell{max-width:450px;margin:auto;height:calc(100svh - var(--nav-height,88px));height:calc(100dvh - var(--nav-height,88px));padding:1px 3px max(2px,env(safe-area-inset-bottom));display:flex;flex-direction:column;min-height:470px}.stage{position:relative;flex:1;min-height:0;display:flex;flex-direction:column;padding:6px;border:1px solid #b6a079;border-radius:18px 18px 0 0;background:radial-gradient(ellipse at top,#20374a,#0b1524 75%);overflow:hidden}.hud{display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:40px;font-size:13px}.hud strong{color:#ffdf9c}.hud button{width:44px;height:44px}.meter{height:3px;background:#293449;margin:2px 0 8px}.meter span{display:block;height:100%;background:#f0cd82;transition:width .3s}.board{flex:1;min-height:240px;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(5,minmax(0,1fr));gap:5px}.cell{position:relative;min-width:0;min-height:44px;padding:0;border-color:#64788a;background:linear-gradient(135deg,#263c50,#111e30);overflow:hidden;isolation:isolate}.cell svg{width:100%;height:100%;display:block;position:absolute;inset:0;fill:none;stroke:#a2b5c5;stroke-width:9;stroke-linecap:round}.cell.live svg{stroke:#72f3de;filter:drop-shadow(0 0 3px #38cbb0)}.cell.live{border-color:#65ddc8}.cell.goal{border:2px solid #e5c578}.cell.source{border:2px solid #7be4f1}.cell.hazard{border:2px solid #ef7384;background:#401e31}.cell.hazard svg{stroke:#f68c9c}.cell.empty{background:#0b1420;border-color:#253348}.marker{position:absolute;z-index:1;inset:0;display:grid;place-items:center;pointer-events:none;font-size:20px;font-weight:800;text-shadow:0 1px 4px #000;background:radial-gradient(circle,#101b2c 0 15%,transparent 33%);color:#ffdf9c}.hazard .marker{color:#ff93a4}.cell:disabled{opacity:1}.readout{display:flex;justify-content:space-between;gap:6px;min-height:31px;align-items:center;font-size:12px;color:#b8d2df}.readout #status{color:#f4d391}.actions{display:flex;gap:7px}.actions button{min-height:44px;flex:1}.actions #test{border-color:#e0be7d;color:#ffdf9c;background:#34372d}.legend{font-size:10px;color:#c8d1df;text-align:center;padding:7px 0 2px}.legend span{margin-left:7px;color:#ff9aaa}.buddy{display:flex;align-items:center;gap:8px;flex-shrink:0;height:70px;padding:0 8px;border:1px solid #b6a079;border-top:0;border-radius:0 0 18px 18px;background:#142134}.buddy img{object-fit:contain;align-self:flex-end;width:76px;height:76px}.buddy span{font-size:12px;flex:1;line-height:1.5}.buddy strong{color:#f0cd82;font-size:15px}.overlay{position:absolute;inset:0;z-index:4;background:#050912c9;backdrop-filter:blur(6px);display:grid;place-items:center;padding:12px}.panel{display:flex;flex-direction:column;align-items:center;gap:10px;max-height:100%;overflow:auto;width:min(100%,320px);padding:18px 14px;background:#152337;border:1px solid #b6a079;border-radius:16px;text-align:center}.panel>img{object-fit:contain;max-height:25dvh;width:128px}.panel p{margin:0;font-size:13px;line-height:1.6}.panel #caption{font-size:19px;color:#ffe1a0;font-weight:800}.panel #best{font-size:11px;color:#bfccda}.picker{display:flex;gap:9px}.picker button{width:52px;height:52px;padding:0}.picker img{width:100%;height:100%;object-fit:contain}.picker [aria-pressed=true]{border:2px solid #ffdc97;background:#364159}.play{min-height:46px;width:100%;background:#f1d398;color:#1c2330;font-weight:800;border:0}.celebration{position:absolute;z-index:3;inset:20% 0 auto;text-align:center;color:#ffdf9c;font-weight:900;font-size:22px;text-shadow:0 0 16px #d5a953;background:#101c2eee;padding:22px 0;pointer-events:none;animation:shine .7s ease-out}.stage.success .cell.live{box-shadow:inset 0 0 14px #65ddc855}.stage.danger{border-color:#ff788b}@keyframes shine{from{transform:scale(.85);opacity:.4}to{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

/* Review 1: distinguish fixed equipment, powered goals and rotatable panels. */
.rotate-hint{position:absolute;right:4px;bottom:1px;font-size:13px;color:#b7c6d8;pointer-events:none}.goal.live .marker{color:#72f3de}.wire:active{background:#324b61}

/* Review 2: brief achievement response without covering the board for long. */
.buddy img.react{animation:buddy-cheer .55s ease-out}.stage.success .meter span{box-shadow:0 0 8px #f0cd82}@keyframes buddy-cheer{50%{transform:translateY(-7px) rotate(-5deg)}}

/* Review 3: expose open cable ends and the ready state without extra instructions. */
.cell svg .open-socket{stroke:#ffd378;fill:#5e4721;stroke-width:3}.hud .low{color:#ff9aaa}.actions #test.ready{background:#235048;border-color:#72f3de;color:#d0fff2}.meter{flex-shrink:0}.readout,.actions,.legend,.hud{flex-shrink:0}

/* Detail review 2: retain 44px touch targets on short portrait screens. */
@media(max-height:650px){.buddy{height:56px}.buddy img{width:60px;height:60px}.stage{padding:4px}.legend{padding:3px 0 0}.panel{gap:7px;padding:12px}.panel>img{width:96px;height:96px}}
