:root{--campus-red:#e8821e;--orange:#e8821e;--campus-ink:#1b2a49}
.primary,.touch-actions .touch-act{background:#b85b13;border-color:#f3a565;box-shadow:0 3px #713909}
.primary:hover:not(:disabled){background:#cf701c}
.game-toolbar,.game-bottom,.topbar{background:#1b2a49}
.progress-track>div{background:#e8821e}
.chapter-card.current,.chapter-card{border-top-color:#d47725}
.mission-panel .result-title em,.modal .eyebrow{color:#ffc18a!important}
.modal{background:#1b2a49;--modal-bg:#1b2a49}
.practice-header{background:#213653;border-left-color:#e8821e}
.practice-feedback{min-height:3.9em;margin:0;padding-block:8px}
.practice-feedback:empty{visibility:hidden;display:block}
.modal-actions{align-items:center}
.choice,.drop-slot{touch-action:manipulation}
.level-button.locked:disabled{color:#b7c3d3;opacity:1;background:#273a55}
.level-button.locked .level-dot{color:#b7c3d3}
.zone-card{background:#233751}
.game-tip{position:static!important;transform:none!important;max-width:none!important;width:auto!important;max-height:none;margin:0;padding:8px 13px;border:0;border-bottom:1px solid #57708b;border-radius:0;background:#253b57;color:#f0e7d7;font-size:12px;box-shadow:none}
.game-tip .tip-avatar{width:24px;height:24px;object-fit:contain}
.game-tip[hidden]{display:none}
.game-frame .interaction{bottom:15px;top:auto;max-width:calc(100% - 24px);z-index:2;pointer-events:none}
.dialog-open #toasts,.dialog-open #interaction{display:none!important}
#toasts{position:fixed;bottom:16px;right:18px;left:auto;max-width:min(330px,calc(100vw - 24px));pointer-events:none}
.toast{margin:0;padding:10px 14px;background:#263c56;border-color:#d59155}
.start-card{display:flex;flex-direction:column;gap:9px;align-items:center;min-width:0}
.start-card h2{width:100%}
.start-screen .mascot-preview{width:100%;height:190px;flex:none}
.start-screen .primary{position:relative;width:100%;z-index:1}
.start-screen .preview-orbit{position:static;inset:auto;display:flex;justify-content:center;gap:34px;width:100%;height:38px;align-items:center}
.start-screen .mascot-preview{padding-bottom:35px;height:220px}
.start-screen .mascot-preview canvas{height:calc(100% - 48px);width:auto}
.start-screen .preview-orbit{position:absolute;top:auto;bottom:0;left:0;right:0}
.portrait-rotation-label{font-size:10px;color:#a7bbcb}
.dialogue-orbit{gap:24px}
.tap-instruction{font-size:10px;color:#bcc9d6;margin-left:10px}
.paused-label{cursor:pointer;pointer-events:auto;display:flex;flex-direction:column;gap:12px;background:#18283eeb;z-index:6;padding:20px;text-align:center}
.paused-label[hidden]{display:none}
.paused-label span{font:500 13px/1.4 Manrope,sans-serif;max-width:260px}
.loading-overlay{position:absolute;inset:0;z-index:10;background:#1b2a49;display:grid;align-content:center;justify-items:center;gap:14px;color:#edc5a5;font-size:12px}
.loading-overlay[hidden]{display:none}
.loading-overlay img{width:56px;height:56px;animation:load-pulse 1s ease-in-out infinite}
@keyframes load-pulse{50%{opacity:.45}}
#robot-progress{width:100%;max-width:220px;height:110px;object-fit:contain;image-rendering:pixelated}
.new-workshop-board{display:grid;gap:14px;min-width:0;background:#14253e!important;border-color:#526e8b!important}
.workshop-preview{min-width:0;display:grid;gap:10px;align-items:center;justify-items:stretch}
.workshop-controls{display:grid;gap:12px;min-width:0}
.workshop-schematic{display:block;width:min(100%,360px);max-height:275px;margin:auto}
.workshop-controls .choice-row{display:flex;flex-wrap:wrap;gap:7px}
.mission-card{padding:12px;margin:0;background:#273d58;border:1px solid #657d94;color:#f0e5d6;font-size:13px;line-height:1.6}
.program-field{width:min(100%,310px);border:5px solid #728399;background:#1b2a49;padding:4px;gap:3px}
.program-field .grid-cell{display:grid;place-items:center;min-height:43px;background:#3d526c;border:1px solid #70859b;color:#f9c482}
.program-field .blocked{background:#102039;border:3px outset #536981}
.program-field .driven{background:#45634f}
.program-field .crashed{background:#8e3445;border-color:#ff8f8f}
.program-field .robot-cell{color:#ffd58e}
.command-block[aria-pressed=true]{outline:2px solid #ffc18a;background:#8c551e}
.autonomous-timeline{display:flex;width:100%;border:1px solid #b27d4b;background:#17283f;padding:6px;gap:4px;min-height:96px;align-items:stretch}
.timeline-segment{display:flex;min-width:0;flex-direction:column;justify-content:space-between;gap:9px;padding:5px;background:#8c4d20;color:#ffe4c5;font-size:11px;overflow-wrap:anywhere}
.timeline-segment small{font-variant-numeric:tabular-nums;font-size:10px}
.actuator-card{display:grid;grid-template-columns:85px 1fr;align-items:center;column-gap:12px;padding:8px;background:#293f5a;border:1px solid #627d94}
.actuator-card svg{grid-row:span 2;width:85px;height:57px}.actuator-card b{font-size:13px}.actuator-card span{font-size:11px;color:#c7d4df}
.cad-blueprint{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:min(100%,325px);margin:auto;background:#263d59;padding:12px;border:2px solid #718aa1}
.cad-slot{position:relative;aspect-ratio:1.05;min-width:0;background:#162c47;border:1px dashed #8393a4;color:#cad6df;text-align:left;align-content:start;padding:4px}
.cad-slot svg{position:absolute;inset:5%;width:90%;height:90%}
.cad-slot .cad-target{opacity:.55}
.workshop-controls [data-piece] svg{width:55px;height:55px}
.member-card{display:grid;grid-template-columns:35px 1fr;gap:3px 10px;background:#243b56;color:#f1e5d8;border:1px solid #658099;padding:9px;text-align:left}
.member-portrait{grid-row:span 2;font-size:26px;color:#e8aa62}.member-card b{font-size:13px}.member-card small{font-size:11px;color:#c3d1de}
.member-card[aria-pressed=true],.scouting-report[aria-pressed=true]{outline:2px solid #e8821e;background:#304c69}
.role-tasks{display:grid;gap:8px}.role-task{padding:12px;text-align:left;min-height:44px}
.scouting-reports{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.scouting-report{min-width:0;color:#e4edf3;background:#263e59;border:1px solid #6a839b;padding:12px 8px;text-align:left}
.scouting-report h3{margin:0 0 12px;color:#ffc18a;font-size:22px}
.scout-row{display:flex;flex-direction:column;gap:6px;min-height:80px;font-size:11px}
.scout-row strong{font-size:20px;color:#edf2e6}
.finale-robot{width:min(100%,400px);height:230px;image-rendering:pixelated;display:block;margin:auto}
.finale-stats{display:flex;gap:15px;flex-wrap:wrap;justify-content:center;font-variant-numeric:tabular-nums}
.certificate-name{display:grid;gap:7px}.certificate-name input{font:inherit;padding:10px;background:#263f5b;color:white;border:1px solid #8fa4b4}
@media(min-width:760px){.new-workshop-board[data-machine=actuator],.new-workshop-board[data-machine=roles]{grid-template-columns:1fr 1.05fr;align-items:start}}
@media(max-width:600px){
 .start-screen{padding:10px}
 .title-mode .game-frame{height:440px;min-height:440px}
 .start-card{width:min(270px,90%);min-width:0;padding:12px;gap:7px;border-radius:16px}
 .start-screen h2{font-size:23px}
 .start-screen .mascot-preview{height:178px}
 .start-screen .primary{font-size:12px;min-height:44px;padding:9px 12px}
 .start-screen .preview-orbit button{width:35px;height:35px}
 .game-tip{font-size:11px;padding:7px 10px}
 .game-frame .interaction{bottom:108px;left:50%;max-width:90%;font-size:11px;padding:6px 9px}
 .touch-controls{bottom:13px;inset-inline:13px}
 .joystick{width:74px;height:74px}
 .touch-actions .touch-act{width:49px;height:49px}.touch-actions button{width:40px;height:40px}
 .scouting-reports{grid-template-columns:1fr}
 .scouting-report{display:grid;grid-template-columns:28px repeat(3,minmax(0,1fr));gap:8px;align-items:center}
 .scouting-report h3{margin:0;font-size:19px}.scout-row{min-height:0;font-size:10px}.scout-row strong{font-size:17px}
 #toasts{bottom:10px;right:12px}
}
@media(prefers-reduced-motion:reduce){.loading-overlay img{animation:none}}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,canvas:focus-visible{outline-color:#e8821e}

.pinout-card{display:flex;flex-wrap:wrap;gap:8px 18px;padding:12px;background:#223955;border:1px solid #8193a6;font-size:12px}.pinout-card strong{width:100%;color:#ffc18a}.balance-axis{grid-column:1/-1;font-size:11px;color:#b8c8d9;text-align:center;margin-bottom:6px}

/* Shared navy UI with warm accents from the level brief. */
:root{--campus-ink:#e7edf4;--campus-muted:#c0cddd;--campus-paper:#1b2a49;--campus-border:#4d6684}
body{background:#101e33;color:#e7edf4;color-scheme:dark}
.start-card{background:#1b2a49f5;border-color:#8299b1;box-shadow:0 5px #0a162a,0 0 0 1px #394f6a}
.start-screen h2>span:first-child{color:#f0f3f5}.start-screen h2>span:last-child{color:#f2a765}
.brand .accent{color:#f2a765}.nav-link.active{border-color:#e8821e}
.top-actions .icon-button,.language-label select,.game-toolbar .toolbar-buttons #panel-toggle{background:#283d59;border-color:#617b96;color:#eff3f5}
.game-toolbar .toolbar-buttons button:hover,.game-bottom button:hover{color:#ffc18a}
.secondary{background:#29405c;color:#edf1f5;border-color:#6e86a0}.secondary:hover:not(:disabled){background:#385573}
.buddy-note{background:#263d59}.buddy-note b{color:#ffc18a}.buddy-note p{color:#d2dde6}
.chapter-card,.chapter-card.locked{background:#1b2a49;color:#e7edf4}.chapter-card.current{background:#2b425d}
.chapter-card:hover:not(:disabled){background:#304d69}.chapter-card p,.chapter-card .chapter-index{color:#c1cfdd}
.chapter-card .mini-track>i{background:#e8821e}.section-title h2{color:#e7edf4}
footer,footer button,.footer-brand{color:#c1cfdd;border-color:#4d6684}
.choice:hover,.choice[aria-pressed=true],.drop-slot[aria-pressed=true]{background:#53606a;border-color:#efac71;color:#fff4e6}
.workshop-controls .choice,.drop-slot{background:#29405c;border-color:#8294a9;color:#eff3f5}
.workshop-controls .choice[aria-pressed=true]{background:#715034;border-color:#ffc18a}
.workshop-controls .drop-slot{background:#1c314c}.portrait-rotation-label{color:#b5c9da}
.balance-overlay{top:24px}.world-hud .hud-label{background:#1b2a49d9;border-color:#657d97}
