body .app,body>main{max-width:none!important;width:100%;padding:12px!important}body .layout{grid-template-columns:210px minmax(0,1fr)!important}body #workspace{min-width:0!important;min-height:0!important;overflow:visible!important}body #workspace>.toolbar{min-width:0!important;flex-wrap:wrap!important;position:relative!important}body #workspace .tools{flex-wrap:wrap!important;min-width:0}body .board-viewport{width:100%;height:72vh;height:72dvh;min-height:320px;max-height:900px;overflow:auto!important;position:relative;touch-action:pan-x pan-y!important;overscroll-behavior:contain;background:#e7eef3;border:1px solid #8d9fa9;scrollbar-gutter:stable}
body .board-viewport #board{margin:0!important}body .board-viewport #diagram{width:1470px!important;min-width:1470px!important;height:950px!important;max-width:none!important}body .viewport-help{font:12px/1.4 system-ui;color:#c4d3dc;margin:8px 12px}body #workspace>.stair-practice{max-width:100%}body #workspace.theater .board-viewport,body #workspace:fullscreen .board-viewport{height:74dvh;max-height:none}body #surface.expanded{height:calc(100dvh - 85px)!important;max-height:none;width:auto}
@media(min-width:1800px){body .layout{grid-template-columns:230px minmax(0,1fr)!important}body .board-viewport{height:78dvh;max-height:1100px}}
@media(max-width:1050px){body .layout{display:flex!important;flex-direction:column}body #workspace{width:100%;order:0}body .side{order:1;width:100%}body .right{order:2}body .board-viewport{height:68dvh;min-height:300px}body .mission-list{display:flex;overflow:auto}body #workspace .toolbar{gap:8px;padding:10px}body .task-select{max-width:100%;min-width:0}body .app,body>main{padding:6px!important}}
@media(max-width:600px){body .board-viewport{height:62dvh;min-height:280px}body .tools{gap:6px}body .music-control{flex-wrap:wrap}body .top{flex-wrap:wrap}body .status{max-width:100%;font-size:12px}body .readings{grid-template-columns:1fr 1fr}}

body #board.integrated-staircase .stair-circuit-scene{left:20px!important;width:calc(100% - 40px)!important}
body #board.integrated-staircase .stair-circuit-scene img{width:100%!important}

body #board.integrated-staircase .stair-circuit-scene{top:410px!important;left:245px!important;width:1190px!important}
body #board.integrated-staircase .stair-circuit-scene img{height:520px!important;object-fit:fill}
body .spotify-direct-note{font:12px system-ui;color:#bfdfcd;align-self:center}
body .music-control [hidden]{display:none!important}
body #workspace .toolbar{padding:8px!important;gap:8px!important}
body #workspace .toolbar .tools{gap:8px!important}
@media(min-width:1051px){body .top{padding:5px 12px!important;margin-bottom:6px!important}body .top h1{font-size:22px!important;margin:0!important}body #workspace .toolbar .btn{font-size:12px!important;padding:7px!important;min-height:40px!important}}

body .board-viewport{scrollbar-gutter:auto!important}body #zoomIn,body #zoomOut{min-width:48px!important;font-size:22px!important}body #zoomReset{min-width:100px!important}

/* Desktop working scale: do not shrink apparatus to fit window height. */
body #workspace .toolbar .btn,body button,body select,body .task-select{font-size:16px!important;min-height:48px!important}
body .viewport-help{font-size:15px;line-height:1.5}
body .side{font-size:16px}body .side h2{font-size:20px}
body .mission-list button{font-size:16px!important;padding:12px!important}
body .board-viewport{min-height:480px!important;scrollbar-width:auto;scrollbar-color:#657e90 #dce6ed;scroll-padding:24px}
body .board-viewport::-webkit-scrollbar{width:16px;height:16px}
body .board-viewport::-webkit-scrollbar-thumb{background:#657e90;border:3px solid #dce6ed;border-radius:10px}
body #board .device h3{font-size:18px!important}
body #board .terminal-wrap,body #board .panel .clear-port-label{font-size:14px!important}
body #board .panel .panel-explainer{font-size:14px!important}
body #board .main-breaker strong,body .motor-shaft strong{font-size:14px!important}
@media(min-width:1051px){body .layout{grid-template-columns:220px minmax(0,1fr)!important}body #workspace>.toolbar{position:sticky!important;top:0;z-index:25;background:#142838}}

body .circuit-frame{position:relative;flex:none;margin:0;overflow:hidden}
body .circuit-frame>#board,body .circuit-frame>#diagram{position:absolute!important;left:0!important;top:0!important;margin:0!important;max-width:none!important}


/* v289: center the fitted board and give the scroll areas the game's dark metal palette. */
body .board-viewport{background-color:#071117!important;background-image:radial-gradient(ellipse at 48% 42%,#132832 0%,#09151b 68%,#050a0e 100%)!important;border-color:#31515d!important;scrollbar-width:thin!important;scrollbar-color:#19c2d0 #05090d!important}
html,body,#practiceMenu,.mission-list,.board-viewport{scrollbar-width:thin;scrollbar-color:#19c2d0 #05090d}
html::-webkit-scrollbar,body::-webkit-scrollbar,#practiceMenu::-webkit-scrollbar,.mission-list::-webkit-scrollbar,.board-viewport::-webkit-scrollbar{width:12px;height:12px}
html::-webkit-scrollbar-track,body::-webkit-scrollbar-track,#practiceMenu::-webkit-scrollbar-track,.mission-list::-webkit-scrollbar-track,.board-viewport::-webkit-scrollbar-track{background:linear-gradient(90deg,#030609,#111b20 50%,#030609);border:1px solid #182a31;box-shadow:inset 0 0 5px #000}
html::-webkit-scrollbar-thumb,body::-webkit-scrollbar-thumb,#practiceMenu::-webkit-scrollbar-thumb,.mission-list::-webkit-scrollbar-thumb,.board-viewport::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#45eff8 0 9%,#18313a 9% 82%,#f04457 82% 90%,#071015 90%);border:2px solid #05090d;border-radius:8px;box-shadow:inset 0 0 5px #32e7f0,0 0 7px #10b9cf}
html::-webkit-scrollbar-thumb:hover,body::-webkit-scrollbar-thumb:hover,#practiceMenu::-webkit-scrollbar-thumb:hover,.mission-list::-webkit-scrollbar-thumb:hover,.board-viewport::-webkit-scrollbar-thumb:hover{background:linear-gradient(180deg,#8bfbff 0 12%,#24454e 12% 78%,#ff6676 78% 90%,#071015 90%);box-shadow:inset 0 0 7px #75f8ff,0 0 10px #20d3e4}
html::-webkit-scrollbar-corner,body::-webkit-scrollbar-corner,#practiceMenu::-webkit-scrollbar-corner,.mission-list::-webkit-scrollbar-corner,.board-viewport::-webkit-scrollbar-corner{background:#05090d}
