
:root{
  --ink:#302a55;--muted:#726d92;--purple:#725ee8;--purple2:#8f79ff;--cream:#fffaf1;
  --yellow:#ffc958;--orange:#ff9758;--pink:#ff7e95;--mint:#59d8b7;--sky:#66c6f3;
  --card:#ffffff;--soft:#f4f0ff;--line:rgba(63,51,111,.1);--shadow:0 16px 40px rgba(66,53,118,.13);
  --safe-top:max(14px,env(safe-area-inset-top));--safe-bottom:max(18px,env(safe-area-inset-bottom));
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;min-height:100%;background:#dfe8ff;color:var(--ink);font-family:'Nunito',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;overscroll-behavior:none}
button{font:inherit;color:inherit;border:0;cursor:pointer;touch-action:manipulation}
button:focus-visible{outline:4px solid rgba(114,94,232,.25);outline-offset:3px}
.hidden{display:none!important}
.app-shell{position:relative;min-height:100svh;max-width:720px;margin:0 auto;overflow:hidden;background:linear-gradient(180deg,#c9efff 0,#eaf9ff 24%,#fffaf1 54%,#fff7e7 100%);box-shadow:0 0 80px rgba(42,35,86,.12)}
.sky-decor{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:0}
.cloud{position:absolute;width:95px;height:32px;background:rgba(255,255,255,.66);border-radius:40px;filter:blur(.2px);animation:drift 14s ease-in-out infinite alternate}
.cloud:before,.cloud:after{content:"";position:absolute;background:inherit;border-radius:50%}
.cloud:before{width:42px;height:42px;left:18px;bottom:8px}.cloud:after{width:52px;height:52px;right:12px;bottom:3px}
.cloud-a{top:100px;left:-28px}.cloud-b{top:178px;right:-26px;transform:scale(.72);animation-delay:-5s}
.sparkle{position:absolute;color:#fff;font-size:18px;opacity:.72;animation:twinkle 2.6s ease-in-out infinite}.s1{top:130px;right:23%}.s2{top:245px;left:12%;font-size:12px;animation-delay:-.8s}.s3{top:70px;left:66%;font-size:10px;animation-delay:-1.5s}
.topbar{position:sticky;top:0;z-index:20;height:70px;padding:var(--safe-top) 18px 8px;display:flex;align-items:center;justify-content:space-between;background:linear-gradient(180deg,rgba(207,240,255,.94),rgba(207,240,255,.55),transparent);backdrop-filter:blur(8px)}
.brand-mini{display:flex;align-items:center;gap:8px;font-size:18px}.mini-star{display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:linear-gradient(135deg,var(--yellow),var(--orange));color:#fff;font-size:15px;transform:rotate(-7deg);box-shadow:0 6px 14px rgba(255,151,88,.25)}
.top-actions{display:flex;align-items:center;gap:8px}.star-bank{display:flex;align-items:center;gap:5px;height:40px;padding:0 12px;border:1px solid rgba(255,255,255,.78);border-radius:15px;background:rgba(255,255,255,.64);box-shadow:0 7px 20px rgba(71,61,111,.08);font-size:15px}.star-bank span{color:#ffb631;font-size:18px;text-shadow:0 2px #fff}.icon-btn{width:42px;height:42px;border-radius:15px;background:rgba(255,255,255,.72);display:grid;place-items:center;font-size:22px;font-weight:900;box-shadow:0 7px 20px rgba(71,61,111,.08)}
#backBtn{font-size:34px;line-height:1;padding-bottom:5px}.screen{display:none;position:relative;z-index:1}.screen.active{display:block}
.hero{min-height:calc(100svh - 70px);padding:28px 24px 32px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.mascot-wrap{position:relative;width:218px;height:218px;margin:-24px 0 4px}.mascot{width:100%;height:100%;animation:float 3.4s ease-in-out infinite}.orbit-dot{position:absolute;border-radius:50%;animation:orbitPulse 2.4s ease-in-out infinite}.od1{width:15px;height:15px;background:var(--pink);left:12px;top:72px}.od2{width:10px;height:10px;background:var(--mint);right:9px;top:110px;animation-delay:-.7s}.od3{width:8px;height:8px;background:var(--purple2);right:34px;top:30px;animation-delay:-1.3s}
.eyebrow{margin:0 0 7px;font-size:11px;font-weight:900;letter-spacing:.16em;color:var(--purple);text-transform:uppercase}.hero h1{font-size:53px;line-height:.95;margin:0;letter-spacing:-.055em;font-weight:900;color:#4b3b93;text-shadow:0 3px 0 rgba(255,255,255,.65)}.hero-sub{font-size:18px;margin:12px 0 26px;color:var(--muted);font-weight:700}
.play-btn{min-height:64px;width:min(100%,330px);border-radius:23px;padding:0 22px;display:flex;align-items:center;justify-content:center;gap:13px;background:linear-gradient(135deg,#765fe9,#8d72f6);color:#fff;font-size:19px;font-weight:900;box-shadow:0 12px 0 #5846bc,0 19px 28px rgba(89,68,187,.25);transition:transform .12s ease,box-shadow .12s ease}.play-btn:active{transform:translateY(5px);box-shadow:0 7px 0 #5846bc,0 12px 20px rgba(89,68,187,.2)}.play-symbol{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.18);font-size:14px;padding-left:2px}.play-btn.compact{min-height:58px;border-radius:19px;box-shadow:0 8px 0 #5846bc,0 14px 24px rgba(89,68,187,.2);font-size:17px}.play-btn.compact:active{transform:translateY(4px);box-shadow:0 4px 0 #5846bc}
.journey{padding:24px 18px 34px;background:linear-gradient(180deg,rgba(255,255,255,.28),rgba(255,250,241,.95));border-radius:36px 36px 0 0}.section-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:0 4px 20px}.section-heading h2{font-size:25px;margin:0;letter-spacing:-.03em}.progress-pill{background:#fff;border:1px solid var(--line);border-radius:15px;padding:9px 12px;font-weight:800;color:var(--muted);box-shadow:0 7px 20px rgba(57,45,101,.06)}.progress-pill b{color:var(--purple)}
.world-card{position:relative;border-radius:28px;padding:19px 16px 17px;margin-bottom:18px;overflow:hidden;border:1px solid rgba(255,255,255,.9);box-shadow:var(--shadow)}.world-card.numbers{background:linear-gradient(145deg,#fff0c6,#fff9ea)}.world-card.letters{background:linear-gradient(145deg,#e5e0ff,#f7f4ff)}.world-card.words{background:linear-gradient(145deg,#d6f7ed,#f1fffb)}.world-top{display:flex;align-items:center;gap:12px;margin:0 2px 14px}.world-icon{width:48px;height:48px;border-radius:17px;display:grid;place-items:center;font-size:23px;background:#fff;box-shadow:0 7px 16px rgba(63,54,103,.08)}.world-top h3{margin:0;font-size:19px}.world-top p{margin:2px 0 0;font-size:12px;color:var(--muted);font-weight:700}.levels-row{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}.level-node{position:relative;min-width:0;height:79px;border-radius:20px;background:rgba(255,255,255,.86);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;box-shadow:0 7px 14px rgba(58,48,100,.07);border:2px solid rgba(255,255,255,.95);transition:.15s ease}.level-node:not(.locked):active{transform:scale(.95)}.level-node .num{font-size:20px;font-weight:900}.level-node .mini-stars{font-size:10px;letter-spacing:-1px;color:#d9d5e8;white-space:nowrap}.level-node .mini-stars .on{color:#ffb52b}.level-node.current{border-color:rgba(114,94,232,.32);box-shadow:0 8px 18px rgba(114,94,232,.16)}.level-node.current:after{content:"";position:absolute;top:-6px;right:-5px;width:15px;height:15px;border-radius:50%;background:var(--pink);border:3px solid #fff}.level-node.locked{opacity:.47;filter:saturate(.45)}.lock-mark{font-size:14px}.safe-note{padding:8px 24px 30px;text-align:center;color:#9b94ac;font-size:11px;font-weight:800}.safe-note span{color:var(--pink)}
.game-screen{min-height:calc(100svh - 70px);padding:10px 18px var(--safe-bottom)}.level-head{display:flex;align-items:center;justify-content:space-between;margin:4px 2px 15px}.level-copy h2{font-size:24px;line-height:1;margin:5px 0 0}.world-chip{font-size:10px;text-transform:uppercase;letter-spacing:.12em;font-weight:900;color:var(--purple)}.round-dots{display:flex;gap:5px}.round-dots i{width:9px;height:9px;border-radius:50%;background:#ded9eb;transition:.25s ease}.round-dots i.done{background:var(--mint);transform:scale(1.1)}.round-dots i.now{background:var(--purple);box-shadow:0 0 0 4px rgba(114,94,232,.12)}
.prompt-card{min-height:92px;margin-bottom:16px;padding:15px 18px;border-radius:24px;background:rgba(255,255,255,.76);border:1px solid rgba(255,255,255,.9);box-shadow:0 10px 28px rgba(58,48,100,.07);display:flex;align-items:center;gap:14px;backdrop-filter:blur(8px)}.prompt-icon{width:54px;height:54px;flex:0 0 auto;border-radius:18px;display:grid;place-items:center;background:linear-gradient(145deg,#fff4c8,#ffdd78);font-size:28px;box-shadow:inset 0 -4px 8px rgba(255,174,52,.09)}.prompt-card p{margin:0;font-size:18px;font-weight:900;line-height:1.25}
.play-zone{min-height:390px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:15px}.answer-grid{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.answer-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.answer-card{position:relative;min-height:136px;border-radius:27px;background:#fff;border:3px solid rgba(255,255,255,.98);box-shadow:0 11px 0 #e2deef,0 17px 24px rgba(65,51,113,.1);display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;padding:12px;overflow:hidden;transition:.15s ease}.answer-card:active{transform:translateY(5px);box-shadow:0 6px 0 #e2deef,0 11px 18px rgba(65,51,113,.08)}.answer-card.good{animation:correctPop .55s ease;border-color:#9be7d2;background:#effcf8}.answer-card.nope{animation:softShake .4s ease;border-color:#ffc6cd;background:#fff7f8}.answer-main{font-size:48px;font-weight:900;line-height:1}.answer-sub{font-size:12px;color:var(--muted);font-weight:800}.answer-emoji{font-size:48px;filter:drop-shadow(0 4px 4px rgba(60,47,105,.08))}.answer-letter{font-size:58px;font-weight:900;color:#4a3e8d}.answer-word{font-size:27px;font-weight:900;color:#4a3e8d;letter-spacing:.02em}.answer-card:nth-child(4n+1) .answer-main,.answer-card:nth-child(4n+1) .answer-letter{color:#6853d7}.answer-card:nth-child(4n+2) .answer-main,.answer-card:nth-child(4n+2) .answer-letter{color:#e7667c}.answer-card:nth-child(4n+3) .answer-main,.answer-card:nth-child(4n+3) .answer-letter{color:#21a989}.answer-card:nth-child(4n) .answer-main,.answer-card:nth-child(4n) .answer-letter{color:#e58d27}
.object-board{width:100%;min-height:190px;padding:20px;border-radius:29px;background:rgba(255,255,255,.72);border:1px solid #fff;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:11px;box-shadow:0 12px 30px rgba(64,52,111,.07)}.count-object{font-size:42px;line-height:1;animation:popIn .4s cubic-bezier(.2,.8,.2,1) backwards}.count-object:nth-child(2){animation-delay:.05s}.count-object:nth-child(3){animation-delay:.1s}.count-object:nth-child(4){animation-delay:.15s}.count-object:nth-child(5){animation-delay:.2s}.count-object:nth-child(6){animation-delay:.25s}
.object-and-answers{display:flex;flex-direction:column;gap:17px;width:100%}.number-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:11px;width:100%}.number-strip .answer-card{min-height:100px;border-radius:24px}.number-strip .answer-main{font-size:44px}
.letter-hero{width:168px;height:168px;border-radius:45px;background:linear-gradient(145deg,#fff,#f0ecff);box-shadow:0 14px 0 #ded8f5,0 22px 34px rgba(65,51,113,.12);display:grid;place-items:center;font-size:92px;font-weight:900;color:var(--purple);margin:2px auto 13px;transform:rotate(-2deg)}
.sequence{width:100%;display:flex;align-items:center;justify-content:center;gap:9px;margin:10px 0 23px}.seq-tile{width:62px;height:72px;border-radius:20px;background:#fff;box-shadow:0 8px 0 #e3deef;display:grid;place-items:center;font-size:31px;font-weight:900}.seq-tile.missing{border:3px dashed #a99ae9;color:var(--purple);background:#f9f7ff;box-shadow:none}
.word-picture{font-size:90px;margin-bottom:5px;filter:drop-shadow(0 10px 11px rgba(70,54,119,.11));animation:float 3s ease-in-out infinite}.word-slots{display:flex;justify-content:center;gap:7px;width:100%;margin:3px 0 18px}.word-slot{width:55px;height:63px;border-radius:17px;background:#fff;box-shadow:0 7px 0 #e3deef;display:grid;place-items:center;font-size:30px;font-weight:900;color:var(--purple)}.letter-tray{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;width:100%}.letter-tile{width:67px;height:67px;border-radius:20px;background:#fff;box-shadow:0 8px 0 #ddd8eb;font-size:30px;font-weight:900;color:#4a3e8d}.letter-tile:active{transform:translateY(4px);box-shadow:0 4px 0 #ddd8eb}.letter-tile.used{opacity:.25;pointer-events:none}.letter-tile.bad{animation:softShake .4s ease}.letter-tile.good{animation:correctPop .4s ease;background:#effcf8}
.comparison{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;width:100%}.count-choice{min-height:190px;padding:15px;border-radius:28px;background:#fff;box-shadow:0 10px 0 #e2deef;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:5px;font-size:34px}.count-choice:active{transform:translateY(4px);box-shadow:0 6px 0 #e2deef}.versus{font-weight:900;color:#9990b4}
.encouragement{min-height:30px;text-align:center;color:var(--muted);font-size:13px;font-weight:800;padding:5px}.encouragement.success{color:#159879;animation:popIn .3s ease}.encouragement.retry{color:#e16b7c}
.toast{position:fixed;z-index:80;left:50%;bottom:calc(var(--safe-bottom) + 12px);transform:translate(-50%,120px);max-width:calc(100% - 40px);padding:12px 17px;border-radius:18px;background:#342d59;color:#fff;font-size:13px;font-weight:800;box-shadow:0 10px 30px rgba(33,28,65,.22);opacity:0;transition:.3s ease}.toast.show{transform:translate(-50%,0);opacity:1}
.modal-backdrop{position:fixed;inset:0;z-index:70;background:rgba(45,38,82,.32);backdrop-filter:blur(8px);display:flex;align-items:flex-end;justify-content:center;padding:18px}.modal-card{position:relative;width:min(100%,500px);border-radius:34px;background:#fffdf8;padding:31px 24px calc(26px + env(safe-area-inset-bottom));box-shadow:0 30px 80px rgba(35,28,73,.25);animation:sheetIn .38s cubic-bezier(.16,.84,.26,1)}.completion-card{text-align:center}.big-badge{width:98px;height:98px;border-radius:32px;margin:-78px auto 16px;background:linear-gradient(145deg,#ffe580,#ffad4c);display:grid;place-items:center;transform:rotate(-5deg);box-shadow:0 12px 0 #f3983d,0 19px 35px rgba(226,139,55,.26);border:5px solid #fff}.big-badge span{font-size:55px;color:#fff;filter:drop-shadow(0 3px 0 rgba(189,115,32,.14))}.modal-card h2{font-size:28px;margin:4px 0 4px;letter-spacing:-.03em}.earned-stars{font-size:35px;letter-spacing:5px;color:#ffba37;text-shadow:0 3px 0 #fff1b8;margin:8px 0}.modal-copy{color:var(--muted);font-weight:700;margin:0 0 22px}.text-btn{background:transparent;color:var(--muted);font-weight:900;padding:17px 20px 5px}.modal-close{position:absolute;right:18px;top:18px;width:42px;height:42px;border-radius:15px;background:#f2eff9;font-size:26px}.settings-icon{width:66px;height:66px;border-radius:22px;background:linear-gradient(145deg,#e9e3ff,#f6f2ff);display:grid;place-items:center;font-size:30px;color:var(--purple);margin-bottom:13px}.settings-card h2{margin:0 0 18px}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:15px 2px;border-top:1px solid var(--line)}.setting-row b{display:block}.setting-row small{display:block;color:var(--muted);margin-top:2px;font-weight:700}.toggle{position:relative;width:54px;height:31px;border-radius:18px;background:#d8d4e3;padding:3px;transition:.2s ease;flex:0 0 auto}.toggle span{display:block;width:25px;height:25px;border-radius:50%;background:#fff;box-shadow:0 3px 8px rgba(43,35,78,.18);transition:.2s ease}.toggle.on{background:var(--mint)}.toggle.on span{transform:translateX(23px)}.settings-tip{margin:16px 0 0;padding:13px 15px;border-radius:17px;background:#f7f4ff;color:var(--muted);font-size:11px;line-height:1.5;font-weight:700}
.celebration{position:fixed;inset:0;z-index:75;pointer-events:none;overflow:hidden}.confetti{position:absolute;top:-24px;width:10px;height:18px;border-radius:4px;animation:confettiFall 1.8s cubic-bezier(.18,.74,.35,.98) forwards}.confetti:nth-child(4n+1){background:#ffbf41}.confetti:nth-child(4n+2){background:#7b66ec}.confetti:nth-child(4n+3){background:#55d3b0}.confetti:nth-child(4n){background:#ff7e95}
@keyframes float{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-9px) rotate(1deg)}}
@keyframes drift{from{transform:translateX(-5px)}to{transform:translateX(17px)}}
@keyframes twinkle{0%,100%{opacity:.35;transform:scale(.75) rotate(0)}50%{opacity:.9;transform:scale(1.2) rotate(18deg)}}
@keyframes orbitPulse{0%,100%{transform:scale(.75);opacity:.5}50%{transform:scale(1.15);opacity:1}}
@keyframes popIn{from{transform:scale(.65);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes correctPop{0%,100%{transform:scale(1)}45%{transform:scale(1.08)}}
@keyframes softShake{0%,100%{transform:translateX(0)}25%{transform:translateX(-6px)}70%{transform:translateX(5px)}}
@keyframes sheetIn{from{transform:translateY(45px);opacity:0}to{transform:translateY(0);opacity:1}}
@keyframes confettiFall{0%{transform:translate3d(0,-20px,0) rotate(0);opacity:1}100%{transform:translate3d(var(--drift),105svh,0) rotate(520deg);opacity:.8}}
@media(min-width:620px){.app-shell{min-height:100vh}.hero{min-height:720px}.journey{padding-inline:30px}.game-screen{padding-inline:30px}.play-zone{min-height:470px}.answer-card{min-height:150px}.modal-backdrop{align-items:center}.completion-card{padding-top:38px}.big-badge{margin:-86px auto 16px}}
@media(max-height:700px){.hero{min-height:630px}.mascot-wrap{width:175px;height:175px;margin-top:-15px}.hero h1{font-size:46px}.play-zone{min-height:330px}.answer-card{min-height:112px}.prompt-card{min-height:76px}.prompt-icon{width:46px;height:46px}.letter-hero{width:132px;height:132px;font-size:75px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important}}
