@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');
:root{--paper:#f7f6ee;--white:#fffef9;--ink:#263e38;--muted:#6b7c71;--green:#285949;--line:#dde3d5;--gold:#ecd38c;--blue:#6a94b2;--shadow:0 8px 24px #203d3510;font-family:'Nunito',sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.58}a{color:var(--green)}button,a,input,textarea,select{touch-action:manipulation}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #ad7a28;outline-offset:4px}button{color:inherit}svg.icon{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.skip-link{position:fixed;top:-80px;left:20px;z-index:100;background:white;padding:14px}.skip-link:focus{top:10px}.shell{min-height:100vh;display:grid;grid-template-columns:224px minmax(0,1fr)}.sidebar{background:#f1f3e9;border-right:1px solid var(--line);padding:31px 21px 22px;display:flex;flex-direction:column;gap:35px;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--green);font-family:'Space Grotesk',sans-serif;font-size:23px;font-weight:700;letter-spacing:-1px}.brand img{width:35px;height:35px}.brand small{display:block;font:10px 'Nunito',sans-serif;letter-spacing:2px;margin-top:4px;color:#71836d}.nav-group{display:grid;gap:9px}.nav-label,.eyebrow{font-size:10px;font-weight:700;letter-spacing:1.8px;text-transform:uppercase;color:var(--muted)}.nav-label{padding:0 12px;margin-bottom:8px}.nav-button{border:0;background:none;display:flex;align-items:center;gap:12px;text-align:left;min-height:47px;border-radius:9px;padding:12px;font-size:13px;font-weight:600;color:#637467}.nav-button:hover{background:#e6ecdE}.nav-button.active{background:var(--green);color:#fff7d9;box-shadow:0 3px 0 #1e4037}.nav-button .nav-dot{margin-left:auto;width:6px;height:6px;border-radius:50%;background:#e6cb85}.sidebar-bottom{margin-top:auto}.camp-card{background:#e5ebd8;border:1px solid #d5dfc7;padding:18px 14px;border-radius:12px;position:relative}.camp-card strong{display:block;font-size:13px;margin:11px 0 7px}.camp-card p{font-size:11px;line-height:1.7;margin:0;color:#62755d}.camp-icon{color:#658250}.version{font-size:10px;color:#819078;margin-top:18px;text-align:center;letter-spacing:.3px}.workspace{min-width:0}.topbar{height:80px;border-bottom:1px solid var(--line);padding:0 40px;display:flex;align-items:center;justify-content:space-between;background:#fffef980;gap:16px}.breadcrumb{display:flex;align-items:center;gap:12px;font-size:12px;color:var(--muted)}.breadcrumb strong{color:var(--ink);font-weight:500}.top-actions{display:flex;align-items:center;gap:18px}.local-tag{font-size:10px;display:flex;align-items:center;gap:6px;color:var(--muted)}.status-dot{width:6px;height:6px;background:#7b9a65;border-radius:50%}.avatar{width:35px;height:35px;display:grid;place-items:center;background:#e7d9b4;border:3px solid #fffef9;outline:1px solid #e0d9c7;border-radius:10px;font-size:18px}.explorer-label{font-size:12px;font-weight:600}.main{padding:34px 40px 25px;max-width:1550px;margin:auto}.welcome-row{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}.welcome-row h1,.page-title{font-family:'Space Grotesk',sans-serif;font-weight:600;font-size:31px;letter-spacing:-1.3px;margin:7px 0 8px}.welcome-row p,.page-intro{font-size:13px;color:var(--muted);margin:0;line-height:1.7}.chapter-pill{display:flex;align-items:center;gap:9px;background:#eeefdF;border:1px solid #dce3cb;border-radius:30px;padding:10px 15px;font-size:11px;white-space:nowrap}.chapter-pill svg{width:16px;height:16px}.levels{display:flex;align-items:center;gap:6px;padding:7px;border:1px solid var(--line);background:#fffef9;border-radius:12px;margin-bottom:24px;overflow:auto}.level-intro{font-size:10px;font-weight:700;letter-spacing:1px;text-transform:uppercase;padding:0 13px;color:#73826e;white-space:nowrap}.level-btn{flex:1;border:0;background:none;padding:10px 12px;min-height:39px;border-radius:7px;font-size:11px;font-weight:600;white-space:nowrap}.level-btn:hover{background:#f1f3e9}.level-btn.selected{background:#e9eddb;color:#315641;box-shadow:inset 0 0 0 1px #d4dfc3}.level-btn .small-dot{display:inline-block;width:5px;height:5px;background:#719568;border-radius:50%;margin-right:5px;vertical-align:2px}.adventure-grid{display:grid;grid-template-columns:minmax(0,1fr) 286px;gap:23px}.world-card{border:1px solid #cbd8c0;border-radius:15px;overflow:hidden;box-shadow:var(--shadow);background:#c7e5d7;position:relative;min-width:0}.world-heading{position:absolute;top:21px;left:22px;z-index:1}.world-heading .eyebrow{font-size:9px;color:#476451}.world-heading h2{font:600 24px 'Space Grotesk',sans-serif;letter-spacing:-.6px;margin:5px 0;color:#2c5749}.weather{position:absolute;right:18px;top:20px;border:1px solid #ffffff70;background:#f8ffe67a;border-radius:20px;display:flex;align-items:center;gap:7px;padding:7px 10px;font-size:10px}.weather svg{width:14px;height:14px}.world-stage{position:relative;margin-top:21px}.world-stage canvas{display:block;width:100%;height:auto;image-rendering:pixelated}.map-pin{position:absolute;border:1px solid #f8f3d0;background:#fffdf2;color:#365447;padding:7px 10px;border-radius:6px;box-shadow:0 3px 0 #35564330;display:flex;align-items:center;gap:5px;font-size:10px;font-weight:700;min-height:32px}.map-pin:after{content:'';position:absolute;bottom:-5px;left:50%;width:8px;height:8px;transform:rotate(45deg);background:#fffdf2}.map-pin.garden{left:26%;top:70%;background:#f4da8d;border-color:#f4da8d}.map-pin.garden:after{background:#f4da8d}.map-pin.library{left:40%;top:37%}.map-pin.shop{left:73%;top:53%}.map-pin svg{width:12px;height:12px}.map-pin:hover{transform:translateY(-3px)}.world-bottom{background:#f8fbefdf;border-top:1px solid #c2d5b6;display:flex;justify-content:space-between;align-items:center;padding:15px 19px;gap:10px;font-size:10px;color:#668063}.world-bottom span{display:flex;align-items:center;gap:7px}.world-bottom svg{width:14px;height:14px}.quest-card{background:var(--white);border:1px solid var(--line);border-radius:14px;padding:22px;display:flex;flex-direction:column;box-shadow:var(--shadow)}.tag{font-size:9px;letter-spacing:1.3px;font-weight:700;text-transform:uppercase;color:#a27739;display:flex;gap:7px;align-items:center}.tag:before{content:'';width:6px;height:6px;background:#dbb960;border-radius:2px}.character{display:flex;align-items:center;gap:11px;margin:23px 0 17px}.portrait{width:49px;height:49px;border-radius:11px;background:#e8edcf;display:grid;place-items:center;flex-shrink:0;border:1px solid #dae2c3}.pixel-person{width:24px;height:30px;background:linear-gradient(to bottom,transparent 0 4px,#87694a 4px 8px,#eac299 8px 18px,#cd805e 18px 28px,transparent 28px);position:relative;image-rendering:pixelated;clip-path:polygon(20% 0,80% 0,80% 18%,100% 18%,100% 30%,80% 30%,80% 55%,100% 55%,100% 85%,80% 85%,80% 100%,55% 100%,55% 90%,45% 90%,45% 100%,20% 100%,20% 85%,0 85%,0 55%,20% 55%)}.pixel-person:before{content:'';position:absolute;width:20px;height:5px;top:3px;left:2px;background:#dbc071}.character strong{font-size:13px;display:block}.character small{font-size:10px;color:var(--muted);display:block;margin-top:4px}.quest-card h2{font:600 22px/1.25 'Space Grotesk',sans-serif;letter-spacing:-.6px;margin:0 0 11px}.quest-card p{font-size:12px;color:var(--muted);line-height:1.75;margin:0 0 17px}.quest-meta{display:flex;gap:13px;align-items:center;font-size:10px;color:#72806b;margin-bottom:18px}.quest-meta span{display:flex;gap:5px;align-items:center}.quest-meta svg{width:14px;height:14px}.skill-pips{display:flex;gap:6px;margin-bottom:21px}.skill-pip{background:#eef3e8;border:1px solid #e0e6d5;border-radius:6px;width:32px;height:29px;display:grid;place-items:center;color:#80917a}.skill-pip.done{background:#dce9d0;color:#3e6d4f}.skill-pip svg{width:15px;height:15px}.primary{border:1px solid #214738;background:#2d5b49;color:#fffbe7;box-shadow:0 3px 0 #193d30;border-radius:8px;min-height:45px;padding:12px 18px;display:inline-flex;align-items:center;justify-content:center;gap:12px;font-size:12px;font-weight:600}.primary:hover{background:#3b6c57}.primary:active{transform:translateY(2px);box-shadow:0 1px 0 #193d30}.primary svg{width:17px;height:17px}.quest-card .primary{width:100%;margin-top:auto}.quest-note{font-size:9px!important;text-align:center;margin:10px 0 0!important;color:#84917c!important}.section-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:27px 0 14px}.section-head h2{font:600 16px 'Space Grotesk',sans-serif;letter-spacing:-.3px;margin:0}.section-head span{font-size:10px;color:var(--muted)}.text-button{border:0;background:none;color:#54765c;font-size:11px;display:flex;gap:6px;align-items:center;padding:5px 0}.text-button svg{width:13px;height:13px}.skills-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}.skill-card{border:1px solid var(--line);border-radius:11px;background:var(--white);padding:16px 15px}.skill-top{display:flex;align-items:center;gap:10px;margin-bottom:15px}.skill-icon{width:32px;height:32px;border-radius:8px;display:grid;place-items:center}.skill-icon.blue{color:#517e9d;background:#e4edf4}.skill-icon.green{color:#608b64;background:#e9efdf}.skill-icon.orange{color:#b68252;background:#f8edde}.skill-icon.purple{color:#8d79a0;background:#efe9f2}.skill-icon svg{width:17px;height:17px}.skill-card h3{font-size:12px;margin:0}.skill-card p{font-size:10px;color:var(--muted);margin:7px 0 0;line-height:1.5}.track{display:flex;gap:4px;height:5px}.track i{flex:1;background:#e9ede2;border-radius:3px}.track i.filled{background:#83a06f}.footer-note{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:25px;padding-top:17px;border-top:1px solid var(--line);font-size:9px;color:#87917d}.footer-note span{display:flex;align-items:center;gap:6px}.footer-note svg{width:12px;height:12px}.content-panel{background:var(--white);border:1px solid var(--line);border-radius:14px;padding:24px;margin-top:22px}.roadmap{display:grid;gap:12px}.roadmap-row{display:flex;gap:18px;align-items:center;background:var(--white);border:1px solid var(--line);border-radius:12px;padding:20px}.roadmap-row.current{border-color:#8eaa78;background:#f0f4e5}.level-badge{width:54px;height:54px;display:grid;place-items:center;background:#e7eddc;border-radius:11px;font-size:14px;font-weight:700;flex-shrink:0}.roadmap-row h3{margin:0 0 5px;font-size:15px}.roadmap-row p{margin:0;font-size:12px;color:var(--muted);line-height:1.6}.roadmap-row .row-action{margin-left:auto;flex-shrink:0}.badge{font-size:10px;border-radius:20px;padding:6px 9px;background:#edeedF;color:#6e795f;white-space:nowrap}.word-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;margin-top:20px}.word-card{border:1px solid var(--line);background:var(--white);border-radius:12px;padding:23px}.word-card h3{font:600 25px 'Space Grotesk',sans-serif;margin:0 0 13px}.word-card p{font-size:13px;line-height:1.7;color:var(--muted)}.word-card blockquote{margin:14px 0 0;padding:12px;background:#f0f3e7;border-left:3px solid #a7b88b;font-size:12px;line-height:1.7}.word-card .text-button{float:right}.journal-entry{border-bottom:1px solid var(--line);padding:18px 0}.journal-entry:last-child{border:0}.journal-entry h3{font-size:15px;margin:0 0 12px}.evidence-list{display:grid;gap:10px}.evidence-row{display:flex;justify-content:space-between;align-items:center;font-size:12px;gap:10px}.draft-preview{font-size:13px;line-height:1.7;background:#f3f4e9;border-radius:8px;padding:15px;white-space:pre-wrap;overflow-wrap:anywhere}.empty{padding:30px 10px;text-align:center;color:var(--muted);font-size:13px;line-height:1.8}.empty svg{width:38px;height:38px;color:#97ab85;margin-bottom:8px}.secondary{background:#fffef9;border:1px solid #d1dcc5;border-radius:8px;min-height:42px;padding:10px 15px;font-size:12px;display:inline-flex;align-items:center;justify-content:center;gap:8px}.secondary:hover{background:#eef3e5}.settings-row{display:flex;justify-content:space-between;align-items:center;gap:25px;padding:20px 0;border-bottom:1px solid var(--line)}.settings-row:last-child{border:0}.settings-row strong{font-size:14px;display:block}.settings-row p{font-size:12px;color:var(--muted);line-height:1.7;margin:6px 0 0}.settings-row input[type=checkbox]{accent-color:var(--green);width:23px;height:23px;flex-shrink:0}.settings-row select{padding:10px;background:var(--white);border:1px solid var(--line);border-radius:8px;font-size:12px}.notice{border-left:3px solid #cfb36b;background:#faf4e2;padding:14px 17px;font-size:12px;line-height:1.8;color:#796338;border-radius:0 8px 8px 0;margin:20px 0}.planned{background:linear-gradient(120deg,#eef0df,#f8f7ec);padding:32px;border:1px solid #dce2d1;border-radius:14px;margin:22px 0}.planned h2{font:600 25px 'Space Grotesk';margin:12px 0}.planned p{font-size:13px;line-height:1.8;max-width:550px;color:var(--muted)}
dialog{border:1px solid #ccd6bf;border-radius:18px;padding:0;width:min(660px,calc(100% - 30px));max-height:92dvh;color:var(--ink);background:var(--white);box-shadow:0 25px 100px #152d3440}dialog::backdrop{background:#193f3b80;backdrop-filter:blur(4px)}.dialog-header{padding:22px 26px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:10px}.dialog-header h2{font:600 17px 'Space Grotesk';margin:5px 0 0}.icon-button{border:1px solid var(--line);border-radius:8px;min-width:40px;min-height:40px;display:grid;place-items:center;background:var(--white)}.dialog-body{padding:27px}.stepper{display:flex;gap:6px;margin-bottom:27px}.step-marker{flex:1;display:flex;align-items:center;gap:7px;font-size:10px;color:#84917d;padding:10px 7px;border-bottom:3px solid #e6ebdf}.step-marker.current{border-color:#678854;color:#365c44;font-weight:700}.step-marker.complete{border-color:#bccfa2}.step-marker svg{width:15px;height:15px}.speech-card{display:flex;gap:14px;align-items:flex-start;background:#f0f3e7;padding:18px;border-radius:12px;margin-bottom:23px}.speech-card p{font-size:13px;line-height:1.8;margin:4px 0 0}.speech-card strong{font-size:12px}.task-title{font:600 23px/1.35 'Space Grotesk';letter-spacing:-.4px;margin:0 0 17px}.task-text{font-size:13px;line-height:1.8;color:var(--muted)}.audio-button{display:flex;align-items:center;gap:11px;border:1px solid #bccfa9;background:#edf3e4;border-radius:10px;padding:15px 18px;min-height:52px;font-size:13px;font-weight:600;margin:15px 0}.reading-note{white-space:pre-line;background:#faf5e6;border:1px solid #e7dabb;border-radius:10px;padding:21px;font-size:15px;line-height:1.9;margin:20px 0}.choices{display:grid;gap:9px;margin:20px 0}.choice{display:flex;align-items:center;gap:13px;text-align:left;border:1px solid #dbe1d1;background:white;border-radius:9px;padding:15px;font-size:13px;min-height:50px}.choice .letter{display:grid;place-items:center;border:1px solid #dce1d4;background:#f4f6ef;border-radius:5px;width:24px;height:24px;font-size:10px;flex-shrink:0}.choice:hover:not(:disabled){background:#f2f5e8;border-color:#9fb789}.choice.selected{background:#eef3e4;border-color:#7fa36c}.choice.correct{background:#e7f0dc;border-color:#7f9d65}.choice.wrong{background:#fff2df;border-color:#cba36b}.feedback{font-size:13px;line-height:1.8;padding:14px 17px;border-radius:9px;background:#f9efdc;border:1px solid #eadbb6;margin:16px 0}.feedback.success{background:#eaf2e1;border-color:#c5d9b1}.feedback:empty{display:none}.dialog-footer{border-top:1px solid var(--line);padding:18px 27px;display:flex;align-items:center;justify-content:space-between;gap:15px;background:#f9faf3}.dialog-footer small{font-size:10px;color:var(--muted);max-width:220px;line-height:1.6}.hint-actions{display:flex;gap:15px;flex-wrap:wrap;margin:16px 0}.transcript,.hint{background:#f1f4e9;border-left:3px solid #a7bd8c;padding:15px;font-size:13px;line-height:1.8;margin:14px 0}.record-controls{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}.recording{color:#b65b43}.recording:before{content:'';display:inline-block;width:8px;height:8px;border-radius:50%;background:#b65b43;margin-right:7px}audio{width:100%;margin:12px 0}.check-line{display:flex;align-items:flex-start;gap:10px;font-size:13px;line-height:1.7;margin:15px 0}.check-line input{accent-color:var(--green);width:19px;height:19px;margin-top:2px;flex-shrink:0}.writing-area{width:100%;min-height:145px;resize:vertical;border:1px solid #bccbaE;border-radius:10px;padding:17px;background:#fffef9;color:var(--ink);font-size:16px;line-height:1.8}.writing-meta{display:flex;align-items:center;justify-content:space-between;font-size:11px;color:var(--muted);margin:8px 0 19px;gap:10px}.complete-hero{text-align:center;padding:18px 0 12px}.complete-hero .seal{font-size:34px;margin-bottom:12px;color:#9b7e3f}.complete-hero h3{font:600 30px 'Space Grotesk';letter-spacing:-1px;margin:10px 0}.complete-hero p{font-size:13px;line-height:1.8;color:var(--muted)}.toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%) translateY(100px);max-width:calc(100% - 30px);background:#284c40;color:#fff9e8;padding:13px 20px;font-size:12px;line-height:1.6;border-radius:9px;box-shadow:var(--shadow);z-index:10;opacity:0;pointer-events:none;transition:transform .2s,opacity .2s}.toast.visible{transform:translateX(-50%) translateY(0);opacity:1}.large-text{font-size:115%}.large-text .task-text,.large-text .speech-card p,.large-text .choice,.large-text .reading-note,.large-text .writing-area{font-size:18px}.large-text .quest-card p,.large-text .page-intro,.large-text .word-card p{font-size:16px}body.reduced-motion *,body.reduced-motion *:before{animation:none!important;transition:none!important}
@media(min-width:1500px){.main{padding-top:45px}.adventure-grid{grid-template-columns:minmax(0,1fr) 320px}.quest-card{padding:28px}.quest-card h2{font-size:27px}.quest-card p{font-size:14px}.world-heading h2{font-size:28px}}
@media(max-width:1150px){.shell{grid-template-columns:185px minmax(0,1fr)}.sidebar{padding:27px 14px}.brand{font-size:21px}.main{padding:28px 25px}.topbar{padding:0 25px}.adventure-grid{grid-template-columns:minmax(0,1fr) 250px;gap:15px}.quest-card{padding:18px}.quest-card h2{font-size:20px}.world-heading{top:15px;left:15px}.world-heading h2{font-size:20px}.weather{display:none}.level-intro{display:none}.level-btn{padding:10px}.skill-card{padding:13px 11px}.skill-top{gap:7px}.skill-card h3{font-size:11px}.character{margin:15px 0}.chapter-pill{display:none}.welcome-row h1{font-size:28px}}
@media(max-width:950px){.adventure-grid{grid-template-columns:1fr}.quest-card{display:grid;grid-template-columns:1fr auto;gap:0 25px}.quest-card .tag,.quest-card h2,.quest-card>p,.quest-meta{grid-column:1}.quest-card .character{grid-column:2;grid-row:1/4;margin:0;align-self:center}.quest-card .skill-pips{grid-column:1;margin-bottom:0}.quest-card .primary{grid-column:2;grid-row:4/6;align-self:end}.quest-note{display:none}.skills-grid{grid-template-columns:repeat(2,1fr)}.world-stage{margin-top:0}.world-bottom{font-size:10px}.word-grid{grid-template-columns:1fr}.roadmap-row{flex-wrap:wrap}.roadmap-row .row-action{margin-left:72px}.top-actions{gap:9px}}
@media(max-width:650px){.shell{display:block}.sidebar{position:static;height:auto;padding:15px 18px;border-right:0;border-bottom:1px solid var(--line);gap:17px}.brand{font-size:22px}.brand small{font-size:9px}.sidebar .nav-label,.sidebar-bottom{display:none}.nav-group{display:flex;gap:6px;overflow:auto}.nav-button{padding:10px 12px;min-height:42px;white-space:nowrap;font-size:11px;gap:7px}.nav-button svg{width:16px;height:16px}.nav-button .nav-dot{display:none}.topbar{height:54px;padding:0 20px}.top-actions .explorer-label,.top-actions .avatar{display:none}.main{padding:25px 18px}.welcome-row{margin-bottom:20px}.welcome-row h1{font-size:28px}.welcome-row p{font-size:12px}.eyebrow{font-size:9px}.levels{margin-bottom:20px}.level-btn{min-width:71px}.world-heading h2{font-size:20px}.world-heading .eyebrow{font-size:8px}.world-bottom{padding:12px;font-size:9px}.world-bottom span:last-child{display:none}.map-pin{font-size:9px;padding:5px 7px;min-height:30px}.world-stage canvas{height:auto}.world-card{min-height:0}.quest-card{display:flex;padding:22px}.quest-card .character{display:flex;margin:16px 0}.quest-card .skill-pips{margin-bottom:20px}.quest-card h2{font-size:24px}.quest-card p{font-size:13px}.quest-note{display:block}.skill-card{padding:16px}.skill-card h3{font-size:12px}.section-head span{display:none}.footer-note{align-items:flex-start;line-height:1.6;font-size:9px}.footer-note>span:last-child{display:none}.dialog-body{padding:21px}.dialog-header{padding:18px 21px}.dialog-footer{padding:17px 21px}.task-title{font-size:21px}.step-marker{font-size:9px;gap:4px;padding:9px 3px}.step-marker svg{width:13px;height:13px}.settings-row{align-items:flex-start}.content-panel{padding:19px}.roadmap-row{padding:16px}.roadmap-row>div:nth-child(2){flex:1}.roadmap-row .row-action{margin-left:0}.roadmap-row .secondary{width:100%}.planned{padding:23px}.local-tag{font-size:9px}}
@media(prefers-reduced-motion:reduce){*,*:before{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Aurora school palette; generous, rounded reading text for younger learners. */
:root{--paper:#f6f4ef;--white:#fffefa;--ink:#303332;--muted:#586357;--green:#4c6249;--line:#dedfd6;--gold:#e8d5a3;--blue:#77718d;font-size:17px}
.sidebar{background:#eeeee5}.brand small{color:#586357}.nav-button{font-size:16px;min-height:48px}.nav-button.active{background:#e9e5ee;color:#51435f}.sidebar .camp-card{background:#e9e5ee}.main h1{font-family:'Nunito',sans-serif;font-weight:800;letter-spacing:-1px}.welcome-row h1{font-size:clamp(30px,3.2vw,46px)}.welcome-row p,.page-intro{font-size:18px;line-height:1.6}.eyebrow,.tag,.badge,.quest-note,.world-bottom,.local-tag,.chapter-pill{font-size:13px}.level-btn,.text-button,.secondary,.primary{font-size:16px;min-height:44px}.task-title{font-family:'Nunito',sans-serif;font-size:26px;line-height:1.45}.task-text,.check-line,.feedback,.hint,.transcript,.reading-note,.choice,.speech-card p{font-size:19px;line-height:1.65}.writing-area{font-size:20px;line-height:1.6}.quest-card p,.skill-card p{font-size:16px;line-height:1.55}.dialog-footer small{font-size:13px}.choice{border-radius:14px;padding:16px}.primary{border-radius:12px}.skill-card,.quest-card,.world-card,.content-panel{border-radius:18px}.chapter-pill{background:#e9e5ee;color:#51435f}.step-marker{font-size:16px}.case-board{background:#e9e5ee;border:1px solid #d3cbdc;border-radius:22px;padding:28px;margin-bottom:32px}.case-board h2{font-size:30px;margin:8px 0}.case-board>p{line-height:1.6}.clue-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:22px 0}.clue-card{background:#fffefa;border:2px dashed #c6bfd0;border-radius:16px;padding:20px}.clue-card.found{border:2px solid #809673}.clue-card>span:first-child{font-size:35px;color:#77718d}.clue-card h3{font:800 20px 'Nunito',sans-serif;margin:10px 0}.clue-card p{font-size:17px;line-height:1.6;margin-bottom:12px}.review-card{background:var(--white);border:1px solid var(--line);border-radius:16px;padding:24px;margin:18px 0;overflow-wrap:anywhere}.review-card h2,.review-card h3{margin:12px 0;font-size:23px}.review-card p,.review-card li{line-height:1.7}.review-card small{display:block;color:var(--muted)}.review-card audio{display:block;width:100%;margin:16px 0}.review-card .secondary{margin:12px}.review-summary{color:#725034;font-weight:800}.review-heading{margin-top:30px}.draft-preview{white-space:pre-wrap}.settings-row input[type=text],#learner-name{padding:12px;border:1px solid var(--line);border-radius:10px;max-width:100%}.world-heading h2{font-size:27px}.weather{display:none}
@media(max-width:800px){.clue-grid{grid-template-columns:1fr}.case-board{padding:20px}.task-title{font-size:22px}.choice,.task-text,.check-line,.feedback,.hint,.reading-note{font-size:18px}.section-head{flex-wrap:wrap;gap:12px}.nav-button{font-size:14px}.settings-row{flex-wrap:wrap;gap:14px}}

/* Pixel-art portraits retain crisp native pixels beside the readable lesson UI. */
.portrait{width:76px;height:82px;border-radius:12px;border:2px solid #cbc5d2;background:#e9e5ee;box-shadow:0 3px 0 #d8d2db;overflow:hidden}.portrait img{width:72px;height:78px;image-rendering:pixelated;object-fit:contain}.world-stage{background:#c4b798}.world-heading{z-index:1}.world-heading .eyebrow,.world-heading h2{text-shadow:0 1px 0 #f6eee1}.character{gap:15px}.speech-card .portrait{align-self:flex-start}.world-card{box-shadow:0 10px 28px #51435f14}
@media(max-width:600px){.portrait{width:64px;height:70px}.portrait img{width:60px;height:65px}}

.profile-form{display:grid;gap:16px;margin:22px 0;max-width:620px}.profile-form label{display:grid;gap:8px;font-weight:700}.profile-form input,.profile-form select,.profile-form textarea{padding:12px;border:1px solid #b8b7b0;border-radius:10px;font:inherit;min-width:0;width:100%;background:#fffefa}.profile-form small{font-weight:400;line-height:1.5}.profile-form [role=alert],#class-error{color:#9b3d45}.student-card{display:flex;justify-content:space-between;gap:18px;padding:22px 0;border-bottom:1px solid var(--line)}.student-card>div:last-child{display:grid;gap:8px;align-content:center}.answer-record{padding:16px;background:#f4f0e9;border-radius:12px;margin:16px 0}.first-incorrect,.answer-lock{color:#943f47;font-weight:800}.first-correct{color:#3f6344;font-weight:800}.content-panel{margin-bottom:24px}.review-card audio{max-width:100%}@media(max-width:600px){.student-card{display:grid}.profile-form{width:100%}}

/* Illustrated teaching context, with crisp original pixel art. */
.lesson-art{margin:14px 0 20px;border:1px solid #d5cddd;border-radius:12px;overflow:hidden;background:#f1edf4}.pixel-scene{position:relative;overflow:hidden}.pixel-scene img{display:block;width:100%;height:auto;image-rendering:pixelated}.lesson-art figcaption{font:700 16px/1.4 'Nunito',sans-serif;padding:9px 14px;color:#51435f}.complete-hero .lesson-art{max-width:480px;margin:0 auto 20px}.clue-card .lesson-art{margin:0 0 15px}.clue-card .lesson-art figcaption{font-size:14px}.pixel-glint{position:absolute;left:46%;top:23%;width:6px;height:18px;background:#fffbe3;box-shadow:0 0 14px 5px #c0f3ed;animation:clue-shine 3.6s steps(4,end) infinite;pointer-events:none}.pixel-glint:before{content:'';position:absolute;width:18px;height:6px;left:-6px;top:6px;background:#fffbe3}.pixel-glint.second{left:55%;top:47%;transform:scale(.6);animation-delay:1.8s}@keyframes clue-shine{0%,70%,100%{opacity:0}30%,42%{opacity:1}}body.reduced-motion .pixel-glint{opacity:.65}@media(prefers-reduced-motion:reduce){.pixel-glint{opacity:.65}}@media(max-width:450px){.lesson-art figcaption{font-size:15px}.stepper{margin-bottom:15px}}

.story-panel{margin:28px 0;padding:24px;background:#eee9f3;border:1px solid #d2c6df;border-radius:20px}.story-panel h2{font:800 27px/1.25 'Nunito',sans-serif;margin:9px 0}.story-panel p{font-size:17px;line-height:1.6}.story-options,.mission-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px;margin:20px 0}.story-option{display:flex;flex-direction:column;text-align:left;gap:10px;padding:20px;border:2px solid #a296b5;background:#fffefa;border-radius:14px;min-height:120px;font:inherit;color:#393347}.story-option strong{font-size:20px}.story-option span{font-size:17px;line-height:1.5}.story-option:hover:not(:disabled){border-color:#527b6c;background:#eef5e9}.story-option:focus-visible{outline:3px solid #96763e;outline-offset:3px}.mission-card{padding:18px;background:#fffefa;border:1px solid #d5cddd;border-radius:14px}.mission-card h3{font-size:21px;margin:12px 0}.mission-card p{font-size:16px}.mission-card.locked{background:#f7f4f8}.mission-card button{width:100%;white-space:normal}.story-ending{padding:15px;background:#fffefa;border:1px solid #b7c9ac;border-radius:16px}.story-ending h3{font-size:26px}.story-ending .badge{white-space:normal}.dialog-body .story-panel{padding:18px}.dialog-body .mission-grid{grid-template-columns:1fr}.story-panel button:disabled{opacity:.6;cursor:not-allowed}@media(max-width:650px){.story-panel{padding:18px}.story-options,.mission-grid{grid-template-columns:1fr}.story-panel h2{font-size:24px}}
/* The Garden That Glows: original shaded chapter art and a readable trail. */
.g5-picture{position:relative;width:100%;background-repeat:no-repeat;image-rendering:pixelated;overflow:hidden;background-color:#354d60}
.g5-atlas{aspect-ratio:1;background-size:300% 200%}
.g5-square{aspect-ratio:1;background-size:100% 100%}
.g5-landscape{aspect-ratio:3/2;background-size:100% 100%}
.g5-art{max-width:420px;margin:18px auto 22px;box-shadow:0 5px 0 #cabfd344}
.g5-art figcaption{background:#f0ebf5;color:#4e4864;text-align:center}
.world-stage:has(.g5-picture){max-height:none;aspect-ratio:auto;position:relative}
.world-stage>.g5-atlas{aspect-ratio:1}
.world-stage>.g5-landscape{aspect-ratio:3/2}
.world-stage:has(.g5-picture) .map-pin{left:50%;top:auto;bottom:22px;transform:translateX(-50%);min-width:145px;box-shadow:0 4px 0 #283f43,0 8px 24px #1f253c66}
.world-fireflies{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.world-fireflies i{position:absolute;width:4px;height:4px;background:#edffd1;box-shadow:0 0 8px 3px #d6ffc399;left:22%;top:62%;animation:garden-drift 7s ease-in-out infinite}
.world-fireflies i:nth-child(2){left:74%;top:40%;animation-delay:-3s}.world-fireflies i:nth-child(3){left:40%;top:77%;animation-delay:-5s}.world-fireflies i:nth-child(4){left:87%;top:68%;animation-delay:-1s}
@keyframes garden-drift{0%,100%{transform:translate(0,0);opacity:.2}45%{transform:translate(12px,-17px);opacity:.9}70%{transform:translate(-6px,-25px);opacity:.4}}
.cast-portrait{display:block;flex-shrink:0;background:linear-gradient(#d9d7ef,#cde5d9);width:80px;height:88px}
.cast-sprite{display:block;width:100%;height:100%;background:url('/assets/grade5/cast.webp') var(--cast-x) 0%/400% 300% no-repeat;image-rendering:pixelated;animation:cast-blink 6s steps(1,end) infinite}
@keyframes cast-blink{0%,93%,98%,100%{background-position-y:0%}94%,97%{background-position-y:50%}}
.cast-portrait:hover .cast-sprite{animation:none;background-position-y:100%}
.chapter-trail{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:24px}
.chapter-tile{display:flex;align-items:center;gap:13px;text-align:left;padding:16px;border:2px solid #afbacc;background:#f8f6fc;border-radius:12px;color:#39475b;box-shadow:0 3px 0 #d5d4e3;min-height:108px}
.chapter-tile:not(:disabled):hover{border-color:#638d88;background:#eaf5ee;transform:translateY(-2px)}
.chapter-number{display:grid;place-items:center;flex-shrink:0;width:40px;height:40px;background:#dcd6ed;color:#55466d;border-radius:10px;font-weight:900;font-size:20px}
.chapter-tile strong,.chapter-tile small,.chapter-tile em{display:block}.chapter-tile small{font-size:10px;letter-spacing:1px;margin-bottom:5px}.chapter-tile strong{font-size:17px;line-height:1.3}.chapter-tile em{font-size:12px;font-style:normal;margin-top:5px;color:#667180}
.chapter-locked{opacity:.58;background:#eeedf1;box-shadow:none}.chapter-done{border-color:#90b7a2;background:#edf6ed}.chapter-done .chapter-number{background:#c9e6d3;color:#285f45}
.branch-memory{padding:10px 14px;border-left:3px solid #9ba2c4;background:#efedf6;border-radius:0 8px 8px 0;font-size:15px!important}
.next-mystery{padding:16px;background:#e8e7f4;border:1px solid #bfc2dc;border-radius:10px}
.garden-story h2{font-size:25px}.garden-story>p{font-size:16px;line-height:1.65}.story-ending .g5-art{max-width:680px}.story-ending p{font-size:17px;line-height:1.7}
@media(max-width:600px){.chapter-trail{grid-template-columns:1fr}.chapter-tile{min-height:86px;padding:12px}.g5-art{max-width:360px}.world-bottom{flex-wrap:wrap;gap:7px}.cast-portrait{width:64px;height:72px}}
@media(prefers-reduced-motion:reduce){.cast-sprite,.world-fireflies i,.g5-picture .pixel-glint{animation:none!important}.cast-sprite{background-position-y:0%}.world-fireflies i{opacity:.45}}
body.reduced-motion .cast-sprite,body.reduced-motion .world-fireflies i,body.reduced-motion .g5-picture .pixel-glint{animation:none!important}body.reduced-motion .cast-sprite{background-position-y:0%}
.dialog-body:has(.stepper) .g5-art{max-width:280px}
.world-card:has(.g5-picture) .world-heading{background:#faf7edee;border:1px solid #e4dccb;border-radius:10px;padding:9px 14px;top:14px;left:14px}
.world-card:has(.g5-picture) .weather{display:none}
@media(max-width:600px){.dialog-body:has(.stepper) .g5-art{max-width:240px}}
#quest-dialog .chapter-trail{display:none}
/* A fixed town overview, with chapter selection kept below it. */
.adventure-grid{align-items:start;grid-template-columns:minmax(0,1fr) 280px}
.town-card{min-width:0;background:#f7f5ef}.town-heading{padding:18px 22px;display:flex;align-items:center;justify-content:space-between;gap:14px;background:linear-gradient(110deg,#e0efe5,#eee8f6)}
.town-heading h2{font:800 24px/1.2 'Nunito',sans-serif;margin:4px 0 0;color:#36584f}.town-heading>span{font-size:12px;white-space:nowrap;color:#55625e}
.town-map{position:relative;aspect-ratio:3/2;isolation:isolate;overflow:hidden;background:#c7d5bb}.town-map>img{display:block;width:100%;height:100%;object-fit:cover;image-rendering:pixelated}
.town-marker{position:absolute;transform:translate(-50%,-50%);width:44px;height:44px;min-height:44px;border:3px solid #fff8db;border-radius:50%;display:grid;place-items:center;background:#f3d982;color:#394842;font:900 20px/1 'Nunito',sans-serif;box-shadow:0 3px 0 #3c3c4ecc,0 4px 10px #27334277;z-index:2;padding:0;transition:box-shadow .15s,scale .15s;opacity:1}
.town-marker small{position:absolute;right:-5px;bottom:-4px;display:grid;place-items:center;background:#fff9df;border:1px solid #52695b;border-radius:50%;width:17px;height:17px;font-size:11px}
.town-marker.is-done{background:#427c68;color:white}.town-marker.is-locked{background:#707085;color:#f7f2ff;border-color:#d2ccdf;cursor:not-allowed}.town-marker.is-locked small{background:#d2ccdf;color:#565466;border-color:#707085}
.town-marker.is-current{outline:3px solid #f8e6a2;outline-offset:4px}.town-marker:not(:disabled):hover{scale:1.12;box-shadow:0 3px 0 #3c3c4e,0 0 0 6px #fff5bf66}.town-marker:focus-visible{outline:4px solid #fff;outline-offset:5px;z-index:4}
.town-legend{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;padding:13px 18px;font-size:12px;color:#56665d}.town-legend>span{display:flex;gap:6px;align-items:center}.town-legend i{width:10px;height:10px;border-radius:50%;display:inline-block}.legend-ready{background:#d3b350}.legend-done{background:#427c68}.legend-locked{background:#707085}.town-legend p{margin:0 0 0 auto;font-size:12px}
.adventure-grid>.quest-card{min-height:370px;height:auto}.quest-card .primary{margin-top:22px}.history-actions{display:flex;gap:10px;flex-wrap:wrap}.danger-button{color:#9a4146;border-color:#cfa5a5;background:#fff8f6}.danger-button:hover{background:#fae9e7}.history-help{font-size:14px;line-height:1.7;color:#606b67}.removed-history{background:#f0edf5;padding:18px;border:1px solid #ccc3db;border-radius:12px;margin-top:24px}.removed-history summary{cursor:pointer;font-weight:800}.removed-session{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid #d5ccde}.removed-session:last-child{border:0}
@media(min-width:1500px){.adventure-grid{grid-template-columns:minmax(0,1fr) 310px}}
@media(max-width:1000px){.adventure-grid{grid-template-columns:1fr}.adventure-grid>.quest-card{min-height:0;display:grid;grid-template-columns:1fr auto;gap:10px 22px}.quest-card>.tag,.quest-card>h2,.quest-card>p,.quest-card>.quest-meta,.quest-card>.skill-pips{grid-column:1}.quest-card>.character{grid-column:2;grid-row:1/5}.quest-card>.primary{grid-column:1/-1;margin-top:4px}.quest-card>.quest-note{grid-column:1/-1}}
@media(max-width:600px){.town-heading{padding:14px}.town-heading h2{font-size:21px}.town-heading .eyebrow{font-size:9px}.town-heading>span{font-size:11px}.town-marker{width:36px;height:36px;min-height:36px;font-size:16px;border-width:2px}.town-marker small{width:14px;height:14px;font-size:9px}.town-marker.is-current{outline-width:2px;outline-offset:2px}.town-legend{padding:12px;gap:9px;font-size:11px}.town-legend p{width:100%;margin:0}.adventure-grid>.quest-card{padding:18px;gap:10px}.removed-session{flex-wrap:wrap}.history-actions .secondary{font-size:13px}}
.town-marker:disabled{opacity:1;filter:none}
.history-confirm{width:min(520px,calc(100% - 32px));border:1px solid #c6b8d2;border-radius:16px;padding:28px;background:#fffdf7;color:#35433f;box-shadow:0 20px 80px #233b4f44}.history-confirm::backdrop{background:#233b4f88;backdrop-filter:blur(3px)}.history-confirm h2{font:800 24px/1.3 'Nunito',sans-serif;margin:12px 0}.history-confirm p{font-size:16px;line-height:1.65}.history-confirm .history-actions{justify-content:flex-end;margin-top:24px}
@media(max-width:600px){.town-marker{width:44px;height:44px;min-height:44px}.history-confirm{padding:20px}.history-confirm .history-actions{justify-content:stretch}.history-confirm button{width:100%}}

/* Expanded four-scene chapters */
.scene-story{background:#edf3e8;border:1px solid #cfdfd2;border-radius:16px;padding:18px 20px;margin-bottom:20px}
.scene-story h3{margin:6px 0 8px;color:#315d50;font-size:1.25rem}
.scene-story p{margin:0;line-height:1.6}
.scene-list{display:grid;gap:12px;padding-left:24px}.scene-list li{padding:8px}.scene-list span{display:block;color:#65716e;font-size:.9rem}
.activity-scene .lesson-art{max-width:290px;margin:12px auto 20px}.activity-scene .g5-picture{max-height:190px;aspect-ratio:1}
.task-picture{max-width:360px;margin:16px auto 24px;background:#f7f2e6;padding:10px;border:3px solid #b4b1cb;border-radius:12px;box-shadow:0 4px 0 #d5d3de}.task-picture svg{width:100%;display:block;image-rendering:pixelated}.task-picture figcaption{font-size:.85rem;text-align:center;padding:8px;color:#53615d}
.dialog-header>div{min-width:0;flex:1}.dialog-header>.icon-button{flex-shrink:0}.dialog-header progress{display:block;width:100%;max-width:350px;height:8px;margin-top:10px;accent-color:#759b84}.skill-card progress{width:100%;height:12px;accent-color:#759b84}.reading-note,.transcript{white-space:pre-line;line-height:1.8}
.learning-history{display:flex;align-items:center;gap:20px;justify-content:space-between;background:#edf0f8;border:1px solid #ccd0e4;border-radius:18px;padding:22px;margin:24px 0}.learning-history h3{margin:6px 0}.learning-history p{margin:8px 0}.learning-history small{color:#65716e}.learning-history button{flex-shrink:0}.activity-evidence{background:#f0f4ec;border-radius:10px;padding:12px;margin:8px 0}.activity-evidence summary{cursor:pointer;font-weight:700}.skill-pips{flex-wrap:wrap}
@media(max-width:650px){.learning-history{display:block}.learning-history button{margin-top:15px}.scene-story{padding:14px}.dialog-header h2{font-size:1.1rem}.activity-scene .lesson-art{max-width:210px}}
.scene-tip{border-top:1px solid #d1decd;padding-top:10px;margin-top:12px!important;font-size:.95rem}.activity-scene .lesson-art{max-width:190px}.activity-scene .g5-picture{height:auto;aspect-ratio:1;max-height:none}progress{border-radius:8px;overflow:hidden}progress::-webkit-progress-bar{background:#e6e5ef}progress::-webkit-progress-value{background:#759b84}
.writing-board{max-width:245px}

/* Shaded task artwork uses the same presentation as the chapter illustrations. */
.task-picture.illustrated-task{width:min(100%,320px);max-width:320px;padding:0;overflow:hidden;border:1px solid #c9c0d6;background:#f0eaf5;box-shadow:0 3px 0 #d8d0e2}
.illustrated-task img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;image-rendering:pixelated}
.illustrated-task figcaption{padding:11px 12px;line-height:1.5;color:#51465f}
.activity-scene .illustrated-task .g5-picture{width:100%;height:auto;aspect-ratio:1;max-height:none}
@media(max-width:650px){.task-picture.illustrated-task{max-width:280px}}

/* Accessible classroom practice and evidence tools. */
.learning-dialog{width:min(720px,calc(100vw - 24px));max-height:92dvh;border:1px solid #bcb4d5;border-radius:20px;padding:0;color:#273c45;background:#fffef8;overflow:auto}
.learning-dialog::backdrop{background:#183b5077;backdrop-filter:blur(4px)}
.learning-dialog .dialog-header{position:sticky;top:0;z-index:2;background:#fffef8}
.learning-dialog .dialog-body{padding:24px}.learning-dialog details{padding:12px;border-bottom:1px solid #d6d5df}
.clue-sort{list-style:none;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.clue-sort li{padding:16px;background:#eeebf7;border:1px solid #c6bcdf;border-radius:14px}
.clue-sort figure{max-width:180px;margin:0 auto 12px}.clue-sort img{max-width:100%}
.table-scroll{overflow:auto}table{border-collapse:collapse;width:100%}th,td{text-align:left;padding:10px;border-bottom:1px solid #d7dbe2}
#teacher-queue details{padding:16px;border-bottom:1px solid #d7dbe2}#teacher-queue summary{cursor:pointer;font-weight:600}
#teacher-queue audio{display:block;max-width:100%;margin:16px 0}.learning-dialog button,.clue-sort button{min-height:44px}
@media(max-width:600px){.learning-dialog .dialog-body{padding:16px}.learning-dialog .dialog-header{padding:16px}.clue-sort{grid-template-columns:1fr}}

.mic-setup{display:flex;flex-wrap:wrap;gap:12px;padding:16px;margin-bottom:18px;background:#edf5f1;border:1px solid #bdcfc9;border-radius:14px}.mic-setup label{display:flex;flex-direction:column;gap:6px;flex:1 1 200px}.mic-setup select{max-width:100%;padding:10px;font:inherit}.mic-setup small{flex-basis:100%}.mic-setup meter{width:100%;height:22px}.history-confirm input{display:block;margin:12px 0;padding:10px;font:inherit;max-width:100%}
/* Keep the activity controls reachable above tablet keyboards. */
#quest-dialog[open]{display:flex;flex-direction:column;max-height:calc(100dvh - 24px);overflow:hidden}
#quest-dialog .dialog-header,#quest-dialog .dialog-footer{flex-shrink:0}
#quest-dialog .dialog-body{overflow-y:auto;overscroll-behavior:contain;min-height:0;-webkit-overflow-scrolling:touch}
.voice-review{padding:18px;background:#e9e4f6;border:1px solid #b8a9d2;border-radius:14px;margin:15px 0}.voice-review button{margin:6px 8px 6px 0}.voice-review p{line-height:1.6}
.return-recap{padding:24px}.return-recap .g5-art{max-width:260px;margin:auto}.return-recap p{font-size:18px;line-height:1.6}
[data-teacher-filter]{display:block;padding:12px;font:inherit;border:1px solid #bbb1ca;border-radius:10px;max-width:100%}
.complete-hero .g5-art{animation:clue-arrives .8s ease-out}.town-marker.is-done{box-shadow:0 0 0 5px #a9dace88,0 0 18px #9ce4d1}.town-marker.is-current{animation:trail-beacon 2.5s ease-in-out infinite}
@keyframes clue-arrives{from{opacity:0;transform:translateY(18px) scale(.9);filter:brightness(1.7)}to{opacity:1;transform:none;filter:brightness(1)}}
@keyframes trail-beacon{50%{box-shadow:0 0 0 7px #c8b4ef66,0 0 24px #bfa4f2}}
@media(prefers-reduced-motion:reduce){.complete-hero .g5-art,.town-marker.is-current{animation:none}}
@media(max-width:850px){#quest-dialog{width:calc(100% - 16px);max-height:calc(100dvh - 16px)}#quest-dialog .dialog-header{padding:12px 16px}#quest-dialog .dialog-footer{padding:12px 16px;flex-wrap:wrap}#quest-dialog .dialog-footer .primary{flex:1;min-width:170px}#quest-dialog .dialog-footer small{max-width:100%}.step-marker{font-size:14px;justify-content:center}.step-marker svg{display:none}.mic-setup button{min-height:48px}.writing-area{font-size:18px}.history-actions{flex-wrap:wrap}}
.town-discoveries{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;padding:16px;background:#eee9f7}.town-discoveries article{display:flex;align-items:center;gap:12px;background:#fffdf8;padding:12px;border-radius:12px;min-width:0}.town-discoveries .g5-frame{width:64px;min-width:64px}.town-discoveries p{margin:5px 0}.town-discoveries span{font-size:12px}.choice-recap{padding:16px;background:#fffdf8;border-radius:12px}.choice-recap summary{font-weight:700;cursor:pointer;min-height:44px}.answer-picture{max-width:160px;margin:14px auto}.answer-picture .lesson-art{max-width:100%!important}.answer-picture figcaption{display:none}
.town-discoveries .g5-picture{width:64px;height:64px;flex:0 0 64px;aspect-ratio:1;border-radius:8px}
.writing-cue{max-width:460px;margin:18px auto;border:2px solid #b9accb;border-radius:16px;padding:10px;background:#fffaf0;box-shadow:0 4px 0 #d3cadf}.writing-cue svg{display:block;width:100%;height:auto}.writing-cue figcaption{text-align:center;font-size:16px;padding:12px;color:#514361}.writing-audio-controls{padding:14px;border-radius:14px;background:#e9f0fb}.writing-audio-controls button{min-height:48px}.writing-audio-controls+.hint small{display:block;margin-top:10px}.activity-scene:has(.writing-cue){width:100%}

.writing-cue-atlas{width:100%;aspect-ratio:1;background-size:400% 400%;image-rendering:pixelated}.writing-cue img{display:block;width:100%;height:auto}.writing-cue .g5-picture{width:100%;aspect-ratio:1}

/* Friendly entry, separate from classroom administration. */
.entry-hero{display:grid;grid-template-columns:1fr 1.15fr;gap:2rem;align-items:center;padding:clamp(1.25rem,3vw,3rem);border:1px solid #d9d4ec;border-radius:24px;background:linear-gradient(125deg,#eee7fb,#e3f6f4);overflow:hidden}.entry-copy h1{font-size:clamp(2.4rem,4.5vw,4.4rem);line-height:1.08;color:#173260;margin:.8rem 0 1.2rem}.entry-copy p{font-size:1.1rem;line-height:1.6}.entry-copy small{display:block;margin-top:1rem;max-width:34em;line-height:1.6}.entry-hero img{width:100%;height:auto;border-radius:18px;box-shadow:0 12px 30px #16365a25;image-rendering:pixelated}.entry-hero .primary{min-height:52px;margin-top:.7rem}.entry-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem;margin:1.5rem 0}.entry-cards article{background:#fffdf8;border:1px solid #dcddea;border-radius:18px;padding:1.5rem}.entry-cards p{line-height:1.65}.entry-japanese{color:#46637b}@media(max-width:760px){.entry-hero,.entry-cards{grid-template-columns:1fr}.entry-hero img{max-height:300px;object-fit:cover}.entry-copy h1{font-size:2.7rem}}

/* Japanese procedural support stays separate from answer hints. */
.japanese-directions{border-left:4px solid #849bd5;background:#edf4fc;padding:14px 18px;margin:12px 0;color:#173b67;line-height:1.9;border-radius:8px;font-size:1rem}
.japanese-directions p{margin:6px 0 0}
.self-study-help{background:#f0ecfa;border:1px solid #d5cce6;border-radius:12px;padding:12px 16px;margin:12px 0 20px;color:#353455;line-height:1.9;font-size:.95rem}
.self-study-help summary{cursor:pointer;font-weight:700;min-height:32px}
.self-study-help li{margin:10px 0;padding-left:4px}
.self-study-help ol{padding-left:24px}
.self-study-help p{font-size:.85rem;margin-bottom:0}
.dialog-footer .primary span[lang=ja]{display:block;font-size:.8em}
.speaking-card{background:#edf4fc;border:2px solid #b6c8e6;border-radius:18px;padding:20px;margin:16px 0;line-height:1.7}
.speaking-card h3{font-size:1.25rem;margin:0 0 12px}
.speaking-card audio{display:block;width:100%;margin:16px 0}
.speaking-card .record-main{min-height:64px;min-width:220px;font-size:1.1rem}
.record-actions{display:flex;flex-wrap:wrap;gap:12px;margin:16px 0}
.record-actions button{min-height:56px}
.zone-nav{display:flex;gap:12px;flex-wrap:wrap;margin:20px 0}.zone-nav button{flex:1;min-width:240px;display:flex;flex-direction:column;align-items:flex-start;gap:5px;padding:16px 20px}.zone-nav small{font-size:.8rem;font-weight:400}
.lantern-zone{max-width:1100px;margin:auto}.lantern-zone>h1{font-size:clamp(1.7rem,4vw,2.7rem);line-height:1.2}.lantern-zone .town-map{aspect-ratio:3/2}.lantern-marker{background:#eee6ff;color:#263b69;border:3px solid #ad92d7}.lantern-marker.is-current{background:#bcf4ef;border-color:#235b72}.lantern-detail{margin:20px 0;scroll-margin-top:16px}.lantern-detail details{line-height:1.8}.lantern-detail summary,.lantern-endings summary{cursor:pointer;font-weight:700;padding:12px 0}.lantern-detail dt{font-weight:700;color:#255c62;margin-top:12px}.lantern-detail dd{margin:3px 0}.lantern-detail li{padding:5px 0}.preview-selected{border-color:#476e9f!important;background:#e9f5f8!important}.lantern-endings{margin-top:24px}.lantern-endings article+article{border-top:1px solid #ccc;padding-top:12px}
@media(max-width:600px){.lantern-marker{width:34px;height:34px;min-height:34px}.lantern-zone .chapter-trail{grid-template-columns:1fr}.zone-nav button{min-width:180px}}

/* A bounded story branch: evidence is explored separately from scored answers. */
.trail-investigation{width:min(100%,980px);margin:auto;text-align:center;padding:12px 0 24px}
.trail-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin:24px 0}
.trail-option{border:2px solid #d6cee9;border-radius:20px;overflow:hidden;padding-bottom:20px;background:#f8f5ff}
.trail-option.selected{border-color:#145f77;box-shadow:0 0 0 3px #bce8ef}
.trail-option img{width:100%;aspect-ratio:3/2;object-fit:contain;display:block}
.trail-option h4{font-size:1.4rem;margin:16px}.trail-option details{margin:16px;text-align:left}
.trail-scene{display:block;width:100%;max-height:52dvh;object-fit:contain;margin:20px auto;border-radius:16px}
.trail-clues{display:flex;justify-content:center;gap:16px;flex-wrap:wrap;margin:20px}
.trail-discovery{max-width:640px;margin:16px auto;padding:20px;border:1px solid #c8d3e8;border-radius:16px;background:#eff5ff}
.trail-discovery details{text-align:left;margin-top:14px}
.trail-investigation .helper-languages{justify-content:center;display:flex;gap:8px}
@media(max-width:620px){.trail-options{grid-template-columns:1fr;gap:16px}.trail-scene{max-height:42dvh}.trail-investigation{padding-bottom:16px}}

/* Chapter emblems stay recognisable even before a chapter unlocks. */
.chapter-emblem{position:relative;display:block;width:68px;height:68px;flex:0 0 68px}
.chapter-icon{display:block;width:100%;height:100%}
.chapter-emblem .chapter-number{position:absolute;right:-3px;bottom:-3px;width:24px;height:24px;border:2px solid #fffdf9;border-radius:8px;font-size:12px;box-shadow:0 1px 3px #22324b22}
.chapter-label{min-width:0}.chapter-tile.chapter-locked{opacity:1;background:#f0eef5;color:#697286;border-color:#d5d4e3}.chapter-locked .chapter-icon{opacity:.72}.chapter-locked em{color:#737b89}
@media(max-width:600px){.chapter-emblem{width:56px;height:56px;flex-basis:56px}.chapter-tile{gap:14px}.chapter-tile strong{font-size:16px}}
/* Match the chapter illustrations: crisp pixels, warm stepped frames. */
.chapter-emblem{width:80px;height:80px;flex-basis:80px;padding:3px;background:#b69265;border:2px solid #66513f;border-radius:3px;box-shadow:2px 2px 0 #d7c5a1}
.chapter-icon{object-fit:cover;image-rendering:pixelated;border:1px solid #e7cc98;border-radius:0}
.chapter-emblem .chapter-number{right:-7px;bottom:-6px;border-radius:3px;background:#fff0c9;border-color:#7a614a;color:#514130;box-shadow:2px 2px 0 #c5b18e}
.chapter-locked .chapter-icon{opacity:.85}
@media(max-width:600px){.chapter-emblem{width:64px;height:64px;flex-basis:64px}}

/* The story shelf uses the same illustrated world as the chapter trail. */
.finale-collection{margin-top:32px;padding:28px;border:2px solid #b6a17d;border-radius:8px;background:#fffaf0;box-shadow:4px 4px 0 #e5d8bd;scroll-margin-top:24px}
.finale-collection h3{font-size:1.55rem;line-height:1.3;margin:12px 0}.finale-collection h3 small{display:block;font-size:.8rem;margin-top:8px;color:#65756f}
.finale-collection progress{width:100%;height:10px;accent-color:#468980}.ending-shelf{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:24px 0}.ending-card{padding:14px;background:#fff;border:2px solid #d9c8a5;border-radius:5px;display:flex;flex-direction:column;align-items:flex-start}.ending-card h4{font-size:1.05rem;margin:10px 0}.ending-card p{flex:1}.ending-card .lesson-art{width:100%;margin:0 0 12px}.ending-card figcaption{display:none}.ending-card .g5-picture{min-height:0;aspect-ratio:3/2;height:auto}.ending-sealed{height:130px;width:100%;display:grid;place-content:center;text-align:center;background:repeating-linear-gradient(45deg,#f0e7d5,#f0e7d5 10px,#f5eddd 10px,#f5eddd 20px);color:#89764f;font-size:2.8rem;border:2px solid #d8c59c;margin-bottom:12px}.ending-sealed span{font-size:.8rem}.finale-actions,.finale-gifts{display:flex;flex-wrap:wrap;gap:12px;margin:20px 0}.finale-stage{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;align-items:start;margin-top:18px}.finale-stage .lesson-art{margin:0;width:100%}.finale-stage p{line-height:1.7}.finale-dialogue{padding:4px 18px;background:#eef4e8;border-left:4px solid #8fa879;border-radius:4px;margin:18px 0}.finale-dialogue strong,.finale-dialogue span{display:block}.finale-dialogue strong{font-size:.8rem;color:#566a50}.finale-support{padding:12px 0}.finale-callback{border-left:3px solid #ad92c0;padding:12px 16px;background:#f4eef9}.finale-collection fieldset{border:0;padding:0;margin:20px 0;min-width:0}.finale-collection legend{font-size:1.2rem;font-weight:700}.finale-gifts label{padding:14px;border:2px solid #c5b28d;border-radius:4px;background:white;cursor:pointer}.finale-gifts label:has(input:checked){border-color:#397f76;background:#e4f1eb}.finale-gifts input{margin-right:8px;accent-color:#397f76}.finale-message{display:block;font-weight:700;margin:20px 0}.finale-message textarea{display:block;width:100%;margin-top:10px;padding:16px;border:1px solid #acbc9e;border-radius:6px;font:inherit;resize:vertical;box-sizing:border-box}.finale-stamp{font-size:2rem;color:#b68a3e}.finale-postcard{margin:18px 0;padding:18px;border:2px dashed #d0ba8d;background:#fffdf5;overflow-wrap:anywhere}.finale-postcard small{font-size:.7rem;letter-spacing:.1em}.finale-achievement{padding:14px;background:#e5f1e7;border:1px solid #98b99d;border-radius:4px;font-weight:700}.finale-routes button,.finale-resume button{display:block;text-align:left;margin:12px 0;white-space:normal}.finale-resume,.finale-routes{margin-top:20px}.replay-choice-art{width:100%;aspect-ratio:3/2;object-fit:cover;image-rendering:pixelated;border-radius:3px}.finale-collection [data-finale-heading]:focus{outline:2px solid #76979a;outline-offset:4px}.finale-collection button:disabled{opacity:.6;cursor:wait}.finale-collection [role=alert]{color:#9b3244}.finale-teacher-record{padding:14px;border-left:4px solid #a78bb4;background:#f7f2fa;margin:12px 0}
@media(max-width:760px){.finale-collection{padding:18px}.ending-shelf{grid-template-columns:1fr}.ending-card{display:block}.ending-card .lesson-art{max-width:240px}.ending-sealed{height:90px}.finale-stage{grid-template-columns:1fr}.finale-stage .lesson-art{max-width:460px}.finale-gifts{flex-direction:column}.finale-actions button{width:100%}}

/* Casebook collection: distinct pixel silhouettes until a chapter is completed. */
.clue-collection-progress{display:flex;flex-wrap:wrap;align-items:center;gap:12px 20px;margin:22px 0;color:#243d60}.clue-collection-progress progress{width:min(280px,100%);height:16px;accent-color:#7260ad}.clue-card-top{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:16px;font-size:13px;font-weight:800}.clue-collection .clue-card{display:flex;flex-direction:column;min-width:0}.clue-collection .clue-card>button{margin-top:auto;width:100%}.clue-collection .clue-card details{margin-bottom:18px}.clue-collection .clue-card summary{cursor:pointer;min-height:44px;padding:10px 0;color:#315486}.clue-collection .clue-chapter-title{font-size:14px;color:#555875;margin:0 0 12px}.clue-silhouette{position:relative;display:grid;place-items:center;min-height:170px;border-radius:12px;background:repeating-conic-gradient(#e9e5f1 0% 25%,#eeebf5 0% 50%) 0/24px 24px;border:1px solid #d6cee5;color:#5c5977;margin-bottom:14px}.clue-silhouette svg{width:100px;height:100px;filter:drop-shadow(4px 5px 0 #c6bed8)}.clue-silhouette span{position:absolute;inset:0;display:grid;place-items:center;color:#fff;font:bold 28px monospace}.clue-collection .missing>p{margin-bottom:18px}.clue-collection .found{background:#fffef8}.clue-collection .clue-grid{grid-template-columns:repeat(3,minmax(0,1fr))}@media(max-width:1100px){.clue-collection .clue-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.clue-collection .clue-grid{grid-template-columns:1fr}.clue-collection-progress{align-items:flex-start;flex-direction:column}.clue-collection{padding:18px}}

/* Optional clue missions remain separate from chapter assessments. */
.bonus-shelf{display:grid;gap:28px;margin-top:28px}.bonus-chapter>h3{font-size:22px;margin-bottom:14px}.bonus-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.bonus-pair .clue-card{display:flex;flex-direction:column;gap:10px;min-width:0}.bonus-pair .clue-card>button{margin-top:auto}.bonus-pair .clue-card h4{font-size:20px;margin:0}.bonus-pair .clue-card p{margin:0 0 8px}.bonus-pair .clue-silhouette{margin:0}.bonus-art{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;image-rendering:pixelated;border-radius:12px;background:#eee9f5}.bonus-dialog{width:min(1100px,94vw);max-height:94dvh;padding:0;border:1px solid #c8bddc;border-radius:20px;background:#fffefa;color:#203754}.bonus-dialog::backdrop{background:#101e38bb}.bonus-dialog .dialog-header{position:sticky;top:0;background:#fffefa;z-index:2;display:flex;justify-content:space-between;align-items:center;padding:18px 24px}.bonus-dialog .dialog-body{padding:24px}.bonus-dialog h2{font-size:24px}.bonus-dialog h3{font-size:23px}.bonus-stage{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:28px;align-items:start}.bonus-stage p{line-height:1.65}.bonus-stage .reading-note{white-space:pre-line}.bonus-stage textarea{display:block;width:100%;box-sizing:border-box;padding:14px;margin:12px 0;border:1px solid #b6c2b0;border-radius:12px;font:inherit;line-height:1.6}.bonus-stage button{margin:4px 4px 8px 0}.bonus-audio-controls{display:flex;flex-wrap:wrap;gap:6px}.bonus-dialog .choices{display:grid;gap:10px}.bonus-dialog .choice{width:100%;text-align:left}.bonus-teacher-record{padding:18px;border:1px solid #ddd2ed;border-radius:12px;margin:16px 0;background:#f8f5fd}.bonus-teacher-record blockquote{white-space:pre-wrap;overflow-wrap:anywhere}.bonus-dialog blockquote{white-space:pre-wrap;overflow-wrap:anywhere;padding:16px;background:#f0ebf8;border-radius:12px}.bonus-collection .clue-collection-progress progress{max-width:100%}@media(max-width:700px){.bonus-stage,.bonus-pair{grid-template-columns:1fr}.bonus-stage>.bonus-art{max-height:280px}.bonus-dialog .dialog-header,.bonus-dialog .dialog-body{padding:16px}.bonus-dialog{width:96vw;max-height:96dvh}.bonus-dialog h2{font-size:20px}}

.teacher-content-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-top:24px}.teacher-content-grid .content-panel{margin:0;min-width:0}.teacher-content-grid details{margin-top:18px}.teacher-content-grid summary{cursor:pointer;padding:10px 0;font-weight:600}.teacher-activity-links{display:grid;gap:10px;margin:10px 0}.teacher-activity-links button{text-align:center;white-space:normal;display:grid;grid-template-columns:minmax(0,1fr);justify-content:stretch;justify-items:stretch;gap:6px}.teacher-activity-links strong{text-transform:capitalize}.teacher-activity-links span{font-weight:400;font-size:14px}@media(max-width:800px){.teacher-content-grid{grid-template-columns:1fr}}

/* WordTrail pixel-art identity: warm analogous apricot tile. */
.brand img{width:44px;height:44px;flex-shrink:0;border-radius:9px;image-rendering:auto}

.story-context{padding:12px 16px;margin:0 0 16px;border-left:4px solid #8070ad;background:#f3f5ed;border-radius:8px;color:#243e50;font-size:1rem}.story-context p{margin:0;line-height:1.5}.story-context p[lang="ja"]{margin-top:6px;font-size:.94em}

/* Continuity v4: calm story supports and consistent, uncropped image framing. */
.continuity-details{margin:18px 0;padding:8px 14px;border:1px solid #ccd7c7;border-radius:10px;background:#f7f8ef;text-align:left}.continuity-details summary{cursor:pointer;font-weight:700;min-height:44px;display:flex;align-items:center;gap:6px}.continuity-details[open] summary{margin-bottom:10px}.continuity-person{display:grid;grid-template-columns:96px minmax(0,1fr);gap:16px;align-items:start;margin:20px 0;padding:16px;border:1px solid #c6d3bf;border-radius:12px;background:#f5f7ef;text-align:left}.continuity-person>img{width:96px;height:96px;aspect-ratio:1;object-fit:contain;border-radius:8px;background:#e8eddc;image-rendering:pixelated}.continuity-person h3{margin:0 0 4px;font-size:1.25rem}.continuity-person h3 span{font-size:.8em;font-weight:500}.continuity-person p{margin:6px 0;font-size:.95rem;line-height:1.5}.continuity-person .continuity-role{font-weight:700;color:#38605b}.continuity-person p[lang=ja]{font-size:.88rem;color:#52675d}
.garden-orientation{margin:12px auto!important;padding:0!important;max-width:460px!important;border:0!important;box-shadow:none!important;background:transparent!important}.garden-plan{position:relative;width:100%;aspect-ratio:4/3}.garden-plan svg{display:block;width:100%;height:auto}.garden-place{position:absolute;left:var(--place-x);top:var(--place-y);transform:translate(-50%,-50%);padding:2px 5px;background:#fffef2ed;border-radius:3px;text-align:center;line-height:1.2;white-space:nowrap;color:#263c37}.garden-place b{display:block;font-size:clamp(11px,1.3vw,14px)}.garden-place small{font-size:10px}.garden-place-fence{top:25%}.garden-place-gate{top:23%}.garden-place-bench{top:68%}.garden-place-pot{top:61%}.garden-place-greenhouse{top:90%}.garden-orientation figcaption{padding:8px 4px!important;font-size:.85rem!important;line-height:1.4;background:none!important;color:#53645a!important}
.continuity-reveal{margin:18px 0;border-top:1px solid #d0d9c8;padding-top:14px}.continuity-reveal h4{font-size:1rem;margin:0 0 10px}.continuity-reveal>img{display:block;width:100%;aspect-ratio:1;object-fit:contain;border-radius:10px;image-rendering:pixelated}.continuity-reveal ol{margin:12px 0 0;padding-left:24px}.continuity-reveal li{margin:10px 0;font-size:.95rem;line-height:1.5}.continuity-reveal li span{display:block;color:#53645a;font-size:.9em}.celebration-choice-art{display:block;width:100%;aspect-ratio:1;object-fit:contain;image-rendering:pixelated;border-radius:8px;background:#f5f1e7;margin-bottom:6px}.story-option:has(.celebration-choice-art){padding:12px;gap:8px}.story-option:has(.celebration-choice-art) span{font-size:.95rem}
#quest-dialog.lesson-frame .lesson-picture .activity-scene .illustrated-task>img,#quest-dialog.lesson-frame .lesson-picture .activity-scene .writing-cue>img{aspect-ratio:1;object-fit:contain;width:100%;height:auto;background:#f4efe5}
#quest-dialog.lesson-frame .lesson-picture .activity-scene>figure{padding:0;border-width:1px;border-radius:12px;overflow:hidden;box-shadow:0 3px 0 #d8d0e2}
#quest-dialog.lesson-frame .lesson-picture .activity-scene>figure figcaption{background:#f5f1e9;color:#4a5260;min-height:42px;display:flex;align-items:center;justify-content:center;padding:9px 12px;font-size:.9rem;line-height:1.4}
@media(max-width:600px){.continuity-person{grid-template-columns:72px minmax(0,1fr);gap:12px;padding:12px}.continuity-person>img{width:72px;height:72px}.continuity-person p{font-size:.9rem}.continuity-person p[lang=ja]{font-size:.84rem}.garden-place b{font-size:12px}.garden-place small{font-size:10px}.continuity-reveal li{font-size:.9rem}}

.continuity-person-portrait{display:grid;place-items:center;width:96px;height:96px;border-radius:8px;background:#e8eddc;overflow:hidden}.continuity-person-portrait .portrait{width:84px;height:84px;margin:0}.continuity-person-portrait .cast-sprite{animation:none!important;background-position-y:0%}.continuity-person>img{object-fit:cover;object-position:65% 20%}@media(max-width:600px){.continuity-person-portrait{width:72px;height:72px}.continuity-person-portrait .portrait{width:68px;height:68px}}

.day-night-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px;background:#fbf7ee;padding:8px}.day-night-pair>div{min-width:0}.day-night-pair span{display:block;text-align:center;padding:8px;font-size:.9rem;color:#243f55}.activity-scene .day-night-pair img{width:100%;aspect-ratio:1;object-fit:contain}
