*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#f5dce7;color:#4e3859;font-family:Nunito,ui-rounded,system-ui,sans-serif}button,input{font:inherit}button{cursor:pointer;color:inherit;-webkit-tap-highlight-color:transparent}button:focus-visible,input:focus-visible{outline:4px solid #e55997;outline-offset:5px}button:disabled{cursor:default}#app{position:relative;width:100%;height:100dvh;overflow:hidden;isolation:isolate;--world:#ffce55;--ink:#57402a}#game{position:absolute;inset:0;width:100%;height:100%;image-rendering:pixelated}#interface{position:absolute;inset:0;pointer-events:none}#interface button,#interface input,#interface .veil{pointer-events:auto}.primary,.secondary{border:3px solid #654668;box-shadow:0 5px 0 #654668,inset 0 0 0 3px #fff7d0;border-radius:12px;padding:14px 24px;min-height:54px;font-weight:900;font-size:18px;background:#ffdb71;transition:transform .14s,filter .14s}.primary:hover,.secondary:hover{filter:brightness(1.05);transform:translateY(-2px)}.primary:active,.secondary:active{transform:translateY(3px);box-shadow:0 2px 0 #654668}.secondary{background:#fff5df}.text-button{border:0;background:none;font-weight:800;text-decoration:underline;text-underline-offset:3px;padding:12px;font-size:15px}.corner{position:absolute;right:max(20px,env(safe-area-inset-right));top:max(16px,env(safe-area-inset-top));border:3px solid #986d90;background:#fff6e5cc;border-radius:12px;width:48px;height:48px;font-size:24px;box-shadow:inset 0 0 0 2px #fff}.sound-corner{right:80px}.home-corner{left:20px;right:auto}.title-screen{position:absolute;inset:0;text-align:center}.title-logo{position:absolute;top:8%;left:50%;transform:translateX(-50%);width:min(380px,77vw);height:24%;object-fit:contain;image-rendering:pixelated;animation:logo-enter .75s cubic-bezier(.2,1.6,.3,1),logo-float 4s 1s ease-in-out infinite}.title-line{position:absolute;top:37%;left:50%;transform:translateX(-50%);width:max-content;max-width:90%;padding:12px 20px;margin:0;background:#fff8df;border:3px solid #94698c;box-shadow:0 4px 0 #c798b8;border-radius:14px;font-size:clamp(16px,2.7vw,25px);font-weight:900}.title-actions{position:absolute;bottom:max(20px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;flex-direction:column;gap:10px;min-width:220px}.title-actions button{min-height:52px}.world-map{position:absolute;inset:0}.world-map header h1{font-size:clamp(22px,3vw,32px);text-align:center;margin:30px 65px 0;color:#644366}.entrance{position:absolute;transform:translate(-50%,-50%);width:190px;background:none;border:0;text-align:center;display:flex;flex-direction:column;align-items:center;padding:0;filter:drop-shadow(0 5px 1px #88644825);transition:filter .3s}.entrance:hover{filter:drop-shadow(0 0 10px #ffeac0)}.entrance>canvas:first-child{width:105px;height:90px;image-rendering:pixelated}.entrance .map-collectible{position:absolute;width:38px;height:38px;top:-12px;right:28px;image-rendering:pixelated;animation:collectible-bob 2s ease-in-out infinite}.entrance span{font-size:17px;font-weight:1000;line-height:1.15;background:#fff5ddd9;padding:4px 8px;border-radius:6px}.entrance small{font-size:23px;color:#c49323;letter-spacing:4px;text-shadow:1px 2px #fff6c6}.unlock-bar{position:absolute;bottom:max(12px,env(safe-area-inset-bottom));left:20px;right:20px;background:#fff7e3e6;border:3px solid #caa3ab;box-shadow:inset 0 0 0 2px #fff;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 14px;border-radius:12px;font-weight:800}.unlock-bar button{border:0;background:#f6d69c;padding:7px;border-radius:7px;font-weight:900}.unlock-bar span{font-size:14px}.pixel-hud{position:absolute;top:max(12px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));min-height:74px;display:flex;align-items:center;gap:14px;padding:8px 12px;background:color-mix(in srgb,var(--world) 35%,#fff8e1 65%);border:4px solid var(--ink);box-shadow:inset 0 0 0 3px #fff8d4,0 4px 0 #382a4344;border-radius:4px;color:var(--ink)}.hud-logo{width:77px;height:49px;object-fit:contain;image-rendering:pixelated}.world-title{display:flex;flex-direction:column;min-width:120px;max-width:260px;margin-right:auto}.world-title small{font:800 12px ui-monospace,monospace;letter-spacing:1px}.world-title strong{font-size:17px;line-height:1.1;font-weight:1000}.meter{display:flex;align-items:center;gap:7px;font-size:22px;font-weight:1000;white-space:nowrap}.health{color:#ce537c;letter-spacing:2px}.currency{color:#72548b}.objective-meter canvas{width:39px;height:39px;image-rendering:pixelated}.level-number{font:bold 14px ui-monospace,monospace}.pause-button{width:44px;height:44px;flex:0 0 44px;border:3px solid var(--ink);background:#fff5d4;box-shadow:inset 0 0 0 2px white;font-weight:900;font-size:23px;border-radius:5px}.tier-label{position:absolute;top:105px;left:50%;transform:translateX(-50%);padding:5px 12px;background:#fff9eacb;border:2px solid #a58a9b;font-size:14px;font-weight:900;border-radius:6px}.veil{position:absolute;inset:0;background:#58405a3d;display:flex;align-items:center;justify-content:center;padding:20px;backdrop-filter:blur(3px);animation:veil-in .22s ease-out;overflow:auto}.dialog,.question-panel{background:#fff9e9;border:4px solid #805976;box-shadow:inset 0 0 0 4px #ffe9bc,0 9px 0 #503a5966;border-radius:18px;padding:27px;max-width:580px;width:100%;max-height:calc(100dvh - 40px);overflow:auto;text-align:center}.dialog h2,.question-panel h2{font-size:28px;line-height:1.15;margin:10px 0 20px}.dialog h3{font-size:23px}.dialog>.primary,.dialog>.secondary{display:block;margin:15px auto 0;width:100%}.slider{display:flex;align-items:center;gap:20px;justify-content:space-between;font-weight:900;font-size:18px;margin:25px 0}.slider input{width:65%;accent-color:#d1679d;height:28px}.small-copy{font-size:15px;line-height:1.5}.target-large{width:120px;height:120px;image-rendering:pixelated;animation:collectible-bob 1s infinite}.level-intro{background:#fff4d65e}.question-heading{display:flex;align-items:center;justify-content:space-between;font-weight:900;font-size:15px}.listen{border:2px solid #8d6a9b;border-radius:8px;background:#f0ddf6;width:46px;height:44px;font-size:25px}.word-display{font-size:clamp(28px,6vw,44px);font-weight:900;margin:10px 0;color:#4b3560;line-height:1.2}.object-display{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;max-width:430px;margin:14px auto}.count-object{position:relative;border:0;background:none;font-size:32px;padding:3px;min-width:38px;min-height:38px;line-height:1.2}.count-object.crossed{opacity:.25}.count-object.crossed:after{content:'×';position:absolute;inset:0;color:#61324a;font-size:45px;font-weight:1000}.count-object.counted{opacity:.4;transform:translateY(-5px)}.compare-group{width:46%;border:2px dashed #c9a9c1;border-radius:8px;font-size:16px;color:#825999;padding:9px}.compare-group b{display:block;font-size:28px}.q-picture{font-size:55px}.answer-options{display:flex;gap:14px;justify-content:center;flex-wrap:wrap;margin:18px 0}.answer{min-width:83px;min-height:80px;border:3px solid #86668d;background:#fff;box-shadow:0 4px 0 #b8a1bf;border-radius:12px;font-size:40px;font-weight:900;padding:8px}.answer.removed{opacity:.2;transform:scale(.8)}.answer.correct{background:#d7f6c9;border-color:#56864d;box-shadow:0 0 0 5px #b0e994;animation:answer-glow 1s infinite}.feedback{min-height:43px;font-size:17px;font-weight:800;line-height:1.35}.question-panel footer{display:flex;align-items:center;justify-content:space-between;gap:10px}.earned-stars{display:flex;justify-content:center;gap:20px}.earned-stars div{flex:1;animation:star-in .65s both}.earned-stars b{font-size:70px;color:#eabb45;line-height:1.1;text-shadow:2px 3px #8c6338}.earned-stars span{display:block;font-size:14px;font-weight:900}.recap-actions{display:flex;justify-content:center;gap:15px;margin-top:22px}.outfit-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.outfit{border:3px solid #c599ba;background:#fff2ce;border-radius:12px;padding:12px;font-size:40px}.outfit span,.outfit small{display:block;font-size:16px;font-weight:800}.outfit:disabled{opacity:.4}#touch-controls{position:absolute;inset:0;pointer-events:none;z-index:5;touch-action:none}#touch-controls[hidden]{display:none}.direction-pad{position:absolute;left:max(28px,calc(env(safe-area-inset-left) + 20px));bottom:max(28px,calc(env(safe-area-inset-bottom) + 20px));display:flex;gap:18px;pointer-events:none}#touch-controls button{position:relative;pointer-events:auto;width:80px;height:80px;border:3px solid #694568;border-radius:17px;background:#fff2d4;box-shadow:inset 0 0 0 3px #fff,0 5px 0 #5d456d7a;font-size:35px;opacity:.6;touch-action:none;user-select:none;-webkit-user-select:none;transition:opacity .1s,transform .1s}#touch-controls button:before{content:'';position:absolute;inset:-20px;border-radius:20px}#touch-controls .held{opacity:1;transform:scale(1.06)}#touch-controls .jump-control{position:absolute;right:max(28px,calc(env(safe-area-inset-right) + 20px));bottom:max(28px,calc(env(safe-area-inset-bottom) + 20px));background:#ffda70}.jump-control span{display:block;font-size:14px;font-weight:1000;line-height:1}#toast{position:absolute;z-index:8;left:50%;bottom:155px;transform:translate(-50%,15px);opacity:0;transition:.2s;pointer-events:none;text-align:center;background:#fff7dfed;border:3px solid #93668c;border-radius:10px;padding:10px 15px;max-width:90%;font-size:16px;font-weight:900}#toast.visible{opacity:1;transform:translate(-50%,0)}.loading{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;font-size:22px;font-weight:900;background:#f6d6e3}
@keyframes logo-enter{from{opacity:0;transform:translate(-50%,-50px) scale(.7)}to{opacity:1;transform:translate(-50%,0) scale(1)}}@keyframes logo-float{50%{transform:translate(-50%,-5px)}}@keyframes collectible-bob{50%{transform:translateY(-7px)}}@keyframes veil-in{from{opacity:0}to{opacity:1}}@keyframes star-in{from{opacity:0;transform:scale(.2) rotate(-20deg)}to{opacity:1;transform:scale(1)}}@keyframes answer-glow{50%{filter:brightness(1.1)}}
@media(max-width:760px){.pixel-hud{gap:7px;min-height:71px;padding:6px;left:8px;right:8px;top:max(8px,env(safe-area-inset-top));border-width:3px}.hud-logo{width:48px;height:42px}.world-title{min-width:0;max-width:none}.world-title small{font-size:10px;letter-spacing:0}.world-title strong{font-size:12px}.health{font-size:14px;letter-spacing:0}.meter{gap:3px;font-size:17px}.objective-meter canvas{width:29px;height:29px}.currency,.level-number{display:none}.pause-button{width:34px;height:39px;flex-basis:34px;font-size:20px}.tier-label{top:90px;font-size:12px}.entrance{width:132px}.entrance span{font-size:14px}.entrance>canvas:first-child{width:90px;height:74px}.entrance .map-collectible{right:4px}.unlock-bar{left:10px;right:10px;padding:7px;gap:7px}.unlock-bar button{font-size:13px}.unlock-bar span{font-size:12px;max-width:160px}.dialog,.question-panel{padding:19px;max-height:calc(100dvh - 26px)}.veil{padding:13px}.question-panel h2{font-size:23px;margin:8px 0}.answer{min-width:75px;min-height:72px;font-size:35px}.answer-options{gap:9px}.feedback{font-size:15px}.question-panel footer .secondary{font-size:16px;padding:10px}.world-map header h1{font-size:22px;margin-top:30px}.title-logo{top:12%;height:22%}.title-line{top:36%;font-size:17px}.title-actions{bottom:max(22px,env(safe-area-inset-bottom))}.earned-stars{gap:9px}.earned-stars b{font-size:53px}.recap-actions{gap:9px}.recap-actions button{padding:12px;font-size:17px}}
#app[data-touch=true] .currency,#app[data-touch=true] .level-number{display:none}
@media(max-height:540px) and (min-width:600px){.title-logo{left:28%;top:12%;width:260px;height:40%}.title-line{left:28%;top:55%;max-width:42%;font-size:17px}.title-actions{left:75%;bottom:35%}.pixel-hud{min-height:60px;top:7px}.tier-label{top:78px}.world-map header h1{margin:12px 80px 0;font-size:22px}.entrance>canvas:first-child{height:52px;width:75px}.entrance span{font-size:12px}.entrance small{font-size:16px}.entrance .map-collectible{width:26px;height:26px}.unlock-bar{bottom:4px;padding:3px 8px}.dialog,.question-panel{max-height:94dvh}.question-panel{max-width:650px}.object-display{margin:4px auto}.answer-options{margin:6px}.count-object{font-size:23px;min-width:28px;min-height:28px}.word-display{font-size:28px}.answer{min-height:54px;min-width:66px;font-size:29px}.feedback{margin:8px;font-size:14px}.question-panel h2{font-size:21px;margin:6px}.question-panel footer .secondary{min-height:40px;padding:6px}.slider{margin:12px 0}.dialog h2{font-size:23px}}

@media(max-width:760px){.world-title strong{font-size:14px}.world-title small{font-size:11px}.pixel-hud{gap:5px}.hud-logo{width:43px}.health{font-size:13px}.objective-meter canvas{width:27px}.meter{font-size:16px}}

.intro-cast{display:flex;justify-content:center;align-items:center;gap:25px}.card-avi{width:130px;height:150px;image-rendering:pixelated}.recap-avi{width:90px;height:100px;image-rendering:pixelated;animation:collectible-bob .6s infinite}
/* A quiet, untimed discovery card. Keep counted objects in five-column groups. */
.question-panel .object-display{display:block;max-width:100%}.count-grid{display:grid;grid-template-columns:repeat(5,minmax(0,40px));justify-content:center;gap:3px;margin:auto}.question-panel .count-object{font-size:29px;min-width:0;min-height:37px;padding:1px}.count-object.counted{opacity:1;transform:none;background:#e5f0d4;border-radius:8px}.count-object.counted:before{content:'✓';position:absolute;right:0;top:-5px;font-size:16px;color:#29643a;font-weight:900}.count-object.crossed{opacity:.38}.count-object.crossed:after{font-size:38px;opacity:1}.empty-set{grid-column:1/-1;font-size:35px;font-weight:900;min-height:42px;color:#866b91}.compare-sets,.addition-sets{display:flex;align-items:center;justify-content:center;gap:10px}.question-panel .compare-group{width:50%;padding:10px 4px;background:#f6edf6;border:2px solid #d4bfd8}.compare-group .count-grid{grid-template-columns:repeat(5,minmax(0,24px));gap:1px}.compare-group .count-object{font-size:20px;min-height:26px}.compare-group b{margin-top:8px}.addition-sets .small-set{grid-template-columns:repeat(5,minmax(0,29px));gap:0;flex:1}.small-set .count-object{font-size:24px}.math-symbol{font-size:30px;font-weight:900}.picture-hint{font-size:13px;margin:9px 0 0;color:#79647c}.pattern-strip{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:12px}.pattern-unit{display:flex;gap:4px;font-size:28px;padding-bottom:5px;border-bottom:2px solid #d8c7e3}.pattern-next{font-size:32px;font-weight:900}.check-answer{width:100%;margin:0 0 18px}.check-answer:disabled{opacity:.48;transform:none;filter:none;box-shadow:0 3px 0 #654668}.check-answer[hidden]{display:none}.answer.selected{background:#fff0b0;border-color:#b68326;box-shadow:0 0 0 4px #efcc64}.answer.being-read{outline:4px solid #bc89d0;outline-offset:3px}.question-panel h2.being-read{color:#88519a}.answer-options .answer{transition:background .18s,border-color .18s;position:relative}.answer.selected:after{content:'✓';position:absolute;right:2px;top:-12px;font-size:20px;line-height:26px;width:26px;border-radius:50%;background:#ffda70;color:#665028}.question-panel .feedback{min-height:42px;margin:12px 0}.question-panel footer{margin-top:3px}.question-panel .listen{min-width:48px;min-height:48px}.slider{gap:12px}.slider input{width:55%}#install-status{white-space:pre-line}
@media(max-width:400px){.question-panel{padding:15px}.question-panel .answer{min-width:72px}.pattern-strip{gap:8px}.pattern-unit{font-size:25px}.question-panel h2{font-size:22px}}
@media(max-height:540px) and (min-width:600px){.question-panel .count-grid{grid-template-columns:repeat(5,30px)}.question-panel .count-object{font-size:23px;min-height:28px}.question-panel .check-answer{min-height:44px;margin-bottom:10px;padding:8px}.question-panel .feedback{min-height:24px}.question-panel .pattern-unit{font-size:24px}}

.wardrobe-veil{align-items:center}.wardrobe-dialog{width:min(760px,94vw);max-height:92dvh;overflow:auto;text-align:left}.wardrobe-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:-24px;background:#fff6de;z-index:2;padding:8px 0}.wardrobe-dialog h2{font-size:clamp(20px,4vw,28px)}.wardrobe-dialog header button{min-width:75px}.wardrobe-preview{display:flex;align-items:center;justify-content:center;gap:18px}.wardrobe-preview canvas{width:150px;height:188px;image-rendering:pixelated}.wardrobe-world h3{font-size:20px;margin:20px 0 8px}.wardrobe-world .outfit-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.wardrobe-world .outfit{padding:10px 4px;min-width:0;font-size:16px;display:flex;align-items:center;flex-direction:column}.outfit canvas{width:min(100%,100px);height:100px;object-fit:contain;image-rendering:pixelated}.outfit[aria-pressed=true]{background:#d1f0c1;border-color:#4c8050}.outfit:disabled{opacity:.55}.outfit small{font-size:13px}.gift-art{width:180px;height:180px;image-rendering:pixelated}.gift-diamond{font-size:90px}.gift-dialog p{max-width:32ch;margin:16px auto}.wardrobe-dialog .outfit-grid{margin:0}.world-map .entrance canvas[data-goal]{max-height:90px}.world-map .entrance>span{font-size:clamp(14px,2.4vw,18px)}

/* Friendly, explicit conversations never interrupt exploration. */
.talk-button{position:absolute;bottom:calc(110px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);min-height:72px;z-index:15;font-size:20px;padding:12px 24px;pointer-events:auto}.talk-button[hidden]{display:none}.level-intro .dialog p{font-size:18px}.level-intro .primary{margin-top:16px}

@media(max-height:540px) and (min-width:600px){.title-logo{left:26%;top:7%;height:40%;width:40%}.title-line{left:26%;top:51%;max-width:43%;font-size:16px}.title-actions{left:26%;bottom:8%;flex-direction:row;min-width:0;white-space:nowrap}.title-actions button{font-size:16px;padding:10px 16px;min-height:48px}}
.talk-button:hover{transform:translateX(-50%) translateY(-2px)}.talk-button:active{transform:translateX(-50%) translateY(3px)}

@media(max-width:360px){#touch-controls button{width:72px;height:72px}.direction-pad{left:20px;gap:12px}#touch-controls .jump-control{right:20px}.pixel-hud{gap:5px}.hud-logo{width:36px}.world-title strong{font-size:11px}}

#app[data-mode="play"] #toast{bottom:auto;top:110px;max-width:80%;font-size:17px}#app[data-mode="question"] #toast{display:none}
/* Dress-up choices use independent slots, with a persistent full-character preview. */
.wardrobe-dialog{padding:18px;width:min(660px,96vw);max-height:94dvh;overscroll-behavior:contain}.wardrobe-dialog header{top:-18px;padding:8px 0 12px}.wardrobe-dialog header .primary{font-size:18px;padding:12px 20px;min-height:52px}.wardrobe-preview{background:#f6dbe6;border:3px solid #d9a1b7;border-radius:20px;margin:4px 0 16px;min-height:210px;gap:8px;padding:0 12px}.wardrobe-preview canvas{width:160px;height:200px;flex-shrink:0}.wardrobe-choice{min-width:0;text-align:center}.wardrobe-choice>p:first-child{font-size:20px;line-height:1.2;margin:0 0 12px}.pose-buttons{display:flex;gap:6px;flex-wrap:wrap;justify-content:center}.pose-buttons button{min-height:44px;padding:8px 10px;font-size:15px}.pose-buttons button[aria-pressed=true]{background:#ffd968;border-color:#af853e}.saved-look{font-size:14px;margin:12px 0 0;color:#385d3c}.wardrobe-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:0 0 12px}.wardrobe-tabs button{font-size:16px;min-height:56px;padding:8px 4px;box-shadow:none}.wardrobe-tabs button[aria-selected=true]{background:#ffd968;border-color:#a87b35}.wardrobe-items .outfit-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.wardrobe-items .outfit{padding:8px 4px;min-width:0;display:flex;flex-direction:column;align-items:center;gap:5px;font-size:16px;line-height:1.1;box-shadow:0 3px #b6a086}.wardrobe-items .outfit canvas{height:104px;width:90px;max-width:100%}.wardrobe-items .outfit span{min-height:34px;display:flex;align-items:center;justify-content:center}.wardrobe-items .outfit small{line-height:1.2;min-height:28px;font-size:13px}.wardrobe-items .outfit:disabled{opacity:.65}.wardrobe-items .outfit[aria-pressed=true]{outline:3px solid #588b57;outline-offset:-5px;background:#e0f4cb}.wardrobe-items .no-accessory{height:104px;font-size:48px;color:#9c7884}.legacy-outfits{margin:16px 0}.legacy-outfits summary{padding:12px;cursor:pointer}.reset-look{margin-top:18px;font-size:16px;min-height:48px}.wardrobe-dialog button:focus-visible{outline:4px solid #477cc8;outline-offset:2px}@media(max-width:430px){.wardrobe-dialog{padding:12px}.wardrobe-dialog header{top:-12px}.wardrobe-dialog h2{font-size:21px}.wardrobe-preview{padding:0 4px;gap:0}.wardrobe-preview canvas{width:140px;height:175px}.wardrobe-choice>p:first-child{font-size:18px}.pose-buttons{gap:4px}.pose-buttons button{font-size:14px;padding:6px}.wardrobe-items .outfit-grid{gap:6px}.wardrobe-tabs button{font-size:15px}.wardrobe-items .outfit{font-size:15px}}
/* The illustrated title board, with real controls and the animated equipped Avi. */
@font-face{font-family:AviPixel;src:url('assets/pixelify-sans.ttf') format('truetype');font-weight:400 700;font-display:swap}
.title-screen{--pixel-ink:#102447}
.title-screen .title-logo{left:50%;top:3%;width:min(420px,77vw);height:25%;max-width:78%;object-fit:contain}
.title-screen .title-line{top:75%;left:50%;width:min(500px,84vw);max-width:84%;padding:12px 8px;margin:0;border:4px solid var(--pixel-ink);border-radius:0;background:#fffefa;color:var(--pixel-ink);box-shadow:inset 0 0 0 3px #c9d8e5,4px 0 var(--pixel-ink),-4px 0 var(--pixel-ink),0 4px var(--pixel-ink);font:700 clamp(18px,3.9vw,27px)/1.08 AviPixel,monospace;letter-spacing:0}
.title-screen .title-line:before{content:'';position:absolute;left:24px;top:-13px;width:13px;height:13px;background:#fffefa;border-left:4px solid var(--pixel-ink);border-top:4px solid var(--pixel-ink)}
.title-screen .title-actions{left:50%;bottom:max(4.5%,env(safe-area-inset-bottom));display:flex;flex-direction:row;gap:24px;min-width:0;width:min(480px,79vw);justify-content:center}
.title-screen .title-actions button{flex:1;min-width:0;min-height:58px;padding:9px 8px;border:4px solid var(--pixel-ink);border-radius:0;background:#fb429a;color:#fff;font:700 clamp(21px,4.5vw,30px)/1 AviPixel,monospace;text-shadow:2px 2px #4b3262;box-shadow:inset 0 4px #ff9ccb,inset 0 -5px #c4236e,4px 0 var(--pixel-ink),-4px 0 var(--pixel-ink),0 6px var(--pixel-ink)}
.title-screen .title-actions #continue{background:#29b9ed;box-shadow:inset 0 4px #8ae7ff,inset 0 -5px #138cc0,4px 0 var(--pixel-ink),-4px 0 var(--pixel-ink),0 6px var(--pixel-ink)}
.title-screen .title-actions button:active{transform:translateY(4px)}
.title-screen .corner{width:38px;height:38px;font-size:22px;top:max(9px,env(safe-area-inset-top));right:10px;opacity:.8}
.title-screen .sound-corner{top:max(56px,calc(env(safe-area-inset-top) + 47px));right:10px}
.currency canvas{width:30px;height:34px;image-rendering:pixelated}
@media(max-height:550px) and (min-width:600px){.title-screen .title-line{top:75%;width:360px;font-size:19px;padding:7px}.title-screen .title-actions{bottom:3%;width:340px;gap:24px;left:50%}.title-screen .title-actions button{min-height:40px;font-size:20px}.title-screen .title-logo{left:50%;width:270px;height:26%}}

@media(max-height:550px) and (min-width:600px){.title-screen .title-line{top:74%;width:min(500px,80vw);max-width:80vw;font-size:16px;line-height:1.1;padding:3px 8px;white-space:nowrap}.title-screen .title-line br{display:none}}
/* V14: stepped arcade controls, matched to the title illustration. */
.title-screen .title-actions{gap:26px;width:min(480px,80vw)}
.title-screen .title-actions button{isolation:isolate;position:relative;min-height:65px;border:0;padding:12px 10px 17px;border-radius:0;background:#101a43!important;box-shadow:none!important;clip-path:polygon(12px 0,calc(100% - 12px) 0,calc(100% - 12px) 5px,calc(100% - 5px) 5px,calc(100% - 5px) 12px,100% 12px,100% calc(100% - 13px),calc(100% - 5px) calc(100% - 13px),calc(100% - 5px) calc(100% - 6px),calc(100% - 12px) calc(100% - 6px),calc(100% - 12px) 100%,12px 100%,12px calc(100% - 6px),5px calc(100% - 6px),5px calc(100% - 13px),0 calc(100% - 13px),0 12px,5px 12px,5px 5px,12px 5px);font:700 clamp(23px,5vw,34px)/1 AviPixel,monospace;color:white;text-shadow:2px 3px #b61e69}
.title-screen .title-actions button:before{content:'';position:absolute;z-index:-1;inset:5px 5px 10px;background:linear-gradient(#ffadd0 0 7%,#ff719f 7% 14%,#ff4187 14% 75%,#f02970 75% 88%,#c81a61 88%);box-shadow:inset 4px 0 #ff74af,inset -4px 0 #d32670;clip-path:polygon(8px 0,calc(100% - 8px) 0,calc(100% - 8px) 5px,100% 5px,100% calc(100% - 6px),calc(100% - 7px) calc(100% - 6px),calc(100% - 7px) 100%,7px 100%,7px calc(100% - 6px),0 calc(100% - 6px),0 5px,8px 5px)}
.title-screen .title-actions #continue{text-shadow:2px 3px #0055b8}
.title-screen .title-actions #continue:before{background:linear-gradient(#b7f5ff 0 7%,#45dcff 7% 14%,#008dff 14% 75%,#0077ed 75% 88%,#004bb6 88%);box-shadow:inset 4px 0 #15bdff,inset -4px 0 #0468ce}
.title-screen .title-actions button:active{transform:translateY(4px);filter:brightness(1.12)}
.title-screen .title-line{border:0;isolation:isolate;padding:14px 16px;background:#12244b;box-shadow:none;border-radius:0;clip-path:polygon(0 14px,10px 14px,10px 7px,24px 7px,32px 0,40px 7px,calc(100% - 14px) 7px,calc(100% - 14px) 12px,calc(100% - 7px) 12px,calc(100% - 7px) 19px,100% 19px,100% calc(100% - 14px),calc(100% - 7px) calc(100% - 14px),calc(100% - 7px) calc(100% - 7px),calc(100% - 14px) calc(100% - 7px),calc(100% - 14px) 100%,14px 100%,14px calc(100% - 7px),7px calc(100% - 7px),7px calc(100% - 14px),0 calc(100% - 14px));font-size:clamp(20px,4.1vw,29px)}
.title-screen .title-line:before{inset:5px;left:5px;top:5px;width:auto;height:auto;border:0;z-index:-1;background:linear-gradient(#fffef9 90%,#d9e0ee 90%);clip-path:inherit}
@media(max-height:550px) and (min-width:600px){.title-screen .title-line{top:74%;font-size:16px;padding:7px 12px 4px}.title-screen .title-actions button{min-height:43px;padding:9px 8px 13px;font-size:21px}.title-screen .title-actions{gap:22px}}
@media(max-height:550px) and (min-width:600px){.title-screen .title-line{min-height:38px;padding:12px 12px 6px;line-height:1.1}.title-screen .title-actions{bottom:3%}}
@media(max-height:350px) and (min-width:600px){.title-screen .title-line{top:72%;min-height:30px;font-size:14px;padding:8px 10px 4px;clip-path:polygon(6px 0,calc(100% - 6px) 0,calc(100% - 6px) 4px,100% 4px,100% calc(100% - 4px),calc(100% - 6px) calc(100% - 4px),calc(100% - 6px) 100%,6px 100%,6px calc(100% - 4px),0 calc(100% - 4px),0 4px,6px 4px)}.title-screen .title-line:before{inset:3px}.title-screen .title-actions button{min-height:38px;font-size:19px;padding:6px 8px 10px}}

/* Requested loading experience and exclusive outfit states; approved screens retain their styles. */
.magic-loading{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:28px;color:#fff1fc;overflow:hidden;background:radial-gradient(ellipse at 50% 38%,#6941a2 0%,#35235e 48%,#191638 100%);pointer-events:auto}
.magic-loading h2{font-size:clamp(24px,5vw,38px);margin:16px 0 6px;position:relative;max-width:520px}.magic-loading p{font-size:16px;color:#e2c9ef;margin:0 0 28px;position:relative}.magic-loading output{font-size:14px;color:#f6e6fc;margin-top:14px}.magic-loading progress{appearance:none;width:min(290px,80vw);height:14px;border:2px solid #a887c0;border-radius:20px;background:#211535;overflow:hidden}.magic-loading progress::-webkit-progress-bar{background:#211535}.magic-loading progress::-webkit-progress-value{background:linear-gradient(90deg,#f287cf,#ffe59a);border-radius:20px;transition:width .25s}.magic-loading progress::-moz-progress-bar{background:#ffd391;border-radius:20px}.magic-orbit{position:relative;width:180px;height:180px;animation:magic-drift 3s ease-in-out infinite}.magic-orbit b{display:block;font-size:120px;line-height:180px;color:#ffd991;text-shadow:0 0 34px #edbaff;animation:magic-pulse 2s ease-in-out infinite}.magic-orbit span{position:absolute;font-size:28px;color:#fff5ce;animation:magic-pulse 1.8s ease-in-out infinite}.magic-orbit span:nth-child(1){top:12px;left:2px}.magic-orbit span:nth-child(2){right:-8px;top:60px;animation-delay:.5s}.magic-orbit span:nth-child(3){left:12px;bottom:6px;animation-delay:1s}.magic-glow{position:absolute;width:75vmin;height:75vmin;border-radius:50%;box-shadow:0 0 120px 20px #ce91ea20,inset 0 0 100px #d7a3fb12;animation:magic-pulse 5s ease-in-out infinite}.outfit.rare-outfit{background:linear-gradient(140deg,#f5dcff,#fff2ce);border-color:#b987c8}.outfit.rare-outfit small{color:#794785}.rare-unlock{background:#fff0c4;border:2px solid #deb76e;border-radius:12px;padding:12px;color:#78428b;font-weight:800}.rare-unlock small{font-size:14px}@keyframes magic-drift{50%{transform:translateY(-12px)}}@keyframes magic-pulse{50%{opacity:.58;filter:brightness(1.3)}}@media(prefers-reduced-motion:reduce){.magic-orbit,.magic-orbit b,.magic-orbit span,.magic-glow{animation:none}}

/* Practice follows the existing game dialog, including narrow phone layouts. */
.question-story{font-size:1.1rem;line-height:1.5;background:#f4e8f6;border-radius:12px;padding:14px;text-align:left;color:#4b3560}
.similar-question{display:block;width:100%;min-height:48px;margin:12px 0}
.practice-summary{text-align:left;margin:16px 0;padding:12px;border:2px solid #d4bfd8;border-radius:10px}
.practice-summary summary{font-size:1rem;font-weight:800;cursor:pointer;min-height:44px;display:flex;align-items:center}
.question-panel .answer:focus-visible,.question-panel button:focus-visible{outline:4px solid #503a79;outline-offset:4px}
@media(max-width:400px){.question-panel .answer-options{gap:8px}.question-panel .answer{min-width:64px;max-width:100%;font-size:2rem}.question-story{font-size:1rem;padding:10px}.question-panel footer{flex-wrap:wrap}.question-panel .feedback{font-size:1rem}}

.measure-sets{display:flex;justify-content:center;gap:36px;margin:20px auto}.measure-column{display:flex;flex-direction:column;justify-content:flex-end;align-items:center;height:115px;min-width:68px}.measure-bar{width:44px;background:#a78dc2;border:3px solid #644378;border-radius:5px 5px 0 0}.measure-column b{width:100%;border-top:3px solid #644378;padding-top:7px;font-size:1rem}
/* V18: picture-first navigation, visible rewards, and a simpler dress-up box. */
.adventure-map{position:absolute;inset:0;display:flex;flex-direction:column;padding:max(18px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));gap:16px;overflow:auto;pointer-events:auto;background:linear-gradient(180deg,#ffeebd50,#fff9e6c9)}
.map-heading{display:flex;justify-content:space-between;align-items:center;gap:14px;max-width:1080px;width:100%;margin:auto auto 0}.map-heading h1{font-size:clamp(24px,4vw,38px);margin:3px 0;line-height:1.1;color:#563655}.map-heading small{font-size:14px;font-weight:800;color:#81546c}.map-dress{display:flex;align-items:center;gap:8px;font-size:24px;white-space:nowrap;min-height:52px;padding:10px 14px}.map-dress span{font-size:16px}.adventure-worlds{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;width:100%;max-width:1080px;margin:0 auto;min-height:0}.world-card{padding:0;overflow:hidden;text-align:left;border:3px solid #74516b;border-radius:20px;background:#fff9e7;box-shadow:0 6px 0 #b69495;min-width:0;transition:transform .15s;touch-action:manipulation}.world-card:active{transform:translateY(4px);box-shadow:0 2px 0 #b69495}.world-art{height:clamp(85px,15vh,150px);position:relative;overflow:hidden;background:var(--card-color)}.world-art canvas{width:100%;height:100%;object-fit:cover}.world-badge{position:absolute;left:10px;top:9px;display:grid;place-items:center;min-width:32px;height:32px;background:#fff4ca;border:2px solid #765271;border-radius:10px;font-weight:900;font-size:17px}.world-caption{padding:10px 13px;display:grid;grid-template-columns:1fr auto;align-items:center;gap:4px}.world-caption strong{font-size:clamp(15px,2vw,19px);line-height:1.15;grid-column:1/-1;color:#573652}.world-stars{font-size:22px;color:#9c6712;letter-spacing:2px}.world-caption small{font-size:14px;font-weight:800;color:#725168}.map-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;max-width:1080px;width:100%;margin:0 auto auto;font-size:16px;font-weight:800;color:#60435d}.map-footer button{min-height:44px;padding:8px 14px;font-size:16px}
.adventure-hud{position:absolute;left:max(10px,env(safe-area-inset-left));right:max(10px,env(safe-area-inset-right));top:max(10px,env(safe-area-inset-top));border:3px solid #684164;border-radius:18px;background:#fff8e9f5;box-shadow:0 5px 0 #74557559;pointer-events:auto;padding:8px 12px;max-width:1120px;margin:auto}.hud-main{display:flex;align-items:center;gap:12px}.hud-world{flex:1;min-width:0;display:flex;flex-direction:column}.hud-world small{font-size:12px;font-weight:900;color:#8a607c}.hud-world strong{font-size:18px;line-height:1.15;color:#563453}.hud-progress{display:flex;gap:12px;align-items:center;font-size:17px;white-space:nowrap}.hud-progress>span{display:flex;gap:4px;align-items:center}.hud-progress canvas{height:27px;width:27px}.hud-outfits,.hud-pause{border:2px solid #76516c;border-radius:12px;background:#ffdd77;color:#553654;min-width:48px;min-height:46px;display:flex;align-items:center;justify-content:center;gap:5px;font-size:24px;padding:6px 10px;box-shadow:0 3px #c3984e}.hud-outfits span{font-size:15px;font-weight:900}.hud-pause{background:#f7d8e5;box-shadow:0 3px #c298ad}.hud-collection{border-top:1px solid #ddc5cb;margin-top:8px;padding-top:6px;display:flex;align-items:center;gap:12px}.collection-label{font-size:13px;line-height:1.1;color:#74536c;display:flex;flex-direction:column;gap:3px}.collection-label b{font-size:15px}.level-treasures{display:flex;gap:6px;flex:1;justify-content:space-between;min-width:0}.level-treasure{position:relative;width:44px;height:44px;border:2px solid #d7bdca;background:#f7e8ee;border-radius:10px;display:grid;place-items:center;padding:2px;flex-shrink:0}.level-treasure canvas{width:100%;height:100%;object-fit:contain;image-rendering:pixelated;opacity:.72}.level-treasure span{position:absolute;right:-3px;bottom:-4px;background:#e5d0de;border-radius:6px;font-size:12px;line-height:16px;min-width:16px;font-weight:900;color:#674961}.level-treasure.is-owned{background:#ecf8cf;border-color:#70934c}.level-treasure.is-owned canvas{opacity:1}.level-treasure.is-owned span{background:#507b39;color:white}.level-treasure.is-rare{border-color:#bc8c35;background:#fff0be}.reward-detail .reward-large{display:block;width:140px;height:140px;margin:auto;image-rendering:pixelated}.reward-detail button{margin:6px}.reward-veil{z-index:12}.recap-outfits{margin:8px auto 15px;display:block;min-height:50px}.recap-treasures .level-treasures{display:flex;justify-content:center;flex-wrap:wrap;gap:7px}.recap-treasures .level-treasure{width:42px;height:42px}.recap{max-width:570px}
.easy-wardrobe{width:min(740px,96vw);padding:18px;max-height:94dvh;overflow:auto;text-align:left;overscroll-behavior:contain}.easy-wardrobe>header{display:flex;align-items:center;justify-content:space-between;gap:10px;position:sticky;top:-18px;z-index:2;background:#fff6de;padding:8px 0 10px}.easy-wardrobe h2{font-size:clamp(23px,4vw,30px);margin:0}.easy-wardrobe header button{min-height:52px;padding:10px 22px;font-size:20px}.dressing-mirror{display:flex;align-items:center;justify-content:center;gap:15px;min-height:160px;border:2px solid #d5afbc;border-radius:20px;background:radial-gradient(ellipse at 40% 95%,#fffdf1 0 25%,#f5d9e2 65%);margin:0 0 14px;padding:0 16px}.dressing-mirror canvas{width:140px;height:175px;flex-shrink:0;image-rendering:pixelated}.dressing-mirror p{font-size:22px;font-weight:900;line-height:1.15;max-width:16ch;margin:0 0 10px}.look-saved{font-size:14px;font-weight:800;color:#487043}.easy-wardrobe .wardrobe-tabs{gap:8px;margin:0 0 12px}.easy-wardrobe .wardrobe-tabs button{border-radius:12px;min-height:56px;font-size:16px}.treasure-shelves{display:flex;border:2px solid #d5adbd;border-radius:13px;padding:4px;gap:5px;margin:0 0 12px;background:#edd4df}.treasure-shelves button{flex:1;border:0;border-radius:9px;min-height:44px;font-size:16px;font-weight:900;background:transparent;color:#67465e}.treasure-shelves button[aria-pressed=true]{background:#fff9e6;box-shadow:0 2px 4px #74516b22}.easy-wardrobe .outfit-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.easy-wardrobe .outfit{border-radius:16px;padding:10px 8px;min-height:168px;gap:6px;background:#fffdf4;border:2px solid #d3b5c4}.easy-wardrobe .outfit canvas{width:94px;height:94px}.easy-wardrobe .outfit span{font-size:16px;min-height:38px}.easy-wardrobe .outfit small{font-size:14px;min-height:18px}.easy-wardrobe .outfit[aria-pressed=true]{border-color:#679253;background:#edf7d9;outline:2px solid #679253;outline-offset:-4px}.collection-complete{text-align:center;font-size:20px;padding:20px}.easy-wardrobe button:focus-visible,.adventure-map button:focus-visible,.adventure-hud button:focus-visible{outline:4px solid #367bbe;outline-offset:3px}
@media(max-width:700px){.adventure-map{padding-left:14px;padding-right:14px;gap:12px}.map-heading small{font-size:12px}.map-heading h1{font-size:26px}.map-dress{padding:8px 10px;flex-direction:column;gap:0;font-size:24px}.map-dress span{font-size:14px}.adventure-worlds{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.world-art{height:clamp(82px,12vh,122px)}.world-caption{padding:8px;gap:1px;grid-template-columns:1fr}.world-caption strong{font-size:16px;min-height:36px}.world-stars{font-size:20px}.world-caption small{font-size:13px}.map-footer{font-size:14px;gap:6px}.map-footer button{font-size:14px;padding:8px}.adventure-hud{padding:7px 8px;left:7px;right:7px}.hud-main{gap:7px}.hud-world strong{font-size:14px}.hud-world small{font-size:12px}.hud-progress{gap:6px;font-size:14px;flex-direction:column;align-items:flex-start}.hud-progress #currency{display:none}.hud-outfits{min-width:48px;padding:5px;flex-direction:column;gap:0}.hud-outfits span{font-size:12px}.hud-pause{min-width:42px;padding:5px}.hud-collection{gap:6px;padding-top:7px}.collection-label{font-size:12px}.collection-label b{font-size:13px}.level-treasures{gap:4px;flex-wrap:wrap;justify-content:flex-start}.level-treasure{width:calc((100% - 20px)/6);height:36px;min-width:30px;flex:1 0 calc((100% - 20px)/6);max-width:44px}.easy-wardrobe{padding:12px}.easy-wardrobe>header{top:-12px}.easy-wardrobe h2{font-size:24px}.easy-wardrobe header button{padding:10px 17px}.dressing-mirror{gap:4px;padding:0 8px}.dressing-mirror p{font-size:19px}.dressing-mirror canvas{width:125px;height:156px}.easy-wardrobe .outfit-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.easy-wardrobe .wardrobe-tabs{gap:5px}.easy-wardrobe .wardrobe-tabs button{font-size:14px;padding:7px 3px}}
@media(max-height:540px) and (min-width:600px){.adventure-map{padding-top:8px;gap:8px}.map-heading h1{font-size:24px}.map-heading small{display:none}.map-dress{min-height:44px;flex-direction:row}.adventure-worlds{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.world-art{height:65px}.world-caption{padding:5px 9px;grid-template-columns:1fr auto}.world-caption strong{font-size:14px;min-height:0}.world-stars{font-size:17px}.world-caption small{font-size:12px}.map-footer{margin-top:0}.map-footer button{min-height:36px;padding:4px 10px}.adventure-hud{top:6px;padding:4px 9px;border-radius:12px}.hud-world strong{font-size:15px}.hud-world small{display:none}.hud-progress{flex-direction:row}.hud-outfits,.hud-pause{min-height:38px}.hud-outfits{flex-direction:row}.hud-collection{margin-top:5px;padding-top:4px}.level-treasures{flex-wrap:nowrap;gap:6px}.level-treasure{width:34px;min-width:30px;height:34px;max-width:38px;flex:1}.collection-label{flex-direction:row;align-items:center}.dressing-mirror{min-height:120px;max-height:130px;margin-bottom:8px}.dressing-mirror canvas{width:96px;height:120px}.easy-wardrobe .outfit-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.easy-wardrobe .outfit{min-height:148px}.easy-wardrobe .outfit canvas{height:75px;width:75px}.easy-wardrobe .wardrobe-tabs button{min-height:44px}}

/* V19: keep controls outside the scrolling collection. */
.easy-wardrobe{display:flex;flex-direction:column;height:min(850px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);overflow:hidden;min-height:0}
.easy-wardrobe>header{position:static;flex:0 0 auto;padding-top:0;top:auto}
.easy-wardrobe>.dressing-mirror,.easy-wardrobe>.wardrobe-tabs,.easy-wardrobe>.treasure-shelves{flex:0 0 auto}
.easy-wardrobe>.wardrobe-items{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;padding:3px 4px 9px;scrollbar-width:thin}
.easy-wardrobe .outfit canvas{image-rendering:auto;width:100px;height:100px}
.easy-wardrobe .dressing-mirror{min-height:130px;margin-bottom:10px}
.easy-wardrobe .dressing-mirror canvas{width:112px;height:140px}
@media(max-height:700px){.easy-wardrobe .dressing-mirror{min-height:85px}.easy-wardrobe .dressing-mirror canvas{width:72px;height:90px}.easy-wardrobe .dressing-mirror p{font-size:16px}.easy-wardrobe .wardrobe-tabs button{min-height:44px}.easy-wardrobe .treasure-shelves button{min-height:40px}.easy-wardrobe>.wardrobe-tabs,.easy-wardrobe>.treasure-shelves{margin-bottom:8px}}
@media(max-height:480px) and (min-width:600px){.easy-wardrobe{display:grid;grid-template-columns:165px 1fr;grid-template-rows:auto auto auto minmax(0,1fr);gap:6px 12px}.easy-wardrobe>header{grid-column:1/-1}.easy-wardrobe>.dressing-mirror{grid-column:1;grid-row:2/5;display:flex;flex-direction:column;max-height:none;margin:0;gap:4px;padding:8px}.easy-wardrobe>.dressing-mirror canvas{width:100px;height:125px}.easy-wardrobe>.dressing-mirror p{font-size:14px;margin:0}.easy-wardrobe>.wardrobe-tabs,.easy-wardrobe>.treasure-shelves,.easy-wardrobe>.wardrobe-items{grid-column:2;margin:0}.easy-wardrobe .outfit-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.easy-wardrobe .outfit{min-height:135px}.easy-wardrobe .outfit canvas{width:72px;height:72px}}
