@font-face{font-family:Nunito;font-style:normal;font-weight:700;font-display:swap;src:url(fonts/nunito-cyrillic-700-normal.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Nunito;font-style:normal;font-weight:800;font-display:swap;src:url(fonts/nunito-cyrillic-800-normal.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Nunito;font-style:normal;font-weight:900;font-display:swap;src:url(fonts/nunito-cyrillic-900-normal.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Nunito;font-style:normal;font-weight:700;font-display:swap;src:url(fonts/nunito-latin-700-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Nunito;font-style:normal;font-weight:800;font-display:swap;src:url(fonts/nunito-latin-800-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Nunito;font-style:normal;font-weight:900;font-display:swap;src:url(fonts/nunito-latin-900-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Rubik;font-style:normal;font-weight:800;font-display:swap;src:url(fonts/rubik-cyrillic-800-normal.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Rubik;font-style:normal;font-weight:900;font-display:swap;src:url(fonts/rubik-cyrillic-900-normal.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:Rubik;font-style:normal;font-weight:800;font-display:swap;src:url(fonts/rubik-latin-800-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Rubik;font-style:normal;font-weight:900;font-display:swap;src:url(fonts/rubik-latin-900-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
/* VOICE: бодрая аркада для всех — азарт и юмор без сюсюканья.
   IDEA: ночная игровая площадка; поле — подсвеченный лоток, моти — яркие глянцевые фишки.
   PICTURE: поле с персонажами, нарисованными кодом (форма + цвет + мордочка).
   COLOUR and TYPE: глубокий индиго → бирюза; акцент — янтарь/золото, второй — бирюзовый; Nunito 800–900.
   Тренд 2025–26 (Royal Match / Match Factory / Block Blast): тёмный насыщенный фон, глянец фишек,
   золотые кнопки с «полкой» снизу, толстая обводка заголовков. Без розового интерфейса и сердечек.
   LAYOUT: цели и ходы сверху, поле по центру, бустеры снизу; один экран, без скролла. */
:root{--ease-out:cubic-bezier(0.23,1,0.32,1);--ease-in-out:cubic-bezier(0.77,0,0.175,1);--ease-pop:cubic-bezier(0.34,1.56,0.64,1);--ease-sine:cubic-bezier(0.37,0,0.63,1);--disp:Rubik,Nunito,system-ui,sans-serif;--ink:#f2f0ff;--ink2:#a9b0e6;--acc:#ffb627;--acc2:#ff6a3d;--teal:#2ee6c5;--card:#262c6b;--card2:#323a85;--sh:#10133a;--good:#3ee08a}
*{box-sizing:border-box;min-width:0}
html,body{height:100%;margin:0}
body{font-family:Nunito,system-ui,sans-serif;color:var(--ink);overflow:hidden;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;
background:
 radial-gradient(circle at 12px 12px,rgba(255,255,255,.22) 1.2px,transparent 2.2px) 0 0/52px 52px,
 radial-gradient(circle at 38px 30px,rgba(46,230,197,.28) 1.4px,transparent 2.4px) 0 0/52px 52px,
 radial-gradient(circle at 24px 44px,rgba(255,182,39,.3) 1.2px,transparent 2.2px) 0 0/52px 52px,
 radial-gradient(120% 70% at 50% 0%,#3a3f9a 0%,transparent 60%),
 linear-gradient(175deg,#252a6e 0%,#181b48 55%,#0b4656 100%);background-color:#181b48}
#app{height:100%;height:100dvh;max-width:600px;margin:0 auto;display:flex;flex-direction:column;gap:8px;padding:max(10px,env(safe-area-inset-top)) 12px max(10px,env(safe-area-inset-bottom))}
.top{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px}
.card{background:linear-gradient(#2d3479,var(--card));border-radius:18px;box-shadow:0 4px 0 var(--sh),0 10px 22px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.12);padding:6px 12px}
.lbl{font-size:12px;font-weight:800;color:var(--ink2);text-transform:uppercase;letter-spacing:.04em}
.goals{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.goal{display:flex;align-items:center;gap:2px;font-weight:900;font-size:19px}
.goal canvas{width:36px;height:36px}
.goal.done b{color:var(--good)}
.mv{text-align:center;min-width:72px}
.moves{font-size:32px;font-weight:900;color:var(--acc);line-height:1.05}
.moves.low{color:var(--acc2);animation:pulse 1.2s var(--ease-sine) infinite}
.ib{width:48px;border:0;border-radius:16px;background:linear-gradient(#2d3479,var(--card));box-shadow:0 4px 0 var(--sh),inset 0 1px 0 rgba(255,255,255,.12);display:grid;place-items:center;color:var(--ink);cursor:pointer;padding:0}
.ib:focus-visible,.bt:focus-visible,.btn:focus-visible,.node:focus-visible,.ib2:focus-visible{outline:3px solid var(--teal);outline-offset:2px}
.sub{display:flex;align-items:center;gap:10px;font-weight:800;font-size:14px;white-space:nowrap;color:var(--ink2)}
.sub b{font-size:17px;color:var(--ink)}
#lvlname{color:var(--ink)}
.party{flex:1;display:flex;align-items:center;gap:6px}
.pbar{flex:1;height:14px;border-radius:10px;background:#11143a;border:2px solid #11143a;box-shadow:inset 0 2px 3px rgba(0,0,0,.4);overflow:hidden}
.pbar i{display:block;height:100%;border-radius:8px;background:linear-gradient(90deg,#2ee6c5,#45b4ff,#a77bff,#ff6a3d,#ffb627);width:100%;clip-path:inset(0 100% 0 0 round 8px);transition:clip-path 300ms var(--ease-out)}
.pbar{position:relative}
.pbar.hot::after{content:"";position:absolute;inset:-2px;border-radius:10px;box-shadow:inset 0 0 0 2px rgba(255,214,92,.9),0 0 14px rgba(255,182,39,.8);animation:glow 1.2s var(--ease-sine) infinite;pointer-events:none}
@keyframes glow{50%{opacity:.3}}
#wrap{flex:1;min-height:0;position:relative}
#cv{position:absolute;inset:0;width:100%;height:100%;touch-action:none}
#gx{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
#tip{position:absolute;left:50%;top:4px;transform:translateX(-50%);background:#0c0e2a;color:#fff;font-weight:800;font-size:14px;padding:7px 16px;border-radius:999px;border:1px solid rgba(255,255,255,.15);opacity:0;transition:opacity 150ms ease;pointer-events:none;white-space:nowrap;z-index:2}
#tip.on{opacity:1}
.tools{display:flex;justify-content:center;align-items:flex-end;gap:14px;padding:6px 0 6px}
.bt{position:relative;width:66px;height:66px;border-radius:20px;border:2px solid #14173f;padding:0;cursor:pointer;display:grid;place-items:center;transition:transform 160ms var(--ease-out);
 background:linear-gradient(#6f79e0,#3d459c 55%,#2b3178);box-shadow:0 6px 0 #14173f,0 12px 20px rgba(0,0,0,.4),inset 0 2px 0 rgba(255,255,255,.35),inset 0 -4px 0 rgba(0,0,0,.18)}
.bt svg,.bt img{width:44px;height:44px;filter:drop-shadow(0 2px 0 rgba(0,0,0,.35))}
.bt.snd{width:52px;height:52px;border-radius:50%;background:linear-gradient(#2d3479,var(--card));box-shadow:0 5px 0 #14173f,inset 0 1px 0 rgba(255,255,255,.15)}
.bt.snd svg{width:30px;height:30px}
body.art .code-only,body:not(.art) .art-only{display:none}
.bt.on{transform:translateY(4px);box-shadow:0 2px 0 #14173f,0 0 0 4px var(--teal),0 0 20px rgba(46,230,197,.6),inset 0 2px 0 rgba(255,255,255,.35)}
.bt .n{position:absolute;right:-9px;top:-9px;min-width:26px;height:26px;padding:0 5px;border-radius:13px;background:linear-gradient(#ffd35c,#ffa41b);color:#3a1c00;font:900 15px var(--disp);display:grid;place-items:center;border:2px solid #14173f;box-shadow:0 2px 0 #14173f}
.bt .n.ad{background:var(--teal);color:#06332d;font-size:11px}
.bt.empty{filter:grayscale(.8) brightness(.7)}
#ov{position:fixed;inset:0;display:none;place-items:center;padding:16px;background:rgba(6,8,28,.62);z-index:5}
/* размытие — только под карточками; на полноэкранных экранах его нет совсем (WebKit оставлял слой размытия по форме карточки) */
#ov.on:not(.full){backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
#ov.on{display:grid}
.pn{width:min(400px,100%);max-height:calc(100dvh - 32px);overflow:auto;background:linear-gradient(#2b3176,#1f245c);border:1px solid rgba(255,255,255,.1);border-radius:26px;padding:20px 18px;text-align:center;box-shadow:0 8px 0 var(--sh),0 24px 50px rgba(0,0,0,.5);animation:popin 320ms var(--ease-pop)}
.pn h2{font-size:32px;line-height:1.05;margin:4px 0 8px;font-weight:900;color:var(--acc);text-wrap:balance;text-shadow:0 3px 0 rgba(0,0,0,.35)}
.pn p{font-size:16px;font-weight:700;margin:6px 0 12px;color:var(--ink)}
.logo{font-weight:900;line-height:.9;margin:2px 0 0;letter-spacing:.01em}
.logo .a{display:block;font-size:58px;color:var(--acc);-webkit-text-stroke:5px #14173f;paint-order:stroke fill;text-shadow:0 6px 0 #a3530a,0 12px 22px rgba(0,0,0,.45)}
.logo .b{display:inline-block;font-size:66px;color:var(--teal);-webkit-text-stroke:5px #14173f;paint-order:stroke fill;transform:rotate(-6deg);text-shadow:0 6px 0 #0a7569,0 12px 22px rgba(0,0,0,.45)}
#logoCv{width:100%;height:92px;display:block;margin:4px 0}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:52px;padding:0 26px;border:0;border-radius:16px;background:linear-gradient(#ffd35c,#ffa41b);color:#3a1c00;font:800 19px var(--disp);box-shadow:0 5px 0 #b86a00,inset 0 2px 0 rgba(255,255,255,.5);cursor:pointer;margin:5px}
.btn.alt{background:linear-gradient(#6ff5dd,#1fc0a6);color:#05332c;box-shadow:0 5px 0 #0a7569,inset 0 2px 0 rgba(255,255,255,.5)}
.btn.ghost{background:var(--card2);color:var(--ink);box-shadow:0 5px 0 var(--sh),inset 0 1px 0 rgba(255,255,255,.15)}
.btn svg{width:22px;height:22px;flex:none}
.gl{display:flex;justify-content:center;gap:16px;margin:10px 0 14px;font-weight:900;font-size:22px}
.gl span{display:flex;align-items:center;gap:4px}
.gl canvas{width:46px;height:46px}
.stars{display:flex;justify-content:center;gap:6px;font-size:58px;line-height:1;margin:4px 0 6px}
.stars span{color:#3a4190;animation:starin 300ms var(--ease-out) both}
.stars span.on{color:var(--acc);text-shadow:0 4px 0 #a3530a}
.row{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:6px}
.lang{background:none;border:0;color:var(--ink2);font:800 14px Nunito,system-ui,sans-serif;cursor:pointer;padding:8px;text-decoration:underline}
/* Rubik — заголовки, цифры, кнопки; Nunito — обычный текст */
.logo,.pn h2,.moves,.goal,.lv b,.btn,.gl,.stars,.sub b,#lvlname,.bt .n{font-family:var(--disp)}
.btn{font-weight:800;letter-spacing:.01em}
.logo{letter-spacing:-.01em}
.btn{transition:transform 160ms var(--ease-out),filter 150ms ease}
@media (hover:hover) and (pointer:fine){.btn:hover{filter:brightness(1.07)}.node:not(:disabled):hover{filter:brightness(1.1)}}
.btn:active{transform:translateY(3px) scale(.97)}
.bt:active{transform:scale(.95)}
#ov.on{animation:fadein 200ms var(--ease-out)}
.gl span{animation:tilein 300ms var(--ease-out) both}.gl span:nth-child(2){animation-delay:50ms}.gl span:nth-child(3){animation-delay:90ms}.gl span:nth-child(4){animation-delay:120ms}
.pn h2{animation:h2in 300ms var(--ease-pop) both}
@keyframes fadein{from{opacity:0}}
@keyframes tilein{from{transform:translateY(8px) scale(.95);opacity:0}}
@keyframes h2in{from{transform:translateY(6px) scale(.92);opacity:0}}
.btn.sm{min-height:42px;padding:0 18px;font-size:16px;margin:0}
.pn p{text-wrap:balance}
.pn p.small{font-size:14px;color:var(--ink2)}
.howl{list-style:none;margin:6px 0 8px;padding:0;text-align:left;font-weight:700;font-size:15px}
.howl li{display:flex;gap:12px;align-items:center;margin:8px 0;line-height:1.3}
.howl canvas{width:42px;height:42px;flex:none}
/* ---------- главный экран и карта: на весь экран, без карточки ---------- */
#ov.full{padding:0;background:radial-gradient(120% 60% at 50% 0%,#3a3f9a 0%,transparent 60%),linear-gradient(175deg,#252a6e 0%,#181b48 55%,#0b4656 100%)}
#ov.full::before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at 12px 12px,rgba(255,255,255,.22) 1.2px,transparent 2.2px) 0 0/52px 52px,radial-gradient(circle at 38px 30px,rgba(46,230,197,.28) 1.4px,transparent 2.4px) 0 0/52px 52px,radial-gradient(circle at 24px 44px,rgba(255,182,39,.3) 1.2px,transparent 2.2px) 0 0/52px 52px}
.pn.home,.pn.map{position:relative;width:min(560px,100%);height:100dvh;max-height:none;background:none;border:0;box-shadow:none;border-radius:0;display:flex;flex-direction:column;overflow:hidden;
 padding:max(12px,env(safe-area-inset-top)) 16px max(14px,env(safe-area-inset-bottom));animation:fadein 250ms var(--ease-out)}
.pn.home .hmain>*,.pn.home .hfoot>*{animation:rise 300ms var(--ease-out) both}
.pn.home .hmain>:nth-child(2){animation-delay:50ms}.pn.home .hmain>:nth-child(3){animation-delay:90ms}.pn.home .hfoot>:nth-child(1){animation-delay:120ms}.pn.home .hfoot>:nth-child(2){animation-delay:150ms}
@keyframes rise{from{opacity:0;transform:translateY(8px)}}
.hbar{display:flex;align-items:center;gap:8px;flex:none}
.hbar .sp{flex:1}
.pill{display:flex;align-items:center;gap:6px;height:44px;padding:0 14px 0 8px;border-radius:22px;background:linear-gradient(#2d3479,var(--card));box-shadow:0 4px 0 var(--sh),inset 0 1px 0 rgba(255,255,255,.12);font-family:var(--disp);font-weight:900}
.pill svg{width:28px;height:28px}.pill b{font-size:20px}.pill span{color:var(--ink2);font-size:14px}
.ib2{width:46px;height:44px;border:0;border-radius:15px;background:linear-gradient(#2d3479,var(--card));box-shadow:0 4px 0 var(--sh),inset 0 1px 0 rgba(255,255,255,.12);color:var(--teal);display:grid;place-items:center;cursor:pointer;padding:0;font:900 15px var(--disp)}
.ib2 svg{width:26px;height:26px}.ib2.lng{color:var(--ink)}.ib2.snd.off{color:var(--ink2)}.ib2.snd.off .sw2{opacity:.15}
.ib2{transition:transform 160ms var(--ease-out)}
.ib2:active{transform:translateY(3px) scale(.97)}
.hmain{flex:1;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}
.logo.big .a{font-size:min(17vw,84px)}.logo.big .b{font-size:min(19vw,96px)}
.pn.home #logoCv{height:min(22vh,130px);margin:6px 0 10px}
.chap{width:min(100%,380px);display:grid;grid-template-columns:1fr auto;gap:6px 10px;align-items:center;text-align:left;padding:12px 16px;border-radius:20px;background:linear-gradient(#2d3479,var(--card));box-shadow:0 5px 0 var(--sh),inset 0 1px 0 rgba(255,255,255,.12)}
.chn{font:900 20px var(--disp);line-height:1.1}.chn small{display:block;font:800 12px Nunito,sans-serif;color:var(--ink2);text-transform:uppercase;letter-spacing:.06em}
.chc{font:900 18px var(--disp);color:var(--acc)}
.chbar{grid-column:1/-1;height:12px;border-radius:8px;background:#11143a;box-shadow:inset 0 2px 3px rgba(0,0,0,.4);overflow:hidden}
.chbar i{display:block;height:100%;border-radius:8px;background:linear-gradient(90deg,#2ee6c5,#ffb627)}
.hfoot{flex:none;display:flex;flex-direction:column;align-items:center;gap:12px}
.btn.play.big{width:min(100%,380px);min-height:76px;font-size:30px;flex-direction:column;gap:0;line-height:1;margin:0;animation:breathe 2.4s var(--ease-sine) infinite}
.btn.play.big small{font:800 14px Nunito,sans-serif;opacity:.8;margin-top:4px}
.hrow{display:flex;gap:10px;justify-content:center;width:min(100%,380px)}.hrow .btn{flex:1}
.btn.sm{min-height:46px;padding:0 14px;font-size:16px;margin:0}
@keyframes breathe{50%{transform:scale(1.03)}}
/* карта */
.mapsc{flex:1;min-height:0;overflow-y:auto;margin:10px -16px 0;scrollbar-width:none}.mapsc::-webkit-scrollbar{display:none}
.map{position:relative;width:100%}
.band{position:absolute;left:-20%;right:-20%;opacity:.9}
.band.ch0{background:radial-gradient(ellipse 50% 48% at 50% 50%,rgba(46,200,170,.26),rgba(46,200,170,.1) 55%,transparent 75%)}
.band.ch1{background:radial-gradient(ellipse 50% 48% at 50% 50%,rgba(70,190,90,.26),rgba(70,190,90,.1) 55%,transparent 75%)}
.band.ch2{background:radial-gradient(ellipse 50% 48% at 50% 50%,rgba(90,160,255,.26),rgba(90,160,255,.1) 55%,transparent 75%)}
.band.ch3{background:radial-gradient(ellipse 50% 48% at 50% 50%,rgba(255,110,50,.26),rgba(255,110,50,.1) 55%,transparent 75%)}
.band.ch4{background:radial-gradient(ellipse 50% 48% at 50% 50%,rgba(150,100,255,.26),rgba(150,100,255,.1) 55%,transparent 75%)}
.chb{position:absolute;left:50%;transform:translateX(-50%);white-space:nowrap;padding:8px 18px;border-radius:14px;font:900 15px var(--disp);letter-spacing:.02em;
 background:linear-gradient(#ffd35c,#ffa41b);color:#3a1c00;box-shadow:0 4px 0 #b86a00,0 8px 16px rgba(0,0,0,.3);z-index:2}
.road{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none}
.road .r1{fill:none;stroke:rgba(8,10,40,.55);stroke-width:22;stroke-linecap:round;vector-effect:non-scaling-stroke}
.road .r2{fill:none;stroke:rgba(255,255,255,.35);stroke-width:4;stroke-dasharray:2 12;stroke-linecap:round;vector-effect:non-scaling-stroke}
.node{position:absolute;transform:translate(-50%,-50%);transition:transform 160ms var(--ease-out),filter 150ms ease;width:58px;height:58px;border-radius:50%;border:0;padding:0;cursor:pointer;display:grid;place-items:center;z-index:1;
 background:radial-gradient(circle at 35% 30%,#6a74d8,#323a85 70%);box-shadow:0 6px 0 #161a45,inset 0 2px 0 rgba(255,255,255,.25),0 0 0 4px #1d2258;color:#fff}
.node b{font:900 22px var(--disp);text-shadow:0 2px 0 rgba(0,0,0,.35)}
.node b svg{width:22px;height:22px;display:block}
.node.done{background:radial-gradient(circle at 35% 30%,#ffe590,#ffb627 60%,#e0800f);box-shadow:0 6px 0 #a3530a,inset 0 2px 0 rgba(255,255,255,.5),0 0 0 4px #1d2258}
.node.done b{color:#5a2a00;text-shadow:0 1px 0 rgba(255,255,255,.4)}
.node.lock{background:radial-gradient(circle at 35% 30%,#3c4380,#232866 70%);color:#7b82c0;cursor:default}
.node.cur{width:70px;height:70px;background:radial-gradient(circle at 35% 30%,#8ff8e6,#2ee6c5 55%,#0f9e88);box-shadow:0 7px 0 #0a7569,inset 0 2px 0 rgba(255,255,255,.55),0 0 0 5px #1d2258,0 0 26px rgba(46,230,197,.7)}
.node.cur b{color:#053a33;font-size:24px;text-shadow:none}
.node.cur canvas{position:absolute;width:54px;height:54px;left:50%;top:-44px;transform:translateX(-50%);animation:hop 1.2s var(--ease-sine) infinite}
.node .st{position:absolute;bottom:-20px;left:50%;transform:translateX(-50%);font-size:13px;color:var(--acc);letter-spacing:-1px;white-space:nowrap;text-shadow:0 1px 0 #0a0c2e}
.node:not(:disabled):active{transform:translate(-50%,-50%) scale(.95)}
@keyframes hop{50%{transform:translateX(-50%) translateY(-6px)}}
@media (max-height:640px){.pn.home #logoCv{height:80px}.logo.big .a{font-size:56px}.logo.big .b{font-size:64px}.btn.play.big{min-height:64px;font-size:26px}}
/* ---------- ИИ-арт: фоны глав (body.art ставит game.js, когда арт загрузился) ---------- */
body.art{--chbg:url(art/bg-ch1.webp?v=2)}
body.art[data-ch="2"]{--chbg:url(art/bg-ch2.webp?v=2)}body.art[data-ch="3"]{--chbg:url(art/bg-ch3.webp?v=2)}
body.art[data-ch="4"]{--chbg:url(art/bg-ch4.webp?v=2)}body.art[data-ch="5"]{--chbg:url(art/bg-ch5.webp?v=2)}
body.art{background:linear-gradient(180deg,rgba(14,16,52,.5),rgba(8,10,34,.72)),var(--chbg) center/cover no-repeat;background-color:#181b48}
body.art #ov.full{background:linear-gradient(180deg,rgba(14,16,52,.25) 0%,rgba(10,12,40,.55) 55%,rgba(8,10,34,.85) 100%),var(--chbg) center/cover no-repeat}
body.art #ov.full::before{display:none}
body.art .band{left:0;right:0;opacity:.75;background-size:cover!important;background-position:center!important;
 -webkit-mask-image:linear-gradient(transparent,#000 14%,#000 86%,transparent);mask-image:linear-gradient(transparent,#000 14%,#000 86%,transparent)}
body.art .band.ch0{background:url(art/bg-ch1.webp?v=2)}body.art .band.ch1{background:url(art/bg-ch2.webp?v=2)}body.art .band.ch2{background:url(art/bg-ch3.webp?v=2)}
body.art .band.ch3{background:url(art/bg-ch4.webp?v=2)}body.art .band.ch4{background:url(art/bg-ch5.webp?v=2)}
body.art .mapsc{background:rgba(8,10,34,.35)}
/* тонкие полосы прокрутки в цвет темы (Windows рисует белые) */
.pn{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.22) transparent}
.pn::-webkit-scrollbar{width:8px}
.pn::-webkit-scrollbar-thumb{background:rgba(255,255,255,.22);border-radius:8px}
.pn::-webkit-scrollbar-track{background:transparent}
@keyframes popin{from{transform:scale(.92);opacity:0}}
@keyframes starin{from{transform:scale(1.6) rotate(-12deg);opacity:0}}
@keyframes pulse{50%{transform:scale(1.06)}}
@media (max-width:400px){.goal canvas{width:30px;height:30px}.goal{font-size:17px}.mv{min-width:62px}}
@media (max-height:660px){.bt{width:54px;height:54px;border-radius:17px}.bt svg,.bt img{width:36px;height:36px}.moves{font-size:26px}.goal canvas{width:30px;height:30px}}
@media (prefers-reduced-motion:reduce){
 .btn.play.big,.node.cur canvas,.moves.low,.pbar.hot::after{animation:none}
 #ov.on,.pn,.pn h2,.gl span,.stars span,.pn.home .hmain>*,.pn.home .hfoot>*{animation-name:fadein}
 .btn,.bt,.ib2,.node{transition:filter 150ms ease}
 .btn:active,.bt:active,.ib2:active{transform:none}.node:not(:disabled):active{transform:translate(-50%,-50%)}}
/* ---------- экономика: монеты, магазин, сложные уровни ---------- */
.pill.cp{border:0;color:var(--ink);cursor:pointer;padding:0 6px 0 6px;gap:5px;transition:transform 160ms var(--ease-out)}
.pill.cp:active{transform:translateY(3px) scale(.97)}
.pill.cp i{font:900 18px/1 var(--disp);font-style:normal;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(#6ff5dd,#1fc0a6);color:#05332c;box-shadow:0 2px 0 #0a7569}
div.pill.cp{cursor:default;padding:0 14px 0 8px}
svg.coin{width:26px;height:26px;flex:none}
@media (max-width:380px){.hbar .pill span{display:none}.pill{padding:0 10px 0 6px}}
.hside{display:flex;gap:10px;margin-top:10px;flex:none}
.feat{position:relative;width:64px;height:64px;border:0;border-radius:18px;padding:4px 0 0;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;color:var(--ink);
 background:linear-gradient(#2d3479,var(--card));box-shadow:0 4px 0 var(--sh),inset 0 1px 0 rgba(255,255,255,.12);transition:transform 160ms var(--ease-out)}
.feat svg{width:34px;height:34px;filter:drop-shadow(0 2px 0 rgba(0,0,0,.35))}
.feat span{font:800 11px var(--disp);letter-spacing:.01em}
.feat:active{transform:translateY(3px) scale(.97)}
.bdg{position:absolute;right:-6px;top:-6px;min-width:22px;height:22px;border-radius:11px;display:grid;place-items:center;font:900 14px/1 var(--disp);font-style:normal;background:linear-gradient(#ff7a8a,#e0324a);color:#fff;border:2px solid #14173f}
.bt .n.plus{background:linear-gradient(#6ff5dd,#1fc0a6);color:#05332c;font-size:19px}
.bt.empty{filter:none}.bt.empty svg,.bt.empty img{filter:grayscale(.6) brightness(.8) drop-shadow(0 2px 0 rgba(0,0,0,.35))}
.dtag{display:inline-flex;align-items:center;gap:4px;padding:4px 12px 4px 8px;border-radius:14px;font:800 14px var(--disp);color:#fff;margin:2px 0 4px}
.dtag svg{width:18px;height:18px}
.dtag.d1{background:linear-gradient(#ff6d7e,#d8283f);box-shadow:0 3px 0 #7a1020;color:#fff}.dtag.d1 svg{color:#ffd84a}
.dtag.d2{background:linear-gradient(#b977ff,#7a2fe0);box-shadow:0 3px 0 #3d127a}.dtag.d2 svg{color:#ff6d7e}
.node .dg{position:absolute;right:-6px;top:-8px;width:24px;height:24px;color:#ff5468;filter:drop-shadow(0 2px 0 rgba(0,0,0,.4))}
.node.d2 .dg{color:#b977ff}.node .dg svg{width:24px;height:24px;display:block}
.node.d1:not(.lock){box-shadow:0 6px 0 #a3530a,inset 0 2px 0 rgba(255,255,255,.5),0 0 0 4px #d8283f}
.node.d2:not(.lock){box-shadow:0 6px 0 #a3530a,inset 0 2px 0 rgba(255,255,255,.5),0 0 0 4px #7a2fe0}
.node.cur.d1,.node.cur.d2{box-shadow:0 7px 0 #0a7569,inset 0 2px 0 rgba(255,255,255,.55),0 0 0 5px #d8283f,0 0 26px rgba(46,230,197,.7)}
.node.cur.d2{box-shadow:0 7px 0 #0a7569,inset 0 2px 0 rgba(255,255,255,.55),0 0 0 5px #7a2fe0,0 0 26px rgba(46,230,197,.7)}
.node.lock.d1,.node.lock.d2{box-shadow:0 5px 0 #10133a}
.gain{display:inline-flex;align-items:center;gap:8px;padding:6px 18px 6px 10px;margin:0 0 10px;border-radius:22px;background:#11143a;box-shadow:inset 0 2px 4px rgba(0,0,0,.4)}
.gain svg.coin{width:34px;height:34px}.gain b{font:900 28px var(--disp);color:var(--acc);font-variant-numeric:tabular-nums;min-width:3ch;text-align:left}
.got{color:var(--teal)!important}
.btn.coinb svg.coin{width:22px;height:22px;margin-left:2px}
.btn.coinb.poor{filter:grayscale(.5) brightness(.85)}
.pn.shop{width:min(440px,100%);position:relative}
.shbar{display:flex;align-items:center;justify-content:space-between;gap:10px}.shbar h2{margin:0;text-align:left}
.shl{display:flex;flex-direction:column;gap:10px;margin:8px 0 14px}
.shi{display:grid;grid-template-columns:56px 1fr auto;gap:10px;align-items:center;text-align:left;padding:10px;border-radius:18px;background:#1a1f52;box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}
.shi .ic{position:relative;width:56px;height:56px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(#ffd35c,#ffa41b);box-shadow:0 4px 0 #b86a00,inset 0 2px 0 rgba(255,255,255,.5)}
.shi .ic svg,.shi .ic img{width:40px;height:40px;filter:drop-shadow(0 2px 0 rgba(0,0,0,.3))}
.shi .ic .n{position:absolute;right:-7px;top:-7px;min-width:24px;height:24px;padding:0 5px;border-radius:12px;background:var(--teal);color:#05332c;font:900 14px var(--disp);display:grid;place-items:center;border:2px solid #14173f}
.shi .tx b{display:block;font:900 17px var(--disp)}.shi .tx small{display:block;font-size:13px;font-weight:700;color:var(--ink2);line-height:1.25}
.shi .ac{display:flex;flex-direction:column;gap:8px}.shi .ac .btn{min-height:40px;padding:0 12px;font-size:16px;gap:4px}
.shi .ac .btn:disabled{opacity:.45;cursor:default}
.toast{position:absolute;left:50%;bottom:14px;transform:translate(-50%,8px);padding:8px 16px;border-radius:14px;background:#0b0d2a;color:var(--ink);font-weight:800;font-size:14px;opacity:0;pointer-events:none;transition:opacity 200ms var(--ease-out),transform 200ms var(--ease-out);white-space:nowrap;z-index:3}
.toast.on{opacity:1;transform:translate(-50%,0)}
.pn:not(.home):not(.map){position:relative}
@media (prefers-reduced-motion:reduce){.pill.cp,.feat{transition:none}.pill.cp:active,.feat:active{transform:none}.toast{transform:translate(-50%,0)}}
@media (max-width:430px){.hbar .pill span{display:none}.hbar .pill{padding:0 10px 0 6px;gap:4px}.hbar .pill.cp{padding:0 5px 0 6px}.hbar .pill b{font-size:18px}.hbar .ib2{width:42px}.hbar{gap:6px}}
/* ---------- удержание: фичи хаба, подарок дня, колесо, копилка, сундук ---------- */
.hside{flex-wrap:wrap}
.feat{overflow:visible}
.feat s{position:absolute;left:8px;bottom:5px;height:4px;border-radius:2px;background:#ff8fa3;max-width:48px;text-decoration:none}
.feat.hot svg{animation:wiggle 2.6s var(--ease-sine) infinite}
@keyframes wiggle{0%,80%,100%{transform:none}86%{transform:rotate(-9deg)}93%{transform:rotate(7deg)}}
.chap{position:relative;padding-right:86px}
.chest{position:absolute;right:10px;top:50%;transform:translateY(-50%);width:68px;height:68px;border:0;border-radius:18px;padding:2px 0 0;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;
 background:#1a1f52;box-shadow:inset 0 2px 4px rgba(0,0,0,.35);color:var(--ink2);transition:transform 160ms var(--ease-out)}
.chest svg{width:40px;height:40px;filter:drop-shadow(0 2px 0 rgba(0,0,0,.35))}
.chest small{font:800 11px var(--disp)}
.chest.ready{background:linear-gradient(#ffd35c,#ffa41b);box-shadow:0 4px 0 #b86a00,0 0 18px rgba(255,182,39,.6);color:#3a1c00}
.chest.ready svg{animation:wiggle 2s var(--ease-sine) infinite}
.chest.open{opacity:.55}
.chest:active{transform:translateY(-50%) scale(.95)}
.rw{display:inline-flex;align-items:center;gap:2px;font:900 15px var(--disp);color:var(--ink);white-space:nowrap}
.rw svg,.rw img{width:24px;height:24px;flex:none}
.days{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:10px 0 14px}
.day{position:relative;min-height:84px;border-radius:16px;padding:6px 4px;background:#1a1f52;box-shadow:inset 0 1px 0 rgba(255,255,255,.08);display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:4px}
.day small{font:800 11px var(--disp);color:var(--ink2)}
.day>div{display:flex;flex-wrap:wrap;justify-content:center;gap:2px 6px}
.day.big{grid-column:span 2;background:linear-gradient(#3a2f8a,#2a2470)}
.day.now{background:linear-gradient(#ffd35c,#ffa41b);box-shadow:0 4px 0 #b86a00,0 0 0 3px #fff3}
.day.now small,.day.now .rw{color:#3a1c00}
.day.got{opacity:.5}
.day .ok{position:absolute;right:4px;top:3px;font:900 14px var(--disp);color:var(--teal);font-style:normal}
.wheel{position:relative;width:min(290px,72vw);aspect-ratio:1;margin:8px auto 14px}
.wr{position:absolute;inset:0;border-radius:50%;box-shadow:0 6px 0 var(--sh),0 0 0 6px #14173f,0 0 30px rgba(255,182,39,.35)}
.wr svg{width:100%;height:100%;display:block}
.wl{position:absolute;inset:0;pointer-events:none}
.wl span{position:absolute;left:50%;top:9%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center}
.wl .rw{flex-direction:column;gap:0;font-size:13px}.wl .rw svg,.wl .rw img{width:26px;height:26px}
.wp{position:absolute;left:50%;top:-12px;width:0;height:0;transform:translateX(-50%);border:13px solid transparent;border-top:24px solid #ff5468;filter:drop-shadow(0 2px 0 #14173f);z-index:2}
.wc{position:absolute;left:50%;top:50%;width:22%;height:22%;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(circle at 35% 30%,#8ff8e6,#2ee6c5 55%,#0f9e88);box-shadow:0 3px 0 #0a7569,0 0 0 4px #14173f}
.pig{display:grid;place-items:center;margin:6px 0}.pig svg{width:120px;height:120px;filter:drop-shadow(0 5px 0 rgba(0,0,0,.35))}
.pgbar{position:relative;height:34px;border-radius:17px;background:#11143a;box-shadow:inset 0 2px 4px rgba(0,0,0,.45);overflow:hidden;margin:4px 0 14px}
.pgbar i{position:absolute;left:0;top:0;bottom:0;background:linear-gradient(90deg,#ff8fa3,#ffb627);border-radius:17px}
.pgbar b{position:relative;display:flex;align-items:center;justify-content:center;gap:6px;height:100%;font:900 17px var(--disp);text-shadow:0 1px 0 rgba(0,0,0,.5)}
.pgbar b svg{width:22px;height:22px}
.pigl{display:flex;align-items:center;justify-content:center;gap:6px;margin:-4px 0 10px!important}.pigl svg{width:22px;height:22px}
.rws{display:flex;flex-wrap:wrap;justify-content:center;gap:10px 18px;margin:6px 0 16px}
.rws .rw{font-size:26px;gap:6px}.rws .rw svg,.rws .rw img{width:52px;height:52px}
.rws .rw{animation:rise 300ms var(--ease-out) both}.rws .rw:nth-child(2){animation-delay:60ms}.rws .rw:nth-child(3){animation-delay:110ms}.rws .rw:nth-child(4){animation-delay:150ms}
@media (prefers-reduced-motion:reduce){.feat.hot svg,.chest.ready svg{animation:none}.rws .rw{animation-name:fadein}.chest:active{transform:translateY(-50%)}}
.chb{display:flex;align-items:center;gap:10px}
.chest.mini{position:relative;right:auto;top:auto;transform:none;width:auto;height:34px;flex-direction:row;gap:4px;padding:0 8px;border-radius:12px;margin:-4px -10px -4px 0}
.chest.mini svg{width:24px;height:24px}.chest.mini small{font-size:12px}
.chest.mini:active{transform:scale(.95)}
@media (prefers-reduced-motion:reduce){.chest.mini:active{transform:none}}
/* фичи хаба: крупная объёмная иконка выходит за верх плитки, подпись с обводкой */
.hside{gap:12px;margin-top:20px}
.feat{width:68px;height:62px;padding:0 0 5px;justify-content:flex-end;border-radius:18px;background:linear-gradient(#323a85,#232866);box-shadow:0 4px 0 var(--sh),inset 0 1px 0 rgba(255,255,255,.18),inset 0 -8px 14px rgba(0,0,0,.18)}
.feat svg{position:absolute;left:50%;top:-16px;width:54px;height:54px;transform:translateX(-50%);filter:drop-shadow(0 3px 0 rgba(0,0,0,.3))}
.feat.hot svg{animation:wiggle2 2.6s var(--ease-sine) infinite}
@keyframes wiggle2{0%,80%,100%{transform:translateX(-50%)}86%{transform:translateX(-50%) rotate(-9deg)}93%{transform:translateX(-50%) rotate(7deg)}}
.feat span{position:relative;font:900 12px var(--disp);color:#fff;-webkit-text-stroke:2px #14173f;paint-order:stroke fill;letter-spacing:.01em}
.feat s{left:10px;bottom:3px;max-width:48px}
.chest svg{width:46px;height:46px}
.chest.mini svg{width:26px;height:26px}
@media (prefers-reduced-motion:reduce){.feat.hot svg{animation:none}}
.feat{padding-bottom:10px}
.feat s{bottom:4px;left:12px;height:3px;max-width:44px}
.hside{margin-bottom:6px}
.pn.home #logoCv{height:min(16vh,110px);margin:2px 0 8px}
/* ---------- покупки ---------- */
.shi.iap{position:relative;background:linear-gradient(#262c6b,#1a1f52)}
.shi.iap .ac .btn{min-width:84px;background:linear-gradient(#6ff5dd,#1fc0a6);color:#05332c;box-shadow:0 4px 0 #0a7569,inset 0 2px 0 rgba(255,255,255,.5)}
.shi .tag{position:absolute;left:-6px;top:-8px;padding:2px 8px;border-radius:9px;font:900 11px var(--disp);font-style:normal;color:#fff;background:linear-gradient(#ff6d7e,#d8283f);box-shadow:0 2px 0 #7a1020;z-index:1}
.shi.best .tag{background:linear-gradient(#b977ff,#7a2fe0);box-shadow:0 2px 0 #3d127a}
.shi.hot{box-shadow:0 0 0 2px #ffb627,0 0 18px rgba(255,182,39,.35)}
.shi .ic svg.coin{width:40px;height:40px}
.feat.gold{background:linear-gradient(#ffd35c,#ffa41b);box-shadow:0 4px 0 #b86a00,inset 0 1px 0 rgba(255,255,255,.5)}
.feat.gold span{font-variant-numeric:tabular-nums}
.btn.big{min-width:200px;min-height:60px;font-size:24px}
/* экран «Без рекламы» */
.nadi svg{width:96px;height:96px;filter:drop-shadow(0 4px 0 rgba(0,0,0,.3))}
.pn.noads p.small{max-width:300px;margin-left:auto;margin-right:auto}
.ib2.na{box-shadow:0 4px 0 var(--sh),inset 0 0 0 2px #ffb627,inset 0 1px 0 rgba(255,255,255,.12)}
.ib2.na svg{width:34px;height:34px;filter:drop-shadow(0 1px 0 rgba(0,0,0,.25))}
