/* Forest chapter of the hub's Follow the Star design system. All movement stays in 2D. */
@font-face{font-family:Nunito;src:url(fonts/quicksand.woff2) format('woff2');font-weight:300 900;font-display:swap}
:root{--forest-deep:#302346;--forest-mid:#514263;--ink:#302346;--ink-soft:#645771;--moss:#6da88d;--moss-soft:#b2d6b6;--forest-accent:#b8e0ae}
html,body{height:100%;font-family:var(--font-ui);color:var(--cream)}
body{background:radial-gradient(ellipse at 78% 0%,#53416e88,transparent 60%),radial-gradient(ellipse at 5% 100%,#31765c55,transparent 60%),#1c142e;padding:56px max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
body::before{opacity:.4;z-index:0}
button{font-family:var(--font-ui)}
button:focus-visible,[tabindex]:focus-visible{outline:3px solid #ffd54f;outline-offset:4px}
button{touch-action:manipulation}
button:disabled{cursor:default}
.app{max-width:1160px;height:calc(100dvh - 76px);max-height:1000px;border:1px solid #ddcaf02b;border-radius:30px;background:linear-gradient(145deg,#302444,#201c31 65%,#1e3030);box-shadow:0 26px 80px #09041477;isolation:isolate}
.leaf-deco{display:none}
.screen{padding:28px 34px;visibility:hidden;color:var(--ink);background:linear-gradient(150deg,#faf5eb,#e8efe2);border-radius:28px;transition:opacity .3s var(--snap),transform .4s var(--snap),visibility .3s}
.screen.active{visibility:visible}
.screen:not(.active){pointer-events:none}
#titleScreen,#trailScreen,#journalScreen{background:none;color:var(--cream);text-align:left;align-items:stretch;justify-content:flex-start}
#titleScreen{padding:22px 32px 18px;overflow-x:hidden}
#titleScreen.all-family-home::after{display:none}
#anyaHomeBtn{top:max(7px,env(safe-area-inset-top))!important;left:max(16px,env(safe-area-inset-left))!important;background:transparent!important;color:#fff4e0d9!important;border:0!important;box-shadow:none!important;font-family:var(--font-ui)!important;padding:9px 5px!important;font-size:12px!important}
.forest-controls{position:fixed;right:max(20px,env(safe-area-inset-right));top:max(7px,env(safe-area-inset-top));display:flex;gap:8px;z-index:40}
.forest-controls button{min-height:34px;border:1px solid #fff4e028;border-radius:30px;padding:6px 12px;background:#ffffff0a;color:var(--cream);font-size:11px;font-weight:700}
.forest-controls button[aria-pressed=true]{border-color:#f4d77d77;background:#ffd54f15}
.forest-nav{display:flex;justify-content:space-between;align-items:center;gap:12px;position:relative;z-index:3}
.forest-wordmark{font-family:var(--font-display);font-size:21px;font-weight:600;white-space:nowrap}.forest-wordmark span{color:#d1bbdf}
.forest-nav>div{display:flex;gap:6px}
.forest-icon{background:#fff4e008;border:1px solid #fff4e021;border-radius:30px;color:var(--cream);font-weight:700;padding:11px 14px;font-size:12px;min-height:42px;cursor:pointer;transition:background .2s,transform .3s var(--pop)}
.forest-icon:hover{background:#fff4e01b;transform:translateY(-2px)}
.forest-hero{display:grid;grid-template-columns:1.03fr 1fr;align-items:center;min-height:350px;flex:1;position:relative}
.forest-copy{padding:28px 0 26px;position:relative;z-index:2}
.eyebrow{font-size:10px;letter-spacing:2.2px;font-weight:700;color:#b9d8bc;line-height:1.6}
.forest-copy h1{font-family:var(--font-display);font-weight:600;font-size:clamp(48px,5.7vw,77px);line-height:.99;letter-spacing:-1.7px;margin:22px 0 18px;text-shadow:0 5px 0 #10091d44}
.script-line{display:block;font-family:var(--font-script);font-weight:400;letter-spacing:0;font-size:.48em;color:#f6d982;margin:0 0 8px 20px;transform:rotate(-7deg);transform-origin:left}
.forest-copy h1 em{font-style:normal;color:#c3dcb1}
.forest-intro{font-size:15px;line-height:1.7;color:#dfd2e5}
.play-btn{font-family:var(--font-display);background:linear-gradient(180deg,#ffe79c,#f2c854);color:#382547;border:1px solid #ffeaaa;border-radius:20px;font-size:17px;font-weight:600;padding:14px 24px;box-shadow:0 5px 0 #ab8037,0 12px 24px #140b2833;text-shadow:none;letter-spacing:0;transition:transform .35s var(--pop),box-shadow .25s}
.play-btn:hover{transform:translateY(-3px);box-shadow:0 7px 0 #ab8037,0 16px 28px #140b2855}.play-btn:active{transform:translateY(3px);box-shadow:0 2px 0 #ab8037}
.forest-primary{margin-top:22px;min-width:224px;display:inline-flex;justify-content:space-between;gap:36px;font-size:20px}
.gentle-note{font-size:11px;color:#c1b4cd;margin:14px 0 0 10px;font-weight:600}
.forest-art{position:relative;height:100%;min-height:380px;background:url(math-forest-scene.svg) center bottom/cover;border-radius:48% 48% 35% 35%;isolation:isolate}
.forest-art::after{content:'';position:absolute;inset:5% 4% 10%;border:1px solid #decc9c22;border-radius:50%;z-index:-1}
.forest-moon{position:absolute;width:115px;height:115px;right:10%;top:9%;border-radius:50%;background:radial-gradient(circle at 38% 34%,#fff5c8,#f1d386);box-shadow:0 0 80px #f5d3803d,0 0 0 17px #f5d38009}
.hero-costume{position:absolute;height:95%;width:72%;left:14%;bottom:4%;border:0;background:none;cursor:pointer;padding:0;animation:forest-float 5s var(--glide) infinite alternate}
.hero-costume img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 15px 16px #120d2566)}
.hero-costume span{position:absolute;left:22%;bottom:12%;border-radius:30px;background:#241d35de;border:1px solid #fae3a24d;color:#fae3a2;padding:7px 12px;font-size:11px;opacity:0;transition:opacity .2s}
.hero-costume:hover span,.hero-costume:focus-visible span{opacity:1}

.art-star{position:absolute;color:#ffe99c;text-shadow:0 0 18px #ffd54faa;animation:forest-twinkle 3s ease-in-out infinite alternate}.s1{left:15%;top:10%;font-size:26px}.s2{right:3%;top:48%;font-size:36px;animation-delay:-1s}.s3{left:4%;bottom:24%;font-size:16px;animation-delay:-2s}
.art-orbit{position:absolute;left:8%;top:38%;font:500 28px var(--font-display);color:#b7e3c0;transform:rotate(-12deg)}.art-orbit span{position:absolute;left:290px;top:-74px;color:#f6d991}.art-orbit b{position:absolute;left:180px;top:185px;color:#f1b7d6;font-weight:500}
.art-caption{position:absolute;bottom:1%;width:100%;text-align:center;font-size:8px;letter-spacing:2px;color:#c5d7c6}
.home-progress{padding:13px 17px;display:flex;align-items:center;gap:14px;background:#0a0c1638;border:1px solid #b8d9c322;border-radius:18px;margin-bottom:18px;min-height:66px;position:relative;z-index:2}
.home-progress img{width:44px;height:44px;object-fit:contain;filter:drop-shadow(0 0 5px #fff3)}
.home-progress .progress-copy{flex:1;min-width:0}.home-progress strong{font-size:13px;color:#ecedd3}.home-progress p{font-size:11px;color:#c2bccb;margin-top:4px}.home-progress .tiny-track{height:5px;margin-top:8px;border-radius:10px;max-width:440px;background:#fff2;overflow:hidden}.tiny-track i{display:block;height:100%;background:linear-gradient(90deg,#a7d9ba,#f0db92);border-radius:10px}.home-progress>span{font:500 21px var(--font-display);color:#f6dc8d;white-space:nowrap}
.home-quests{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}
.quest-tile{display:flex;align-items:center;gap:12px;text-align:left;border:1px solid #d6c6ef29;border-radius:20px;min-height:112px;padding:17px 14px;background:linear-gradient(130deg,#4d3b6244,#3d334844);color:var(--cream);cursor:pointer;transition:transform .4s var(--pop),border-color .3s;position:relative;overflow:hidden}
.quest-tile:hover{transform:translateY(-4px);border-color:#e2cd9577}.quest-tile>span:nth-child(2){flex:1}.quest-tile small{display:block;font-size:7px;letter-spacing:1.25px;color:#d1c2dc;margin-bottom:8px;font-weight:700}.quest-tile strong{display:block;font:500 19px/1.15 var(--font-display)}.quest-tile span span{display:block;font-size:10px;line-height:1.6;margin-top:6px;color:#cfc5d6}.quest-tile>b{align-self:flex-start;font-weight:400;color:#e7d9bd}.quest-symbol{font:400 36px var(--font-display);color:#ffe49a}.practice-tile{background:linear-gradient(130deg,#34584966,#293b3944)}.practice-tile .quest-symbol{color:#b4e4c3}.moon-tile{background:linear-gradient(130deg,#393a6c77,#40364b44)}
.home-footer{display:flex;align-items:center;gap:22px;justify-content:flex-start;margin-top:17px;flex-wrap:wrap}.home-footer button{background:none;border:0;color:#e0d2e7;font-size:11px;padding:8px 0;cursor:pointer;font-weight:700}.home-footer>span{margin-left:auto;font-size:9px;color:#b3a6bf}
.trail-heading{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:8px}.trail-heading h2{font:500 clamp(24px,3.2vw,36px)/1.15 var(--font-display);margin-top:7px;color:var(--cream)}.trail-sub{color:#cfc4d9;font-size:12px;line-height:1.6}
.trail-map{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;position:relative;margin:30px 0 24px;padding:20px 0;background:url(math-forest-scene.svg) center 57%/cover;border-radius:28px;min-height:188px}
.trail-map::before{content:'';position:absolute;left:7%;right:7%;height:60px;top:40%;border-top:2px dashed #f8e2a444;border-radius:50%;pointer-events:none}
.clearing{position:relative;color:var(--cream);border:1px solid transparent;background:#241e3444;border-radius:20px;min-width:0;cursor:pointer;padding:10px 4px;transition:transform .4s var(--pop),background .3s}.clearing:nth-child(even){transform:translateY(13px)}.clearing:hover{background:#eee2ff10}.clearing[aria-pressed=true]{background:#e0c98016;border-color:#f0d58b88;box-shadow:0 0 28px #edd3930d}.clearing-icon{display:grid;place-items:center;height:62px;width:62px;margin:0 auto 10px;background:radial-gradient(circle at 35% 25%,#63977a,#2a5349);box-shadow:0 6px 0 #122c30,0 0 0 5px #f6df960b;border:1px solid #b9daac66;border-radius:50%;font-size:30px}.clearing:nth-child(2) .clearing-icon{background:linear-gradient(130deg,#916a9c,#543d70)}.clearing:nth-child(3) .clearing-icon{background:linear-gradient(130deg,#b79656,#725235)}.clearing:nth-child(4) .clearing-icon{background:linear-gradient(130deg,#669cac,#354d73)}.clearing:nth-child(5) .clearing-icon{background:linear-gradient(130deg,#cc899e,#754f77)}.clearing:nth-child(6) .clearing-icon{background:linear-gradient(130deg,#9e91cd,#524476)}.clearing strong{display:block;font:500 15px var(--font-display)}.clearing small{display:block;font-size:10px;margin-top:5px;color:#d0c7d9}.clearing .clearing-rating{display:block;color:#f2d482;font-size:12px;letter-spacing:3px;margin-top:7px}
.trail-settings{display:flex;justify-content:space-between;gap:20px;margin:0 0 22px}.setting-label{font-size:11px;font-weight:700;color:#cfc4d9;margin-bottom:9px}.segmented{display:flex;gap:5px;background:#09081335;padding:5px;border-radius:14px}.segmented button{background:none;border:1px solid transparent;border-radius:10px;padding:10px 13px;color:#cfc4d9;cursor:pointer;font-size:11px;font-weight:700;min-height:42px}.segmented button[aria-pressed=true]{background:#f1dfb1;color:#352740;box-shadow:0 2px 5px #0003}
.quest-kinds{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.kind-card{border:1px solid #f5e8f526;border-radius:18px;background:#f5e8f505;color:var(--cream);padding:16px;text-align:left;cursor:pointer}.kind-card[aria-pressed=true]{border-color:#afcfab;background:#bad1a313}.kind-card strong{font:500 19px var(--font-display)}.kind-card p{font-size:11px;line-height:1.6;color:#cdc2d7;margin-top:8px}.kind-card span{margin-right:6px;color:#f4d985}.trail-go{margin-top:22px;display:flex;align-items:center;justify-content:space-between;gap:20px}.trail-go p{font-size:12px;line-height:1.6;color:#dacfe2;max-width:360px}
#puzzleScreen{padding:20px clamp(16px,7vw,100px);background:radial-gradient(ellipse at 90% 0%,#ffe2a04d,transparent 48%),linear-gradient(145deg,#faf5eb,#edf1e7)}
.puzzle-header{margin-bottom:8px}.puzzle-mode-name{color:#382d4c}.puzzle-mode-sub{color:#756681}.puzzle-mode-avatar{background:#e3d3ed;border-color:#fff}
.trail-journey{display:flex;align-items:center;gap:8px;justify-content:center;margin:4px 0 12px}.journey-dot{height:26px;width:26px;display:grid;place-items:center;font:500 12px var(--font-display);color:#8b7c98;background:#e1ddd9;border-radius:50%;border:1px solid #c6beca}.journey-dot.done{background:#dceccd;color:#416246;border-color:#9fc28e}.journey-dot.current{background:#ffe697;border-color:#bc9445;color:#563e20;box-shadow:0 0 0 4px #eed58233}.journey-count{font-size:10px;color:#786781;margin-left:8px}
.progress-bar{height:5px;background:#ddd8dd;margin-bottom:10px}.progress-fill{background:linear-gradient(90deg,#93bf97,#e4c976)}.rescue-meter{padding:8px 12px;margin-bottom:7px;border:1px solid #d7d9c5;box-shadow:none;background:#fff9;border-radius:15px}.rescue-meter-portrait{width:36px;height:36px}.rescue-meter .req-chips{margin-top:3px!important}.rescue-meter-text{font-size:11px}.potion-tray{margin-bottom:4px}.potion-btn{box-shadow:none;font-size:10px;padding:5px 10px;min-height:32px}.ref-btn{font-size:10px;box-shadow:none;border:0;background:none;padding:4px 12px;min-height:30px}
.equation-card{border:1px solid #ddd2bb;background:linear-gradient(160deg,#fffefa,#faf1df);border-radius:25px;padding:24px 14px 22px;margin:10px 0 16px;box-shadow:0 8px 25px #5f46650d}.equation-card::before{display:none}.op-badge{font-size:9px;letter-spacing:1.8px;background:none!important;color:#807051!important;margin-bottom:15px}.eq-num{background:none;border:0;box-shadow:none;min-width:48px;padding:5px 8px;color:#392a4d}.eq-num.answer-slot{background:#fff0b9;border:2px dashed #c9a950;color:#745627;animation:none;min-width:78px;border-radius:15px}.equation-display{font-size:clamp(34px,4.8vw,56px);gap:12px;filter:none}.eq-op,.eq-equals{color:#a590b0}
.mcq-grid{gap:12px;max-width:620px;margin:0 auto}.mcq-btn{background:#fffefa;color:#423350;border:1px solid #ddd2e0;border-radius:19px;box-shadow:0 5px 0 #d1c5d2;font-size:30px;min-height:73px;padding:14px;transition:transform .3s var(--pop),background .2s}.mcq-btn:hover:not(:disabled){background:#fff1be;border-color:#d6b850;transform:translateY(-3px)}.mcq-btn.correct{background:#bce2b8}.mcq-btn.wrong{background:#f4d4cf}.mcq-btn.disabled-hint{opacity:.3;pointer-events:none}
.learning-tools{display:flex;justify-content:center;align-items:center;gap:20px;margin:20px 0 4px}.forest-help{background:#eee4f4;border:1px solid #d5c3df;color:#635074;border-radius:14px;padding:11px 15px;min-height:42px;font-size:12px;font-weight:700;cursor:pointer}.learning-tools>span{font-size:10px;color:#82718d}.story-prompt{font:500 clamp(16px,2vw,21px)/1.55 var(--font-display);text-align:center;max-width:590px;margin:8px auto;color:#5c456d}.story-prompt strong{color:#996229}
.fillin-area{gap:10px}.fillin-display{font-size:28px;min-height:40px;padding:5px 12px;border-color:#d9c8dd}.numpad{max-width:330px;gap:7px}.num-key{height:43px;font-size:21px;border-radius:12px;background:#fffdf5;border-color:#d4c9d9;box-shadow:0 3px 0 #d1c5d2}.num-key.go{background:#c5dfb4}.num-key.del{background:#ebdfee}
.feedback{z-index:25;padding:22px;background:#fcf8eef5;backdrop-filter:blur(12px);overflow:auto;justify-content:center}.feedback-char{width:105px;height:110px;margin-bottom:6px}.feedback-text{font-family:var(--font-display);color:#493552;font-size:32px}.feedback-equation{color:#674e75;font-size:24px;margin-top:7px}.feedback-bonus{color:#697d51;font-size:12px}.feedback-streak{font-size:14px}.feedback .play-btn{font-size:16px;margin-top:17px}.feedback-emoji{font-size:36px}.feedback-teaching{max-width:430px;text-align:center;margin:12px auto}.teaching-copy{font-size:13px;line-height:1.7;color:#685a70;margin:12px auto}.fact-family{font:500 17px/1.7 var(--font-display);color:#69517a;background:#eee6f1;border-radius:14px;padding:10px;margin:12px 0}.dot-array{display:grid;grid-template-columns:repeat(var(--cols),1fr);gap:5px;width:max-content;margin:15px auto;padding:12px;border-radius:16px;background:#eceedd;max-width:100%}.dot-array i{width:clamp(9px,2.5vw,16px);height:clamp(9px,2.5vw,16px);border-radius:50%;background:#8cac7d;box-shadow:inset 0 2px 2px #fff7}.dot-array i:nth-child(even){background:#c9a860}.array-caption{font-size:10px;color:#8b7b92}
.forest-overlay[hidden]{display:none}.forest-overlay{position:absolute;inset:0;display:grid;place-items:center;z-index:90;background:#171023ba;backdrop-filter:blur(8px);padding:20px;border-radius:28px;overflow:auto}.forest-dialog{background:#fcf8ee;color:#4b395a;border-radius:28px;padding:30px;max-width:490px;width:100%;text-align:center;max-height:100%;overflow:auto;box-shadow:0 30px 80px #0005}.forest-dialog h2{font:500 28px var(--font-display);margin:5px 0 12px}.forest-dialog p{line-height:1.7;font-size:13px}.forest-dialog .eyebrow{color:#847051;font-size:9px}.dialog-symbol{font-size:48px;color:#ab854b}.forest-dialog>.play-btn{display:block;margin:20px auto 16px}.forest-dialog>.back-btn{background:none;border:0;box-shadow:none;font-size:12px}.small-note{font-size:10px!important;color:#8a7c90;margin-top:14px}
#expeditionCompleteScreen{justify-content:center}.exp-card{max-width:620px;border:1px solid #d5c6dc;background:#fffbf1;box-shadow:0 20px 60px #60416b19}.exp-title{color:#513c63;font-family:var(--font-display)}.rescue-banner{color:#a78642}.round-actions{display:flex;gap:12px;align-items:center;justify-content:center;margin-top:18px}.round-actions .back-btn{border:0;background:none;box-shadow:none;font-size:12px}.round-stars{font-size:40px;letter-spacing:12px;text-align:center;color:#ba8737;margin:10px 0}.round-stars .unearned{color:#d7d0c3}.round-note{font-size:12px;line-height:1.7;color:#74647f;text-align:center}.round-note strong{color:#657e51}.round-stamp{border:1px dashed #b7a773;border-radius:15px;padding:10px;margin:10px auto;color:#887133;font-size:12px;max-width:350px}
.journal-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin:22px 0}.journal-stat{padding:18px;border-radius:18px;background:#ffffff07;border:1px solid #fff2}.journal-stat strong{display:block;color:#f3dd99;font:500 30px var(--font-display)}.journal-stat span{font-size:10px;color:#c9bfce}.journal-label{font:500 21px var(--font-display);margin:10px 0 18px}.sticker-shelf{display:grid;grid-template-columns:repeat(6,1fr);gap:12px}.sticker{border:1px dashed #e4d8ef33;border-radius:18px;padding:16px 7px;text-align:center;background:#fff4e007;color:#9d8ea9}.sticker.earned{border-style:solid;border-color:#f6d98166;background:linear-gradient(140deg,#d1a74c19,#fff0)}.sticker span{display:block;font-size:32px;filter:grayscale(1);opacity:.35;margin-bottom:10px}.sticker.earned span{filter:none;opacity:1}.sticker strong{display:block;font:500 14px var(--font-display);color:#dfd2e6}.sticker small{display:block;font-size:9px;line-height:1.6;margin-top:5px}.clearing-stars{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.clearing-stars>div{display:flex;align-items:center;gap:12px;border-radius:15px;background:#fff1;padding:14px;font-size:12px}.clearing-stars b{margin-left:auto;font-weight:500;color:#f5d984;letter-spacing:2px}.journal-bottom{margin-top:20px;display:flex;justify-content:space-between;gap:20px;align-items:center}.journal-bottom p{font-size:11px;line-height:1.7;color:#c9bed2;max-width:520px}.journal-bottom .back-btn{font-size:11px;white-space:nowrap}
.screen-title{color:#4c365d}.back-btn{font-family:var(--font-ui);border:1px solid #d2c4dc;border-radius:15px;color:#655073;box-shadow:none}.back-btn:hover{background:#e9dfec;color:#4a325c}.corner-btn{font-family:var(--font-ui)}
.outfit-picker{background:#f9f3e8}.outfit-picker-title{color:#584263;font-family:var(--font-display)}
.screen.active .forest-copy{animation:forest-rise .65s var(--snap) both}.screen.active .forest-art{animation:forest-rise .9s var(--snap) .08s both}.screen.active .quest-tile{animation:forest-rise .7s var(--snap) backwards}.screen.active .quest-tile:nth-child(2){animation-delay:.08s}.screen.active .quest-tile:nth-child(3){animation-delay:.16s}
@keyframes forest-rise{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:translateY(0)}}
@keyframes forest-float{from{transform:translateY(-4px) rotate(-1deg)}to{transform:translateY(5px) rotate(1deg)}}
@keyframes forest-twinkle{from{opacity:.3;transform:scale(.8)}to{opacity:1;transform:scale(1.1)}}
body.calm *,body.calm *::before,body.calm *::after,body.page-asleep *,body.page-asleep *::before{animation:none!important;transition:none!important;scroll-behavior:auto!important}
body.calm .confetti,body.calm .sparkle-burst,body.calm .flying-mushroom{display:none}
@media(min-width:900px) and (min-height:900px){.forest-hero{min-height:440px}.forest-copy h1{font-size:84px}.home-quests{margin-top:8px}.quest-tile{min-height:125px}.forest-art{max-height:470px}}
@media(max-width:800px){.app{border-radius:23px}.screen{padding:22px}.forest-wordmark{font-size:18px}.forest-nav>div{gap:4px}.forest-icon{padding:9px 11px}.forest-hero{min-height:335px}.forest-art{min-height:330px}.forest-copy h1{font-size:58px}.forest-intro{font-size:12px}.eyebrow{font-size:8px;letter-spacing:1.5px}.forest-primary{min-width:196px;font-size:18px}.home-quests{gap:9px}.quest-tile{padding:13px 11px;gap:8px}.quest-symbol{font-size:26px}.quest-tile strong{font-size:16px}.quest-tile small{font-size:6px;letter-spacing:.8px}.quest-tile span span{font-size:9px}.trail-map{gap:5px}.clearing strong{font-size:12px}.clearing-icon{width:52px;height:52px;font-size:25px}.trail-settings{gap:10px}.segmented button{padding:9px;font-size:10px}.sticker-shelf{grid-template-columns:repeat(3,1fr)}.art-orbit{display:none}}
@media(max-width:600px){body{padding:49px 8px max(8px,env(safe-area-inset-bottom))}.app{height:calc(100dvh - 60px - env(safe-area-inset-bottom));border-radius:23px}.screen{border-radius:22px;padding:18px 16px}#titleScreen{padding:16px 18px}.forest-nav{gap:7px}.forest-wordmark{font-size:16px}.forest-wordmark span{display:none}.forest-icon{font-size:12px;padding:8px 10px;min-height:38px}.forest-nav .forest-icon span{display:none}.forest-hero{min-height:310px;flex:0 0 auto;grid-template-columns:1.06fr 1fr}.forest-copy{padding:26px 0 20px}.forest-copy h1{font-size:clamp(36px,9vw,53px);letter-spacing:-1px;margin:16px 0 12px}.forest-copy .eyebrow{max-width:140px;line-height:1.8;font-size:7px;letter-spacing:1.1px}.script-line{margin-left:9px}.forest-intro{font-size:10px;line-height:1.7}.forest-primary{font-size:16px;min-width:168px;padding:12px 16px;gap:12px;margin-top:17px}.gentle-note{font-size:8px;margin:13px 0 0 4px}.forest-art{min-height:280px;width:123%;margin-left:-12px;margin-top:25px;height:100%;border-radius:50%}.hero-costume{height:84%;width:90%;left:5%;bottom:13%}.forest-moon{width:58px;height:58px;top:14%;right:18%}.art-caption{display:none}.s1{font-size:15px;top:6%;left:35%}.s2{font-size:23px;right:13%}.s3{bottom:16%}.home-progress{padding:10px 12px;gap:8px;margin-bottom:14px;min-height:66px}.home-progress img{width:35px;height:42px}.home-progress strong{font-size:11px}.home-progress p{font-size:9px;line-height:1.5}.home-progress>span{font-size:16px}.home-quests{grid-template-columns:1fr;gap:9px}.quest-tile{min-height:80px;padding:13px 15px;gap:15px}.quest-tile strong{font-size:19px}.quest-tile small{font-size:7px;margin-bottom:5px;letter-spacing:1px}.quest-tile span span{font-size:10px;margin-top:3px}.quest-symbol{font-size:34px;width:30px;text-align:center}.quest-tile>b{align-self:center;font-size:18px}.home-footer{gap:12px;margin-top:8px}.home-footer button{font-size:10px}.home-footer>span{flex-basis:100%;margin:0;font-size:8px}.trail-heading{gap:12px}.trail-heading h2{font-size:25px}.trail-heading .forest-icon{font-size:10px;white-space:nowrap}.trail-sub{font-size:11px}.trail-map{grid-template-columns:repeat(3,1fr);gap:8px;padding:14px 8px;margin:18px 0;background-position:center}.clearing{padding:9px 5px}.clearing:nth-child(even){transform:none}.clearing strong{font-size:14px}.clearing-icon{width:47px;height:47px;font-size:24px;margin-bottom:8px}.clearing small{font-size:9px}.clearing-rating{margin-top:4px!important}.trail-settings{flex-direction:column;gap:13px;margin-bottom:16px}.segmented{width:100%}.segmented button{flex:1;font-size:11px}.setting-label{margin-bottom:6px}.quest-kinds{gap:7px}.kind-card{padding:12px 10px}.kind-card strong{font-size:15px}.kind-card p{font-size:9px}.kind-card span{display:block;margin-bottom:7px}.trail-go{flex-direction:column;align-items:stretch;margin-top:17px;gap:13px}.trail-go p{font-size:11px}.trail-go .play-btn{font-size:16px;margin-bottom:10px}#puzzleScreen{padding:13px 14px}.puzzle-mode-name{font-size:15px}.puzzle-mode-sub{font-size:10px}.puzzle-mode-avatar{width:35px;height:35px}.puzzle-header{min-height:38px;margin-bottom:4px}.trail-journey{gap:6px;margin-bottom:8px}.journey-dot{width:23px;height:23px;font-size:11px}.journey-count{font-size:9px;margin-left:3px}.rescue-meter{padding:6px 8px}.rescue-meter .req-chip{font-size:9px;padding:2px 5px}.potion-tray{gap:5px}.equation-card{padding:18px 8px;margin:7px 0 12px}.equation-display{font-size:34px;gap:5px;flex-wrap:nowrap}.eq-num{min-width:32px;padding:4px 5px}.eq-num.answer-slot{min-width:56px}.op-badge{margin-bottom:10px;font-size:8px}.mcq-btn{min-height:66px;font-size:29px;padding:12px}.learning-tools{gap:10px;margin-top:15px}.forest-help{font-size:11px;padding:9px 12px}.learning-tools>span{font-size:8px}.story-prompt{font-size:15px;margin:7px auto}.feedback{padding:18px}.feedback-char{width:90px;height:90px}.feedback-text{font-size:27px}.feedback-teaching{margin:6px auto}.teaching-copy{font-size:12px;margin:8px auto}.fact-family{font-size:15px;margin:8px 0}.dot-array{margin:10px auto;gap:4px;padding:10px}.feedback .play-btn{font-size:15px;margin-top:10px}.forest-dialog{padding:23px 18px}.forest-dialog h2{font-size:25px}.exp-card{padding:22px 15px}.round-actions{flex-direction:column;gap:10px}.round-actions .play-btn{font-size:16px}.round-stars{font-size:34px}.journal-stats{gap:8px;margin:19px 0}.journal-stat{padding:13px 10px}.journal-stat strong{font-size:26px}.journal-stat span{font-size:9px}.sticker-shelf{gap:9px}.sticker{padding:13px 7px}.sticker strong{font-size:13px}.sticker small{font-size:8px}.clearing-stars{grid-template-columns:repeat(2,1fr)}.clearing-stars>div{gap:7px;font-size:10px;padding:11px 9px}.clearing-stars b{font-size:10px}.journal-bottom{flex-direction:column;align-items:flex-start}.journal-label{font-size:20px}.forest-controls{right:12px;gap:5px}.forest-controls button{font-size:10px;padding:5px 9px}#anyaHomeBtn{font-size:10px!important;left:12px!important}.round-note{font-size:11px}}
@media(max-height:700px) and (min-width:601px){.forest-hero{min-height:290px;flex:none}.forest-art{min-height:290px}.forest-copy{padding:20px 0}.forest-copy h1{font-size:56px}.forest-nav{margin-bottom:5px}.home-quests .quest-tile{min-height:96px}.screen{overflow-y:auto}#puzzleScreen{padding-top:12px;padding-bottom:12px}.equation-card{padding:14px;margin:6px 0 12px}.mcq-btn{min-height:58px;padding:8px}.learning-tools{margin-top:14px}.trail-journey{margin-bottom:7px}.feedback-char{height:80px}.feedback-text{font-size:26px}.dot-array{gap:3px;padding:8px;margin:8px auto}.dot-array i{width:11px;height:11px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.confetti,.sparkle-burst{display:none}}

/* Headings receive navigation focus for announcements, not an interactive focus ring. */
h1[tabindex="-1"]:focus,h2[tabindex="-1"]:focus,.puzzle-mode-name[tabindex="-1"]:focus{outline:none}
.forest-companion{display:flex;align-items:center;justify-content:center;gap:15px;margin:22px auto 0;padding:12px 24px 0;max-width:600px;width:100%;min-height:128px;background:linear-gradient(180deg,#f0ead900,#dbe6d373),url(math-forest-scene.svg) center 80%/cover;border-radius:24px;overflow:hidden;flex-shrink:0}
.forest-companion>img{height:112px;width:75px;object-fit:contain;align-self:flex-end;filter:drop-shadow(0 5px 5px #43375222)}.forest-companion>div{text-align:center;flex:1}.forest-companion span{font-size:8px;letter-spacing:1.4px;color:#574e55;font-weight:700}.forest-companion p{font:500 17px/1.4 var(--font-display);color:#39304b;margin-top:6px}.companion-lights{display:flex;gap:8px;justify-content:center;margin:7px 0 12px}.companion-lights i{font-style:normal;color:#827d78;font-size:14px;opacity:.5}.companion-lights i.lit{color:#ffd772;opacity:1;text-shadow:0 0 8px #fff2b9}
@media(max-width:600px){.forest-companion{padding:10px 10px 0;gap:4px;min-height:108px;margin-top:21px}.forest-companion>img{height:94px;width:52px}.forest-companion span{font-size:6px;letter-spacing:1px}.forest-companion p{font-size:13px}.companion-lights{gap:6px}.companion-lights i{font-size:12px}}
@media(max-height:700px){.feedback.has-teaching{justify-content:flex-start;padding-top:22px}.forest-companion{min-height:92px}.forest-companion>img{height:84px}}
@media(max-width:600px){.forest-art{width:calc(100% + 12px);min-width:0}}
.mastery-card{cursor:pointer;font:inherit}.fact-coverage{font-size:9px;color:#706278;margin-top:7px}.ref-btn{animation:none;box-shadow:none}.ref-btn:active{box-shadow:none}
.screen:not(.active) *,.screen:not(.active) *::before,.screen:not(.active) *::after{animation-play-state:paused!important}
.feedback-text{background:none;-webkit-text-fill-color:#493552;text-shadow:none;filter:none}

/* Put achievable goals and a specific table choice beside the adventure controls. */
.table-focus-setting{margin:0 0 20px}.table-focus-setting .segmented{width:max-content;max-width:100%}
.rescue-practice-btn{border:1px solid #eed88b66;background:#ecd58c17;color:#f5dfa2;border-radius:12px;padding:10px 12px;min-height:42px;font-size:11px;font-weight:700;cursor:pointer;white-space:nowrap}
.rescue-practice-btn:hover{background:#ecd58c2b}
@media(max-width:600px){.home-progress{flex-wrap:wrap}.home-progress .progress-copy{flex-basis:calc(100% - 45px)}.home-progress .rescue-practice-btn{margin-left:43px;min-height:38px;font-size:10px;padding:8px 10px}.home-progress>span{margin-left:auto;font-size:14px}.table-focus-setting{margin-bottom:16px}.table-focus-setting .segmented{width:100%}}
/* Let longer phone screens scroll instead of squeezing cards into each other. */
#titleScreen > :not(.outfit-picker-overlay),#trailScreen > *{flex-shrink:0}
/* Give the hero its true content height. A fixed minimum plus flex:1 previously
   let the rescue panel cover the Play button at 1280 × 720. */
#titleScreen .forest-hero{flex:0 0 auto;height:auto;min-height:0;grid-template-columns:minmax(0,1.03fr) minmax(0,1fr)}
#titleScreen .forest-art{height:auto;align-self:stretch}
#titleScreen .forest-copy{min-width:0}
#titleScreen>.forest-hero,#titleScreen>.home-progress,#titleScreen>.home-quests,#titleScreen>.home-footer{flex-shrink:0}
#levelsScreen{background:none;color:var(--cream);align-items:stretch;gap:0}
#levelsScreen>*{flex-shrink:0}
.level-rule{font-size:12px;line-height:1.8;color:#d2c6dd;max-width:790px;margin:5px 0 20px}.level-rule strong{color:#f5e5b8}
.level-recommendation{display:flex;align-items:center;justify-content:space-between;gap:20px;background:linear-gradient(110deg,#efe0a21c,#c2e4c411);border:1px solid #e1cd814d;border-radius:22px;padding:20px 23px;margin-bottom:22px}
.level-recommendation small{display:block;font-size:9px;letter-spacing:1.5px;color:#c9bcdc;margin-bottom:7px}.level-recommendation strong{display:block;font:500 24px var(--font-display);color:#ffe7a6}.level-recommendation p{font-size:11px;color:#d6cbdf;line-height:1.6;margin-top:8px}.level-recommendation .play-btn{white-space:nowrap;flex-shrink:0}
.level-worlds{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.level-world{border:1px solid #dac7e430;border-radius:24px;padding:18px;background:linear-gradient(135deg,#3c335355,#2c3d3d55);overflow:hidden}
.level-world:nth-child(3n+2){background:linear-gradient(135deg,#56435b55,#352d4755)}.level-world:nth-child(3n){background:linear-gradient(135deg,#49492e44,#2f3b3e66)}
.level-world header{display:flex;gap:12px;align-items:center;margin-bottom:15px;min-height:60px}.level-world-icon{font-size:27px}.level-world header>div{flex:1}.level-world h3{font:500 22px var(--font-display);color:#fff0d9}.level-world header p{font-size:11px;line-height:1.5;color:#cfc4d7;margin-top:5px}.level-world header img{width:46px;height:65px;object-fit:contain;filter:drop-shadow(0 5px 6px #10071d66)}
.level-buttons{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.level-button{position:relative;min-height:110px;border:1px solid #e5d9e92b;background:#1711233b;color:var(--cream);border-radius:17px;padding:12px 5px;cursor:pointer;transition:transform .3s var(--pop),border-color .2s}
.level-button:hover{transform:translateY(-3px);border-color:#f3dda3aa}.level-number{display:grid;place-items:center;font-size:10px;font-weight:700;width:21px;height:21px;margin:0 auto 7px;border-radius:50%;background:#c8b4da1a;color:#dbd0e2}.level-button strong{display:block;font:500 26px var(--font-display);color:#efe7db}.level-button small{display:block;font-size:8px;font-weight:700;margin-top:7px;color:#c5b6d2;letter-spacing:.5px}.level-button.cleared{border-color:#a6cf8c70;background:#8caf7720}.level-button.cleared .level-number{background:#abd795;color:#284032}.level-button.cleared small{color:#f2d478;font-size:12px}.level-button.recommended{border-color:#efd38e;background:linear-gradient(160deg,#f0d37e29,#ede0b016);box-shadow:0 0 0 3px #f1d88d10}.level-button.recommended small,.level-button.recommended strong{color:#ffe39a}
.level-note{font-size:11px;line-height:1.8;color:#bdb0ca;margin-top:20px}
#levelCompleteScreen{justify-content:center;align-items:center;background:radial-gradient(circle at 50% 25%,#fff5ca,#f5f0e5 60%,#e6eee0)}
.level-result-card{width:100%;max-width:550px;background:#fffdf4d9;border:1px solid #dcccaf;border-radius:30px;padding:25px;text-align:center;box-shadow:0 20px 60px #35233b16}
.level-result-card .eyebrow{color:#9a7d49;font-size:9px}.level-result-card>img{height:145px;width:130px;object-fit:contain;filter:drop-shadow(0 10px 12px #45335122);margin:13px 0 4px}.level-result-card h2{font:500 clamp(27px,4vw,40px) var(--font-display);color:#493454}.level-result-card>p:not(.eyebrow){font-size:13px;line-height:1.7;color:#786181;margin-top:8px}.level-result-card>.play-btn{margin:23px 0 15px}.level-result-actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}.level-result-actions .back-btn{border:0;background:none;font-size:11px;padding:9px 10px}.level-count{font-size:12px!important;color:#745e79!important}.journey-dot.done{background:#bddeb0}
#puzzleScreen>.puzzle-header,#puzzleScreen>.trail-journey,#puzzleScreen>.rescue-meter,#puzzleScreen>.equation-card,#puzzleScreen>.learning-tools,#puzzleScreen>#mcqPanel,#puzzleScreen>#fillinPanel,#puzzleScreen>.story-prompt{flex-shrink:0}
@media(max-width:800px){.level-worlds{gap:12px}.level-world{padding:14px}.level-world h3{font-size:19px}.level-world-icon{font-size:23px}.level-buttons{gap:6px}.level-button strong{font-size:24px}}
@media(max-width:600px){#titleScreen .forest-hero{grid-template-columns:minmax(0,1.06fr) minmax(0,1fr)}.level-worlds{grid-template-columns:1fr}.level-recommendation{padding:16px;gap:15px;flex-direction:column;align-items:stretch}.level-recommendation strong{font-size:22px}.level-recommendation .play-btn{font-size:16px}.level-rule{font-size:11px;margin-bottom:15px}.level-world{padding:16px}.level-world h3{font-size:21px}.level-world header p{font-size:10px}.level-button{min-height:102px;padding:10px 3px}.level-button small{font-size:7px}.level-button strong{font-size:25px}.level-result-card{padding:22px 16px}.level-result-card>img{height:122px}.level-result-card>.play-btn{font-size:16px}.level-result-actions{gap:3px}.level-note{font-size:10px}.level-count{font-size:10px!important}.forest-primary{min-width:0;width:max-content;max-width:100%;font-size:16px!important}}
@media(max-height:600px){#levelCompleteScreen{justify-content:flex-start}.level-result-card>img{height:90px}}
