/* PLAYROOM CONTROLS: purple surfaces, generous cards, quiet reduced-motion mode. */
#game-dialog{width:min(880px,96vw);padding:30px;overflow-x:hidden;isolation:isolate;background:radial-gradient(ellipse at 50% 0,#38234b 0,transparent 65%),#17121e;border:1px solid #674481;border-radius:32px}#game-dialog #game-title{font-size:clamp(30px,5vw,44px);letter-spacing:-1.7px;margin:12px 0}#game-dialog #game-instruction{color:#cbbbdc;font-size:14px}#game-dialog .dialog-top{position:sticky;top:-30px;z-index:6;background:#1d1528;padding:8px 0}.game-welcome{display:flex;align-items:center;justify-content:center;gap:25px;margin:15px 0 25px}.game-welcome img{height:120px;width:120px;object-fit:contain;border-radius:26px;background:#eae0f4;box-shadow:0 12px 25px #0004}.game-welcome p{font-size:22px;font-weight:900;max-width:170px;text-align:left}.difficulty-options{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.difficulty-card{background:linear-gradient(150deg,#3a2751,#281c37);border:1px solid #74558e;border-radius:24px;padding:25px 12px;display:flex;align-items:center;flex-direction:column;gap:12px;color:#f9f0ff;box-shadow:0 6px 0 #08060c;transition:transform .2s}.difficulty-card:hover{transform:translateY(-5px);background:#48305e}.difficulty-icon{font-size:40px}.difficulty-card strong{font-size:22px;font-weight:900}.difficulty-card>span:not(.difficulty-icon){font-size:12px;color:#d4c1e5}.difficulty-card small{font-size:11px;color:#dfbfff}.gentle-note{font-size:12px;color:#bdaaca;line-height:1.7;margin:23px auto 0;max-width:500px}.level-header{display:flex;align-items:center;justify-content:space-between;gap:15px;border-top:1px solid #50365f;padding-top:22px;margin-bottom:25px}.level-caption{font-size:12px;color:#cab3dd;font-weight:800;text-align:left;margin-bottom:10px}.level-progress{display:flex;gap:8px}.level-step{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;font-size:12px;background:#31233e;color:#9b84b0;border:1px solid #59406e}.level-step.current{border-color:#d0adff;background:#6a3d98;color:white;box-shadow:0 0 0 4px #c397ff12}.level-step.complete{background:#4c3b26;border-color:#ddbb72;color:#ffe19a}.change-difficulty,.peek-button{background:#30213f;border:1px solid #73508e;color:#ebd8ff;padding:10px 13px;border-radius:30px;font-size:12px;font-weight:800;min-height:42px}.game-question{font-size:clamp(23px,4vw,32px);font-weight:900;margin:24px 0;color:#fff}.mini-progress{font-size:12px;color:#c4add7;margin-bottom:22px}.color-options{display:flex;justify-content:center;gap:18px;flex-wrap:wrap;padding:15px}.color-orb{position:relative;display:grid;place-items:center;width:130px;height:130px;border-radius:32%;background:var(--orb);border:3px solid #fff4;box-shadow:inset -8px -10px 0 #0001,0 7px 0 #0003;color:#241431;transition:transform .15s}.color-orb:hover{transform:translateY(-4px) rotate(-3deg)}.orb-shine{position:absolute;top:15px;left:20px;width:25px;height:13px;background:#fff6;border-radius:50%;transform:rotate(-35deg)}.orb-label{font-size:16px;font-weight:900;text-transform:capitalize}.color-orb.correct{outline:4px solid white;outline-offset:5px}.banana-garden{background:#201c2a;border:1px dashed #6b507d;border-radius:26px;padding:20px;display:flex;flex-wrap:wrap;justify-content:center;gap:8px;max-width:650px;margin:auto}.banana-token{position:relative;background:#332a29;border:1px solid #65533a;width:76px;height:78px;border-radius:20px;font-size:38px;transition:transform .2s}.banana-token.counted{background:#3c4932;border-color:#a3bc7a;transform:rotate(-5deg)}.banana-token small{position:absolute;right:4px;bottom:4px;background:#e9d88a;border-radius:50%;font-size:11px;color:#302447;width:20px;height:20px;display:grid;place-items:center}.banana-token small:empty{display:none}.count-help{font-size:12px;color:#c1adcd;margin:17px 0 24px}.number-options{display:flex;justify-content:center;gap:14px;flex-wrap:wrap}.number-choice{background:#3b2753;border:2px solid #9c70c5;border-radius:22px;min-width:88px;height:80px;font-size:30px;font-weight:900;box-shadow:0 5px 0 #09060e}.number-choice.correct{background:#2f5a49;border-color:#9adeb1}.memory-status{display:flex;align-items:center;justify-content:space-between;margin:10px 0 20px;gap:15px;font-size:13px;font-weight:800;color:#d5bee7}.dressup-grid{display:grid;grid-template-columns:repeat(var(--columns),minmax(0,1fr));gap:14px;max-width:740px;margin:auto}.dressup-card{position:relative;aspect-ratio:4/5;perspective:900px;border:0;background:transparent;padding:0;border-radius:21px;min-width:0}.dressup-card:hover:not(:disabled) .card-turn{transform:translateY(-4px)}.card-turn{position:absolute;inset:0;transform-style:preserve-3d;transition:transform .42s cubic-bezier(.2,.7,.3,1);border-radius:21px;box-shadow:0 6px 0 #07050a}.dressup-card.flipped .card-turn,.dressup-card.flipped:hover .card-turn{transform:rotateY(180deg)}.card-back,.card-front{position:absolute;inset:0;border-radius:21px;backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center}.card-back{background:radial-gradient(circle at 50% 42%,#b283e74d 0 24%,transparent 25%),radial-gradient(circle at 15% 18%,#e1c1ff66 0 2%,transparent 2.5%),radial-gradient(circle at 85% 80%,#d4a9fb66 0 2%,transparent 2.5%),linear-gradient(145deg,#634095,#3b245c);border:2px solid #b38bd7;outline:1px solid #d2b4f133;outline-offset:-8px}.card-back-flower{font-size:clamp(35px,6vw,70px);color:#ead6ff;line-height:1}.card-back-name{font-weight:900;font-size:clamp(12px,2vw,20px);color:#fff;margin-top:10px;letter-spacing:-.5px}.card-back-small{font-size:7px;letter-spacing:1.5px;color:#dbc3ed;margin-top:10px}.card-front{transform:rotateY(180deg);border:3px solid #e4d1f3;justify-content:end;color:#332141}.card-front img{width:100%;height:83%;object-fit:contain;object-position:center;mix-blend-mode:multiply}.costume-label{display:grid;place-items:center;text-align:center;width:100%;padding:8px 4px;background:#ffffffcc;font-size:clamp(9px,1.4vw,13px);font-weight:900;line-height:1.2;min-height:17%}.match-check{position:absolute;right:6px;top:6px;display:none;place-items:center;background:#3c8c66;color:white;border:2px solid white;width:27px;height:27px;border-radius:50%;font-weight:900}.pair-found .card-front{border-color:#7ed4a5}.pair-found .match-check{display:grid}.dressup-card:disabled{opacity:1}.round-success{background:linear-gradient(135deg,#3c2853,#263f36);border:1px solid #8263a2;border-radius:24px;padding:25px 18px;margin:26px auto 0;max-width:550px;display:flex;flex-direction:column;gap:12px}.win-stars{font-size:28px;letter-spacing:8px;color:#ffe097}.round-success strong{font-size:25px;font-weight:900}.round-success p{font-size:13px;line-height:1.6;color:#e2d5eb}.game-confetti{position:fixed;inset:0;pointer-events:none;z-index:30;overflow:hidden}.game-confetti i{position:absolute;top:-20px;left:var(--x);width:10px;height:16px;border-radius:3px;animation:confetti-fall 1.8s var(--delay) ease-in forwards}.try-again{animation:gentle-nudge .25s ease-in-out}@keyframes confetti-fall{to{transform:translateY(100vh) rotate(var(--spin));opacity:0}}@keyframes gentle-nudge{25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}
/* Parent-led maths studio */
.math-section{margin-top:25px}.math-panel{padding:45px;background:radial-gradient(ellipse at 0 0,#4f2d6b66,transparent 60%),#20172b;border:1px solid #6c4886;border-radius:35px}.math-panel .section-heading{align-items:center}.math-panel .eyebrow{color:#d5b7f7}.math-intro{max-width:450px;line-height:1.8;color:#c6b5d4;font-size:14px}.math-form{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:30px}.math-field{display:flex;flex-direction:column;gap:10px;font-size:12px;font-weight:900;color:#d9c6e8}.math-field select{width:100%;background:#17101f;color:#fff;border:1px solid #785994;border-radius:14px;padding:14px;font:inherit;font-size:14px}.operation-picks{grid-column:1/-1;border:0;padding:0;margin:8px 0;display:flex;gap:12px;flex-wrap:wrap}.operation-picks legend{font-size:12px;font-weight:900;color:#d9c6e8;margin-bottom:14px}.operation-picks label{cursor:pointer;display:flex;align-items:center;gap:8px;padding:13px 18px;border:1px solid #70518c;border-radius:15px;font-size:13px;background:#2a1d39}.operation-picks input{accent-color:#be94f2;width:18px;height:18px}.math-form .button{justify-self:start}.math-form-note{grid-column:1/-1;font-size:11px;line-height:1.8;color:#bdaacc}.math-paper{margin-top:30px;border-top:1px solid #64497c;padding-top:30px}.math-session-top{display:flex;align-items:center;justify-content:space-between;gap:15px;font-size:13px;color:#d6c2e6}.math-progress{height:8px;border-radius:9px;background:#3b2a4c;margin:18px 0 30px;overflow:hidden}.math-progress i{display:block;height:100%;background:#bf91fb;transition:width .2s}.math-expression{font-size:clamp(34px,6vw,66px);font-weight:900;letter-spacing:-1px;text-align:center;margin:35px 0 25px;overflow-wrap:anywhere}.math-answer-row{display:flex;justify-content:center;gap:12px;flex-wrap:wrap}.math-answer-row input{min-width:0;width:210px;padding:15px;font-size:25px;text-align:center;border-radius:18px;border:2px solid #a97ed0;background:#130e1b;color:#fff}.math-status{text-align:center;min-height:30px;margin:18px 0;font-size:13px;color:#e2cafa}.math-report{text-align:center}.math-score{font-size:70px;letter-spacing:-4px;font-weight:900;color:#e0bbff;margin:20px 0 10px}.math-review{display:grid;gap:10px;margin:25px 0;text-align:left}.math-review-row{display:grid;grid-template-columns:28px 1fr 1fr;align-items:center;gap:12px;padding:15px;background:#30213f;border:1px solid #5f466f;border-radius:15px;font-size:13px}.math-review-row.correct{border-color:#548269}.math-review-row small{line-height:1.6;color:#cdb9de}.math-toolbar{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}.math-alert{color:#ffd29f;font-size:13px;grid-column:1/-1;min-height:20px}.math-panel [hidden]{display:none!important}
@media(max-width:700px){#game-dialog{padding:20px;border-radius:25px}#game-dialog .dialog-top{top:-20px}.difficulty-options{gap:9px}.difficulty-card{padding:20px 7px;border-radius:18px}.difficulty-card strong{font-size:18px}.difficulty-card>span:not(.difficulty-icon){font-size:10px}.difficulty-card small{font-size:9px}.difficulty-icon{font-size:31px}.game-welcome img{width:95px;height:95px}.game-welcome p{font-size:19px}.level-header{gap:8px}.level-step{width:27px;height:27px}.level-progress{gap:5px}.change-difficulty{font-size:10px;padding:9px}.dressup-grid{gap:9px}.card-back,.card-front,.card-turn,.dressup-card{border-radius:14px}.card-back-small{font-size:5px;letter-spacing:.5px}.match-check{width:20px;height:20px;font-size:10px;top:3px;right:3px}.color-options{gap:12px;padding:5px}.color-orb{width:95px;height:100px}.banana-token{width:56px;height:58px;font-size:28px}.number-choice{min-width:65px;height:65px;font-size:25px}.banana-garden{padding:13px;gap:6px}.memory-status{font-size:11px;gap:8px}.peek-button{font-size:11px}.math-panel{padding:25px 19px;border-radius:25px}.math-form{grid-template-columns:1fr 1fr;gap:15px}.math-field:last-of-type{grid-column:1/-1}.operation-picks{gap:8px}.operation-picks label{font-size:11px;padding:10px}.math-session-top{font-size:11px}.math-review-row{font-size:12px;padding:11px;grid-template-columns:22px 1fr}.math-review-row small{grid-column:2}.math-score{font-size:60px}.math-expression{font-size:38px}.math-answer-row input{width:170px}.math-panel .section-heading{align-items:start}}@media(max-width:390px){.dressup-grid{gap:6px}.costume-label{font-size:8px;padding:5px 2px}.card-back-name{font-size:10px}.difficulty-card>span:not(.difficulty-icon){font-size:9px}.level-step{width:23px;height:23px}}@media(prefers-reduced-motion:reduce){.card-turn{transition:none}.game-confetti{display:none}.try-again{animation:none}.math-progress i{transition:none}}

.costume-teaser img{width:88px;height:110px;object-fit:cover;border:5px solid #eee0ff;border-radius:16px;transform:rotate(-12deg);box-shadow:0 5px 0 #0002}.costume-teaser img+img{transform:translateY(-12px) rotate(12deg);margin-left:-14px}.math-section{position:relative}.math-celebration{position:fixed;inset:0;pointer-events:none;z-index:40;overflow:hidden}.math-celebration i{position:absolute;top:-20px;width:10px;height:16px;border-radius:3px;animation:math-confetti 1.8s ease-in forwards}@keyframes math-confetti{to{transform:translateY(100vh) rotate(540deg);opacity:0}}.number-sign{background:#3d2853;border:1px solid #9c78bb;color:white;border-radius:15px;font-size:24px;min-width:50px}.exam-stars{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;color:#76568e;font-size:27px}.exam-stars .earned{color:#ffdb83}.math-report h3{font-size:30px}.math-report>p:not(.math-score){line-height:1.8}@media(max-width:700px){.nav-links{gap:10px;font-size:11px}.exam-stars{gap:5px;font-size:23px}}@media(prefers-reduced-motion:reduce){.math-celebration{display:none}}
