:root{color-scheme:light;--paper:#fff9e9;--ink:#224a70;--blue:#27689b;--mint:#d5e5db;--line:#b7cbd2;font:16px/1.45 system-ui,sans-serif;color:var(--ink);background:#e9e6d8}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit;color:inherit}button,select,input{min-height:44px;border:2px solid var(--ink);border-radius:7px;background:var(--paper);padding:7px 12px}button{cursor:pointer}button:hover,button[aria-pressed=true]{background:#d6e9ed}button:disabled{opacity:.45;cursor:default}button:focus-visible,input:focus-visible,select:focus-visible,#stage:focus-visible{outline:4px solid #dc7f35;outline-offset:3px}header{display:flex;align-items:center;gap:12px;padding:16px max(16px,calc((100vw - 1260px)/2));background:var(--ink);color:var(--paper)}header>div{margin-right:auto}header button{flex-shrink:0}h1{font-size:clamp(22px,4vw,32px);margin:0}small{letter-spacing:.14em;font-size:10px}main{max-width:1260px;margin:auto;padding:16px}.toolbar,#inspector,.slots>div{display:flex;flex-wrap:wrap;align-items:end;gap:10px}label{display:flex;gap:6px;align-items:center}.workspace{display:grid;grid-template-columns:220px 1fr;gap:14px}aside{background:var(--paper);padding:12px;border:2px solid var(--ink);border-radius:8px;max-height:535px;overflow:auto}h2{font-size:18px;margin:0 0 8px}aside p,.slots p{font-size:13px}#parts{display:grid;gap:6px}#parts button{display:flex;justify-content:space-between;gap:6px;text-align:left}.paper{min-width:0}#stage{height:420px;background:var(--paper);position:relative;overflow:hidden;touch-action:none;border:2px solid var(--ink);border-radius:9px}canvas,#handles{position:absolute;inset:0;width:100%;height:100%}#handles{pointer-events:none}.partHandle{position:absolute;pointer-events:auto;background:transparent;border:0;border-radius:4px;padding:0;min-height:30px;min-width:30px}.partHandle:hover{background:#6daed333}.partHandle:focus-visible{outline-offset:0}.partHandle[aria-pressed=true]{outline:3px dashed #b5672c;outline-offset:2px}#stats{font-weight:700;margin:12px 0 4px}#notice{margin:4px 0 12px;min-height:25px}#liveStats{min-height:24px;margin:7px 0}#drive{display:flex;gap:10px;justify-content:space-between}#drive button{flex:1;min-height:62px;touch-action:none;user-select:none;-webkit-user-select:none}#drive button[aria-pressed=true]{background:#e4be67}#inspector{background:#f5efd9;margin-top:14px;padding:12px;border-radius:8px}#inspector input{width:90px}.slots{margin-top:20px;padding:16px;background:var(--paper);border:2px dashed var(--ink);border-radius:8px}.slot{display:flex;gap:6px;align-items:center;flex-wrap:wrap;border:1px solid var(--line);padding:8px}.slots>button{margin-top:10px}dialog{color:var(--ink);background:var(--paper);border:3px solid var(--ink);border-radius:14px;max-width:min(560px,calc(100vw - 28px));padding:24px}dialog::backdrop{background:#14344788}dialog button{margin:6px 6px 0 0}dialog p{overflow-wrap:anywhere}[hidden]{display:none!important}@media(max-width:720px){header{padding:12px;gap:6px;flex-wrap:wrap}header>div{width:100%}main{padding:10px}.workspace{grid-template-columns:1fr}aside{max-height:190px}#parts{grid-template-columns:repeat(2,minmax(0,1fr))}#stage{height:350px}#drive{gap:5px}#drive button{font-size:14px;padding:6px}.toolbar{gap:6px}label{flex-wrap:wrap}#inspector{gap:8px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}

header button{color:var(--ink)}

#parts button{align-items:center;justify-content:start}#parts img{object-fit:contain;flex-shrink:0}

.helpCover{display:block;max-width:100%;height:auto;margin-bottom:16px;border-radius:8px}
/* Production notebook: tools fold away during a test. */
body{padding-bottom:env(safe-area-inset-bottom)}header{position:relative;flex-wrap:wrap}header small{color:#d6e3ce}header button{padding:7px 10px}.home{max-width:1260px;margin:auto;padding:24px 16px}.homeHero{display:grid;grid-template-columns:1.12fr 1fr;gap:32px;align-items:center}.homeHero>img{display:block;width:100%;border-radius:16px;border:3px solid var(--ink);transform:rotate(-1deg)}.homeHero h2{font:800 clamp(28px,4vw,46px)/1.12 system-ui;margin:12px 0 18px}.eyebrow{font-weight:700;color:#8c582b}.homeActions{display:flex;flex-wrap:wrap;gap:10px}#play,#run,#next{background:#eac570}#career{font-weight:750}.chapterTitle{margin:32px 0 16px}.challengeCards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.challengeCards button{text-align:left;display:grid;gap:6px;padding:14px;min-height:95px}.challengeCards strong{font-size:16px}.challengeCards span{font-size:13px}#game{padding-bottom:24px}#challengeStars{font-size:13px;margin:10px 0 3px}#lesson{font-size:14px;margin:3px 0 8px}#editDetails,#notebookDetails{margin-top:12px;background:var(--paper);border:1px solid var(--line);border-radius:9px;padding:10px}summary{cursor:pointer;min-height:32px;font-weight:700;padding:4px}#editDetails #inspector{margin:6px 0 0}#notebookDetails .slots{border:0;margin:0;padding:10px 0}#settings label{display:flex;align-items:center;min-height:52px;gap:12px}#settings input{width:24px;height:24px;min-height:24px}body.testing #palette,body.testing #editDetails,body.testing #notebookDetails,body.testing #lesson,body.testing #challengeStars,body.testing #stats,body.testing #notice,body.testing #undo,body.testing #redo,body.testing #paletteToggle,body.testing #zoomIn,body.testing #zoomOut,body.testing .toolbar>label:has(#course){display:none!important}body.testing .workspace{grid-template-columns:1fr}body.testing #stage{height:min(57vh,530px);min-height:280px}body.testing .toolbar{margin-bottom:10px}#awardDetail{font-weight:700}#result{max-height:calc(100dvh - 32px);overflow:auto}@media(max-width:720px){header{gap:6px;padding:10px}header>div{width:auto;flex:1}header h1{font-size:20px}header small{font-size:8px}header button{font-size:13px;min-height:44px}.home{padding:16px 12px}.homeHero{grid-template-columns:1fr;gap:14px}.homeHero>img{max-height:230px;object-fit:cover}.homeHero h2{font-size:30px;margin:6px 0 12px}.challengeCards{grid-template-columns:repeat(2,minmax(0,1fr))}.challengeCards button{padding:10px}#stage{height:340px}.toolbar{align-items:center}.toolbar>label{font-size:13px}.toolbar button,.toolbar select,.toolbar input{padding:6px 8px}.toolbar>label:has(#course){width:100%}#course{flex:1;min-width:0;max-width:100%}.toolbar button{font-size:14px}body.testing header small{display:none}body.testing header h1{font-size:17px}body.testing #helpOpen{display:none}body.testing #stage{height:51dvh;min-height:265px}body.testing #game{padding-top:6px}body.testing .toolbar{gap:6px;margin-bottom:8px}body.testing #drive button{min-height:60px}body.testing #liveStats{font-size:13px}body.testing #power{max-width:170px}body.testing #game>p{display:none!important}}
.palette-collapsed .workspace{grid-template-columns:1fr}
#routePreview{margin:10px 0;padding:8px 10px;background:var(--paper);border:1px solid var(--line);border-radius:8px}#previewSummary{font-size:13px;font-weight:400}#previewDrawing svg{display:block;width:100%;max-height:170px;overflow:hidden}body.testing #routePreview{display:none}#settings{max-height:calc(100dvh - 28px);overflow:auto}#language{max-width:100%}#resetConfirm{background:#f1d0ad}button,summary{overflow-wrap:anywhere}summary{min-height:44px}.toolbar select{max-width:100%}.toolbar>label{max-width:100%}#settings label:has(#language){flex-wrap:wrap}#settings h2,#help h2{overflow-wrap:anywhere}@media(max-width:720px){#previewSummary{display:block}#drive button{overflow-wrap:anywhere}.homeActions button{flex:1 1 110px}}
@media(max-width:720px){header>div{width:100%;flex:0 0 100%}header small{display:none}header h1{font-size:22px}body.testing header h1{font-size:20px}body.testing #power{max-width:min(270px,calc(100vw - 40px))}}
@media(max-height:500px){body.testing header>div{display:none}body.testing header{padding:6px 10px}body.testing #game{padding:4px 10px 8px}body.testing .toolbar{margin-bottom:6px}body.testing #stage{height:calc(100dvh - 224px);min-height:100px}body.testing #liveStats{min-height:20px;line-height:1.2;margin:4px 0}body.testing #drive button{min-height:52px}body.testing .toolbar>label>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}body.testing #power{max-width:min(380px,45vw)}}
