:root{--ink:#183735;--muted:#617975;--green:#17775f;--lime:#e4f4b6;--border:#dce6dd;--paper:#fffef9}*{box-sizing:border-box}body{margin:0;background:#f3f5ed;color:var(--ink);font:16px/1.5 'Segoe UI',Arial,sans-serif}button,select{font:inherit}button{cursor:pointer;border:0;border-radius:12px;transition:background .15s,transform .15s}button:hover:not(:disabled){filter:brightness(.95);transform:translateY(-1px)}button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid #d88e18;outline-offset:3px}button:disabled{opacity:.5;cursor:default}header{max-width:1450px;margin:auto;padding:24px 36px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--border)}.brand{font-weight:800;font-size:23px;text-decoration:none;color:var(--ink);display:flex;gap:12px;align-items:center}.logo{display:inline-grid;place-items:center;background:var(--green);color:white;width:40px;height:40px;border-radius:12px}.local,.muted{color:var(--muted)}.local{font-size:13px}main{max-width:1450px;margin:auto;padding:36px}.intro{display:flex;justify-content:space-between;gap:32px;align-items:center;margin-bottom:30px}.eyebrow,.section-label{font-size:11px;letter-spacing:1.5px;font-weight:800;color:var(--green)}h1{font-size:clamp(30px,3.3vw,48px);line-height:1.16;letter-spacing:-1.5px;margin:14px 0}h1 span{color:var(--green)}.intro p{color:var(--muted);margin-bottom:0}.progress-card{background:var(--lime);border-radius:24px;padding:24px 30px;min-width:235px;display:flex;flex-direction:column;font-size:13px;transform:rotate(2deg)}.progress-card strong{font-size:42px;line-height:1.5}.track{height:6px;background:#ccdda4;border-radius:9px;margin-top:18px;overflow:hidden}.track i{display:block;height:100%;background:var(--green);width:0}.stages{display:flex;gap:12px;margin-bottom:22px}.stage{background:#e7ece2;color:var(--ink);padding:13px 22px;text-align:left;flex:1}.stage strong{display:block}.stage span{font-size:12px}.stage.active{background:var(--ink);color:white}.workspace{display:grid;grid-template-columns:210px minmax(310px,1fr) 310px;gap:18px;align-items:start}.levels-panel,.play-panel,.code-panel{background:var(--paper);border:1px solid var(--border);border-radius:22px;padding:22px}h2{font-size:21px;margin:8px 0}.small{font-size:12px}.levels{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:24px 0}.level{height:38px;background:#eef1e8;color:var(--ink);font-weight:700;position:relative}.level.selected{outline:2px solid var(--green);outline-offset:2px}.level.done{background:var(--lime)}.level.done:after{content:'✓';position:absolute;right:2px;top:-6px;font-size:11px;color:var(--green)}.legend{font-size:13px;display:grid;gap:8px;padding-top:16px;border-top:1px solid var(--border)}.level-heading{display:flex;justify-content:space-between;align-items:center;gap:10px}.subtle{background:#eaf0e5;color:var(--ink);padding:10px 13px;font-size:13px}.board{display:grid;gap:5px;padding:10px;background:#e6ede2;border-radius:17px;max-width:460px;margin:24px auto;aspect-ratio:1}.cell{background:#fcfdf7;border-radius:7px;position:relative;display:grid;place-items:center;min-width:0;min-height:0;font-size:clamp(20px,2.2vw,32px)}.cell.wall{background:repeating-linear-gradient(135deg,#c6d5c4,#c6d5c4 5px,#bbcebb 5px,#bbcebb 7px)}.cell.goal{color:#a96d00;background:#fff0b5}.cell.visited:not(.wall){background:#def0d3}.robot{position:absolute;inset:8%;border-radius:9px;background:var(--green);color:white;display:grid;place-items:center;box-shadow:0 3px 0 #105743;font-weight:900;font-size:clamp(18px,2vw,30px)}.status{background:#edf2e7;border-radius:12px;padding:13px 15px;min-height:68px;font-size:14px}.status.success{background:#e1f4bf}.status.error{background:#fff0df}.palette{display:grid;gap:8px;margin:18px 0}.command-button{min-height:44px;text-align:left;background:#edf2e7;color:var(--ink);padding:10px 12px}.command-button.loop{background:#e9e4f7}.command-button.condition{background:#fff0cf}.program-heading{display:flex;justify-content:space-between;border-top:1px solid var(--border);padding-top:14px;font-size:12px;color:var(--muted)}.text-button{background:transparent;color:var(--green);font-size:12px;padding:0 4px}.program{list-style:none;margin:12px 0;padding:0;display:grid;gap:6px;max-height:315px;overflow:auto}.instruction{display:flex;gap:6px;align-items:center;background:#f0f3eb;padding:7px 9px;border-radius:9px;font-size:13px;min-height:38px}.instruction.current{outline:2px solid var(--green);background:var(--lime)}.instruction .label{flex:1}.instruction select{font-size:13px;max-width:50px}.delete{font-size:20px;color:#7c5045;background:transparent;width:30px;height:30px}.empty{color:var(--muted);text-align:center;padding:28px 0;font-size:13px;border:1px dashed #c8d6c5;border-radius:12px}.run-row{display:flex;gap:8px;margin-top:16px}.primary{background:var(--green);color:white;padding:13px 18px;font-weight:700}.run-row .primary{flex:1}.speed{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);margin:18px 0}.speed select{border:1px solid var(--border);border-radius:7px;background:white;color:var(--ink);padding:3px}#next{margin-top:12px;width:100%}footer{display:flex;justify-content:space-between;gap:15px;color:var(--muted);font-size:12px;margin-top:30px}[hidden]{display:none!important}@media(min-width:1500px){.workspace{grid-template-columns:230px 1fr 340px}}@media(max-width:1050px){.workspace{grid-template-columns:minmax(300px,1fr) 300px}.levels-panel{grid-column:1/-1;display:flex;align-items:center;gap:20px;flex-wrap:wrap}.levels-panel .section-label,.levels-panel .legend,.levels-panel .small{display:none}.levels-panel h2,.levels-panel p{margin:0}.levels{margin:0;min-width:340px;grid-template-columns:repeat(8,1fr)}}@media(max-width:700px){header{padding:16px 18px}.local{display:none}main{padding:22px 14px}.intro{gap:15px}.intro p{font-size:13px}.progress-card{min-width:95px;padding:14px;transform:none}.progress-card strong{font-size:26px}.progress-card span{font-size:10px}h1{font-size:29px}.eyebrow{font-size:9px}.stages{gap:6px}.stage{padding:11px 8px}.stage strong{font-size:12px}.stage span{font-size:10px}.workspace{grid-template-columns:1fr}.levels-panel{padding:15px;gap:8px}.levels-panel h2{font-size:16px}.levels-panel p{font-size:12px}.levels{min-width:0;width:100%;gap:8px}.play-panel,.code-panel{padding:17px}.board{max-width:420px}.cell{font-size:29px}.robot{font-size:27px}.palette{grid-template-columns:1fr 1fr}.program{max-height:240px}footer{flex-direction:column}.level-heading h2{font-size:20px}}@media(prefers-reduced-motion:reduce){button{transition:none}}.help-buttons{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.tour-shade{position:fixed;inset:0;background:rgba(15,35,32,.62);z-index:1000}.tour-focus{z-index:1001!important;outline:4px solid #e7b63e!important;outline-offset:5px;box-shadow:0 0 0 9px rgba(255,246,202,.25)!important}.tour-card{position:fixed;z-index:1002;width:min(350px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;background:#fffef9;border:2px solid #e7b63e;border-radius:18px;padding:18px;box-shadow:0 16px 50px #112b3240}.tour-top{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:10px;letter-spacing:1px;font-weight:800;color:#17775f}.tour-top button{background:#edf2e7;width:32px;height:32px;font-size:23px;flex-shrink:0}.tour-card h3{font-size:21px;line-height:1.25;margin:10px 0}.tour-card p{font-size:15px;line-height:1.5;margin:0 0 17px}.tour-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.tour-actions .primary{padding:10px 14px;font-size:13px}.tour-actions .text-button{font-size:12px}.tour-focus:hover{transform:none!important}@media(max-width:700px){.level-heading{align-items:flex-start}.help-buttons{max-width:130px}.tour-card{padding:15px}.tour-card h3{font-size:19px}}
.practice-modes{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 18px}.practice-modes [aria-pressed=true]{outline:2px solid var(--green);outline-offset:2px}.practice-modes span{font-size:12px;color:var(--muted)}.debug-controls{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}.debug-controls button{flex:1}.instruction.failed{outline:2px solid #c57831;background:var(--error,#fff0df)}.replace-command{width:100%;max-width:100%!important;min-width:0;padding:7px;flex-basis:100%}.instruction:has(.replace-command){flex-wrap:wrap}.lesson-panel{background:var(--soft,#edf2e7);border:2px solid var(--green);border-radius:14px;padding:16px;margin:16px 0}.lesson-heading{display:flex;align-items:center;gap:8px;justify-content:space-between}.lesson-heading strong{font-size:16px}.lesson-panel p{font-size:14px}.practice-content{display:grid;grid-template-columns:minmax(100px,1fr) minmax(120px,1fr);gap:14px;align-items:start}.mini-board{width:100%;gap:3px;padding:6px;margin:10px 0!important}.mini-board .robot{font-size:17px}.mini-board .cell{font-size:17px}.lesson-panel select{margin-left:8px;font:inherit;padding:6px}.lesson-panel .palette{margin-top:10px}#practice-prediction button{margin:3px}#practice-prediction [aria-pressed=true]{outline:2px solid var(--green)}@media(max-width:700px){.practice-content{grid-template-columns:1fr}.mini-board{max-width:260px;justify-self:center}.help-buttons{max-width:150px}.lesson-panel{padding:12px}.lesson-heading{align-items:start}}
.lesson-panel .command-button{border:2px solid var(--green);background:var(--paper);width:100%;font-weight:600}
body{min-height:100vh;display:flex;flex-direction:column}body>header{width:100%}body>main{width:100%;flex:1}.project-note{display:flex;justify-content:space-between;gap:15px;color:var(--muted);font-size:12px;margin-top:30px}footer.info-footer{margin:0;width:100%;background:#183f48;color:#f5fbfc;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:12px;padding:10px 28px;min-height:54px;border-top:1px solid #ffffff30}.info-footer nav{display:flex;align-items:center;gap:20px;flex-wrap:wrap}.info-footer button{display:inline-flex;align-items:center;gap:10px;padding:7px 0;background:none;border-radius:4px;color:inherit;font-size:14px;text-align:left;line-height:1.4}.info-footer button:hover:not(:disabled){text-decoration:underline;transform:none;filter:none}.info-share{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.info-share span{font-size:12px}.info-share span:empty{display:none}.info-dialog{width:min(620px,calc(100vw - 28px));max-height:85vh;overflow:auto;padding:24px;border:1px solid var(--border);border-radius:18px;background:var(--paper);color:var(--ink);box-shadow:0 20px 80px #10273455}.info-dialog::backdrop{background:#10273488}.info-heading{display:flex;justify-content:space-between;gap:16px;align-items:center}.info-heading h2{font-size:23px}.info-heading button{font-size:25px;min-width:42px;min-height:42px}.info-dialog h3{font-size:17px;margin:22px 0 8px}.info-dialog p{font-size:15px;line-height:1.65}.info-dialog a{color:var(--green)}[data-appearance=dark] .info-dialog a{color:#bde2e9}.stat-row{display:flex;justify-content:space-between;gap:16px;border-bottom:1px solid var(--border);padding:14px 0}.stat-row strong{white-space:nowrap}#share-link{width:100%;padding:12px;border:1px solid var(--border);border-radius:8px;background:var(--soft);color:var(--ink);margin:6px 0 16px;font:inherit}@media(max-width:700px){footer.info-footer{padding:14px 18px;align-items:flex-start;flex-direction:column;gap:12px}.info-footer nav{gap:4px 18px}.info-footer button{font-size:13px;min-height:40px}.project-note{flex-direction:column}.info-dialog{padding:18px}.info-heading h2{font-size:20px}}

.read-aloud{display:block;margin:0 0 16px;min-height:42px;font-size:14px}.tour-card{max-height:calc(100dvh - 24px);overflow-y:auto}
button.read-aloud{background:#ffdf83;color:#342809;border:2px solid #bf8619;border-radius:12px;padding:12px 18px;min-height:48px;max-width:100%;font-size:15px;font-weight:750;line-height:1.4;text-align:left;box-shadow:0 3px 0 #8d631f}
button.read-aloud:hover:not(:disabled){background:#ffe9a8;filter:none;transform:none}
button.read-aloud:focus-visible{outline:3px solid var(--ink);outline-offset:4px}
button.read-aloud[aria-pressed=true]{background:#fff1c2;box-shadow:inset 0 0 0 2px #bf8619}
