:root{--ink:#07131d;--cream:#f7e6c2;--or1:#ffb13b;--or2:#ff7a1a;--orsh:#c4520a;--bl1:#4fd2ff;--bl2:#1f8cf0;--safe-t:env(safe-area-inset-top,0px);--safe-b:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;touch-action:none;user-select:none;-webkit-user-select:none}
html,body{margin:0;height:100%;overflow:hidden;background:#8fd8ff;font-family:Fredoka,Jua,system-ui,sans-serif;color:#fff}
#bgimg{position:fixed;inset:0;background:#8fd8ff center/cover no-repeat;transition:opacity .3s}
body[data-world="0"] #bgimg{background-image:url(bg/bg1.webp)}body[data-world="1"] #bgimg{background-image:url(bg/bg2.webp)}
body[data-world="2"] #bgimg{background-image:url(bg/bg3.webp)}body[data-world="3"] #bgimg{background-image:url(bg/bg4.webp)}body[data-world="4"] #bgimg{background-image:url(bg/bg5.webp)}
#gl{position:fixed;inset:0;width:100%;height:100%;display:block}
[hidden]{display:none!important}
.ib svg,.dig svg,.hearts svg,.pill svg.st,.bigbtn svg,.cell .s3 svg{fill:currentColor}
.ib{width:46px;height:46px;border-radius:15px;border:0;background:rgba(255,255,255,.94);color:#17314a;display:grid;place-items:center;box-shadow:0 4px 0 rgba(7,19,29,.28);position:relative;padding:0}
.ib svg{width:24px;height:24px}.ib:active{transform:translateY(2px);box-shadow:0 2px 0 rgba(7,19,29,.28)}
.ib.it svg{fill:none;stroke:#17314a;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.ib.it i{position:absolute;right:-5px;top:-6px;min-width:20px;height:20px;border-radius:10px;background:#ff7a1a;color:#fff;font:700 12px/20px Fredoka;text-align:center;font-style:normal;padding:0 4px;box-shadow:0 2px 0 rgba(7,19,29,.3)}
.ib.it.off{opacity:.45}
.ib svg:not(.st){}#selBack svg,#shopBack svg{fill:none;stroke:#17314a;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.pill{height:36px;padding:0 12px;border-radius:18px;background:rgba(7,19,29,.72);display:flex;align-items:center;gap:6px;font:700 17px Fredoka;color:#fff;box-shadow:0 3px 0 rgba(0,0,0,.25)}
.pill img{width:22px;height:22px;object-fit:contain}.pill svg{width:19px;height:19px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round}.pill svg.st{fill:#ffd23f;stroke:none}
.pill small{font-size:12px;opacity:.7;margin-left:-3px}.pill.big{height:48px;font-size:26px;padding:0 20px}.pill.big svg{width:28px;height:28px}
.wdot{width:12px;height:12px;border-radius:50%;background:#6cd24a;box-shadow:0 0 0 2px #fff}
#hud{position:fixed;left:0;right:0;top:0;height:calc(110px + var(--safe-t));pointer-events:none}
#hud>*{position:absolute;pointer-events:auto}
#bPause{left:12px;top:calc(12px + var(--safe-t))}
#pStage{left:68px;top:calc(17px + var(--safe-t))}
#pBone{left:152px;top:calc(17px + var(--safe-t))}
#pTime{left:12px;top:calc(64px + var(--safe-t))}
.hearts{left:104px;top:calc(66px + var(--safe-t));display:flex;gap:4px;pointer-events:none!important}
.hearts svg{width:30px;height:30px;fill:#ff3b5c;filter:drop-shadow(0 2px 0 rgba(7,19,29,.45))}.hearts svg.off{fill:#3a2f3f;opacity:.55}
.tools{right:12px;top:calc(12px + var(--safe-t));display:flex;flex-direction:column;gap:10px}
#ctl{position:fixed;left:0;right:0;bottom:0;height:calc(236px + var(--safe-b));pointer-events:none}
#stick{position:absolute;left:10px;bottom:calc(30px + var(--safe-b));width:160px;height:160px;pointer-events:auto;border-radius:50%;background:rgba(7,19,29,.38);border:3px solid rgba(255,255,255,.5)}
#stick svg{position:absolute;inset:0;width:100%;height:100%}.ar path{fill:rgba(255,255,255,.55)}.ar.on path{fill:#ffb13b}
#knob{position:absolute;left:54px;top:54px;width:52px;height:52px;border-radius:50%;background:linear-gradient(#fff,#cfe9ff);box-shadow:0 4px 0 rgba(7,19,29,.35);pointer-events:none}
.dig{position:absolute;bottom:calc(44px + var(--safe-b));width:86px;height:86px;border-radius:50%;border:0;pointer-events:auto;background:linear-gradient(var(--or1),var(--or2));box-shadow:0 7px 0 var(--orsh),0 10px 14px rgba(0,0,0,.3);display:grid;place-items:center;padding:0;color:#fff}
#dL{right:108px}#dR{right:12px}
.dig svg{width:52px;height:52px}.dig .pk{fill:none;stroke:#fff;stroke-width:4.5;stroke-linecap:round;stroke-linejoin:round}.dig .ar2{fill:none;stroke:var(--ink);stroke-width:4;stroke-linecap:round;stroke-linejoin:round}
.dig.on{transform:translateY(5px);box-shadow:0 2px 0 var(--orsh)}
.dig.pulse,#stick.pulse{animation:pls .8s infinite}
@keyframes pls{50%{transform:scale(1.1);filter:brightness(1.2)}}
#tapmark{position:fixed;width:34px;height:34px;margin:-17px 0 0 -17px;border-radius:50%;border:4px solid #4aff8a;pointer-events:none;animation:tm .5s infinite alternate}
@keyframes tm{to{transform:scale(1.25);opacity:.6}}
#world{position:fixed;inset:0;display:grid;place-items:center;pointer-events:none;z-index:20}
#wname{font:700 38px Jua,Fredoka;color:var(--cream);-webkit-text-stroke:6px #1b2b63;paint-order:stroke fill;text-shadow:0 6px 0 rgba(10,20,70,.6);text-align:center;animation:wn 1.6s both;line-height:1.1}
@keyframes wn{0%{transform:scale(.3) rotate(-6deg);opacity:0}20%{transform:scale(1.15) rotate(2deg);opacity:1}30%{transform:scale(1) rotate(0)}80%{opacity:1}100%{transform:translateY(-60px);opacity:0}}
.scr{position:fixed;inset:0;background:linear-gradient(rgba(9,22,40,.62),rgba(9,22,40,.78));display:flex;flex-direction:column;align-items:center;padding:calc(14px + var(--safe-t)) 14px calc(18px + var(--safe-b));gap:12px;z-index:30;overflow:auto}
.sbar{width:100%;display:flex;gap:8px;align-items:center}.sbar .pill:last-child{margin-left:auto}
.wtabs{display:flex;gap:8px;width:100%;justify-content:center}
.wtab{width:58px;height:58px;border-radius:18px;border:3px solid rgba(255,255,255,.55);background:rgba(255,255,255,.14);display:grid;place-items:center;position:relative;padding:0;color:#fff;font:700 18px Fredoka}
.wtab img{width:40px;height:40px;object-fit:contain}.wtab.on{background:rgba(255,255,255,.95);border-color:#ffb13b;box-shadow:0 4px 0 #c4520a}.wtab.lock img{filter:grayscale(1) brightness(.5)}
.wtab i{position:absolute;right:-4px;bottom:-6px;font:700 11px Fredoka;font-style:normal;background:#07131d;border-radius:9px;padding:1px 6px;color:#ffd23f}
.wtitle{display:flex;align-items:center;gap:10px}.wtitle img{width:48px;height:48px;object-fit:contain}
.wtitle h2{margin:0;font:700 30px Jua,Fredoka;color:var(--cream);-webkit-text-stroke:5px #1b2b63;paint-order:stroke fill}
.grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;width:100%;max-width:420px}
.cell{aspect-ratio:1;border-radius:18px;border:0;background:linear-gradient(#fff,#d6ecff);color:#17314a;font:700 26px Fredoka;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;box-shadow:0 5px 0 #6aa0c8;padding:0;position:relative}
.cell:active{transform:translateY(3px);box-shadow:0 2px 0 #6aa0c8}
.cell .s3{display:flex;gap:1px}.cell .s3 svg{width:14px;height:14px;fill:#ffb61f}.cell .s3 svg.off{fill:#c3d0de}
.cell.lock{background:linear-gradient(#8a9bb0,#6b7c92);box-shadow:0 5px 0 #4a596c;color:#cfd8e3}.cell.lock svg.lk{width:28px;height:28px;fill:none;stroke:#e6edf5;stroke-width:2.4;stroke-linecap:round}
.cell.fin{background:linear-gradient(#ffe6a0,#ffb13b);box-shadow:0 5px 0 #c4520a}
.shopg{grid-template-columns:repeat(2,1fr);max-width:380px}
.card{border-radius:22px;background:linear-gradient(#fff,#e2f1ff);color:#17314a;padding:12px 10px;display:flex;flex-direction:column;align-items:center;gap:6px;box-shadow:0 6px 0 #6aa0c8;font:700 16px Fredoka;position:relative;border:0;min-height:150px}
.card .pv{width:74px;height:74px;display:grid;place-items:center}.card .pv svg{width:62px;height:62px;fill:none;stroke:#17314a;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.card .pr{display:flex;align-items:center;gap:4px;background:#07131d;color:#fff;border-radius:14px;padding:5px 12px;font-size:16px}.card .pr img{width:18px;height:18px}
.card.on{outline:4px solid #ffb13b}.card.own .pr{background:#2a9a5a}.card.no .pr{background:#5b6b80;opacity:.8}
.card .cnt{position:absolute;right:8px;top:8px;background:#ff7a1a;color:#fff;border-radius:11px;min-width:24px;height:22px;padding:0 6px;font:700 13px/22px Fredoka;text-align:center}
.trophy{width:200px;animation:fl 2.4s ease-in-out infinite}@keyframes fl{50%{transform:translateY(-10px) rotate(2deg)}}
#ending{justify-content:center;gap:18px;background:radial-gradient(circle,rgba(255,210,80,.5),rgba(9,22,40,.92))}
#ending h2{margin:0;font:700 46px Jua,Fredoka;color:var(--cream);-webkit-text-stroke:7px #1b2b63;paint-order:stroke fill;text-shadow:0 7px 0 rgba(10,20,70,.6)}
.bigbtn{width:84px;height:84px;border-radius:50%;border:0;background:linear-gradient(var(--or1),var(--or2));box-shadow:0 7px 0 var(--orsh);display:grid;place-items:center;color:#fff}.bigbtn svg{width:44px;height:44px}
#flash{position:fixed;inset:0;background:#fff;opacity:0;pointer-events:none;transition:opacity .35s;z-index:25}#flash.on{opacity:.55;transition:none}
#nogl{display:none;position:fixed;inset:0;background:#fff;color:#17314a;place-items:center;font:700 30px Fredoka;z-index:99}body.nogl #nogl{display:grid}
.kk-menu{background:linear-gradient(rgba(10,25,50,.0),rgba(10,25,50,.0))}
