:root{
  --bg:#DDF1FF;
  --ink:#2A2540;
  --muted:#5E6A88;
  --grass:#BDE7A6;
  --grass-2:#AEDD95;
  --sun:#FFC529;
  --sun-dark:#D99A00;
  --go:#2DB75A;
  --go-dark:#1E8A41;
  --font:"Baloo 2", "Comic Sans MS", "Segoe UI", system-ui, sans-serif;
  color-scheme:light;
}
*{box-sizing:border-box}
html,body{background:var(--bg)}
body{margin:0;font-family:var(--font);color:var(--ink);padding-inline:12px;padding-block:8px 12px;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.app{max-width:1100px;margin-inline:auto;min-height:calc(100dvh - 20px);display:grid;grid-template-rows:auto 1fr;gap:8px}
.bar{display:flex;align-items:center;justify-content:space-between;gap:12px}
.back{color:var(--ink);text-decoration:none;font-weight:700;font-size:15px;padding:6px 14px;border-radius:999px;background:rgba(255,255,255,.75)}
.bar-title{font-weight:800;font-size:19px}
.bar-actions{display:flex;gap:8px}
.icon-btn{width:44px;height:44px;border-radius:50%;border:0;background:rgba(255,255,255,.75);display:grid;place-items:center;cursor:pointer;color:var(--ink);padding:0}
.icon-btn span{display:grid;place-items:center}
.icon-btn span[hidden]{display:none}
.icon-btn svg{width:24px;height:24px}
.overlay{position:fixed;inset:0;z-index:20;display:grid;place-content:center;justify-items:center;gap:20px;text-align:center;padding:24px;background:rgba(234,244,255,.92)}
.overlay[hidden]{display:none}
.rainbow{margin:0;font-weight:800;font-size:clamp(2.6rem,9vw,5rem);line-height:1;text-wrap:balance;text-shadow:0 3px 0 #fff, 0 -2px 0 #fff, 2px 0 0 #fff, -2px 0 0 #fff, 0 10px 20px rgba(42,37,64,.2)}
.rainbow.big{font-size:clamp(2.8rem,10vw,5.5rem)}
.big-btn{width:150px;height:150px;border-radius:50%;border:8px solid #fff;background:var(--sun);padding:0;box-shadow:0 10px 0 var(--sun-dark),0 22px 34px rgba(42,37,64,.25);cursor:pointer;display:grid;place-items:center;animation:breathe 1.6s ease-in-out infinite}
.big-btn svg{width:62%;height:62%}
.big-btn:active{transform:translateY(8px);box-shadow:0 2px 0 var(--sun-dark)}
@keyframes breathe{50%{scale:1.06}}
.parent{max-width:52ch;margin:0;font-size:14px;line-height:1.45;background:rgba(255,255,255,.9);padding:10px 14px;border-radius:14px}
.levels{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;max-width:520px}
.lvl{width:72px;height:80px;border-radius:20px;border:4px solid #fff;background:rgba(255,255,255,.9);display:grid;place-items:center;padding:4px 0;cursor:pointer;font:800 24px/1 var(--font);color:var(--ink);box-shadow:0 5px 0 rgba(42,37,64,.18)}
.lvl small{font-size:13px;letter-spacing:1px;color:#C98F00;min-height:14px}
.lvl .ic{font-size:20px;line-height:1}
.stars{display:flex;gap:10px;font-size:clamp(2.6rem,9vw,4rem);line-height:1}
.stars span{filter:grayscale(1) opacity(.35)}
.stars span.on{filter:none;animation:pop .5s backwards}
.stars span.on:nth-child(2){animation-delay:.25s}
.stars span.on:nth-child(3){animation-delay:.5s}
@keyframes pop{from{scale:0}70%{scale:1.3}}
.row-btns{display:flex;gap:18px;align-items:center}
.small-btn{width:84px;height:84px;border-radius:50%;border:6px solid #fff;background:#8ECDF0;padding:0;cursor:pointer;display:grid;place-items:center;box-shadow:0 6px 0 #4F98C2}
.small-btn svg{width:58%;height:58%}

.stage{display:grid;grid-template-rows:auto 1fr auto 1fr;gap:10px;justify-items:center;align-items:center;min-height:0}
body{background:#DDF1FF}
.stage{display:grid;grid-template-rows:auto auto 1fr auto;gap:10px;justify-items:center;align-items:end;min-height:0;padding-bottom:10px}
.dots{display:flex;gap:6px;justify-content:center}
.dots i{width:14px;height:14px;border-radius:50%;background:rgba(42,37,64,.15)}
.dots i.on{background:var(--sun)}
.task{font-weight:800;font-size:clamp(1.3rem,5vw,2rem);text-align:center;margin:0;text-wrap:balance}
.scene{--w:min(94vw,680px,calc((100dvh - 290px) * 1.4));position:relative;width:var(--w);height:calc(var(--w)*.62 + 60px);align-self:center}
.beam{position:absolute;left:0;right:0;bottom:calc(var(--w)*.16);height:18px;border-radius:9px;background:linear-gradient(#E0A93B,#B9831A);box-shadow:0 4px 0 #8C6212;transform-origin:50% 50%;transition:transform .9s cubic-bezier(.3,1.5,.5,1);z-index:2}
.pan{position:absolute;bottom:100%;left:0;width:42%;min-height:60px;display:flex;flex-wrap:wrap-reverse;justify-content:center;align-content:flex-start;align-items:flex-end;gap:3px;padding:0 4px 2px}
.pan.r{left:auto;right:0}
.fulcrum{position:absolute;left:50%;bottom:0;translate:-50% 0;width:0;height:0;border-left:calc(var(--w)*.09) solid transparent;border-right:calc(var(--w)*.09) solid transparent;border-bottom:calc(var(--w)*.16 + 9px) solid #E4483B;filter:drop-shadow(0 4px 0 #A92F25)}
.blk{width:calc(var(--w)*.1);max-width:56px;min-width:34px;aspect-ratio:1;border-radius:8px;border:0;padding:0;background:#2A64C0;box-shadow:inset 0 -5px 0 rgba(0,0,0,.2);cursor:pointer;animation:drop .35s ease-out backwards}
.blk:nth-child(3n+2){background:#E4483B}.blk:nth-child(3n){background:#1E8A41}
.ani{border:0;background:transparent;padding:0;line-height:1;font-family:"Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif;cursor:pointer;animation:drop .4s ease-out backwards;filter:drop-shadow(0 4px 2px rgba(42,37,64,.2))}
.ani.ok{animation:okp .8s}.ani.no{animation:shake .4s}.ani.hint{animation:hintp 1s ease-in-out infinite}
.wt{display:block;font:800 15px var(--font);color:#1E8A41;text-align:center;font-family:var(--font)}
@keyframes drop{from{translate:0 -60px;opacity:0}}
@keyframes shake{25%{translate:-6px}75%{translate:6px}}
@keyframes okp{30%{filter:drop-shadow(0 0 12px #2DB75A) brightness(1.15);scale:1.15}}
@keyframes hintp{50%{filter:drop-shadow(0 0 12px #FFC529) brightness(1.15);scale:1.08}}
.ctrl{display:flex;gap:18px;justify-content:center;align-items:center;min-height:96px}
.cb{width:92px;height:92px;border-radius:26px;border:6px solid #fff;display:grid;place-items:center;cursor:pointer;padding:0;box-shadow:0 7px 0 rgba(42,37,64,.22)}
.cb:active{transform:translateY(6px);box-shadow:0 1px 0 rgba(42,37,64,.22)}
.cb.add{background:var(--go)}.cb.rem{background:#8ECDF0;width:72px;height:72px}
.cb svg{width:62%;height:62%}
.cb.hint{animation:hintb 1s ease-in-out infinite}
@keyframes hintb{50%{box-shadow:0 0 0 8px var(--sun)}}
.balanced .beam{box-shadow:0 4px 0 #8C6212,0 0 0 6px rgba(45,183,90,.5)}
.blk.big{width:calc(var(--w)*.2);max-width:112px;min-width:68px;aspect-ratio:2/1;background:#6E36B8 !important;background-image:linear-gradient(90deg,transparent calc(50% - 2px),rgba(255,255,255,.55) calc(50% - 2px) calc(50% + 2px),transparent calc(50% + 2px)) !important}
.cb.add.big{width:110px;background:#6E36B8}
