.toy-games{width:100%;max-width:820px;margin:0 auto;text-align:center;color:#34495f}.toy-selection{display:grid;grid-template-columns:1fr 1fr;gap:24px;padding:12px}.toy-course{border:0;border-radius:30px;background:#e5f3fa;padding:24px;color:inherit;font:inherit;cursor:pointer;box-shadow:0 6px 0 #c4e1eb}.toy-course:nth-child(2){background:#fff0cb;box-shadow:0 6px 0 #eedbae}.toy-course svg{width:145px;max-width:80%;height:auto}.toy-course h2{font-size:30px;margin:12px 0}.toy-course p{margin:8px;font-size:18px}.toy-button{border:0;background:#e8f4f8;border-radius:18px;min-height:48px;padding:10px 18px;font:inherit;font-weight:800;color:#446879;cursor:pointer}.toy-button:disabled{opacity:.45;cursor:default}.toy-button:active,.toy-course:active{transform:translateY(3px)}.toy-modes,.toy-toolbar{display:flex;justify-content:center;flex-wrap:wrap;gap:12px;margin:14px auto}.toy-modes button[aria-pressed=true]{background:#d4eddd;outline:3px solid #91bca4}.toy-title{font-size:26px;margin:0 0 12px}.toy-turn{min-height:44px;display:flex;justify-content:center;align-items:center;gap:14px;font-size:20px;font-weight:800;margin:12px}.toy-turn>.toy-piece{width:28px;height:28px}.toy-board{display:grid;position:relative;margin:16px auto;user-select:none}.tic-board{grid-template-columns:repeat(3,1fr);gap:12px;padding:16px;border-radius:28px;background:#fbe9c7;width:min(100%,410px);box-sizing:border-box}.toy-cell{position:relative;display:flex;align-items:center;justify-content:center;border:0;padding:0;cursor:pointer;aspect-ratio:1;background:#fffaf0;border-radius:18px}.toy-cell:disabled{cursor:default}.toy-piece{display:block;width:65%;height:65%;border-radius:50%;box-sizing:border-box;pointer-events:none}.toy-piece.blue{background:#7bbfd7;box-shadow:inset 0 -5px 0 #5c9fbb}.toy-piece.coral{background:#e89d9e;box-shadow:inset 0 -5px 0 #cc858e}.tic-board .toy-piece.blue{background:transparent;border:12px solid #7bbfd7;box-shadow:none}.toy-piece.cross{position:relative;border-radius:0;background:transparent;box-shadow:none}.toy-piece.cross:before,.toy-piece.cross:after{content:'';position:absolute;left:43%;top:0;width:16%;height:100%;border-radius:10px;background:#e89d9e;transform:rotate(45deg)}.toy-piece.cross:after{transform:rotate(-45deg)}.just-placed{animation:toy-pop .32s ease-out}.winning{background:#d9edcc}.winning .toy-piece{animation:toy-wiggle .7s ease-in-out 2}.gomoku-board{grid-template-columns:repeat(15,1fr);width:min(100%,620px);background:#f8dfb3;padding:10px;border-radius:20px;box-sizing:border-box;box-shadow:0 5px 0 #e9c894}.gomoku-board .toy-cell{border-radius:0;background:linear-gradient(#caa675,#caa675) center/1px 100% no-repeat,linear-gradient(#caa675,#caa675) center/100% 1px no-repeat;touch-action:none}.gomoku-board .toy-piece{width:85%;height:85%;box-shadow:inset 0 -2px 0 #507d96}.gomoku-board .preview:after{content:'';width:85%;height:85%;position:absolute;border-radius:50%;background:#7bbfd780;border:2px dashed #4d8ca7;box-sizing:border-box}.gomoku-board .winning{background-color:#cfe9ba}.toy-cell:focus-visible,.toy-button:focus-visible,.toy-course:focus-visible{outline:4px solid #537ba3;outline-offset:3px}.toy-tip{font-size:15px;color:#637989}.toy-finish{position:relative;overflow:hidden;border-radius:26px;background:#e5f2e8;padding:18px;margin:18px auto 0;max-width:460px;animation:toy-reveal .35s ease-out}.toy-finish.learn{background:#eaf0fb}.toy-finish.draw{background:#f6eafa}.toy-friend{width:84px;height:84px;animation:toy-bounce .5s ease-out 2}.learn .toy-friend{animation:toy-wave .7s ease-in-out 2}.draw .toy-friend{animation:toy-wiggle .7s ease-in-out 2}.toy-finish h3{font-size:24px;margin:6px}.toy-finish p{font-size:16px;line-height:1.6}.toy-paper{position:absolute;left:var(--x);top:-15px;width:9px;height:17px;border-radius:3px;pointer-events:none;animation:toy-confetti 1s ease-out forwards;transform:rotate(var(--angle))}.toy-finish .toy-button{background:#fff}.toy-finish>*:not(.toy-paper){position:relative;z-index:1}@keyframes toy-pop{0%{transform:scale(.3)}65%{transform:scale(1.12)}100%{transform:scale(1)}}@keyframes toy-wiggle{0%,100%{transform:rotate(0)}30%{transform:rotate(-7deg)}70%{transform:rotate(7deg)}}@keyframes toy-bounce{50%{transform:translateY(-12px)}}@keyframes toy-wave{50%{transform:rotate(-9deg) translateY(-3px)}}@keyframes toy-confetti{to{top:100%;transform:rotate(calc(var(--angle) + 140deg));opacity:0}}@keyframes toy-reveal{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}@media(max-width:600px){.toy-selection{gap:14px;padding:0}.toy-course{padding:18px 8px}.toy-course h2{font-size:24px}.toy-course p{margin:8px;font-size:15px}.toy-toolbar{gap:8px}.toy-toolbar .toy-button{padding:10px 12px}.tic-board{gap:9px;padding:12px;width:min(100%,350px)}.tic-board .toy-piece.blue{border-width:10px}.gomoku-board{padding:5px}.toy-turn{font-size:18px}.toy-finish h3{font-size:21px}}@media(prefers-reduced-motion:reduce){.toy-games *{animation:none!important;transition:none!important}}
.app[data-scene="games"] .scene-nav{position:static;transform:none;margin:24px auto 0;width:max-content;max-width:100%}
.app[data-scene="games"] .board{margin-bottom:0}
.app[data-scene="games"] .board:has(.toy-title)>.board-head{display:none}
@media(orientation:landscape) and (min-width:700px){.gomoku-board{width:min(100%,620px,calc(100svh - 330px))}}
.toy-modes .toy-button{display:flex;align-items:center;gap:8px}.toy-modes svg{width:30px;height:30px}
.toy-parent{display:flex;flex-wrap:wrap;gap:16px;margin:8px 0 16px}.toy-parent label{display:flex;align-items:center;gap:8px}.toy-parent select{font:inherit;padding:8px;border:1px solid #c9dde6;border-radius:10px}.toy-parent input{width:20px;height:20px;accent-color:#5c9fbb}
.gomoku-board{grid-template-columns:repeat(var(--board-size,15),1fr)}.toy-hint{display:flex;align-items:center;gap:6px}.toy-hint svg{width:27px;height:27px}.toy-cell.hinted:after{content:'';position:absolute;inset:12%;border:3px dashed #d89a35;border-radius:50%;background:#ffda7055;pointer-events:none;animation:toy-hint-pulse 1s ease-in-out 3}.your-turn>.toy-piece{animation:toy-breathe 1.8s ease-in-out 3}
.toy-tutorial{padding:18px;margin:0 auto 18px;max-width:460px;border-radius:24px;background:#fff1ca}.toy-demo{display:flex;gap:12px;justify-content:center;position:relative;padding:16px}.toy-demo:after{content:'';position:absolute;left:10%;right:10%;top:50%;height:5px;border-radius:3px;background:#83b98b;animation:toy-demo-line 2s ease-out forwards}.toy-demo>.toy-piece{position:relative;z-index:1;width:42px;height:42px;animation:toy-demo-piece .3s ease-out both}.toy-tutorial p{font-weight:800;font-size:18px}.toy-help-offer{display:flex;align-items:center;justify-content:center;gap:10px;margin:12px auto;background:#fff1ca}.toy-help-offer svg{width:38px;height:38px}
@keyframes toy-demo-piece{from{opacity:0;transform:scale(.2)}to{opacity:1;transform:scale(1)}}@keyframes toy-demo-line{0%,65%{transform:scaleX(0)}100%{transform:scaleX(1)}}@keyframes toy-breathe{50%{transform:scale(1.15);filter:brightness(1.1)}}@keyframes toy-hint-pulse{50%{transform:scale(.9);background:#ffda7099}}
.parent-save-bar{position:sticky;bottom:-18px;background:#fff;padding:12px 0 8px;border-top:1px solid #ddeaf0;z-index:2}.parent-save-bar p{font-size:14px}.parent-save-bar button{border:0;border-radius:12px;padding:12px 16px;min-height:44px;color:#345970;background:#d5eddd;font:inherit;font-weight:800;margin:4px}.parent-save-bar button:disabled{opacity:.5}.parent-close-prompt{background:#fff0d3;padding:10px;border-radius:12px}.toy-settings-note{width:100%;font-size:13px}.parent-game-group h3{margin:14px 0 8px}.toy-selection{grid-template-columns:repeat(3,minmax(0,1fr));touch-action:manipulation;overscroll-behavior:contain}.toy-course h2{font-size:24px}.toy-course svg{width:110px}.toy-course:nth-child(3){background:#e9e1f7;box-shadow:0 6px 0 #d3c5e5}.toy-course:nth-child(4){background:#e1efda;box-shadow:0 6px 0 #c4d9b9}.toy-course:nth-child(5){background:#ffe2cd;box-shadow:0 6px 0 #efc9aa}.fun-play{position:relative;overflow:hidden;min-height:200px;padding:18px;border-radius:24px;background:#fff5de}.fun-status{min-height:26px;font-size:18px;font-weight:800}.memory-table{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.memory-card{position:relative;border:0;background:#86bad0;border-radius:20px;min-height:130px;cursor:pointer;font:inherit;box-shadow:0 5px 0 #6497af}.memory-card>span{display:flex;position:absolute;inset:0;flex-direction:column;align-items:center;justify-content:center;backface-visibility:hidden;transition:transform .35s}.memory-card svg{width:80px;height:80px}.memory-front{transform:rotateY(180deg);background:#fffaf0;border-radius:20px}.memory-front strong{font-size:22px}.flipped .memory-back{transform:rotateY(180deg)}.flipped .memory-front{transform:rotateY(0)}.matched{box-shadow:0 5px 0 #9cb989}.matched .memory-front{background:#dceecf}.home-friend svg{width:110px;height:110px;animation:toy-bounce .5s 2}.animal-homes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:20px}.animal-home{position:relative;border:0;border-radius:20px;background:#fffaf0;padding:14px;cursor:pointer;font:inherit;font-weight:800;color:#446879}.animal-home>svg{width:130px;max-width:80%}.animal-home strong{display:block;font-size:20px}.home-sign{position:absolute;right:12px;top:10px;background:#e6f2f5;border-radius:50%;padding:5px}.home-sign svg{width:40px;height:40px}.home-arrival>span:last-child{position:absolute;inset:10% 25%;animation:animal-arrive .65s ease-out}.home-arrival>span:last-child svg{width:100%;height:100%}.fun-success{animation:toy-reveal .4s ease-out}.fun-gentle{animation:toy-wave .4s 1}.fun-train-track{display:flex;align-items:flex-end;gap:5px;margin:25px 0;border-bottom:5px dashed #b9c5b3;padding-bottom:8px}.train-engine{flex:0 0 75px}.train-engine svg{width:75px}.train-carriage{flex:1;min-width:0;background:#8bc3d8;min-height:65px;border-radius:12px 12px 8px 8px;padding:8px 2px;display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:800;position:relative}.train-carriage:after{content:'';position:absolute;bottom:-12px;left:15%;width:14px;height:14px;border-radius:50%;background:#60798d;box-shadow:28px 0 #60798d}.train-carriage:nth-child(odd){background:#f3c488}.train-tickets{display:flex;flex-wrap:wrap;justify-content:center;gap:14px;margin:35px 0}.train-ticket{border:0;border-radius:18px;background:#fffaf0;color:#446879;font:inherit;font-size:26px;font-weight:800;min-width:76px;min-height:76px;padding:12px;cursor:pointer;box-shadow:0 4px 0 #e5d5b1}.train-ticket:disabled{opacity:.3;cursor:default}.ticket-day{display:block;font-size:28px}.train-ticket:has(.ticket-day){font-size:15px}.ticket-arrival{animation:toy-pop .35s}.train-depart{animation:train-depart 1.1s ease-in forwards}.fun-play button:focus-visible{outline:4px solid #537ba3;outline-offset:2px}@keyframes animal-arrive{from{opacity:0;transform:translateY(-50px) scale(.5)}to{opacity:1;transform:none}}@keyframes train-depart{to{transform:translateX(110%);opacity:.2}}
@media(max-width:900px){.toy-selection{grid-template-columns:repeat(2,minmax(0,1fr))}.toy-course:last-child{grid-column:1/-1;max-width:380px;width:100%;justify-self:center;box-sizing:border-box}}@media(max-width:600px){.toy-course h2{font-size:20px}.memory-table{grid-template-columns:repeat(2,minmax(0,1fr))}.memory-card{min-height:130px}.fun-play{padding:12px}.train-engine{flex-basis:42px}.train-engine svg{width:42px}.train-carriage{font-size:12px;min-height:48px}.train-carriage:after{width:8px;height:8px;bottom:-8px;box-shadow:15px 0 #60798d}.animal-home>svg{width:100px}.home-sign{right:5px;top:5px}.home-sign svg{width:30px;height:30px}}
.memory-table:has(.memory-card:nth-child(6)):not(:has(.memory-card:nth-child(7))){grid-template-columns:repeat(3,minmax(0,1fr))}@media(max-width:600px){.memory-table:has(.memory-card:nth-child(6)):not(:has(.memory-card:nth-child(7))){grid-template-columns:repeat(2,minmax(0,1fr))}}
.toy-course:nth-child(4){background:#e5e0f7;box-shadow:0 6px 0 #c9c1e7}

.toy-piece.black{background:#292929;border:1px solid #171717;box-shadow:inset 0 -4px 0 #111}.toy-piece.white{background:#fff;border:2px solid #aaa;box-shadow:inset 0 -4px 0 #ddd}.gomoku-board .toy-piece.black{box-shadow:inset 0 -2px 0 #111}.gomoku-board .toy-piece.white{box-shadow:inset 0 -2px 0 #ddd}.gomoku-board[data-turn="1"] .preview:after{background:#29292980;border-color:#292929}.gomoku-board[data-turn="2"] .preview:after{background:#ffffffb0;border-color:#888}

.toy-nudge{animation:toy-wiggle .3s ease-in-out}.toy-cell.winning:not(:disabled){cursor:pointer}
.math-progress{display:flex;justify-content:center;gap:10px;margin:10px}.math-progress span{width:15px;height:15px;border-radius:50%;background:#d5e6ed}.math-progress .done{background:#77b497}.math-play{min-height:260px}.math-play button,.math-group-end button{font:inherit;color:inherit;cursor:pointer}.math-play button:disabled{cursor:default}.math-shape{width:100%;height:100%;max-height:95px}.math-strand{display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap;padding:24px 0;margin:10px 0 20px;background:linear-gradient(#d6baa0,#d6baa0) center/90% 3px no-repeat}.math-strand>span{display:grid;place-items:center;width:64px;height:64px;background:#fff5de}.math-gap{border:3px dashed #aec3c9;border-radius:50%;font-size:30px;font-weight:800}.math-choices{display:flex;justify-content:center;flex-wrap:wrap;gap:16px}.math-choice{width:90px;height:90px;border:0;border-radius:18px;background:#fffaf1;padding:8px;box-shadow:0 4px 0 #dfcfae}.math-choice:disabled{opacity:.25}.math-choices .math-choice:active{transform:translateY(3px)}.math-play .math-hint{outline:4px solid #e5b94f;outline-offset:3px}.math-correct{animation:toy-pop .35s ease-out}.math-picnic{display:flex;justify-content:center;flex-wrap:wrap;gap:16px}.math-bear-seat{border:0;background:#e8f1dd;padding:12px;border-radius:24px;width:125px}.math-bear-seat>svg{width:100%;height:95px}.math-plate{display:grid;place-items:center;height:65px;background:#fffaf1;border:3px solid #d7ddc2;border-radius:50%;margin-top:8px}.math-plate svg{width:60px;height:60px;animation:toy-pop .3s ease-out}.math-fed{background:#d4e9cb}.math-basket{display:flex;justify-content:center;gap:8px;min-height:70px;margin:24px auto 0;border-bottom:6px solid #b99d7a;max-width:440px}.math-basket span{width:60px;height:60px}.math-basket svg{width:100%}.math-number-table{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.math-number-card{position:relative;min-height:140px;border:3px solid transparent;border-radius:20px;background:#fffaf1;padding:12px}.math-number-card strong{font-size:54px}.math-dots{display:grid;grid-template-columns:repeat(2,25px);justify-content:center;gap:12px}.math-dots i{display:block;width:25px;height:25px;border-radius:50%;background:#c27654}.math-card-content{display:grid;place-items:center;min-height:104px}.math-card-cover{display:none}.math-card-cover svg{width:85px}.concealed:not(.flipped):not(.matched) .math-card-cover{display:grid;place-items:center}.concealed:not(.flipped):not(.matched) .math-card-content{display:none}.math-number-card.matched{background:#dceecf;opacity:.65}.math-selected{border-color:#6ba6c1!important;outline:3px solid #6ba6c1;outline-offset:2px}.math-scene{position:relative;width:min(100%,320px);aspect-ratio:1;margin:0 auto 25px;background:#e2f2f8;border-radius:24px}.math-scene.boat{background:linear-gradient(#e2f2f8 70%,#b2dce8 70%)}.math-slot{position:absolute;border:0;background:transparent;padding:0}.math-slot svg{max-height:none;stroke-dasharray:5 4}.math-slot[data-filled=yes] svg{stroke-dasharray:none;animation:toy-pop .35s ease-out}.math-slot.math-selected{outline:none}.math-slot.math-selected svg{filter:drop-shadow(0 0 4px #6ba6c1)}.math-group-end{display:flex;justify-content:center;gap:16px;margin:20px 0}.math-group-end button{display:flex;align-items:center;gap:8px;background:#d4eddd;min-height:64px}.math-group-end svg,.math-play~.math-group-end svg,.toy-toolbar button>svg{width:32px;height:32px}.toy-course:nth-child(5){background:#ffe5df}.toy-course:nth-child(6){background:#f8e9cb}.toy-course:nth-child(7){background:#ddeef4}.toy-course:nth-child(8){background:#dbeedc}@media(max-width:900px){.toy-selection .toy-course:last-child{grid-column:auto;max-width:none}.math-number-card{min-height:125px}}@media(max-width:600px){.math-strand>span{width:43px;height:43px}.math-strand{gap:5px;padding:15px 0}.math-choice{width:74px;height:74px}.math-bear-seat{width:95px;padding:8px}.math-bear-seat>svg{height:70px}.math-number-table{grid-template-columns:repeat(2,minmax(0,1fr))}.math-choices{gap:12px}.math-play{min-height:230px}.math-group-end{gap:8px}.math-number-card{min-height:120px}}@media(prefers-reduced-motion:reduce){.math-correct,.math-slot svg,.math-plate svg{animation:none!important}}
.math-slot svg{width:100%;height:100%}.math-scene.house:after{content:'';position:absolute;left:46%;top:83%;width:10%;height:12%;border-radius:3px 3px 0 0;background:#af987b;pointer-events:none}.math-slot.math-selected svg{stroke-width:3;filter:drop-shadow(0 0 5px #e1ae47)}@media(min-width:900px) and (max-height:900px){.math-shapes{display:flex;justify-content:center;align-items:center;gap:35px;min-height:270px}.math-shapes .math-scene{width:270px;flex:0 0 270px;margin:0}.math-shapes .math-choices{max-width:250px;align-content:center}.math-shapes .math-choice{width:85px;height:85px}.math-picnic .math-bear-seat{width:110px}.math-number-card{min-height:120px}.math-number-card .math-card-content{min-height:85px}.math-play{padding:16px}}
.math-split-piles{display:flex;justify-content:center;gap:18px;flex-wrap:wrap;margin:20px auto}.math-split-zone{display:grid;place-items:center;gap:10px;min-width:135px;min-height:130px;padding:14px;border:3px dashed #a9c7ca;border-radius:22px;background:#f4fbf7;font:inherit;color:inherit}.math-split-zone strong{font-size:20px}.math-number-pile{width:min(100%,360px);margin:24px auto;padding:22px;border-radius:24px;background:#fff4d9}.math-equation{font-size:24px;font-weight:800;color:#526878}.mj-seat-wrap{position:relative}.mj-seat-wrap>.mj-undo{display:grid;place-items:center;width:44px;height:40px;margin:4px auto;border:0;border-radius:14px;background:#fff2d4}.mj-seat-wrap>.mj-undo svg{width:28px;height:28px}.math-snacks .math-choice{width:auto;min-width:150px;height:auto;min-height:64px;padding:12px 18px;font-size:18px}.math-bear-seat .mj-wish{display:grid;place-items:center;min-height:32px}.math-bear-seat .mj-wish .math-dots{grid-template-columns:repeat(3,12px);gap:4px}.math-bear-seat .mj-wish .math-dots i{width:12px;height:12px}@media(max-width:600px){.math-split-zone{min-width:115px;min-height:112px;padding:10px}.math-equation{font-size:20px}.math-snacks .math-choice{min-width:125px;font-size:16px}}

/* Give touch presses a visible response on the game's illustrated controls. */
.toy-course,.toy-button,.toy-cell,.memory-card,.animal-home,.train-ticket,.math-choice,.math-number-card,.math-split-zone,.toy-modes button{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.toy-course{transition:transform .18s ease,box-shadow .18s ease}
.toy-course svg{transform-origin:50% 65%;transition:transform .18s ease;will-change:transform}
.toy-course:active svg{animation:game-icon-bounce .42s cubic-bezier(.2,.8,.25,1)}
.toy-course-playing svg{animation:game-icon-bounce .42s cubic-bezier(.2,.8,.25,1)}
@media(hover:hover){.toy-course:hover{transform:translateY(-5px);box-shadow:0 11px 0 rgba(91,131,151,.22),0 14px 22px rgba(73,95,108,.12)}.toy-course:hover svg{animation:game-icon-hover .72s ease-in-out infinite alternate}}
.toy-button:active svg,.toy-modes button:active svg,.animal-home:active>svg,.train-ticket:active .journey-dot-pack,.math-choice:active>.theme-art{animation:game-icon-bounce .38s cubic-bezier(.2,.8,.25,1)}
.memory-card:active .memory-back svg,.memory-card:active .memory-front svg{animation:game-icon-bounce .38s cubic-bezier(.2,.8,.25,1)}
.toy-cell:active:not(:disabled){transform:scale(.94);filter:brightness(1.04)}
.toy-cell:active:not(:disabled) .toy-piece{animation:game-piece-tap .38s ease-out}
.animal-home:active{transform:translateY(3px) scale(.985);box-shadow:0 2px 0 rgba(73,95,108,.14)}
.toy-button:active,.train-ticket:active,.math-choice:active{transform:translateY(3px) scale(.97)}
@keyframes game-icon-bounce{0%{transform:scale(1) rotate(0)}32%{transform:scale(.82) rotate(-5deg)}68%{transform:scale(1.16) rotate(4deg)}100%{transform:scale(1) rotate(0)}}
@keyframes game-icon-hover{from{transform:translateY(0) rotate(-3deg) scale(1)}to{transform:translateY(-9px) rotate(3deg) scale(1.06)}}
@keyframes game-piece-tap{0%{transform:scale(.55)}65%{transform:scale(1.18)}100%{transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.toy-course svg{transition:none}.toy-course:active svg,.toy-course-playing svg,.toy-course:hover svg,.toy-button:active svg,.toy-modes button:active svg,.animal-home:active>svg,.train-ticket:active .journey-dot-pack,.math-choice:active>.theme-art,.memory-card:active .memory-back svg,.memory-card:active .memory-front svg,.toy-cell:active:not(:disabled) .toy-piece{animation:none}}


.app[data-scene="workbook"] header,.app[data-scene="workbook"] .board-head,.app[data-scene="workbook"] .scene-nav,.app[data-scene="workbook"] .toy-title,.app[data-scene="workbook"] .toy-toolbar,.app[data-scene="workbook"] .fun-status{display:none}
.app[data-scene="workbook"] .board{background:transparent;border:0;box-shadow:none;border-radius:0;padding:0;margin:0;min-height:0;overflow:visible}
.app[data-scene="workbook"] .tile-grid{display:block;padding:0}
.app[data-scene="workbook"] .toy-games{max-width:1040px}
.app[data-scene="workbook"] .fun-play{background:transparent;border:0;box-shadow:none;border-radius:0;padding:0;min-height:0;overflow:visible}
.workbook-sheet{background:#fffdf7;border:0;border-radius:24px;margin:0 auto;padding:20px 26px 0;box-sizing:border-box;text-align:left}
.workbook-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:2px 8px 18px;color:#40576b;font-size:24px}
.workbook-count{font-size:18px;color:#708994;font-weight:700}
.workbook-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 24px;padding-bottom:18px}
.workbook-row{display:grid;grid-template-columns:27px minmax(0,1fr) 68px 24px;align-items:center;gap:8px;min-height:62px;padding:6px 10px;background:transparent;border:2px solid transparent;border-radius:14px;color:#40576b;cursor:pointer;font:inherit;text-align:left;scroll-margin-bottom:220px;touch-action:manipulation}
.workbook-selected{background:#fff0c9;border-color:#e7c576}
.workbook-equation{font-size:clamp(22px,3vw,34px);font-weight:800;white-space:nowrap}
.workbook-answer{min-height:38px;border-bottom:3px solid #90a9b0;text-align:center;font-size:30px;font-weight:900;line-height:38px}
.workbook-index{color:#9b8565;font-size:16px}
.workbook-mark{font-size:24px;color:#599378;text-align:center}
.workbook-wrong .workbook-answer{border-color:#d98983}
.workbook-correct .workbook-answer{border-color:#7cae83}
.workbook-dock{position:sticky;bottom:0;z-index:4;background:#fffdf7;border-top:1px solid #dfe9e9;padding:10px 0 max(14px,env(safe-area-inset-bottom));}
.workbook-dock-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 4px 8px;min-height:24px;font-size:16px;color:#597683}
.workbook-feedback{font-size:15px;color:#507b67;text-align:right}
.workbook-keypad{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:8px;margin:0 auto 10px}
.workbook-key{min-height:58px;border:0;border-radius:14px;background:#e5f3fa;box-shadow:0 3px 0 #c4e1eb;color:#40576b;font:inherit;font-size:29px;font-weight:900;touch-action:manipulation}
.workbook-key:active{transform:translateY(2px)}
.workbook-key:disabled{opacity:.45}
.workbook-actions{display:flex;justify-content:center;gap:12px;margin:0}
.workbook-actions .toy-button{min-height:52px;min-width:64px}
.workbook-actions .workbook-confirm,.workbook-actions .workbook-next{background:#d6eddc;min-width:190px;font-size:19px}
.workbook-erase svg{width:32px;height:28px;display:block}
.workbook-actions [hidden]{display:none}
.workbook-row:focus-visible,.workbook-key:focus-visible{outline:3px solid #4d91aa;outline-offset:2px}
.workbook-finished .workbook-count{color:#397961}
@media(max-width:600px){.workbook-sheet{padding:14px 10px 0;border-radius:18px}.workbook-heading{font-size:20px;padding-bottom:12px}.workbook-grid{gap:6px}.workbook-row{grid-template-columns:19px minmax(0,1fr) 37px 13px;gap:3px;padding:4px 2px;min-height:54px;scroll-margin-bottom:270px}.workbook-equation{font-size:clamp(15px,4.5vw,24px)}.workbook-answer{font-size:23px;min-height:32px;line-height:32px}.workbook-index{font-size:12px}.workbook-mark{font-size:16px}.workbook-keypad{grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}.workbook-key{min-height:46px;font-size:26px}.workbook-dock-head{font-size:14px}.workbook-feedback{font-size:13px}.workbook-actions .workbook-confirm,.workbook-actions .workbook-next{min-width:160px;font-size:17px}}
@media(max-width:360px){.workbook-grid{grid-template-columns:1fr}.workbook-equation{font-size:26px}.workbook-row{grid-template-columns:24px 1fr 58px 20px}}
.workbook-heading .workbook-home{padding:8px;min-width:48px;min-height:48px;background:transparent}.workbook-heading .workbook-home svg{display:block;width:28px;height:28px}.workbook-heading strong{flex:1}
.app[data-scene="workbook"] .math-workbook{display:block}.workbook-sheet{width:100%}
.workbook-grid{max-height:calc(100svh - 270px);overflow-y:auto;overscroll-behavior:contain;scroll-padding-block:8px;padding-right:4px}.workbook-row{scroll-margin-bottom:8px}.workbook-dock{position:relative;bottom:auto}
@media(max-width:600px){.workbook-grid{max-height:calc(100svh - 310px)}}
.workbook-grid{max-height:calc(100svh - 300px)}.math-workbook .workbook-key{font-size:29px}
@media(max-width:600px){.workbook-grid{max-height:calc(100svh - 340px)}.math-workbook .workbook-key{font-size:26px}}
@media(max-width:600px){.workbook-grid{grid-template-columns:1fr}.workbook-row{grid-template-columns:24px minmax(0,1fr) 64px 24px;gap:8px;padding:5px 8px;min-height:58px}.workbook-equation{font-size:26px}.workbook-index{font-size:15px}.workbook-answer{font-size:26px}.workbook-mark{font-size:20px}}

.workbook-arriving{animation:workbook-arrive .45s ease-out}
@keyframes workbook-arrive{from{background:#d9f0df}to{background:#fff0c9}}
@media(prefers-reduced-motion:reduce){.workbook-arriving{animation:none}}

.workbook-finished .workbook-dock-head{flex-wrap:wrap;justify-content:center}.workbook-finished .workbook-active{display:none}.workbook-finished .workbook-feedback{text-align:center;line-height:1.6}

.workbook-help-button svg{width:30px;height:30px;display:block}.workbook-help{background:#eff7f1;border-radius:14px;padding:10px 14px;line-height:1.5;max-height:125px;overflow:auto}.workbook-help[hidden]{display:none}.workbook-help p{margin:0}.workbook-help pre{font:700 20px monospace;white-space:pre;margin:8px auto 0;width:max-content}.workbook-waiting .workbook-selected .workbook-answer{border-bottom-color:#71b58d}.workbook-waiting .workbook-active:after{content:' · 还可以输入';font-size:12px}.workbook-row{grid-template-columns:26px minmax(0,1fr) minmax(54px,1fr) 18px}.workbook-answer{font-size:clamp(20px,3vw,32px)}
@media(max-width:700px){.workbook-grid{grid-template-columns:1fr}.workbook-row{grid-template-columns:24px minmax(0,1fr) 110px 18px}}

.workbook-large .workbook-grid{grid-template-columns:1fr}.workbook-beads{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}.workbook-beads i{width:16px;height:16px;border-radius:50%;background:#69afc8}.workbook-beads i.added{background:#ddad58}.workbook-beads i.removed{opacity:.3;background:#dc8585;transform:scale(.7)}
.workbook-help{padding:12px 16px;margin:0 0 12px;max-height:min(240px,35svh);font-size:clamp(18px,2.2vw,22px);overflow:auto;overscroll-behavior:contain}
.workbook-help-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px;color:#4a7667;font-size:16px}
.workbook-help-close{border:0;background:transparent;min-width:44px;min-height:44px;font:inherit;font-size:30px;cursor:pointer}
.workbook-beads{gap:10px;padding:8px 0}.workbook-beads i{position:relative;width:24px;height:24px;flex:none}.workbook-beads i.removed{opacity:1;transform:none;background:#f0d6d1}.workbook-beads i.removed:after{content:'';position:absolute;left:2px;right:2px;top:11px;height:2px;background:#b46f68;transform:rotate(-40deg)}
.workbook-sheet{height:calc(100svh - 40px);display:flex;flex-direction:column}
.workbook-heading,.workbook-dock{flex:none}
.workbook-grid{flex:1;min-height:0;max-height:none;align-content:start}
@media(max-width:600px){.workbook-sheet{height:calc(100svh - 32px)}.workbook-grid{max-height:none}.workbook-large .workbook-equation{font-size:clamp(16px,4.5vw,24px)}.workbook-large .workbook-row{grid-template-columns:20px minmax(0,1fr) 74px 16px;gap:4px;padding-inline:4px}}

.toy-tactic-active .toy-toolbar{justify-content:center;flex-wrap:wrap;gap:8px}
.toy-tactic-active .toy-toolbar button[hidden]{display:none}
.toy-mission-progress{margin:10px 0;text-align:center;font-size:17px;font-weight:700;color:#446879}
.toy-replay-active .toy-board .hinted{outline:4px dashed #c3983d;outline-offset:-4px;animation:toy-key-step 1.6s ease-in-out}
@keyframes toy-key-step{0%,100%{background-color:transparent}45%{background-color:#fff1be}}
@media(max-width:600px){.toy-tactic-active .toy-toolbar .toy-button{min-height:44px;padding:8px 12px}.toy-tactic-active .toy-title{font-size:24px}.toy-mission-progress{font-size:15px}}
@media(prefers-reduced-motion:reduce){.toy-replay-active .toy-board .hinted{animation:none;background-color:#fff1be}}

/* Persistent little worlds sit above the play area, with no nested large cards. */
.jr-scene { width:100%; min-height:92px; margin:0 0 12px; overflow:hidden; border-radius:18px; background:linear-gradient(#e7f5fb 0 63%,#e2efd7 63%); }
.jr-scene-memory:not(:has(.jr-scene-item)),.jr-scene-homes:not(:has(.jr-scene-item)){display:none}
@media(min-width:900px) and (max-height:900px){.home-friend svg{width:80px;height:80px}.animal-home{padding:10px}.animal-home>svg{width:90px}.animal-homes{margin-top:12px;gap:12px}}
.jr-scene-ground { position:relative; display:flex; align-items:flex-end; justify-content:center; gap:8px; min-height:92px; padding:10px 12px; }
.jr-scene-item { position:relative; display:inline-flex; flex:0 1 66px; align-items:flex-end; justify-content:center; width:66px; height:72px; }
.jr-scene-item > svg { width:100%; height:66px; }
.jr-scene-homes .jr-scene-item > svg:first-child { width:66px; height:72px; }
.jr-scene-homes .jr-scene-item > svg:last-child { position:absolute; width:38px; height:38px; right:0; bottom:0; animation:jr-friend-breathe 3.8s ease-in-out infinite; }
.jr-scene-active { animation:jr-friend-arrive .7s ease-out both; }
.jr-scene-memory .jr-scene-ground { background:repeating-conic-gradient(#f8d5c9 0 25%,#fff2e2 0 50%) bottom center / 38px 20px no-repeat; }
.jr-scene-landmark { display:block; width:70px; height:70px; z-index:1; margin:0 auto; }
.jr-scene-landmark > svg { width:100%; height:100%; }
.jr-scene-track { position:absolute; left:0; right:0; bottom:11px; border-top:3px solid #96adad; border-bottom:3px solid #96adad; height:9px; background:repeating-linear-gradient(90deg,transparent 0 13px,#b7ad93 13px 17px); }
.jr-moving-train { position:absolute; z-index:2; display:flex; bottom:9px; left:0; width:102px; height:55px; }
.jr-moving-train > svg { width:66px; height:55px; }
.jr-moving-train > svg:last-child { width:36px; height:36px; align-self:center; }
.jr-moving-train.jr-scene-active { animation:jr-trip 1.05s ease-in-out forwards; }
.jr-preview-queue { display:flex; justify-content:center; gap:10px; max-width:100%; }
.jr-preview-queue > svg { width:72px; height:72px; }
.jr-scene-empty { display:inline-grid; place-items:center; width:72px; height:72px; border:3px dashed #98c0ce; border-radius:50%; font-size:38px; color:#587784; }
.jr-collection { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin:12px 0 18px; }
.jr-collection-item { display:flex; flex-direction:column; align-items:center; width:64px; min-height:64px; }
.jr-collection-item > svg { width:56px; height:56px; }
.jr-collection-item small { text-align:center; font-size:11px; }
@keyframes jr-friend-arrive { from { opacity:0; transform:translateY(-20px) scale(.7); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes jr-friend-breathe { 50% { transform:translateY(-3px); } }
@keyframes jr-trip { from { left:-100px; } to { left:calc(100% + 20px); } }
@media(max-width:600px) { .jr-scene,.jr-scene-ground { min-height:75px; } .jr-scene-ground { gap:3px; padding:6px; } .jr-scene-item { width:44px; flex-basis:44px; height:58px; } .jr-scene-item > svg { height:48px; } .jr-scene-homes .jr-scene-item > svg:first-child { width:44px; height:54px; } .jr-scene-homes .jr-scene-item > svg:last-child { width:28px; height:28px; } .jr-scene-landmark { width:56px; height:56px; } .jr-collection-item { width:48px; } .jr-collection-item > svg { width:44px; height:44px; } }
@media(prefers-reduced-motion:reduce) { .jr-scene-active,.jr-scene-homes .jr-scene-item > svg:last-child { animation:none; } .jr-moving-train.jr-scene-active { left:60%; } }
.jr-station-friends { position:absolute; right:10%; bottom:26px; z-index:3; display:flex; align-items:flex-end; }
.jr-station-friends > svg { width:28px; height:28px; }
.journey-path { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:10px; margin:10px 0 14px; }
.journey-world { font-size:14px; color:#52717d; margin-right:4px; }
.journey-step { display:grid; place-items:center; flex:0 0 34px; width:34px; height:34px; border-radius:50%; background:#e8f2f5; color:#607d89; font-size:15px; font-weight:700; }
.journey-step.current { background:#ffdfa0; color:#665035; outline:2px solid #edbb62; outline-offset:2px; }
.journey-step.done { background:#bfe0cc; color:#376450; }
.journey-map { width:100%; margin:0 auto; text-align:center; }
.journey-map h2,.journey-reward h2 { margin:12px 0; font-size:clamp(21px,3vw,29px); }
.journey-map-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; max-width:680px; margin:16px auto; }
.journey-station { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; min-width:0; min-height:88px; border:0; border-radius:16px; background:#eef7f4; color:#3e5b6d; padding:8px; font:inherit; cursor:pointer; }
.journey-station > svg { width:48px; height:48px; }
.journey-station strong { font-size:14px; }
.journey-station.current { background:#fff0cb; outline:2px solid #e4bf76; }
.journey-station:focus-visible { outline:3px solid #6bafc5; outline-offset:3px; }
.journey-reward { display:flex; flex-direction:column; align-items:center; width:100%; text-align:center; padding:18px 0; gap:10px; }
.journey-medal > svg { width:94px; height:94px; }
.journey-reward p { margin:0; color:#58727f; line-height:1.5; }
.journey-reward > button { min-height:48px; min-width:150px; }
.mj-path { position:relative; isolation:isolate; display:flex; align-items:center; justify-content:center; gap:22px; width:max-content; max-width:100%; margin:10px auto 16px; }
.mj-path::before { content:""; position:absolute; z-index:-1; left:16px; right:16px; top:50%; height:3px; background:#d3e7df; }
.mj-path > span { display:grid; place-items:center; width:34px; height:34px; border-radius:50%; background:#eaf4f0; color:#5d7b72; font-size:14px; font-weight:700; }
.mj-path > span.current { background:#ffdfa0; color:#6b5230; }
.mj-path > span.done { background:#b6dbbd; color:#3c6851; }
@media(max-width:600px) { .journey-path { gap:8px; } .journey-world { flex-basis:100%; text-align:center; margin:0; } .journey-map-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; } .journey-station { min-height:82px; } .mj-path { gap:15px; } .journey-medal > svg { width:76px; height:76px; } }

.mj-path{display:none}
.math-basket{flex-wrap:wrap}.math-basket span{flex:0 0 34px;height:34px}
@media(min-width:900px) and (max-height:900px){.math-shapes{display:grid;grid-template-columns:270px minmax(180px,250px);gap:18px 35px;align-items:center}.math-shapes>.md-shelf{grid-column:1/-1}.math-shapes>.md-free-button{grid-column:1/-1}.math-shapes>.math-choices{justify-self:center}}
.md-shelf{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin:12px auto;max-width:650px}
.md-keepsake{width:58px;height:58px;border:0;border-radius:18px;background:#fff5da;overflow:hidden;padding:5px;cursor:pointer;position:relative}
.md-keepsake>svg,.md-mini-picnic svg{width:40px;height:40px}.md-keepsake .math-strand{gap:1px;margin:0}.md-keepsake .math-strand>span{width:12px;height:14px}.md-keepsake .math-scene{width:100%;height:100%;aspect-ratio:1;margin:0;min-height:0;pointer-events:none}.md-keepsake .math-dots{gap:2px}.md-keepsake .math-dots i{width:5px;height:5px}
.md-necklace-friend{position:relative;width:130px;margin:10px auto;animation:md-happy .7s ease-in-out 2}.md-necklace-friend>svg{width:130px}.md-necklace-friend>span{display:flex;position:absolute;left:22%;right:22%;bottom:12%;gap:2px}.md-necklace-friend>span>span{width:18px}.md-necklace-friend svg.math-shape{width:100%;height:auto}
.md-market{display:flex;flex-direction:column;align-items:center;gap:14px}.md-order{display:flex;align-items:center;gap:15px;background:#fff5da;border-radius:18px;padding:12px 18px}.md-order>strong{font-size:32px}.md-shopping-bag{width:min(270px,70vw);min-height:145px;padding:25px 18px 18px;border-radius:15px 15px 35px 35px;background:#fce7ba;border:3px solid #e2bd7b;display:flex;align-items:center;justify-content:center;position:relative}.md-shopping-bag:before{content:'';position:absolute;top:-12px;left:38%;width:24%;height:18px;border:5px solid #c99f60;border-bottom:0;border-radius:16px 16px 0 0}.md-compare-symbol{font-size:42px}.md-delivered{animation:md-delivery 2s ease both}.md-picnic-eating .math-bear-seat>svg{animation:md-happy .55s ease 3}.md-picnic-eating .math-plate svg{animation:md-eat 1.8s ease both}.md-free-button{width:58px;height:58px;border:0;border-radius:18px;background:#ddf0e4;margin:8px auto;display:block}.md-free-button svg{width:38px}.md-free-canvas{background:#fff9e9!important;position:relative;cursor:crosshair;overflow:hidden}.md-free-piece{pointer-events:none}.md-free-piece svg{width:100%;height:100%}.md-faint-blueprint .math-slot[data-filled=no]{opacity:.45}.md-assisted .md-faint-blueprint .math-slot[data-filled=no]{opacity:1}.md-build-scene{overflow:visible}.md-use-boat{animation:md-sail 2s ease-in-out both}.md-use-rocket{animation:md-launch 2s ease-in both}.md-use-robot{animation:md-robot .4s ease-in-out 5}.md-use-fish{animation:md-sail 2s ease-in-out both}.md-use-flower{animation:md-grow 1.7s ease both}.md-use-house{animation:md-happy .8s ease 2}.md-preview{position:fixed;inset:0;z-index:1000;background:rgba(45,65,80,.4);display:grid;place-items:center;padding:20px}.md-preview-card{width:min(500px,90vw);background:#fff9e9;border-radius:28px;padding:22px}.md-preview-card .math-scene{width:100%;height:auto;aspect-ratio:1;min-height:0}.md-preview-card>button{display:block;margin:12px auto 0}.md-preview-card .math-strand{flex-wrap:wrap}.md-preview-card .math-slot{pointer-events:none}
@keyframes md-happy{50%{transform:translateY(-7px) rotate(3deg)}}@keyframes md-eat{30%{transform:translateY(-12px)}100%{opacity:.2;transform:scale(.3)}}@keyframes md-delivery{50%{transform:translateX(15px) rotate(4deg)}100%{transform:translateX(30px);opacity:.3}}@keyframes md-sail{25%{transform:translateX(-10px) rotate(-3deg)}75%{transform:translateX(15px) rotate(3deg)}}@keyframes md-launch{20%{transform:translateY(5px)}100%{transform:translateY(-100px) scale(.7);opacity:.2}}@keyframes md-robot{50%{transform:translateX(8px) rotate(4deg)}}@keyframes md-grow{0%{transform:scale(.8)}65%{transform:scale(1.08)}100%{transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.md-necklace-friend,.md-delivered,.md-picnic-eating .math-bear-seat>svg,.md-picnic-eating .math-plate svg,[class*=md-use-]{animation:none!important}}
.math-strand>button{border:0;background:transparent;padding:0;width:clamp(36px,6vw,68px);height:clamp(36px,6vw,68px);flex:0 0 auto;border-radius:50%;cursor:pointer}.math-strand>button svg{width:100%;height:100%}.md-necklace-friend>span>button{width:18px;height:18px;border:0;background:transparent;padding:0;pointer-events:none}.md-necklace-friend>span>span{width:18px;height:18px}.md-keepsake .math-strand>button{width:12px;height:14px}.md-keepsake .md-picnic-prize{transform:scale(.15);transform-origin:top left;width:300px;height:300px}.md-preview-card .md-picnic-prize .math-picnic{display:flex;gap:8px}.md-preview-card .md-picnic-prize .mj-seat-wrap{flex:1;min-width:0}.md-preview-card .md-picnic-prize .mj-undo{display:none}.md-preview-card .md-picnic-prize .math-bear-seat{display:flex;flex-direction:column;align-items:center}.md-preview-card .md-picnic-prize .math-bear-seat>svg{width:80px}.md-preview-card .md-picnic-prize .math-plate svg{width:25px;height:25px}.md-picnic-prize .math-bear-seat{pointer-events:none}

/* v19 learning games: one scene, one stable row of controls. */
.learning-game .toy-toolbar{display:flex;align-items:center;justify-content:flex-start;gap:12px;margin:10px 0 14px}
.learning-game .toy-toolbar button{width:52px;height:52px;min-width:52px;padding:8px;border:0;border-radius:16px;background:#e4f1f5;box-shadow:0 3px 0 #c6e0e8;color:#496a7b;display:grid;place-items:center}
.learning-game .toy-toolbar button svg{width:34px;height:34px}
.learning-game .fun-play{background:transparent;border:0;box-shadow:none;padding:16px 0;overflow:visible;width:100%}
.learning-game .journey-path,.learning-game .math-progress{justify-content:center;margin:8px auto 14px}
.learning-game .fun-status{font-size:clamp(17px,2.1vw,22px);line-height:1.5;margin:12px auto;max-width:640px;min-height:32px}
.learning-game .jr-scene{background:transparent;box-shadow:none;border:0}
.learning-game .math-scene{background:transparent;border:0;box-shadow:none;width:min(410px,80vw);height:auto;aspect-ratio:1;margin:10px auto}
.learning-game .math-shapes{display:grid;grid-template-columns:minmax(240px,410px) minmax(180px,260px);gap:20px;align-items:center;justify-content:center}
.learning-game .math-shapes>.math-choices{max-width:260px;justify-content:center}
.learning-game .math-shapes>.md-shelf,.learning-game .math-shapes>.md-free-button{grid-column:1/-1}
.learning-game .math-choice{width:clamp(80px,9vw,104px);height:clamp(80px,9vw,104px)}
.learning-game .math-slot.shape-preview[data-filled=no] svg{fill:#d8e8de;filter:drop-shadow(0 0 3px #e3b359)}
.learning-game .math-strand{max-width:100%;flex-wrap:wrap;justify-content:center}
.learning-game .md-order{background:transparent;border-radius:0;padding:6px}
.learning-game .md-market{gap:22px}.learning-game .md-shopping-bag{min-height:150px}
.learning-game .md-shopping-bag.bag-arrival .math-dots i:last-child{animation:bag-item-in .3s ease-out}
.learning-game .math-bear-seat{background:transparent;box-shadow:none;border:0}
.learning-game .md-picnic-eating .math-bear-seat>svg{transform-origin:center bottom}
.learning-game .animal-home{background:#edf4e7;box-shadow:0 4px 0 #d3dfca}
.learning-game .home-arrival .journey-arriving{animation:friend-home .8s ease-out both}
.learning-game .train-carriage.ticket-arrival{animation:carriage-connect .45s ease-out}
.learning-game .memory-card.matched{animation:friend-pair .5s ease-out;opacity:.75}
.toy-finish.draw .toy-friend{animation:friend-pair .6s ease-out}.toy-finish.learn .toy-friend{animation:friend-home .6s ease-out}
@keyframes bag-item-in{from{transform:translateY(-35px) scale(.6);opacity:0}to{transform:none;opacity:1}}
@keyframes friend-home{from{transform:translate(-28px,-15px);opacity:0}to{transform:none;opacity:1}}
@keyframes friend-pair{50%{transform:scale(1.06) translateY(-4px)}}
@keyframes carriage-connect{from{transform:translateX(20px);opacity:.5}to{transform:none;opacity:1}}
@media(max-width:850px){.learning-game .math-shapes{grid-template-columns:minmax(0,1fr);gap:14px}.learning-game .math-shapes>.math-choices{max-width:none;justify-self:center}.learning-game .math-scene{width:min(390px,72vw)}.learning-game .animal-homes{gap:12px}.learning-game .toy-title{font-size:25px}}
@media(max-width:500px){.learning-game .toy-toolbar button{width:48px;height:48px;min-width:48px}.learning-game .math-choice{width:72px;height:72px}.learning-game .fun-status{font-size:17px}.learning-game .math-scene{width:min(330px,82vw)}}
@media(prefers-reduced-motion:reduce){.learning-game .math-dots i,.learning-game .journey-arriving,.learning-game .ticket-arrival,.learning-game .memory-card,.toy-finish .toy-friend{animation:none!important}}
.learning-game .first-look .math-slot.math-selected,.learning-game .first-look .md-order,.learning-game .first-look .mj-wish,.learning-game .first-look .math-gap,.learning-game .first-look .train-first{animation:first-rule-cue .65s ease-in-out 2}
@keyframes first-rule-cue{50%{outline:4px solid #e2b351;outline-offset:3px;transform:scale(1.04)}}
@media(prefers-reduced-motion:reduce){.learning-game .first-look *{animation:none!important}}
.learning-game .math-progress span{display:grid;place-items:center;width:34px;height:34px;font-size:15px;font-weight:700;background:#e8f2f5;color:#607d89}.learning-game .math-progress .current{background:#ffdfa0;color:#665035;outline:2px solid #edbb62;outline-offset:2px}.learning-game .math-progress .done{background:#bfe0cc;color:#376450}

/* Quantity guides: ten connected cubes form one ten; no decorative nested frame. */
.workbook-help:has(.workbook-block-scene){max-height:min(420px,48svh);background:#f1f8f5}
.workbook-block-scene{display:flex;gap:18px;flex-wrap:wrap;margin:4px 0 12px}
.workbook-block-tray{flex:1;min-width:140px;color:#69afc8}.workbook-block-tray.gold{color:#ddad58}
.workbook-block-label{display:block;font-size:18px;font-weight:800;margin-bottom:8px;color:#405a6c}
.workbook-blocks{display:flex;flex-direction:column;gap:5px}
.workbook-ten{display:flex;gap:2px;width:max-content;border:2px solid currentColor;border-radius:4px;padding:2px}
.workbook-ten i,.workbook-ones i{display:block;width:14px;height:14px;background:currentColor;border-radius:2px;flex:none}
.workbook-ones{display:grid;grid-template-columns:repeat(10,14px);gap:4px;margin-top:6px;width:max-content;max-width:100%}
.workbook-blocks .taken{opacity:.25;position:relative}.workbook-blocks .taken:after{content:'';position:absolute;inset:45% 0 auto;height:2px;background:#405a6c;transform:rotate(-20deg)}
.workbook-guide-controls{display:flex;justify-content:center;align-items:center;gap:24px;margin-top:10px}
.workbook-guide-control{border:0;border-radius:16px;background:#d4eadf;color:#3c7061;width:54px;height:50px;cursor:pointer}.workbook-guide-control svg{width:36px;height:36px}
.workbook-guide-progress{font-size:16px;color:#526878}
.workbook-block-scene .packing i:nth-child(-n+10){animation:guide-pack .6s ease both;background:#ddad58}.workbook-block-scene .opening{animation:guide-open .6s ease both}
@keyframes guide-pack{from{transform:translateY(8px)}to{transform:translateY(0)}}@keyframes guide-open{from{opacity:.4;transform:translateY(-12px)}to{opacity:1;transform:none}}
@media(max-width:420px){.workbook-block-scene{gap:12px}.workbook-block-tray{min-width:120px}.workbook-ten i,.workbook-ones i{width:11px;height:11px}.workbook-ones{grid-template-columns:repeat(10,11px)}}
@media(prefers-reduced-motion:reduce){.workbook-block-scene .packing i,.workbook-block-scene .opening{animation:none}}
.workbook-blocks{display:flex;flex-direction:row;flex-wrap:wrap;align-content:flex-start;gap:5px}.workbook-ones{flex-basis:100%;width:auto}
