@font-face{font-family:Mitr;font-style:normal;font-weight:400;font-display:swap;src:url('./fonts/mitr-thai-400-normal.woff2') format('woff2');unicode-range:U+0E00-0E7F,U+200C-200D,U+25CC}
@font-face{font-family:Mitr;font-style:normal;font-weight:400;font-display:swap;src:url('./fonts/mitr-latin-400-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Mitr;font-style:normal;font-weight:500;font-display:swap;src:url('./fonts/mitr-thai-500-normal.woff2') format('woff2');unicode-range:U+0E00-0E7F,U+200C-200D,U+25CC}
@font-face{font-family:Mitr;font-style:normal;font-weight:500;font-display:swap;src:url('./fonts/mitr-latin-500-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:BakeryNumbers;font-style:normal;font-weight:700;font-display:swap;src:url('./fonts/nunito-latin-700-normal.woff2') format('woff2')}

:root{font-family:Mitr,'Leelawadee UI',Tahoma,sans-serif;color:#594737;background:#fbf7ef;font-synthesis:none;--coral:#cf674c;--sage:#5d775c;--ink:#594737;--line:#eae0d2;--play-blue:#286cc5;--play-blue-edge:#154980}
*{box-sizing:border-box}html{height:100%;overflow:hidden}body{margin:0;height:100vh;height:100dvh;display:flex;flex-direction:column;background:#fbf7ef;overflow:hidden}button,input{font:inherit}button{cursor:pointer;border:0;color:inherit;background:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation;transition:background .16s,transform .16s}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #173e78;outline-offset:4px}button:disabled{opacity:.45;cursor:default}button:active:not(:disabled){transform:translateY(2px)}h1,h2,h3,p{margin:0}b,strong{font-weight:500}[hidden]{display:none!important}.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap;border:0!important}.svg-library{position:absolute;width:0;height:0;overflow:hidden}.icon{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.icon-button{width:48px;height:48px;display:grid;place-items:center;border-radius:50%;flex-shrink:0}.icon-button:hover{background:#f0e8db}.skip-link{position:fixed;left:20px;top:12px;z-index:10;background:#fff;padding:14px;color:var(--ink)}.skip-link:not(:focus){clip-path:inset(50%);overflow:hidden;width:1px;height:1px;padding:0}
.site-header{height:66px;min-height:66px;padding:8px max(24px,env(safe-area-inset-right)) 8px max(24px,env(safe-area-inset-left));display:flex;align-items:center;gap:14px}.brand{display:flex;align-items:center;gap:10px;flex:1}.brand-mark{height:42px;width:42px;border-radius:15px;background:#f4ded1;display:grid;place-items:center;color:#715844;transform:rotate(-6deg)}.brand-mark svg{width:32px;height:34px}.brand-english{font-size:8px;letter-spacing:2.8px;display:block;color:#9c7960;margin-bottom:1px;font-weight:500}.brand h1{font-size:17px;font-weight:500}.top-nav{display:flex;align-items:center;gap:7px}.top-nav button{display:flex;justify-content:center;align-items:center;gap:6px;min-height:46px;min-width:46px;color:#385d90;background:#edf3fd;border:2px solid #6586b5;border-radius:18px;box-shadow:0 2px 0 #b9c9df}.top-nav button:hover{background:#dceafa}.star-total{background:#f3e6c9;min-width:26px;height:26px;display:grid;place-items:center;border-radius:8px;color:#967332;font:700 14px BakeryNumbers,sans-serif}.sound-button{border:2px solid #597caf;background:#edf3fd;color:#385d90;box-shadow:0 3px 0 #bacbe1}.sound-button[aria-pressed=true]{color:#244f85;background:#deecff;border-color:#4b79b6}
main{flex:1;min-height:0;padding:0 max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));outline:none}.game-world{width:100%;height:100%;position:relative;overflow:hidden;border:1px solid #e8decd;border-radius:27px;background:radial-gradient(ellipse at 50% 35%,#fff5e5 5%,#f4e5d1 95%);isolation:isolate}#scene{position:absolute;inset:0;width:100%;height:100%;touch-action:pan-y}#scene canvas{display:block;width:100%;height:100%;touch-action:none;-webkit-user-select:none;user-select:none}#scene canvas:focus-visible{outline:3px solid #628d7c!important;outline-offset:-6px;border-radius:26px}.scene-loading{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;color:#977b61;font-size:14px}.loading-bunny{width:74px;height:74px;border-radius:50%;background:#f2dfcf;display:grid;place-items:center}.loading-bunny svg{width:52px;height:52px;animation:soft-hop 1.4s ease-in-out infinite}
.world-hud{position:absolute;inset:0;pointer-events:none}.world-hud button{pointer-events:auto}.game-topline{position:absolute;left:20px;right:20px;top:17px;display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.learning-tools{width:210px;flex-shrink:0}.mode-selector{height:61px;display:flex;border:1px solid #e7d8c3;background:#fffaf0f5;border-radius:20px;padding:5px;gap:4px;box-shadow:0 4px 12px #8b6d3510}.mode-button{flex:1;display:flex;gap:3px;flex-direction:column;align-items:center;justify-content:center;border-radius:15px;color:#355982;background:#eaf1fb;border:1px solid #6d8bb0;border-bottom:3px solid #6d8bb0;min-width:52px;position:relative}.mode-symbol{font:700 25px/1 BakeryNumbers,sans-serif}.count-symbol{font-size:19px;letter-spacing:-1px}.mode-button small{font-size:10px}.mode-button.active{background:var(--play-blue);color:#fff;border-color:var(--play-blue-edge);box-shadow:inset 0 2px 0 #ffffff35}.mode-button.active::after{content:"";position:absolute;bottom:2px;left:50%;transform:translateX(-50%);width:18px;height:2px;border-radius:2px;background:currentColor}.mode-button:hover:not(.active){background:#d6e6fc}.session-progress{display:flex;align-items:center;gap:10px;margin:10px 7px 0}.progress-stars{display:flex;gap:5px;flex:1;justify-content:space-between}.progress-star{height:22px;display:flex;align-items:center;justify-content:center;color:#d9c7aa}.progress-star .icon{width:22px;height:22px;fill:currentColor;stroke:none}.progress-star.earned{color:#daa13e;animation:happy-pop .4s ease}.round-pill{font:700 12px BakeryNumbers,sans-serif;color:#9c8260;white-space:nowrap}
.question-bubble{display:flex;align-items:center;gap:13px;border:1px solid #e5d7c0;background:#fffcf3f2;border-radius:23px;padding:11px 12px 11px 20px;box-shadow:0 5px 0 #dac9ad38;max-width:420px;pointer-events:auto}.question-copy{display:flex;flex-direction:column;align-items:center;gap:3px}#question-prompt{font-weight:400;font-size:clamp(1rem,.8rem + .7vw,1.3rem);outline:none;line-height:1.5;white-space:nowrap}.read-button{background:var(--play-blue);color:#fff;width:50px;height:50px;border:2px solid var(--play-blue-edge);box-shadow:0 3px 0 #17477b,inset 0 2px 0 #ffffff35}.read-button:hover{background:#195cb4}.read-button .icon{width:25px;height:25px}.equation{font:700 29px/1.2 BakeryNumbers,sans-serif;display:flex;gap:9px;align-items:center;justify-content:center;color:#916d49;white-space:nowrap}.question-mark{color:#be7052;background:#f4e5cf;border-radius:8px;padding:0 8px}.equation.solved{color:#668750}.game-world[data-mode=count] .equation{display:none}.cake-equation{width:30px;height:30px}
.play-tip{position:absolute;left:26px;bottom:100px;display:flex;align-items:center;gap:7px;color:#ab8b65;font-size:11px;background:#fff8e9d9;padding:7px 12px;border:1px solid #e5d7c0;border-radius:18px}.play-tip>span:first-of-type{font:700 22px BakeryNumbers,sans-serif}.cake-pictogram{width:25px;height:25px;fill:#f3c6bb;stroke:#b18560;stroke-width:1.5}.mini-tray{display:inline-flex;gap:3px;padding:6px 4px;border:2px solid #84ada1;border-radius:6px;background:#d6e5d8}.mini-tray i{width:5px;height:5px;border-radius:50%;background:#fff9ec}.world-tool{width:52px;height:52px;background:#ffcf55;border:2px solid #926000;box-shadow:0 4px 0 #9c6e16,inset 0 2px 0 #fff4c6;color:#654000}.world-tool:hover{background:#ffdc79}.world-tool .icon{width:25px;height:25px}.reset-tool{position:absolute;left:25px;bottom:26px;background:#e9ddff;color:#503281;border-color:#7656a3;box-shadow:0 4px 0 #7656a3,inset 0 2px 0 #fff}.reset-tool:hover{background:#dbc8fa}.hint-area{position:absolute;right:25px;bottom:26px;display:flex;flex-direction:column;align-items:flex-end;gap:12px}.ten-frame{width:159px;display:grid;grid-template-columns:repeat(5,1fr);gap:5px;padding:8px;background:#fff8eced;border:1px solid #e0d1ba;border-radius:13px}.ten-dot{height:23px;border-radius:5px;background:#e9dfd1;display:grid;place-items:center;font:700 15px BakeryNumbers,sans-serif;color:#fff}.ten-dot.filled{background:#b08b64}
.answer-area{position:absolute;left:50%;bottom:18px;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:9px;max-width:calc(100% - 190px)}.answer-dock{padding:10px 13px 12px;border:2px solid #b59a72;border-radius:25px;background:#fff8e8;box-shadow:0 5px 0 #b9916066,0 8px 23px #6c503129;display:flex;align-items:center;gap:12px;pointer-events:auto}.answer-choices{display:grid;grid-template-columns:repeat(3,92px);gap:12px}.answer-choice{--answer-face:#ffcd42;--answer-ink:#614000;--answer-edge:#986000;font-family:BakeryNumbers,sans-serif;font-size:42px;font-weight:700;height:84px;position:relative;border-radius:19px;background:var(--answer-face);color:var(--answer-ink);border:2px solid var(--answer-edge);border-bottom:7px solid var(--answer-edge);box-shadow:inset 0 3px 0 #ffffff60,0 2px 0 #54391329;text-shadow:none}.answer-choice:nth-child(2){--answer-face:#ff947e;--answer-ink:#70271f;--answer-edge:#a0382c}.answer-choice:nth-child(3){--answer-face:#91d96a;--answer-ink:#255025;--answer-edge:#3a752e}.answer-choice:hover:not(:disabled){filter:brightness(1.04);transform:translateY(-2px)}.answer-choice:active:not(:disabled){transform:translateY(4px);border-bottom-width:3px;box-shadow:inset 0 2px 5px #54391344}.answer-choice.wrong{border-color:#9f650e;background:#ffe4a1;color:#654000;text-shadow:none;animation:gentle-wiggle .35s ease}.answer-choice.wrong::after{content:"↻";position:absolute;right:-8px;top:-10px;display:grid;place-items:center;width:29px;height:29px;border-radius:50%;background:#fff5da;border:2px solid #9f650e;color:#754600;font-size:21px;line-height:1}.answer-choice.correct:disabled{opacity:1;background:#247843;color:#fff;border-color:#124b29;box-shadow:inset 0 3px #ffffff38,0 0 0 3px #d3eac9}.answer-check{position:absolute;right:-9px;top:-11px;background:#fff;color:#186138;border:2px solid #186138;border-radius:50%;width:31px;height:31px;line-height:27px;font-size:22px;display:none}.correct .answer-check{display:block}.feedback{font-size:15px;line-height:1.5;border-radius:17px;color:#8e704c;background:#fff7e8f5;border:1px solid #dfceb4;box-shadow:0 2px 7px #74542d0d;white-space:nowrap}.feedback:empty{display:none}.feedback:not(:empty){padding:8px 18px}.feedback.success{background:#edf3e2;color:#597848;border-color:#c5d8af}.primary-button{width:100%;min-height:54px;padding:12px 18px;background:var(--coral);color:#fff8ec;border-radius:14px;border:0;border-bottom:4px solid #b3513c;display:flex;align-items:center;justify-content:center;gap:13px;font-size:16px}.primary-button:hover{background:#bd5c43}.primary-button.success{background:#247843;border:2px solid #124b29;border-bottom:5px solid #124b29;box-shadow:inset 0 2px #ffffff35}.next-button{width:85px;min-height:78px;flex-direction:column;gap:4px;font-size:14px;padding:9px;flex-shrink:0}.next-button .icon{width:26px;height:26px}.text-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:5px 0;font-size:12px}.eyebrow{font-size:11px;color:#a18265;display:flex;align-items:center;gap:8px;margin-bottom:8px}
.welcome-play{display:flex;align-items:center;justify-content:center;gap:20px;margin:26px 0 31px;font-size:34px;color:#b58a60}.welcome-play>.cake-pictogram{width:44px;height:44px}.welcome-tray{display:flex;gap:5px;background:#dde8d8;padding:12px;border-radius:16px;border:3px solid #b5cbb3}.welcome-tray .cake-pictogram{width:37px;height:37px}#welcome-dialog{max-width:390px;padding:35px 30px 30px}#start-game{min-height:70px;font-size:23px;gap:20px}.play-triangle{font-size:27px}#welcome-dialog .dialog-illustration{width:98px;height:98px;margin-bottom:22px}#welcome-dialog .dialog-illustration svg{height:72px;width:72px}
@keyframes gentle-wiggle{0%,100%{transform:translateX(0)}30%{transform:translateX(-4px)}70%{transform:translateX(4px)}}
dialog{width:min(460px,calc(100vw - 32px));max-height:calc(100dvh - 40px);border:1px solid #e7d7c3;border-radius:28px;padding:35px 32px 26px;background:#fffbf3;color:var(--ink);box-shadow:0 25px 100px #402a2333;overflow:auto}dialog::backdrop{background:#59432f50;backdrop-filter:blur(5px)}.dialog-close{position:absolute;top:12px;right:12px;font-size:25px;color:#385d90;background:#edf3fd;border:2px solid #6586b5}.dialog-illustration{height:80px;width:80px;background:#f7e4d3;border-radius:25px;display:grid;place-items:center;margin:0 auto 18px;transform:rotate(-5deg)}.dialog-illustration svg{height:57px;width:57px;color:#7d5a43}.dialog-eyebrow{justify-content:center;font-size:11px;margin-top:10px}dialog h2{text-align:center;font-size:24px;font-weight:500;line-height:1.6}.dialog-subtitle{text-align:center;color:#9d856c;font-size:12px;line-height:1.9;margin:10px 0 20px}.help-steps{list-style:none;padding:0;margin:24px 0;display:grid;gap:17px}.help-steps li{display:flex;gap:14px;align-items:flex-start}.help-steps li>span{height:30px;width:30px;border-radius:10px;display:grid;place-items:center;background:#f1e2cb;color:#a67a43;flex-shrink:0}.help-steps b{font-size:13px}.help-steps p{font-size:11px;color:#967f65;line-height:1.9;margin-top:3px}.settings-row{display:flex;justify-content:space-between;align-items:center;background:#f4eddf;border-radius:12px;padding:12px 14px;font-size:12px}.settings-row input{width:22px;height:22px;accent-color:#758e60}.small-note{font-size:10px;line-height:1.8;color:#aa9279;margin:15px 0 20px}.big-star{font-size:70px;text-align:center;color:#dfb052;line-height:1.2;text-shadow:0 4px #bd8d35}.saved-progress{display:grid;gap:10px;margin:21px 0}.saved-mode{display:flex;align-items:center;padding:15px 17px;background:#f5ecdc;border-radius:14px;gap:12px;font-size:13px}.saved-mode>span:first-child{font-size:20px;color:#b78c54;min-width:34px;text-align:center}.saved-mode strong{margin-left:auto;color:#b78c38;font-size:18px}.complete-medal{width:95px;height:95px;margin:5px auto 20px;border-radius:50%;display:grid;place-items:center;background:#f8e7b6;border:5px solid #eed399;box-shadow:0 5px #d8b875;position:relative;color:#ad7f31}.complete-medal svg{width:48px;height:48px;fill:#fff7e2;stroke:currentColor;stroke-width:1.3;stroke-linejoin:round}.complete-medal span{position:absolute;bottom:-9px;right:-1px;font-size:31px;line-height:1;color:#d49e42;transform:rotate(12deg)}.complete-stars{text-align:center;color:#d6a34b;font-size:32px;letter-spacing:5px;margin:15px 0}.summary-note{background:#eff1e2;padding:13px 18px;border-radius:13px;font-size:12px;color:#73805b;text-align:center;line-height:1.9;margin-bottom:22px}.secondary-button{min-height:47px;width:100%;border:2px solid #6586b5;border-bottom:4px solid #6586b5;color:#355982;border-radius:13px;font-size:13px;margin-top:10px;background:#eaf1fb}.secondary-button:hover{background:#efe2cf}.break-button{display:flex;margin:10px auto 0;color:#a58a6c}.noscript-note{position:fixed;inset:auto 15px 20px;padding:20px;background:#fff3d8;border:1px solid #9a704e;border-radius:12px;z-index:5}.scene-error{position:absolute;inset:70px 30px 100px;display:flex;align-items:center;justify-content:center;text-align:center;font-size:13px;color:#927756;background:#f9eedc;border-radius:20px;padding:30px;line-height:2}.scene-error p{max-width:340px}@keyframes soft-hop{0%,100%{transform:translateY(0) rotate(-3deg)}50%{transform:translateY(-6px) rotate(3deg)}}@keyframes happy-pop{0%{transform:scale(.85)}70%{transform:scale(1.1)}100%{transform:scale(1)}}.pop{animation:happy-pop .35s ease}

@media(max-width:850px) and (min-width:601px){.game-topline{left:19px;right:19px;top:20px}.question-bubble{max-width:350px}.question-copy{gap:4px}.answer-area{bottom:26px}.answer-choice{height:90px;font-size:46px}.answer-choices{grid-template-columns:repeat(3,100px);gap:15px}.answer-dock{padding:12px 16px 14px}.play-tip{bottom:138px}.reset-tool,.hint-area{bottom:42px}}
@media(max-height:700px) and (min-width:601px){.site-header{height:58px;min-height:58px}.game-topline{top:12px;left:16px;right:16px}.mode-selector{height:54px}.learning-tools{width:196px}.session-progress{margin-top:6px}.question-bubble{padding:8px 10px 8px 16px}.read-button{width:46px;height:46px}.answer-area{bottom:12px}.answer-choice{height:70px;font-size:38px}.answer-choices{grid-template-columns:repeat(3,85px)}.answer-dock{padding:8px 11px 10px;border-radius:21px}.play-tip{bottom:87px}.reset-tool,.hint-area{bottom:19px}.next-button{min-height:66px}}
@media(max-width:600px){.site-header{height:60px;min-height:60px;padding:6px 14px;gap:7px}.brand{gap:8px}.brand h1{font-size:13px}.brand-english{font-size:6px;letter-spacing:1.8px}.brand-mark{height:36px;width:34px;border-radius:13px}.brand-mark svg{width:28px}.top-nav{gap:0}.top-nav button{min-width:39px;min-height:44px}.top-nav #open-help{display:none}.top-nav .icon{width:21px;height:21px}.star-total{min-width:21px;height:23px;font-size:12px}.sound-button{width:44px;height:44px}main{padding:0 6px max(6px,env(safe-area-inset-bottom))}.game-world{border-radius:21px}.game-topline{left:10px;right:10px;top:12px;gap:8px;align-items:flex-start}.learning-tools{width:145px}.mode-selector{height:55px;padding:4px;border-radius:16px;gap:0}.mode-button{min-width:42px;border-radius:12px}.mode-symbol{font-size:22px}.count-symbol{font-size:16px}.mode-button small{font-size:9px}.session-progress{gap:6px;margin:7px 4px 0}.progress-star .icon{width:18px;height:18px}.round-pill{font-size:10px}.progress-stars{gap:2px}.question-bubble{gap:5px;padding:9px 7px 9px 10px;border-radius:17px;max-width:calc(100% - 150px)}#question-prompt{font-size:13px}.read-button{width:42px;height:44px}.read-button .icon{height:20px;width:20px}.equation{font-size:21px;gap:4px}.question-mark{padding:0 5px}.question-copy{gap:4px}.answer-area{bottom:18px;max-width:calc(100% - 20px)}.answer-choices{grid-template-columns:repeat(3,74px);gap:9px}.answer-choice{height:72px;font-size:36px;border-radius:16px}.answer-dock{padding:9px 10px 11px;border-radius:21px;gap:8px}.feedback{font-size:12px}.feedback:not(:empty){padding:7px 13px}.next-button{width:60px;min-height:66px;font-size:12px}.next-button .icon{width:22px}.world-tool{height:46px;width:46px}.reset-tool{left:12px;bottom:126px}.hint-area{right:12px;bottom:126px}.play-tip{left:50%;transform:translateX(-50%);bottom:130px;white-space:nowrap;padding:5px 8px;font-size:9px;gap:5px}.play-tip .cake-pictogram{height:20px;width:20px}.ten-frame{width:142px}.ten-dot{height:20px;font-size:13px}.game-world:has(.ten-frame:not([hidden])) .play-tip{visibility:hidden}.game-world:has(.feedback:not(:empty)) .play-tip{visibility:hidden}dialog{padding:30px 24px 22px}dialog h2{font-size:21px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}body.reduce-motion *,body.reduce-motion *::before,body.reduce-motion *::after{animation:none!important;transition:none!important}

/* The guide sits over the scene without taking any of the child's touch input. */
#drag-tutorial{position:absolute;inset:0;pointer-events:none;z-index:2;overflow:hidden}
#drag-tutorial>*{position:absolute;left:0;top:0;pointer-events:none}
.tutorial-hand{width:96px;height:96px;object-fit:contain;filter:drop-shadow(0 3px 3px #76564438);transform-origin:30.72px 8.16px;user-select:none;-webkit-user-drag:none}
.tutorial-target{width:76px;height:44px;border:3px solid #ffd24f;border-radius:50%;background:#ffe35b28;box-shadow:0 0 0 1.5px #fff8}
.tutorial-path{width:100%;height:100%;overflow:visible;filter:drop-shadow(0 1px 1px #fff)}
.tutorial-route{fill:none;stroke:#287c90;stroke-width:3;stroke-dasharray:5 9;stroke-linecap:round}
#tutorial-arrow path{fill:none;stroke:#287c90;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
/* Keep affordances visible when the system substitutes its own colors. */
@media(forced-colors:active){button,.answer-dock{border:2px solid ButtonText!important;box-shadow:none!important}.mode-button.active,.answer-choice.correct:disabled{outline:3px solid Highlight;outline-offset:-5px}.answer-choice.wrong{border-style:dashed!important}.answer-check,.answer-choice.wrong::after{background:Canvas;color:CanvasText;border-color:CanvasText}}
