@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/dm-sans-400.ttf) format('truetype');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/dm-sans-500.ttf) format('truetype');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/dm-sans-600.ttf) format('truetype');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/dm-sans-700.ttf) format('truetype');
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 400;
  font-stretch: normal;
  font-display: swap;
  src: url(../fonts/fredoka-400.ttf) format('truetype');
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 500;
  font-stretch: normal;
  font-display: swap;
  src: url(../fonts/fredoka-500.ttf) format('truetype');
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 600;
  font-stretch: normal;
  font-display: swap;
  src: url(../fonts/fredoka-600.ttf) format('truetype');
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 700;
  font-stretch: normal;
  font-display: swap;
  src: url(../fonts/fredoka-700.ttf) format('truetype');
}

:root{--ink:#224a38;--green:#286c4b;--deep:#194b34;--cream:#fbfaf4;--lime:#e1ed9b;--yellow:#f4ca57;--muted:#68776a;--line:#e1e7dc}*{box-sizing:border-box}body{margin:0;background:var(--cream);color:var(--ink);font:17px/1.5 'DM Sans',sans-serif}h1,h2,h3,.brand,.button,.answer,.target-number{font-family:'Fredoka','Trebuchet MS',sans-serif}h1,h2,h3,p{margin:0}h1{font-size:clamp(36px,4.7vw,60px);font-weight:500;line-height:1.12;letter-spacing:-1.3px}h2{font-size:26px;font-weight:500;line-height:1.25}h3{font-size:22px;font-weight:500}em{font-style:normal;color:var(--green)}a{color:inherit;text-decoration:none}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #cc7918;outline-offset:5px}button[hidden],[hidden]{display:none!important}.site-header{height:100px;display:flex;align-items:center;gap:48px;max-width:1360px;padding:0 48px;margin:auto;border-bottom:1px solid var(--line)}.brand{font-size:29px;font-weight:600;display:flex;align-items:center;gap:4px;letter-spacing:-.6px}.brand>span:last-child{color:var(--green)}.brand-mark{background:var(--green);color:var(--lime);width:41px;height:41px;border-radius:13px;text-align:center;margin-right:8px;font-size:32px}.site-header nav{display:flex;gap:32px;margin-left:24px;height:100%;align-items:center}.site-header nav a{color:var(--muted);font-weight:600;font-size:15px;display:grid;align-items:center;height:100%;position:relative}.site-header nav a.active{color:var(--deep)}.site-header nav a.active:after{content:'';position:absolute;bottom:22px;left:0;right:0;height:3px;background:var(--green);border-radius:9px}.player-chip{margin-left:auto;border:1px solid var(--line);padding:10px 16px;border-radius:28px;font-weight:600;background:white;white-space:nowrap}.player-chip span{margin-left:16px}main{max-width:1264px;margin:auto;padding:0 32px}footer{text-align:center;font-size:13px;color:var(--muted);padding:40px 0}footer span{margin:0 12px;color:#a5ad79}.eyebrow{font-size:12px;letter-spacing:2px;font-weight:700;color:var(--green);margin-bottom:13px}.back{display:inline-block;font-size:14px;font-weight:600;padding:12px 0}.world-heading{display:flex;align-items:center;justify-content:space-between;padding:26px 0 32px;gap:20px}.world-heading .eyebrow{margin-top:15px}.world-heading h1{font-size:52px}.world-heading p{margin-top:12px;color:var(--muted)}.heading-leaf{font-size:38px;vertical-align:middle}.reward-pills{display:flex;gap:10px;margin-top:40px}.reward-pills>span{border:1px solid #e6dfbe;border-radius:24px;padding:10px 16px;font-size:14px;background:#fffdf3;white-space:nowrap}.world-layout{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:26px;align-items:start}.forest-map{border:1px solid #d7e3c9;border-radius:28px;background-color:#edf2dc;background-image:radial-gradient(circle at 14% 28%,#dde9b9 0,transparent 24%),radial-gradient(circle at 85% 68%,#dce8c4 0,transparent 25%);overflow:hidden;position:relative}.map-caption{display:flex;justify-content:space-between;padding:24px 28px;font-size:11px;letter-spacing:1px;font-weight:700;gap:10px}.map-caption>span+span{letter-spacing:0;color:var(--muted);font-size:12px;font-weight:500}.trail{position:relative;padding:10px 50px 36px;display:flex;flex-direction:column;align-items:center}.trail:before{content:'';position:absolute;top:80px;bottom:140px;left:calc(50% - 3px);border-left:7px dotted #c4d5a9}.trail-stop{display:flex;align-items:center;gap:22px;width:78%;position:relative;margin:16px 0;min-height:122px;z-index:1}.trail-stop:nth-child(4n+1){align-self:flex-start}.trail-stop:nth-child(4n+3){align-self:flex-end}.map-node{display:grid;place-items:center;width:108px;height:108px;border-radius:38%;font-size:50px;background:#fff8dd;border:6px solid white;box-shadow:0 7px 0 #d3dcb9,0 8px 20px #4a692011;position:relative;transition:transform .2s}.unlocked a.map-node:hover{transform:translateY(-5px) rotate(-4deg);box-shadow:0 11px 0 #c2d398}.trail-stop:first-child .map-node{background:#f6d87c;border-color:#fff9db}.node-label{padding:10px 15px;background:#edf2dcee;border-radius:15px}.node-label small{font-size:10px;letter-spacing:1.5px;font-weight:700;color:#6d8056}.node-label h2{font-size:21px;margin:2px 0 5px}.node-state{font-size:12px;font-weight:600;color:#4b693d}.locked .map-node{background:#e2e9d6;filter:grayscale(.7);box-shadow:0 6px 0 #ced8c0;border-color:#f4f7ea}.locked .node-label{color:#626f5c}.lock{position:absolute;bottom:-5px;right:-8px;font-size:18px;background:white;border-radius:50%;width:31px;height:31px;display:grid;place-items:center}.guide-card{background:#225b40;border-radius:25px;padding:27px 24px;color:#fff;text-align:center}.guide-avatar{display:block;font-size:74px;margin:5px 0 22px}.guide-card .eyebrow{color:#d4e7ae;font-size:10px}.guide-card h2{font-size:30px}.guide-card p{font-size:14px;line-height:1.8;color:#dfebdb;margin:17px 0 25px}.button{display:inline-flex;justify-content:center;align-items:center;gap:18px;min-height:53px;padding:13px 25px;border-radius:16px;border:0;font-size:18px;font-weight:500;transition:transform .15s}.button:hover{transform:translateY(-2px)}.primary{background:var(--green);color:#fff;box-shadow:0 4px 0 #184b34}.secondary{background:#edf2e4;color:var(--deep);border:1px solid #ccdac0}.guide-card .primary{background:#e3efab;color:#244834;font-size:15px;width:100%;padding:12px 10px;box-shadow:0 4px 0 #122f22}.panel{background:white;border:1px solid var(--line);border-radius:24px;padding:28px}.journey{margin-top:20px;padding:24px}.journey h3{font-size:19px}.progress-track{height:9px;background:#e8eddf;border-radius:20px;overflow:hidden;margin:20px 0 12px}.progress-track>span{display:block;height:100%;background:#8aaf59;border-radius:20px;transition:width .3s}.journey p{font-size:13px;color:var(--muted)}.legend{display:grid;gap:13px;border-top:1px solid var(--line);margin-top:20px;padding-top:20px;font-size:13px}.sidebar-note{font-family:'Fredoka',sans-serif;font-size:21px;line-height:1.55;text-align:center;color:#829071;margin:28px 0}.stars{color:#bd7d12;font-size:25px;letter-spacing:4px}.empty-stars{color:#929b87}.boss-stop{background:#f9f8ed;border:2px dashed #bbc9a2;display:flex;align-items:center;gap:20px;z-index:1;border-radius:22px;padding:24px;margin-top:25px;width:100%}.boss-stop>span{font-size:54px}.boss-stop small{font-size:10px;letter-spacing:1.5px}.boss-stop p{font-size:13px;margin:8px 0}.boss-stop h2{font-size:23px}.home-hero{text-align:center;padding:64px 0 16px;position:relative}.home-hero h1{font-size:clamp(45px,6vw,76px)}.home-hero>p{color:var(--muted);margin:24px 0 30px}.home-icons{font-size:58px;margin:26px 0 14px;letter-spacing:30px}.home-icons span{font-size:100px}.world-ticket{border:1px solid #d7e3c9;background:#edf2dc;border-radius:24px;max-width:500px;padding:24px;display:flex;align-items:center;text-align:left;gap:24px;margin:20px auto}.world-ticket>span{font-size:38px}.world-ticket>span:last-child{margin-left:auto;color:#90a355}.world-ticket small{font-size:10px;letter-spacing:1.5px}.world-ticket strong{font:500 27px 'Fredoka',sans-serif;display:block}.world-ticket p{font-size:14px;color:var(--muted)}.page-intro{text-align:center;padding:50px 0 30px}.page-intro p{color:var(--muted);margin-top:16px}.profile-grid{display:flex;justify-content:center;flex-wrap:wrap;gap:20px}.profile-card{display:grid;gap:12px;text-align:center;width:220px;border:1px solid var(--line);background:#edf2dc;border-radius:24px;padding:25px;color:var(--ink)}.profile-card>span{font-size:55px}.profile-card small{font-size:13px}.profile-form{max-width:480px;margin:28px auto}.profile-form h2{margin-bottom:20px}input[type=text],input:not([type]),select{display:block;width:100%;padding:12px 15px;border:1px solid #bbc9b2;border-radius:12px;background:#fff;color:var(--ink);margin:8px 0 20px;min-height:48px}fieldset{border:0;padding:0;margin:20px 0}.avatar-options{display:flex;gap:12px;margin-top:12px}.avatar-options input{position:absolute;opacity:0}.avatar-options span{display:block;padding:8px;font-size:35px;border:2px solid var(--line);border-radius:13px;cursor:pointer}.avatar-options input:checked+span{border-color:var(--green);background:#edf2dc}.avatar-options input:focus-visible+span{outline:3px solid #cc7918}.small{font-size:13px;color:var(--muted);margin-top:20px}.game-top{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:22px 0;font-size:12px;letter-spacing:1px}.game-shell{max-width:900px;margin:20px auto;text-align:center}.game-shell h1{font-size:44px}.mode-tabs{display:flex;justify-content:center;gap:6px;margin:24px auto;max-width:440px;background:#e9eedf;padding:6px;border-radius:17px}.mode-tabs a{flex:1;padding:10px;border-radius:12px;font-weight:600}.mode-tabs .selected{background:white;box-shadow:0 2px 6px #234a3710}.lesson{min-height:360px;padding:35px}.lesson h2{font-size:30px}.lesson p{margin:22px 0}.lesson .small{font-size:13px}.lesson form{max-width:300px;margin:20px auto}.lesson label{font-size:14px}.lesson-mascot{font-size:65px;margin-bottom:20px}.lesson-groups{display:flex;justify-content:center;gap:24px;margin:32px 0}.lesson-groups>div{background:#f1f4e7;border-radius:20px;padding:25px;font-size:30px}.lesson-groups strong{display:block;font-size:20px;margin-top:16px}.lesson-number{font-size:80px;margin-top:25px}.count-demo{display:flex;justify-content:center;gap:10px;margin-top:32px;flex-wrap:wrap}.count-demo button,.count-object{border:0;border-radius:12px;background:transparent;font-size:40px;padding:6px;min-width:52px;min-height:52px;color:var(--ink)}.count-demo small{display:block;font-size:18px}.counted{background:#e6edc7!important}.audio-placeholder{display:block;margin:25px auto 0;background:none;border:0;color:var(--muted);font-size:13px}.question-meta{display:flex;justify-content:space-between;margin-top:28px;font-weight:600;font-size:15px}.play-panel{background:white;border:1px solid var(--line);border-radius:28px;padding:36px 28px;margin-top:24px;min-height:430px}.play-panel h2{font-size:32px}.objects{display:flex;justify-content:center;align-content:center;align-items:center;flex-wrap:wrap;gap:12px;max-width:550px;margin:24px auto;font-size:36px;min-height:60px}.objects>span{display:inline-block}.answer-options{display:flex;justify-content:center;gap:15px;margin:28px 0 16px;flex-wrap:wrap}.answer{border:2px solid #dfe6d6;box-shadow:0 4px 0 #dfe6d6;background:#f8faf3;color:var(--ink);border-radius:20px;min-width:110px;min-height:85px;padding:18px;font-size:38px}.answer:hover:not(:disabled){border-color:#779c55;background:#f0f5dc}.answer.right{border-color:var(--green);background:#e7f0ca}.answer.tried:not(.right){border-style:dashed}.group-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.group-options .objects{font-size:30px;margin:10px 0;gap:8px}.empty-basket{min-height:95px;border:2px dashed #b3c49a;border-radius:18px}.target-number{font-size:80px;margin:15px auto 0;color:var(--green)}.sequence{display:flex;gap:12px;justify-content:center;margin:34px 0;flex-wrap:wrap}.sequence>span{display:grid;place-items:center;min-width:72px;min-height:78px;padding:12px;background:#eef3de;border-radius:16px;font:500 35px 'Fredoka',sans-serif}.sequence .missing{border:2px dashed var(--green);background:#fff8db}.blocks{display:flex;justify-content:center;gap:5px;flex-wrap:wrap;max-width:260px;margin:16px auto 0}.ten{width:14px;height:60px;background:repeating-linear-gradient(to bottom,#6e9a62 0 5px,#e1edcd 5px 6px);border:1px solid #507d45;border-radius:2px}.one{width:14px;height:14px;background:#d3a42e;border:1px solid #9f7818;border-radius:2px;align-self:end}#feedback{min-height:44px;font-weight:600;padding:8px;font-size:18px}.correct{color:var(--green)}.retry{color:#966017}.result{max-width:650px;margin:50px auto;text-align:center;padding:40px}.celebrate{font-size:65px;animation:pop .5s ease-out}.result h1{margin:12px 0}.result>p{margin:15px 0 25px;color:var(--muted)}.result .stars{font-size:54px}.result-score{font:500 76px 'Fredoka',sans-serif;margin-top:15px}.result-score span{font-size:30px;color:var(--muted)}.earned{background:#edf2dc;padding:12px;border-radius:14px;margin:20px 0}.result-actions{display:flex;flex-direction:column;gap:15px;max-width:320px;margin:auto}.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.metrics .panel{display:grid;gap:8px}.metrics strong{font:500 40px 'Fredoka',sans-serif}.metrics span{font-size:14px;color:var(--muted)}.skill-list{display:grid;gap:15px;margin-top:25px}.skill-row{display:grid;grid-template-columns:1fr auto;gap:20px}.skill-row h2{font-size:23px}.skill-row p{font-size:14px;color:var(--muted);margin-top:7px}.skill-row dl{grid-column:1/-1;display:flex;gap:28px;flex-wrap:wrap;border-top:1px solid var(--line);padding-top:15px;margin:0}.skill-row dt{font-size:12px;color:var(--muted)}.skill-row dd{margin:5px 0 0;font-size:15px;font-weight:600}.skip{position:absolute;top:-100px;left:20px;background:white;padding:15px;z-index:20}.skip:focus{top:10px}@keyframes pop{from{transform:scale(.7)}to{transform:scale(1)}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}@media(min-width:1500px){.world-heading{padding-top:40px}.forest-map{min-height:900px}}@media(max-width:950px){.site-header{padding:0 25px;gap:20px}.site-header nav{margin-left:0;gap:20px}.world-layout{grid-template-columns:minmax(0,1fr) 245px;gap:18px}.trail{padding:10px 24px 28px}.trail-stop{width:95%;gap:12px}.map-node{width:90px;height:90px;font-size:40px}.node-label h2{font-size:19px}.map-caption{padding:20px 16px;flex-direction:column}.guide-card{padding:24px 16px}.world-heading h1{font-size:43px}.reward-pills{flex-direction:column}.heading-leaf{display:none}}@media(max-width:700px){body{font-size:16px}.site-header{height:auto;min-height:85px;padding:16px 20px;flex-wrap:wrap;gap:12px}.brand{font-size:25px}.brand-mark{width:34px;height:34px;font-size:26px}.site-header nav{order:3;width:100%;justify-content:center;gap:50px;padding-top:5px}.site-header nav a{padding:8px}.site-header nav a.active:after{bottom:0}.player-chip{font-size:13px;padding:9px 12px;max-width:48%;overflow:hidden;text-overflow:ellipsis}.player-chip span{margin-left:5px}main{padding:0 18px}.world-heading{padding:15px 0 25px;display:block}.world-heading h1{font-size:42px}.world-heading .eyebrow{font-size:10px}.reward-pills{flex-direction:row;margin-top:20px}.world-layout{display:flex;flex-direction:column}.forest-map{width:100%;order:2}.adventure-sidebar{width:100%;order:1}.guide-card{display:none}.journey{margin:0;padding:18px}.journey .legend,.sidebar-note{display:none}.journey .progress-track{margin-top:12px}.map-caption{flex-direction:row;font-size:9px}.map-caption>span+span{font-size:10px}.trail{padding:5px 16px 24px}.trail-stop{width:90%;min-height:106px;margin:13px 0;gap:10px}.node-label{padding:8px}.node-label h2{font-size:20px}.node-label small{font-size:9px}.node-state{font-size:11px}.map-node{width:87px;height:87px}.boss-stop{padding:18px;gap:12px}.boss-stop>span{font-size:42px}.boss-stop h2{font-size:20px}.game-top{font-size:10px}.game-top .stars{font-size:19px}.game-top .back{font-size:12px}.game-shell h1{font-size:34px}.play-panel,.lesson{padding:25px 15px}.play-panel h2,.lesson h2{font-size:25px}.answer{min-width:64px;min-height:68px;font-size:30px;padding:12px}.answer-options{gap:12px}.group-options .objects{font-size:26px;gap:5px}.objects{gap:7px;font-size:31px}.count-object{font-size:29px}.sequence{gap:7px}.sequence>span{min-width:44px;min-height:58px;font-size:25px;padding:9px}.lesson-groups{gap:12px}.lesson-groups>div{padding:15px;font-size:23px}.result{padding:30px 20px;margin-top:30px}.metrics{grid-template-columns:1fr;gap:10px}.metrics .panel{padding:20px;grid-template-columns:100px 1fr;align-items:center}.metrics strong{font-size:30px}.skill-row{padding:22px;gap:15px}.skill-row dl{gap:18px}.home-hero{padding-top:40px}.home-icons{letter-spacing:10px;font-size:43px}.home-icons span{font-size:75px}.world-ticket{padding:18px;gap:14px}.world-ticket>span:last-child{display:none}.page-intro h1{font-size:36px}.profile-form{padding:22px}.profile-card{width:100%}.profile-grid form{min-width:calc(50% - 12px)}.profile-card small{font-size:11px}} 
/* First-number games: stable containers and roomy touch targets. */
.game-shell .button,.mode-tabs a{min-height:60px}.question-dots{font-size:23px;color:var(--green);letter-spacing:7px;margin:12px}.basket{border:2px solid #d5dfbd;border-bottom:7px solid #c3d49b;border-radius:18px 18px 30px 30px;background:#f6f8ed;padding:14px;min-height:100px}.basket:empty{background:linear-gradient(#fafbf5,#f0f4e5)}
#visual>.objects{min-height:130px;max-width:510px}.objects.grid,.objects.scattered{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.objects.row{display:flex;flex-wrap:wrap}.objects>span{font-size:32px;line-height:44px;min-width:0}.objects.scattered>*:nth-child(3n+1){transform:translateY(5px)}.objects.scattered>*:nth-child(3n+2){transform:translateY(-5px)}
.count-object{position:relative;min-width:60px;min-height:64px;font-size:33px;padding:5px}.count-object small{position:absolute;right:0;top:-5px;border-radius:50%;background:var(--green);color:white;width:25px;height:25px;font:700 17px/25px sans-serif}.counted{animation:pop .25s ease-out}.answer-options.group-options{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}.group-options .answer{min-width:0;padding:10px}.group-options .objects{grid-template-columns:repeat(5,minmax(0,1fr));padding:10px;gap:4px;min-height:112px}.group-options .objects>span{font-size:28px}.group-options .answer:nth-child(3):last-child{grid-column:1/-1;justify-self:center;width:calc(50% - 6px)}.group-options .same-answer{font-size:26px;min-height:70px}.answer.tried{animation:gentle-shake .3s}.celebrating{animation:pop .4s}.unlock-notice{animation:pop .5s}.lesson-compare{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:25px auto}.lesson-collection{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;font-size:32px}.lesson-compare .answer{min-width:0;padding:15px}.result-actions .button{width:100%}.audio-placeholder{min-height:44px;min-width:44px}.game-shell pre{white-space:pre-wrap;text-align:left;overflow-wrap:anywhere}.count-demo button{min-width:64px;min-height:70px}.game-top>span{letter-spacing:0}.lesson #lesson-feedback{min-height:30px}.lesson #lets-play{margin-top:15px}
@keyframes gentle-shake{25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}
@media(max-width:700px){.game-shell .answer{min-height:76px;min-width:70px}.answer-options.group-options{grid-template-columns:1fr}.group-options .answer:nth-child(3):last-child{grid-column:auto;width:100%}.group-options .objects{max-width:100%;margin:0;min-height:90px}.group-options .answer{min-width:0;padding:8px}.play-panel{padding:22px 12px}.objects.grid,.objects.scattered{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.group-options .objects{grid-template-columns:repeat(5,minmax(0,1fr));gap:3px}.group-options .objects>span{font-size:27px}.game-top{flex-wrap:wrap}.game-top .back{min-height:44px}.lesson-compare{gap:10px}.lesson-compare .answer{padding:10px;min-width:0}.answer-options{gap:10px}.game-shell .answer-options:not(.group-options){display:grid;grid-template-columns:repeat(2,minmax(70px,100px))}.lesson{padding:24px 14px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
/* Keep the current question close to the child's hands. */
.playing .site-header{height:68px;min-height:68px}.playing .site-header nav{display:none}.playing .game-top{margin:10px 0}.playing .game-shell{margin:10px auto}.playing .game-shell h1{font-size:34px}.playing .eyebrow{margin-bottom:6px}.playing .question-meta{margin-top:14px}.playing .question-dots{margin:5px}.playing .play-panel{margin-top:12px;padding:22px 20px;min-height:0}.playing .target-number{font-size:65px;margin:4px auto}.playing .answer-options{margin:16px 0 8px}.playing .audio-placeholder{margin:0 auto}.playing .three-groups{grid-template-columns:repeat(3,minmax(0,1fr))}.playing .three-groups .answer:nth-child(3):last-child{grid-column:auto;width:100%}.playing .group-options .objects{display:grid}.playing #visual>.objects{margin:14px auto}.playing footer{padding:20px 0}
@media(max-width:700px){.playing .site-header{padding:10px 18px}.playing .game-shell h1{font-size:29px}.playing .play-panel{padding:18px 12px}.playing .three-groups{grid-template-columns:1fr}.playing .group-options .objects{min-height:78px}.playing .group-options .answer{min-height:94px}.playing .target-number{font-size:54px}.playing .game-top{gap:8px}.playing .game-top .stars{font-size:16px}.playing .game-top>span{font-size:11px}.playing .question-meta{margin-top:10px}}
/* Phase 2: one shared, shape-based quantity model. */
.base-ten{display:flex;justify-content:center;align-items:flex-end;flex-wrap:wrap;gap:18px;margin:18px auto;max-width:440px;min-width:0}.ten-group,.one-group{display:flex;justify-content:center;gap:7px;flex-wrap:wrap;max-width:100%}.one-group{max-width:116px;align-items:flex-end}.ten-bar{display:block;width:20px;height:124px;border:2px solid #285d49;background:repeating-linear-gradient(to bottom,#b9d99c 0 10px,#285d49 10px 12px);flex:none;border-radius:3px}.one-cube{display:block;width:20px;height:20px;border:2px solid #74511b;background:#f4ce6d;flex:none}.bond-row,.comparison-row{display:flex;justify-content:center;gap:24px;align-items:center;margin:18px auto}.bond-dots{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;max-width:240px;margin:12px auto}.bond-dot{width:26px;height:26px;display:block;border:2px solid #245981;border-radius:4px;background:#97c9e9}.second .bond-dot{border-radius:50%;background:#efb6a8;border-color:#9a4c37}.bond-row.combined{gap:4px;border:2px solid #658747;border-radius:20px}.missing-group{font-size:44px;min-width:80px;border:2px dashed #658747;border-radius:18px}.bond-diagram{font:500 40px 'Fredoka',sans-serif;margin:18px}.bond-whole{border:2px solid #628951;border-radius:50%;width:65px;margin:auto}.bond-branches{letter-spacing:22px;padding-left:22px;line-height:1}.bond-parts{white-space:pre}.pair-caption{font-size:23px}.model-options{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}.model-options .answer{min-width:0;width:100%;padding:14px}.model-options .base-ten{gap:10px}.model-options .ten-group{gap:5px}.model-options .ten-bar{width:16px;height:104px;background:repeating-linear-gradient(to bottom,#b9d99c 0 8px,#285d49 8px 10px)}.quantity-card{flex:1;min-width:0;border:2px solid #dce5cf;border-radius:18px;padding:12px}.number-builder{width:100%;max-width:430px;display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:auto}.number-builder label{font-weight:700}.number-builder select{font-size:26px;min-height:60px;margin:8px 0}.build-preview,.number-builder>.button{grid-column:1/-1}.advanced-options:has(.number-builder){display:block!important}.marked-digit{background:#f9df8c;border-bottom:6px solid #74511b;border-radius:8px}.place-table{font:500 28px 'Fredoka',sans-serif;white-space:pre}.mango-pairs{display:flex;gap:12px;justify-content:center;margin:20px auto}.mango-row{display:grid;gap:2px;font-size:24px}.paired .mango-row>span{border-bottom:2px solid #628951}.paired .extra-mango{background:#f9df8c;border:2px dashed #74511b;border-radius:5px}#hint-text{font-size:18px;margin:12px auto;max-width:480px}.trail-stop .node-label{min-width:0}.count-trace{font-size:26px}.trail-stop .map-node{flex-shrink:0}
@media(min-width:701px){.trail{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 14px;padding:20px}.trail:before{left:50%;border-left:5px dotted #b9cc96;top:60px;bottom:70px}.trail-stop{width:100%;flex-direction:column;text-align:center;gap:8px;margin:0;min-height:185px}.trail-stop:nth-child(4n+3){grid-column:2}.trail-stop:nth-child(4n+4){grid-column:1;grid-row:auto}.trail-stop:nth-child(3){grid-row:2}.trail-stop:nth-child(4){grid-row:2}.trail-stop:nth-child(7){grid-row:4}.trail-stop:nth-child(8){grid-row:4}.node-label{padding:6px}.forest-map{min-height:0}}
@media(max-width:700px){.base-ten{gap:12px}.ten-bar{width:18px}.comparison-row{gap:8px;align-items:stretch}.quantity-card{padding:8px}.model-options{grid-template-columns:1fr!important}.bond-row{gap:12px}.bond-dot{width:23px;height:23px}.game-shell .advanced-options .answer{min-width:0}.number-builder .button{padding:12px}.trail-stop{width:95%}.node-label h2{overflow-wrap:anywhere}}
/* Number Forest: shared paths, patterns, estimates and clue cards. */
.number-line{display:flex;flex-wrap:wrap;justify-content:center;gap:7px;margin:28px auto 20px;padding:12px 0;max-width:100%;position:relative}
.line-stop{position:relative;display:grid;place-items:center;min-width:42px;min-height:52px;padding:8px 5px;border:2px solid #b8cc9d;border-radius:12px;background:#edf3dd;color:var(--deep);font:500 23px 'Fredoka',sans-serif}
button.line-stop{min-width:52px;min-height:60px;cursor:pointer}.line-stop.highlighted{border-color:#316144;background:#d6e9b3}.line-stop.missing,.forest-sequence .missing{border:2px dashed #507d45;background:#fff3c8}.frog{position:absolute;top:-27px;font-size:25px;animation:forest-hop .35s ease-out}.revealed{animation:pop .3s}.jump-caption{font-size:23px;color:var(--green);margin:16px}.forest-sequence{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:20px auto}.forest-sequence>span{display:grid;place-items:center;min-width:42px;min-height:58px;padding:8px;background:#edf3dd;border-radius:12px;font:500 27px 'Fredoka',sans-serif}.pattern-shape{font-size:17px;color:#b06733}.forest-sequence>span:nth-child(2n) .pattern-shape{color:#346878}
.sequence-options{display:flex!important;flex-direction:column;align-items:stretch;max-width:620px;margin-left:auto!important;margin-right:auto!important}.sequence-options .answer{padding:8px;min-width:0}.sequence-options .forest-sequence{margin:0;gap:5px}.sequence-options .forest-sequence>span{font-size:23px;min-width:33px;padding:5px;min-height:44px}
.estimate-row{display:flex;justify-content:center;align-items:flex-end;gap:24px;margin:22px auto;max-width:530px}.estimate-card{flex:1;min-width:0}.estimate-card>p{margin:8px!important;font-weight:600}.estimate-jar{display:flex;flex-wrap:wrap;justify-content:center;align-content:flex-end;gap:5px;max-width:185px;min-height:100px;margin:auto;padding:15px 10px;border:3px solid #759b94;border-top:9px solid #759b94;border-radius:16px 16px 35px 35px;background:#ecf6f3}.estimate-jar.large{max-width:225px;min-height:135px}.estimate-ball{display:block;width:17px;height:17px;flex:none;border-radius:50%;background:#edb74f;border:2px solid #9a691f;transform:translateY(var(--shift)) rotate(var(--turn))}
.detective-clues{display:grid;gap:12px;max-width:500px;margin:22px auto}.clue-card{background:#faf4df;border:2px solid #ddcda2;border-radius:15px;padding:16px;text-align:left;color:var(--deep);font-size:20px;min-height:60px}.clue-card.checked{background:#e4efcf;border-color:#67894c}.clue-card.checked:after{content:' ✓';color:#326143}.rounding-model{max-width:600px;margin:auto}.rounding-model .number-line{flex-wrap:nowrap;gap:0;justify-content:space-between}.rounding-model .line-stop{background:none;border:0;font-size:18px;min-width:0;padding:5px 0}.rounding-track{height:5px;background:#9eb982;margin:48px 15px 0;position:relative}.rounding-frog{position:absolute;bottom:4px;font-size:30px;transform:translateX(-50%);transition:left .55s ease-out}.rounding-model .number-line{margin:0 5px 20px;padding:0}.skip-groups{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-end;gap:20px;margin:20px auto}.skip-groups>div{flex:1;min-width:100px}.group-icons{font-size:26px;overflow-wrap:anywhere}.skip-groups strong{display:block;font-size:24px}.master-emblem{font-size:85px;margin:25px}.skill-badge{font-size:14px;color:var(--muted)}.world-complete{border:3px solid #aab76d;background:linear-gradient(150deg,#fffdf2,#edf6db)}.world-complete .celebrate{animation:forest-hop .65s ease-out 2}.world-complete-notice{background:#eaf2d4;border-radius:18px;padding:18px;margin-bottom:20px;text-align:center}.trail-stop:last-child .map-node{background:#f7e4a4;border-color:#ac8837}.trail-stop:last-child .node-label small{color:#83651a}
@keyframes forest-hop{0%{transform:translateY(0)}50%{transform:translateY(-15px)}100%{transform:translateY(0)}}
@media(min-width:701px){.trail{grid-template-columns:repeat(2,minmax(0,1fr))}.trail-stop{grid-row:var(--trail-row)!important;grid-column:var(--trail-col)!important}.trail-stop:last-child{grid-column:1 / -1!important}.trail-stop:nth-child(4n+1):not(:last-child):after,.trail-stop:nth-child(4n+3):not(:last-child):after{content:'';position:absolute;width:50%;border-top:4px dotted #b9cc96;top:48px;left:75%;z-index:-1}.trail-stop:nth-child(4n+3):not(:last-child):after{left:-25%}}
@media(max-width:700px){.number-line{gap:6px}.line-stop{min-width:37px;font-size:21px}.estimate-row{gap:10px}.estimate-jar{padding:12px 6px;gap:4px}.estimate-ball{width:15px;height:15px}.estimate-card>p{font-size:14px}.forest-sequence{gap:5px}.forest-sequence>span{font-size:23px;min-width:34px;padding:6px}.clue-card{font-size:18px;padding:13px}.sequence-options .forest-sequence>span{font-size:20px;min-width:28px;padding:4px}.question-dots{font-size:18px;letter-spacing:4px}.rounding-model .line-stop{font-size:16px}.game-shell .forest-options:not(.sequence-options){grid-template-columns:repeat(2,minmax(70px,120px))}.skip-groups{gap:10px}.skip-groups>div{min-width:80px}.group-icons{font-size:21px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* Connect the alternating rows into one continuous winding journey. */
@media(min-width:701px){.trail:before{display:none}.trail-stop:nth-child(odd):not(:last-child):after{left:50%;width:calc(100% + 14px);top:48px}.trail-stop:nth-child(4n+3):not(:last-child):after{left:calc(-50% - 14px)}.trail-stop:nth-child(even):after{content:'';position:absolute;top:48px;left:50%;height:calc(100% + 24px);border-left:4px dotted #b9cc96;z-index:-1}.trail-stop:nth-child(18):after{width:calc(50% + 7px);height:calc(100% - 8px);left:calc(-7px);border-left:0;border-right:4px dotted #b9cc96;border-bottom:4px dotted #b9cc96;border-bottom-right-radius:35px}.node-label{position:relative;background:#edf3df;border-radius:15px}.node-wrap{z-index:1}}
.line-stop.right{background:#d6e9b3;border-color:#316144}
/* Addition village uses the shared cards, trail, buttons and celebrations. */
.arithmetic-sentence{display:flex;justify-content:center;align-items:center;gap:clamp(8px,3vw,24px);font-size:clamp(30px,6vw,58px);font-weight:800;margin:20px 0}.arithmetic-groups{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:14px;margin:20px auto}.arithmetic-basket{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;max-width:330px;padding:15px;border:2px dashed #487a61;border-radius:22px;background:#fffdf2}.arithmetic-object{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:48px;min-height:48px;font-size:32px;border:0;border-radius:12px;background:transparent}.arithmetic-object.taken{opacity:.35;transform:translateY(-5px)}.arithmetic-object.taken:after{content:'×';position:absolute;color:#293d31;font-size:52px}.arithmetic-support{margin:16px auto}.arithmetic-support>.button{margin:10px}.arithmetic-sign,.empty-quantity{font-size:32px;font-weight:800}.world-choice{max-width:760px;margin:24px auto;padding:24px}.village-map{background:#fff8e8}.world-choice p{margin:10px 0}@media(max-width:480px){.arithmetic-basket{max-width:250px;padding:10px;gap:6px}.arithmetic-object{font-size:28px}.arithmetic-support .bond-diagram{max-width:100%}}@media(prefers-reduced-motion:no-preference){.arithmetic-object{transition:opacity .25s,transform .25s}}
.reward-pills{flex-wrap:wrap;max-width:100%}.village-map .node-label{background:#fff8e8}@media(min-width:701px){.village-map .trail-stop:last-child{grid-column:var(--trail-col)!important}.village-map .trail-stop:last-child:after{display:none}}
/* Make room for the independent Practice Lab navigation entry. */
@media(max-width:700px){.site-header nav{gap:16px}.site-header nav a{padding:8px 4px}}
@media(max-width:420px){.site-header nav{gap:8px}.site-header nav a{white-space:nowrap;font-size:14px}}

/* World 3: a warm picnic blanket, with countable local emoji objects. */
.picnic-map{background-color:#fff0d8;background-image:linear-gradient(90deg,#f5bb8730 50%,transparent 50%),linear-gradient(#f5bb8730 50%,transparent 50%);background-size:64px 64px}
.picnic-map .map-node{background:#ffe2a8;border-color:#bf682c}
.picnic-groups{display:flex;flex-wrap:wrap;justify-content:center;gap:14px;margin:14px 0;max-width:100%}
.picnic-basket{border:3px solid #aa6b3b;border-radius:18px;background:#fff6e5;padding:12px;display:flex;flex-wrap:wrap;gap:6px;align-content:center;justify-content:center;width:146px;min-height:96px;max-width:100%}
.picnic-basket>.button{width:100%;font-size:14px;min-height:44px;padding:8px}
.picnic-object{font-size:32px;line-height:1.3;display:inline-flex;align-items:center;justify-content:center;min-width:36px;min-height:40px}
button.picnic-object{border:2px solid transparent;border-radius:12px;background:#fff;min-width:46px;min-height:46px;cursor:pointer}
.picnic-object.selected{border-color:#246448;background:#cbf0d8;outline:3px solid #246448}
.picnic-pool{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.picnic-options{display:flex;flex-wrap:wrap;justify-content:center;align-items:stretch}
.picnic-options>.answer{min-height:64px;max-width:100%;white-space:normal}
.picnic-options .picnic-groups{gap:6px}.picnic-options .picnic-basket{width:110px;padding:6px}.picnic-options .picnic-object{font-size:28px;min-width:30px}
.picnic-trace{font-size:22px;color:#246448}.picnic-trace p{margin:12px 0}.picnic-term{display:inline-block;padding:4px 8px;border-radius:8px}
.picnic-highlight,.picnic-term{animation:picnic-pulse 1s ease both}.counting-groups>.picnic-groups>.picnic-basket{border-color:#246448;border-width:4px}
@keyframes picnic-pulse{50%{background:#ffe077;box-shadow:0 0 0 4px #e8ad32}}
@media(max-width:600px){.picnic-options{flex-direction:column}.picnic-options>.answer{width:100%}.picnic-basket{width:126px;padding:8px}.picnic-options .picnic-basket{width:100px}.picnic-object{font-size:30px}}
@media(prefers-reduced-motion:reduce){.picnic-highlight,.picnic-term{animation:none;background:#fff0b3}}
.game-shell .answer-options.picnic-options:not(.group-options){display:flex;grid-template-columns:none}
@media(max-width:600px){.game-shell .answer-options.picnic-options:not(.group-options){flex-direction:column}.picnic-options>.answer{font-size:26px}}
/* Keep Phase 2 on the same trail, with a visible handover after the picnic. */
.phase-bridge{font-size:16px;line-height:1.45;padding:12px;background:#fff7d8;border:2px solid #bf682c;border-radius:14px}
.picnic-map .trail-stop:nth-child(n+7) .map-node{background:#dcecdf;border-color:#397659}
.picnic-map .trail-stop:nth-child(n+7) .node-label{background:#f4f8e8}
.multiplication-bridge{border-top:2px dashed #aa6b3b;margin-top:20px;padding-top:12px}
.multiplication-help:empty{display:none}.toy-shop-story{padding:12px;border-radius:14px;background:#fff0cb}
#hint-text .picnic-groups,#lab-hints .picnic-groups{margin:12px 0}
.picnic-basket small{flex-basis:100%;font-size:16px;color:#355b43}
@media(min-width:701px){.picnic-map .trail-stop:last-child{grid-column:var(--trail-col)!important}.picnic-map .trail-stop:last-child:after{display:none}}
/* Sharing continues the trail with the same touch-sized group components. */
.picnic-map .trail-stop:nth-child(n+13) .map-node{background:#fce1e6;border-color:#aa5269}
.picnic-map .trail-stop:nth-child(n+13) .node-label{background:#fff4ed}
#hint-text .picnic-basket,#lab-hints .picnic-basket{overflow-wrap:anywhere}
.sharing-loose>.picnic-basket{width:100%;max-width:520px;border-style:dashed}
/* Maths Fair keeps the existing baskets large enough to count on small screens. */
.picnic-map .trail-stop:nth-child(n+19) .map-node{background:#e6dffa;border-color:#7153a1}
.picnic-map .trail-stop:nth-child(n+19) .node-label{background:#f5efff}
#prompt,#lab-prompt{white-space:pre-line}
.mixed-options{width:100%;flex-direction:column}.mixed-options .answer{min-width:0;width:100%;font-size:clamp(20px,4vw,28px)}
.mixed-options .picnic-groups{gap:8px}.mixed-options .picnic-basket{width:112px;min-height:84px}.mixed-options .picnic-object{font-size:28px;min-width:30px}
.operation-choice{padding:20px!important;min-height:88px!important}.mixed-step{font-size:20px;margin:8px 0}
.mixed-options [hidden]{display:none!important}.mixed-support:empty{display:none}
@media(min-width:768px){.mixed-options:has(>.mixed-picture){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}.mixed-options>.mixed-picture:last-child{grid-column:1/-1}}
.mixed-options>.mixed-picture{padding:10px!important}
.mixed-options .mixed-picture .picnic-basket{width:calc(50% - 4px);max-width:112px}
.mixed-support .picnic-basket{width:calc(50% - 7px);max-width:146px}
/* Shape Town: local geometric town illustrations and shared SVG learning models. */
.shape-town-card,.shape-town-map{background:#eef7fa}.shape-town-map{background-image:radial-gradient(circle at 90% 8%,#ffe6a6 0 55px,transparent 56px),linear-gradient(#e3f3fa,#faf0dc)}
.town-skyline{display:flex;justify-content:center;align-items:flex-end;gap:24px;padding:35px 16px 0;height:155px;overflow:hidden}
.town-skyline i{position:relative;display:block;width:90px;height:75px;background:#e8a387;border:3px solid #785b54;border-radius:6px 6px 0 0}
.town-skyline i:before{content:'';position:absolute;top:-37px;left:-3px;width:90px;height:35px;background:#658eaa;clip-path:polygon(50% 0,100% 100%,0 100%)}
.town-skyline i:after{content:'';position:absolute;left:28px;top:15px;width:28px;height:28px;background:#fff4b8;border:3px solid #785b54}
.town-skyline i:nth-child(2){height:105px;background:#93b7a7}.town-skyline i:nth-child(2):after{border-radius:50%}.town-skyline i:nth-child(3){height:65px;background:#cab8de}.town-skyline i:nth-child(3):after{height:40px;top:20px}
.shape-town-map .map-node{background:#fff;border-color:#fff;box-shadow:0 7px 0 #9fb8c5}.shape-town-map .node-label{background:#fff8ee}.shape-town-map .trail-stop:after,.shape-town-map .trail:before{border-color:#87a6b7}
.town-node-shape{width:55px;height:55px;background:#f1b854;border:3px solid #756045}.town-shape-0{border-radius:50%}.town-shape-1{clip-path:polygon(50% 0,100% 100%,0 100%);background:#7badbd;border:0}.town-shape-2{transform:rotate(45deg);width:42px;height:42px;background:#cc9fb9}.town-shape-3{height:36px;background:#94bda4}.town-stage{position:absolute;bottom:-8px;right:-8px;width:34px;height:34px;border-radius:50%;background:#fff;color:#294c4b;border:2px solid #87a6b7;font-size:20px}
.shape-drawing{display:inline-block;max-width:100%;vertical-align:middle;line-height:0;flex-shrink:1}.shape-drawing svg{width:100%;height:auto;display:block}.shape-drawing:is(button){background:white;border:2px solid #b7cdd4;border-radius:20px;min-width:72px;padding:4px}.shape-side,.shape-corner{visibility:hidden}.shape-side.shown,.shape-corner.shown{visibility:visible;animation:shape-mark .3s}.shape-outline.traced{stroke-width:5;stroke-dasharray:8 3;animation:shape-trace 1s linear}.shape-visual{margin:10px auto}.shape-options,.game-shell .answer-options.shape-options:not(.group-options){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;max-width:540px;margin:16px auto;justify-content:center}.shape-options>.shape-choice{min-width:0;width:100%;padding:8px;min-height:110px;white-space:normal;font-size:24px}.shape-choice.selected{outline:4px solid #cc7918;outline-offset:2px}.shape-choice .shape-drawing{max-width:100%}.shape-counter{display:flex;flex-direction:column;align-items:center;gap:8px}.shape-count-trace{font-size:24px;min-height:36px}.shape-sort-box{display:flex;flex-wrap:wrap;margin:auto;max-width:360px;width:100%;border:3px dashed #53788b;background:#edf6fa;font-size:20px;gap:5px}.shape-sort-box .shape-drawing{flex:none}.shape-compare{display:flex;justify-content:center;align-items:center;max-width:100%}.shape-compare .shape-drawing{max-width:50%}
.shape-scene{position:relative;display:block;width:240px;max-width:100%;margin:auto;line-height:0;background:#edf5f5;border-radius:24px}.shape-scene .scene-detail{position:absolute;pointer-events:none}.scene-clock .scene-detail{left:46%;top:28%;height:24%;width:20%;border-left:4px solid #294c4b;border-bottom:4px solid #294c4b}.scene-sign .scene-detail{left:45%;top:79%;height:20%;border-left:6px solid #294c4b}.scene-window .scene-detail{left:23%;top:25%;height:50%;width:46%;background:linear-gradient(transparent 46%,#294c4b 47% 52%,transparent 53%),linear-gradient(90deg,transparent 46%,#294c4b 47% 52%,transparent 53%)}.scene-door .scene-detail{width:7px;height:7px;border-radius:50%;background:#294c4b;left:70%;top:51%}.scene-flag .scene-detail{height:62%;left:14%;top:17%;border-left:4px solid #294c4b}.scene-book .scene-detail{height:37%;top:31%;left:23%;border-left:4px solid #294c4b}.scene-plate .scene-detail{width:45%;height:49%;left:24%;top:25%;border:2px solid #294c4b;border-radius:50%}.scene-tile .scene-detail{inset:20%;border:2px dashed #294c4b}
@keyframes shape-mark{from{opacity:.3}to{opacity:1}}
@keyframes shape-trace{from{stroke-dashoffset:100}to{stroke-dashoffset:0}}
@media(min-width:701px){.shape-town-map .trail-stop:last-child{grid-column:var(--trail-col)!important}.shape-town-map .trail-stop:last-child:after{display:none}}
@media(max-width:700px){.shape-town-map .trail{padding:10px 12px 25px}.shape-town-map .trail-stop{width:100%;gap:12px}.shape-town-map .map-node{width:78px;height:78px}.shape-town-map .node-label{padding:10px}.shape-town-map .node-label h2{font-size:20px}.shape-options,.game-shell .answer-options.shape-options:not(.group-options){gap:10px}.shape-options>.shape-choice{min-width:0;min-height:98px;padding:4px}.shape-choice .shape-drawing{max-width:100%}}
@media(prefers-reduced-motion:reduce){.shape-outline.traced,.shape-side.shown,.shape-corner.shown{animation:none}}

/* Fraction Forest shares the existing trail, panels and native answer controls. */
.fraction-forest-map{background:linear-gradient(160deg,#e0eedc,#e9e0f3 65%,#f7eedb);border:2px solid #bbd0b1}
.fraction-picnic{text-align:center;font-size:clamp(26px,6vw,54px);padding:24px 8px}
.fraction-forest-card{background:#eaf1e3}
.fraction-forest-map .map-node{background:#e0c8ea;border-color:#688367}
.fraction-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-width:650px;margin:20px auto}
.fraction-choice{min-width:0;min-height:100px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:10px;font-size:clamp(18px,3vw,26px)}
.fraction-shape{max-width:100%;height:auto;vertical-align:middle}
.fraction-caption{font-size:16px;font-weight:600}
.fraction-choice:focus-visible{outline:4px solid #67458b;outline-offset:3px}

.fraction-compare{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:12px}
.fraction-lesson-card{max-width:100%;flex:0 1 190px;text-align:center}
.fraction-lesson-card p{margin:4px 0}
.fraction-equation{font-size:clamp(24px,5vw,34px);font-weight:800;color:#416957}
.fraction-build{display:block;max-width:480px;margin:16px auto}
.fraction-selector{text-align:center;max-width:100%}
.fraction-part-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px auto;max-width:320px}
.fraction-part{min-height:48px;min-width:0}
.fraction-part[aria-pressed=true]{background:#416957;color:#fff;border-color:#416957}
.fraction-part:focus-visible,.fraction-check:focus-visible{outline:4px solid #67458b;outline-offset:3px}
.fraction-part-number{font-size:18px;fill:#172d25;paint-order:stroke;stroke:#fffaf0;stroke-width:3px;font-weight:800}
.fraction-selection-status{font-size:17px}
@media(max-width:390px){.fraction-options{gap:10px}.fraction-choice{padding:6px}.fraction-caption{font-size:14px}.fraction-compare{gap:6px}.fraction-lesson-card{flex-basis:170px}}
/* Override the shared small-number answer grid for countable fraction diagrams. */
.game-shell .answer-options.fraction-options:not(.group-options){grid-template-columns:repeat(2,minmax(0,1fr));max-width:650px;margin:20px auto}
.game-shell .answer-options.fraction-build:not(.group-options){display:block;max-width:480px;margin:16px auto}
.fraction-build .fraction-selector{width:100%}
@media(max-width:390px){.fraction-part{padding:10px}.fraction-check{padding:13px 16px}}

/* Keep the first adventure aligned with the shared home-world card width. */
.world-ticket{width:100%;max-width:760px}

/* Keep audio controls in the header, clear of the learning material. */
.site-header.has-sound{gap:24px}
.header-actions{display:flex;align-items:center;gap:12px;margin-left:auto;min-width:0}
.header-actions .player-chip{margin-left:0}
.header-actions .sound-toggle{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;min-height:44px;margin:0;padding:10px 14px;border:1px solid #ccdac0;border-radius:999px;background:#edf2e4;color:var(--deep);font-size:13px;font-weight:600;white-space:nowrap}
.header-actions .sound-toggle:hover{background:#e4ecd9}
@media(max-width:1050px) and (min-width:701px){.site-header.has-sound{gap:16px;padding-left:25px;padding-right:25px}.has-sound nav{gap:16px;margin-left:0}.header-actions{gap:8px}.header-actions .player-chip{max-width:150px;overflow:hidden;text-overflow:ellipsis}}
@media(max-width:800px){.site-header.has-sound{height:auto;flex-wrap:wrap;gap:12px;padding-top:12px;padding-bottom:12px}.has-sound nav{order:3;width:100%;justify-content:center}.header-actions .player-chip{max-width:180px;overflow:hidden;text-overflow:ellipsis}}
@media(max-width:540px){.has-sound .header-actions{width:100%;justify-content:space-between}.header-actions .player-chip{max-width:58%}}
/* Same-size comparison frames stay readable; narrow screens stack whole cards. */
.fraction-comparison{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-start;gap:16px;margin:18px auto;max-width:100%}
.fraction-comparison-card{flex:0 0 216px;max-width:100%;padding:8px;border:2px solid #b8cbb9;border-radius:18px;background:#fffdf5;text-align:center}
.fraction-comparison .fraction-shape,.fraction-order-card .fraction-shape{display:block;width:200px;height:200px;max-width:100%;margin:auto}
.fraction-card-name{display:block;font-weight:700;font-size:18px;margin:4px 0!important}
.fraction-highlight [data-part]:not([fill="#fffaf0"]){stroke-width:5;stroke-dasharray:5 2}
.game-shell .answer-options.fraction-order:not(.group-options){display:block;max-width:920px;margin:16px auto}
.fraction-order-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;max-width:600px;margin:auto}
.fraction-order-card{display:flex;flex-direction:column;align-items:center;white-space:normal;min-width:0;padding:10px;border:2px solid #b8cbb9;background:#fffdf5;color:#284c3a}
.fraction-order-card[aria-pressed=true]{border:3px solid #416957;background:#edf4df}
.fraction-order-position{font-size:15px;margin-top:10px;min-height:38px;line-height:1.3}
.fraction-order-slots{display:flex;flex-wrap:wrap;justify-content:center;gap:12px 30px;padding:15px 30px;background:#edf4df;border-radius:14px;font-size:17px}
.fraction-order-card:focus-visible,.fraction-order-check:focus-visible{outline:4px solid #67458b;outline-offset:3px}
@media(max-width:540px){.fraction-order-cards{grid-template-columns:1fr}.fraction-comparison{flex-direction:column;align-items:center}.fraction-comparison-card{flex-basis:auto;width:216px}.fraction-order-slots{display:block;text-align:left}.fraction-order-slots li{padding:5px}}

/* Shared touch feedback and contained sharing groups. */
.sharing-bank,.sharing-destinations{margin-top:20px}
.sharing-bank{padding:16px;border:1px solid var(--line);border-radius:18px;background:#f8faf3}
.sharing-label{font-size:18px;margin-bottom:12px}
.sharing-helper{font-weight:600;margin:16px 0!important}
.sharing-remaining,.group-count{font-size:14px;color:var(--muted)}
.sharing-remaining{margin:12px 0 0!important}
.group-card{align-content:start;cursor:pointer}
.group-objects{display:flex;flex-wrap:wrap;justify-content:center;align-content:start;gap:8px;width:100%;min-height:48px;padding:4px 0}
.group-count{width:100%}
button.picnic-object{position:relative;min-width:48px;min-height:48px;transition:transform 150ms,box-shadow 150ms,background 150ms}
button.picnic-object.selected{border-color:var(--green);outline:3px solid var(--green);outline-offset:1px;background:#e1ed9b;box-shadow:0 0 0 6px #286c4b26,0 4px 8px #224a3826;transform:scale(1.04);z-index:1}
button.picnic-object.selected:after{content:'✓';position:absolute;top:-8px;right:-6px;width:20px;height:20px;border-radius:50%;background:var(--green);color:white;font-size:14px;line-height:20px}
.awaiting-object .group-card{border-style:dashed;border-color:var(--green)}
.fraction-part,.fraction-order-card{transition:transform 150ms,box-shadow 150ms}
.fraction-part[aria-pressed=true],.fraction-order-card[aria-pressed=true]{outline:3px solid var(--green);outline-offset:2px;box-shadow:0 0 0 6px #286c4b26;transform:scale(1.04)}
.fraction-build-drawing [data-part].selected{stroke:var(--green);stroke-width:5;stroke-dasharray:7 3}
/* A definite frame prevents SVG intrinsic dimensions from sizing the answer. */
.answer-card__visual{display:flex;align-items:center;justify-content:center;width:100%;min-width:0;aspect-ratio:1;max-width:170px}
.answer-card__visual .fraction-shape{display:block;width:100%;max-width:100%;height:auto;max-height:100%;flex:0 1 auto}
.fraction-choice{gap:8px}
.fraction-comparison .fraction-shape,.fraction-order-card .fraction-shape{height:auto;aspect-ratio:1}

@media(max-width:600px){
 .game-shell{--activity-gap:16px;--activity-section:24px;margin:24px auto;padding-bottom:calc(16px + env(safe-area-inset-bottom))}
 .playing .game-top{margin:16px 0 24px}
 .playing .game-shell{margin:24px auto}
 .game-shell .eyebrow,.playing .eyebrow{margin-bottom:12px}
 .game-shell h1,.playing .game-shell h1{font-size:clamp(28px,7.5vw,36px);line-height:1.15}
 .game-shell .question-meta{margin-top:24px;gap:12px}
 .game-shell .question-dots{margin:12px 0 24px;font-size:20px;letter-spacing:5px;overflow-wrap:anywhere}
 .game-shell .play-panel,.game-shell .lesson{padding:24px 14px;margin-top:24px;min-height:0;height:auto}
 .game-shell .play-panel h2,.game-shell .lesson h2{font-size:clamp(23px,6vw,28px);line-height:1.3}
 #visual:not(:empty),#lesson-visual:not(:empty){margin-top:16px}
 .game-shell .answer-options{margin-top:24px;margin-bottom:16px}
 .game-shell .audio-placeholder{position:static;display:flex;width:max-content;max-width:100%;min-height:44px;margin:24px auto 0;padding:10px 16px}

 .game-shell #feedback:not(:empty){margin:16px 0}
 .game-shell #next{margin-top:8px}
 .game-shell #hint-text:not(:empty){margin-top:16px}
 .group-container{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0 0}
 .group-container>.group-card{width:100%;min-width:0;padding:8px;gap:8px}
 .group-container>.group-card:last-child:nth-child(odd){grid-column:1/-1;width:calc((100% - 12px)/2);justify-self:center}
 .group-card>.button{min-height:48px}
 .group-objects{gap:6px}
 .sharing-bank{padding:12px 8px}
 .game-shell .answer-options.picnic-options:not(.group-options){display:flex}
 .picnic-options>.button{max-width:100%;white-space:normal}
 .game-shell .answer-options.fraction-options:not(.group-options){grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:24px auto 16px}
 .fraction-options>.fraction-choice{min-width:0;padding:10px;min-height:64px}
 .fraction-options>.fraction-choice:last-child:nth-child(odd){grid-column:1/-1;width:calc((100% - 12px)/2);justify-self:center}
 .answer-card__visual{max-width:140px}
 .fraction-choice .answer-card__visual .fraction-shape{width:100%;height:auto}
 .fraction-caption{font-size:16px;line-height:1.35;overflow-wrap:anywhere}
 .fraction-part-controls{gap:14px;margin:16px auto}
 .fraction-selection-status{margin:16px 0!important}
 .fraction-build-drawing{max-width:100%}
}

/* World 6 · simplified Malaysian money and market visuals. */
.money-market-card{background:linear-gradient(135deg,#fff8dc,#eef5df)}
.money-market-map{background-color:#f8efd2;background-image:radial-gradient(circle at 15% 20%,#f7d89488 0,transparent 25%),radial-gradient(circle at 85% 70%,#cfe4c088 0,transparent 25%);border-color:#e4cf9a}
.money-market-map .trail:before{border-color:#d7b56d}.money-market-map .map-node{background:#fff8dc;box-shadow:0 7px 0 #d9be82,0 8px 20px #6d4b1818}.money-market-map .node-label{background:#fff8dcee}
.market-stalls{display:flex;justify-content:space-around;align-items:end;padding:24px 8% 0;font-size:40px}.market-stalls i{width:90px;height:56px;border:5px solid #8b5938;border-top:18px repeating-linear-gradient(90deg,#de765d 0 18px,#fff2cf 18px 36px);background:#fbecd0}
.money-group{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:14px;max-width:620px;margin:18px auto;min-width:0}
.money-piece{position:relative;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;flex:0 0 auto;border:3px solid #405b50;color:#173f32;font-family:'Fredoka',sans-serif;line-height:1.05;overflow:visible}
.money-coin{width:96px;height:96px;border-radius:50%;background:#f2d68c;box-shadow:inset 0 0 0 5px #fff8d088,0 4px 0 #9f8250}
.money-note{width:154px;height:88px;border-radius:13px;background:#d9e9d1;box-shadow:inset 0 0 0 5px #ffffff88,0 4px 0 #78946c}
.money-rm5{background:#e8d8ec}.money-rm10{background:#f2d1ca}.money-20s,.money-50s{background:#e8d4a6}
.money-decoration{font:700 10px/1 'DM Sans',sans-serif;letter-spacing:1px;margin-bottom:7px}.money-value{font-size:25px;white-space:nowrap}.money-large.money-coin{width:124px;height:124px}.money-large.money-note{width:196px;height:112px}.money-large .money-value{font-size:32px}
button.money-piece{cursor:pointer;min-width:0;padding:8px}.money-piece[aria-pressed=true],.money-piece.selected{border-color:#174c35;outline:4px solid #174c35;outline-offset:3px;box-shadow:0 0 0 7px #f6cd58,0 6px 0 #587062;transform:translateY(-3px)}
.money-piece[aria-pressed=true]:after{content:'✓';position:absolute;right:-10px;top:-10px;display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:#174c35;color:white;font:700 17px sans-serif}
.money-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;max-width:720px;margin-inline:auto}.money-choice{min-width:0;padding:14px 8px}.money-choice .money-group{margin:0;gap:8px}.money-choice .money-coin{width:78px;height:78px}.money-choice .money-note{width:128px;height:76px}.money-choice .money-value{font-size:21px}
.money-build{display:block;width:100%}.game-shell .answer-options.money-build:not(.group-options){display:block;grid-template-columns:none;width:100%;max-width:650px;margin-inline:auto}.money-selector{width:100%;max-width:650px;margin:auto}.money-wallet,.selected-money{display:flex;width:100%;justify-content:center;align-items:center;flex-wrap:wrap;gap:18px;padding:18px;border-radius:20px;background:#f6f2e4;border:2px dashed #b89b62}.selected-money{min-height:100px;background:#eef4e8;border-style:solid}.money-target{font:600 25px 'Fredoka',sans-serif;margin:0 0 14px}.money-selector h3{margin:22px 0 8px}.money-selection-status{min-height:30px;margin:15px 0!important;font-weight:600}.money-check{white-space:nowrap}.empty-wallet{color:var(--muted)}
.money-market-scene{position:relative;display:grid;grid-template-columns:1fr auto;align-items:center;max-width:420px;min-height:170px;margin:20px auto;padding:46px 28px 24px;border:5px solid #8b5938;border-top:0;border-radius:8px 8px 20px 20px;background:#fff0c9}.market-awning{position:absolute;inset:0 0 auto;background:repeating-linear-gradient(90deg,#de765d 0 54px,#fff4d5 54px 108px);height:38px;color:transparent}.market-product{font-size:72px}.price-tag{display:grid;place-items:center;min-width:105px;min-height:66px;padding:10px;background:#fff;border:3px solid #284f3c;border-radius:9px;font:600 25px 'Fredoka',sans-serif;transform:rotate(-2deg)}

@media(max-width:600px){
 .market-stalls{font-size:28px}.market-stalls i{width:58px;height:42px}
 .money-options{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.money-options>.money-choice:last-child:nth-child(odd){grid-column:1/-1;width:calc((100% - 12px)/2);justify-self:center}
 .money-choice{padding:10px 5px}.money-choice .money-coin{width:70px;height:70px}.money-choice .money-note{width:112px;height:68px}.money-choice .money-value{font-size:19px}
 .money-wallet{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px;justify-items:center;padding:18px 8px}.money-wallet .money-coin{width:82px;height:82px}.money-wallet .money-note{width:122px;height:74px}
 .selected-money{padding:10px;gap:9px}.selected-money .money-coin{width:68px;height:68px}.selected-money .money-note{width:104px;height:64px}.selected-money .money-value{font-size:18px}
 .money-market-scene{min-height:145px;padding:44px 18px 18px}.market-product{font-size:58px}.price-tag{min-width:88px;font-size:22px}
}
@media(max-width:350px){.money-piece.money-note{width:108px}.money-options{gap:9px}.money-choice .money-note{width:96px}.money-value{font-size:20px}.money-wallet{gap:18px 6px}}

/* Money relationships keep readable pieces and explicit controls at narrow widths. */
.money-lesson-board{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:20px;width:100%}
.money-lesson-board .money-group{flex:1 1 210px;margin:12px 0;padding:18px;border:2px solid #b89b62;border-radius:18px;background:#fffaf0}
.money-equivalence-label,.money-exchange-arrow{font:600 22px 'Fredoka',sans-serif;color:#284f3c}
.money-exchange-arrow{margin:16px 0 22px}.money-missing-cue{margin:18px 0;font-size:18px}
.money-selector h3{font-size:20px}.money-check{min-height:48px;max-width:100%}
.money-wallet .money-piece:focus-visible{outline:4px solid #165d96;outline-offset:6px}
@media(max-width:600px){
 .money-lesson-board{gap:8px}.money-lesson-board .money-group{flex-basis:100%;gap:12px;padding:14px;margin:4px 0}
 .money-lesson-board .money-coin{width:78px;height:78px}.money-lesson-board .money-note{width:116px;height:74px}
 .money-target{font-size:23px}.money-selector h3{margin:16px 0 10px}.money-check{width:100%}
 .money-relationship-visual .money-group{gap:12px}.money-relationship-visual .money-coin{width:78px;height:78px}
 .money-relationship-visual .money-note{width:116px;height:74px}
}

@media(max-width:600px){
 .money-relationship-visual .money-value,.money-lesson-board .money-value{font-size:21px}
 .game-shell.money-amount-stage h1{font-size:26px;line-height:1.15}
 .money-amount-stage .question-meta{margin-top:16px}
 .money-amount-stage .question-dots{margin:10px 0 16px}
 .money-amount-stage .play-panel{margin-top:16px}
}

.money-group-options,.game-shell .answer-options.money-group-options:not(.group-options){width:100%;max-width:720px;grid-template-columns:repeat(3,minmax(0,1fr));margin-inline:auto}
@media(max-width:600px){
 .money-group-options,.game-shell .answer-options.money-group-options:not(.group-options){grid-template-columns:minmax(0,1fr)}
 .money-group-options>.money-choice:last-child:nth-child(odd){width:100%}
 .money-group-options .money-group{gap:10px;padding:5px}
}

/* Shared activity contract: Learn, Adventure and Practice keep the same hierarchy. */
.game-shell{--activity-gap:16px;--activity-section:24px;min-width:0}
.activity-header{display:flex;flex-direction:column;align-items:center;gap:12px;margin-bottom:20px}
.activity-header h2{margin:0}
.instruction-replay{min-height:48px;font-size:16px;padding:10px 16px}
.play-panel,.lesson,#visual,#options,#lesson-visual,#lab-work{min-width:0;max-width:100%}
.game-shell :is(svg,canvas,img){max-width:100%;height:auto}
.game-shell :is(.answer,.button,select){min-height:48px;touch-action:manipulation}
.game-shell :is(.answer,.button){max-width:100%;white-space:normal;overflow-wrap:break-word}
.game-shell :is(#feedback,#lesson-feedback,#lab-feedback){display:block;min-height:3em;margin:16px 0;line-height:1.5}
.game-shell :is(#next,#lesson-next,#lab-next){min-height:48px;margin-top:8px}
.answer.pending{outline:4px solid var(--green);outline-offset:2px;background:#edf4d4}
.question-meta,.game-top{flex-wrap:wrap;gap:12px}
.game-shell :is(.fraction-comparison-card,.fraction-lesson-card,.quantity-card){min-width:0;max-width:100%}
@media(max-width:600px){.game-shell :is(#next,#lesson-next,#lab-next){width:100%}}

/* World 2 textbook bridge: compact concrete models that remain readable at 320px. */
.bridge-support{display:flex;flex-direction:column;align-items:center;gap:16px;width:100%}
.ten-frames{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;max-width:100%}.ten-frame{display:grid;grid-template-columns:repeat(5,22px);grid-template-rows:repeat(2,22px);gap:3px;padding:5px;border:3px solid #345d54;border-radius:9px;background:#fff}.ten-frame span{border:1px solid #9eb3ac;border-radius:50%;background:#fff}.ten-frame .filled{background:#e6a849;border-color:#a4611d;box-shadow:inset 0 0 0 2px #fff7}
.strategy-line,.exchange-note,.repeated-sentence{margin:0!important;padding:10px 14px;border-radius:12px;background:#eef4d4;font-weight:700;line-height:1.45}.bridge-block-pair{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;max-width:700px}.bridge-block-pair>.base-ten{flex:1 1 0;min-width:0;margin:0}.bridge-block-pair .ten-group,.bridge-block-pair .one-group{max-width:100%}
.place-board{width:min(100%,330px);border-collapse:collapse;margin:auto;font:700 clamp(20px,5vw,28px)/1.2 'Fredoka',sans-serif}.place-board th,.place-board td{padding:8px 12px;border:2px solid #b6c8bd;text-align:center}.place-board th{background:#e7f0e2;font-size:16px}.place-board .exchanged-row{background:#fff0b9;color:#72420b}.exchange-action.exchanged{background:#e2f0d9;border-color:#416957;color:#224a38}
.hundred-block{display:grid;place-items:center;width:126px;aspect-ratio:1;border:3px solid #386754;border-radius:6px;background-color:#d8e9a9;background-image:linear-gradient(#62866c55 1px,transparent 1px),linear-gradient(90deg,#62866c55 1px,transparent 1px);background-size:10% 10%;font:800 28px 'Fredoka',sans-serif;color:#193f30;text-shadow:0 1px #fff}
.comparison-bars{display:grid;gap:10px;width:min(100%,560px)}.comparison-bar{width:calc(var(--amount) * .9% + 10%);min-width:70px;max-width:100%;padding:10px;border:2px solid #486f63;border-radius:10px;background:#cfe5a3;text-align:right;font-weight:800}.comparison-bar:nth-child(2){background:#f5cf8c}
.story-equation,.repeated-sentence{font:700 clamp(25px,6vw,36px)/1.3 'Fredoka',sans-serif}.story-picture{max-width:100%;font-size:28px;line-height:1.5;overflow-wrap:anywhere}.story-options,.game-shell .answer-options.story-options:not(.group-options){display:grid;grid-template-columns:1fr;gap:12px;max-width:720px}.story-choice{display:flex;flex-direction:column;gap:7px;align-items:flex-start;text-align:left;padding:16px 20px;font-size:18px}.story-choice:focus-visible,.exchange-action:focus-visible{outline:4px solid #165d96;outline-offset:3px}.story-part{display:block}.story-solver-card{width:min(100%,700px);padding:18px;border:2px solid #b9cdbd;border-radius:18px;background:#fffaf0;text-align:left}.story-text{font-size:clamp(19px,4vw,24px);font-weight:700;line-height:1.45}.story-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:0;counter-reset:step}.story-steps li{list-style:none;padding:9px;border-radius:10px;background:#edf1eb;font-size:14px}.story-steps li.active{background:#e7edaf;border:2px solid #6e8232}.story-answer-options .answer{font-size:clamp(18px,4vw,24px)}
.equal-group-row{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;width:100%}.equal-group{flex:0 1 145px;padding:10px;border:2px dashed #6e8a72;border-radius:14px;background:#f8f4df}.equal-group .ten-frame{grid-template-columns:repeat(5,15px);grid-template-rows:repeat(2,15px);border-width:2px}.group-label{display:block;margin-bottom:7px;font-size:13px;font-weight:700}.subtraction-chain{display:flex;flex-wrap:wrap;justify-content:center;gap:9px;width:100%}.chain-step{padding:10px 12px;border:2px solid #bdcdbd;border-radius:12px;background:#fff;font:700 clamp(18px,4vw,24px)/1.2 'Fredoka',sans-serif}.chain-step:after{content:' →';color:#588258}.chain-step:last-child:after{content:''}
@media(max-width:430px){.bridge-block-pair{flex-direction:column}.bridge-block-pair>.base-ten{width:100%}.ten-frame{grid-template-columns:repeat(5,18px);grid-template-rows:repeat(2,18px)}.story-steps{grid-template-columns:1fr 1fr}.story-choice{padding:14px;font-size:16px}.place-board th,.place-board td{padding:7px}.equal-group{flex-basis:125px}}
@media(prefers-reduced-motion:reduce){.exchange-action,.comparison-bar,.chain-step{transition:none!important;animation:none!important}}

/* ==========================================================================
   Kids app shell — installed-app chrome and bigger, friendlier touch targets.
   Appended last so it layers over the earlier page rules without rewriting them.
   ========================================================================== */
:root{--sun:#ffcb47;--sun-deep:#d99a06;--tab-h:72px}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{display:flex;flex-direction:column;min-height:100vh;min-height:100dvh;touch-action:manipulation}
main{width:100%;margin:0 auto;flex:1 0 auto}
a,button{-webkit-touch-callout:none}
button,.button,.answer,.map-node,.world-card,.profile-card,.site-header a,.mode-tabs a,.lab-card{-webkit-user-select:none;user-select:none}
html:has(body.playing){overscroll-behavior-y:none}

/* App bar: one slim sticky row on every screen size. */
.site-header.app-bar{position:sticky;top:0;z-index:30;width:100%;max-width:none;height:auto;min-height:76px;margin:0;padding:calc(10px + env(safe-area-inset-top)) max(32px,calc((100% - 1296px)/2)) 10px;gap:16px;flex-wrap:nowrap;background:var(--cream);border-bottom:2px solid var(--line)}
.playing .site-header.app-bar{position:static;min-height:64px}
.app-bar .brand{flex-shrink:0;min-height:48px}
.app-bar .brand .brand-name{color:var(--ink)}
.app-bar .brand-mark{display:grid;place-items:center;line-height:1;flex-shrink:0}
.site-header.app-bar nav{height:auto;gap:6px;margin-left:12px;padding:0;width:auto;order:0}
.site-header.app-bar nav a{display:inline-flex;align-items:center;gap:8px;height:auto;min-height:48px;padding:8px 16px;border-radius:999px;font:600 16px 'Fredoka','Trebuchet MS',sans-serif;color:var(--muted);white-space:nowrap;transition:background .15s,transform .12s}
.site-header.app-bar nav a.active{background:var(--lime);color:var(--deep)}
.site-header.app-bar nav a.active:after{display:none}
.site-header.app-bar nav a:active{transform:scale(.94)}
.nav-icon{font-size:22px;line-height:1;transition:transform .2s}
.site-header.app-bar .header-actions{width:auto;margin-left:auto;gap:10px;justify-content:flex-end;flex-shrink:1}
.site-header.app-bar .player-chip{min-height:48px;padding:12px 16px;border:2px solid var(--line);border-radius:999px;font:600 16px/1.3 'Fredoka',sans-serif;max-width:190px;overflow:hidden;text-overflow:ellipsis;flex-shrink:1}
.site-header.app-bar .player-chip span{margin-left:6px;color:var(--muted)}
.site-header.app-bar .sound-toggle{min-height:48px;box-shadow:none}
@media(hover:hover){.site-header.app-bar nav a:hover{background:#edf2e4;color:var(--deep)}}

/* Phones and portrait tablets: navigation becomes a thumb-reach tab bar. */
@media(max-width:1000px){
 body.has-tabs{padding-bottom:calc(var(--tab-h) + env(safe-area-inset-bottom))}
 .site-header.app-bar{min-height:64px;padding:calc(8px + env(safe-area-inset-top)) 16px 8px;gap:10px}
 .site-header.app-bar nav{position:fixed;left:0;right:0;bottom:0;z-index:40;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:0;padding:6px max(8px,env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-right));background:#fff;border-top:2px solid var(--line);box-shadow:0 -6px 20px #224a3814}
 .site-header.app-bar nav a{flex-direction:column;justify-content:center;gap:2px;min-height:58px;padding:4px 2px;border-radius:18px;font-size:13px;text-align:center}
 .site-header.app-bar nav .nav-icon{font-size:27px}
 .site-header.app-bar nav a.active .nav-icon{transform:translateY(-2px) scale(1.15)}
 .nav-long{display:none}
 .playing .site-header.app-bar nav{display:none}
 .site-header.app-bar .player-chip{margin-left:auto;font-size:15px;max-width:150px}
 .site-header.app-bar .header-actions .player-chip{margin-left:0}
}
@media(max-width:700px){
 .app-bar .brand{font-size:23px}
 /* Icon-only sound button: the label stays in the DOM for assistive technology. */
 .site-header.app-bar .sound-toggle{width:48px;min-width:48px;height:48px;padding:0 0 0 11px;justify-content:flex-start;overflow:hidden;white-space:nowrap;word-spacing:48px;font-size:20px;border-radius:50%}
}
@media(max-width:359px){.has-sound .brand-name{display:none}.site-header.app-bar .player-chip{max-width:120px}}
/* Landscape phones: keep the tab bar short so the activity keeps its height. */
@media(max-width:1000px) and (max-height:480px){:root{--tab-h:56px}.site-header.app-bar nav a{flex-direction:row;gap:8px;min-height:44px}.site-header.app-bar nav .nav-icon{font-size:22px}.site-header.app-bar{position:static}}

/* Chunky, pressable buttons. */
.button{min-height:56px;border-radius:18px;font-weight:600;gap:10px;transition:transform .12s,box-shadow .12s}
.primary{box-shadow:0 5px 0 #184b34}
.guide-card .primary{box-shadow:0 5px 0 #122f22}
.button:active:not(:disabled){transform:translateY(3px)}
.primary:active:not(:disabled){box-shadow:0 2px 0 #184b34}
.button.play{min-height:68px;padding:14px 40px;border-radius:24px;background:var(--sun);color:#3d2c00;font-size:24px;box-shadow:0 7px 0 var(--sun-deep)}
.button.play:active{transform:translateY(5px);box-shadow:0 2px 0 var(--sun-deep)}
.button:disabled{opacity:.55}
@media(hover:none){.button:hover{transform:none}.button:active:not(:disabled){transform:translateY(3px)}.button.play:active{transform:translateY(5px)}.unlocked a.map-node:hover{transform:none;box-shadow:0 7px 0 #d3dcb9}}

/* Home: mascot hero and a picture-first grid of worlds. */
.home-hero{padding:28px 0 8px}
.home-hero h1{font-size:clamp(34px,7vw,64px);letter-spacing:-.5px;overflow-wrap:anywhere}
.home-hero>p{margin:10px 0 22px;font-size:19px}
.hero-mascot{display:flex;justify-content:center;align-items:flex-end;gap:14px;font-size:44px;line-height:1;margin-bottom:10px}
.hero-buddy{font-size:96px;animation:buddy-bob 2.6s ease-in-out infinite}
.hero-stats{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;margin-top:22px}
.hero-stats span{padding:8px 16px;border-radius:999px;background:#fffdf3;border:2px solid #efe4b4;font:500 16px 'Fredoka',sans-serif}
.section-title{margin:28px 0 14px;font-size:28px;font-weight:600}
.world-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:18px;margin-bottom:32px}
.world-card{--card:#e4f1c8;--card-deep:#b7cd8d;--card-ink:#3f7a3a;position:relative;display:flex;flex-direction:column;gap:4px;min-width:0;min-height:230px;padding:18px 18px 16px;border-radius:28px;border:3px solid #fff;background:var(--card);box-shadow:0 7px 0 var(--card-deep),0 12px 22px #224a3814;color:var(--ink);transition:transform .12s,box-shadow .12s}
.world-card:active{transform:translateY(5px);box-shadow:0 2px 0 var(--card-deep)}
@media(hover:hover){.world-card:hover{transform:translateY(-3px)}.world-card:hover .world-emoji{transform:rotate(-6deg) scale(1.08)}}
.world-emoji{font-size:60px;line-height:1.15;align-self:flex-start;transition:transform .2s}
.world-card small{font:700 12px 'DM Sans',sans-serif;letter-spacing:1.5px;text-transform:uppercase;color:var(--card-ink)}
.world-card strong{font:600 23px/1.15 'Fredoka',sans-serif}
.world-card p{font-size:15px;line-height:1.35;color:#465a4b;margin-bottom:10px}
.world-stars{margin-top:auto;font:600 16px 'Fredoka',sans-serif}
.world-bar{display:block;height:10px;margin-top:4px;border-radius:99px;background:#ffffffb3;overflow:hidden}
.world-bar>span{display:block;height:100%;min-width:0;border-radius:99px;background:var(--card-ink)}
.world-go{margin-top:8px;font:600 15px 'Fredoka',sans-serif;color:var(--card-ink)}
.world-2{--card:#ffe6c9;--card-deep:#e6bb8c;--card-ink:#8a4c12}
.world-3{--card:#ffdde1;--card-deep:#e6aab3;--card-ink:#963f55}
.world-4{--card:#d8eefb;--card-deep:#a4c9e0;--card-ink:#24607f}
.world-5{--card:#e9e0f8;--card-deep:#bfaede;--card-ink:#5f418f}
.world-6{--card:#fff0b5;--card-deep:#dfc25c;--card-ink:#73560a}
.world-lab{--card:#fff;--card-deep:#cfdcc3;--card-ink:var(--green);border-color:var(--line)}
.home-booster{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:clamp(10px,3vw,20px);margin:24px 0 8px;padding:clamp(12px,3vw,20px);background:#e5efcc;border:2px solid #a6c298;border-radius:22px;color:var(--deep);box-shadow:0 4px 0 #c0d3ac}
.home-booster:hover{background:#dce9bd}
.home-booster strong,.home-booster span span{display:block}
.home-booster strong{font:600 clamp(20px,4vw,27px)/1.12 Fredoka,sans-serif}
.home-booster span span{font-size:15px;margin-top:3px}
.home-booster-icon,.home-booster-go{font-size:clamp(23px,5vw,38px);line-height:1}
.world-card.is-locked .world-emoji{filter:grayscale(.8);opacity:.75}
@media(max-width:560px){.world-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.world-card{min-height:205px;padding:14px 12px 14px;border-radius:24px}.world-emoji{font-size:50px}.world-card strong{font-size:19px}.world-card p{font-size:14px}.world-stars{font-size:15px}.world-go{display:none}.world-lab .world-go{display:block;font-size:14px}.hero-buddy{font-size:84px}.section-title{font-size:24px;margin-top:22px}}
@keyframes buddy-bob{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-9px) rotate(3deg)}}

/* Maps: the next stop waves, finished stops glow gold. */
.trail-stop.unlocked:not(.complete):not(.trail-stop.unlocked:not(.complete) ~ *) .map-node{animation:node-hop 1.6s ease-in-out infinite;border-color:var(--sun)}
.trail-stop.complete .map-node{border-color:#f4ca57;background:#fff3c4}
.trail-stop.unlocked .node-state{display:inline-block;padding:4px 14px;border-radius:999px;background:var(--sun);color:#3d2c00;font:600 14px 'Fredoka',sans-serif}
.map-node:active{transform:scale(.94)}
.node-label .stars{display:block;font-size:22px;letter-spacing:2px}
@keyframes node-hop{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}

/* Activities: clearer modes, springy answers and louder feedback. */
.mode-tabs{max-width:480px;border-radius:22px}
.mode-tabs a{display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 6px;border-radius:16px;font:600 17px 'Fredoka',sans-serif;color:#4f6353}
.mode-tabs a:before{font-size:22px;line-height:1}
.mode-tabs a:nth-child(1):before{content:'📖'}.mode-tabs a:nth-child(2):before{content:'🎮'}.mode-tabs a:nth-child(3):before{content:'🏆'}
.mode-tabs .selected{background:var(--sun);color:#3d2c00;box-shadow:0 3px 0 var(--sun-deep)}
.answer{transition:transform .12s,box-shadow .12s,background .15s}
.answer:active:not(:disabled){transform:translateY(3px);box-shadow:0 1px 0 #dfe6d6}
.answer.right{background:#dcf3b5;box-shadow:0 4px 0 var(--green);animation:pop .35s ease-out}
.question-dots{font-size:26px}
.game-shell :is(#feedback,#lesson-feedback,#lab-feedback){font-size:20px;font-family:'Fredoka',sans-serif}
.game-top .back,.back{display:inline-flex;align-items:center;min-height:48px;padding:8px 16px 8px 12px;border-radius:999px;background:#fff;border:2px solid var(--line);font:600 15px 'Fredoka',sans-serif;letter-spacing:0}
.world-heading .back{margin-bottom:10px}
.result .stars{display:inline-block;animation:pop .6s .15s both}
.celebrate{animation:pop .5s ease-out,buddy-bob 2.6s .5s ease-in-out infinite}

/* Profiles and Practice Lab: big friendly cards. */
.profile-card{border:3px solid #fff;box-shadow:0 6px 0 #c9d6a8;border-radius:26px;font-family:'Fredoka',sans-serif;transition:transform .12s,box-shadow .12s}
.profile-card:active{transform:translateY(4px);box-shadow:0 2px 0 #c9d6a8}
.profile-card>span{font-size:64px;line-height:1.1}
.profile-card strong{font-size:22px;font-weight:600;overflow-wrap:anywhere}
.avatar-options{flex-wrap:wrap}
.avatar-options span{font-size:42px;line-height:1.1;padding:10px 12px;border-width:3px;border-radius:18px;transition:transform .12s}
.avatar-options input:checked+span{transform:scale(1.08);background:var(--lime)}
input[type=text],input:not([type]),select{min-height:56px;border-width:2px;border-radius:16px;font-size:18px}
.lab-card{border-radius:24px;box-shadow:0 5px 0 var(--line);transition:transform .12s,box-shadow .12s}
.lab-card:active{transform:translateY(3px);box-shadow:0 2px 0 var(--line)}

footer{padding:24px 16px 28px}
.footer-note{margin-top:8px}
@media(display-mode:standalone){.footer-note{display:none}footer{padding-bottom:12px}}

/* Page-to-page navigation feels like one app where the browser supports it. */
@media(prefers-reduced-motion:no-preference){
 @view-transition{navigation:auto}
 .site-header.app-bar{view-transition-name:app-bar}
 ::view-transition-old(root),::view-transition-new(root){animation-duration:.18s}
}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
