@font-face{font-family:'Fredoka';font-style:normal;font-weight:500;font-display:swap;src:url(../fonts/fredoka-latin-500-normal.woff2) format('woff2')}
@font-face{font-family:'Fredoka';font-style:normal;font-weight:600;font-display:swap;src:url(../fonts/fredoka-latin-600-normal.woff2) format('woff2')}
@font-face{font-family:'Fredoka';font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/fredoka-latin-700-normal.woff2) format('woff2')}
@font-face{font-family:'Nunito';font-style:normal;font-weight:600;font-display:swap;src:url(../fonts/nunito-latin-600-normal.woff2) format('woff2')}
@font-face{font-family:'Nunito';font-style:normal;font-weight:700;font-display:swap;src:url(../fonts/nunito-latin-700-normal.woff2) format('woff2')}
@font-face{font-family:'Nunito';font-style:normal;font-weight:800;font-display:swap;src:url(../fonts/nunito-latin-800-normal.woff2) format('woff2')}
:root{
  --ink:#221D45; --muted:#6E6A8E; --bg:#F4F1FF; --card:#FFFFFF; --line:#E6E1FA;
  --purple:#7C5CFF; --purple-d:#5B3FE0; --pink:#FF6B9A; --pink-d:#E04A7C;
  --teal:#14C2A3; --teal-d:#0E9C83; --yellow:#FFC93C; --yellow-d:#E3A600;
  --orange:#FF8A3D; --blue:#3D8BFF; --green:#22C38A; --green-d:#15A06F;
  --night1:#1B1446; --night2:#3A2A9E;
  --head:"Fredoka","Avenir Next Rounded","Nunito",system-ui,sans-serif;
  --body:"Nunito","Avenir Next",system-ui,sans-serif;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;min-height:100%}
body{font-family:var(--body);color:var(--ink);background:var(--bg);
  background-image:radial-gradient(#E3DCFF 1.2px,transparent 1.2px);background-size:22px 22px;
  -webkit-user-select:none;user-select:none;overflow-x:hidden}
button{font-family:inherit;border:0;background:none;color:inherit;cursor:pointer;touch-action:manipulation}
button:focus-visible{outline:4px solid var(--yellow);outline-offset:3px}
h1,h2,h3{font-family:var(--head);margin:0;letter-spacing:-.01em}
#app{max-width:980px;margin:0 auto;padding:16px 16px 40px;min-height:100vh}

/* ---------- buttons ---------- */
.btn{font-family:var(--head);font-weight:600;font-size:1.25rem;padding:14px 26px;border-radius:18px;
  background:var(--purple);color:#fff;box-shadow:0 5px 0 var(--purple-d);transition:transform .08s,box-shadow .08s;
  display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:56px}
.btn:active{transform:translateY(4px);box-shadow:0 1px 0 var(--purple-d)}
.btn.green{background:var(--green);box-shadow:0 5px 0 var(--green-d)}
.btn.green:active{box-shadow:0 1px 0 var(--green-d)}
.btn.white{background:#fff;color:var(--ink);box-shadow:0 5px 0 var(--line);border:2px solid var(--line)}
.btn.white:active{box-shadow:0 1px 0 var(--line)}
.btn.big{font-size:1.5rem;padding:18px 36px;min-height:68px;border-radius:22px}
.icon-btn{width:52px;height:52px;border-radius:16px;background:#fff;border:2px solid var(--line);box-shadow:0 4px 0 var(--line);
  display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
.icon-btn:active{transform:translateY(3px);box-shadow:0 1px 0 var(--line)}

/* ---------- title screen ---------- */
.night{position:fixed;inset:0;z-index:-1;background:linear-gradient(180deg,var(--night1) 0%,var(--night2) 70%,#6A4FD8 100%);overflow:hidden}
.night i{position:absolute;width:3px;height:3px;border-radius:50%;background:#fff;opacity:.8;animation:tw 3s infinite ease-in-out}
@keyframes tw{0%,100%{opacity:.25}50%{opacity:1}}
.title-wrap{min-height:calc(100vh - 56px);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#fff;gap:10px}
.title-wrap h1{font-size:clamp(2.6rem,8vw,4.4rem);font-weight:700;line-height:1}
.title-wrap .sub{font-family:var(--head);font-size:clamp(1.1rem,3.4vw,1.5rem);color:#CFC4FF;font-weight:500}
.moon{width:92px;height:92px;margin-bottom:6px;animation:float 4s ease-in-out infinite}
@keyframes float{0%,100%{transform:translateY(0)}50%{transform:translateY(-8px)}}
.pick-label{margin-top:26px;font-family:var(--head);font-size:1.3rem;font-weight:600}
.pick-row{display:flex;gap:18px;flex-wrap:wrap;justify-content:center;margin-top:12px}
.pick{width:200px;background:rgba(255,255,255,.1);border:3px solid rgba(255,255,255,.18);border-radius:28px;padding:18px 14px 16px;
  color:#fff;transition:transform .15s,background .15s;backdrop-filter:blur(6px)}
.pick:hover{transform:translateY(-4px);background:rgba(255,255,255,.16)}
.pick:active{transform:scale(.97)}
.pick .av{width:120px;height:120px;margin:0 auto 10px}
.pick .nm{font-family:var(--head);font-size:1.45rem;font-weight:600}
.pick .st{font-size:.95rem;color:#CFC4FF;font-weight:700;margin-top:2px}
.title-foot{margin-top:28px}
.ghost{color:#CFC4FF;font-weight:800;font-size:.95rem;padding:10px 16px;border-radius:12px}

/* ---------- map ---------- */
.topbar{display:flex;align-items:center;gap:12px;margin-bottom:16px}
.who{display:flex;align-items:center;gap:10px;background:#fff;border:2px solid var(--line);border-radius:999px;padding:5px 16px 5px 5px;box-shadow:0 4px 0 var(--line)}
.who .av{width:44px;height:44px}
.who b{font-family:var(--head);font-weight:600;font-size:1.1rem}
.spacer{flex:1}
.sky{position:relative;border-radius:28px;overflow:hidden;background:linear-gradient(120deg,var(--night1),var(--night2));color:#fff;
  padding:22px 24px;margin-bottom:22px;min-height:132px;box-shadow:0 10px 30px -12px rgba(43,28,140,.5)}
.sky .s{position:absolute;opacity:.18;transition:opacity .6s}
.sky .s.lit{opacity:1;filter:drop-shadow(0 0 6px #FFE58A)}
.sky-text{position:relative;z-index:1;max-width:520px}
.sky-text h2{font-size:1.6rem;font-weight:600}
.sky-text p{margin:6px 0 12px;color:#D6CCFF;font-weight:700}
.meter{height:14px;background:rgba(255,255,255,.18);border-radius:999px;overflow:hidden;max-width:360px}
.meter span{display:block;height:100%;background:linear-gradient(90deg,#FFE27A,#FFC93C);border-radius:999px;transition:width .8s}
.grade-h{display:flex;align-items:center;gap:10px;margin:22px 4px 12px}
.grade-h h3{font-size:1.25rem;font-weight:600}
.grade-chip{font-family:var(--head);font-weight:600;font-size:.85rem;padding:4px 12px;border-radius:999px;color:#fff}
.worlds{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:16px}
.world{background:#fff;border-radius:26px;border:2px solid var(--line);box-shadow:0 6px 0 var(--line);overflow:hidden;display:flex;flex-direction:column}
.world-art{height:104px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;position:relative}
.world-art .ic{width:76px;height:76px;filter:drop-shadow(0 6px 10px rgba(0,0,0,.15))}
.world-art .nm{font-family:var(--head);font-weight:600;font-size:1.4rem;color:#fff;text-shadow:0 2px 0 rgba(0,0,0,.12);max-width:60%;line-height:1.1}
.world-body{padding:12px 16px 16px}
.world-skill{font-weight:800;color:var(--muted);font-size:.95rem;margin-bottom:10px}
.lvls{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.lvl{border-radius:16px;padding:6px 4px 5px;background:var(--bg);border:2px solid var(--line);display:flex;flex-direction:column;align-items:center;gap:2px;min-height:56px}
.lvl .n{font-family:var(--head);font-weight:600;font-size:1.25rem}
.lvl .stars{display:flex;gap:1px}
.lvl.open{background:#fff;box-shadow:0 4px 0 var(--line)}
.lvl.open:active{transform:translateY(3px);box-shadow:0 1px 0 var(--line)}
.lvl.next{border-color:var(--purple);box-shadow:0 4px 0 var(--purple);animation:pulse 1.8s infinite}
@keyframes pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.05)}}
.lvl.locked{opacity:.5;cursor:default}

/* ---------- dialogue ---------- */
.dlg{min-height:calc(100vh - 56px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;text-align:center}
.dlg .who-big{width:170px;height:170px;animation:pop .35s cubic-bezier(.3,1.6,.6,1)}
.bubble{background:#fff;border-radius:28px;padding:22px 26px;max-width:600px;font-family:var(--head);font-size:clamp(1.3rem,3.6vw,1.75rem);
  font-weight:500;line-height:1.3;border:2px solid var(--line);box-shadow:0 8px 0 var(--line);position:relative}
.bubble .sp{display:block;font-size:.95rem;font-weight:600;color:var(--purple);margin-bottom:6px;text-transform:uppercase;letter-spacing:.06em}
.dots{display:flex;gap:8px}
.dots i{width:10px;height:10px;border-radius:50%;background:var(--line)}
.dots i.on{background:var(--purple)}
.dlg-actions{display:flex;gap:12px;align-items:center}
@keyframes pop{0%{transform:scale(.6);opacity:0}100%{transform:scale(1);opacity:1}}

/* ---------- play ---------- */
.play-top{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.prog{flex:1;display:flex;gap:6px}
.prog i{flex:1;height:14px;border-radius:999px;background:#fff;border:2px solid var(--line)}
.prog i.done{background:var(--green);border-color:var(--green)}
.prog i.cur{background:var(--yellow);border-color:var(--yellow)}
.world-tag{font-family:var(--head);font-weight:600;font-size:.95rem;color:var(--muted)}
.qcard{background:#fff;border-radius:30px;border:2px solid var(--line);box-shadow:0 8px 0 var(--line);padding:20px;margin-bottom:18px}
.qhead{display:flex;align-items:center;gap:14px}
.qtext{font-family:var(--head);font-weight:600;font-size:clamp(1.3rem,3.6vw,1.8rem);line-height:1.25;flex:1}
.speak{width:60px;height:60px;border-radius:20px;background:var(--purple);box-shadow:0 5px 0 var(--purple-d);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.speak:active{transform:translateY(4px);box-shadow:0 1px 0 var(--purple-d)}
.speak.talking{animation:pulse 1s infinite}
.visual{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;margin-top:16px;min-height:120px;padding:16px;background:var(--bg);border-radius:22px}
.eq{font-family:var(--head);font-weight:700;font-size:clamp(2.2rem,7vw,3.2rem);letter-spacing:.02em}
.eq .q{color:var(--purple);display:inline-block;min-width:1ch}
.objs{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;max-width:600px}
.obj{position:relative;display:inline-flex;align-items:center;justify-content:center;border-radius:16px;padding:2px}
.obj.tap{background:#fff;border:2px solid var(--line);box-shadow:0 4px 0 var(--line);padding:6px}
.obj.tap.on{background:#FFF6D6;border-color:var(--yellow);box-shadow:0 4px 0 var(--yellow-d)}
.obj .num{position:absolute;top:-10px;right:-10px;width:28px;height:28px;border-radius:50%;background:var(--purple);color:#fff;font-family:var(--head);
  font-weight:600;font-size:1rem;display:none;align-items:center;justify-content:center;border:2px solid #fff}
.obj.on .num{display:flex;animation:pop .25s}
.obj.gone{opacity:.35}
.obj.gone::after{content:"";position:absolute;inset:6px;background:linear-gradient(45deg,transparent 45%,#FF5A5F 45%,#FF5A5F 55%,transparent 55%)}
.plus{font-family:var(--head);font-weight:700;font-size:2.4rem;color:var(--muted);align-self:center}
.row-flex{display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap}
.tf-wrap{display:flex;gap:14px;flex-wrap:wrap;justify-content:center}
.tf{display:grid;grid-template-columns:repeat(5,50px);grid-template-rows:repeat(2,50px);gap:5px;background:#fff;padding:7px;border-radius:16px;border:2px solid var(--line)}
.tf i{border-radius:12px;background:var(--bg);display:flex;align-items:center;justify-content:center;position:relative}
.tf i b{width:34px;height:34px;border-radius:50%}
.tf i.x b{opacity:.3}
.tf i.x::after{content:"✕";position:absolute;color:#FF5A5F;font-weight:900;font-size:1.6rem;font-family:var(--head)}
.tf i.empty{background:#EFEAFF;outline:2px dashed #C9BCFF;outline-offset:-5px}
.blocks{display:flex;align-items:flex-end;gap:22px;flex-wrap:wrap;justify-content:center}
.rods{display:flex;gap:6px;align-items:flex-end;flex-wrap:wrap;max-width:330px;justify-content:center}
.rod{width:20px;display:flex;flex-direction:column;gap:2px;padding:2px;background:var(--blue);border-radius:6px}
.rod span{height:11px;background:#7FB2FF;border-radius:2px}
.ones{display:grid;grid-template-columns:repeat(3,22px);gap:4px}
.ones span{width:22px;height:22px;background:var(--orange);border-radius:5px;box-shadow:inset 0 -3px 0 rgba(0,0,0,.15)}
.stones{display:flex;gap:10px;align-items:center;flex-wrap:wrap;justify-content:center}
.stone{width:72px;height:72px;border-radius:22px;background:#fff;border:3px solid var(--line);display:flex;align-items:center;justify-content:center;
  font-family:var(--head);font-weight:700;font-size:1.8rem}
.stone.q{border-color:var(--purple);color:var(--purple);border-style:dashed}
.groups{display:flex;gap:12px;flex-wrap:wrap;justify-content:center}
.plate{background:#fff;border:3px solid var(--line);border-radius:50%;width:112px;height:112px;display:flex;flex-wrap:wrap;align-content:center;justify-content:center;gap:2px;padding:12px}
.arr{display:grid;gap:4px}
.coins{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;align-items:center}
.frac{display:inline-flex;flex-direction:column;align-items:center;line-height:1;font-family:var(--head);font-weight:700}
.frac span:first-child{border-bottom:4px solid currentColor;padding:0 6px 3px}
.frac span:last-child{padding-top:3px}

.choices{display:grid;grid-template-columns:repeat(var(--n,4),1fr);gap:14px}
.choice{background:#fff;border:3px solid var(--line);border-radius:24px;box-shadow:0 6px 0 var(--line);min-height:96px;padding:10px;
  font-family:var(--head);font-weight:700;font-size:clamp(1.9rem,6vw,2.6rem);display:flex;align-items:center;justify-content:center;transition:transform .08s}
.choice:active{transform:translateY(5px);box-shadow:0 1px 0 var(--line)}
.choice.words{font-size:clamp(1.3rem,4vw,1.7rem)}
.choice.tile{min-height:150px}
.choice.correct{background:#E3FBF1;border-color:var(--green);box-shadow:0 6px 0 var(--green-d);color:var(--green-d);animation:pop .3s}
.choice.wrong{background:#FFF0F1;border-color:#FFB4B7;box-shadow:0 6px 0 #FFB4B7;opacity:.55;animation:shake .35s}
@keyframes shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-8px)}75%{transform:translateX(8px)}}
.hint{display:flex;gap:14px;align-items:center;background:#FFF8E1;border:2px solid #FFE08A;border-radius:24px;padding:14px 16px;margin-top:16px;animation:pop .3s}
.hint .av{width:64px;height:64px;flex-shrink:0}
.hint p{margin:0;font-weight:800;font-size:1.1rem;line-height:1.35}
.hint b{font-family:var(--head);font-weight:600;color:var(--orange);display:block;font-size:.95rem}

/* ---------- complete ---------- */
.done-wrap{min-height:calc(100vh - 56px);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:16px}
.done-avs{display:flex;gap:4px}
.done-avs .av{width:130px;height:130px;animation:bounce 1s ease-in-out infinite}
.done-avs .av:last-child{animation-delay:.2s}
@keyframes bounce{0%,100%{transform:translateY(0)}50%{transform:translateY(-12px)}}
.big-stars{display:flex;gap:10px;align-items:flex-end}
.big-stars svg{animation:pop .5s cubic-bezier(.3,1.6,.6,1) both}
.big-stars svg:nth-child(2){animation-delay:.25s;margin-bottom:16px}
.big-stars svg:nth-child(3){animation-delay:.5s}
.done-wrap h2{font-size:clamp(2rem,6vw,2.8rem);font-weight:700}
.done-wrap p{font-size:1.2rem;font-weight:800;color:var(--muted);margin:0}
.done-actions{display:flex;gap:14px;flex-wrap:wrap;justify-content:center;margin-top:8px}

/* ---------- grown-ups ---------- */
.panel{background:#fff;border-radius:26px;border:2px solid var(--line);box-shadow:0 6px 0 var(--line);padding:20px;margin-bottom:16px}
.panel h3{font-size:1.25rem;font-weight:600;margin-bottom:10px}
.panel p,.panel li{color:var(--muted);font-weight:700;line-height:1.45}
.field{display:flex;flex-direction:column;gap:6px;margin:14px 0}
.field label{font-weight:800}
select,input[type=range]{font-family:var(--body);font-size:1rem;font-weight:700}
select{padding:12px;border-radius:14px;border:2px solid var(--line);background:#fff;color:var(--ink);width:100%}
input[type=range]{width:100%;accent-color:var(--purple)}
.toggles{display:flex;gap:10px;flex-wrap:wrap}
.chip{font-weight:800;padding:10px 16px;border-radius:999px;border:2px solid var(--line);background:#fff}
.chip.on{background:var(--purple);color:#fff;border-color:var(--purple)}
.hold{position:relative;overflow:hidden}
.hold .fill{position:absolute;left:0;top:0;bottom:0;width:0;background:rgba(255,255,255,.35)}
.hold.holding .fill{width:100%;transition:width 1.4s linear}
.gate{min-height:calc(100vh - 56px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;text-align:center}
.skill-list{columns:2;column-gap:28px;padding-left:18px;margin:0}
@media (max-width:640px){
  .skill-list{columns:1}
  .tf{grid-template-columns:repeat(5,40px);grid-template-rows:repeat(2,40px)}
  .tf i b{width:26px;height:26px}
  .choices{gap:10px}
  .choice{min-height:84px}
  .dlg .who-big{width:140px;height:140px}
}

/* confetti */
.cf{position:fixed;width:12px;height:12px;border-radius:3px;pointer-events:none;z-index:50;animation:cf .95s ease-out forwards}
@keyframes cf{0%{transform:translate(0,0) rotate(0);opacity:1}100%{transform:translate(var(--x),var(--y)) rotate(var(--r));opacity:0}}

/* ================= 3D KINGDOM ================= */
#gl{position:fixed;inset:0;width:100%;height:100%;display:none;touch-action:none;z-index:0;background:#5d4fb0}
body.world{overflow:hidden;background:#1B1446}
body.world #gl{display:block}
body.world #app{display:none}
#hud{position:fixed;inset:0;pointer-events:none;z-index:10;display:none;
  padding:max(12px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left))}
body.world #hud{display:block}
.hud-row{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.hud-left{display:flex;flex-direction:column;gap:8px;max-width:min(420px,62vw)}
.hud-card{pointer-events:auto;display:flex;align-items:center;gap:10px;background:rgba(255,255,255,.94);border-radius:22px;padding:6px 14px 6px 6px;
  box-shadow:0 6px 0 rgba(34,29,69,.18);border:2px solid #fff;width:fit-content}
.hud-card .av{width:48px;height:48px;flex-shrink:0}
.hud-card .t1{font-family:var(--head);font-weight:600;font-size:1.1rem;line-height:1.1}
.hud-card .t2{font-weight:800;font-size:.85rem;color:var(--muted);display:flex;gap:10px;align-items:center;margin-top:2px}
.hud-card .t2 span{display:inline-flex;align-items:center;gap:3px}
.bubble3d{pointer-events:none;display:none;align-items:center;gap:10px;background:#fff;border-radius:20px;padding:8px 12px 8px 8px;
  box-shadow:0 8px 24px rgba(20,10,60,.35);animation:pop .25s;max-width:420px}
.bubble3d.show{display:flex}
.bubble3d .av{width:54px;height:54px;flex-shrink:0}
.bubble3d b{font-family:var(--head);font-weight:600;color:var(--purple);font-size:.9rem;display:block}
.bubble3d p{margin:0;font-weight:800;font-size:1rem;line-height:1.3}
.hud-right{display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.hud-btns{display:flex;gap:8px;pointer-events:auto;flex-wrap:wrap;justify-content:flex-end}
.hbtn{height:48px;min-width:48px;padding:0 12px;border-radius:16px;background:#fff;box-shadow:0 4px 0 rgba(34,29,69,.25);display:inline-flex;align-items:center;justify-content:center;gap:6px;
  font-family:var(--head);font-weight:600;font-size:1rem}
.hbtn:active{transform:translateY(3px);box-shadow:0 1px 0 rgba(34,29,69,.25)}
.hbtn.on{background:var(--purple);color:#fff;box-shadow:0 4px 0 var(--purple-d)}
.realm-chips{display:flex;flex-direction:column;align-items:flex-end;gap:6px;pointer-events:auto;position:relative;z-index:6}
.realm-chips .hbtn{height:44px;min-width:46px;font-size:.95rem}
.realm-chips .rtoggle{gap:7px;padding:0 12px}
.realm-chips .rtoggle .chev{transition:transform .2s}
.realm-chips.open .rtoggle .chev{transform:rotate(180deg)}
.realm-chips .rlist{position:absolute;top:46px;right:0;display:flex;flex-direction:column;gap:6px;background:rgba(255,255,255,.35);padding:6px;border-radius:18px;backdrop-filter:blur(6px)}
.realm-chips .rlist .hbtn{justify-content:flex-start;min-width:130px}
.realm-chips .rlist i{width:12px;height:12px;border-radius:50%;display:inline-block}
#mini{width:150px;height:150px;border-radius:50%;border:4px solid #fff;box-shadow:0 6px 18px rgba(20,10,60,.35);background:#2A1F6B;pointer-events:auto}
.hud-bottom{position:absolute;left:0;right:0;bottom:max(14px,env(safe-area-inset-bottom));display:flex;justify-content:center;pointer-events:none}
.next-pill{pointer-events:auto;display:flex;align-items:center;gap:10px;background:#fff;color:var(--ink);border:2px solid var(--line);border-radius:999px;padding:7px 18px 7px 8px;
  font-family:var(--head);font-weight:600;font-size:1rem;box-shadow:0 5px 0 rgba(34,29,69,.16)}
#labels{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.zlabel{position:absolute;left:0;top:0;display:flex;align-items:center;gap:7px;background:#fff;border-radius:999px;padding:5px 12px 5px 6px;font-family:var(--head);font-weight:600;font-size:15px;
  color:var(--ink);box-shadow:0 4px 0 rgba(34,29,69,.18);white-space:nowrap;will-change:transform}
.zlabel i{width:22px;height:22px;border-radius:50%;display:block}
.zlabel span{color:var(--muted);font-size:13px}
.zlabel.next{background:var(--yellow);box-shadow:0 4px 0 var(--yellow-d)}
.chestlabel{position:absolute;left:0;top:0;background:var(--purple);color:#fff;font-family:var(--head);font-weight:600;font-size:15px;border-radius:14px;padding:6px 12px;white-space:nowrap;
  box-shadow:0 4px 0 var(--purple-d);animation:bob 1.2s ease-in-out infinite}
@keyframes bob{0%,100%{margin-top:0}50%{margin-top:-6px}}
.ask-sis{position:absolute;right:max(14px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));pointer-events:auto;display:flex;align-items:center;gap:8px;background:#fff;border:3px solid var(--pink);
  border-radius:999px;padding:4px 16px 4px 4px;font-family:var(--head);font-weight:600;font-size:1.05rem;box-shadow:0 5px 0 var(--pink-d)}
.ask-sis .av{width:52px;height:52px}
.ask-sis:active{transform:translateY(3px);box-shadow:0 2px 0 var(--pink-d)}
.ask-sis.nudge{animation:pulse 1.2s infinite}
.wardrobe{position:absolute;right:max(14px,env(safe-area-inset-right));top:120px;width:min(360px,92vw);background:#fff;border-radius:26px;border:2px solid var(--line);box-shadow:0 10px 30px rgba(34,29,69,.25);
  padding:16px;pointer-events:auto;display:none;z-index:20}
.wardrobe.show{display:block;animation:pop .25s}
.wardrobe h3{font-size:1.25rem;font-weight:600;margin-bottom:4px}
.wardrobe p{margin:0 0 12px;color:var(--muted);font-weight:700;font-size:.92rem}
.dresses{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.dress{display:flex;flex-direction:column;align-items:center;gap:4px;border-radius:16px;border:2px solid var(--line);padding:8px 4px;background:#fff;font-weight:800;font-size:.72rem;color:var(--muted)}
.dress.on{border-color:var(--purple);box-shadow:0 0 0 3px #E5DEFF}
.dress.locked{opacity:.55}
.dress .sw{width:40px;height:44px}
.next-pill .dot{width:30px;height:30px;border-radius:50%;background:var(--yellow);display:flex;align-items:center;justify-content:center}
.help-pill{position:absolute;left:max(14px,env(safe-area-inset-left));bottom:max(14px,env(safe-area-inset-bottom));pointer-events:none;
  background:rgba(27,20,70,.7);color:#E6DFFF;font-weight:700;font-size:.82rem;border-radius:14px;padding:8px 12px;max-width:260px;line-height:1.35}
#joy{position:fixed;left:0;bottom:0;width:46%;height:52%;z-index:9;touch-action:none;display:none}
body.world.touch #joy{display:block}
body.touch .help-pill{display:none}
.help-pill{transition:opacity .8s}.help-pill.gone{opacity:0}
.ztoast.low{top:44%}
#joyBase{position:absolute;width:130px;height:130px;border-radius:50%;left:max(26px,env(safe-area-inset-left));bottom:max(30px,calc(env(safe-area-inset-bottom) + 20px));
  background:rgba(255,255,255,.18);border:3px solid rgba(255,255,255,.7);pointer-events:none}
#joyKnob{position:absolute;left:50%;top:50%;width:58px;height:58px;margin:-29px 0 0 -29px;border-radius:50%;background:#fff;box-shadow:0 4px 12px rgba(0,0,0,.35)}
.ztoast{position:fixed;top:20%;left:50%;transform:translate(-50%,-10px);z-index:12;text-align:center;opacity:0;transition:opacity .5s,transform .5s;pointer-events:none}
.ztoast.show{opacity:1;transform:translate(-50%,0)}
.ztoast .a{font-family:var(--head);font-weight:700;font-size:clamp(1.8rem,5vw,2.8rem);color:#fff;text-shadow:0 3px 0 rgba(43,28,140,.6),0 0 24px rgba(255,201,60,.6)}
.ztoast .b{font-weight:800;color:#fff;text-shadow:0 2px 8px rgba(0,0,0,.6);margin-top:4px}
.nogl{position:fixed;inset:0;display:none}
@media (max-width:700px),(max-height:520px){
  #mini{width:104px;height:104px}
  .hud-card .t1{font-size:.95rem}
  .hud-card .av{width:44px;height:44px}
  .bubble3d p{font-size:.9rem}
  .bubble3d .av{width:44px;height:44px}
  .next-pill{font-size:.82rem}
  .hbtn .lbl{display:none}
}
@media (max-width:700px),(max-height:520px){.ask-sis span:not(.av){display:none}.ask-sis{padding:4px}.zlabel{font-size:13px}}
/* grown-up unlock + voice pickers */
.unlock-card{display:flex;flex-wrap:wrap;align-items:center;gap:12px;background:#2A1F6B;color:#fff;border-radius:20px;padding:14px 16px;margin:12px 0}
.unlock-card>div{flex:1;min-width:180px;display:flex;flex-direction:column;gap:2px}
.unlock-card b{font-family:var(--head);font-weight:600;font-size:1.05rem}
.unlock-card span{opacity:.85;font-weight:700;font-size:.92rem}
.unlock-card .btn{flex:0 0 auto}
.unlock-box{position:absolute;left:50%;bottom:90px;transform:translateX(-50%);width:min(460px,92vw);display:none;pointer-events:auto;z-index:8}
.unlock-box.show{display:block}
.unlock-box .ub-x{position:absolute;right:-6px;top:-4px;width:36px;height:36px;z-index:2}
.pill-gu{margin-left:8px;background:#2A1F6B;color:#fff;border-radius:999px;padding:3px 10px;font-size:.8rem}
.vpick{display:flex;flex-direction:column;gap:8px}
.vrow{display:grid;grid-template-columns:40px 72px 1fr 110px auto;align-items:center;gap:8px}
.vrow .vav{width:40px;height:40px}
.vrow select{min-width:0;height:40px;border-radius:12px;border:2px solid var(--line);padding:0 8px;font:inherit;font-weight:700;background:#fff}
@media (max-width:620px){.vrow{grid-template-columns:40px 1fr 104px;grid-template-areas:"a n t" "v v p";row-gap:6px;padding-bottom:6px;border-bottom:1px solid var(--line)}.vrow .vav{grid-area:a}.vrow b{grid-area:n}.vrow .chip{grid-area:t;justify-self:end}.vrow select[data-vwho]{grid-area:v}.vrow select[data-vpitch]{grid-area:p}}
/* numerals, quick looks */
.tray{display:inline-flex;gap:6px;align-items:center;padding:10px 16px;background:#fff;border:3px solid var(--line);border-radius:18px;box-shadow:0 4px 0 rgba(34,29,69,.08)}
.flash-cover .peek{pointer-events:auto;height:44px;padding:0 18px;font-size:1rem}
.digit-draw .ink{stroke-dasharray:100;stroke-dashoffset:100;animation:drawdig 1.5s ease-in-out forwards;animation-delay:var(--d,0ms)}
@keyframes drawdig{to{stroke-dashoffset:0}}
.flash-wrap{position:relative;display:inline-block;min-width:150px;min-height:120px}
.flash{animation:flashout .35s ease forwards;animation-delay:1.7s}
.flash-cover{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-family:var(--head);font-weight:600;color:var(--muted);opacity:0;animation:flashin .35s ease forwards;animation-delay:1.9s;pointer-events:none}
@keyframes flashout{to{opacity:0;transform:scale(.85)}}
@keyframes flashin{to{opacity:1}}
/* extra lesson visuals */
.flat{width:66px;height:66px;background-color:#3D8BFF;border-radius:6px;background-image:linear-gradient(#7FB2FF 1px,transparent 1px),linear-gradient(90deg,#7FB2FF 1px,transparent 1px);background-size:6.4px 6.4px;border:2px solid #1F5FD0}
.flats{display:flex;gap:6px;flex-wrap:wrap;max-width:300px;justify-content:center}
.bar{height:30px;border-radius:15px}
.bars{display:flex;flex-direction:column;gap:14px;align-items:flex-start;width:100%;max-width:520px}
.cubes{display:flex;gap:2px}
.cubes span{width:36px;height:36px;background:var(--orange);border-radius:5px;box-shadow:inset 0 -4px 0 rgba(0,0,0,.15)}
.towers{display:flex;align-items:flex-end;gap:10px}
.towers .tw{display:flex;flex-direction:column-reverse;gap:2px}
.towers .tw span{width:30px;height:20px;border-radius:4px}
.graph{display:grid;grid-template-columns:auto 1fr;gap:8px 12px;align-items:center;background:#fff;padding:12px 16px;border-radius:16px;border:2px solid var(--line)}
.graph .lab{font-family:var(--head);font-weight:600;font-size:1.1rem}
.graph .row{display:flex;gap:4px}
.cmp{display:flex;align-items:center;gap:18px;font-family:var(--head);font-weight:700;font-size:clamp(2.4rem,8vw,3.4rem)}
.cmp .blank{width:72px;height:72px;border:4px dashed var(--purple);border-radius:18px;display:inline-block}
.choice .sym{font-size:clamp(2.4rem,8vw,3.2rem)}
.pairs{display:grid;grid-template-rows:repeat(2,auto);grid-auto-flow:column;gap:6px}
.pairs b{width:30px;height:30px;border-radius:50%;display:block}
.tf i svg{width:80%;height:80%}
/* ---------- teaching time ---------- */
.teacher{display:flex;align-items:center;gap:14px;background:#fff;border:2px solid var(--line);border-radius:28px;box-shadow:0 6px 0 var(--line);padding:12px 14px;margin-bottom:14px}
.teacher .av{width:92px;height:92px;flex-shrink:0}
.t-talk{animation:talk 1.1s ease-in-out infinite;display:block}
@keyframes talk{0%,100%{transform:translateY(0) rotate(0)}30%{transform:translateY(-5px) rotate(-3deg)}60%{transform:translateY(0) rotate(2deg)}}
.t-bubble{flex:1;font-family:var(--head);font-weight:500;font-size:clamp(1.15rem,3.2vw,1.5rem);line-height:1.3}
.t-bubble b{display:block;font-size:.85rem;font-weight:600;color:var(--purple);text-transform:uppercase;letter-spacing:.06em;margin-bottom:2px}
.board{background:#fff;border:2px solid var(--line);border-radius:30px;box-shadow:0 8px 0 var(--line);min-height:300px;display:flex;align-items:center;justify-content:center;padding:22px 14px;margin-bottom:16px;
  background-image:radial-gradient(#EEE9FF 1.4px,transparent 1.4px);background-size:20px 20px}
.t-scene{display:flex;flex-direction:column;align-items:center;gap:18px;width:100%}
.t-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;max-width:640px}
.t-it{position:relative;display:inline-flex;flex-direction:column;align-items:center;opacity:0;animation:tpop .5s cubic-bezier(.3,1.6,.6,1) forwards;animation-delay:var(--d,0ms);transform-box:fill-box;transform-origin:center}
@keyframes tpop{0%{opacity:0;transform:scale(.2)}100%{opacity:1;transform:scale(1)}}
.t-fly{animation:tpop .5s cubic-bezier(.3,1.6,.6,1) forwards,tfly .9s ease-in forwards;animation-delay:var(--d,0ms),var(--fd,0ms)}
@keyframes tfly{0%{opacity:1;transform:translate(0,0)}100%{opacity:.15;transform:translate(30px,-70px) rotate(25deg) scale(.7)}}
.t-glow{animation:tpop .5s cubic-bezier(.3,1.6,.6,1) forwards,tglow 1s ease-in-out infinite;animation-delay:var(--d,0ms),var(--gd,0ms)}
@keyframes tglow{0%,100%{opacity:1;transform:scale(1);filter:drop-shadow(0 0 0 #FFC93C)}50%{opacity:1;transform:scale(1.15);filter:drop-shadow(0 0 10px #FFC93C)}}
.t-badge{position:absolute;top:-12px;right:-8px;min-width:26px;height:26px;padding:0 6px;border-radius:13px;background:var(--purple);color:#fff;font-family:var(--head);font-weight:600;font-size:.95rem;display:flex;align-items:center;justify-content:center;border:2px solid #fff;opacity:0;animation:tpop .35s forwards;animation-delay:var(--d)}
.t-badge.t-wide{position:static;margin-top:6px}
.t-sign{font-family:var(--head);font-weight:700;font-size:2.4rem;color:var(--muted)}
.t-label{font-family:var(--head);font-weight:600;font-size:clamp(1.3rem,3.6vw,1.8rem);color:var(--ink);background:#FFF6D6;border:2px solid #FFE08A;border-radius:18px;padding:8px 18px;text-align:center;opacity:0;animation:tpop .5s forwards;animation-delay:var(--d)}
.t-word{font-family:var(--head);font-weight:600;font-size:1.3rem;margin-top:6px}
.t-num{font-family:var(--head);font-weight:700;font-size:2.6rem;color:var(--purple)}
.t-col{display:flex;flex-direction:column;align-items:center;gap:6px}
.t-mini{gap:2px;max-width:70px}
.t-mouth{color:var(--pink)}
.t-rot{transform-origin:100px 100px;transform-box:view-box;animation:trot 2s ease-in-out forwards;animation-delay:var(--d)}
@keyframes trot{from{transform:rotate(0deg)}to{transform:rotate(var(--to))}}
.t-draw{stroke-dasharray:100;stroke-dashoffset:100;animation:tdraw .8s ease-out forwards;animation-delay:var(--d)}
@keyframes tdraw{to{stroke-dashoffset:0}}
.t-fillin{stroke-dashoffset:100;fill-opacity:0;animation:tdraw 1.4s ease-out forwards,tfill .6s 1.4s forwards}
@keyframes tfill{to{fill-opacity:1}}
.t-grow{width:0;animation:tgrow 1s ease-out forwards}
@keyframes tgrow{to{width:var(--w)}}
.t-plate{width:120px;height:120px}
.qc-tag{display:block;font-size:.85rem;font-weight:600;color:var(--purple);text-transform:uppercase;letter-spacing:.06em}
.helper-row{display:flex;justify-content:center;margin-top:16px}
.helper{display:flex;align-items:center;gap:10px;background:#fff;border:2px solid var(--line);box-shadow:0 4px 0 var(--line);border-radius:999px;padding:5px 18px 5px 5px;font-family:var(--head);font-weight:600;font-size:1.05rem}
.helper:active{transform:translateY(3px);box-shadow:0 1px 0 var(--line)}
.helper .av{width:44px;height:44px}
.lesson-chip{position:absolute;left:14px;bottom:8px;display:inline-flex;align-items:center;gap:5px;background:rgba(255,255,255,.92);color:var(--ink);font-family:var(--head);font-weight:600;font-size:.85rem;border-radius:999px;padding:4px 10px 4px 8px}
.world-art .nm{margin-bottom:22px}
@media (max-width:640px){.teacher .av{width:64px;height:64px}.board{min-height:240px}}
.prek-num{font-family:var(--head);font-weight:700;font-size:clamp(4rem,14vw,6rem);color:var(--purple);line-height:1}
.choice.tile .objs{max-width:220px}
/* Singapore Math models */
.sg-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:14px 22px}
.sg-bond,.sg-bar,.sg-pv,.sg-split{max-width:100%;height:auto;display:block;margin:8px auto 0}
.visual .sg-pv{margin-top:12px;width:min(470px,100%)}
.visual .sg-bar,.hint-vis .sg-bar{width:min(470px,100%)}
.visual .sg-bond{width:min(250px,72%)}
.hint-vis .sg-split{width:min(330px,100%)}
.board .sg-bar{width:min(500px,100%)}
.board .sg-pv{width:min(460px,100%)}
.board .sg-split{width:min(400px,100%)}
.board .sg-bond{width:min(270px,80%)}
.hint-body{flex:1;min-width:0}
.hint-vis{background:#fff;border:2px dashed #FFE08A;border-radius:18px;margin-top:10px;padding:6px;display:flex;justify-content:center}
.hint-vis svg{max-width:100%;height:auto}
.cpa{display:flex;justify-content:center;gap:8px;margin:-4px 0 12px;flex-wrap:wrap}
.cpa span{display:inline-flex;align-items:center;gap:6px;font-family:var(--head);font-weight:600;font-size:.95rem;padding:6px 14px;border-radius:999px;background:#F3F0FF;color:#9A93BF;border:2px solid transparent;transition:all .3s}
.cpa span i{font-style:normal;width:22px;height:22px;border-radius:50%;display:inline-grid;place-items:center;background:#E6E1FA;color:#fff;font-size:.8rem}
.cpa span.on{background:#fff;color:var(--ink);border-color:var(--c);box-shadow:0 4px 0 var(--c)}
.cpa span.on i{background:var(--c)}
.cpa span.past{color:var(--ink)}
.cpa span.past i{background:var(--c)}
.t-eq{font-family:var(--head);font-weight:700;font-size:clamp(2rem,7vw,3.2rem);color:var(--ink);display:flex;gap:.3em;align-items:center;flex-wrap:wrap;justify-content:center}
.t-eq .t-it{display:inline-block}
.t-eq .hl{color:#E04A7C}
.t-col2{display:flex;flex-direction:column;align-items:center;gap:10px}
.cmp-rows{display:flex;flex-direction:column;align-items:center;gap:10px}.cmp-rows .t-col2{flex-direction:row;gap:12px}.cmp-rows .t-num{min-width:2.2em;text-align:right}
@media (max-width:640px){.cpa span{font-size:.8rem;padding:4px 10px}}
/* wardrobe v2 */
.wardrobe{width:min(420px,94vw);max-height:calc(100vh - 140px);overflow:auto}
.dresses{grid-template-columns:repeat(3,1fr)}
.dress{position:relative;padding:8px 4px 8px;line-height:1.15}
.dress .dav{width:62px;height:62px;display:block;border-radius:50%;overflow:hidden}
.dress .dn{font-size:.72rem;color:var(--ink);text-align:center}
.dress .dtag{font-size:.62rem;background:#FFE1E6;color:#C2185B;border-radius:999px;padding:1px 7px}
.dress .dcost{display:flex;align-items:center;gap:3px;font-size:.75rem}
.dress.locked .dav{filter:grayscale(.7)}
/* hero picker + make your own */
.pick-row{max-width:980px}
.pick{width:190px}
.pick-wrap{position:relative}
.edit-hero{position:absolute;top:10px;right:10px;background:#fff;color:var(--ink);border:0;border-radius:999px;padding:6px 12px;font-family:var(--head);font-weight:600;font-size:.9rem;box-shadow:0 3px 0 rgba(0,0,0,.2)}
.pick.make .av.plus svg{display:block}
.create-card{display:flex;gap:26px;align-items:center;flex-wrap:wrap;justify-content:center;background:rgba(255,255,255,.1);border:3px solid rgba(255,255,255,.18);border-radius:28px;padding:22px;margin-top:18px;max-width:640px}
.create-prev{width:170px;height:170px}
.create-form{display:flex;flex-direction:column;gap:8px;min-width:260px;text-align:left}
.seg{display:flex;background:rgba(255,255,255,.15);border-radius:999px;padding:4px}
.seg button{flex:1;border:0;background:transparent;color:#fff;font-family:var(--head);font-weight:600;font-size:1.1rem;padding:10px 14px;border-radius:999px}
.seg button.on{background:#fff;color:var(--purple)}
.flabel{font-family:var(--head);font-weight:600;font-size:1rem;margin-top:6px}
.name-in{font-family:var(--head);font-size:1.4rem;font-weight:600;padding:12px 16px;border-radius:18px;border:3px solid #fff;outline:none;color:var(--ink);width:100%;box-sizing:border-box}
.name-in:focus{border-color:var(--yellow)}
.swatches{display:flex;gap:10px}
.swatch{width:40px;height:40px;border-radius:50%;border:3px solid rgba(255,255,255,.5)}
.swatch.on{border-color:#fff;box-shadow:0 0 0 3px var(--yellow)}
.create .done-actions{margin-top:22px}
.slabel{position:absolute;left:0;top:0;display:flex;align-items:center;gap:6px;background:rgba(255,255,255,.82);border-radius:999px;padding:3px 10px 3px 4px;font-family:var(--head);font-weight:600;font-size:12.5px;color:var(--ink);white-space:nowrap;pointer-events:none;box-shadow:0 2px 6px rgba(34,29,69,.18)}
.slabel i{width:16px;height:16px;border-radius:50%;background:linear-gradient(#EF3340 50%,#fff 50%);border:1.5px solid #EF3340;display:block}
/* extended lessons */
.wcard{display:flex;flex-direction:column;align-items:center;gap:10px;background:#F6FFFC;border:3px solid #14B8A6;border-radius:26px;padding:16px 22px;max-width:520px;text-align:center}
.wc-tag{font-family:var(--head);font-weight:600;font-size:.85rem;color:#fff;background:#14B8A6;border-radius:999px;padding:4px 12px}
.wc-term{font-family:var(--head);font-weight:700;font-size:clamp(1.8rem,6vw,2.6rem);color:var(--ink)}
.wc-pic{display:flex;justify-content:center;align-items:center;min-height:60px}
.wc-pic svg{max-width:100%;height:auto}
.wc-def{font-weight:800;font-size:1.05rem;color:var(--muted)}
.t-bubble .wterm{display:inline;color:#0E8F82;font-size:inherit;margin-right:4px}
.board.try{flex-direction:column;background:#FFFDF4;border-color:#FFE08A;box-shadow:0 8px 0 #FFE08A}
.try-wrap{display:flex;flex-direction:column;align-items:center;gap:12px;width:100%}
.try-goal{font-family:var(--head);font-weight:600;font-size:1.2rem;background:#FFC93C;color:var(--ink);border-radius:999px;padding:6px 18px}
.try-count{font-family:var(--head);font-weight:700;font-size:3rem;color:var(--purple);line-height:1}
.try-tip{color:var(--muted);font-weight:800;font-size:.95rem}
.try-frame{background:none;border:0;padding:6px;border-radius:18px;cursor:pointer;display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
.try-frame:active{transform:scale(.98)}
.try-objs{gap:14px}
.try-objs .obj{cursor:pointer}
.try-vis{margin-top:0;width:100%}
.try-wrap .choices{width:100%;max-width:560px}
.pv-row{display:flex;gap:12px;flex-wrap:wrap;justify-content:center}
.pv-btns{display:flex;gap:6px}
.pv-b{font-family:var(--head);font-weight:700;font-size:1.25rem;border:0;border-radius:16px;padding:10px 16px;background:var(--c);color:#fff;box-shadow:0 4px 0 rgba(0,0,0,.18);min-width:70px}
.pv-b.minus{background:#E6E1FA;color:var(--ink);min-width:46px}
.try-pot{border:3px dashed #D5CEF2;cursor:pointer;min-width:96px;min-height:96px;display:flex;flex-wrap:wrap;gap:3px;align-content:center;justify-content:center;background:#fff}
.try-pot.full{border:3px solid #22C38A;background:#ECFFF6}
.hook-av{width:110px;height:110px}
.btn.pulse{animation:btnpulse 1s ease-in-out infinite}
@keyframes btnpulse{50%{transform:scale(1.06)}}
.btn[disabled]{opacity:.45}
@media (max-width:640px){.hook-av{width:76px;height:76px}.pv-b{font-size:1.05rem;padding:9px 12px;min-width:58px}}
.cpa span.jump{cursor:pointer;color:var(--ink)}
.cpa span.jump i{background:var(--c)}
.cpa span.jump:hover{background:#fff;border-color:var(--c)}
/* path map */
.map-head{background:#fff;border:2px solid var(--line);border-radius:28px;box-shadow:0 6px 0 var(--line);padding:16px 20px;margin:6px 0 18px;text-align:center}
.map-head h2{margin:8px 0 2px;font-size:1.7rem}
.map-head p{margin:0 0 10px;color:var(--muted);font-weight:800}
.map-head .meter{width:100%;max-width:none;height:14px;background:#EEEAFE;border-radius:99px;overflow:hidden}
.map-head .meter span{display:block;height:100%;background:linear-gradient(90deg,#FFC93C,#FF8A3D);border-radius:99px}
.gchips{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.gchip{font-family:var(--head);font-weight:600;font-size:1.05rem;border:2px solid var(--line);background:#fff;color:var(--muted);border-radius:999px;padding:8px 18px;min-height:44px}
.gchip.on{background:var(--purple);color:#fff;border-color:var(--purple);box-shadow:0 4px 0 #5537D8}
.path-map{display:flex;flex-direction:column;gap:16px;padding-bottom:40px}
.realm-band{background:color-mix(in srgb,var(--rc) 22%,#fff);border-radius:32px;padding:14px 10px 4px;border:2px solid color-mix(in srgb,var(--rc) 45%,#fff);position:relative;overflow:hidden}
.realm-band::before{content:"";position:absolute;inset:0;background-image:radial-gradient(color-mix(in srgb,var(--rc) 35%,#fff) 2px,transparent 2.5px);background-size:26px 26px;opacity:.5;pointer-events:none}
.rb-head{display:flex;align-items:center;gap:10px;padding:0 10px;position:relative;z-index:2;flex-wrap:wrap}
.rb-head h3{margin:0;font-size:1.35rem;flex:1}
.rb-num{background:var(--rc);color:#fff;font-family:var(--head);font-weight:600;border-radius:999px;padding:4px 12px;font-size:.9rem}
.rb-go{min-height:40px;padding:6px 14px;font-size:.95rem}
.rb-path{position:relative;margin:0 auto;max-width:640px}
.rb-svg{position:absolute;inset:0;width:100%;height:100%}
.stop-wrap{position:absolute;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;z-index:2}
.stop{width:66px;height:66px;border-radius:50%;border:0;font-family:var(--head);font-weight:700;font-size:1.6rem;display:grid;place-items:center;cursor:pointer;position:relative}
.stop.done{background:var(--c);color:#fff;box-shadow:0 6px 0 rgba(0,0,0,.18),inset 0 -6px 0 rgba(0,0,0,.12)}
.stop.cur{background:#FFC93C;color:var(--ink);width:84px;height:84px;font-size:2rem;box-shadow:0 7px 0 #E3A600;animation:stoppulse 1.6s ease-in-out infinite}
.stop.tomorrow{background:#3A2F86;box-shadow:0 6px 0 #241C5C}
.stop.locked{background:#fff;opacity:.85;box-shadow:0 5px 0 rgba(0,0,0,.1);cursor:default}
@keyframes stoppulse{50%{box-shadow:0 7px 0 #E3A600,0 0 0 12px rgba(255,201,60,.35)}}
.stop-pin{position:absolute;bottom:calc(100% - 4px);z-index:3;animation:pinbob 1.4s ease-in-out infinite}
.stop-pin .av{width:54px;height:54px;display:block;border-radius:50%;border:4px solid #fff;box-shadow:0 4px 10px rgba(0,0,0,.2);overflow:hidden}
@keyframes pinbob{50%{transform:translateY(-6px)}}
.stop-lab{position:absolute;left:calc(100% + 10px);top:50%;transform:translateY(-50%);background:#fff;border-radius:14px;padding:6px 10px;font-weight:800;font-size:.82rem;line-height:1.2;width:150px;box-shadow:0 3px 0 rgba(0,0,0,.08);color:var(--ink)}
.stop-lab.left{left:auto;right:calc(100% + 10px)}
.stop-lab .sl-n{display:block;color:var(--muted);font-size:.72rem}
.stop-lab .sl-s{display:flex;gap:1px;margin-top:2px}
.stop-lab .sl-t{display:inline-block;background:#3A2F86;color:#fff;border-radius:99px;padding:1px 8px;font-size:.7rem;margin-top:3px}
.sheet-bg{position:fixed;inset:0;background:rgba(34,29,69,.45);z-index:40}
.sheet{position:fixed;left:50%;bottom:0;transform:translateX(-50%);width:min(560px,100vw);background:#fff;border-radius:30px 30px 0 0;z-index:41;overflow:hidden;animation:sheetup .25s ease-out;padding-bottom:env(safe-area-inset-bottom)}
@keyframes sheetup{from{transform:translate(-50%,100%)}}
.sheet-head{display:flex;align-items:center;gap:12px;padding:16px;color:#fff}
.sheet-head h3{margin:2px 0;font-size:1.35rem;color:#fff}
.sheet-head > div{flex:1}
.sheet-head .sl-n{font-weight:800;opacity:.9;font-size:.85rem}
.sheet-body{display:flex;flex-direction:column;gap:12px;padding:16px}
.sheet-chests{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.sheet-chest{border:2px solid var(--line);border-radius:18px;background:#fff;padding:10px 6px;display:flex;flex-direction:column;align-items:center;gap:3px;font-weight:800;font-size:.8rem;color:var(--muted)}
.sheet-chest b{font-family:var(--head);color:var(--ink);font-size:1rem}
.sheet-chest.done{border-color:#FFC93C;background:#FFFBEA}
.sheet-chest[disabled]{opacity:.55}
.hbtn.today{box-shadow:0 0 0 3px #FFC93C;animation:stoppulse 1.6s ease-in-out infinite}
.next-pill[data-action]{cursor:pointer;pointer-events:auto}
@media (max-width:640px){.rb-head h3{font-size:1.1rem}.rb-go{font-size:.8rem;padding:4px 10px}.stop-lab{width:112px;font-size:.74rem}.stop{width:56px;height:56px}.stop.cur{width:70px;height:70px}}

/* ---- QA fixes ---- */
.play-body,.pb-main,.pb-side{display:contents}
.choice.show-me{border-color:#2FBF71;box-shadow:0 6px 0 #2FBF71,0 0 0 6px rgba(47,191,113,.25);animation:showme 1s ease-in-out infinite}
@keyframes showme{50%{transform:scale(1.06)}}
.hint.together{animation:together .6s ease-out 2}
@keyframes together{50%{transform:scale(1.03);box-shadow:0 0 0 6px rgba(255,201,60,.45)}}
.speak.nudge,.helper.nudge{animation:showme 1s ease-in-out 4}
.gu-btn{display:inline-flex;align-items:center;gap:6px;font-size:.9rem;min-height:44px;padding:8px 14px}
#pgate{position:fixed;inset:0;z-index:200;display:none;align-items:center;justify-content:center;background:rgba(25,20,55,.55);padding:16px}
#pgate.show{display:flex}
.pg-card{position:relative;background:#fff;border-radius:26px;padding:22px 20px 18px;width:min(340px,100%);text-align:center;box-shadow:0 12px 40px rgba(0,0,0,.25);font-family:var(--body)}
.pg-card h3{font-family:var(--head);font-size:1.4rem;margin:0 0 6px}
.pg-card p{margin:0 0 10px;color:var(--muted);font-weight:700}
.pg-x{position:absolute;top:10px;right:10px;width:44px;height:44px}
.pg-out{height:52px;border:2px solid var(--line);border-radius:14px;font:700 1.8rem var(--head);display:flex;align-items:center;justify-content:center;margin-bottom:12px;letter-spacing:.1em}
.pg-keys{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.pg-k{height:52px;border-radius:14px;border:2px solid var(--line);background:#fff;font:700 1.3rem var(--head);color:var(--ink)}
.pg-k.ok{background:#7B5CFF;border-color:#7B5CFF;color:#fff}
.pg-card.shake{animation:shake .4s}
@keyframes shake{20%,60%{transform:translateX(-8px)}40%,80%{transform:translateX(8px)}}
/* phones held sideways: question on the left, answers on the right, Next always in reach */
@media (max-height:520px) and (orientation:landscape){
  #app{padding:8px 14px 14px}
  .play-top{margin-bottom:8px}
  .play-body{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(210px,1fr);gap:14px;align-items:start}
  .pb-main,.pb-side{display:block}
  .pb-side{position:sticky;top:8px}
  .play-body .qcard{margin-bottom:0;padding:12px 14px}
  .play-body .qtext{font-size:1.1rem}
  .play-body .visual{margin-top:8px;padding:8px;min-height:0;zoom:.78}
  .play-body .choices{grid-template-columns:repeat(2,1fr);gap:10px}
  .play-body .choice{min-height:64px}
  .play-body .hint-vis{zoom:.8}
  .teacher{padding:6px 10px;margin-bottom:8px}.teacher .av{width:52px;height:52px}
  .cpa{display:none}
  .board{min-height:0;padding:10px;margin-bottom:8px}
  .board .t-scene,.board .wcard,.board .try-wrap>:not(.choices){zoom:.8}
  .try-wrap:has(>.choices){display:grid;grid-template-columns:1.3fr 1fr;align-items:center;gap:12px;width:100%}
  .try-wrap>.choices{margin-top:0!important;grid-template-columns:repeat(2,1fr)}
  body[data-screen="teach"]:is([data-phase="learn"],[data-phase="again"]) #app{display:grid;grid-template-columns:minmax(0,1fr) 150px;column-gap:12px;grid-template-areas:"top top" "teacher teacher" "board actions";align-items:start}
  body[data-screen="teach"]:is([data-phase="learn"],[data-phase="again"]) .play-top{grid-area:top}
  body[data-screen="teach"]:is([data-phase="learn"],[data-phase="again"]) .teacher{grid-area:teacher}
  body[data-screen="teach"]:is([data-phase="learn"],[data-phase="again"]) .board{grid-area:board;margin-bottom:0}
  body[data-screen="teach"]:is([data-phase="learn"],[data-phase="again"]) .done-actions{grid-area:actions;flex-direction:column;flex-wrap:nowrap;align-items:stretch;margin-top:0;gap:10px;position:sticky;top:8px}
  body[data-screen="teach"]:is([data-phase="learn"],[data-phase="again"]) .done-actions .btn{width:100%;padding-left:8px;padding-right:8px;justify-content:center}
  body[data-screen="teach"]:is([data-phase="learn"],[data-phase="again"]) .done-actions .btn.big{order:-1}
  .teacher .t-bubble{font-size:1.02rem}
  .done-wrap{padding-top:6px}
}
/* tall iPads: use the extra room instead of leaving the bottom half empty */
@media (min-width:760px) and (min-height:1000px) and (orientation:portrait){
  .board{min-height:440px}
  .visual{min-height:220px}
  .choice{min-height:120px}
  .done-wrap{min-height:80vh;justify-content:center}
}
/* small phones: keep the five grade chips on one line */
@media (max-width:420px){.gchips{gap:5px;flex-wrap:nowrap}.gchip{padding:8px 10px;min-width:44px;font-size:.95rem}}

/* compare-two-numbers ten frames: keep each number on one compact row */
.cmp-rows .tfs,.cmp-rows .t-col2>div:not(.t-num){display:flex;gap:6px;flex-wrap:nowrap}
@media (max-width:560px){.cmp-rows .tf{grid-template-columns:repeat(5,19px);grid-template-rows:repeat(2,19px);gap:3px;padding:4px;border-radius:10px}.cmp-rows .tf i svg{width:16px;height:16px}.cmp-rows .t-num{font-size:1.6rem}}
/* narrow phones: the map's top bar fits on one line */
@media (max-width:420px){.topbar{gap:6px}.topbar .who b{font-size:.92rem;line-height:1.1}.topbar [data-action=explore]{padding:8px 12px!important;font-size:.95rem!important}.topbar .icon-btn{width:46px;height:46px}}
/* ---------------- Merlion Math Quest: MRT map ---------------- */
.mrt-map{display:flex;flex-direction:column;gap:16px;padding-bottom:40px}
.mrt-line{background:#fff;border-radius:26px;border:2px solid var(--line);box-shadow:0 6px 0 var(--line);padding:14px 14px 10px;overflow:hidden}
.ml-head{display:flex;align-items:center;gap:10px}
.ml-head h3{margin:0;font-family:var(--head);font-size:1.2rem;line-height:1.1}
.ml-sub{font-size:.8rem;font-weight:800;color:var(--muted)}
.ml-badge{color:#fff;font-family:var(--head);font-weight:700;border-radius:10px;padding:6px 9px;font-size:1rem;min-width:44px;text-align:center}
.ml-pearl{margin-left:auto;display:grid;place-items:center;opacity:.9}
.ml-pearl.on{filter:drop-shadow(0 0 6px var(--rc))}
.ml-head .rb-go{margin-left:6px}
.ml-track{position:relative;height:210px;margin-top:6px}
.ml-bar{position:absolute;left:4%;right:4%;top:92px;height:14px;border-radius:7px;background:var(--rc);box-shadow:inset 0 -3px 0 rgba(0,0,0,.15)}
.mrt-stop{position:absolute;top:99px;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;z-index:2}
.stop.mrt{width:56px;height:56px;font-size:1.3rem;border:6px solid var(--c)}
.stop.mrt.done{background:#fff;color:var(--c);box-shadow:0 4px 0 rgba(0,0,0,.15)}
.stop.mrt.cur{width:68px;height:68px;background:#FFC93C;border-color:#fff;box-shadow:0 0 0 5px var(--c),0 6px 0 rgba(0,0,0,.2)}
.stop.mrt.tomorrow{border-color:#fff;box-shadow:0 0 0 4px var(--c)}
.stop.mrt.locked{background:#F2F0F8;border-color:#D9D5E8;opacity:1}
.mrt-lab{position:absolute;top:calc(100% + 8px);width:118px;text-align:center;font-size:.74rem;font-weight:800;line-height:1.2;color:var(--ink);display:flex;flex-direction:column;align-items:center;gap:2px}
.mrt-stop.low .mrt-lab{top:auto;bottom:calc(100% + 8px)}
.mrt-stop.low .stop-pin{bottom:auto;top:calc(100% - 4px)}
.mrt-lab b{font-family:var(--head);font-weight:600;font-size:.82rem}
.mrt-code{color:#fff;border-radius:6px;padding:1px 6px;font-size:.68rem}
.sl-t2{color:var(--muted);font-weight:700}
.pearl-row{display:flex;gap:6px;justify-content:center;margin-top:10px}
.pearl{display:grid;place-items:center;border-radius:50%}
.pearl.on{filter:drop-shadow(0 0 5px var(--pc))}
@media (max-width:560px){.mrt-lab{width:72px;font-size:.66rem}.mrt-lab b{font-size:.72rem}.stop.mrt{width:46px;height:46px;font-size:1.05rem;border-width:5px}.stop.mrt.cur{width:54px;height:54px}.ml-head .rb-go{display:none}.ml-track{height:230px}}
/* title: a sunny Singapore sky */
.sg-sky{position:fixed;inset:0;background:linear-gradient(180deg,#1E9BD7 0%,#57C5E8 45%,#FFC48C 85%,#FF9E7A 100%);overflow:hidden;z-index:0}
.sg-sun{position:absolute;right:12%;top:14%;width:120px;height:120px;border-radius:50%;background:radial-gradient(circle,#FFF6C8 0%,#FFE27A 55%,rgba(255,226,122,0) 72%)}
.sg-skyline{position:absolute;left:0;right:0;bottom:0;width:100%;height:42%}
.title-wrap.sg{position:relative;z-index:1}
.title-wrap.sg h1{color:#fff;text-shadow:0 4px 0 rgba(20,60,120,.35),0 8px 24px rgba(0,0,0,.2)}
.title-wrap.sg .sub,.title-wrap.sg .pick-label{color:#fff;text-shadow:0 2px 6px rgba(0,0,0,.25)}
.title-wrap.sg .moon{background:none;box-shadow:0 8px 24px rgba(0,60,90,.25)}
.title-wrap.sg .pick{background:rgba(255,255,255,.92);color:var(--ink)}
.title-wrap.sg .pick .nm{color:var(--ink)}.title-wrap.sg .pick .st{color:var(--muted)}
.title-wrap.sg .ghost{color:#fff;background:rgba(0,0,0,.18);border-radius:999px;padding:10px 18px}
/* MRT ride between districts */
#mrtRide{position:fixed;inset:0;z-index:150;display:none;align-items:center;justify-content:center;background:rgba(20,30,60,.55);padding:16px}
#mrtRide.show{display:flex;animation:fadein .3s}
@keyframes fadein{from{opacity:0}to{opacity:1}}
.ride-card{width:min(640px,100%);background:#fff;border-radius:28px;padding:18px;box-shadow:0 16px 40px rgba(0,0,0,.3)}
.ride-head{display:flex;align-items:center;gap:10px;font-family:var(--head);font-size:1.3rem;margin-bottom:12px}
.ride-window{height:120px;border-radius:18px;overflow:hidden;background:linear-gradient(180deg,#57C5E8,#BDEBFA);position:relative;border:6px solid #E4E7EE}
.ride-scroll{position:absolute;bottom:0;left:0;height:100%;width:200%;display:flex;animation:ridescroll 3s linear infinite}
.ride-scroll svg{width:50%;height:100%}
@keyframes ridescroll{from{transform:translateX(0)}to{transform:translateX(-50%)}}
.ride-line{position:relative;height:84px;margin-top:14px}
.ride-line::before{content:"";position:absolute;left:4%;right:4%;top:24px;height:8px;border-radius:4px;background:#D9DCE6}
.ride-stop{position:absolute;top:28px;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center}
.ride-stop i{width:20px;height:20px;border-radius:50%;background:#fff;border:5px solid var(--c)}
.ride-stop em{font-style:normal;font-size:.68rem;font-weight:800;margin-top:20px;color:var(--muted);white-space:nowrap}
.ride-stop.to i{transform:scale(1.35);box-shadow:0 0 0 5px rgba(255,201,60,.5)}
.ride-stop.to em{color:var(--ink)}
.ride-train{position:absolute;top:-6px;transform:translateX(-50%);animation:ridetrain 4s ease-in-out forwards}
@keyframes ridetrain{from{left:var(--x0)}to{left:var(--x1)}}
/* the end card: a family photo with the Merlion */
.endcard{display:flex;flex-direction:column;align-items:center;gap:14px;padding:14px 0 40px}
.ec-photo{position:relative;width:min(620px,100%);aspect-ratio:4/3.2;border-radius:22px;overflow:hidden;background:#fff;border:10px solid #fff;box-shadow:0 12px 30px rgba(0,0,0,.2);transform:rotate(-1.2deg)}
.ec-sky{position:absolute;inset:0;background:linear-gradient(180deg,#2B2560 0%,#7B4FB0 55%,#FF9E7A 100%)}
.ec-sky .sg-skyline{position:absolute;left:0;right:0;bottom:0;width:100%;height:40%}
.ec-fireworks i{position:absolute;width:10px;height:10px;border-radius:50%;background:var(--c);box-shadow:0 0 14px 6px var(--c);animation:firework 3.2s ease-out infinite}
@keyframes firework{0%{transform:scale(.2);opacity:1}70%{transform:scale(3.4);opacity:.6}100%{transform:scale(4);opacity:0}}
.ec-merlion{position:absolute;right:6%;bottom:18%;filter:drop-shadow(0 6px 10px rgba(0,0,0,.3))}
.ec-fam{position:absolute;left:4%;right:4%;bottom:5%;display:flex;justify-content:center;gap:4px;flex-wrap:wrap}
.ec-av{width:clamp(46px,11vw,72px);height:clamp(46px,11vw,72px);border-radius:50%;overflow:hidden;border:4px solid #fff;box-shadow:0 4px 10px rgba(0,0,0,.25);display:block}
.ec-caption{position:absolute;left:0;right:0;top:6%;text-align:center;color:#fff;font-family:var(--head);font-size:clamp(1.05rem,3.4vw,1.6rem);text-shadow:0 2px 8px rgba(0,0,0,.4);padding:0 12px}
.ec-bonus{display:flex;align-items:center;gap:12px;background:#fff;border-radius:20px;padding:12px 16px;border:2px solid var(--line);max-width:560px}
.ec-bonus b{display:block;font-family:var(--head)}.ec-bonus span{color:var(--muted);font-weight:700;font-size:.92rem}

/* no pinch or double-tap zoom anywhere in the game (a toddler can't undo it) */
html,body{touch-action:pan-x pan-y;-webkit-text-size-adjust:100%}
body.world,body.world *{touch-action:none}
.rdot{display:inline-block;width:12px;height:12px;border-radius:50%;margin-right:6px;vertical-align:-1px;box-shadow:0 0 0 2px #fff}
.pg-x{width:56px;height:56px}

/* short phone screens: a smaller lesson picture so Next never needs scrolling */
@media (max-height:700px){.board{min-height:190px;padding:14px 10px;margin-bottom:10px}.teacher .av{width:54px;height:54px}}
@media (max-height:700px){
  .cpa span:not(.on){display:none}
  .cpa{margin:4px 0 6px}
  .board{min-height:0;max-height:40vh;overflow:hidden}
  .board .t-scene{transform:scale(.78);transform-origin:center}
  .teacher{padding-top:8px;padding-bottom:8px}
}
@media (max-height:700px){ .board.try{max-height:none;overflow:visible} }
/* short phones: smaller counting tiles and a tighter question card so the answer buttons stay on screen */
@media (max-height:700px){
  .visual{margin-top:8px;padding:8px;gap:8px;min-height:0}
  .visual .obj svg{width:38px !important;height:38px !important}
  .visual .obj.tap{padding:3px}
  .qcard{padding:12px;margin-bottom:10px}
  .objs{gap:5px}
}

/* ---------------- printable worksheets ---------------- */
#ws{position:fixed;inset:0;z-index:300;display:none;background:#ECE8FA;overflow:auto;-webkit-overflow-scrolling:touch;touch-action:pan-y}
#ws.show{display:block}
body.ws-open, body.ws-open *{touch-action:auto}
.ws-bar{position:sticky;top:0;z-index:2;display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:center;padding:12px;background:rgba(236,232,250,.95);border-bottom:2px solid var(--line)}
.ws-keyt{font-weight:800;color:var(--ink);display:flex;gap:6px;align-items:center}
.ws-donebtn{margin-top:14px}
.ws-donebtn small{font-weight:700;opacity:.7;margin-left:4px}
.ws-sheets{padding:18px 10px 60px}
.ws-page{background:#fff;color:#2B2350;width:min(8.5in,100%);min-height:10.6in;margin:0 auto 22px;padding:.45in .5in;box-shadow:0 6px 24px rgba(60,40,120,.18);border-radius:6px;font-family:var(--body, Nunito, sans-serif);box-sizing:border-box}
.ws-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;border-bottom:3px solid #2B2350;padding-bottom:10px;margin-bottom:10px}
.ws-brand{font-family:var(--head);font-weight:600;font-size:.85rem;letter-spacing:.06em;text-transform:uppercase;color:#7C5CFF}
.ws-head h1{font-family:var(--head);font-size:1.55rem;margin:2px 0;line-height:1.15}
.ws-place{font-weight:800;color:#6B6490}
.ws-name{font-weight:800;font-size:1rem;line-height:2.1;white-space:nowrap}
.ws-line{display:inline-block;width:170px;border-bottom:2px solid #2B2350;margin-left:6px}
.ws-line.short{width:110px}
.ws-trace-name{font-family:var(--head);font-size:1.6rem;color:transparent;-webkit-text-stroke:1.2px #9C94C4;letter-spacing:.08em;margin-left:6px;border-bottom:2px solid #2B2350;padding:0 8px}
.ws-tip{background:#F6F3FF;border:1.5px dashed #B9AEEA;border-radius:10px;padding:8px 12px;font-size:.88rem;margin-bottom:10px}
.ws-page section{margin:12px 0 6px}
.ws-page h2{font-family:var(--head);font-size:1.15rem;margin:0 0 4px;color:#2B2350}
.ws-dir{margin:0 0 8px;font-size:.92rem;color:#4A4370}
.ws-write{display:flex;align-items:center;gap:14px;padding:6px 0;border-bottom:1px solid #E6E1FA;break-inside:avoid}
.ws-model{display:flex;flex-direction:column;align-items:center;min-width:90px;border:2px solid #2B2350;border-radius:12px;padding:4px 8px;background:#FFF9E6}
.ws-model small{font-weight:800;font-size:.85rem}
.ws-trace{display:flex;gap:10px;flex-wrap:wrap}
.wsnum{display:inline-flex;gap:0}
.ws-namerow .ws-bigname{font-family:var(--head);font-size:2.5rem;letter-spacing:.12em;color:transparent;-webkit-text-stroke:1.6px #9C94C4;border-bottom:2px solid #2B2350;line-height:1.3;padding:0 6px}
.ws-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px 14px}
.ws-grid.three{grid-template-columns:repeat(2,1fr)}
.ws-q{display:flex;gap:8px;border:1.5px solid #D9D3F2;border-radius:12px;padding:8px 10px;break-inside:avoid;page-break-inside:avoid}
.ws-qn{flex:none;width:26px;height:26px;border-radius:50%;background:#2B2350;color:#fff;font-weight:800;display:flex;align-items:center;justify-content:center;font-size:.9rem}
.ws-qb{flex:1;min-width:0}
.ws-qt{font-weight:800;font-size:.98rem;margin-bottom:4px}
.ws-page.g1 .ws-vis{zoom:.72}
.ws-page.gP .ws-vis, .ws-page.gK .ws-vis{zoom:.85}
.ws-page.gP .ws-tip{font-size:.82rem;padding:6px 10px}
.ws-page.gP .ws-q .obj svg, .ws-page.gK .ws-q .obj svg{width:40px !important;height:40px !important}
.ws-drawbox{height:1.15in;border:2px dashed #9C94C4;border-radius:12px;margin:6px 0}
.ws-drawbox.small{height:auto;display:flex;justify-content:center;padding:6px;border:none}
.ws-vis .visual, .ws-vis{background:none}
.ws-q .visual{margin:0;padding:4px;min-height:0;background:none}
.ws-q svg{max-width:100%;height:auto}
.ws-q .obj.tap{box-shadow:none;border-width:1px;padding:2px}
.ws-q .obj .num{display:none !important}
.ws-q .obj svg{width:30px !important;height:30px !important}
.ws-q .eq{font-size:1.35rem}
.ws-q .tf i, .ws-q .tf .empty{width:30px;height:30px}
.ws-choices{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:6px}
.ws-hint{font-size:.8rem;font-weight:800;color:#6B6490}
.ws-ch{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:40px;padding:2px 10px;border:1.5px solid #9C94C4;border-radius:22px;font-weight:800;font-size:1.05rem}
.ws-ch span[style]{font-size:1.4rem !important}
.ws-ch svg{max-width:84px;max-height:70px}
.ws-ans{margin-top:8px;font-weight:800}
.ws-box{display:inline-block;width:64px;height:40px;border:2px solid #2B2350;border-radius:8px;vertical-align:middle;margin-left:6px}
.ws-draw{height:1.8in;border:2px dashed #9C94C4;border-radius:14px}
.ws-foot{display:flex;align-items:center;gap:8px;margin-top:14px;font-weight:800;font-size:.95rem}
.ws-keypage h1{font-family:var(--head);font-size:1.3rem;margin:0 0 6px}
.ws-keylist{font-size:1.1rem;font-weight:800;columns:2;line-height:1.9}
@media (max-width:640px){.ws-page{padding:16px}.ws-grid{grid-template-columns:1fr}.ws-head{flex-direction:column}}
@page{size:letter;margin:.4in}
@media print{
  body > *:not(#ws){display:none !important}
  html, body{height:auto !important;overflow:visible !important;position:static !important}
  #ws{position:static;inset:auto;overflow:visible;background:#fff;display:block}
  .ws-bar{display:none}
  .ws-sheets{padding:0}
  .ws-page{box-shadow:none;border-radius:0;margin:0;padding:0;width:auto;min-height:0;page-break-after:always;break-after:page;zoom:var(--fit,1)}
  .ws-page:last-child{page-break-after:auto;break-after:auto}
  .ws-grid{grid-template-columns:repeat(2,1fr)}
  body{background:#fff}
  *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* ================= PHONES: a compact HUD so most of the screen is the world =================
   One slim row at the top (small player chip + icon buttons), a small speech strip under it,
   a one-line "next" hint, a smaller joystick and sister button. The district menu lives in the Map. */
@media (max-width:700px),(max-height:520px){
  #hud{padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}
  body.world #hud{display:block}
  .hud-row{flex-direction:row;align-items:flex-start;gap:6px}
  .hud-left{gap:6px;max-width:58vw}
  .hud-right{flex-direction:column;align-items:flex-end;gap:6px;order:0}
  .hud-card{padding:3px 10px 3px 3px;gap:6px;border-radius:16px;box-shadow:0 3px 0 rgba(34,29,69,.18);border-width:1px}
  .hud-card .av{width:32px;height:32px}
  .hud-card .t1{font-size:.82rem}
  .hud-card .t1b, .hud-card .t2{display:none}
  .hud-btns{gap:5px;flex-wrap:nowrap}
  .hbtn{height:40px;min-width:40px;padding:0 7px;border-radius:12px;box-shadow:0 3px 0 rgba(34,29,69,.25)}
  .hbtn svg{width:18px;height:18px}
  .hbtn .lbl{display:none}
  .realm-chips{display:none}
  /* buttons look small but keep a 46px touch area for little fingers */
  .hbtn, .hud-card .av{position:relative}
  .hbtn::after{content:"";position:absolute;inset:-3px}
  .hud-card .av::after{content:"";position:absolute;inset:-7px}
  #mini{width:72px;height:72px;border-width:2px}
  .bubble3d{padding:4px 10px 4px 4px;gap:6px;border-radius:14px;max-width:min(58vw,330px);background:rgba(255,255,255,.93);box-shadow:0 4px 12px rgba(20,10,60,.25)}
  .bubble3d .av{width:30px;height:30px}
  .bubble3d b{display:none}
  .bubble3d p{font-size:.78rem;line-height:1.25;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
  .hud-bottom{position:absolute;bottom:max(10px,env(safe-area-inset-bottom));left:0;right:0;justify-content:center}
  .next-pill{font-size:.72rem;padding:4px 10px 4px 4px;gap:6px;max-width:min(52vw,360px);border-width:1px;box-shadow:0 3px 0 rgba(34,29,69,.16);
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:24px}
  .next-pill .dot{width:22px;height:22px;display:inline-flex;vertical-align:middle;margin-right:5px}
  .next-pill .dot svg{width:14px;height:14px}
  .pill-gu{font-size:.68rem;padding:2px 7px}
  .ask-sis{padding:2px;border-width:2px;right:max(8px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom))}
  .ask-sis .av{width:44px;height:44px}
  .ask-sis span:not(.av){display:none}
  #joyBase{width:96px;height:96px;left:max(16px,env(safe-area-inset-left));bottom:max(18px,calc(env(safe-area-inset-bottom) + 10px))}
  #joyKnob{width:42px;height:42px;margin:-21px 0 0 -21px}
  .zlabel{font-size:11px;padding:3px 8px 3px 4px;gap:4px}
  .zlabel i{width:14px;height:14px}
  .zlabel span{font-size:10px}
  .chestlabel{font-size:12px;padding:4px 9px}
  .ztoast{top:16%}
  .ztoast .a{font-size:1.5rem}
  .ztoast .b{font-size:.8rem}
  .wardrobe{top:56px}
  .unlock-box{bottom:64px}
}
/* portrait phones: no radar (the water trail and the sister lead the way), the hint sits above the joystick row */
@media (max-width:560px) and (orientation:portrait){
  #mini{display:none}
  .hud-left{max-width:52vw}
  .hud-bottom{bottom:auto;top:calc(max(8px,env(safe-area-inset-top)) + 46px);justify-content:flex-end;padding-right:max(8px,env(safe-area-inset-right))}
  .next-pill{max-width:46vw}
}
/* ---- custom explorer: title card and the make-your-explorer screen ---- */
.pick-wrap{position:relative}
.pick-edit{position:absolute;top:8px;right:8px;width:40px;height:40px;border-radius:50%;background:#fff;border:2px solid var(--line);display:flex;align-items:center;justify-content:center;box-shadow:0 3px 0 var(--line)}
.pick.add{border-style:dashed}
.title-wrap.sg .pick.add{background:rgba(255,255,255,.7)}
.pick .av.plus{display:flex;align-items:center;justify-content:center;border-radius:50%;background:#EEE9FF;color:var(--purple);font-family:var(--head);font-size:4rem;font-weight:700}
.title-wrap.sg.create{color:var(--ink)}
.title-wrap.sg.create h1{color:#fff;text-shadow:0 3px 0 rgba(43,28,140,.5)}
.title-wrap.sg .create-card{background:rgba(255,255,255,.94);border-color:#fff;color:var(--ink);max-width:720px}
.title-wrap.sg .create-form{display:flex;flex-direction:column;gap:6px;min-width:min(380px,84vw)}
.title-wrap.sg .seg{background:#EEE9FF;flex-wrap:wrap}
.title-wrap.sg .seg button{color:var(--ink);font-size:.95rem;padding:8px 10px}
.title-wrap.sg .seg button.on{background:var(--purple);color:#fff}
.title-wrap.sg .swatch{border-color:#E1DBF7}
.title-wrap.sg .swatch.on{border-color:var(--purple);box-shadow:0 0 0 3px #CFC2FF}
.title-wrap.sg .swatches{flex-wrap:wrap}
.title-wrap.sg .name-in{border-color:#E1DBF7}
.vchoose{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.vchoose .seg{flex:1}
.vchoose .chip svg{width:18px;height:18px;vertical-align:-4px;stroke:var(--purple)}
.vchoose .chip svg path:first-child{fill:var(--purple)}
@media (max-width:560px){.create-prev{width:120px;height:120px}.title-wrap.sg .create-card{padding:14px;gap:12px}}

/* five explorers on the title screen */
.title-wrap.sg .pick{width:158px;padding:12px 10px}
.title-wrap.sg .pick .av{width:96px;height:96px}
.title-wrap.sg .pick-row{gap:12px;max-width:900px}
@media (max-width:560px){.title-wrap.sg .pick{width:44vw;padding:8px}.title-wrap.sg .pick .av{width:72px;height:72px}.title-wrap.sg .pick .nm{font-size:1rem}.title-wrap.sg .pick .st{font-size:.72rem}}

/* tutorial: a pulsing ring on the control Captain Ong is talking about, and a small skip button */
.tut-glow{animation:tutglow 1.1s ease-in-out infinite;box-shadow:0 0 0 0 rgba(255,201,60,.9) !important}
@keyframes tutglow{0%,100%{box-shadow:0 0 0 0 rgba(255,201,60,.9)}50%{box-shadow:0 0 0 14px rgba(255,201,60,0)}}
.tut-skip{position:absolute;left:50%;transform:translateX(-50%);bottom:calc(max(12px,env(safe-area-inset-bottom)) + 50px);pointer-events:auto;background:rgba(27,20,70,.75);color:#fff;font-weight:800;border-radius:999px;padding:8px 16px;font-size:.85rem}

.obj .num small{display:block;font-size:.6em;line-height:1}
.obj .num{flex-direction:column}
.pearl-line{display:inline-flex;align-items:center;gap:8px;background:#fff;border-radius:999px;padding:6px 14px;font-weight:800;color:var(--ink);margin:4px 0 8px}
.panel.sources ul{margin:8px 0 0;padding-left:18px;font-size:14px;line-height:1.45}
.panel.sources li{margin:0 0 8px}
.panel.sources a{color:#1E6FD9;text-decoration:underline}
.panel.sources summary{cursor:pointer;font-weight:700}
.ride-head .ml-badge{margin-right:4px}
.ride-via{display:block;width:100%;font-size:13px;opacity:.8;margin-top:2px}
.ml-real{display:inline-block;margin-left:6px;font-size:12px;opacity:.9}
.ml-real i{font-style:normal;color:#fff;border-radius:4px;padding:0 4px;margin-left:3px;font-weight:700}
/* hands-on manipulatives */
.mc-stage{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;margin:6px 0}
.mc-ribbon{height:22px;border-radius:11px;background:repeating-linear-gradient(90deg,#B49BFF 0 20px,#9C7FFF 20px 40px);box-shadow:0 2px 0 rgba(0,0,0,.12)}
.mc-train{display:flex;min-height:52px;min-width:120px;padding:4px;border-radius:12px;border:3px dashed #C9CDE4;background:rgba(255,255,255,.6);transition:background .15s}
.mc-train.hot,.mb-part.hot{background:#FFF6D6;border-color:#FFC93C}
.mc-cube{width:44px;height:44px;border-radius:7px;background:var(--c);box-shadow:inset 0 -6px 0 rgba(0,0,0,.18),inset 0 4px 0 rgba(255,255,255,.35);display:inline-flex;align-items:center;justify-content:center;color:#fff;font:800 18px/1 inherit;cursor:grab;touch-action:none;user-select:none}
.mc-cube.on{margin-right:0;border-radius:4px;flex-direction:column}
.mc-cube small{font-size:11px;opacity:.9}
.mc-slot{width:44px;height:44px;border-radius:4px;border:2px dashed #D9DCEE;box-sizing:border-box}
.mc-tray{display:flex;gap:10px;justify-content:center;min-height:52px;margin:8px 0}
.m-ghost{transform:scale(1.12);filter:drop-shadow(0 6px 8px rgba(0,0,0,.25));cursor:grabbing}
.mb-bond{display:flex;flex-direction:column;align-items:center;width:min(520px,92vw);margin:4px auto}
.mb-whole{min-width:180px;max-width:100%;padding:8px 12px;border-radius:999px;background:#fff;border:4px solid #7C5CFF;text-align:center}
.mb-whole>b{display:block;font-size:24px;color:#7C5CFF}
.mb-pile{display:flex;flex-wrap:wrap;justify-content:center;gap:4px;min-height:34px}
.mb-pile em{color:#8A8FB0;font-size:14px;align-self:center}
.mb-ctr{cursor:grab;touch-action:none;user-select:none;display:inline-flex}
.mb-lines{width:300px;height:44px;max-width:80%}
.mb-parts{display:flex;gap:18%;justify-content:center;width:100%}
.mb-part{flex:0 0 40%;min-height:110px;border-radius:50%/40%;background:#fff;border:4px solid #FF8A3D;display:flex;flex-wrap:wrap;align-content:center;justify-content:center;gap:2px;padding:10px;box-sizing:border-box;position:relative;cursor:pointer}
.mb-part>b{position:absolute;bottom:-14px;left:50%;transform:translateX(-50%);background:#FF8A3D;color:#fff;border-radius:999px;padding:0 10px;font-size:18px}
.bm-wrap{display:flex;flex-direction:column;gap:12px;margin:10px auto;align-items:flex-start;max-width:96vw;overflow:visible}
.bm-row{display:flex;align-items:center;gap:10px}
.bm-name{min-width:64px;text-align:right;font-weight:800}
.bm-bar{height:40px;border-radius:6px;background:var(--c);box-shadow:inset 0 -5px 0 rgba(0,0,0,.15);display:flex;align-items:center;justify-content:center;color:#fff;font-size:18px;transition:width .08s}
.bm-track{position:relative;height:40px;border-radius:6px;background:#EEF0FA;touch-action:none;cursor:ew-resize}
.bm-track>i{position:absolute;top:0;bottom:0;width:1px;background:#D3D7EC}
.bm-track .bm-bar{position:absolute;left:0;top:0}
.bm-handle{position:absolute;top:-6px;width:22px;height:52px;margin-left:-11px;border-radius:11px;background:#fff;border:4px solid #FF6B9A;box-sizing:border-box;box-shadow:0 3px 6px rgba(0,0,0,.2);transition:left .08s}
/* district mini-games */
.mini-btn{position:fixed;left:50%;bottom:92px;transform:translateX(-50%);display:flex;align-items:center;gap:8px;padding:12px 22px;border-radius:999px;border:0;background:#FFC93C;color:#221D45;font:800 18px/1 inherit;box-shadow:0 6px 0 #E3A600,0 10px 18px rgba(0,0,0,.2);z-index:30;cursor:pointer;animation:pulse 1.6s infinite}
.mg-board{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px}
.mg-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:6px}
.mg-intro{padding:20px}
.mg-tree{display:flex;flex-direction:column;align-items:center}
.mg-canopy{background:radial-gradient(ellipse at 50% 30%,#8E44AD,#5B2C83);border-radius:50% 50% 20% 20%/60% 60% 20% 20%;padding:18px 22px 12px;display:flex;flex-direction:column;gap:8px}
.mg-brow{display:flex;gap:10px;justify-content:center}
.mg-bulb{width:40px;height:40px;border-radius:50%;border:3px solid #B794D4;background:#3E2163;cursor:pointer;transition:all .15s}
.mg-bulb.on{background:radial-gradient(circle,#FFF7C2,#FFC93C 60%,#FF8FB1);border-color:#FFE27A;box-shadow:0 0 14px #FFE27A}
.mg-trunk{width:34px;height:70px;background:linear-gradient(90deg,#6B3A8A,#8E5AA8,#6B3A8A);border-radius:0 0 8px 8px}
.mg-stall{display:flex;gap:18px;align-items:center;flex-wrap:wrap;justify-content:center}
.mg-food{background:#fff;border:4px solid #D7263D;border-radius:18px;padding:10px 16px;text-align:center}
.mg-price{font-size:30px;font-weight:900;color:#D7263D}
.mg-fname{font-weight:700;text-transform:capitalize}
.mg-tray{min-width:220px;min-height:84px;border:3px dashed #C9CDE4;border-radius:14px;display:flex;flex-wrap:wrap;gap:6px;align-items:center;justify-content:center;padding:8px}
.mg-tray em{color:#8A8FB0}
.mg-wallet{display:flex;gap:14px}
.mg-money,.mg-paid{border:0;background:none;padding:0;cursor:pointer}
.mg-coin{display:inline-flex;width:56px;height:56px;border-radius:50%;background:radial-gradient(circle,#F6E7A8,#D9B44A);border:3px solid #B8922E;align-items:center;justify-content:center;font-weight:900;color:#6B4E10}
.mg-note{display:inline-flex;width:92px;height:50px;border-radius:8px;align-items:center;justify-content:center;font-weight:900;color:#fff;font-size:20px;box-shadow:inset 0 0 0 3px rgba(255,255,255,.5)}
.mg-note.v2{background:#7C5CFF}.mg-note.v5{background:#14A86A}
.mg-choices{display:flex;gap:16px;margin-top:10px}
.mg-pick{background:#fff;border:3px solid #E1E4F2;border-radius:16px;padding:8px;cursor:pointer}
.mg-pile{min-height:40px;display:flex;flex-wrap:wrap;gap:2px;justify-content:center;max-width:520px}
.mg-pile em{color:#8A8FB0}
.mg-otters{display:flex;gap:12px;flex-wrap:wrap;justify-content:center}
.mg-otter{background:#E6F6FF;border:3px solid #7FC8F0;border-radius:18px;padding:8px;min-width:96px;cursor:pointer;display:flex;flex-direction:column;align-items:center}
.mg-fishes{display:flex;flex-wrap:wrap;max-width:96px;justify-content:center;min-height:24px}
.mg-beach{display:flex;gap:40px;align-items:flex-end;justify-content:center;width:min(520px,90vw);min-height:260px;padding:10px 30px;background:linear-gradient(#fff0 70%,#F6E2B3 70%);border-radius:14px}
.mg-tower{display:flex;flex-direction:column-reverse;align-items:center}
.mg-tower>b{order:-1;margin-top:6px;font-size:20px}
.mg-bucket{width:56px;height:16px;background:#E9C98A;border:2px solid #C9A15E;border-radius:4px;margin-top:-1px}
.mg-tower.theirs .mg-bucket{background:#D7DBEE;border-color:#A9AFCB}
.mg-clock{background:#fff;border-radius:50%;padding:6px}
.mg-end{text-align:center;padding:20px}
.mg-stars span{font-size:60px;color:#E1E4F2}.mg-stars span.on{color:#FFC93C}
.pearl-total{align-self:center;margin-left:6px;font-size:15px;color:#6B5FA8}
.mg-river{display:flex;flex-direction:column;gap:14px;padding:16px 20px;border-radius:18px;background:linear-gradient(#7FD0F0,#3FA3D6)}
.mg-boat{position:relative;background:#B5452F;border-radius:14px 40px 40px 14px;padding:10px 46px 10px 14px;box-shadow:inset 0 -8px 0 rgba(0,0,0,.2)}
.mg-seats{display:grid;grid-template-columns:repeat(5,44px);gap:6px}
.mg-seat{width:44px;height:44px;border-radius:10px;border:3px solid #F3D9A4;background:#7A4A2A;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}
.mg-seat.on{background:#F7E7C4}
.mg-eye{position:absolute;right:16px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:inset 3px 0 0 4px #221D45}
.mg-eye.l{top:16px}.mg-eye.r{bottom:16px}
.ride-stop b.up{position:absolute;top:-20px;font-size:.68rem;font-weight:800;color:var(--muted);white-space:nowrap}
.gate-ch{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin:12px 0}
.gate-ch .btn{min-width:72px;min-height:64px;font-size:1.4rem}
.mg-clockrow{display:flex;align-items:center;gap:18px}
.mg-sticker{width:84px;height:84px;border-radius:50%;background:#FFC93C;color:#221D45;font:900 44px/84px var(--head);text-align:center;box-shadow:0 4px 0 #E3A600}
.more-btn{position:fixed;left:16px;top:150px;display:flex;align-items:center;gap:8px;padding:8px 16px 8px 8px;border-radius:999px;border:3px solid #7C5CFF;background:#fff;color:#221D45;font:800 16px/1 inherit;z-index:30;cursor:pointer;box-shadow:0 6px 14px rgba(0,0,0,.18);animation:pulse 1.6s infinite}
.more-btn .av{width:40px;height:40px;border-radius:50%;overflow:hidden;display:inline-block}
.more-btn .av svg{width:40px;height:40px}
body:not(.world) .more-btn{display:none!important}
.count-pill{position:fixed;left:50%;top:84px;transform:translateX(-50%);min-width:84px;height:84px;padding:0 18px;border-radius:42px;background:#FFC93C;color:#221D45;font:900 46px/84px var(--head);display:flex;align-items:center;justify-content:center;box-shadow:0 6px 0 #E3A600,0 10px 20px rgba(0,0,0,.2);z-index:30;pointer-events:none}
.count-pill.bump{animation:cbump .35s}
@keyframes cbump{0%{transform:translateX(-50%) scale(1.3)}100%{transform:translateX(-50%) scale(1)}}
body:not(.world) .count-pill{display:none!important}
.mg-hand{position:fixed;width:56px;height:56px;margin:-6px 0 0 -10px;z-index:60;pointer-events:none;background:no-repeat center/contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'><path d='M18 6c2 0 3 1.5 3 3.5V22l2-.4V12c0-2 1.5-3 3-3s3 1 3 3v10l2-.2V15c0-2 1.4-3 3-3s3 1 3 3v8l1.5-.1c0-2 1.3-3 2.8-3S43 21 43 23v8c0 7-5 13-12 13h-5c-4 0-7-2-9-5L9 28c-1-2-.4-4 1.5-4.8 1.6-.7 3.3 0 4.3 1.3l.2.3V9.5C15 7.5 16 6 18 6z' fill='%23FFE0C2' stroke='%23221D45' stroke-width='2.2' stroke-linejoin='round'/></svg>");animation:mghand 1s ease-in-out 3}
@keyframes mghand{0%,100%{transform:translate(0,0) scale(1)}50%{transform:translate(4px,8px) scale(.9)}}
.bubble3d .bub-skip{pointer-events:auto;align-self:center;margin-left:4px;border:0;border-radius:999px;padding:8px 12px;background:#EFEBFF;color:#5B3FD6;font:800 14px/1 inherit;cursor:pointer;min-height:40px}
/* "For Parents" prompts in the lessons */
.parent-tip { display: flex; align-items: flex-start; gap: 10px; max-width: 760px; margin: 12px auto 0; padding: 10px 14px; border-radius: 14px; background: #FFF8E6; border: 2px dashed #E8B84A; color: #5A4310; font-size: .95rem; line-height: 1.35; text-align: left; }
.parent-tip .pt-tag { flex-shrink: 0; background: #E8B84A; color: #fff; font-weight: 700; font-size: .78rem; letter-spacing: .02em; padding: 3px 9px; border-radius: 999px; margin-top: 1px; white-space: nowrap; }
.done-wrap .parent-tip { margin-top: 18px; }
@media (max-width: 600px) { .parent-tip { font-size: .86rem; padding: 8px 10px; } }
/* Eloise's help button shows a little moon when today's lesson is done */
#askSis .sis-moon { position: absolute; top: -8px; right: -6px; width: 26px; height: 26px; border-radius: 50%; background: #2B2F6B; color: #FFE27A; font-size: 17px; line-height: 26px; text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
/* narrow phones: the real-MRT badges get their own line and the card leaves room above the top station labels */
@media (max-width:560px){.ml-real{display:block;margin:2px 0 0}.ml-head{margin-bottom:40px}}
/* "You're ready!" shows the three chests waiting, each with its pearl */
.ready-chests { display: flex; gap: 18px; justify-content: center; margin: 6px 0 14px; }
.ready-chests .rc { position: relative; width: 64px; height: 64px; border-radius: 18px; background: #FFF6DD; display: grid; place-items: center; box-shadow: 0 3px 0 rgba(0,0,0,.08); animation: rcBob 2.2s ease-in-out infinite; }
.ready-chests .rc:nth-child(2) { animation-delay: .25s; } .ready-chests .rc:nth-child(3) { animation-delay: .5s; }
.ready-chests .rc span { position: absolute; bottom: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; background: #7B61FF; color: #fff; font-weight: 800; font-size: 13px; line-height: 24px; text-align: center; }
.ready-chests .rc.done span { background: #2BB673; }
@keyframes rcBob { 50% { transform: translateY(-4px); } }
/* mini-games: big star round markers instead of thin bars */
.prog.mg-prog { justify-content: center; gap: 10px; }
.prog.mg-prog i { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 3px solid var(--line); }
.prog.mg-prog i.done { background: #FFF4CC; border-color: #FFC93C; }
.prog.mg-prog i.cur { border-color: #7B61FF; transform: scale(1.12); }
.mg-again { font-size: 1.15rem; }
/* walk-and-talk "For Parents" card in the 3D world */
.walk-tip { display: none; pointer-events: none; margin-top: 8px; max-width: 340px; background: #FFF8E6; border: 2px dashed #E8B84A; border-radius: 14px; padding: 7px 10px; color: #5A4310; font-size: .84rem; font-weight: 700; line-height: 1.3; gap: 8px; align-items: flex-start; box-shadow: 0 4px 14px rgba(20,10,60,.15); }
.walk-tip.show { display: flex; }
.walk-tip .pt-tag { flex-shrink: 0; background: #E8B84A; color: #fff; font-size: .7rem; padding: 2px 7px; border-radius: 999px; }
@media (max-width: 600px) { .walk-tip { max-width: 230px; font-size: .74rem; } }
/* the tagline: Learn Singapore Math in Singapore! */
.title-wrap .tagline { margin-top: 10px; display: inline-block; padding: 6px 16px; border-radius: 999px; background: linear-gradient(90deg, #DB1438, #FF5A6E); color: #fff; font-family: var(--head); font-weight: 600; font-size: clamp(1rem, 3vw, 1.3rem); box-shadow: 0 4px 14px rgba(219,20,56,.35); }
.map-head .map-tag { display: inline-block; margin: 2px 0 6px; padding: 3px 12px; border-radius: 999px; background: #FFE8EC; color: #C0102F; font-weight: 800; font-size: .9rem; }
/* backup and restore */
.bk-code { width: 100%; box-sizing: border-box; margin: 12px 0 8px; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--line); font-family: ui-monospace, Menlo, monospace; font-size: .8rem; resize: vertical; word-break: break-all; }
.bk-upload { cursor: pointer; }
/* the opening movie: hide the game buttons, keep the speech bubble, offer a skip */
body.intro #hudCard,body.intro .hud-right,body.intro #labels,body.intro .hud-bottom,body.intro #askSis,body.intro #joy,body.intro .help-pill,body.intro #miniBtn,body.intro #moreBtn,body.intro #countPill,body.intro #tutSkip{display:none!important}
.intro-skip{position:fixed;right:16px;bottom:18px;z-index:60;border:0;border-radius:999px;padding:10px 18px;font:800 15px/1 inherit;font-family:inherit;background:rgba(255,255,255,.92);color:#221D45;box-shadow:0 4px 14px rgba(0,0,0,.25);cursor:pointer}
body:not(.world) .intro-skip{display:none}
#introFade{position:fixed;inset:0;background:#fff;opacity:0;pointer-events:none;transition:opacity .9s ease;z-index:55}
#introFade.on{opacity:1}
.ws-prompt .ws-donebtn{margin-top:8px;font-size:.9rem;padding:8px 14px}
.seg.seg-grades{flex-wrap:wrap;border-radius:22px}.seg.seg-grades button{flex:1 0 22%;padding:9px 6px;font-size:1rem}
/* "take it again?" in 3D */
.again-box{background:#fff;border-radius:22px;padding:16px 18px;box-shadow:0 10px 30px rgba(0,0,0,.25);display:grid;grid-template-columns:56px 1fr;gap:6px 12px;align-items:center}
.again-box .av{width:56px;height:56px;border-radius:50%;overflow:hidden;display:block;background:#EEF6FF}
.again-box p{margin:0;font-weight:800;color:var(--ink);font-size:1.05rem;line-height:1.3}
.again-btns{grid-column:1/-1;display:flex;gap:10px;justify-content:center;margin-top:6px}
.again-btns .btn{min-height:48px;padding:10px 18px;font-size:1rem}
/* with every lesson unlocked, stations that aren't today's are open too */
.stop.mrt.open{background:#FFF6D6;color:var(--ink);border-color:var(--c)}
