:root{--bg:#f8f5ed;--surface:#fffef9;--ink:#233c35;--muted:#65776b;--line:#dce2d4;--green:#356c51;--pale:#e7efdf;--pink:#f9e4dd;--blue:#dfeef3;--yellow:#f8ecc6;--shadow:0 8px 30px #29443206;color-scheme:light}
[data-reading-theme=paper]{--bg:#fff;--surface:#fafbf8;--pale:#e7efdf}[data-reading-theme=blue]{--bg:#edf4f8;--surface:#fff;--pale:#dceae9;--line:#cfdee7}[data-reading-theme=dark]{--bg:#172721;--surface:#22372e;--ink:#f2f4e9;--muted:#b8c9bd;--line:#486052;--green:#b9dbad;--pale:#334d3c;--pink:#573f39;--blue:#304954;--yellow:#524c30;color-scheme:dark}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:ui-rounded,"Trebuchet MS",system-ui,sans-serif;line-height:1.6}button,select,a{-webkit-tap-highlight-color:transparent}button,select{font:inherit;color:inherit}button,a,select{touch-action:manipulation}button{cursor:pointer;border:1px solid var(--line);background:var(--surface);border-radius:16px;padding:12px 20px;min-height:48px;font-weight:700}button:hover,a.card:hover{border-color:var(--green);transform:translateY(-2px)}button:disabled{cursor:default;opacity:.55;transform:none}a{color:inherit}button:focus-visible,a:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #d18a30;outline-offset:5px}.topbar{max-width:1280px;margin:auto;display:flex;align-items:center;justify-content:space-between;padding:25px 40px;gap:20px;border-bottom:1px solid var(--line)}.brand{font-weight:800;font-size:21px;display:flex;align-items:center;gap:12px;text-decoration:none;letter-spacing:-.6px}.brand-mark{font-size:32px;color:var(--green)}.top-actions{display:flex;gap:10px;align-items:center}.top-actions button,.top-actions select{font-size:12px;background:transparent;border:1px solid var(--line);padding:10px 12px;border-radius:30px;min-height:44px}.top-actions select{max-width:112px}main{max-width:1180px;margin:auto;padding:44px 40px 65px}.hero{display:grid;grid-template-columns:1.2fr 1fr;gap:30px;align-items:center;min-height:320px}.eyebrow{font-size:11px;letter-spacing:2px;font-weight:800;color:var(--green)}h1{font-size:clamp(38px,5.1vw,64px);letter-spacing:-2.5px;line-height:1.09;margin:18px 0 22px;font-weight:800}h1 em{font-family:Georgia,serif;font-weight:400;color:var(--green)}.intro{color:var(--muted);max-width:430px;font-size:16px}.primary{background:var(--green);color:var(--bg);border-color:var(--green)}.hero .primary{margin-top:12px;padding:14px 23px}.hero-art{width:100%;max-height:315px}.section-head{display:flex;justify-content:space-between;align-items:end;gap:20px;margin:35px 0 22px}.section-head h2{margin:0;font-size:26px;letter-spacing:-.8px}.section-head p{margin:4px 0 0;color:var(--muted);font-size:13px}.progress{font-size:12px;display:flex;align-items:center;gap:10px;white-space:nowrap}.progress-track{width:70px;height:6px;border-radius:4px;background:var(--line);overflow:hidden}.progress-track span{display:block;height:100%;background:var(--green)}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:17px}.card{border:1px solid var(--line);border-radius:22px;overflow:hidden;text-decoration:none;background:var(--surface);box-shadow:var(--shadow);transition:transform .16s}.card-art{height:140px;display:grid;place-items:center;position:relative;background:var(--pale)}.card:nth-child(4n+2) .card-art{background:var(--pink)}.card:nth-child(4n+3) .card-art{background:var(--blue)}.card:nth-child(4n) .card-art{background:var(--yellow)}.card-art svg{width:150px;height:110px}.step{position:absolute;top:12px;left:15px;font-size:10px;letter-spacing:1px;font-weight:800}.card-body{padding:17px}.card h3{font-size:18px;margin:0 0 5px;letter-spacing:-.4px}.card p{font-size:12px;color:var(--muted);margin:0 0 16px;min-height:38px}.card-bottom{display:flex;justify-content:space-between;font-size:11px;font-weight:700;color:var(--green)}.note{display:flex;gap:16px;background:var(--pale);padding:22px 26px;border-radius:18px;margin-top:28px;font-size:13px}.note strong{display:block;font-size:14px}.note p{margin:3px 0;color:var(--muted)}footer{max-width:1180px;margin:auto;padding:24px 40px 35px;display:flex;gap:25px;border-top:1px solid var(--line);font-size:11px;color:var(--muted)}footer span{margin-right:auto}.back{text-decoration:none;font-size:13px;font-weight:700}.lesson-heading{display:flex;justify-content:space-between;align-items:center;margin:25px 0}.lesson-heading h1{font-size:40px;margin:8px 0;letter-spacing:-1.5px}.lesson-heading p{margin:0;color:var(--muted)}.activity{padding:30px;border:1px solid var(--line);border-radius:26px;background:var(--surface);text-align:center;min-height:390px}.activity h2{font-size:25px;margin:0 0 8px}.instruction{color:var(--muted);margin:0 0 24px}.playfield{background:var(--pale);border-radius:20px;min-height:190px;padding:25px;margin:20px 0;display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap}.token{width:76px;height:84px;padding:5px;position:relative}.token svg{width:58px;height:58px}.token.counted{background:var(--green);color:var(--bg)}.token.counted:disabled{opacity:1}.token small{position:absolute;right:6px;bottom:0}.controls,.choices{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}.number-choice{font-size:27px;min-width:66px}.feedback{min-height:30px;margin:20px 0;font-weight:700;color:var(--green)}.bottom-nav{display:flex;justify-content:space-between;gap:15px;margin:24px 0}.bottom-nav a{padding:12px 0;text-decoration:none;font-weight:700;font-size:13px}details{border-top:1px solid var(--line);padding:20px 0;color:var(--muted);font-size:14px}summary{cursor:pointer;color:var(--ink);font-weight:700}.group{padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:18px;flex:1;min-width:120px}.objects{display:flex;gap:3px;justify-content:center;flex-wrap:wrap;min-height:48px;align-items:center}.objects svg{width:38px;height:45px}.group strong{display:block;margin-bottom:12px}.shape-choice svg{width:70px;height:70px}.position-scene{position:relative;width:260px;height:230px}.box{position:absolute;left:85px;top:83px;width:90px;height:72px;background:#d8ac72;border:3px solid #886b43;border-radius:8px;color:#493e2b;display:grid;place-items:center;font-weight:800}.spot{position:absolute;width:68px;height:62px;padding:5px;border:2px dashed var(--green)}.spot svg{width:45px;height:45px}.spot.above{top:4px;left:96px}.spot.below{bottom:0;left:96px}.spot.beside{top:88px;left:186px}.ribbons{width:100%;max-width:470px;border-left:3px dashed var(--green);padding:15px 0;text-align:left}.ribbon{height:45px;margin:18px 0;border-radius:0 12px 12px 0;display:flex;align-items:center;padding-left:15px;color:#233c35;font-weight:800;background:#edb098;transition:margin .5s}.ribbon.b{background:#9ec5d6}.plate{min-width:145px;min-height:140px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}dialog{max-width:570px;width:calc(100% - 32px);border:1px solid var(--line);border-radius:24px;padding:35px;background:var(--surface);color:var(--ink)}dialog::backdrop{background:#102b2277}.close{float:right;font-size:24px;padding:0 14px}.source-page{max-width:760px}.source-page h1{font-size:40px}.source-page li{margin:10px 0}.source-page a{overflow-wrap:anywhere}
@media(max-width:900px){.cards{grid-template-columns:repeat(2,1fr)}.topbar{padding:20px 24px}.brand{font-size:18px}.top-actions{gap:5px}.hero{grid-template-columns:1.2fr 1fr}.hero-art{max-height:270px}main{padding:30px 24px}.top-actions button{font-size:11px}}
@media(max-width:600px){.topbar{flex-wrap:wrap;gap:14px;padding:15px 20px}.top-actions{width:100%;justify-content:space-between}.hero{grid-template-columns:1fr;gap:0}.hero-art{height:205px;grid-row:2}.hero h1{font-size:44px;margin-top:15px}.hero .intro{font-size:14px}.section-head{align-items:start;flex-direction:column;gap:10px;margin-top:25px}.cards{gap:12px}.card-art{height:110px}.card-art svg{width:120px;height:85px}.card-body{padding:14px}.card h3{font-size:16px}.card p{min-height:54px}.note{padding:18px}footer{padding:24px 20px;flex-wrap:wrap;gap:16px}footer span{width:100%}.lesson-heading{align-items:start;gap:10px}.lesson-heading h1{font-size:31px}.activity{padding:20px 12px}.activity h2{font-size:22px}.playfield{padding:16px 8px;gap:8px}.token{width:58px;height:72px}.token svg{width:44px;height:48px}.group{padding:10px;min-width:100px}.objects svg{width:28px}.lesson-heading>button{padding:8px;font-size:12px}.choices button{padding:12px}.progress{font-size:11px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

.start-link{display:inline-block;border-radius:16px;text-decoration:none;font-weight:700;min-height:48px}
/* Thai needs generous line height and natural character spacing. */
html[lang=th] body{font-family:"Noto Sans Thai",Tahoma,system-ui,sans-serif}
html[lang=th] h1{letter-spacing:0;line-height:1.4;font-size:clamp(32px,4.4vw,52px)}
html[lang=th] h1 em{font-family:inherit}
html[lang=th] .eyebrow,html[lang=th] .brand,html[lang=th] h2,html[lang=th] h3{letter-spacing:0}
html[lang=th] .lesson-heading h1{font-size:36px}
.top-actions{flex-wrap:wrap}
@media(max-width:600px){.top-actions{justify-content:flex-start;gap:6px}.top-actions select,.top-actions button{font-size:11px;padding:8px 10px}.top-actions select{max-width:115px}html[lang=th] .hero h1{font-size:34px}html[lang=th] .lesson-heading h1{font-size:28px}html[lang=th] .lesson-heading p{font-size:14px}}
.age-tabs{display:flex;gap:12px;flex-wrap:wrap;margin:24px 0 12px}.age-tabs [aria-pressed=true],.factor-options [aria-pressed=true],.choices [aria-pressed=true]{background:var(--green);color:var(--bg)}.path-note{font-size:13px;color:var(--muted);margin-bottom:24px}.grow-view{margin:24px auto;padding:20px;background:var(--pale);border-radius:20px;max-width:650px;min-height:120px}.grow-svg{display:block;width:100%;max-height:320px;color:var(--ink)}.grow-svg text{fill:currentColor;font-family:inherit}.grow-controls{display:flex;gap:20px;justify-content:center;flex-wrap:wrap;margin:24px 0}.grow-control{display:flex;flex-wrap:wrap;gap:10px;max-width:240px;text-align:left;font-size:14px;font-weight:700}.grow-control output{margin-left:auto}.grow-control input{width:100%;height:40px;accent-color:var(--green)}.tile-grid{display:grid;gap:3px;max-width:360px;margin:auto}.tile{display:block;min-height:16px;aspect-ratio:1;background:var(--surface);border:1px solid var(--green);border-radius:3px}.tile.filled{background:var(--green)}.fraction-strip{display:grid;width:100%;max-width:500px;margin:12px auto;gap:2px}.fraction-strip .tile{aspect-ratio:auto;height:42px;min-width:0}.hundred{grid-template-columns:repeat(10,1fr);max-width:310px}.bundles{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.ten-bundle{width:20px}.ten-bundle .tile{min-height:8px;height:8px;aspect-ratio:auto}.ones{max-width:220px;margin:20px auto 0}.ones .tile{max-height:24px}.group-packs{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}.pack{padding:6px;border:1px solid var(--green);border-radius:8px;width:100px}.pack .tile{height:22px}.equation{overflow-x:auto;padding:14px;max-width:100%;margin:10px auto}.answer-label{display:flex;gap:12px;align-items:center;justify-content:center;flex-wrap:wrap;margin:24px 0;font-weight:700}.answer-label input{width:115px;padding:12px;font:inherit;font-size:24px;border:2px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink)}.answer-label span{font-size:13px;font-weight:400}.sequence{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;font-size:30px}.sequence span{padding:5px 10px}.pattern-0{color:var(--green)}.pattern-1{color:#ae6a30}.pattern-2{color:#527da2}.factor-options{display:flex;flex-wrap:wrap;justify-content:center;gap:7px;width:100%}.factor-options button{min-width:48px;padding:8px}.mean-columns{display:flex;justify-content:center;align-items:end;gap:25px;min-height:230px}.cube-tower{display:flex;flex-direction:column-reverse;gap:3px;min-height:5px}.cube-tower .tile{width:32px;height:23px;aspect-ratio:auto}.grow-controls input:focus-visible,.answer-label input:focus-visible{outline:3px solid #d18a30;outline-offset:4px}
@media(max-width:600px){.age-tabs{gap:8px}.age-tabs button{padding:10px 12px}.grow-view{padding:12px}.grow-control{max-width:100%;width:100%}.sequence{font-size:22px;gap:1px}.sequence span{padding:5px 7px}.grow-svg text{font-size:13px}.equation{font-size:16px}.tile-grid{gap:2px}.tile{min-height:7px}}

.age-selector{display:flex;align-items:center;gap:7px;font-size:12px;font-weight:700}.topbar{flex-wrap:wrap}.top-actions{justify-content:flex-end}@media(max-width:600px){.top-actions{justify-content:flex-start}.age-selector{font-size:11px}}

#age-path{scroll-margin-top:24px}#age-path:focus{outline:none}#age-path h2{overflow-wrap:anywhere}
/* Garden friends, short quests and a growing flower collection. */
.companion-svg{width:88px;height:100px;flex-shrink:0;overflow:visible}.game-companion{display:flex;align-items:center;gap:22px;background:var(--yellow);border:1px solid var(--line);padding:18px 24px;border-radius:24px;margin:24px 0 18px}.game-companion .eyebrow{margin:0 0 5px}.game-companion strong{font-size:18px}.game-companion p:last-child{font-size:14px;color:var(--muted);margin:6px 0 0}.quest-trail{display:flex;align-items:center;justify-content:center;gap:24px;margin:22px 0;font-size:13px;color:var(--muted)}.quest-trail span{display:flex;align-items:center;gap:8px}.quest-trail b{display:grid;place-items:center;width:28px;height:28px;background:var(--pale);border:1px solid var(--line);border-radius:50%}.quest-trail .active{font-weight:800;color:var(--ink)}.quest-trail .active b,.quest-trail .done b{background:var(--green);color:var(--bg)}.story-problem{margin:28px 0;text-align:left;background:var(--surface);padding:24px;border:2px solid var(--green);border-radius:24px;scroll-margin-top:20px}.story-heading{display:flex;align-items:center;gap:18px}.story-heading .eyebrow{margin:0 0 4px}.story-heading h3{font-size:24px;margin:0;letter-spacing:-.5px}.story-heading p:last-child{margin:5px 0;color:var(--muted);font-size:14px}#story-title{scroll-margin-top:20px}#story-title:focus{outline:none}.story-question{font-size:20px;line-height:1.7;font-weight:700;margin:20px 0}.story-picture{background:var(--pale);padding:20px;border-radius:18px;margin:20px 0;text-align:center}.story-picture>svg{max-height:260px;width:100%}.story-picture>.ribbons{margin:auto}.story-choices{display:flex;flex-wrap:wrap;justify-content:center;gap:12px}.story-choices button{font-size:19px;min-width:68px;min-height:58px}.story-choices [aria-pressed=true]{background:var(--green);color:var(--bg)}.story-feedback{min-height:28px;text-align:center;color:var(--green);font-weight:700;margin:20px 0 0}.story-problem #story-check{display:block;margin:auto}.story-tokens{display:flex;gap:9px;flex-wrap:wrap;justify-content:center;align-items:center}.story-tokens span{font-size:36px;line-height:1.5;filter:drop-shadow(0 3px 0 #00000008)}.story-pairs{display:flex;justify-content:center;align-items:center;gap:20px}.story-pairs>div{flex:1}.story-pack-labels{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}.story-pack-labels span{background:var(--surface);border:1px dashed var(--green);padding:12px;border-radius:12px;font-weight:800}.story-sequence{font-size:30px;line-height:2}.story-position{width:210px;height:170px;position:relative;margin:auto}.toy-box{position:absolute;left:65px;top:65px;background:#caa578;color:#342c21;width:75px;height:55px;border:2px solid #8a6b43;border-radius:8px;display:grid;place-items:center;font-weight:800}.story-ball{position:absolute;font-size:30px;color:#a46443}.story-ball.above{left:88px;top:8px}.story-ball.below{left:88px;top:122px}.story-ball.beside{left:162px;top:70px}.story-fact{font-size:22px;font-weight:800;line-height:2}.story-chart{text-align:left;width:100%;padding:12px}.story-chart>div{display:flex;align-items:center;gap:12px;margin:12px 0}.story-chart span{display:block;background:var(--green);color:var(--bg);padding:10px;border-radius:0 8px 8px 0;min-width:38px}.story-chart p{font-size:12px;color:var(--muted)}.story-data{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}.story-data span{background:var(--surface);border-radius:12px;padding:12px}.story-data strong{display:block;font-size:24px}.bloom-reward{display:flex;gap:18px;align-items:center;background:var(--yellow);padding:18px;border-radius:18px;margin-top:20px}.bloom-reward svg{width:60px;min-width:60px;height:78px;animation:bloom-pop .5s ease-out}.bloom-reward p{font-size:13px;color:var(--muted);margin:5px 0 0}.garden-collection{margin:36px 0 0;padding:24px;background:var(--surface);border:1px solid var(--line);border-radius:24px}.collection-intro{display:flex;gap:20px;align-items:center}.collection-intro h2{margin:0;font-size:26px}.collection-intro p:last-child{font-size:14px;color:var(--muted);max-width:640px}.flower-bed{display:flex;flex-wrap:wrap;gap:10px;align-items:end;min-height:100px;border-bottom:5px solid #a2b48b;margin:18px 0 0;padding:0 12px 6px}.flower-bed a{display:block;width:55px;height:70px}.flower-bed svg{width:100%;height:100%}.flower-bed>span{color:var(--muted);font-size:14px;margin-bottom:20px}.game-companion .is-happy{animation:friend-nod .8s ease-in-out}.token svg{transition:transform .15s}.token:active svg{transform:scale(.9)}
@keyframes bloom-pop{from{transform:scale(.5) translateY(15px);opacity:.3}to{transform:scale(1) translateY(0);opacity:1}}@keyframes friend-nod{0%,100%{transform:rotate(0)}40%{transform:rotate(-7deg)}70%{transform:rotate(5deg)}}
@media(max-width:600px){.game-companion{gap:12px;padding:16px 12px}.companion-svg{width:64px;height:80px}.game-companion strong{font-size:16px}.game-companion p:last-child{font-size:12px}.quest-trail{font-size:11px;gap:10px;align-items:start}.quest-trail span{flex-direction:column;gap:5px;text-align:center;flex:1}.story-problem{padding:16px 12px}.story-heading{gap:12px}.story-heading h3{font-size:20px}.story-question{font-size:18px}.story-picture{padding:14px 8px}.story-choices{gap:8px}.story-choices button{font-size:17px;padding:12px}.story-tokens span{font-size:30px}.story-pairs{gap:10px}.story-data strong{font-size:20px}.story-data span{padding:8px}.bloom-reward{padding:12px;gap:10px}.bloom-reward strong{font-size:15px}.garden-collection{padding:18px}.collection-intro{gap:12px}.collection-intro h2{font-size:23px}.story-sequence{font-size:25px}}
@media(prefers-reduced-motion:reduce){.bloom-reward svg,.game-companion .is-happy{animation:none}}
.story-heading>button{margin-left:auto;padding:8px 12px;min-width:55px;font-size:12px}.bloom-badge{position:absolute;right:12px;top:8px;font-size:27px;color:var(--green)}
@media(max-width:600px){.story-heading{flex-wrap:wrap}.story-heading>div{flex:1;min-width:150px}.story-heading>button{margin-left:0}.story-heading .companion-svg{width:56px}}
/* Moss participates in the picture, alongside the quantities used by the task. */
.moss-scene{margin:0;display:grid;grid-template-columns:190px minmax(0,1fr);gap:20px;align-items:center;text-align:center}.moss-actor{min-width:0}.moss-actor>.moss-illustration{display:block;width:100%;max-width:230px;height:auto;margin:auto}.moss-actor figcaption strong{display:block;font-size:18px;color:var(--ink)}.moss-actor figcaption span{display:block;font-size:12px;color:var(--muted);margin-top:5px}.moss-math-model{min-width:0;background:var(--surface);padding:18px;border:1px solid var(--line);border-radius:18px}.moss-math-model>.grow-svg{min-height:130px}.moss-flower-rows{display:grid;gap:8px;max-width:340px;margin:auto}.moss-flower-rows span{display:block;min-width:0}.moss-flower-rows svg{width:100%;height:auto;max-height:62px;display:block}.moss-cookie-bags{display:flex;flex-wrap:wrap;justify-content:center;gap:12px}.cookie-bag{display:grid;grid-template-columns:repeat(3,1fr);gap:2px;padding:10px 8px 8px;min-width:80px;max-width:110px;background:var(--yellow);border:2px solid #bea078;border-radius:7px 7px 18px 18px;box-shadow:inset 0 4px 0 #bea078}.cookie-bag span{font-size:20px}.moss-math-model .story-chart{padding:0}.game-companion .moss-illustration{width:116px;height:100px}.story-heading .moss-illustration{width:105px;height:80px}
@media(max-width:700px){.moss-scene{grid-template-columns:1fr;gap:18px}.moss-actor{display:flex;align-items:center;justify-content:center;gap:12px}.moss-actor>.moss-illustration{max-width:150px;width:45%;margin:0}.moss-actor figcaption{max-width:160px;text-align:left}.moss-actor figcaption strong{font-size:17px}.moss-math-model{padding:14px 10px}.moss-flower-rows{gap:5px}.moss-flower-rows svg{max-height:44px}.game-companion .moss-illustration{width:90px;height:82px}.story-heading .moss-illustration{width:82px;height:65px}}

.grow-svg.angle-diagram .angle-label{font-size:17px;font-weight:600;paint-order:stroke;stroke:var(--pale);stroke-width:3px;stroke-linejoin:round}
.counting-grid .tile{display:grid;place-items:center;min-width:0;min-height:44px;padding:0;color:var(--bg);font-size:clamp(22px,5vw,32px);line-height:1}.counting-grid .tile:hover{transform:none}.counting-grid .tile[aria-disabled=true]{cursor:default}.counting-grid .tile:focus-visible{outline-offset:-5px}
.packing-grid .tile{background:var(--surface);color:var(--ink)}.packing-grid .tile[data-pack-group]{background:var(--pack-color);border-color:var(--pack-border);color:#26332d}.packing-grid [data-pack-group="1"]{--pack-color:#c4dceb;--pack-border:#557b94}.packing-grid [data-pack-group="2"]{--pack-color:#f4d0ba;--pack-border:#9d6a49}.packing-grid [data-pack-group="3"]{--pack-color:#ddd1f0;--pack-border:#79639f}.packing-grid [data-pack-group="4"]{--pack-color:#f3e1a6;--pack-border:#927a37}.packing-grid [data-pack-group="5"]{--pack-color:#b9dec9;--pack-border:#4f7f67}.packing-grid [data-pack-group="6"]{--pack-color:#edc8dc;--pack-border:#98657e}.packing-progress{font-size:14px;font-weight:700;margin:18px 0 0}
