@font-face{font-family:"Fredoka";src:url("../fonts/fredoka.woff2") format("woff2");font-weight:300 700;font-display:swap}
:root{
  --ink:#2a1e5c;--ink2:#5b5480;--purple:#6c3fe0;--purple2:#8a63ff;--lav:#efeaff;--lav2:#e4dcff;
  --blue:#1f5fe0;--orange:#ff8a1f;--yellow:#ffd84d;--green:#3cb22c;--green2:#2c9020;
  --bg:#f3f1ff;--card:#fff;--shadow:0 6px 18px rgba(70,50,160,.12);--r:22px;
  --emoji:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;
  --safe-top:env(safe-area-inset-top,0px);--safe-bot:env(safe-area-inset-bottom,0px);
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;background:#dfe6ff;color:var(--ink);font-family:"Fredoka","Baloo 2","Trebuchet MS",system-ui,sans-serif;
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;overscroll-behavior:none}
button{font:inherit;color:inherit;border:0;background:none;cursor:pointer;padding:0;touch-action:manipulation}
.emo{font-family:var(--emoji);line-height:1}
#app{position:relative;max-width:520px;margin:0 auto;height:100%;overflow:hidden;overflow:clip;background:var(--bg);box-shadow:0 0 40px rgba(60,40,150,.15)}
.screen{position:absolute;inset:0;display:flex;flex-direction:column;overflow:hidden;animation:fadeIn .25s ease}
.scroll{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:calc(24px + var(--safe-bot))}
@keyframes fadeIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* ---------- buttons ---------- */
.btn{display:flex;align-items:center;justify-content:center;gap:10px;border-radius:999px;font-weight:600;font-size:22px;padding:14px 24px;min-height:56px;transition:transform .08s}
.btn:active{transform:translateY(3px) scale(.98)}
.btn-green{background:linear-gradient(#57cf3f,#36a826);color:#fff;box-shadow:0 5px 0 #23801a,0 10px 20px rgba(40,140,30,.25);text-shadow:0 2px 0 rgba(0,0,0,.15)}
.btn-green:active{box-shadow:0 2px 0 #23801a}
.btn-outline{background:#fff;color:var(--purple);border:3px solid #a98cff;box-shadow:0 4px 0 #d6c9ff}
.btn[disabled]{filter:grayscale(1);opacity:.55;pointer-events:none}
.icon-btn{width:48px;height:48px;border-radius:50%;background:#fff;box-shadow:var(--shadow);display:grid;place-items:center;font-size:24px;flex:none}
.icon-btn svg{width:26px;height:26px}

/* ---------- splash ---------- */
.splash{background:linear-gradient(#5fc0ff 0%,#a6e0ff 45%,#c8f0ff 60%,#bfe9a0 72%,#86cf55 100%)}
.splash .scroll{display:flex;flex-direction:column;align-items:center;padding:calc(20px + var(--safe-top)) 22px calc(20px + var(--safe-bot))}
.cloud{position:absolute;background:#fff;border-radius:999px;opacity:.9}
.cloud:before,.cloud:after{content:"";position:absolute;background:#fff;border-radius:50%}
.cloud:before{width:55%;height:150%;left:15%;top:-60%}.cloud:after{width:40%;height:120%;right:12%;top:-40%}
.logo{position:relative;text-align:center;margin-top:18px;line-height:.9;font-weight:700;filter:drop-shadow(0 4px 0 rgba(255,255,255,.9)) drop-shadow(0 6px 10px rgba(0,60,140,.18))}
.logo .l1{font-size:68px;color:var(--blue);-webkit-text-stroke:2px #fff;paint-order:stroke}
.logo .l2{font-size:62px;color:var(--purple)}.logo .amp{color:var(--orange)}
.ribbon{position:relative;margin-top:12px;background:linear-gradient(#ffe57a,#ffd23f);border-radius:14px;padding:8px 18px 8px 56px;font-weight:600;font-size:19px;line-height:1.1;color:var(--ink);box-shadow:0 4px 0 #e3b52a}
.ribbon .shield{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:36px;height:40px}
.mascot{width:190px;height:190px;margin-top:6px;animation:bob 2.6s ease-in-out infinite}
@keyframes bob{50%{transform:translateY(-8px)}}
.tiles{display:flex;gap:8px;margin:-6px 0 18px}
.tile{width:58px;height:58px;border-radius:16px;background:#fff;display:grid;place-items:center;font-weight:700;font-size:22px;box-shadow:0 4px 0 rgba(0,0,0,.08);transform:rotate(var(--rot,0deg))}
.splash .btn{width:100%;max-width:330px}
.splash .btn+.btn{margin-top:14px}
.made-by{margin-top:12px;font-size:13px;color:#2d6a1c;opacity:.8}

/* ---------- header / steps ---------- */
.topbar{display:flex;align-items:center;gap:12px;padding:calc(12px + var(--safe-top)) 16px 8px}
.steps{flex:1;display:flex;flex-direction:column;align-items:center;gap:6px}
.pill{background:#fff;border-radius:999px;padding:4px 14px;font-weight:600;font-size:15px;box-shadow:var(--shadow)}
.stepbar{width:96px;height:10px;border-radius:9px;background:#fff;position:relative;box-shadow:inset 0 0 0 2px var(--lav2)}
.stepbar i{position:absolute;left:0;top:0;bottom:0;border-radius:9px;background:var(--purple)}
.h1{font-size:32px;font-weight:700;text-align:center;margin:8px 0 4px;color:var(--ink)}
.h1 .spark{color:var(--yellow)}
.sub{display:block;width:max-content;max-width:90%;margin:0 auto 14px;background:var(--lav);border-radius:999px;padding:6px 16px;font-size:15px;color:var(--ink2);text-align:center}
.agebg{background:linear-gradient(#e5ddff,#f3f1ff 30%)}

/* ---------- age grid ---------- */
.agegrid{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:4px 16px 16px}
.age{position:relative;height:84px;border-radius:18px;display:flex;align-items:center;justify-content:space-between;padding:0 12px 0 18px;box-shadow:0 4px 0 rgba(0,0,0,.06);border:3px solid transparent;transition:transform .1s}
.age:active{transform:scale(.97)}
.age b{font-size:40px;font-weight:700}
.age .kid{font-size:44px}
.age.sel{border-color:var(--blue);box-shadow:0 0 0 3px #bcd3ff,0 6px 14px rgba(31,95,224,.25)}
.age.sel:after{content:"⭐";font-family:var(--emoji);position:absolute;left:44px;bottom:6px;font-size:20px}
.age .soon{position:absolute;right:8px;top:6px;font-size:11px;font-weight:600;background:rgba(255,255,255,.8);border-radius:9px;padding:1px 7px;color:var(--ink2)}
.footer-btns{display:flex;gap:12px;padding:10px 16px calc(14px + var(--safe-bot));background:linear-gradient(transparent,#e8f7d8 40%)}
.footer-btns .btn{flex:1}.footer-btns .btn-outline{flex:.7}

.field{display:block;margin:10px 20px}
.field input{width:100%;font:inherit;font-size:24px;padding:14px 18px;border-radius:18px;border:3px solid var(--lav2);outline:none;color:var(--ink);background:#fff;-webkit-user-select:text;user-select:text}
.field input:focus{border-color:var(--purple2)}
.hint-text{text-align:center;color:var(--ink2);font-size:15px;margin:4px 24px}
.buddies{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin:14px 16px}
.buddy{width:64px;height:64px;border-radius:50%;background:#fff;font-size:38px;display:grid;place-items:center;box-shadow:var(--shadow);border:3px solid transparent}
.buddy.sel{border-color:var(--purple)}

/* ---------- home ---------- */
.homehead{display:flex;align-items:center;gap:10px;padding:calc(10px + var(--safe-top)) 14px 6px}
.homehead .mini{width:52px;height:52px}
.homehead .ttl{flex:1;font-size:26px;font-weight:700;color:var(--purple)}
.homehead .ttl small{display:block;font-size:14px;font-weight:500;color:var(--ink2);margin-top:-2px}
.chips{display:flex;gap:10px;padding:4px 14px 8px;align-items:center}
.chip{display:flex;align-items:center;gap:6px;border-radius:999px;padding:6px 14px;font-weight:600;background:#fff;box-shadow:var(--shadow);font-size:17px;white-space:nowrap}
.chip.age-chip{background:linear-gradient(#ffe0f2,#ffd0ea);color:var(--purple);font-size:20px}
.chip.stars{flex:1;font-size:14px}
.bar{flex:1;height:10px;border-radius:9px;background:#e8e4f7;overflow:hidden;min-width:40px}
.bar i{display:block;height:100%;border-radius:9px;background:linear-gradient(90deg,#46c23a,#6ad35b);transition:width .4s}
.subtabs{display:flex;gap:6px;padding:6px 10px 10px;overflow-x:auto;scrollbar-width:none}
.subtabs::-webkit-scrollbar{display:none}
.subtab{flex:1 0 48px;min-width:0;display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 4px 6px;border-radius:14px;background:var(--tab,#fff);font-size:12px;font-weight:600;border:2px solid transparent;color:var(--ink)}
.subtab .emo{font-size:24px}.subtab span:last-child{font-size:11px;white-space:nowrap}
.subtab.sel{border-color:var(--blue);box-shadow:0 0 0 2px #cfe0ff;background:#fff}
.banner{margin:0 12px 10px;border-radius:18px;display:flex;align-items:center;gap:12px;padding:12px 14px;background:linear-gradient(100deg,var(--c1),var(--c2));box-shadow:var(--shadow)}
.banner .bico{width:48px;height:48px;border-radius:12px;background:var(--c3);display:grid;place-items:center;font-size:28px;color:#fff}
.banner h2{flex:1;margin:0;font-size:26px;color:var(--ink)}
.banner .deco{font-size:34px}
.seg{display:flex;gap:8px;padding:0 12px 10px}
.seg button{flex:1;padding:9px 0;border-radius:999px;background:var(--lav);font-weight:600;color:var(--ink);font-size:16px}
.seg button.sel{background:var(--purple);color:#fff;box-shadow:0 3px 0 #4b28b3}
.unit{margin:0 12px 12px;background:#f4f1ff;border-radius:20px;padding:4px 4px 6px;box-shadow:0 2px 0 rgba(108,63,224,.08)}
.unit-h{display:flex;align-items:center;gap:8px;width:100%;padding:10px 10px 8px;text-align:left}
.unit-h .chev{transition:transform .2s;font-size:16px;color:var(--ink)}
.unit.closed .chev{transform:rotate(-90deg)}
.unit-h b{flex:1;font-size:17px;font-weight:600}
.unit-h .ustar{display:flex;align-items:center;gap:4px;font-size:14px;font-weight:600;width:110px}
.unit.closed .topic{display:none}
.topic{background:#fff;border-radius:16px;margin:6px 4px;padding:10px;box-shadow:0 2px 6px rgba(70,50,160,.06)}
.topic-h{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.tag{font-size:12px;font-weight:600;border-radius:8px;padding:2px 8px;background:#ffe3f3;color:#c0287a;flex:none}
.tag.g{background:#efe7ff;color:var(--purple)}
.topic-h .tname{flex:1;font-size:15px;font-weight:600;line-height:1.2}
.dots{display:flex;gap:4px;flex:none}.dots i{width:10px;height:10px;border-radius:50%;background:#dcd6ef}.dots i.on{background:#3cb22c}
.game{display:flex;align-items:center;gap:10px;background:#fffaf0;border-radius:14px;padding:8px}
.game .art{width:86px;height:74px;border-radius:12px;flex:none;display:grid;place-items:center;font-size:40px;background:linear-gradient(135deg,var(--a1,#c9f1ff),var(--a2,#ffe9b0));position:relative;overflow:hidden}
.game .info{flex:1;min-width:0}
.game .info h3{margin:2px 0 2px;font-size:17px;line-height:1.15}
.game .info p{margin:0;font-size:12px;color:var(--ink2);line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.game .side{display:flex;flex-direction:column;align-items:center;gap:6px;flex:none}
.play{background:linear-gradient(#57cf3f,#36a826);color:#fff;border-radius:999px;padding:8px 14px;font-weight:600;font-size:16px;box-shadow:0 3px 0 #23801a;display:flex;align-items:center;gap:6px}
.play:active{transform:translateY(2px);box-shadow:0 1px 0 #23801a}
.ring{--p:0;width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--green) calc(var(--p)*1%),#e5e0f5 0);font-size:12px;font-weight:700}
.ring span{width:34px;height:34px;border-radius:50%;background:#fff;display:grid;place-items:center}
.game.locked{background:#f6f5fa}.game.locked .art{filter:grayscale(.85);opacity:.6}
.soonpill{font-size:12px;font-weight:600;color:var(--ink2);background:#ecebf3;border-radius:999px;padding:6px 10px}
.empty{margin:30px 20px;text-align:center;color:var(--ink2);font-size:18px}
.empty .mascot{width:150px;height:150px;animation:none}
.ov{margin:0 12px;background:#fff;border-radius:18px;padding:14px 16px;box-shadow:var(--shadow);font-size:16px;line-height:1.45}
.ov h4{margin:8px 0 4px;font-size:17px}
.prow{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid #f0edf8}
.prow:last-child{border:0}.prow span{flex:1;font-size:15px}.prow em{font-style:normal;font-weight:700;width:44px;text-align:right}

/* ---------- game screen ---------- */
.gbar{display:flex;align-items:center;gap:10px;padding:calc(10px + var(--safe-top)) 12px 8px}
.gbar .gt{flex:1;min-width:0;text-align:center}
.gbar .gt b{display:block;font-size:18px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gdots{display:flex;justify-content:center;gap:6px;margin-top:4px}
.gdots i{width:12px;height:12px;border-radius:50%;background:#dcd6ef;transition:background .3s}
.gdots i.on{background:var(--yellow);box-shadow:0 0 0 2px #f2c200 inset}
.gdots i.cur{background:var(--purple2)}
.stage{flex:1;display:flex;flex-direction:column;align-items:center;padding:6px 14px calc(16px + var(--safe-bot));gap:12px;overflow-y:auto;position:relative}
.prompt{display:flex;align-items:center;gap:10px;background:#fff;border-radius:20px;padding:10px 14px;box-shadow:var(--shadow);width:100%;font-size:20px;font-weight:600;line-height:1.2}
.prompt .who{font-size:40px;flex:none}
.prompt .txt{flex:1}
.cards{display:grid;gap:12px;width:100%;grid-template-columns:repeat(var(--n,3),1fr)}
.card{position:relative;background:#fff;border-radius:20px;box-shadow:0 5px 0 #ddd5f5,0 8px 16px rgba(70,50,160,.1);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:12px 6px 10px;min-height:128px;gap:6px;transition:transform .12s,opacity .2s;border:3px solid transparent}
.card:active{transform:scale(.96)}
.card .big{font-size:56px}
.card .lbl{font-size:16px;font-weight:600;text-align:center;line-height:1.1}
.card.good{border-color:#3cb22c;background:#effbe9;animation:pop .4s}
.card.bad{animation:shake .45s}
.card.dim{opacity:.4}
.card.glow{animation:glow 1s ease-in-out infinite}
@keyframes pop{40%{transform:scale(1.1)}}
@keyframes shake{20%,60%{transform:translateX(-8px)}40%,80%{transform:translateX(8px)}}
@keyframes glow{50%{box-shadow:0 0 0 6px #ffd84d,0 8px 16px rgba(70,50,160,.1);transform:scale(1.04)}}
.scene{width:100%;background:linear-gradient(#e9f6ff,#fff);border-radius:22px;box-shadow:var(--shadow);display:flex;align-items:center;justify-content:center;gap:6px;padding:16px;font-size:64px;min-height:130px;flex-wrap:wrap}
.listen{width:150px;height:150px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#a58bff,#6c3fe0);color:#fff;display:grid;place-items:center;box-shadow:0 8px 0 #4b28b3,0 12px 24px rgba(76,40,179,.35);font-size:64px;flex:none}
.listen.playing{animation:pulse 1s ease-in-out infinite}
@keyframes pulse{50%{transform:scale(1.07);box-shadow:0 8px 0 #4b28b3,0 0 0 16px rgba(138,99,255,.25)}}
.listen small{display:block;font-size:16px;font-weight:600;margin-top:-30px}
.grp{display:flex;flex-wrap:wrap;justify-content:center;gap:2px;font-size:30px;max-width:120px}
.plate{width:104px;height:72px;border-radius:50%;background:radial-gradient(#fff 55%,#e9e4f7 56%,#fff 70%,#d9d2ef 71%);display:grid;place-items:center}
.num{font-size:54px;font-weight:700;color:var(--purple)}
.numdots{display:flex;gap:4px}.numdots i{width:10px;height:10px;border-radius:50%;background:var(--orange)}

/* order cards */
.slots{display:flex;gap:12px;width:100%;justify-content:center}
.slot{flex:1;max-width:150px;min-height:128px;border-radius:20px;border:3px dashed #b9a8f5;background:#f7f4ff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:#9b8ad6;font-weight:600}
.slot .n{font-size:30px}
.slot.filled{border-style:solid;border-color:#3cb22c;background:#effbe9;color:var(--ink)}
.slot .big{font-size:54px}
/* drag sort */
.pool{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;min-height:120px;width:100%}
.item{width:100px;min-height:108px;background:#fff;border-radius:18px;box-shadow:0 5px 0 #ddd5f5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;touch-action:none;border:3px solid transparent}
.item .big{font-size:48px}.item .lbl{font-size:14px;font-weight:600}
.item.picked{border-color:var(--purple2);transform:scale(1.06)}
.item.ghost{position:fixed;z-index:50;pointer-events:none;opacity:.95;transform:scale(1.1) rotate(-4deg);box-shadow:0 12px 24px rgba(0,0,0,.2)}
.item.gone{visibility:hidden}
.bins{display:grid;gap:10px;width:100%;grid-template-columns:repeat(var(--n,2),1fr);margin-top:auto}
.bin{min-height:150px;border-radius:22px;background:var(--bc,#e9f6ff);border:3px solid rgba(0,0,0,.05);display:flex;flex-direction:column;align-items:center;padding:8px 4px;gap:4px;transition:transform .15s}
.bin.over,.bin.ready{transform:scale(1.04);border-color:var(--purple2)}
.bin .bh{display:flex;flex-direction:column;align-items:center;font-weight:600;font-size:15px;text-align:center;line-height:1.1}
.bin .bh .emo{font-size:36px}
.bin .in{display:flex;flex-wrap:wrap;justify-content:center;gap:2px;font-size:26px}
/* number builder */
.receivers{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;width:100%}
.recv{width:96px;height:120px;border-radius:20px;background:#fff;box-shadow:0 5px 0 #ddd5f5;display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative}
.recv .big{font-size:52px}.recv .got{font-size:30px;height:34px}
.recv .cnt{position:absolute;top:-10px;right:-8px;background:var(--orange);color:#fff;border-radius:50%;width:32px;height:32px;display:grid;place-items:center;font-weight:700;font-size:18px;transform:scale(0);transition:transform .25s}
.recv.fed .cnt{transform:scale(1)}
.field-objs{position:relative;width:100%;height:230px;background:linear-gradient(#f0fbff,#e6f7df);border-radius:22px;box-shadow:var(--shadow)}
.obj{position:absolute;font-size:50px;width:70px;height:70px;display:grid;place-items:center;transform:translate(-50%,-50%);transition:transform .2s}
.obj b{position:absolute;right:-4px;top:-6px;background:var(--purple);color:#fff;border-radius:50%;width:28px;height:28px;font-size:16px;display:grid;place-items:center;font-family:"Fredoka",sans-serif}
.obj.counted{transform:translate(-50%,-50%) scale(.9)}
/* trace */
.canvas-wrap{width:100%;max-width:380px;aspect-ratio:1/1;background:#fff;border-radius:24px;box-shadow:var(--shadow);position:relative;touch-action:none;overflow:hidden}
.canvas-wrap svg{width:100%;height:100%;display:block;touch-action:none}
.palette{display:flex;gap:10px;justify-content:center}
.palette button{width:46px;height:46px;border-radius:50%;border:4px solid #fff;box-shadow:var(--shadow)}
.palette button.sel{box-shadow:0 0 0 4px var(--purple2)}
.row-btns{display:flex;gap:12px;width:100%;justify-content:center}
.row-btns .btn{font-size:18px;min-height:50px;padding:10px 20px}
/* code bot */
.grid{display:grid;gap:6px;width:min(100%,300px);aspect-ratio:1/1;grid-template-columns:repeat(var(--n),1fr);background:#d7f0c8;padding:8px;border-radius:20px;position:relative;box-shadow:var(--shadow)}
.cell{background:#f2fbe9;border-radius:12px;display:grid;place-items:center;font-size:38px}
.bot{position:absolute;font-size:44px;display:grid;place-items:center;transition:left .45s ease,top .45s ease;pointer-events:none}
.bot.bump{animation:shake .4s}
.program{display:flex;gap:8px;justify-content:center;align-items:center}
.pslot{width:62px;height:62px;border-radius:16px;border:3px dashed #b9a8f5;background:#f7f4ff;display:grid;place-items:center;font-size:36px}
.pslot.f{border-style:solid;border-color:var(--purple2);background:#fff}
.pslot.run{background:#fff7c2}
.arrows{display:flex;gap:10px;justify-content:center}
.arrow{width:70px;height:70px;border-radius:18px;background:linear-gradient(#ffb44d,#ff8a1f);box-shadow:0 5px 0 #d06a0a;color:#fff;font-size:40px;display:grid;place-items:center;font-weight:700}
.arrow:active{transform:translateY(3px);box-shadow:0 2px 0 #d06a0a}
/* story */
.book{width:100%;background:#fffdf5;border-radius:22px;box-shadow:0 6px 0 #eadfc2,var(--shadow);padding:16px;display:flex;flex-direction:column;align-items:center;gap:10px}
.book .pic{font-size:70px;background:linear-gradient(#bfe8ff,#fff3c9);width:100%;border-radius:16px;text-align:center;padding:16px 0}
.book p{margin:0;font-size:20px;line-height:1.35;text-align:center}
/* desk */
.desk{width:100%;border-radius:22px;padding:14px 10px 18px;background:linear-gradient(#fdf1e2 0%,#fdf1e2 55%,#d9a46b 55%,#c58b50 100%);box-shadow:var(--shadow)}
.desk .cards .card{box-shadow:0 6px 0 #a66f37,0 10px 14px rgba(80,40,10,.2)}
/* pads */
.pads{display:flex;gap:16px;justify-content:center;width:100%}
.pad{width:140px;height:140px;border-radius:28px;background:#fff;box-shadow:0 6px 0 #ddd5f5,var(--shadow);display:grid;place-items:center;font-size:70px}
.pad:active,.pad.hit{transform:scale(.92);background:#fff7c2}
/* feedback */
.burst{position:absolute;pointer-events:none;z-index:41;font-size:26px;animation:burst .9s ease-out forwards}
@keyframes burst{to{transform:translate(var(--dx),var(--dy)) rotate(200deg);opacity:0}}
.done-screen{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;text-align:center;padding:20px}
.done-screen h2{font-size:36px;margin:0;color:var(--purple)}
.done-screen .stars3{font-size:52px;letter-spacing:6px}
.done-screen .btn{width:100%;max-width:300px}
/* parent */
.parent{background:#f7f6fb}
.panel{margin:10px 14px;background:#fff;border-radius:18px;padding:14px 16px;box-shadow:var(--shadow)}
.panel h3{margin:0 0 8px;font-size:18px}
.setrow{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0;font-size:17px}
.switch{width:58px;height:34px;border-radius:999px;background:#d8d3e8;position:relative;transition:background .2s;flex:none}
.switch:after{content:"";position:absolute;left:4px;top:4px;width:26px;height:26px;border-radius:50%;background:#fff;transition:left .2s;box-shadow:0 1px 3px rgba(0,0,0,.2)}
.switch.on{background:var(--green)}.switch.on:after{left:28px}
.gate{display:flex;flex-direction:column;align-items:center;gap:14px;padding:20px}
.gate .q{font-size:26px;font-weight:600;text-align:center}
.gate .opts{display:flex;gap:12px}
.gate .opts button{width:80px;height:80px;border-radius:20px;background:#fff;box-shadow:0 5px 0 #ddd5f5;font-size:32px;font-weight:700}
.small{font-size:13px;color:var(--ink2)}
.danger{color:#c0392b;font-weight:600}
@media (min-width:430px){.card .big{font-size:64px}}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* ================= v2: header with avatar, menu, coins, profiles, buddy (borrowed from app1) ================= */
#view{position:absolute;inset:0}
.khead{display:flex;align-items:center;gap:10px;padding:calc(10px + var(--safe-top)) 14px 8px}
.mini-av{width:50px;height:50px;border-radius:50%;background:#efe9ff;border:3px solid #fff;box-shadow:0 0 0 2px var(--purple2),0 4px 10px rgba(108,63,224,.25);overflow:hidden;display:grid;place-items:center;flex:none;transition:transform .15s}
.mini-av:active{transform:scale(.92)}
.mini-av svg{width:118%;height:118%;margin-top:26%}
.vsep{width:2px;height:30px;background:#ddd6f3;border-radius:2px;flex:none}
.chip.age-chip{font-size:19px}
.coin-chip{background:#fff4d4;box-shadow:inset 0 -3px 0 #f0dea3,0 2px 6px rgba(160,120,40,.12);font-size:19px;font-weight:700;padding:6px 14px 6px 8px}
.coin-chip .coin{width:26px;height:26px}
.coin-chip.bump{animation:bump .5s}
@keyframes bump{30%{transform:scale(1.25)}60%{transform:scale(.95)}}
.greet{font-size:24px;font-weight:700;color:var(--purple);padding:2px 16px 6px}
.progress-card{margin:0 12px 12px;background:#fff;border-radius:20px;padding:12px 14px;box-shadow:var(--shadow)}
.pc-top{display:flex;align-items:center;gap:14px}
.ring.big{width:70px;height:70px;font-size:17px}.ring.big span{width:54px;height:54px}
.pc-txt{display:flex;flex-direction:column;gap:2px}
.pc-txt b{font-size:19px}.pc-txt small{font-size:14px;color:var(--ink2)}
.pc-subj{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;margin-top:10px}
.pc-s{display:flex;flex-direction:column;align-items:center;gap:3px;padding:4px 0;border-radius:12px}
.pc-s .emo{font-size:20px}.pc-s .bar{width:100%;height:7px}.pc-s small{font-size:11px;font-weight:600;color:var(--ink2)}
.prompt .who-buddy{width:54px;height:54px;flex:none;overflow:visible}
.prompt .who-buddy svg{width:100%;height:100%}
.done-buddy{width:150px;height:180px;animation:breathe 3.6s ease-in-out infinite}
.done-buddy svg,.empty-buddy svg{width:100%;height:100%}
.empty-buddy{width:140px;height:170px;margin:0 auto}
.earned{font-size:26px;font-weight:700;color:#b98300;background:#fff7d6;border-radius:999px;padding:6px 18px}
.unlock{font-size:16px;font-weight:600;color:var(--purple);margin:0}
@keyframes breathe{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-3px) scale(1.015,1.025)}}
.scroll.padx{padding-left:16px;padding-right:16px}
.scroll.center{display:flex;flex-direction:column;align-items:center}
.h2{font-size:24px;font-weight:700;text-align:center;margin:6px 0 2px}
/* buddy animations (app1) */
.blink{animation:blink 4.5s infinite;transform-origin:center;transform-box:fill-box}
@keyframes blink{0%,94%,100%{transform:scaleY(1)}96%{transform:scaleY(.08)}}
.wingL{animation:flapL 2.8s ease-in-out infinite}.wingR{animation:flapR 2.8s ease-in-out infinite}
@keyframes flapL{0%,55%,100%{transform:rotate(0)}65%{transform:rotate(9deg)}75%{transform:rotate(-2deg)}85%{transform:rotate(7deg)}}
@keyframes flapR{0%,55%,100%{transform:rotate(0)}65%{transform:rotate(-9deg)}75%{transform:rotate(2deg)}85%{transform:rotate(-7deg)}}
.cat-wink{animation:catWink 5s infinite;transform-box:fill-box;transform-origin:center}
@keyframes catWink{0%,8%,23%,100%{transform:scaleY(1);opacity:1}10.5%,20.5%{transform:scaleY(.25);opacity:0}}
.cat-arc{opacity:0;animation:catArc 5s infinite}
@keyframes catArc{0%,9.5%,21.5%,100%{opacity:0}10.5%,20.5%{opacity:1}}
.cat-blush{animation:catBlush 5s infinite}
@keyframes catBlush{0%,8%,23%,100%{opacity:.5}11%,20%{opacity:.85}}
.cat-tail{animation:catTail 5s infinite ease-in-out}
@keyframes catTail{0%,26%,50%,100%{transform:rotate(0)}32%{transform:rotate(-16deg)}39%{transform:rotate(10deg)}45%{transform:rotate(-5deg)}}
.cust-preview svg,.acc-av svg,.bcard svg,.who-av svg,.done-buddy svg{filter:drop-shadow(0 6px 5px rgba(40,20,90,.16))}
/* drawer menu (from the right, under the avatar) */
.scrim{position:absolute;inset:0;background:rgba(30,20,70,.35);opacity:0;pointer-events:none;transition:opacity .25s;z-index:20}
.drawer{position:absolute;top:0;right:0;bottom:0;width:78%;max-width:320px;background:#fff;z-index:21;transform:translateX(105%);transition:transform .3s cubic-bezier(.2,.8,.2,1);
  display:flex;flex-direction:column;padding:calc(16px + var(--safe-top)) 12px calc(14px + var(--safe-bot));border-radius:26px 0 0 26px;box-shadow:-8px 0 30px rgba(40,20,100,.18)}
.menu-open .scrim{opacity:1;pointer-events:auto}
.menu-open .drawer{transform:none}
.drawer h3,.drawer h2.dr-head{margin:0 0 14px 4px;font-size:20px;display:flex;align-items:center;justify-content:space-between}
.dr-who{display:flex;align-items:center;gap:10px;min-width:0}
.dr-av{width:56px;height:56px;border-radius:50%;background:#efe9ff;overflow:hidden;display:grid;place-items:center;flex:none;border:3px solid #fff;box-shadow:0 0 0 2px var(--purple2)}
.dr-av svg{width:118%;height:118%;margin-top:26%}
.dr-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dr-close{width:38px;height:38px;border-radius:12px;background:#f3f1fa;font-size:18px;flex:none}
.kid-items{display:flex;flex-direction:column;gap:6px}
.mi{display:flex;align-items:center;gap:12px;padding:10px;border-radius:16px;font-size:18px;font-weight:600;text-align:left;width:100%}
.mi:active{background:#f4f1ff}
.mi .e{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;font-size:24px;font-family:var(--emoji)}
.drawer .foot{margin-top:auto;font-size:12px;color:var(--ink2);padding:6px 10px}
/* modal + toast (app1) */
.modal{position:absolute;inset:0;z-index:40;background:rgba(30,20,70,.45);display:grid;place-items:center;opacity:0;pointer-events:none;transition:opacity .2s;padding:20px}
.modal.show{opacity:1;pointer-events:auto}
.mbox{background:#fff;border-radius:28px;padding:20px 18px 18px;width:100%;max-width:340px;text-align:center;box-shadow:0 20px 50px rgba(0,0,0,.25);transform:scale(.92);transition:transform .2s}
.modal.show .mbox{transform:none}
.mbox h3{margin:4px 0 6px;font-size:24px}
.mbox p{margin:0 0 14px;color:var(--ink2);font-size:16px}
.m-ic{font-size:44px}
.mrow{display:flex;gap:10px;justify-content:center}
.btn.sm{font-size:17px;min-height:46px;padding:8px 18px}
.btn .coin{width:22px;height:22px}
.m-in{width:100%;margin:0 0 14px}
.toast{position:absolute;left:50%;bottom:calc(28px + var(--safe-bot));transform:translate(-50%,20px);background:var(--ink);color:#fff;padding:10px 18px;border-radius:999px;font-size:15px;opacity:0;transition:.25s;z-index:60;pointer-events:none;white-space:nowrap;max-width:92%;overflow:hidden;text-overflow:ellipsis}
.toast.show{opacity:1;transform:translate(-50%,0)}
/* coins (app1) */
.coin-fly{position:fixed;left:0;top:0;width:32px;height:32px;z-index:9999;pointer-events:none}
.coin-fly svg{width:100%;height:100%;filter:drop-shadow(0 3px 4px rgba(150,100,0,.35))}
.coin-delta{position:fixed;left:50%;top:40%;z-index:9999;pointer-events:none;display:flex;align-items:center;gap:6px;font-weight:700;font-size:34px;padding:6px 18px;border-radius:999px;background:#fff7d6;box-shadow:0 8px 24px rgba(150,100,0,.25)}
.coin-delta svg{width:30px;height:30px}
.coin-delta.up{color:#13804a}.coin-delta.down{color:#c0392b}
.coin-big{display:flex;align-items:center;justify-content:center;gap:8px;font-size:40px;font-weight:700;color:#8a6400;margin:4px 0 2px}
.coin-big svg{width:40px;height:40px}
.coin-note{color:var(--ink2);font-size:14px;margin:4px 0 12px}
.coin-gift{background:#fff7d6;border-radius:16px;padding:10px 12px;margin:8px 0;display:flex;align-items:center;gap:10px;text-align:left}
.coin-gift b{color:#8a6400}.coin-gift p{margin:2px 0 0;font-size:14px}
.coin-gift .btn{margin-left:auto;flex:none}
.coin-shop{border:2px dashed #e6d7a8;border-radius:16px;padding:10px 12px;margin:10px 0 12px;color:#6e5d4c;font-size:14px}
.coin-shop b{display:block;color:var(--ink);font-size:16px}
/* change profile */
.who-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;width:100%;margin-top:6px}
.who-card{background:#fff;border:3px solid transparent;border-radius:24px;padding:10px 6px 12px;display:flex;flex-direction:column;align-items:center;gap:2px;box-shadow:0 5px 0 #e3ddf5}
.who-card.cur{border-color:var(--purple2);background:#f4f0ff}
.who-card:active{transform:translateY(3px);box-shadow:0 2px 0 #e3ddf5}
.who-av{width:90px;height:100px}.who-av svg{width:100%;height:100%}
.who-av.plus{display:grid;place-items:center;font-size:44px;color:var(--purple);background:#fff;border-radius:50%;width:84px;height:84px;margin:8px 0;border:3px dashed #cfc3f5}
.who-card b{font-size:18px}.who-card small{font-size:13px;color:var(--ink2)}
/* edit profile */
.acc-av{width:130px;height:130px;border-radius:50%;background:radial-gradient(circle at 50% 60%,#ece4ff,#faf8ff);border:5px solid #fff;box-shadow:0 0 0 3px var(--purple2),0 10px 24px rgba(108,63,224,.2);overflow:hidden;display:grid;place-items:center;margin-top:8px}
.acc-av svg{width:112%;margin-top:22%}
.name-lbl{font-weight:600;margin-top:12px}.name-lbl small{color:var(--ink2);font-weight:400}
.name-in{font:inherit;font-size:24px;font-weight:600;text-align:center;border:0;border-bottom:2.5px dashed #cfc3f5;outline:none;width:70%;padding:4px;color:var(--ink);background:transparent;-webkit-user-select:text;user-select:text}
.acct{color:var(--ink2);margin:10px 0 0}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;width:100%;margin:12px 0}
.stat{background:#fff;border-radius:18px;padding:10px 4px;text-align:center;box-shadow:var(--shadow)}
.stat b{display:block;font-size:24px;color:var(--purple)}.stat span{font-size:12px;color:var(--ink2)}
.list{width:100%;display:flex;flex-direction:column;gap:8px;margin:6px 0 12px}
.li{display:flex;align-items:center;gap:12px;padding:10px 14px;border-radius:18px;background:#fff;border:2px solid #eeeaf8;font-weight:500;font-size:16px;text-align:left;width:100%}
.li small{display:block;color:var(--ink2);font-size:12px}
.li .e{font-size:22px;flex:none}
.li .chev{margin-left:auto;font-size:22px;color:#b3abd1}
.li.tg{cursor:pointer;line-height:1.2}
.li.tg input{display:none}
.li.tg i{margin-left:auto;width:46px;height:28px;border-radius:999px;background:#d8d3e8;position:relative;flex:none;transition:background .2s}
.li.tg i::after{content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 2px 4px rgba(0,0,0,.2);transition:left .2s}
.li.tg input:checked+i{background:var(--green)}
.li.tg input:checked+i::after{left:21px}
/* customize buddy */
.cust-preview{width:170px;height:200px;animation:breathe 3.6s ease-in-out infinite}
.cust-preview svg{width:100%;height:100%}
.bname{font:inherit;font-size:20px;font-weight:600;text-align:center;border:0;border-bottom:2.5px dashed #cfc3f5;outline:none;width:60%;padding:2px;margin-bottom:10px;background:transparent;color:var(--ink);-webkit-user-select:text;user-select:text}
.seg2{display:flex;background:#ece8f7;border-radius:999px;padding:4px;margin-bottom:10px}
.seg2 button{padding:8px 22px;border-radius:999px;font-weight:600;font-size:16px;color:var(--ink2)}
.seg2 button.on{background:#fff;color:var(--purple);box-shadow:0 3px 8px rgba(0,0,0,.08)}
.tabpanel{width:100%;min-height:170px;display:grid;align-content:center}
.buddy-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;width:100%}
.bcard{background:#fff;border-radius:18px;padding:6px 4px 8px;display:flex;flex-direction:column;align-items:center;font-weight:600;font-size:13px;border:3px solid transparent;box-shadow:0 3px 0 #e3ddf5}
.bcard svg{height:56px;width:auto}
.bcard.sel{border-color:var(--purple2);background:#f4f0ff}
.swatches{display:flex;flex-wrap:wrap;gap:12px;justify-content:center}
.sw{width:44px;height:44px;border-radius:50%;box-shadow:inset 0 -5px 0 rgba(0,0,0,.15),inset 0 4px 4px rgba(255,255,255,.45),0 3px 6px rgba(0,0,0,.1);border:3px solid #fff;outline:3px solid transparent;color:#fff;font-weight:700}
.sw.on{outline-color:var(--purple2);transform:scale(1.1)}
.sw.orig{display:grid;place-items:center;font-size:18px}
.sw.locked{filter:grayscale(.6) brightness(.95);opacity:.75}
.sw .lk{display:flex;flex-direction:column;align-items:center;font-size:12px;line-height:1}
.sw .lk em{font-style:normal;font-size:8px;font-weight:700;color:#fff;text-shadow:0 1px 2px rgba(0,0,0,.4)}
.extras{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.xchip{padding:8px 0;border-radius:16px;background:#fff;border:2.5px solid #e9e4f7;box-shadow:0 4px 0 #e9e4f7;font-size:24px}
.xchip small{display:block;font-size:12px;color:var(--ink2);font-weight:500}
.xchip.on{border-color:var(--purple2);background:#f4f0ff}
.xchip.locked{opacity:.6;filter:grayscale(.7)}
/* privacy */
.policy{background:#fff;border-radius:22px;padding:16px 18px;box-shadow:var(--shadow);font-size:14px;line-height:1.5;color:#3a3560;-webkit-user-select:text;user-select:text}
.policy h1{font-size:20px;margin:0 0 4px;color:var(--purple)}
.policy h2{font-size:17px;margin:18px 0 6px;color:var(--purple)}
.policy h3{font-size:15px;margin:12px 0 4px}
.policy p{margin:0 0 8px}.policy ul,.policy ol{margin:0 0 8px;padding-left:20px}.policy li{margin-bottom:4px}
.policy .pp-date{color:var(--ink2);font-size:12.5px}
.policy .pp-sum{background:#f4f0ff;border-radius:14px;padding:10px 12px}
.policy .pp-note{color:var(--ink2);font-size:12px;margin-top:12px}

/* ================= v3: HTIMA Kids landing page, avatar at the top right, Parent Zone report ================= */
.khead{gap:8px}
/* logo: "HTIMA" with small colourful KIDS tiles (half the size of the original artwork) */
.hlogo{display:inline-flex;align-items:center;gap:5px;background:#121d45;border-radius:14px;padding:7px 12px 6px;box-shadow:0 4px 10px rgba(18,29,69,.25);line-height:1}
.hlogo .hw{font-weight:700;font-size:24px;letter-spacing:1.5px;color:#fff3dc}
.hlogo .kids{display:inline-flex;gap:2px;align-self:flex-end;margin-bottom:1px}
.hlogo .kids i{position:relative;font-style:normal;display:grid;place-items:center;width:13px;height:14px;border-radius:3px;background:var(--c);transform:rotate(var(--r));
  color:#fff;font-weight:700;font-size:9.5px;box-shadow:0 1px 0 rgba(0,0,0,.18)}
.hlogo .kids i.st::after{content:"★";position:absolute;top:-9px;left:50%;transform:translateX(-50%);font-size:8px;color:#ffd84d}
.front{background:radial-gradient(120% 60% at 50% 45%,#ffffff 0%,#f3f1ff 60%,#e9e3ff 100%)}
.fhead{display:flex;align-items:center;gap:10px;padding:calc(10px + var(--safe-top)) 14px 4px}
.fbody{display:flex;flex-direction:column;align-items:center;padding:0 16px calc(18px + var(--safe-bot))}
.agebadge{align-self:flex-end;display:flex;flex-direction:column;align-items:center;gap:2px;margin-top:6px;flex:none}
.agebadge b{display:flex;align-items:center;gap:6px;font-size:19px;font-weight:600;color:var(--purple);padding:6px 16px;border-radius:999px;background:linear-gradient(#ffe0f2,#ffd0ea);box-shadow:0 3px 0 #f1b4d6}
.agebadge small{font-size:12px;color:var(--ink2)}
.agebadge:active b{transform:translateY(2px);box-shadow:0 1px 0 #f1b4d6}
.agebadge.empty{visibility:hidden}
.hi-wrap{display:flex;flex-direction:column;align-items:center;flex:none;margin-top:1vh}
.hi{margin:0;font-size:clamp(30px,5vh,42px);font-weight:700;color:var(--purple);text-align:center;line-height:1.05;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.hi-sub{margin:4px 0 0;font-size:clamp(16px,2.4vh,19px);color:var(--ink2)}
.fstage{position:relative;flex:none;width:80%;max-width:280px;height:34vh;max-height:330px;min-height:180px;margin:1.5vh auto 0;cursor:pointer}
.fbuddy{position:absolute;top:2%;bottom:6%;left:0;right:0;transform-origin:50% 100%}
.fbuddy svg{width:100%;height:100%;display:block;filter:drop-shadow(0 6px 5px rgba(40,20,90,.16))}
.fshadow{position:absolute;left:35%;bottom:5%;width:30%;height:6%;border-radius:50%;background:radial-gradient(rgba(70,50,160,.25),rgba(70,50,160,0) 70%)}
.fstage.tapped .fbuddy{animation:happy .9s cubic-bezier(.3,.7,.4,1)}
.fstage.tapped .wingL,.fstage.tapped .wingR{animation-duration:.45s}
@keyframes happy{0%{transform:none}15%{transform:scale(1.08,.9)}35%{transform:translateY(-16%) rotate(-6deg) scale(.96,1.06)}55%{transform:translateY(-16%) rotate(6deg)}75%{transform:translateY(0) scale(1.07,.93)}88%{transform:scale(.98,1.03)}100%{transform:none}}
.pop{position:absolute;font-size:22px;pointer-events:none;animation:popup 1.1s ease-out forwards;z-index:3}
@keyframes popup{0%{opacity:0;transform:translate(0,0) scale(.4)}20%{opacity:1;transform:translate(var(--dx),-20px) scale(1.1)}100%{opacity:0;transform:translate(calc(var(--dx)*2),-90px) scale(.9)}}
.cust-btn{position:absolute;right:-14%;bottom:10%;width:56px;height:56px;border-radius:50%;background:#fff;display:grid;place-items:center;z-index:2;box-shadow:0 4px 14px rgba(70,50,160,.2)}
.cust-btn:active{transform:translateY(3px)}
.cust-btn svg{width:30px;height:30px}
.buddy-cap{margin:4px 0 12px;font-size:clamp(12px,1.8vh,14px);color:var(--ink2);flex:none}
.buddy-cap b{color:var(--ink)}
.front .btn.start{width:min(92%,360px);font-size:clamp(22px,3.4vh,27px);letter-spacing:1px;flex:none}
.front .btn.start svg{width:24px;height:24px;fill:#fff}
.front .parent-btn{width:min(80%,300px);margin-top:14px;font-size:18px;min-height:48px;padding:8px 18px;flex:none}
/* Parent Zone report */
.rp-kids{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;margin:6px 0 4px}
.rp-kids .chip{font-size:15px;border:2px solid transparent}
.rp-kids .chip.on{border-color:var(--purple2);color:var(--purple)}
.rp-who{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.rp-av{width:54px;height:62px;flex:none}.rp-av svg{width:100%;height:100%}
.rp-who b{display:block;font-size:19px}.rp-who small{color:var(--ink2);font-size:14px}
.report .stats{margin:12px 0 8px}
.report .stat span{display:block;line-height:1.15}
.rp-subj{border-top:1px solid #f0edf8;padding:2px 0}
.rp-subj summary{display:flex;align-items:center;gap:8px;padding:10px 2px;cursor:pointer;list-style:none}
.rp-subj summary::-webkit-details-marker{display:none}
.rp-subj summary .emo{font-size:20px}.rp-subj summary b{width:84px;font-size:15px}
.rp-subj summary em{font-style:normal;font-weight:700;width:42px;text-align:right;font-size:14px}
.rp-subj summary::after{content:"›";font-size:20px;color:#b3abd1;transition:transform .2s}
.rp-subj[open] summary::after{transform:rotate(90deg)}
.rp-subj .prow{padding-left:30px}
.st0{color:#8f89aa}.st1{color:#c27a00;font-weight:600}.st2{color:#23801a;font-weight:600}
.rp-tip{background:#fff7d6;border-radius:14px;padding:8px 12px;font-size:14px;margin:10px 0 6px}
.game{position:relative}
.ustamp{position:absolute;top:-7px;left:-5px;z-index:2;transform:rotate(-8deg);font-size:10px;font-weight:700;letter-spacing:.6px;text-transform:uppercase;
  color:#1f8a3a;background:#f1fff0;border:2px solid #2fa84f;border-radius:7px;padding:1px 6px;box-shadow:0 2px 4px rgba(30,120,60,.18)}
/* unit header: game icon with how many games are inside */
.unit-h .uico{flex:none;width:46px;height:40px;border-radius:11px;display:grid;place-items:center;font-size:24px;background:linear-gradient(135deg,var(--a1,#c9f1ff),var(--a2,#ffe9b0));box-shadow:0 2px 0 rgba(0,0,0,.06)}
.unit-h .uico.none{filter:grayscale(.85);opacity:.6}
.unit-h .utxt{flex:1;min-width:0;display:flex;flex-direction:column}
.unit-h .utxt b{font-size:17px;font-weight:600;line-height:1.15}
.unit-h .utxt small{font-size:12.5px;color:var(--ink2);margin-top:2px}
.unit-h .ustar{width:96px}
/* v6: smaller coin number, stamp in the topic header, times played, lighter Play for games already played, help */
.coin-chip .coin-val{font-size:.7em}
.topic-h .ustamp{position:static;flex:none;transform:rotate(-6deg);margin-right:2px}
.game .info p.times{font-size:13px;font-weight:600;color:var(--purple);-webkit-line-clamp:1}
.play.played{background:linear-gradient(#a3df95,#84cf74);box-shadow:0 3px 0 #62a854}
.play.played:active{box-shadow:0 1px 0 #62a854}
.acct-box{background:#f4f0ff;border-radius:16px;padding:10px 12px;margin:10px 0 4px;font-size:15px;color:var(--ink2);text-align:center}
.acct-box b{color:var(--ink);letter-spacing:1px;font-size:18px}
.acct-box small{display:block;font-size:12.5px;margin-top:4px;color:var(--ink2)}
.acct-box.big{margin:6px 0 10px}
.mi{position:relative}
.mi-dot{position:absolute;left:46px;top:8px;width:12px;height:12px;border-radius:50%;background:#ff4d6d;border:2px solid #fff}
.m-err{color:#c0392b;font-weight:600;font-size:14px;margin:-6px 0 10px}
.help-ta{width:100%;min-height:110px;font:inherit;font-size:16px;padding:10px;border-radius:14px;border:2.5px solid #e3dcf7;outline:none;resize:vertical;-webkit-user-select:text;user-select:text}
.hcard{margin:8px 0}
.hc-top{display:flex;align-items:center;gap:8px;justify-content:space-between}
.hc-top b{font-size:15px}
.hst{font-size:12px;font-weight:600;border-radius:999px;padding:2px 9px;background:#fff4d4;color:#8a6400;flex:none}
.hst.ok{background:#e6f7e2;color:#23801a}
.hmsg{margin:6px 0 0;font-size:14px;white-space:pre-wrap;color:var(--ink)}
.hreply{margin-top:8px;background:#efeaff;border-radius:12px;padding:8px 10px}
.hreply b{font-size:13px;color:var(--purple)}.hreply p{margin:2px 0 0;font-size:14px;white-space:pre-wrap}
.gate .q small{font-size:15px;font-weight:500;color:var(--ink2)}
.gate .q b{display:inline-block;margin-top:8px;color:var(--purple)}
.gate-in{font:inherit;font-size:30px;font-weight:600;text-align:center;width:140px;padding:8px;border-radius:16px;border:3px solid #d6c9ff;outline:none;background:#fff;color:var(--ink);-webkit-user-select:text;user-select:text}
.gate-in:focus{border-color:var(--purple2)}
/* Age 10: text cards and the place-value builder */
.xtxt{font-size:22px;font-weight:700;color:var(--ink);text-align:center;line-height:1.2;padding:6px 4px;font-variant-numeric:tabular-nums}
.cards.list .card{min-height:0;padding:12px 14px}
.cards.list .xtxt{font-size:16px;font-weight:600;text-align:left}
.pv-target{align-self:center;margin:4px auto 10px;padding:8px 18px;border-radius:16px;background:#fff;box-shadow:0 3px 0 #e3ddf5;font-size:24px;font-weight:700;color:var(--purple);text-align:center;max-width:94%}
.pv-grid{display:grid;grid-template-columns:repeat(var(--n),1fr);gap:5px;width:100%;max-width:460px;margin:0 auto}
.pv-col{display:flex;flex-direction:column;align-items:center;gap:4px;background:#fff;border-radius:14px;padding:6px 2px;border:2.5px solid transparent;box-shadow:0 2px 0 #e7e2f6}
.pv-col.off{border-color:#ff8a8a;animation:shake .35s}
.pv-h{font-size:13px;font-weight:700;color:#fff;border-radius:8px;padding:2px 6px;min-width:30px;text-align:center}
.pv-btn{width:100%;max-width:44px;height:34px;border-radius:10px;background:#f1edff;color:var(--purple);font-size:15px;font-weight:700}
.pv-btn:active{transform:translateY(2px);background:#e3dbff}
.pv-discs{display:grid;grid-template-columns:repeat(3,10px);gap:3px;min-height:36px;align-content:center;justify-content:center}
.pv-discs i{width:10px;height:10px;border-radius:50%}
.pv-digit{font-size:26px;font-weight:700;line-height:1;color:var(--ink)}
.pv-ghost{font-size:13px;font-weight:600;color:transparent;height:14px}
.pv-grid.guide .pv-ghost{color:#b5a8e6}
.pv-col.c0 .pv-h,.pv-col.c0 .pv-discs i{background:#2fa84f}.pv-col.c1 .pv-h,.pv-col.c1 .pv-discs i{background:#3e82f2}
.pv-col.c2 .pv-h,.pv-col.c2 .pv-discs i{background:#e9661a}.pv-col.c3 .pv-h,.pv-col.c3 .pv-discs i{background:#7a4ae0}
.pv-col.c4 .pv-h,.pv-col.c4 .pv-discs i{background:#d13a6a}.pv-col.c5 .pv-h,.pv-col.c5 .pv-discs i{background:#0d8c7d}
.pv-col.c6 .pv-h,.pv-col.c6 .pv-discs i{background:#c79400}
.pv-out{text-align:center;margin:10px 0 6px;font-size:16px;color:var(--ink2)}.pv-out b{font-size:22px;color:var(--ink)}
.pv-check{display:block;margin:0 auto}
/* Age 10: reading case files, word tiles, dialogue */
.ex-tag{align-self:center;margin:0 auto 8px;font-size:13px;font-weight:700;color:#8a6400;background:#fff4cc;border-radius:999px;padding:4px 12px;text-align:center}
.casefile{background:#fffdf5;border:2px solid #f0e2b6;border-radius:16px;padding:10px 14px;margin:0 0 12px;box-shadow:0 3px 0 #efe3c0}
.casefile .cf-h{font-size:13px;font-weight:700;color:#a07800;text-transform:uppercase;letter-spacing:.5px}
.casefile p{margin:4px 0 0;font-size:17px;line-height:1.45;color:var(--ink);white-space:pre-line}
.cards.spent{opacity:.45;pointer-events:none}
.why-q{font-size:17px;font-weight:700;color:var(--purple);margin:14px 2px 8px}
.slots.list{flex-direction:column;align-items:stretch}
.slots.list .slot{width:auto;min-height:52px;flex-direction:row;justify-content:flex-start;gap:10px;padding:8px 12px;text-align:left}
.slots.list .slot .xtxt{font-size:15px;font-weight:600;text-align:left}
.wf-show{background:#fff;border-radius:14px;padding:8px 14px;margin:0 auto 10px;font-size:18px;color:#c0392b;text-decoration:line-through;text-decoration-color:rgba(192,57,43,.45);text-align:center;max-width:94%}
.wf-line{display:flex;flex-wrap:wrap;gap:6px;min-height:58px;padding:8px;border-radius:16px;background:#fff;border:2.5px dashed #cfc3f5;align-content:flex-start}
.wf-line.off{border-color:#ff8a8a;border-style:solid;animation:shake .35s}
.wf-out{min-height:24px;margin:8px 4px;font-size:17px;font-weight:600;color:var(--ink);text-align:center}
.wf-line.empty + .wf-out{color:var(--ink2);font-weight:500;font-size:14px}
.wf-bank{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:6px 0 14px;min-height:46px}
.wf-tile{padding:8px 12px;border-radius:12px;background:#efeaff;color:var(--ink);font-size:17px;font-weight:600;box-shadow:0 3px 0 #d8cef7}
.wf-tile.p{min-width:38px;background:#fff4d4;box-shadow:0 3px 0 #f0d98c}
.wf-line .wf-tile{background:#e6f7e2;box-shadow:0 3px 0 #bfe5b5}
.wf-tile.glow{outline:3px solid #ffc83d;animation:pulse 1s infinite}
.wf-tile:active{transform:translateY(2px)}
.bubble-row{display:flex;align-items:flex-end;gap:8px;margin:0 0 12px}
.bubble{position:relative;background:#fff;border-radius:18px 18px 18px 4px;padding:10px 14px;font-size:17px;line-height:1.4;box-shadow:0 3px 0 #e3ddf5;color:var(--ink)}
.talk{background:#fff;border-radius:18px;padding:14px;text-align:center;margin:0 0 14px}
.talk ul{text-align:left;margin:8px 0 0;padding-left:20px;font-size:15px;line-height:1.5}
.wf-line,.wf-bank,.wf-out,.casefile,.bubble-row,.talk,.why-q,.cards.list,.slots.list{align-self:stretch}
.wf-show.plain{text-decoration:none;color:var(--ink2)}
/* Age 10: equal sharing */
.sh-pool{align-self:stretch;display:flex;flex-direction:column;align-items:center;gap:6px;background:#fff;border-radius:14px;padding:8px;min-height:44px}
.sh-pool.over{background:#fff0f0;color:#c0392b}
.sh-plates{align-self:center;display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));gap:8px;width:100%;max-width:420px}
.sh-plate{position:relative;background:#fff;border-radius:50%;aspect-ratio:1;display:grid;place-items:center;box-shadow:inset 0 0 0 5px #efeaff,0 3px 0 #e3ddf5;padding:14%}
.sh-plate em{position:absolute;bottom:4px;right:8px;font-style:normal;font-weight:700;font-size:14px;color:var(--purple)}
.sh-cnt{display:flex;flex-wrap:wrap;gap:3px;justify-content:center;align-items:center;max-width:100%}
.sh-cnt b{width:7px;height:30px;border-radius:3px;background:#3e82f2}
.sh-cnt i{width:9px;height:9px;border-radius:50%;background:#e9661a}
.sh-step{display:flex;align-items:center;gap:10px;font-weight:600;color:var(--ink2)}
.sh-step .pv-btn{width:44px;height:40px;font-size:22px}
.sh-val{font-size:28px;color:var(--ink);min-width:36px;text-align:center}
.stage{overflow-x:hidden}
/* unit banner that stands out: lavender pill, glow, divider, straight purple base */
.unit{background:transparent;box-shadow:none;padding:0;margin:0 12px 14px}
.unit-h{position:relative;gap:10px;padding:12px 14px 16px;border-radius:22px;overflow:hidden;
  background:linear-gradient(#fdfbff,#efe8ff);box-shadow:0 0 0 2px #e4dbff,0 8px 16px rgba(108,63,224,.16);margin-bottom:6px}
.unit-h::after{content:"";position:absolute;left:0;right:0;bottom:0;height:7px;background:linear-gradient(90deg,#c9b8ff,#8f6bff 50%,#c9b8ff)}
.unit-h .chev{font-size:15px;color:#3b2a8f}
.unit-h .uico{width:48px;height:48px;border-radius:14px;font-size:28px;background:linear-gradient(135deg,#ffeedd,#ffdce8);box-shadow:0 2px 5px rgba(0,0,0,.08)}
.unit-h .usep{flex:none;width:2px;align-self:stretch;margin:4px 0;border-radius:2px;background:#4b3aa8;opacity:.55}
.unit-h .utxt b{font-size:16px;font-weight:700;line-height:1.2;color:#22184f}
.unit-h .utxt small{font-size:13px;color:#5e5a7a}
.unit-h .ustar{width:auto;flex:none;font-size:17px;font-weight:700;gap:6px}
.unit-h .ustar .emo{font-size:22px}
/* topics hang off their unit like branches: a line runs down from the unit, a short branch goes into each topic */
.unit .topic{position:relative;margin-left:30px}
.unit .topic::before{content:"";position:absolute;left:-11px;top:-16px;bottom:-10px;width:3px;border-radius:2px;background:#bba9f6}
.unit .topic:last-child::before{bottom:auto;height:42px}
.unit .topic::after{content:"";position:absolute;left:-11px;top:23px;width:11px;height:3px;border-radius:2px;background:#bba9f6}
/* branch line starts below the unit banner, never through it */
.unit-h + .topic::before{top:-6px}
.topic-h .ustamp{transform:none}
.unit-h .ring.upct{flex:none;width:50px;height:50px;font-size:13px}.unit-h .ring.upct span{width:39px;height:39px}
/* ================= v20: picture-based buddies, front page and buddy page (assets in img/) ================= */
.bud{position:relative;display:block;height:100%;aspect-ratio:var(--ar,.88);max-width:100%;margin:0 auto}
.bud-kitty{--ar:.879}.bud-parrot{--ar:.865}.bud-panda{--ar:.934}.bud-dino{--ar:.838}.bud-hero{--ar:.882}.bud-bunny{--ar:.705}.bud.waving{--ar:.823}
.bud-img{display:block;width:100%;height:100%;object-fit:contain;filter:var(--bf,) drop-shadow(0 6px 6px rgba(40,20,90,.18));user-select:none;-webkit-user-drag:none}
.bud-x{position:absolute;transform:translate(-50%,-50%);height:auto;filter:drop-shadow(0 2px 2px rgba(0,0,0,.15));pointer-events:none;user-select:none}
img.coin{width:22px;height:22px;display:inline-block;vertical-align:-4px}
.coin-big img.coin{width:44px;height:44px}
.coin-chip .coin-img{width:28px;height:28px;display:block;filter:drop-shadow(0 2px 2px rgba(160,100,0,.25))}
/* small round avatars show the buddy's face */
.mini-av .bud,.dr-av .bud,.who-av .bud,.rp-av .bud,.acc-av .bud{height:150%;margin-top:12%}
.mini-av .bud-img{filter:var(--bf,)}
.who-who .bud{height:100%}
.prompt .who-buddy .bud,.done-buddy .bud,.empty-buddy .bud{height:100%}
/* front page */
.front{background:radial-gradient(130% 70% at 50% 40%,#ffffff 0%,#f4f0ff 55%,#e7dfff 100%)}
.fhead{gap:8px}
.flogo .logo-img{height:46px;width:auto;display:block;filter:drop-shadow(0 4px 6px rgba(60,20,140,.25))}
.fbody{padding:0 16px calc(20px + var(--safe-bot))}
.frow{align-self:stretch;display:flex;align-items:center;justify-content:space-between;gap:8px;margin:6px 0 0}
.frow .hi{margin:0;font-size:clamp(26px,4.4vh,36px);text-align:left;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.agepill{order:2;flex:none;display:flex;align-items:center;gap:6px;padding:6px 12px 6px 8px;border-radius:999px;background:linear-gradient(#ffffff,#f1ebff);
  border:2px solid #e4d9ff;box-shadow:0 4px 0 #d9ccfb,0 6px 12px rgba(108,63,224,.15)}
.agepill img{width:28px;height:auto}
.agepill b{font-size:18px;font-weight:700;color:#4b2bb8}
.agepill .chev-d{width:8px;height:8px;border-right:2.5px solid #4b2bb8;border-bottom:2.5px solid #4b2bb8;transform:rotate(45deg) translateY(-3px);margin:0 2px 0 4px}
.agepill:active{transform:translateY(2px);box-shadow:0 2px 0 #d9ccfb}
.agepill.empty b{color:#8a7bc4}
.fstage{height:31vh;max-height:300px;min-height:170px;margin-top:1vh}
.fbuddy .bud{height:100%}
.face-pop{position:absolute;left:50%;top:-6%;width:42%;transform:translateX(-50%);z-index:4;pointer-events:none;animation:facepop 1.3s ease-out forwards;
  filter:drop-shadow(0 6px 8px rgba(40,20,90,.25))}
@keyframes facepop{0%{opacity:0;transform:translate(-50%,20px) scale(.4)}18%{opacity:1;transform:translate(-50%,0) scale(1.08)}30%{transform:translate(-50%,0) scale(1)}80%{opacity:1}100%{opacity:0;transform:translate(-50%,-24px) scale(.95)}}
img.pop{width:26px;height:auto}
.buddy-tag{display:flex;flex-direction:column;align-items:center;line-height:1.05;padding:6px 22px 7px;margin:2px 0 10px;border-radius:18px;
  background:linear-gradient(#f6f1ff,#e6dcff);border:2px solid #fff;box-shadow:0 4px 0 #d4c6fb,0 8px 14px rgba(108,63,224,.18)}
.buddy-tag small{font-size:13px;font-weight:700;color:#5b3fc4}
.buddy-tag b{font-size:22px;font-weight:700;color:#3b1f9e}
.img-btn{display:block;padding:0;background:none;border:0;border-radius:999px;transition:transform .12s}
.img-btn img{display:block;width:100%;height:auto;filter:drop-shadow(0 6px 8px rgba(160,110,0,.25))}
.img-btn:active{transform:translateY(3px) scale(.98)}
.learn-btn{width:min(86%,330px);flex:none}
.ftiles{display:grid;grid-template-columns:1fr 1fr;gap:12px;width:100%;max-width:400px;margin-top:16px;flex:none}
.ftile{padding:0;background:none;border:0;border-radius:24px;transition:transform .15s}
.ftile img{display:block;width:100%;height:auto;filter:drop-shadow(0 8px 10px rgba(80,50,160,.18))}
.ftile:active{transform:scale(.95)}
/* buddy page */
.custom{background:radial-gradient(130% 60% at 50% 25%,#ffffff 0%,#f4f0ff 55%,#e7dfff 100%)}
.cstage{position:relative;width:60%;max-width:230px;height:200px;margin:4px auto 0;flex:none}
.cstage .cust-preview{position:absolute;inset:0 0 8%;width:auto;height:auto;animation:breathe 3.6s ease-in-out infinite}
.cstage .fshadow{bottom:4%}
.buddy-tag.edit{cursor:text}
.buddy-tag .bname{font:inherit;font-size:22px;font-weight:700;color:#3b1f9e;text-align:center;border:0;border-bottom:2px dashed #c3b2f5;background:transparent;outline:none;width:170px;padding:0;-webkit-user-select:text;user-select:text}
.starbank{display:flex;align-items:center;gap:6px;font-weight:700;color:#8a6400;background:#fff6d6;border-radius:999px;padding:4px 12px;margin:0 0 10px;font-size:14px}
.starbank img{width:20px;height:auto}
.custom .seg2{background:#e9e2ff}
.pick-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;width:100%;max-width:420px;margin:0 auto}
.ex-grid{grid-template-columns:repeat(4,1fr)}
.pick{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:96px;padding:8px 4px;border-radius:20px;background:#fff;
  border:3px solid transparent;box-shadow:0 4px 0 #e6def9,0 6px 12px rgba(80,50,160,.08)}
.pick.on{border-color:#8a63ff;background:#f6f2ff;box-shadow:0 4px 0 #c8b6ff,0 0 0 4px rgba(138,99,255,.18)}
.pick:active{transform:translateY(2px)}
.pick .pk-art{height:62px;display:block}
.pick .pk-l{font-size:12.5px;font-weight:700;color:#3a3060;text-align:center;line-height:1.1}
.ex-grid .pick{min-height:84px}
.pick .ex-img{height:42px;width:auto;max-width:90%;object-fit:contain}
.pick .sw-img{width:44px;height:44px;object-fit:contain}
.pick .sw-hue{height:60px;display:block}
.pick .pk-none{width:38px;height:38px;border-radius:50%;border:3px solid #cfc6ea;position:relative}
.pick .pk-none::after{content:"";position:absolute;left:50%;top:-3px;bottom:-3px;width:3px;background:#cfc6ea;transform:translateX(-50%) rotate(45deg)}
.pick.locked > :not(.lk){filter:grayscale(.75);opacity:.55}
.pick .lk{display:flex;align-items:center;gap:3px;font-size:13px;font-weight:700;color:#8a6400;background:#fff6d6;border-radius:999px;padding:1px 8px}
.pick .lk img{width:15px;height:auto}
.save-btn{width:min(78%,290px);margin:16px auto 6px}
.save-btn img{filter:drop-shadow(0 6px 8px rgba(30,120,40,.25))}
.custom .tabpanel{display:block;min-height:0;width:100%}
.custom .scroll > *{flex:none}
.buddy-tag .bname::placeholder{color:#3b1f9e;opacity:.85}
.mini-av .bud,.dr-av .bud,.who-av .bud,.rp-av .bud,.acc-av .bud{height:175%;margin-top:4%;align-self:start}
.mini-av,.dr-av,.who-av,.rp-av,.acc-av{overflow:hidden}
.face-pop{left:22%;top:2%;width:34%;padding:6%;box-sizing:content-box;border-radius:50%;background:#fff;box-shadow:0 6px 14px rgba(60,30,140,.22)}
.mini-av,.dr-av,.who-av,.rp-av,.acc-av{position:relative;display:block}
.mini-av .bud,.dr-av .bud,.who-av .bud,.rp-av .bud,.acc-av .bud{position:absolute;left:50%;top:6%;width:140%;height:auto;max-width:none;margin:0;transform:translateX(-50%);align-self:auto}
.mini-av .bud-bunny,.dr-av .bud-bunny,.who-av .bud-bunny,.rp-av .bud-bunny,.acc-av .bud-bunny{top:-22%}
.list .li .ring{margin-left:auto;flex:none}
/* ================= v21: front page as one screen (no scrolling), with sky / hills scenery ================= */
.front2{background:linear-gradient(#5b3fd6 0,#6d5ae8 14%,#78b9ff 34%,#a8dcff 52%,#bfe9c9 66%,#d9f0ff 78%,#e7dcff 100%);overflow:hidden;
  display:flex;flex-direction:column;padding:0 0 calc(10px + var(--safe-bot))}
.scene-bg{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.scene-bg i{position:absolute;display:block}
.scene-bg .sky{left:-20%;right:-20%;top:-40px;height:150px;border-radius:0 0 55% 45%/0 0 70px 50px;background:linear-gradient(120deg,#4a2fc7,#6b4ff0 60%,#8a6bff);box-shadow:0 10px 30px rgba(60,30,180,.25)}
.scene-bg .cloud{width:110px;height:34px;border-radius:30px;background:#fff;opacity:.92;filter:drop-shadow(0 4px 6px rgba(80,120,200,.15))}
.scene-bg .cloud::before,.scene-bg .cloud::after{content:"";position:absolute;border-radius:50%;background:#fff}
.scene-bg .cloud::before{width:46px;height:46px;left:18px;top:-24px}.scene-bg .cloud::after{width:36px;height:36px;left:54px;top:-16px}
.scene-bg .c1{right:-30px;top:150px}.scene-bg .c2{left:-50px;top:250px;transform:scale(.8)}.scene-bg .c3{right:30%;top:118px;transform:scale(.55);opacity:.7}
.scene-bg .hill{border-radius:50%;}
.scene-bg .h1{left:-30%;width:95%;height:200px;top:calc(var(--hz,46%) - 30px);background:radial-gradient(60% 60% at 50% 40%,#9be07a,#62c24f);opacity:.95}
.scene-bg .h2{right:-35%;width:110%;height:240px;top:var(--hz,46%);background:radial-gradient(60% 55% at 45% 35%,#a8ea83,#5cbf47)}
.scene-bg .grass{left:-10%;right:-10%;bottom:-70px;height:150px;border-radius:50% 50% 0 0;background:radial-gradient(70% 70% at 50% 20%,#8fdc6d,#4fb03d)}
.front2 > :not(.scene-bg){position:relative;z-index:1}
.f2-head{display:flex;align-items:center;gap:8px;padding:calc(8px + var(--safe-top)) 12px 0;flex:none}
.burger{width:40px;height:40px;display:grid;place-items:center;color:#fff;border-radius:12px}
.burger svg{width:28px;height:28px}
.burger:active{background:rgba(255,255,255,.15)}
.f2-head .flogo .logo-img{height:clamp(34px,5.4vh,46px)}
.f2-head .coin-chip{background:linear-gradient(#ffe27a,#ffc93d);box-shadow:inset 0 -3px 0 #e6a613,0 3px 6px rgba(80,40,0,.2);color:#2a1b5c}
.f2-head .coin-chip .coin-val{font-size:17px;font-weight:700}
.f2-head .mini-av{width:clamp(44px,6.6vh,54px);height:clamp(44px,6.6vh,54px);border:3px solid #fff;box-shadow:0 0 0 2px #b49cff,0 4px 10px rgba(30,10,90,.3)}
/* hero: greeting on the left, buddy on the right; takes all the room that is left */
.f2-hero{position:relative;flex:1 1 auto;min-height:150px;display:grid;grid-template-columns:52% 48%;align-items:start;padding:0 12px}
.f2-greet{display:flex;flex-direction:column;align-items:flex-start;gap:clamp(4px,1vh,10px);padding-top:clamp(10px,3vh,34px);z-index:2}
.f2-hi{margin:0;font-size:clamp(30px,5.6vh,46px);font-weight:700;line-height:1;color:#fff;text-shadow:0 3px 0 rgba(60,30,160,.35),0 6px 14px rgba(40,20,120,.25);white-space:nowrap}
.f2-hi span{color:#ffd23f}
.f2-sub{margin:0;font-size:clamp(14px,2.2vh,18px);font-weight:600;color:#fff;text-shadow:0 2px 4px rgba(40,20,120,.35)}
.f2-greet .agepill{order:0;margin-top:2px}
.f2-stage{position:relative;height:100%;min-height:0;cursor:pointer}
.f2-stage .fbuddy{position:absolute;inset:4% -10% 0 -24%}
.f2-stage .fbuddy .bud{height:100%;margin:0 0 0 auto}
.f2-stage.tapped .fbuddy{animation:happy .9s cubic-bezier(.3,.7,.4,1)}
.f2-stage .face-pop{left:-6%;top:0;width:40%}
.f2-tag{position:absolute;left:38%;bottom:4%;margin:0;padding:4px 14px 5px;z-index:3}
.f2-tag small{font-size:11px}.f2-tag b{font-size:17px}
.f2-learn{width:min(88%,340px,calc((100dvh - 420px) * 4));margin:clamp(4px,1vh,10px) auto 0;flex:none}
/* tiles: two by two, shrinking on short screens so the page never scrolls */
.f2-tiles{--tw:min(calc((100vw - 40px) / 2),calc((100dvh - 390px) / 2),170px);grid-template-columns:var(--tw) var(--tw);justify-content:center;gap:10px 12px;margin:clamp(8px,1.6vh,16px) auto 0;flex:none;max-width:none;width:auto}
.f2-tiles .ftile{position:relative;width:var(--tw)}
.tlock{position:absolute;right:10%;top:8%;width:26px;height:26px;border-radius:9px;background:#7a4ae0;display:grid;place-items:center;box-shadow:0 2px 4px rgba(0,0,0,.2)}
.tlock svg{width:17px;height:17px}
.scene-bg .h1{top:37%;height:24%;-webkit-mask-image:linear-gradient(#000 55%,transparent);mask-image:linear-gradient(#000 55%,transparent)}
.scene-bg .h2{top:40%;height:26%;-webkit-mask-image:linear-gradient(#000 50%,transparent);mask-image:linear-gradient(#000 50%,transparent)}
.scene-bg .grass{bottom:-60px;height:110px}
.front2{background:linear-gradient(#5b3fd6 0,#6d5ae8 12%,#78b9ff 30%,#a8dcff 44%,#d6f0ff 62%,#e6e2ff 82%,#ece4ff 100%)}
/* ================= v22: content page as in the design (sky gradient, glossy tiles, timeline) ================= */
.learn2{background:linear-gradient(#7b6cf0 0,#8f8cff 10%,#9fc4ff 32%,#b8dcff 60%,#d8ecff 85%,#e8f4ff 100%)}
.learn2 > :not(.scene-bg){position:relative;z-index:1}
.learn2 .scene-bg .grass{left:-10%;right:-10%;bottom:-80px;height:130px;border-radius:50% 50% 0 0;background:radial-gradient(70% 70% at 50% 20%,#8fdc6d,#4fb03d);opacity:.9}
.learn2 .scroll{background:transparent}
.learn2 .khead{padding:calc(10px + var(--safe-top)) 14px 6px;gap:10px;background:transparent}
.learn2 .agepill{order:0}
.learn2 .coin-chip{background:linear-gradient(#ffe27a,#ffc93d);box-shadow:inset 0 -3px 0 #e6a613,0 3px 6px rgba(80,40,0,.2);color:#2a1b5c}
.learn2 .coin-chip .coin-val{font-size:17px;font-weight:700}
.learn2 .mini-av{width:54px;height:54px;border:3px solid #fff;box-shadow:0 0 0 2px #b49cff,0 4px 10px rgba(30,10,90,.3)}
/* subject tiles: glossy pastel, chosen one deep blue with white text */
.learn2 .subtabs{gap:7px;padding:8px 12px 14px}
.learn2 .subtab{flex:0 0 60px;height:74px;border-radius:16px;border:0;padding:6px 2px;gap:3px;justify-content:center;
  background:linear-gradient(180deg,rgba(255,255,255,.75),rgba(255,255,255,0) 55%),var(--tab);box-shadow:inset 0 -3px 0 rgba(0,0,0,.07),0 4px 8px rgba(60,60,160,.12)}
.learn2 .subtab .emo{font-size:28px}
.learn2 .subtab span:last-child{font-size:11.5px;font-weight:700;color:#3a2f70}
.learn2 .subtab.sel{flex-basis:68px;height:82px;background:linear-gradient(180deg,#3d7bff,#1f4fd6);border:3px solid #fff;
  box-shadow:0 0 0 2px #8fb2ff,0 8px 16px rgba(30,60,200,.35)}
.learn2 .subtab.sel span:last-child{color:#fff;font-size:12.5px}
/* unit banner */
.learn2 .unit-h{background:linear-gradient(#fbf9ff,#ebe4ff);border:2px solid #fff;box-shadow:0 0 0 2px #c9b8ff,0 8px 16px rgba(108,63,224,.18)}
.learn2 .unit-h .uico{background:linear-gradient(135deg,#ffe48a,#ffc94d);box-shadow:0 3px 0 #e9a92c,0 4px 8px rgba(0,0,0,.1)}
/* timeline with dots */
.learn2 .unit .topic::before{background:#9b7cff;width:3px}
.learn2 .unit .topic::after{width:0;height:0}
.learn2 .unit .topic > .tl-dot{display:none}
.learn2 .unit .topic{box-shadow:0 0 0 2px rgba(255,255,255,.9),0 6px 14px rgba(70,50,160,.12)}
.learn2 .unit .topic-h::before{content:"";position:absolute;left:-19px;top:22px;width:13px;height:13px;border-radius:50%;background:#c9b8ff;border:3px solid #fff;box-shadow:0 0 0 2px #9b7cff}
.learn2 .game{background:linear-gradient(120deg,#fff3e6,#fffbe6 55%,#eef9e4)}
.learn2 .game.locked{background:#f2f0f8}
.learn2 .play{background:linear-gradient(#5ed846,#2fa21f);box-shadow:0 4px 0 #1f7a12}
.learn2 .play.played{background:linear-gradient(#8fe27c,#5cc04a);box-shadow:0 4px 0 #3f9330}
.learn2 .subtabs{gap:6px;padding:6px 10px 12px}
.learn2 .subtab{flex-basis:54px;height:70px}.learn2 .subtab .emo{font-size:25px}.learn2 .subtab span:last-child{font-size:11px}
.learn2 .subtab.sel{flex-basis:64px;height:78px}
.learn2 .ring{background:conic-gradient(#2fb32a calc(var(--p)*1%),#e4e0f5 0)}
.learn2 .ring span{width:72%;height:72%}
.learn2 .unit-h .ring.upct{width:56px;height:56px;font-size:14px}
/* ================= v23: content page with the content asset pack (img/content) ================= */
/* subject rack: slanted tiles, upright contents; chosen subject bright blue with a moving silver edge */
.learn2 .subtabs{gap:8px;padding:10px 14px 16px;scroll-padding:0 14px}
.learn2 .subtab{position:relative;flex:0 0 58px;height:76px;padding:0;border-radius:18px;transform:skewX(-9deg);overflow:visible}
.learn2 .subtab .st-in{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:100%;height:100%;transform:skewX(9deg)}
.learn2 .subtab .st-art{width:40px;height:auto;border-radius:10px;display:block}
.learn2 .subtab .st-art.emo{font-size:26px;width:auto}
.learn2 .subtab .st-l{font-size:11px;font-weight:700;color:#3a2f70;white-space:nowrap}
.learn2 .subtab.sel{flex-basis:66px;height:84px;transform:skewX(-9deg) translateY(-3px);background:linear-gradient(180deg,#4b8bff,#1d4fd8);border:0;
  box-shadow:0 8px 16px rgba(30,60,200,.35)}
.learn2 .subtab.sel .st-art{width:46px;box-shadow:0 3px 6px rgba(0,0,0,.18)}
.learn2 .subtab.sel .st-l{color:#fff;font-size:12.5px}
.learn2 .subtab.sel::before{content:"";position:absolute;inset:-4px;border-radius:21px;padding:3px;pointer-events:none;
  background:conic-gradient(from var(--ang,0deg),#ffffff,#c9d3e6,#ffffff,#9eabc4,#ffffff,#dfe6f2,#ffffff);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;animation:silver 3s linear infinite}
@property --ang{syntax:'<angle>';initial-value:0deg;inherits:false}
@keyframes silver{to{--ang:360deg}}
@media (prefers-reduced-motion:reduce){.learn2 .subtab.sel::before{animation:none}}
/* unit icon = subject art */
.learn2 .unit-h .uico{padding:0;overflow:hidden;background:#ffe08a}
.learn2 .unit-h .uico .u-art{width:100%;height:100%;object-fit:cover;display:block}
.learn2 .unit-h .uico .u-art.emo{display:grid;place-items:center;font-size:26px}
/* game rows */
.learn2 .game .art.pic{background:none;box-shadow:0 4px 8px rgba(60,40,120,.15);padding:0;overflow:hidden}
.learn2 .game .art.pic img{width:100%;height:100%;object-fit:cover;display:block}
.learn2 .game.warm{background:linear-gradient(120deg,#fff1df,#fff8e8 55%,#f1f9df)}
.learn2 .game.cool{background:linear-gradient(120deg,#e3f4ff,#eefaff 55%,#e8f8ee)}
.learn2 .game.locked{background:linear-gradient(120deg,#efedf7,#f4f2fa)}
.learn2 .game.locked .art.pic{filter:none;opacity:1;box-shadow:none}
/* foliage at the end of the list */
.learn2 .foliage{display:flex;justify-content:space-between;align-items:flex-end;padding:4px 6px 0;margin-top:-6px;pointer-events:none}
.learn2 .foliage img{height:56px;width:auto}
.learn2 .scene-bg .grass{display:none}
@media (max-width:340px){.learn2 .subtab{flex-basis:52px;height:70px}.learn2 .subtab .st-art{width:34px}.learn2 .subtab.sel{flex-basis:60px;height:78px}.learn2 .subtab.sel .st-art{width:40px}
  .learn2 .game .art{width:72px;height:66px}.learn2 .game .info h3{font-size:16px}.learn2 .play{padding:8px 12px;font-size:15px}}
.learn2 .subtabs{padding:12px 14px 16px 20px;scroll-padding-left:20px}
/* ================= v24: closer to the mockup ================= */
/* subject rack: narrow tall slanted tiles, big art, small gaps so all subjects show */
.learn2 .subtabs{gap:5px;padding:12px 12px 16px 16px}
.learn2 .subtab{flex:0 0 50px;height:80px;border-radius:15px;transform:skewX(-7deg);
  background:linear-gradient(180deg,rgba(255,255,255,.85),rgba(255,255,255,.15) 45%,rgba(255,255,255,0) 60%),var(--tab);
  border:1.5px solid rgba(255,255,255,.9);box-shadow:inset 0 -3px 0 rgba(0,0,0,.06),0 5px 10px rgba(70,70,170,.16)}
.learn2 .subtab .st-in{transform:skewX(7deg);gap:3px}
.learn2 .subtab .st-art{width:42px;border-radius:9px}
.learn2 .subtab .st-l{font-size:10.5px;letter-spacing:-.2px}
.learn2 .subtab.sel{flex-basis:60px;height:88px;transform:skewX(-7deg) translateY(-3px);
  background:linear-gradient(180deg,rgba(255,255,255,.35),rgba(255,255,255,0) 45%),linear-gradient(180deg,#3f86ff,#1a46cf);border:3px solid #fff;
  box-shadow:0 0 0 1.5px #9dbaff,0 10px 18px rgba(30,60,200,.38)}
.learn2 .subtab.sel .st-art{width:48px}
.learn2 .subtab.sel .st-l{font-size:12px}
.learn2 .subtab.sel::before{inset:-6px;border-radius:19px}
/* unit banner: purple rim all round, bigger icon, thin chevron */
.learn2 .unit-h{border:2.5px solid #a98bff;border-bottom-width:5px;box-shadow:0 8px 18px rgba(108,63,224,.2);padding:12px 14px}
.learn2 .unit-h::after{display:none}
.learn2 .unit-h .chev{display:grid;place-items:center;width:22px;color:#4b2bb8}
.learn2 .unit-h .chev svg{width:20px;height:20px}
.learn2 .unit-h .uico{width:56px;height:56px;border-radius:16px;box-shadow:0 4px 0 #e9b13a,0 6px 10px rgba(0,0,0,.12)}
.learn2 .unit-h .ring.upct{width:58px;height:58px;font-size:15px}
/* timeline: straight line, small filled dots */
.learn2 .unit .topic-h::before{left:-17px;top:24px;width:11px;height:11px;border:2px solid #fff;background:#b89cff;box-shadow:0 0 0 1.5px #8f6bff}
/* topic cards: frosted with a thin lavender border */
.learn2 .unit .topic{background:rgba(255,255,255,.82);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);border:1.5px solid #e3d9ff;
  box-shadow:0 6px 16px rgba(80,60,170,.12);border-radius:22px}
.learn2 .topic-h .tname{font-size:16.5px;font-weight:700;color:#22184f}
.learn2 .ustamp{border-radius:999px;padding:3px 12px;font-size:11px;background:#f6fff4}
/* game row: soft painted hills and bushes behind the art and the controls */
.learn2 .game{position:relative;overflow:hidden;border-radius:18px}
.learn2 .game > *{position:relative;z-index:1}
.learn2 .game::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
  background:radial-gradient(60px 46px at 4% 104%,#9fdc7b 0,#9fdc7b 58%,transparent 62%),
    radial-gradient(90px 40px at 26% 112%,#b8e88f 0,#b8e88f 56%,transparent 60%),
    radial-gradient(70px 60px at 104% 62%,#a5df82 0,#a5df82 55%,transparent 59%),
    radial-gradient(120px 46px at 88% 114%,#8fd36c 0,#8fd36c 56%,transparent 60%),
    radial-gradient(140px 60px at 62% 120%,rgba(200,240,170,.9) 0,rgba(200,240,170,.9) 55%,transparent 59%);opacity:.75}
.learn2 .game.locked::before{display:none}
.learn2 .game.warm{background:linear-gradient(115deg,#ffe9d2,#fff4df 50%,#f6fbe4)}
.learn2 .game.cool{background:linear-gradient(115deg,#d9efff,#ebf8ff 50%,#e9f8ec)}
.learn2 .game .art.pic{border:3px solid #fff;border-radius:18px;box-shadow:0 6px 12px rgba(60,40,120,.18)}
/* glossy Play and rings */
.learn2 .play{background:linear-gradient(180deg,rgba(255,255,255,.4),rgba(255,255,255,0) 50%),linear-gradient(#4fd436,#26a01a);box-shadow:0 4px 0 #1b7a10,0 6px 10px rgba(30,120,20,.3);border-radius:999px}
.learn2 .play.played{background:linear-gradient(180deg,rgba(255,255,255,.4),rgba(255,255,255,0) 50%),linear-gradient(#8fe27c,#58c046);box-shadow:0 4px 0 #3f9330}
.learn2 .ring{box-shadow:0 3px 6px rgba(60,40,140,.15)}
.learn2 .ring span{width:70%;height:70%;box-shadow:inset 0 2px 3px rgba(0,0,0,.06)}
.learn2 .coin-chip .coin-img{width:30px;height:30px}
.learn2 .unit .topic-h::before{width:9px;height:9px;left:-16px;top:25px;background:#a487ff;border:2px solid #efe8ff;box-shadow:0 0 0 1px #9b7cff}
/* ================= buddy tap: soap bubbles (from bubble.css, extended) ================= */
.f2-hero{position:relative}
.buddy-bubble-layer{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:4}
.buddy-bubble{position:absolute;left:var(--x,70%);top:var(--y,65%);width:var(--size,64px);aspect-ratio:1;border-radius:50%;display:grid;place-items:center;pointer-events:none;
  border:1px solid rgba(255,255,255,.7);
  background:radial-gradient(circle at 30% 22%,rgba(255,255,255,.42),transparent 26%),
    radial-gradient(circle at 50% 50%,transparent 50%,rgba(160,220,255,.16) 70%,rgba(255,255,255,.42) 97%);
  box-shadow:inset 2px 2px 5px rgba(255,255,255,.55),inset -3px -3px 7px rgba(207,159,255,.35),0 0 6px rgba(255,255,255,.35);
  will-change:transform,opacity;animation:bubble-rise var(--duration,2.2s) cubic-bezier(.25,.6,.4,1) var(--delay,0s) both}
/* iridescent rim: thin rainbow ring that slowly shimmers */
.buddy-bubble::before{content:"";position:absolute;inset:-1px;border-radius:50%;padding:2.5px;
  background:conic-gradient(from 210deg,rgba(255,120,200,.55),rgba(255,230,120,.5),rgba(120,255,200,.5),rgba(110,190,255,.6),rgba(190,130,255,.55),rgba(255,120,200,.55));
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.8;filter:blur(.4px)}
/* curved highlights */
.buddy-bubble::after{content:"";position:absolute;top:11%;left:16%;width:26%;height:12%;border-radius:50%;border-top:3px solid rgba(255,255,255,.9);transform:rotate(-38deg);opacity:.95}
.buddy-bubble img{position:relative;width:74%;height:74%;object-fit:contain;filter:drop-shadow(0 1px 1px rgba(0,0,0,.1))}
.buddy-bubble.icon img{width:56%;height:56%}
@keyframes bubble-rise{
  0%{opacity:0;transform:translate(-50%,-50%) scale(.3)}
  12%{opacity:1;transform:translate(-50%,-62%) scale(1)}
  50%{transform:translate(calc(-50% + var(--drift,20px)),calc(-50% + var(--rise,-230px) * .5)) scale(1)}
  86%{opacity:1;transform:translate(calc(-50% - var(--drift,20px) * .4),calc(-50% + var(--rise,-230px) * .94)) scale(1)}
  93%{opacity:.9;transform:translate(calc(-50% - var(--drift,20px)),calc(-50% + var(--rise,-230px))) scale(1.14)}
  100%{opacity:0;transform:translate(calc(-50% - var(--drift,20px)),calc(-50% + var(--rise,-230px))) scale(1.3)}}
.bubble-pop{position:absolute;width:0;height:0;pointer-events:none}
.bubble-pop i{position:absolute;left:-3px;top:-3px;width:6px;height:6px;border-radius:50%;background:#fff;box-shadow:0 0 6px 2px rgba(255,255,255,.9),0 0 10px rgba(190,160,255,.8);
  animation:sparkle .55s ease-out forwards}
.bubble-pop i:nth-child(odd){width:4px;height:4px;background:#fff6b3}
@keyframes sparkle{0%{opacity:1;transform:rotate(var(--a)) translateX(0) scale(1)}100%{opacity:0;transform:rotate(var(--a)) translateX(var(--d)) scale(.3)}}
.buddy-bubble.still{animation:bubble-still 1.2s ease both}
@keyframes bubble-still{0%{opacity:0;transform:translate(-50%,-50%)}20%,80%{opacity:1;transform:translate(-50%,-50%)}100%{opacity:0;transform:translate(-50%,-50%)}}
@media (prefers-reduced-motion:reduce){.buddy-bubble:not(.still){animation:none}}
/* ================= buddy page on one screen; Save always visible ================= */
.custom{display:flex;flex-direction:column}
.cust-body{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;padding-bottom:calc(10px + var(--safe-bot));overflow:hidden}
.cust-body > *{flex:none}
.custom .cstage{height:clamp(96px,22vh,200px);width:auto;aspect-ratio:1;margin:0 auto}
.cust-row{display:flex;align-items:center;justify-content:center;gap:8px;margin:2px 0 8px;width:100%}
.cust-row .buddy-tag{margin:0;padding:4px 16px 5px}
.cust-row .buddy-tag .bname{font-size:19px;width:130px}
.cust-row .starbank{margin:0}
.custom .seg2{margin-bottom:8px}
.custom .tabpanel{flex:1 1 auto;min-height:0;width:100%;max-width:440px;overflow-y:auto;display:flex}
.custom .pick-grid{flex:1;height:100%;align-content:stretch;grid-auto-rows:1fr;gap:8px}
.custom .pick{min-height:0;padding:4px 2px;border-radius:16px;gap:2px}
.custom .pick .pk-art{height:min(58px,72%)}
.custom .g-4{grid-template-columns:repeat(4,1fr)}
.custom .ex-grid{grid-template-columns:repeat(5,1fr);gap:6px}
.custom .ex-grid .pick{min-height:0}
.custom .ex-grid .pick .ex-img{height:min(34px,58%)}
.custom .ex-grid .pk-l{font-size:9.5px}
.custom .pick .sw-img{width:min(40px,60%);height:auto}
.custom .pick .sw-hue{height:min(52px,70%)}
.custom .pick .lk{font-size:11px;padding:0 6px}
.custom .save-btn{width:min(70%,260px);margin:10px auto 0}
.custom .save-btn.dirty{animation:savepulse 1.4s ease-in-out infinite}
@keyframes savepulse{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}
@media (prefers-reduced-motion:reduce){.custom .save-btn.dirty{animation:none}}
@media (max-height:640px){.custom .cstage{height:clamp(80px,17vh,140px)}.custom .ex-grid .pk-l{display:none}}
/* ================= Sakura the doll ================= */
.bud-doll .bud-x{filter:drop-shadow(0 1px 1px rgba(0,0,0,.12))}
/* round avatars: show her face (tall picture, face near the top) */
.mini-av .bud-doll,.dr-av .bud-doll,.who-av .bud-doll,.rp-av .bud-doll,.acc-av .bud-doll{width:190%;top:4%}
.custom .outfit-grid .of-img{height:min(70px,74%);width:auto}
.custom .seg2.many{overflow-x:auto;max-width:100%;scrollbar-width:none}
.custom .seg2.many button{padding:8px 12px;font-size:14px;white-space:nowrap}
.dev-wrap{display:flex;flex-direction:column;width:100%;height:100%}
.dev-note{margin:0 0 6px;text-align:center;font-size:12px;font-weight:700;color:#a05a00;background:#fff3d1;border-radius:999px;padding:2px 10px;align-self:center}
.dev-wrap .pick-grid{flex:1}
.custom .outfit-grid .of-img{height:min(150px,80%)}
.custom .g-buddy.g-4 .pick .pk-art{height:min(84px,70%)}
.custom .g-buddy.g-4 .pick .pk-art .bud{height:100%}
.custom .pick-grid.g-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.custom .pick-grid.ex-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
.custom .pick-grid.g-buddy:not(.g-4){grid-template-columns:repeat(3,minmax(0,1fr))}
.custom .pick img,.custom .pick .pk-art{max-width:100%}
.custom .outfit-grid .of-img{object-fit:contain}
.custom .outfit-grid{grid-auto-rows:minmax(0,190px);align-content:center}
.custom .tabpanel{padding:0 2px}

/* ===== v25 header avatar: face 15% smaller + blink every 5 s ===== */
.mini-av .bud{width:119%;top:9%}
.mini-av .bud-doll{width:161%;top:-4%}
.mini-av .bud-bunny{top:-14%}
.bud-blink{position:absolute;left:0;top:0;width:100%;height:100%;object-fit:contain;filter:var(--bf,);opacity:0;pointer-events:none;animation:bud-blink 5s infinite 1s}
@keyframes bud-blink{0%,95.9%{opacity:0}96%,98.9%{opacity:1}99%,100%{opacity:0}}
.dr-who{cursor:pointer}
@media (prefers-reduced-motion:reduce){.bud-blink{animation:none}}
.mini-av .bud-doll.o-explorer,.mini-av .bud-doll.o-sports{top:-16%}

/* ===== v35: Age 7 round types (array garden, shape corners, pretend keyboard, beat grid) ===== */
.arr-grid{display:grid;grid-template-columns:repeat(var(--c),minmax(0,1fr));gap:4px;width:100%;max-width:420px;box-sizing:border-box;padding:8px;border-radius:20px;background:linear-gradient(#d9f2cf,#c4e7b6);box-shadow:var(--shadow);margin:4px auto 0}
.arr-cell{aspect-ratio:1/1;min-width:0;padding:0;border-radius:8px;background:#8b5a33;box-shadow:inset 0 -4px 0 #6e4325;display:grid;place-items:center;font-size:clamp(16px,5.4vw,30px);line-height:1}
.arr-cell.on{background:#a8774d;animation:pop .3s ease}
.corners{max-width:320px;margin:0 auto}
.corners .vx{cursor:pointer}
.k-desk{padding:12px 6px 16px}
.k-monitor{width:min(92%,300px);margin:0 auto 8px;background:#26324f;border-radius:14px;padding:10px;box-shadow:0 6px 0 #1a2238}
.k-screen{background:#eef6ff;border-radius:8px;min-height:58px;display:flex;align-items:center;justify-content:center;font:700 34px/1 "Fredoka",sans-serif;letter-spacing:4px;color:#1f2a44}
.k-caret{display:inline-block;width:3px;height:34px;background:#1f5fe0;margin-left:3px;animation:blink 1s steps(1) infinite}
.k-target{text-align:center;font-size:16px;margin:2px 0 8px;color:#5b3a12}.k-target b{font-size:20px;letter-spacing:2px}
.k-board{display:flex;flex-direction:column;gap:5px;align-items:center}
.k-row{display:flex;gap:4px;justify-content:center;width:100%}
.k-key{flex:0 1 34px;min-width:26px;height:46px;border-radius:8px;background:#fff;box-shadow:0 3px 0 #c9b9a3;font:700 17px/1 "Fredoka",sans-serif;color:#1f2a44}
.k-key:active{transform:translateY(2px);box-shadow:0 1px 0 #c9b9a3}
.k-key.bad{background:#ffe1e1;animation:shake .35s}
.k-key.glow{outline:3px solid #ffc83d;animation:pulse 1s infinite}
@keyframes blink{50%{opacity:0}}
.listen.sm{width:96px;height:96px;font-size:42px;margin:0 auto 8px}
.beat-row{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;width:min(100%,360px);margin:6px auto 12px}
.beat{aspect-ratio:1/1;border-radius:18px;background:#f3efff;box-shadow:0 5px 0 #d8cef7;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:34px}
.beat small{font-size:13px;font-weight:600;color:var(--ink2)}
.beat.on{background:#fff3c4;box-shadow:0 5px 0 #f0d98c}
.beat.hit{transform:scale(.9)}
.beat.glow{outline:3px solid #ffc83d;animation:pulse 1s infinite}

/* ===== v36: avatar opens the menu everywhere (no ☰); pencil on the home buddy name ===== */
.gbar{gap:8px}
.gbar .mini-av{width:44px;height:44px}
.f2-head .flogo{margin-left:2px}
.buddy-tag.f2-tag{position:relative;padding-right:40px}
.buddy-tag .tag-edit{position:absolute;right:-12px;top:50%;transform:translateY(-50%);width:36px;height:36px;border-radius:50%;
  background:var(--purple2);border:3px solid #fff;box-shadow:0 3px 0 #6c3fe0,0 6px 12px rgba(108,63,224,.3);display:grid;place-items:center}
.buddy-tag .tag-edit svg{width:20px;height:20px}
.buddy-tag.f2-tag:active .tag-edit{transform:translateY(-50%) scale(.9)}

/* ===== v37: home – buddy 30% bigger and further right; name box under the buddy with "My Buddy" sitting on top ===== */
.f2-stage .fbuddy .bud{transform:translateX(5%) scale(.92);transform-origin:75% 0}   /* about 30% bigger than before (its box got taller when the name box moved out); grows down, never into the header */
.buddy-tag.f2-tag{position:absolute;left:auto;right:10px;bottom:0;padding:6px 46px 6px 18px;align-items:flex-start;border-radius:16px}
.buddy-tag.f2-tag small{position:absolute;left:12px;top:-19px;padding:2px 10px 3px;border-radius:10px 10px 0 0;
  background:#6c3fe0;color:#fff;font-size:12px;font-weight:700;line-height:1.2;letter-spacing:.2px}
.buddy-tag.f2-tag b{font-size:27px;line-height:1.1;max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ===== v38: Fun Games list + a fun game shown inside the app ===== */
.fun-list{display:flex;flex-direction:column;gap:14px;padding:8px 16px 24px}
.fun-card{display:flex;align-items:center;gap:14px;width:100%;padding:12px 14px;border-radius:22px;background:#fff;text-align:left;
  box-shadow:0 5px 0 #d8cef7,0 10px 18px rgba(108,63,224,.14);border:2px solid #fff}
.fun-card:active{transform:translateY(3px);box-shadow:0 2px 0 #d8cef7}
.fun-ic{width:72px;height:72px;border-radius:18px;display:grid;place-items:center;font-size:40px;flex:none;box-shadow:inset 0 -4px 0 rgba(0,0,0,.08)}
.fun-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.fun-txt b{font-size:21px;color:var(--ink)}
.fun-txt small{font-size:14px;color:var(--ink2);line-height:1.3}
.fun-go{width:46px;height:46px;border-radius:50%;background:#2db34a;color:#fff;display:grid;place-items:center;font-size:18px;flex:none;box-shadow:0 4px 0 #1d8a35}
.funplay .fun-frame{flex:1;width:100%;border:0;display:block;background:#1d2b3a}

/* ===== v39: all-ages expansion — parent play cards, map board, tune keys, number line, French bubbles ===== */
button.bubble{border:0;font:inherit;text-align:left;cursor:pointer}
.prompt.parent{background:#fff7e8}
.pcard{align-self:stretch;background:#fff;border-radius:20px;padding:14px 16px 10px;box-shadow:0 4px 0 #ecdfc5;border:2px solid #f3e3c2;margin-bottom:12px}
.pc-badge{display:inline-block;background:#ffe9b8;color:#8a5a00;font-weight:800;font-size:12.5px;padding:4px 10px;border-radius:999px;margin-bottom:6px}
.pc-scene{font-size:56px;text-align:center;letter-spacing:4px;line-height:1.2;margin:4px 0 8px}
.pc-sec{margin:8px 0}.pc-sec b{display:block;color:var(--purple);font-size:15px;margin-bottom:3px}
.pc-sec ul,.pc-sec ol{margin:0;padding-left:22px;font-size:15.5px;line-height:1.45;color:var(--ink)}.pc-sec li{margin:2px 0}
.pc-sec p{margin:0;font-size:15.5px;line-height:1.45}
.pc-safe{background:#fff1f1;color:#9a2a2a;border-radius:12px;padding:8px 10px;font-size:14px;line-height:1.35;margin:8px 0}
.pc-down{font-size:13.5px;color:var(--ink2);text-align:center;margin:10px 0 2px}
.map-wrap{align-self:stretch;max-width:560px;margin:0 auto 10px;border-radius:12px;overflow:hidden;box-shadow:0 3px 0 #c9dcef}
.map-wrap svg{display:block;width:100%;height:auto;touch-action:manipulation}
.mreg{cursor:pointer;outline:none}.mreg polygon,.mreg rect{stroke:#5d7fa8;stroke-width:.8;transition:filter .15s}
.mreg.sea polygon{stroke:none}
.mreg:hover polygon,.mreg:focus polygon,.mreg:hover rect,.mreg:focus rect{filter:brightness(.93)}
.mreg.good polygon,.mreg.good rect{fill:#7ddc84 !important;opacity:1}
.mreg.bad polygon,.mreg.bad rect{fill:#ffb3b3 !important;opacity:1}
.mreg.glow polygon,.mreg.glow rect{stroke:#ffb000;stroke-width:3;animation:mglow 1s infinite}
@keyframes mglow{50%{stroke-width:6;filter:brightness(1.12)}}
.map-wrap.ready .mreg polygon,.map-wrap.ready .mreg rect{stroke:#6c3fe0;stroke-width:1.4}
.mlab{font-size:11px;font-weight:800;fill:#26304a;paint-order:stroke;stroke:#fff;stroke-width:2.6px;pointer-events:none}
.mlab.hide{display:none}.memo{pointer-events:none}
.map-key{display:flex;flex-wrap:wrap;gap:6px 12px;justify-content:center;font-size:13px;margin:-4px 0 10px}
.map-key span{display:inline-flex;align-items:center;gap:5px}.map-key i{width:14px;height:14px;border-radius:4px;display:inline-block;border:1px solid #0002}
.map-cards .card.picked{outline:4px solid #6c3fe0}
.tune-strip{display:grid;grid-template-columns:repeat(var(--n),minmax(0,64px));gap:8px;justify-content:center;margin:6px 0 12px}
.tslot{height:64px;border-radius:14px;border:3px dashed #d6cdf5;background:#faf8ff;display:grid;place-items:center;font-size:30px}
.tslot.f{border-style:solid;border-color:#b9a6f5;background:#f1ecff}
.tune-strip.off .tslot{border-color:#ff9b9b;animation:shake .4s}
.tune-keys{display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));gap:8px;width:100%;max-width:460px;margin:0 auto 10px;align-items:end}
.tkey .emo,.tkey .big{font-size:38px;line-height:1.1}.tkey .lbl{font-size:15px;font-weight:700}
.tkey{border:0;border-radius:16px;background:hsl(calc(260 - var(--h) * 1.6),80%,88%);box-shadow:0 4px 0 hsl(calc(260 - var(--h) * 1.6),45%,70%);padding:8px 4px;min-height:calc(84px + var(--h) * .4px);font:inherit;cursor:pointer}
.tkey.hit{transform:translateY(3px);box-shadow:0 1px 0 #0002}.tkey.glow{outline:4px solid #ffb000}
.nl{position:relative;display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));align-self:stretch;max-width:600px;margin:40px auto 14px;padding-top:6px;border-top:4px solid #6c3fe0}
.nl-t{border:0;background:none;padding:0 0 6px;font:inherit;cursor:pointer;display:flex;flex-direction:column;align-items:center}
.nl-t i{width:3px;height:14px;background:#6c3fe0;margin-top:-12px;border-radius:2px}
.nl-t span{font-weight:800;font-size:clamp(12px,3.4vw,17px);margin-top:4px;padding:3px 2px;border-radius:8px;min-width:26px}
.nl-t.zero span{color:#e2479a}.nl-t.start span{background:#e7ffe4}
.nl-t.good span{background:#7ddc84;color:#fff}.nl-t.bad span{background:#ffb3b3}.nl-t.glow span{outline:3px solid #ffb000}
.nl-frog{position:absolute;top:-40px;transform:translateX(-50%);font-size:28px;transition:left .3s ease}

/* ===== v40: home back button on the learn page (crown removed), toddler play ===== */
.learn2 .home-back{order:-1;flex:none;background:#fff;box-shadow:0 3px 0 #d9ccfb}
.tp-field{position:relative;align-self:stretch;height:min(60vh,520px);border-radius:24px;background:linear-gradient(#cfe9ff,#eef7ff);overflow:hidden;touch-action:manipulation}
.tp-balloon{position:absolute;bottom:-140px;width:84px;height:104px;border:0;padding:0;background:none;cursor:pointer;animation:tp-rise var(--d,7s) linear forwards}
.tp-balloon i{position:absolute;inset:0 0 20px 0;border-radius:50% 50% 48% 52%/56% 56% 44% 44%;background:radial-gradient(circle at 32% 28%,#fff9 0 12%,transparent 13%),var(--c)}
.tp-balloon b{position:absolute;left:50%;bottom:0;width:2px;height:24px;background:#8a8aa8}
.tp-balloon.pop{animation:tp-pop .25s ease-out forwards}
@keyframes tp-rise{to{transform:translateY(calc(-1 * min(60vh,520px) - 160px))}}
@keyframes tp-pop{to{transform:scale(1.6);opacity:0}}
.tp-pops{position:absolute;right:12px;top:10px;font-size:26px}
.tp-animals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-self:stretch;max-width:520px;margin:0 auto;width:100%}
@media(min-width:600px){.tp-animals{grid-template-columns:repeat(3,minmax(0,1fr))}}
.tp-animal{border:0;border-radius:24px;background:#fff;box-shadow:0 5px 0 #e3ddf5;padding:12px 6px;font:inherit;cursor:pointer}
.tp-animal .emo{font-size:72px;line-height:1.1;display:block}
.tp-animal small{display:block;font-size:17px;font-weight:700;color:var(--ink)}
.tp-animal.heard{background:#f3fff0}
.tp-animal.go .emo{animation:tp-jump .7s ease}
@keyframes tp-jump{0%,100%{transform:none}25%{transform:translateY(-18px) rotate(-8deg) scale(1.1)}50%{transform:translateY(0) rotate(6deg)}75%{transform:translateY(-8px) rotate(-3deg)}}
@media (prefers-reduced-motion: reduce){.tp-balloon{animation-duration:14s}.tp-animal.go .emo{animation:none;transform:scale(1.1)}}

/* ===== v41: game tools row (refresh · rating · share) under the game bar ===== */
.gtools{display:flex;align-items:center;gap:10px;padding:0 12px 6px}
.gtools .gt-refresh{flex:none;width:44px;height:44px}
.gt-stars{flex:1;display:flex;justify-content:center;gap:2px;min-width:0}
.gt-star{border:0;background:none;padding:4px;width:36px;height:36px;cursor:pointer}
.gt-star svg{width:100%;height:100%;fill:#e3ddf5;stroke:#c9bdf0;stroke-width:1}
.gt-star.on svg{fill:#ffc233;stroke:#e6a613}
.gt-star:active{transform:scale(1.15)}
.gt-share{flex:none;display:flex;align-items:center;gap:6px;border:0;border-radius:999px;background:#6c3fe0;color:#fff;font:inherit;font-weight:700;font-size:15px;padding:9px 14px 9px 11px;box-shadow:0 3px 0 #4b28b3;cursor:pointer}
.gt-share svg{width:18px;height:18px}
.gt-share:active{transform:translateY(2px);box-shadow:0 1px 0 #4b28b3}
#mbox .gate-in{display:block;margin:8px auto 4px;width:120px;text-align:center;font-size:24px}
#mbox .gate-in.bad{border-color:#ff6b6b;animation:shake .4s}
@media (max-width:360px){.gt-star{width:30px;height:30px;padding:3px}.gt-share{padding:8px 11px 8px 9px}}

/* ===== v42: share button on the lessons page ===== */
.gt-share.sm{font-size:13.5px;padding:7px 11px 7px 9px;gap:5px}
.gt-share.sm svg{width:16px;height:16px}
.learn2 .khead .gt-share{order:3}
.learn2 .khead .mini-av{order:4}
@media (max-width:400px){.learn2 .khead{gap:7px;padding-left:10px;padding-right:10px}.learn2 .khead .gt-share.sm{width:42px;height:42px;padding:0;justify-content:center;border-radius:50%}.learn2 .khead .gt-share.sm span{display:none}.learn2 .khead .gt-share.sm svg{width:19px;height:19px}}
@media (max-width:340px){.learn2 .khead{gap:5px}.learn2 .agepill b{font-size:15px}.learn2 .agepill{padding:5px 8px}.learn2 .coin-chip .coin-val{font-size:14px}.learn2 .mini-av{width:44px;height:44px}.learn2 .home-back{width:40px;height:40px}}

/* ===== v43: lessons header refresh button; tighter header and subject tabs ===== */
.learn2 .khead{gap:6px;padding-left:10px;padding-right:10px}
.learn2 .home-back,.learn2 .learn-refresh{width:44px;height:44px;flex:none}
.learn2 .learn-refresh{order:-1;background:#fff;box-shadow:0 3px 0 #d9ccfb}
.learn2 .learn-refresh svg{width:22px;height:22px}
.learn2 .learn-refresh.spin svg{animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.learn2 .agepill{padding:5px 9px 5px 11px;gap:4px}
.learn2 .agepill b{font-size:15px}
.learn2 .agepill .chev-d{width:6px;height:6px;margin:0 1px 0 3px}
.learn2 .coin-chip{padding:4px 10px 4px 5px;gap:4px}
.learn2 .coin-chip .coin-img,.learn2 .coin-chip .coin{width:22px;height:22px}
.learn2 .coin-chip .coin-val{font-size:14.5px}
.learn2 .mini-av{width:48px;height:48px}
.learn2 .subtabs{padding-top:6px;padding-bottom:2px}
.learn2 .subtab{height:64px}
.learn2 .subtab.sel{height:72px}
.learn2 .subtab .st-in{transform:skewX(9deg) translateY(-3px)}
@media (max-width:400px){.learn2 .khead{gap:5px;padding-left:8px;padding-right:8px}}
@media (max-width:340px){.learn2 .khead{gap:4px;padding-left:6px;padding-right:6px}.learn2 .home-back,.learn2 .learn-refresh{width:36px;height:36px}.learn2 .mini-av{width:40px;height:40px}.learn2 .khead .gt-share.sm{width:36px;height:36px}.learn2 .agepill{padding:4px 7px}}
/* ===== v44: data pictures for the Age 10 full build (bar chart, table) ===== */
.chart{background:#fff;border:2px solid #e3e0f3;border-radius:16px;padding:8px 10px 6px;margin:0 0 12px;width:100%;max-width:360px}
.chart .ch-t{font-weight:800;font-size:14px;text-align:center;margin-bottom:4px;color:#3b3466}
.ch-bars{display:flex;align-items:flex-end;gap:6px;height:140px;padding-top:4px}
.ch-col{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;min-width:0}
.ch-col i{display:block;width:70%;max-width:34px;border-radius:6px 6px 0 0}
.ch-v{font-size:12px;font-weight:800;color:#3b3466}
.ch-l{font-size:11px;font-weight:700;margin-top:3px;line-height:1.35;padding-bottom:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;color:#555}
.dtable-wrap{width:100%;max-width:360px;overflow-x:auto;margin:0 0 12px}
.dtable{border-collapse:collapse;width:100%;background:#fff;font-size:14px}
.dtable th,.dtable td{border:2px solid #d9d4f2;padding:5px 7px;text-align:center}
.dtable th{background:#efeaff;font-weight:800}
.dtable-wrap.sq{display:flex;justify-content:center}.dtable-wrap.sq .dtable{width:auto}.dtable-wrap.sq td{width:40px;height:40px;padding:0;font-size:22px;background:#e9f8e6}

/* v45 ORDER_CARDS list rounds fit one phone screen: full-width compact slots, cards 2 per row with emoji beside text */
.slots.list.ord{gap:6px}
.slots.list.ord .slot{max-width:none;min-height:38px;padding:4px 10px;border-width:2.5px;border-radius:14px}
.slots.list.ord .slot .n{font-size:20px;line-height:1;flex:none}
.slots.list.ord .slot .cc{flex-direction:row!important;gap:8px;align-items:center}
.slots.list.ord .slot .big,.slots.list.ord .slot .emo{font-size:24px;line-height:1}
.slots.list.ord .slot .lbl,.slots.list.ord .slot .xtxt{font-size:14px;font-weight:600;text-align:left;line-height:1.15;padding:0}
.cards.list.ord{display:grid;gap:8px;margin:0}
.cards.list.ord .card{min-height:54px;padding:6px 10px;border-radius:16px;justify-content:center;align-items:stretch}
.cards.list.ord .card .cc{flex-direction:row!important;gap:8px;align-items:center;width:100%}
.cards.list.ord .card .big,.cards.list.ord .card .emo{font-size:30px;line-height:1;flex:none}
.cards.list.ord .card .lbl,.cards.list.ord .card .xtxt{font-size:14px;font-weight:600;text-align:left;line-height:1.15;padding:0}
.stage:has(.slots.list.ord){gap:8px}
.stage:has(.slots.list.ord) .prompt{font-size:17px;padding:8px 12px}
.stage:has(.slots.list.ord) .prompt .who{font-size:32px}
.slots.list.ord{gap:5px}
/* ===== v49 subject bookshelf (js/bookshelf.js v4; art img/bookshelf/<subject>.webp, upright 96x240).
   Spine-out books leaning 45deg right, no shelf board. The selected book straightens up, comes to the front and grows 15%,
   standing on the same line as the others; the rest move aside (--sx); the previous one leans back. No glow, borders or loops. ===== */
.bs-scroll{flex:none;overflow-x:auto;overflow-y:hidden;padding:0 8px 2px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.bs-scroll::-webkit-scrollbar{display:none}
.bs-stage{position:relative;isolation:isolate;min-width:344px;overflow-x:clip}
.bs-book{position:absolute;aspect-ratio:96/240;border:0;padding:0;margin:0;background:none;cursor:pointer;-webkit-tap-highlight-color:transparent;
  transform:translateX(var(--sx,0%)) translateY(0) scale(1) rotate(45deg);transition:transform .45s cubic-bezier(.4,0,.2,1),filter .45s;filter:drop-shadow(1px 2px 1.5px rgba(50,25,110,.28))}
.bs-book img{display:block;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;user-select:none}
.bs-book.sel{z-index:30!important;transform:translateX(0%) translateY(var(--up,-7%)) scale(1.15) rotate(0deg);filter:drop-shadow(0 6px 6px rgba(40,15,100,.38))}
.bs-book:focus{outline:none}.bs-book:focus-visible{outline:2px solid #fff;outline-offset:2px;z-index:31!important}
.learn2 .bs-scroll{margin-top:2px}
/* v47 selected subject heading above the shelf */
.learn2 .subj-head{flex:none;margin:2px 0 0;padding:0 16px;font-size:24px;line-height:1.15;font-weight:700;color:#fff;letter-spacing:.2px;text-shadow:0 2px 0 rgba(60,30,140,.35),0 3px 8px rgba(40,20,110,.25);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:360px){.learn2 .subj-head{font-size:21px;padding:0 12px}}
/* v51 Next button after a correct round (app.js api.done): bottom right, skips the rest of the narration */
.next-fab{position:absolute;right:16px;bottom:calc(18px + var(--safe-bot));z-index:40;min-width:132px;min-height:54px;padding:0 24px;border:0;border-radius:999px;
  background:linear-gradient(#5ed846,#2fa21f);box-shadow:0 5px 0 #1f7a12,0 8px 16px rgba(30,90,10,.25);color:#fff;font:inherit;font-size:21px;font-weight:700;letter-spacing:.3px;cursor:pointer;
  animation:nextIn .25s ease-out both}
.next-fab:active{transform:translateY(3px);box-shadow:0 2px 0 #1f7a12}
@keyframes nextIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* U9 demo: slim lockup fits beside coins and avatar, below device safe area. */
.f2-head{gap:clamp(4px,1.7vw,8px);padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
.f2-head .flogo{margin-left:0;flex:0 1 auto;min-width:0;display:flex;align-items:center}
.f2-head .flogo .logo-img{width:clamp(92px,30vw,132px);height:auto;max-width:100%;filter:none}
.f2-head .coin-chip,.f2-head .mini-av{flex-shrink:0}

/* U9 approved home lockup: prominent square gold mark, clean KIDS tiles. */
.f2-head{align-items:flex-start;padding-top:calc(14px + var(--safe-top));gap:clamp(4px,1.7vw,8px)}
.f2-head .flogo .logo-img{width:clamp(130px,46vw,180px);height:auto;max-width:100%}
.f2-head .coin-chip,.f2-head .mini-av{margin-top:3px}
.f2-head .flogo{flex:0 1 auto;min-width:0}
/* Glossy arcade adventure: four themed cards, no external art or audio. */
.fun-world{background:radial-gradient(ellipse at 12% 18%,#e1f5ff 0,transparent 43%),radial-gradient(ellipse at 98% 90%,#eddfff 0,transparent 45%),linear-gradient(150deg,#c8e6ff,#f0ebff 60%,#d6f4ea)}
.fun-world-scroll{padding:12px 14px 30px}
.fun-intro{display:flex;align-items:center;justify-content:center;gap:8px;text-align:center;margin:6px 0 20px;color:#211650}
.fun-intro h2{font-size:clamp(17px,5vw,25px);line-height:1.2;margin:0;font-weight:800}
.fun-spark{color:#d79514;font-size:22px}
.fun-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px;align-items:stretch}
.fun-tile{--light:#ff8ed1;--mid:#e64c99;--deep:#99246b;--halo:#ffe0f1;position:relative;isolation:isolate;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;min-width:0;min-height:208px;padding:10px 8px 31px;border:2px solid rgba(255,255,255,.9);border-radius:23px;background:linear-gradient(155deg,rgba(255,255,255,.37),transparent 38%),linear-gradient(155deg,var(--light),var(--mid) 60%,var(--deep));box-shadow:inset 0 2px 2px #ffffffa6,inset 0 -5px 0 #0002,0 6px 0 var(--deep),0 9px 12px #35206f26;color:#fff;overflow:hidden;text-align:center;cursor:pointer}
.fun-tile:active{transform:translateY(4px);box-shadow:inset 0 2px 2px #ffffffa6,0 2px 0 var(--deep)}
.fun-tile:focus-visible{outline:3px solid #251454;outline-offset:3px}
.fun-tile.theme-space{--light:#a88aff;--mid:#6947f2;--deep:#37209c;--halo:#e4d8ff}
.fun-tile.theme-jungle{--light:#9be779;--mid:#34ad72;--deep:#11654d;--halo:#e2ffbc}
.fun-tile.theme-ocean{--light:#73e1ff;--mid:#229ee9;--deep:#1950ab;--halo:#d7f9ff}
.fun-art{position:relative;display:grid;place-items:center;width:100%;height:100px;flex:none}
.fun-orbit{position:absolute;width:85px;height:85px;border-radius:50%;background:radial-gradient(circle,var(--halo),transparent 72%);opacity:.9}
.fun-art-icon{position:relative;font-size:60px;line-height:1;filter:drop-shadow(0 5px 3px #24174c55);transform:rotate(-7deg)}
.fun-art-spark{position:absolute;right:11%;top:9px;color:#fff3b6;font-size:24px;text-shadow:0 2px 2px #0002}
.fun-match-symbols{position:absolute;right:9%;bottom:10px;color:#fff9a4;font-size:23px;letter-spacing:3px;text-shadow:0 2px 2px #0004}
.fun-tile-copy{display:flex;flex-direction:column;gap:5px;align-items:center;flex:1}
.fun-tile-copy b{font-size:clamp(16px,4.6vw,23px);line-height:1.1;color:#fff;text-shadow:0 2px 1px #0004}
.fun-tile-copy small{font-size:clamp(11px,3.4vw,14px);line-height:1.25;color:#fff;max-width:100%}
.fun-play-dot{position:absolute;right:8px;bottom:8px;width:25px;height:25px;display:grid;place-items:center;border:1px solid #fff;border-radius:50%;background:linear-gradient(#fff,#e8e2ff);color:var(--deep);font-size:11px;box-shadow:0 2px 3px #0003}
@media(max-width:340px){.fun-world-scroll{padding-inline:9px}.fun-grid{gap:14px 8px}.fun-tile{min-height:190px}.fun-art{height:86px}.fun-art-icon{font-size:52px}}

/* U9 seasonal game lobby: foreground games, quiet winter landscape behind. */
.fun-xmas{background:linear-gradient(165deg,#729bdb,#c9e1fa 52%,#e5e9fb);isolation:isolate}
.fun-xmas::before{content:"";position:absolute;inset:0;z-index:-1;background:url('../img/fun/winter.svg') center/cover no-repeat;opacity:.88;pointer-events:none}
.fun-xmas-nav{display:flex;align-items:center;gap:7px;padding:calc(9px + var(--safe-top)) 10px 8px;background:linear-gradient(155deg,#512994,#372375);border-radius:0 0 20px 20px;box-shadow:0 4px 10px #2a20652e;flex:none}
.fun-xmas-nav .fun-xmas-brand{flex:0 1 auto;min-width:0}.fun-xmas-brand .logo-img{display:block;width:clamp(90px,31vw,132px);height:auto;max-width:100%}
.fun-xmas-nav .mini-av,.fun-xmas-nav .coin-chip,.fun-xmas-nav .icon-btn{flex-shrink:0}.fun-xmas-nav .mini-av{width:40px;height:40px}
.fun-xmas .fun-world-scroll{padding:8px 12px calc(22px + var(--safe-bot))}
.fun-xmas .fun-intro{display:flex;align-items:center;justify-content:center;gap:9px;height:clamp(74px,12vh,112px);margin:0 0 10px;text-align:center}
.fun-buddy{width:clamp(65px,23vw,100px);height:100%;flex:none}.fun-buddy .bud{max-width:100%;height:100%}
.fun-intro-copy{min-width:0}.fun-xmas .fun-intro h2{font-size:clamp(27px,8vw,42px);line-height:1.05;margin:0 0 5px;color:#fff7d8;text-shadow:0 2px 0 #8154bd,0 4px 0 #50328a,0 5px 8px #32478566;font-weight:800}
.fun-ribbon{display:inline-block;padding:5px 13px;border-radius:12px;color:#fff7d4;background:linear-gradient(#df635c,#a8323f);box-shadow:inset 0 1px 1px #ffe9c7,0 2px 0 #802337;border:1px solid #ffe2a2;font-size:clamp(12px,3.5vw,16px);font-weight:700}
.fun-xmas .fun-grid{gap:13px 10px;grid-template-columns:repeat(2,minmax(0,1fr))}
.fun-xmas .fun-tile{--light:#ff86cb;--mid:#e72b94;--deep:#a51d73;--edge:#ffcef0;min-height:clamp(185px,28vh,290px);padding:8px 6px 10px;border:2px solid var(--edge);border-radius:24px;justify-content:center;background:radial-gradient(ellipse at 20% 0%,#ffffff80,transparent 45%),linear-gradient(155deg,var(--light),var(--mid) 58%,var(--deep));box-shadow:inset 0 0 0 2px #ffffff70,inset 0 -6px 9px #0003,0 5px 0 var(--deep),0 8px 13px #293b774d}
.fun-xmas .fun-tile::before{content:"";position:absolute;inset:5px;border:1px solid #ffffff65;border-radius:18px;pointer-events:none}
.fun-xmas .fun-tile::after{content:"";position:absolute;top:10px;left:13px;width:34px;height:7px;border-radius:50%;transform:rotate(-25deg);background:#ffffffa8;filter:blur(1px);pointer-events:none}
.fun-xmas .theme-space{--light:#c3a2ff;--mid:#873ff5;--deep:#4920b9;--edge:#e8cfff}
.fun-xmas .theme-jungle{--light:#9af487;--mid:#1cba57;--deep:#08703e;--edge:#daffb9}
.fun-xmas .theme-ocean{--light:#8deaff;--mid:#079feb;--deep:#075caa;--edge:#c3f6ff}
.fun-art-image{display:block;width:100%;height:clamp(80px,14vh,147px);object-fit:contain;filter:drop-shadow(0 5px 3px #0003);flex:none}
.fun-xmas .fun-tile-copy{flex:0;gap:3px;margin:3px 0 7px}
.fun-xmas .fun-tile-copy b{font-size:clamp(17px,4.7vw,25px);line-height:1.08;text-shadow:0 2px 2px #0005}
.fun-xmas .fun-tile-copy small{color:#fff8bc;font-size:clamp(11px,3.3vw,14px);font-weight:700;line-height:1.2}
.fun-go-gold{display:grid;place-items:center;width:52px;height:30px;border-radius:18px;border:2px solid #fff0a2;background:linear-gradient(#fff78c,#ffca19 55%,#e99400);box-shadow:0 3px 0 #b96e09,0 4px 6px #0004;color:#5925a8;font-size:17px;line-height:1;margin-top:auto;flex:none}
@media(max-width:340px){.fun-xmas-nav{gap:4px;padding-inline:6px}.fun-xmas .fun-world-scroll{padding-inline:8px}.fun-xmas .fun-grid{gap:11px 7px}.fun-xmas .fun-tile{min-height:180px}.fun-xmas .fun-tile-copy b{font-size:16px}}
@media(prefers-reduced-motion:reduce){.fun-xmas .fun-tile{transition:none}}

/* Rendered artwork from the approved U9 Christmas design, not CSS illustrations. */
.fun-rendered{background:linear-gradient(170deg,#35569d 0%,#7198d6 40%,#c0d5f3 100%);isolation:isolate}
.fun-rendered::before{opacity:1;background:url('../img/fun/rendered/snow-footer.webp?v=1') center bottom/100% auto no-repeat,radial-gradient(circle at 12% 9%,#fff 0 1.5px,transparent 2.5px),radial-gradient(circle at 84% 6%,#fff 0 1.5px,transparent 2.5px),radial-gradient(circle at 67% 15%,#ffffffcc 0 1px,transparent 2px),radial-gradient(circle at 30% 19%,#ffffffb0 0 1px,transparent 2px),radial-gradient(circle at 93% 30%,#ffffffa0 0 1.5px,transparent 2.5px),radial-gradient(circle at 5% 42%,#ffffffa0 0 1px,transparent 2px),radial-gradient(ellipse at 50% 0%,#5d7fd0 0,transparent 60%),linear-gradient(180deg,#3d5fa8 0%,#5a7cc4 30%,#8eaee4 62%,#c4d6f6 88%,#dbe6fb 100%)}
.fun-rendered .fun-xmas-nav{background:transparent;border-radius:0;box-shadow:none;padding:calc(8px + var(--safe-top)) 10px 4px;gap:6px}
.fun-rendered .fun-xmas-brand .logo-img{width:clamp(88px,32vw,144px);filter:drop-shadow(0 2px 3px #26337855)}
.fun-rendered .fun-world-scroll{padding:0 13px calc(38px + var(--safe-bot));min-height:0}
.fun-rendered .fun-intro{height:auto;min-height:0;aspect-ratio:3.65;gap:0;margin:2px 0 5px;align-items:center;justify-content:center;position:relative}
.fun-rendered .fun-buddy{width:31%;height:100%;align-self:stretch;position:relative;z-index:1}
.fun-rendered .fun-buddy .bud{height:100%;width:auto;max-width:100%}
.fun-heading-photo{display:block;width:66%;height:auto;max-height:100%;object-fit:contain;filter:drop-shadow(0 3px 5px #25336c33);}
.fun-rendered .fun-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 7px;align-items:start}
.fun-rendered .fun-tile.fun-photo{display:block;width:100%;min-width:0;min-height:0;height:auto;aspect-ratio:1.237;padding:0;margin:0;border:0;border-radius:13%;background:transparent;box-shadow:none;overflow:hidden;transition:transform .13s ease,filter .13s ease;filter:drop-shadow(0 4px 4px #23336735);touch-action:manipulation}
.fun-rendered .fun-tile.fun-photo::before,.fun-rendered .fun-tile.fun-photo::after{content:none;display:none}
.fun-card-photo{width:100%;height:100%;display:block;object-fit:fill;pointer-events:none;user-select:none;-webkit-user-drag:none}
.fun-rendered .fun-tile.fun-photo:active{transform:scale(.97);filter:brightness(1.08)}
.fun-rendered .fun-tile.fun-photo:focus-visible{outline:3px solid #ffda48;outline-offset:2px}
@media(min-width:500px){.fun-rendered .fun-world-scroll{padding-inline:20px}.fun-rendered .fun-grid{gap:12px 10px}}
@media(max-width:340px){.fun-rendered .fun-world-scroll{padding-inline:8px}.fun-rendered .fun-grid{gap:7px 5px}.fun-rendered .fun-xmas-nav{padding-inline:5px;gap:4px}}
@media(prefers-reduced-motion:reduce){.fun-rendered .fun-tile.fun-photo{transition:none}}


/* ================= v56 first run: Ginger asks the child's age + child landing (Impeccable onboard, 2026-11-29) ================= */
.hello{--hz:64%}
.hello-head{display:flex;align-items:center;justify-content:space-between;padding:calc(10px + var(--safe-top)) 14px 0;flex:none}
.hello-head .flogo .logo-img{height:clamp(34px,5.4vh,44px)}
.hello-say{width:48px;height:48px;border-radius:50%;border:0;background:#fff;display:grid;place-items:center;box-shadow:0 4px 0 #c9bbff,0 6px 12px rgba(40,20,120,.2);cursor:pointer}
.hello-say svg{width:26px;height:26px}
.hello-say:active{transform:translateY(3px);box-shadow:0 1px 0 #c9bbff}
.hello-hero{display:flex;align-items:flex-end;gap:2px;height:clamp(170px,30vh,250px);padding:0 14px 0 4px;flex:none}
.hello-bud{flex:none;height:100%;width:52%}
.hello-bubble{position:relative;margin-bottom:38%;padding:12px 16px;border-radius:24px;background:#fff;box-shadow:0 6px 0 #d9ccff,0 12px 22px rgba(40,20,120,.2);display:flex;flex-direction:column;gap:2px}
.hello-bubble::before{content:"";position:absolute;left:-10px;bottom:20px;width:22px;height:22px;background:#fff;transform:rotate(45deg);border-radius:4px}
.hello-bubble small{font-size:15px;font-weight:600;color:#5b44c4}
.hello-bubble b{font-size:clamp(20px,5.6vw,24px);font-weight:700;line-height:1.1;color:#2a1a6b}
.hello-ages{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:8px 16px 0;padding:14px;border-radius:28px;background:rgba(255,255,255,.55);flex:none}
.hello-n{height:clamp(52px,7.4vh,64px);border:0;border-radius:20px;background:#fff;color:#3b1f9e;font:inherit;font-size:clamp(24px,7vw,30px);font-weight:700;cursor:pointer;
  box-shadow:0 5px 0 #c9bbff,0 9px 16px rgba(60,30,160,.18);transition:transform .1s}
.hello-n.wide{grid-column:span 2}
.hello-n:active{transform:translateY(4px);box-shadow:0 1px 0 #c9bbff,0 3px 6px rgba(60,30,160,.18);background:#ffd23f;color:#3a2200}
.hello-grown{display:flex;align-items:center;gap:8px;margin:auto auto 6px;padding:10px 18px;min-height:44px;border:0;border-radius:999px;background:rgba(42,26,107,.84);color:#fff;font:inherit;font-size:15px;font-weight:600;cursor:pointer}
.hello-grown svg{width:18px;height:18px;flex:none}
.hello2 .hello-bubble.up{align-self:center;margin:10px 0 0;align-items:center;text-align:center;padding:12px 24px}
.hello-bubble.up::before{left:50%;bottom:-10px;margin-left:-11px}
.hello-bubble.up b{font-size:clamp(26px,7.4vw,30px)}.hello-bubble.up b span{color:#c76a00}
.hello-bubble.up small{font-size:18px}
.hello-cheer{position:relative;align-self:center;height:clamp(150px,27vh,230px);aspect-ratio:1;margin-top:14px;flex:none}
.hello-cheer::before{content:"";position:absolute;inset:6%;border-radius:50%;background:#ffe27a;opacity:.55}
.hello-cheer .hello-bud{position:relative;width:100%}
.hello-badge{position:absolute;right:-8%;top:6%;min-width:62px;height:62px;padding:0 8px;box-sizing:border-box;border-radius:31px;background:#ffd23f;color:#3a2200;display:grid;place-items:center;font-size:32px;font-weight:700;box-shadow:0 0 0 4px #fff,0 6px 12px rgba(120,70,0,.3)}
.hello-ready{display:flex;align-items:center;gap:12px;margin:16px 20px 0;padding:12px 14px;border-radius:22px;background:rgba(255,255,255,.85);font-size:16px;font-weight:600;line-height:1.2;color:#2a1a6b;flex:none}
.hello-subs{display:flex;flex:none}.hello-subs:empty{display:none}
.hello-subs img{width:44px;height:44px;border-radius:12px;background:#fff;object-fit:contain;box-shadow:0 0 0 2px #fff}
.hello-subs img+img{margin-left:-12px}
.hello-foot{margin-top:auto;padding:12px 20px 8px;display:flex;flex-direction:column;gap:12px;flex:none}
.hello-yes{display:flex;align-items:center;justify-content:center;gap:10px;height:66px;border:0;border-radius:999px;background:#36b324;color:#fff;font:inherit;font-size:26px;font-weight:700;cursor:pointer;box-shadow:0 6px 0 #1f7a12,0 12px 20px rgba(20,80,10,.3)}
.hello-yes svg{width:30px;height:30px}
.hello-yes:active{transform:translateY(4px);box-shadow:0 2px 0 #1f7a12}
.hello-oops{height:52px;border:0;border-radius:999px;background:#fff;color:#4a24b0;font:inherit;font-size:19px;font-weight:600;cursor:pointer;box-shadow:0 4px 0 #c9bbff}
/* landing: Ginger's tip, live-text Let's Learn, Keep playing tile */
.f2-tip{position:relative;margin:6px 0 0;padding:8px 12px;border-radius:16px;background:#fff;color:#2a1a6b;font-size:clamp(13px,3.6vw,15px);font-weight:600;line-height:1.2;box-shadow:0 4px 0 #d9ccff;max-width:100%}
.f2-tip::after{content:"";position:absolute;right:-8px;top:12px;width:16px;height:16px;background:#fff;transform:rotate(45deg);border-radius:3px}
.f2-learn-txt{display:flex;align-items:center;gap:14px;aspect-ratio:340/84;padding:0 4% 0 3.5%;box-sizing:border-box;border:0;border-radius:999px;background:linear-gradient(#ffe15a,#ffc928);color:#24135c;font:inherit;cursor:pointer;
  box-shadow:inset 0 -6px 0 #f0a800,0 7px 0 #d99500,0 14px 22px rgba(120,70,0,.28)}
.f2-learn-txt i{flex:none;height:72%;aspect-ratio:1;border-radius:50%;background:#fff;display:grid;place-items:center;box-shadow:0 3px 6px rgba(120,70,0,.25)}
.f2-learn-txt i svg{width:48%;height:48%;fill:#3b1f9e;margin-left:8%}
.f2-learn-txt b{font-size:clamp(24px,8.4vw,34px);font-weight:700;white-space:nowrap}
.f2-learn-txt:active{transform:translateY(4px);box-shadow:inset 0 -6px 0 #f0a800,0 3px 0 #d99500}
.f2-keep{aspect-ratio:170/172;display:flex;flex-direction:column;justify-content:space-between;padding:12px;box-sizing:border-box;border:0;border-radius:24px;background:linear-gradient(#ffffff,#f3efff);text-align:left;cursor:pointer;
  box-shadow:inset 0 -5px 0 #d7cbff,0 8px 14px rgba(80,50,160,.18)}
.kp-top{display:flex;justify-content:space-between;align-items:flex-start}
.kp-top img{width:58%;aspect-ratio:1;object-fit:contain}
.kp-emo{font-size:clamp(34px,10vw,48px);line-height:1}
.kp-go{width:30%;aspect-ratio:1;max-width:46px;border-radius:50%;background:#36b324;display:grid;place-items:center;box-shadow:0 0 0 3px #e2f6da}
.kp-go svg{width:46%;height:46%;fill:#fff;margin-left:8%}
.kp-txt{display:flex;flex-direction:column;gap:2px;min-width:0}
.kp-txt b{font-size:clamp(16px,4.8vw,20px);font-weight:700;line-height:1.05;color:#24135c}
.kp-txt small{font-size:clamp(12px,3.4vw,14px);font-weight:500;color:#4d3d94;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (prefers-reduced-motion:reduce){.hello-n,.hello-yes{transition:none}}
/* v57 first visit: one "Say hi to Ginger!" button unlocks sound, then the age numbers pop in */
.hello-ages.wait{display:none}
.hello-start{display:flex;align-items:center;justify-content:center;gap:14px;margin:14px 22px 0;height:clamp(76px,11vh,92px);border:0;border-radius:999px;background:linear-gradient(#ffe15a,#ffc928);color:#24135c;font:inherit;cursor:pointer;flex:none;
  box-shadow:inset 0 -6px 0 #f0a800,0 7px 0 #d99500,0 14px 22px rgba(120,70,0,.28);animation:hello-breathe 2.2s ease-in-out infinite}
.hello-start i{width:54px;height:54px;border-radius:50%;background:#fff;display:grid;place-items:center;flex:none}
.hello-start i svg{width:30px;height:30px}
.hello-start b{font-size:clamp(22px,6.6vw,28px);font-weight:700}
.hello-start:active{transform:translateY(4px);box-shadow:inset 0 -6px 0 #f0a800,0 3px 0 #d99500;animation:none}
@keyframes hello-breathe{0%,100%{transform:scale(1)}50%{transform:scale(1.04)}}
.hello-ages.popin .hello-n{animation:hello-pop .38s cubic-bezier(.3,1.5,.5,1) both}
.hello-ages.popin .hello-n:nth-child(2){animation-delay:.04s}.hello-ages.popin .hello-n:nth-child(3){animation-delay:.08s}.hello-ages.popin .hello-n:nth-child(4){animation-delay:.12s}
.hello-ages.popin .hello-n:nth-child(5){animation-delay:.16s}.hello-ages.popin .hello-n:nth-child(6){animation-delay:.2s}.hello-ages.popin .hello-n:nth-child(7){animation-delay:.24s}
.hello-ages.popin .hello-n:nth-child(8){animation-delay:.28s}.hello-ages.popin .hello-n:nth-child(9){animation-delay:.32s}.hello-ages.popin .hello-n:nth-child(10){animation-delay:.36s}
@keyframes hello-pop{from{opacity:0;transform:scale(.4)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.hello-start,.hello-ages.popin .hello-n{animation:none}}
/* v58 coin sheet for children: no price or account number (those are behind the grown-up gate) */
.coin-ask{display:flex;flex-direction:column;gap:2px;border-radius:16px;padding:10px 12px;margin:10px 0 12px;background:#f2edff;color:#3b2a85;font-size:15px;line-height:1.3}
.coin-ask b{font-size:16px;color:#2a1a6b}
.coin-gu{display:inline-flex;align-items:center}
/* v59 accessibility (Impeccable audit, 2026-11-30) */
/* one visible keyboard focus ring everywhere (yellow with a dark edge reads on purple, lilac and white) */
:focus-visible{outline:3px solid #ffd23f;outline-offset:2px;box-shadow:0 0 0 6px rgba(37,20,84,.85)}
.bs-book:focus-visible{outline:3px solid #ffd23f;outline-offset:2px}
/* the screen titles are now h1 (one per screen): keep their old look */
h1.f2-hi,h1.subj-head{margin:0}
.hello-bubble .hello-q{margin:0;font-size:clamp(20px,5.6vw,24px);font-weight:700;line-height:1.1;color:#2a1a6b}
/* contrast: "Pick your age to begin!" sits on a dark pill (was white on light sky, 3.4:1); empty age pill text darker (was 3.3:1);
   the yellow name gets a purple edge (was 2.9:1 against the sky) */
.f2-sub{align-self:flex-start;padding:5px 12px;border-radius:999px;background:rgba(37,20,84,.62);text-shadow:none}
.agepill.empty b{color:#4b2bb8}
.f2-hi span{text-shadow:0 0 0 #3b1f9e,1.5px 1.5px 0 #3b1f9e,-1.5px 1.5px 0 #3b1f9e,1.5px -1.5px 0 #3b1f9e,-1.5px -1.5px 0 #3b1f9e,0 4px 0 rgba(60,30,160,.35)}
/* v60 dead ends + naming (Impeccable harden/clarify, 2026-11-30) */
.empty-cta{display:flex;flex-direction:column;align-items:center;gap:14px;margin-top:30px;text-align:center}
.empty-cta .btn{min-width:200px}
.star-note{margin:2px 16px 8px;font-size:13px;font-weight:600;color:#4d3d94;text-align:center}
.coin-what{margin:6px 0 0;font-size:14px;font-weight:600;color:#4d3d94;text-align:center}
/* Home logo: actual golden square artwork, independent of the compact arcade header. */
.front2 .f2-head{align-items:flex-start;gap:clamp(4px,1.5vw,8px);padding:calc(15px + var(--safe-top)) 14px 0;flex:none}
.front2 .f2-head .u9-home-brand{display:flex;align-items:center;gap:clamp(4px,1.3vw,8px);flex:0 1 auto;min-width:0;margin:0}
.u9-home-gold{display:block;width:clamp(52px,17.5vw,96px);height:auto;aspect-ratio:1;flex:none;object-fit:contain;filter:drop-shadow(0 4px 5px #39207d55)}
.u9-home-kids{display:flex;align-items:center;gap:2px;min-width:0}
.u9-letter{display:grid;place-items:center;width:clamp(15px,5.2vw,29px);height:clamp(18px,6vw,33px);font-size:clamp(13px,4.3vw,24px);line-height:1;border-radius:5px;color:white;font-weight:800;border:1px solid #ffffff55;box-shadow:inset 0 2px 1px #ffffff66,inset 0 -3px 1px #0003,0 3px 4px #39207d66;text-shadow:0 1px 1px #0003}
.u9-letter-0{background:linear-gradient(#ffb24f,#f77c16)}.u9-letter-1{background:linear-gradient(#56e6b0,#05a885)}.u9-letter-2{background:linear-gradient(#5bd7ff,#078ce2)}.u9-letter-3{background:linear-gradient(#ff8cc6,#e63d87)}
.front2 .f2-head .coin-chip,.front2 .f2-head .mini-av{margin-top:2px}
.front2 .f2-head .coin-chip{padding:4px 9px 4px 5px;gap:4px}.front2 .f2-head .coin-img{width:24px;height:24px}
.front2 .f2-head .mini-av{width:clamp(42px,11vw,54px);height:clamp(42px,11vw,54px)}
.front2 .f2-greet{padding-top:clamp(6px,2vh,22px)}
@media(max-width:340px){.front2 .f2-head{padding-inline:8px}.u9-home-gold{width:53px}.u9-letter{width:15px;height:19px;font-size:13px}.front2 .f2-head .coin-chip{padding:3px 6px}.front2 .f2-head .coin-val{font-size:15px}}

/* ================= v55 edges (Impeccable adapt, 2026-11-29) ================= */
/* "Choose age" never breaks onto two lines; a touch smaller on the narrowest phones */
.agepill b{white-space:nowrap}
@media (max-width:374px){.f2-greet .agepill b{font-size:16px}.f2-greet .agepill{padding:6px 10px 6px 8px}}
/* the buddy's name tag (and its pencil, which hangs 12px past the tag) stays inside the screen */
.buddy-tag.f2-tag{right:22px}
/* buddy picker: the cards (and the chosen card's ring) keep a margin from both screen edges */
.custom .tabpanel{box-sizing:border-box;padding:4px 14px}
/* wide screens: the phone-width app sits in a deliberate frame on its own sky instead of flat lilac gutters */
@media (min-width:640px) and (min-height:640px){
  html,body{background:linear-gradient(180deg,#5b3fe0 0%,#8f7bff 42%,#c9bcff 75%,#e9e3ff 100%) fixed}
  #app{height:calc(100% - 48px);margin:24px auto;border-radius:34px;box-shadow:0 0 0 8px #2a1a6b,0 0 0 11px rgba(255,255,255,.35),0 28px 60px rgba(30,15,90,.4)}
}

.hello-tools{display:flex;align-items:center;gap:8px}
/* U9: Burmese lines run longer — Ginger's bubble hangs from the top of the hero so it never covers the language and speaker buttons */
.hello-hero{align-items:stretch}
.hello-hero .hello-bubble{align-self:flex-start;margin:4px 0 0;max-width:52%}
html[lang=my] .hello-bubble .hello-q{font-size:clamp(17px,4.8vw,20px);line-height:1.45}
html[lang=my] .hello-bubble small{font-size:13px;line-height:1.5}
