/* Редизайн страницы в стиле бренда «Безумно.». Игра (canvas/оверлей/HUD) — в style.css, не меняется. */
:root{--or:#f9530c;--lime:#b2df00;--ink:#262626;--bg:#f3f3f3;--card:#fff}
body.site{background:var(--bg);background-image:none;color:var(--ink);font-family:'Inter Tight',Arial,sans-serif;min-height:0;margin:0}
.site .game{color:#e9f5f6}
.top{max-width:1360px;margin:auto;padding:18px 40px;display:flex;align-items:center;gap:14px}
.logo{font-weight:800;font-size:30px;letter-spacing:-1px;color:var(--or);text-decoration:none;line-height:1}
.logo-sub{font-size:11px;line-height:1.2;color:var(--ink);font-weight:500}
.top nav{display:flex;gap:28px;margin:0 auto}.top nav a{color:var(--ink);text-decoration:none;font-weight:700;font-size:14px}.top nav a:hover{color:var(--or)}
.cta{background:var(--ink);color:#fff;text-decoration:none;font-weight:700;font-size:14px;padding:14px 26px;border-radius:14px;transition:.15s}.cta:hover{background:var(--or)}
.page{max-width:1360px;margin:auto;padding:0 40px 40px}
.hero{background:var(--or);border-radius:32px;padding:44px 44px 28px;color:#fff}
.hero-head{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin-bottom:30px}
.kicker{margin:0 0 14px;font-weight:700;font-size:14px;color:var(--ink);background:var(--lime);display:inline-block;padding:7px 14px;border-radius:30px}
.site h1{font-size:clamp(34px,5.2vw,68px);line-height:1.02;letter-spacing:-2px;font-weight:800;margin:0;color:#fff}
.site h1 mark{background:var(--ink);color:#fff;padding:0 .18em;border-radius:.18em;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.lead{margin:18px 0 0;max-width:560px;font-size:18px;line-height:1.45;font-weight:500;color:#fff}
.chips{list-style:none;margin:0;padding:0;display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}.chips li{background:var(--ink);color:#fff;font-weight:700;font-size:14px;padding:12px 18px;border-radius:14px}.chips li:first-child{color:var(--lime)}
.hero .game{border:0;border-radius:22px;box-shadow:0 22px 50px #0005;max-width:none}
.controls{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;padding:20px 0 6px}
.keys{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.hero kbd{background:var(--ink);border:0;color:#fff;border-radius:8px;padding:7px 10px;font:700 12px 'Inter Tight',Arial}
.keys span{font-size:13px;color:#fff;margin:0 14px 0 3px;font-weight:500}
.controls button{background:#fff;color:var(--ink);border:0;border-radius:12px;padding:11px 18px;font:700 13px 'Inter Tight',Arial;cursor:pointer}.controls button:hover{background:var(--ink);color:#fff}
.hero #audio-controls{margin:10px 0 0;padding-top:16px;border-top:1px solid #ffffff55;color:#fff;font:600 13px 'Inter Tight',Arial}
.hero #audio-controls button{background:var(--ink);color:#fff;border:0;border-radius:10px;padding:10px 14px;font:700 13px 'Inter Tight',Arial}
.hero #audio-controls input{accent-color:var(--lime)}.hero #audio-status{color:var(--ink)}
.block{margin-top:20px;background:var(--card);border-radius:32px;padding:44px}
.block-head{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin-bottom:26px}
.site .block h2{font-size:clamp(30px,4vw,48px);letter-spacing:-1.5px;font-weight:800;margin:0;color:var(--ink);text-shadow:none;line-height:1.05}
.block-head p{margin:0;max-width:420px;font-size:15px;line-height:1.45;color:#666}
#top-list,#menu-list{list-style:none;margin:0;padding:0}
#top-list{display:grid;grid-template-columns:1fr 1fr;gap:12px 20px;counter-reset:n}
#top-list li{display:flex;align-items:center;gap:16px;background:var(--bg);border-radius:18px;padding:16px 20px;font-weight:700;font-size:17px}
#top-list b{flex:none;width:38px;height:38px;border-radius:12px;background:var(--ink);color:#fff;display:grid;place-items:center;font-size:16px}
#top-list li:nth-child(1) b{background:var(--or)}#top-list li:nth-child(2) b,#top-list li:nth-child(3) b{background:var(--lime);color:var(--ink)}
#top-list span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#top-list em{font-style:normal;font-variant-numeric:tabular-nums;color:var(--or);font-size:18px}
#top-list .empty{grid-column:1/-1;justify-content:center;color:#777;font-weight:500;padding:30px}
#menu-list{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
#menu-list li{background:var(--bg);border-radius:28px;padding:10px;display:flex;flex-direction:column;transition:.15s}
#menu-list img{width:100%;aspect-ratio:1;object-fit:cover;display:block;background:#fff;border-radius:20px}
.mi{padding:16px 12px 12px;display:flex;flex-direction:column;gap:14px;flex:1;justify-content:space-between}
#menu-list h3{margin:0;font-size:19px;font-weight:800;letter-spacing:-.5px}
#menu-list h3 small{display:block;margin:6px 0 0;font-size:12px;font-weight:700;color:var(--or)}
#menu-list strong{align-self:flex-start;background:var(--ink);color:#fff;font-size:18px;padding:9px 16px;border-radius:14px;white-space:nowrap}
#menu-list li:hover{background:var(--or);color:#fff}#menu-list li:hover h3 small{color:var(--lime)}#menu-list li:hover strong{background:var(--ink);color:var(--lime)}
.foot{background:var(--ink);color:#fff;margin-top:20px}.foot-in{max-width:1360px;margin:auto;padding:28px 40px;display:flex;align-items:center;gap:24px;flex-wrap:wrap}.foot-in span{margin-right:auto;font-size:13px;color:#aaa}.foot-in a:not(.logo){color:var(--lime);font-weight:700;font-size:14px;text-decoration:none}
@media(max-width:900px){.hero-head,.block-head{flex-direction:column;align-items:flex-start}.chips{justify-content:flex-start}#menu-list{grid-template-columns:1fr 1fr 1fr}#top-list{grid-template-columns:1fr}}
@media(max-width:700px){.top{padding:14px 16px;flex-wrap:wrap}.top nav{display:none}.cta{margin-left:auto;padding:11px 16px}.page{padding:0 12px 24px}.hero,.block{border-radius:24px;padding:24px 16px}.logo{font-size:26px}#menu-list{grid-template-columns:1fr 1fr;gap:10px}.foot-in{padding:22px 16px}.lead{font-size:15px}}
/* Кнопки в игре в стиле бренда */
.game .pause{background:var(--or);border:0;border-radius:14px;box-shadow:0 4px 0 #b53a05,0 8px 18px #0006;font-size:0;color:transparent;position:absolute;transition:transform .12s,background .12s}
.game .pause::before{content:"";width:34%;height:42%;background:linear-gradient(90deg,#fff 0 36%,transparent 36% 64%,#fff 64% 100%);border-radius:2px}
.game .pause:hover{background:#ff6a2a;transform:translateY(-1px)}.game .pause:active{transform:translateY(3px);box-shadow:0 1px 0 #b53a05,0 3px 8px #0006}
.game #music-quick{background:var(--ink);border:0;border-radius:50%;color:var(--lime);box-shadow:0 3px 0 #000,0 6px 14px #0006}
.game #music-quick[aria-pressed=false]{color:#8a8a8a}
/* Панель звука скрыта (звук включается кнопкой ♫ в игре); элементы остаются в DOM для audio.js */
.hero #audio-controls{display:none}
.controls #restart{background:var(--ink);color:#fff;border:0;border-radius:14px;padding:14px 24px;font:800 14px 'Inter Tight',Arial;box-shadow:0 4px 0 #000;transition:transform .12s,background .12s}
.controls #restart:hover{background:#3a3a3a;color:#fff;transform:translateY(-1px)}
.controls #restart:active{transform:translateY(3px);box-shadow:0 1px 0 #000}

/* Турнир: таймер, призы, промокод */
.timer{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:16px}.timer span{font-weight:700;font-size:14px;color:#666}
.timer b{background:var(--ink);color:var(--lime);font-variant-numeric:tabular-nums;font-size:26px;letter-spacing:1px;padding:8px 16px;border-radius:14px}.timer small{font-size:12px;color:#888;font-weight:500}
#prize-legend{list-style:none;margin:0 0 18px;padding:0;display:flex;gap:10px;flex-wrap:wrap}
#prize-legend li{background:var(--bg);border-radius:14px;padding:10px 16px;font-size:14px;font-weight:700;display:flex;gap:10px;align-items:center}#prize-legend li b{color:var(--or)}#prize-legend li.free{background:var(--or);color:#fff}#prize-legend li.free b{color:var(--ink)}
#top-list .pz{font-style:normal;font-size:12px;font-weight:700;color:#777;background:#fff;border-radius:10px;padding:5px 10px;white-space:nowrap}#top-list .pz.free{background:var(--or);color:#fff}
#prize-banner:not(:empty){margin-bottom:18px;display:grid;gap:10px}
.prize{background:var(--lime);border-radius:22px;padding:20px 24px;display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap}
.prize strong{display:block;font-size:20px;font-weight:800;letter-spacing:-.5px}.prize span{display:block;margin-top:6px;font-size:14px;line-height:1.4;max-width:620px}
.prize code{background:var(--ink);color:var(--lime);font:800 24px 'Inter Tight',Arial;letter-spacing:2px;padding:14px 22px;border-radius:14px;user-select:all}
#last-winners:not(:empty){margin-top:26px;padding-top:22px;border-top:1px solid #e6e6e6}
#last-winners h3{margin:0 0 12px;font-size:16px;font-weight:800}#last-winners ul{list-style:none;margin:0;padding:0;display:flex;gap:10px;flex-wrap:wrap}
#last-winners li{display:flex;align-items:center;gap:10px;background:var(--bg);border-radius:14px;padding:10px 16px;font-weight:700;font-size:14px}#last-winners li b{width:26px;height:26px;border-radius:8px;background:var(--ink);color:#fff;display:grid;place-items:center;font-size:13px}#last-winners li:first-child b{background:var(--or)}#last-winners em{font-style:normal;color:var(--or)}
@media(max-width:700px){.timer b{font-size:22px}.prize code{font-size:20px}#top-list .pz{display:none}}

/* Вход через Telegram (показывается, только если включён на сервере) */
#auth-bar:not(:empty){display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:18px;background:var(--bg);border-radius:18px;padding:14px 20px;font-size:14px;font-weight:500;color:#555}
#auth-bar b{color:var(--ink)}#auth-bar a{color:var(--or);font-weight:700}
#auth-bar button{background:#229ed9;color:#fff;border:0;border-radius:12px;padding:11px 18px;font:700 14px 'Inter Tight',Arial;cursor:pointer;transition:.12s}#auth-bar button:hover{background:#1b87b9}#auth-bar button:disabled{opacity:.6;cursor:default}
#auth-bar #logout{background:var(--ink)}#auth-bar #logout:hover{background:#444}

/* Стартовая обложка */
.overlay.cover{background:linear-gradient(90deg,rgba(14,7,20,.26) 0%,rgba(14,7,20,.26) 30%,rgba(14,7,20,0) 68%),url(assets/cover.webp) center/cover no-repeat}
.overlay.cover .card{max-width:520px}
.overlay .card #tg-start,.overlay .card #cover-note{display:none}
.overlay.cover .card #tg-start{display:inline-block;margin:15px 0 0 12px;background:#229ed9;color:#fff;border:0;border-radius:8px;padding:18px 22px;font-size:16px;font-weight:bold;cursor:pointer;box-shadow:0 5px 0 #15739f,0 10px 30px #0005}
.overlay.cover .card #tg-start:hover:not(:disabled){background:#35b0ea}
.overlay.cover .card #tg-start:disabled{background:#4a4a4a;color:#bbb;box-shadow:0 5px 0 #2d2d2d;cursor:default}
.overlay.cover .card #tg-start.ok{background:#b2df00;color:#262626;box-shadow:0 5px 0 #7a9a00}
.overlay.cover .card #cover-note{display:block;margin:0 0 14px;max-width:420px;font-size:12px;line-height:1.5;color:#e8d9c8}
.rate .tgw{background:#229ed9;color:#fff;border:0;border-radius:10px;padding:12px 18px;font-weight:bold;font-size:14px;cursor:pointer;box-shadow:0 4px 0 #15739f}
.rate .tgw:disabled{opacity:.6;cursor:default}.tg-link{color:#ffdb56;font-weight:bold;font-size:13px}
.rate:has(.tgw){flex-direction:column;align-items:flex-start}.rate:has(.tgw) p{color:#fff3b1;font-size:14px;line-height:1.4;max-width:380px}
@media(max-width:700px){.overlay.cover .card #tg-start{padding:10px 14px;font-size:12px;margin:3px 0 10px 8px}.overlay.cover .card #cover-note{font-size:9px}}

/* Панель заставки: тёмная карточка со светящейся оранжевой рамкой. Размеры в cqw — масштабируются вместе с игрой */
.game{container-type:inline-size}
.game .overlay{padding:0 0 0 5cqw}
.game .overlay .card{width:min(38cqw,540px);max-width:none;background:linear-gradient(180deg,#27221f,#141111);border:2px solid #ff8a1f;border-radius:2.2cqw;padding:2.3cqw 2.5cqw 2.1cqw;
  box-shadow:0 0 0 .35cqw #3a2412,0 0 3.2cqw #ff6a0070,0 2cqw 4cqw #000b,inset 0 0 0 1px #ffffff14,inset 0 0 4cqw #ff6a000f}
.game .overlay .card .eyebrow{display:inline-block;margin:0 0 1.3cqw;background:#f9530c;color:#fff;font:800 clamp(8px,1.05cqw,14px) 'Inter Tight',Arial;letter-spacing:.14em;padding:.6cqw 1.3cqw;border-radius:.6cqw;transform:rotate(-2deg);box-shadow:.3cqw .3cqw 0 #000;text-transform:uppercase}
.game .overlay .card h2{font:800 clamp(22px,4.3cqw,58px)/1 'Inter Tight',Arial;letter-spacing:-.04em;margin:0 0 1.1cqw;color:#fff3b1;text-shadow:0 .35cqw 0 #5a3500,0 .8cqw 2cqw #ff6a0055}
.game .overlay .card>p:not(.eyebrow){max-width:none;margin:0 0 1.7cqw;font-size:clamp(9px,1.15cqw,16px);line-height:1.5;color:#e8dccd}
.game .overlay .card #start{display:flex;align-items:center;justify-content:center;gap:1cqw;width:100%;margin:0 0 1cqw;padding:1.3cqw;border:0;border-radius:1.2cqw;
  font:800 clamp(12px,1.9cqw,26px) 'Inter Tight',Arial;color:#2b1c05;background:linear-gradient(#ffe98a,#f7b72a);box-shadow:0 .4cqw 0 #a27a26,0 .9cqw 2cqw #0007,inset 0 2px 0 #fffa;cursor:pointer;transition:transform .12s,filter .12s}
.game .overlay .card #start span{margin:0}.game .overlay .card #start:hover{filter:brightness(1.07);transform:translateY(-1px)}.game .overlay .card #start:active{transform:translateY(.3cqw)}
.game .overlay .card #tg-start{display:none}
.game .overlay.cover .card #tg-start{display:block;width:100%;margin:0 0 1.2cqw;padding:1.05cqw;border-radius:1.2cqw;font:800 clamp(10px,1.4cqw,19px) 'Inter Tight',Arial;box-shadow:0 .35cqw 0 #15739f,0 .8cqw 1.8cqw #0006}
.game .overlay.cover .card #tg-start:disabled{box-shadow:0 .35cqw 0 #2d2d2d}.game .overlay.cover .card #tg-start.ok{box-shadow:0 .35cqw 0 #7a9a00}
.game .overlay .card #cover-note{display:none}
.game .overlay.cover .card #cover-note{display:block;max-width:none;margin:0 0 1.5cqw;font-size:clamp(8px,.95cqw,13px);line-height:1.45;color:#b9a994}
.game .overlay.cover .card #hint{display:none}
#cover-stats{display:none}
.game .overlay.cover .card #cover-stats{display:grid;grid-template-columns:repeat(3,1fr);background:#1c1816;border:1px solid #4a3a2c;border-radius:1.2cqw;overflow:hidden}
#cover-stats>div{display:flex;align-items:center;justify-content:center;gap:.8cqw;padding:1cqw .6cqw}#cover-stats>div+div{border-left:1px solid #4a3a2c}
#cover-stats i{font-style:normal;font-size:clamp(14px,2.3cqw,32px);line-height:1}
#cover-stats p{margin:0!important;max-width:none!important;display:flex;flex-direction:column;color:#fff;line-height:1.15}
#cover-stats b{font:800 clamp(10px,1.45cqw,20px) 'Inter Tight',Arial;color:#ffe06e}#cover-stats span{font-size:clamp(8px,.95cqw,13px);color:#d8cbbb}
@container (max-width:640px){.game .overlay.cover .card #cover-stats,.game .overlay.cover .card #cover-note{display:none}.game .overlay{padding-left:3cqw}.game .overlay .card{width:46cqw}}
/* Телефон: компактная панель, экранные кнопки не перекрывают оверлей */
.game .overlay:not(.hidden)~.touch{display:none!important}
@container (max-width:640px){
  .game .overlay .card{width:56cqw;padding:3cqw 3.2cqw}
  .game .overlay .card .eyebrow,.game .overlay .card>p#description{display:none}
  .game .overlay .card h2{font-size:clamp(15px,6.2cqw,24px);margin:0 0 2.4cqw}
  .game .overlay .card #start{padding:2.4cqw;font-size:clamp(11px,4.2cqw,17px);margin-bottom:2cqw;border-radius:2.4cqw}
  .game .overlay.cover .card #tg-start{padding:1.9cqw;font-size:clamp(9px,3.2cqw,13px);margin:0;border-radius:2.4cqw}
}
/* Объёмные глянцевые кнопки: градиент, блик сверху, светящийся контур, толстый бортик снизу */
.game .overlay .card #start{
  color:#2a1a03;text-shadow:0 1px 0 #fff9,0 -1px 0 #c8780033;border:0;
  background:radial-gradient(ellipse 88% 100% at 50% 0,#fffbe0e6 0,#fffbe000 72%) 50% 7%/92% 46% no-repeat,linear-gradient(180deg,#ffee86 0%,#ffcf33 46%,#ffac14 100%);
  box-shadow:0 0 0 .22cqw #ffb52e,0 0 0 .4cqw #8a4a0a88,0 .55cqw 0 .1cqw #b86a00,0 1.2cqw 2.2cqw #000a,0 0 2.6cqw #ff9a2275,inset 0 .22cqw .15cqw #fff,inset 0 -.55cqw .7cqw #d97a0088}
.game .overlay .card #start:hover{filter:brightness(1.06) saturate(1.05);transform:translateY(-.15cqw)}
.game .overlay .card #start:active{transform:translateY(.45cqw);box-shadow:0 0 0 .22cqw #ffb52e,0 0 0 .4cqw #8a4a0a88,0 .1cqw 0 .1cqw #b86a00,0 .4cqw 1cqw #000a,0 0 2cqw #ff9a2260,inset 0 .22cqw .15cqw #fff,inset 0 -.4cqw .5cqw #d97a0088}

.game .overlay.cover .card #tg-start{
  color:#fff;text-shadow:0 1px 1px #04466a99;border:0;
  background:radial-gradient(ellipse 88% 100% at 50% 0,#ffffff80 0,#ffffff00 72%) 50% 7%/92% 46% no-repeat,linear-gradient(180deg,#5ccbf8 0%,#229ed9 50%,#1580b8 100%);
  box-shadow:0 0 0 .2cqw #7fd8ff,0 0 0 .36cqw #0a3a5588,0 .5cqw 0 .08cqw #0e5c82,0 1cqw 1.8cqw #0009,0 0 2cqw #35b0ea55,inset 0 .2cqw .12cqw #ffffffcc,inset 0 -.45cqw .6cqw #0a5a8a88}
.game .overlay.cover .card #tg-start:hover:not(:disabled){background:radial-gradient(ellipse 88% 100% at 50% 0,#ffffff90 0,#ffffff00 72%) 50% 7%/92% 46% no-repeat,linear-gradient(180deg,#78d6fa 0%,#33aee6 50%,#1b8cc4 100%);transform:translateY(-.15cqw)}
.game .overlay.cover .card #tg-start:active:not(:disabled){transform:translateY(.4cqw);box-shadow:0 0 0 .2cqw #7fd8ff,0 0 0 .36cqw #0a3a5588,0 .08cqw 0 .08cqw #0e5c82,0 .3cqw .8cqw #0009,inset 0 .2cqw .12cqw #ffffffcc,inset 0 -.35cqw .5cqw #0a5a8a88}
.game .overlay.cover .card #tg-start:disabled{color:#d0d0d0;text-shadow:0 1px 0 #0006;background:radial-gradient(ellipse 88% 100% at 50% 0,#ffffff40 0,#ffffff00 72%) 50% 7%/92% 46% no-repeat,linear-gradient(180deg,#767676 0%,#555 50%,#3e3e3e 100%);box-shadow:0 0 0 .2cqw #8a8a8a,0 0 0 .36cqw #0006,0 .5cqw 0 .08cqw #262626,0 1cqw 1.8cqw #0009,inset 0 .2cqw .12cqw #fff7,inset 0 -.45cqw .6cqw #0008}
.game .overlay.cover .card #tg-start.ok{color:#1e2a00;text-shadow:0 1px 0 #fff8;background:radial-gradient(ellipse 88% 100% at 50% 0,#ffffffb0 0,#ffffff00 72%) 50% 7%/92% 46% no-repeat,linear-gradient(180deg,#d4f43a 0%,#b2df00 50%,#8fb800 100%);box-shadow:0 0 0 .2cqw #d8f65c,0 0 0 .36cqw #3a4a0088,0 .5cqw 0 .08cqw #5f7a00,0 1cqw 1.8cqw #0009,0 0 2cqw #b2df0055,inset 0 .2cqw .12cqw #fff,inset 0 -.45cqw .6cqw #5f7a0088}

/* Кнопка паузы и «Начать заново» — тот же объём */
.game .pause{border:0;
  background:radial-gradient(ellipse 88% 100% at 50% 0,#ffffff80 0,#ffffff00 72%) 50% 6%/90% 46% no-repeat,linear-gradient(180deg,#ff8a3d 0%,#f9530c 52%,#d23c00 100%);
  box-shadow:0 0 0 2px #ffb184,0 0 0 3.5px #5a1d0099,0 4px 0 3px #8f2a00,0 10px 16px #000a,0 0 18px #ff6a2a66,inset 0 2px 1px #ffffffcc,inset 0 -4px 5px #8f2a0088}
.game .pause:hover{background:radial-gradient(ellipse 88% 100% at 50% 0,#ffffff90 0,#ffffff00 72%) 50% 6%/90% 46% no-repeat,linear-gradient(180deg,#ff9a55 0%,#ff6320 52%,#df4400 100%)}
.game .pause:active{transform:translateY(3px);box-shadow:0 0 0 2px #ffb184,0 0 0 3.5px #5a1d0099,0 1px 0 3px #8f2a00,0 3px 6px #000a,inset 0 2px 1px #ffffffcc,inset 0 -3px 4px #8f2a0088}
.controls #restart{border:0;color:#fff;text-shadow:0 1px 1px #000;
  background:radial-gradient(ellipse 88% 100% at 50% 0,#ffffff50 0,#ffffff00 72%) 50% 6%/92% 46% no-repeat,linear-gradient(180deg,#4d4d4d 0%,#2b2b2b 52%,#161616 100%);
  box-shadow:0 0 0 2px #6a6a6a,0 0 0 3.5px #0008,0 5px 0 2px #000,0 10px 16px #0007,inset 0 2px 1px #ffffff55,inset 0 -4px 5px #000a}
.controls #restart:hover{background:radial-gradient(ellipse 88% 100% at 50% 0,#ffffff60 0,#ffffff00 72%) 50% 6%/92% 46% no-repeat,linear-gradient(180deg,#5c5c5c 0%,#363636 52%,#1d1d1d 100%);transform:translateY(-1px)}
.controls #restart:active{transform:translateY(3px);box-shadow:0 0 0 2px #6a6a6a,0 0 0 3.5px #0008,0 1px 0 2px #000,0 3px 6px #0007,inset 0 2px 1px #ffffff55,inset 0 -3px 4px #000a}

/* Кнопка входа в конце игры и «В рейтинг» */
.rate .tgw,.card .rate button{border:0;
  background:radial-gradient(ellipse 88% 100% at 50% 0,#ffffff80 0,#ffffff00 72%) 50% 7%/92% 46% no-repeat,linear-gradient(180deg,#5ccbf8 0%,#229ed9 50%,#1580b8 100%);color:#fff;text-shadow:0 1px 1px #04466a99;
  box-shadow:0 0 0 2px #7fd8ff,0 0 0 3px #0a3a5588,0 4px 0 2px #0e5c82,0 8px 14px #0009,inset 0 2px 1px #ffffffcc,inset 0 -3px 5px #0a5a8a88}
.card .rate button:not(.tgw){background:radial-gradient(ellipse 88% 100% at 50% 0,#fffbe0e6 0,#fffbe000 72%) 50% 7%/92% 46% no-repeat,linear-gradient(180deg,#ffee86 0%,#ffcf33 46%,#ffac14 100%);color:#2a1a03;text-shadow:0 1px 0 #fff9;box-shadow:0 0 0 2px #ffb52e,0 0 0 3px #8a4a0a88,0 4px 0 2px #b86a00,0 8px 14px #000a,inset 0 2px 1px #fff,inset 0 -3px 5px #d97a0088}
/* Заставка: готовая рамка (assets/panel.webp, 1086×1448) как фон карточки, текст и кнопки поверх.
   Шапка «Безумно. КРУТАЯ ШАУРМА» и полоска «92 шаурмы / 3 жизни / Стань легендой» нарисованы на картинке.
   На узких экранах (карточка не влезает по высоте) остаётся обычная тёмная панель. */
@container (min-width:641px){
  .game .overlay.cover{padding-left:4cqw}
  .game .overlay.cover .card{
    width:39cqw;aspect-ratio:1086/1448;box-sizing:border-box;overflow:hidden;
    padding:16.6cqw 4.9cqw 11.6cqw;display:flex;flex-direction:column;justify-content:center;
    background:url(assets/panel.webp) center/100% 100% no-repeat;border:0;border-radius:0;box-shadow:none}
  .game .overlay.cover .card .eyebrow,.game .overlay.cover .card #cover-stats{display:none}
  .game .overlay.cover .card h2{font-size:clamp(18px,3.35cqw,46px);margin:0 0 .8cqw}
  .game .overlay.cover .card>p#description{font-size:clamp(8px,1.02cqw,14px);line-height:1.45;margin:0 0 1.3cqw}
  .game .overlay.cover .card #start{padding:1cqw;font-size:clamp(11px,1.6cqw,22px);margin:0 0 .9cqw}
  .game .overlay.cover .card #tg-start{padding:.75cqw;font-size:clamp(9px,1.15cqw,16px);margin:0 0 .8cqw}
  .game .overlay.cover .card #cover-note{font-size:clamp(7px,.82cqw,11px);line-height:1.4;margin:0}
}

/* Типографика заставки: заголовок в два слоя — сзади толстый контур с объёмной тенью и свечением, сверху золотая заливка.
   Текст дублируется в data-text скриптом rating.js (для ::before и ::after). */
.game .overlay .card h2{
  position:relative;font-family:'Rubik','Inter Tight',Arial,sans-serif;font-weight:900;letter-spacing:-.02em;line-height:1;
  color:transparent;background:none;-webkit-text-stroke:0;text-shadow:none;filter:drop-shadow(0 .8cqw 1.2cqw #000a)}
.game .overlay .card h2::before,.game .overlay .card h2::after{content:attr(data-text);white-space:pre-line;position:absolute;inset:0;pointer-events:none}
.game .overlay .card h2::before{color:#3d1a00;-webkit-text-stroke:.8cqw #3d1a00;
  text-shadow:0 .45cqw 0 #8a3f00,0 .9cqw 0 #3d1a00,0 0 1.2cqw #ff9a1f,0 0 2.6cqw #ff7a00cc}
.game .overlay .card h2::after{color:transparent;background:linear-gradient(180deg,#ffffff 0%,#fff4b8 34%,#ffd24a 66%,#ff9a1f 100%);-webkit-background-clip:text;background-clip:text}
.game .overlay .card>p:not(.eyebrow):not(#cover-note){font-weight:600;color:#fff;text-shadow:0 1px 2px #000c,0 0 .8cqw #0008}
@container (min-width:641px){
  .game .overlay.cover .card h2{font-size:clamp(20px,4.5cqw,62px);margin:0 -1.4cqw 1.2cqw;
    background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 56'><path d='M7 44 L3 14 L19 28 L32 6 L45 28 L61 14 L57 44 Z' fill='none' stroke='%23ffd52e' stroke-width='5' stroke-linejoin='round'/><path d='M9 50 H55' stroke='%23ffd52e' stroke-width='5' stroke-linecap='round'/></svg>") right 1.2cqw top .2cqw/3.5cqw 3.1cqw no-repeat}
}
/* Заставка: без пометки про Telegram, кнопки прижаты к низу рабочей области */
.game .overlay.cover .card #cover-note{display:none}
@container (min-width:641px){
  .game .overlay.cover .card{justify-content:flex-start}
  .game .overlay.cover .card #start{margin-top:auto}
  .game .overlay.cover .card #tg-start{margin-bottom:1cqw}
}

/* Типографика v3: круглый жирный шрифт, светлая заливка, тонкий чёткий контур, чистое оранжевое свечение, корона за словом «Заказ» */
.game .overlay .card h2{font-family:'Nunito','Rubik',Arial,sans-serif;font-weight:900;letter-spacing:0;line-height:1.02;filter:drop-shadow(0 .5cqw .7cqw #0008)}
.game .overlay .card h2::before{color:#4a1f00;-webkit-text-stroke:.42cqw #4a1f00;
  text-shadow:0 .28cqw 0 #c25400,0 .5cqw 0 #6b2a00,0 0 .9cqw #ff8a00,0 0 2cqw #ff6a00aa}
.game .overlay .card h2::after{background:linear-gradient(180deg,#fffef6 0%,#fff6c8 40%,#ffdc6a 72%,#ffb52e 100%);-webkit-background-clip:text;background-clip:text}
.game .overlay .card h2 .crown{display:inline-block;width:.9em;height:.78em;margin-left:.35em;vertical-align:.15em;
  background:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 56'><path d='M7 44 L3 14 L19 28 L32 6 L45 28 L61 14 L57 44 Z' fill='none' stroke='%23ffd52e' stroke-width='5' stroke-linejoin='round'/><path d='M9 50 H55' stroke='%23ffd52e' stroke-width='5' stroke-linecap='round'/></svg>") center/contain no-repeat;
  filter:drop-shadow(0 0 .3cqw #ffb21f) drop-shadow(0 0 .9cqw #ff7a00)}
@container (min-width:641px){
  .game .overlay.cover .card h2{font-size:clamp(20px,4.35cqw,60px);margin-bottom:.9cqw;background:none}
}

/* Карточка по макету v4 (размеры сняты с макета 1086×1448: заголовок с 33% высоты, поля ~15.5%, кнопка 65–76%, полоска с 78.5%) */
.game .overlay .card h2{font-family:'Inter Tight',Arial,sans-serif;font-weight:900;letter-spacing:-.025em;line-height:.98;filter:none}
.game .overlay .card h2::before{color:#d9923f;-webkit-text-stroke:0;
  text-shadow:0 .08em 0 #e8a752,0 .1em 0 #c97e2c,0 .12em 0 #a8601a,0 .14em .02em #5a2c06,0 .2em .35em #000c,0 0 .45em #ff8a1f99,0 0 .9em #ff6a0066}
.game .overlay .card h2::after{background:linear-gradient(180deg,#fffcec 0%,#fff1c2 50%,#ffdc94 100%);-webkit-background-clip:text;background-clip:text}
.game .overlay .card h2 .crown{width:.95em;height:.82em;margin-left:.45em;vertical-align:.05em;transform:rotate(9deg);
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 70 60'><path d='M10 46 L6 18 L22 32 L35 10 L48 32 L64 18 L60 46 Z' fill='none' stroke='%23ffd52e' stroke-width='5' stroke-linejoin='round'/><path d='M11 53 H59' stroke='%23ffd52e' stroke-width='5' stroke-linecap='round'/><circle cx='6' cy='16' r='4' fill='%23ffd52e'/><circle cx='35' cy='7' r='4' fill='%23ffd52e'/><circle cx='64' cy='16' r='4' fill='%23ffd52e'/></svg>");
  filter:drop-shadow(0 0 .08em #ffd52e) drop-shadow(0 0 .25em #ff9a1f)}
@container (min-width:641px){
  .game .overlay.cover .card{padding:17cqw 5.6cqw 11.2cqw;justify-content:flex-start}
  .game .overlay.cover .card h2{font-size:clamp(22px,4.75cqw,66px);margin:0 -1.2cqw 1.6cqw 0;background:none}
  .game .overlay.cover .card>p#description{font-size:clamp(9px,1.17cqw,16px);font-weight:500;line-height:1.42;margin:0}
  .game .overlay.cover .card #start{margin-top:auto;margin-bottom:.4cqw;padding:1.15cqw;gap:3cqw;font:800 clamp(14px,2.7cqw,36px) 'Inter Tight',Arial;color:#141008;text-shadow:0 1px 0 #fff8;border-radius:1.3cqw}
  .game .overlay.cover .card #start span{font-weight:500}
  /* Telegram — тонкая ссылка под кнопкой: в макете под неё нет места */
  .game .overlay.cover .card #tg-start,.game .overlay.cover .card #tg-start:hover:not(:disabled),.game .overlay.cover .card #tg-start:disabled,.game .overlay.cover .card #tg-start.ok{
    background:none;box-shadow:none;border:0;padding:.25cqw 0 0;margin:0;width:auto;align-self:center;transform:none;
    font:600 clamp(8px,.95cqw,13px) 'Inter Tight',Arial;color:#7fd3ff;text-shadow:0 1px 2px #000;text-decoration:underline;text-underline-offset:.2em;cursor:pointer}
  .game .overlay.cover .card #tg-start:disabled{color:#9a8f86;text-decoration:none;cursor:default}
  .game .overlay.cover .card #tg-start.ok{color:#c8ef3a;text-decoration:none}
}

/* Рамка с готовым заголовком v5: заголовок и описание нарисованы на картинке (assets/panel-title-clean.webp, 992×1586),
   поверх ставятся только две кнопки в пустую область. Заголовок и описание остаются в разметке скрытыми визуально — для скринридеров. */
@container (min-width:641px){
  .game .overlay.cover{padding-left:3.5cqw}
  .game .overlay.cover .card{width:33cqw;aspect-ratio:992/1586;padding:0 5cqw 9.8cqw;justify-content:flex-end;
    background:url(assets/panel-title-clean.webp) center/100% 100% no-repeat}
  .game .overlay.cover .card h2,.game .overlay.cover .card>p#description{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);margin:0;padding:0;filter:none}
  .game .overlay.cover .card #start{margin:0 0 .9cqw;padding:1.1cqw;font:800 clamp(14px,2.5cqw,34px) 'Inter Tight',Arial;gap:0}
  .game .overlay.cover .card #start span{display:none}
  .game .overlay.cover .card #tg-start,.game .overlay.cover .card #tg-start:hover:not(:disabled),.game .overlay.cover .card #tg-start:disabled,.game .overlay.cover .card #tg-start.ok{
    display:block;width:100%;align-self:stretch;margin:0;padding:.95cqw;border:0;border-radius:1.2cqw;text-decoration:none;cursor:pointer;
    font:800 clamp(10px,1.45cqw,20px) 'Inter Tight',Arial;color:#fff;text-shadow:0 1px 1px #04466a99;transform:none;
    background:radial-gradient(ellipse 88% 100% at 50% 0,#ffffff80 0,#ffffff00 72%) 50% 7%/92% 46% no-repeat,linear-gradient(180deg,#5ccbf8 0%,#229ed9 50%,#1580b8 100%);
    box-shadow:0 0 0 .2cqw #7fd8ff,0 0 0 .36cqw #0a3a5588,0 .5cqw 0 .08cqw #0e5c82,0 1cqw 1.8cqw #0009,0 0 2cqw #35b0ea55,inset 0 .2cqw .12cqw #ffffffcc,inset 0 -.45cqw .6cqw #0a5a8a88}
  .game .overlay.cover .card #tg-start:hover:not(:disabled){filter:brightness(1.08);transform:translateY(-.15cqw)}
  .game .overlay.cover .card #tg-start:disabled{cursor:default;color:#d0d0d0;text-shadow:0 1px 0 #0006;
    background:radial-gradient(ellipse 88% 100% at 50% 0,#ffffff40 0,#ffffff00 72%) 50% 7%/92% 46% no-repeat,linear-gradient(180deg,#767676 0%,#555 50%,#3e3e3e 100%);
    box-shadow:0 0 0 .2cqw #8a8a8a,0 0 0 .36cqw #0006,0 .5cqw 0 .08cqw #262626,0 1cqw 1.8cqw #0009,inset 0 .2cqw .12cqw #fff7,inset 0 -.45cqw .6cqw #0008}
  .game .overlay.cover .card #tg-start.ok{color:#1e2a00;text-shadow:0 1px 0 #fff8;
    background:radial-gradient(ellipse 88% 100% at 50% 0,#ffffffb0 0,#ffffff00 72%) 50% 7%/92% 46% no-repeat,linear-gradient(180deg,#d4f43a 0%,#b2df00 50%,#8fb800 100%);
    box-shadow:0 0 0 .2cqw #d8f65c,0 0 0 .36cqw #3a4a0088,0 .5cqw 0 .08cqw #5f7a00,0 1cqw 1.8cqw #0009,0 0 2cqw #b2df0055,inset 0 .2cqw .12cqw #fff,inset 0 -.45cqw .6cqw #5f7a0088}
}
/* Заставка: больше воздуха между кнопками и подпись под Telegram */
@container (min-width:641px){
  .game .overlay.cover .card #start{margin-bottom:2cqw}
  .game .overlay.cover .card #cover-note{display:block;margin:.8cqw 0 0;text-align:center;font:600 clamp(8px,1cqw,13px) 'Inter Tight',Arial;color:#e3d3c0;text-shadow:0 1px 2px #000}
}

/* Пауза v1: рамка assets/panel-pause-clean.webp (1448×1086) с нарисованными «ПАУЗА» и «Заказ подождёт». Поверх — подпись и кнопка «Продолжить».
   Класс .paused ставит game.js в pause() и снимает при продолжении. На узких экранах остаётся обычная тёмная панель. */
@container (min-width:641px){
  .game .overlay.paused{padding:0;justify-content:center;background:#07060cb8}
  .game .overlay.paused .card{width:44cqw;max-width:none;aspect-ratio:1448/1086;box-sizing:border-box;overflow:hidden;
    padding:18.4cqw 6.4cqw 0;display:flex;flex-direction:column;justify-content:flex-start;
    background:url(assets/panel-pause-clean.webp) center/100% 100% no-repeat;border:0;border-radius:0;box-shadow:none}
  .game .overlay.paused .card .eyebrow,.game .overlay.paused .card h2{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);margin:0;padding:0;filter:none}
  .game .overlay.paused .card>p#description{margin:0 0 1.3cqw;font:700 clamp(11px,1.7cqw,24px) 'Inter Tight',Arial;color:#fff;text-shadow:0 1px 2px #000c}
  .game .overlay.paused .card #start{margin:0;padding:1.1cqw;font:800 clamp(14px,2.5cqw,34px) 'Inter Tight',Arial;gap:0}
  .game .overlay.paused .card #start span{display:none}
  .game .overlay.paused .card #hint{display:none}
}
/* На заставке кнопки паузы и звука не нужны — появляются после старта */
.game .overlay.cover~.pause,.game .overlay.cover~#music-quick{display:none}

/* Экран «Жизни закончились»: рамка assets/panel-dead.webp (1152×1365, прозрачная) с нарисованными «НОВЫЙ ЗАБЕГ», «Жизни закончились» и подписью.
   Поверх — только кнопка «Начать заново». Класс .dead ставит game.js в hurt() и снимает при старте. На узких экранах — обычная тёмная панель. */
@container (min-width:641px){
  .game .overlay.dead{padding:0;justify-content:center;background:#07060cb8}
  .game .overlay.dead .card{width:40cqw;max-width:none;aspect-ratio:1152/1365;box-sizing:border-box;overflow:hidden;
    padding:0 4.4cqw 8.4cqw;display:flex;flex-direction:column;justify-content:flex-end;
    background:url(assets/panel-dead.webp) center/100% 100% no-repeat;border:0;border-radius:0;box-shadow:none}
  .game .overlay.dead .card .eyebrow,.game .overlay.dead .card h2,.game .overlay.dead .card>p#description{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);margin:0;padding:0;filter:none}
  .game .overlay.dead .card #start{margin:0;padding:1.1cqw;font:800 clamp(14px,2.4cqw,32px) 'Inter Tight',Arial;gap:0}
  .game .overlay.dead .card #start span{display:none}
  .game .overlay.dead .card #hint{display:none}
}

/* Мобильный режим: полноэкранная игра и крупное управление пальцами (touch.js) */
html{-webkit-tap-highlight-color:transparent}
.game{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
body.mp{overflow:hidden;overscroll-behavior:none;touch-action:none;background:#000}
.game.fs{position:fixed!important;left:50%;top:50%;transform:translate(-50%,-50%);margin:0!important;z-index:9999;max-width:none!important;border-radius:0!important;border:0!important;
  width:min(100vw,calc(100vh*16/9))!important;box-shadow:0 0 0 200vmax #000!important}
@supports (height:100dvh){.game.fs{width:min(100vw,calc(100dvh*16/9))!important}}
/* кнопки управления: слева ◀ ▶, справа прыжок и базука — под большие пальцы */
.game .touch{display:none;position:absolute;inset:0;bottom:auto;left:0;right:0;top:0;height:100%;gap:0;pointer-events:none;z-index:4}
.game.fs .touch,.game.fs.touch{display:block}
@media(pointer:coarse){.game .touch{display:block}}
.game .touch button{position:absolute;margin:0;padding:0;border:0;border-radius:50%;pointer-events:auto;touch-action:none;font-size:0;color:transparent;cursor:pointer;
  background-repeat:no-repeat;background-position:center;background-size:46%;transition:transform .06s,filter .06s}
.game .touch button:nth-child(1),.game .touch button:nth-child(2){bottom:3.4cqw;width:10.4cqw;height:10.4cqw;
  background-color:#19130fb8;box-shadow:0 0 0 .35cqw #f9530ccc,0 .8cqw 1.8cqw #0008,inset 0 .25cqw .2cqw #ffffff40}
.game .touch button:nth-child(1){left:2.6cqw;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M16 3 L6 12 L16 21 Z' fill='white'/></svg>")}
.game .touch button:nth-child(2){left:14.2cqw;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M8 3 L18 12 L8 21 Z' fill='white'/></svg>")}
.game .touch button:nth-child(4){right:2.6cqw;bottom:3.4cqw;width:12.4cqw;height:12.4cqw;background-color:#f9530c;background-size:48%;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 3 L21 14 H15 V21 H9 V14 H3 Z' fill='white'/></svg>");
  box-shadow:0 0 0 .35cqw #ffb184,0 .7cqw 0 .1cqw #8f2a00,0 1.2cqw 2cqw #000a,inset 0 .3cqw .2cqw #ffffffa0,inset 0 -.6cqw .8cqw #8f2a0088}
.game .touch button:nth-child(3){right:17cqw;bottom:6.2cqw;width:9.6cqw;height:9.6cqw;background-color:#ffcf33;background-size:50%;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='7' fill='none' stroke='%232a1a03' stroke-width='3'/><circle cx='12' cy='12' r='2.6' fill='%232a1a03'/></svg>");
  box-shadow:0 0 0 .3cqw #fff2a8,0 .6cqw 0 .1cqw #a8730a,0 1cqw 1.8cqw #000a,inset 0 .3cqw .2cqw #fff,inset 0 -.5cqw .7cqw #d97a0088}
.game .touch button.on{transform:scale(.92);filter:brightness(1.3)}
.game .touch button:nth-child(1).on,.game .touch button:nth-child(2).on{background-color:#f9530c}
/* кнопка выхода из полноэкранного режима и подсказка «поверни телефон» */
#fs-exit{display:none;position:absolute;left:2cqw;top:10.5cqw;z-index:6;width:4.2cqw;height:4.2cqw;min-width:30px;min-height:30px;border:0;border-radius:50%;background:#19130fb8;color:#fff;font:700 clamp(12px,1.8cqw,22px) Arial;box-shadow:0 0 0 .25cqw #ffffff55;cursor:pointer;padding:0}
.game.fs #fs-exit{display:block}
#rotate-hint{display:none;position:fixed;inset:0;z-index:10000;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:#0c0a0f;color:#fff;text-align:center;font-family:'Inter Tight',Arial,sans-serif}
#rotate-hint b{font-size:26px;font-weight:800;letter-spacing:-.5px}#rotate-hint span{font-size:15px;color:#b9aea4}
#rotate-hint .ph{width:84px;height:84px;display:grid;place-items:center}
#rotate-hint .ph i{width:44px;height:72px;border:4px solid #f9530c;border-radius:10px;box-shadow:0 0 18px #f9530c88;animation:rot 2.2s ease-in-out infinite}
@keyframes rot{0%,20%{transform:rotate(0)}60%,100%{transform:rotate(-90deg)}}
@media(orientation:portrait){body.mp #rotate-hint{display:flex}}

/* Экран «Доставлено не всё»: рамка assets/panel-partial-clean.webp (1448×1086) с нарисованными «НЕПОЛНЫЙ ЗАКАЗ» и «Доставлено не всё».
   Текст «Собрано N из 92…» и кнопка «Сыграть ещё» — живые, поверх рамки. Класс .partial ставит game.js в victory(). На узких экранах — обычная тёмная панель. */
@container (min-width:641px){
  .game .overlay.partial{padding:0;justify-content:center;background:#07060cb8}
  .game .overlay.partial .card{width:44cqw;max-width:none;aspect-ratio:1448/1086;box-sizing:border-box;overflow:hidden;
    padding:18.6cqw 5.4cqw 5.6cqw;display:flex;flex-direction:column;justify-content:flex-start;
    background:url(assets/panel-partial-clean.webp) center/100% 100% no-repeat;border:0;border-radius:0;box-shadow:none}
  .game .overlay.partial .card .eyebrow,.game .overlay.partial .card h2{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);margin:0;padding:0;filter:none}
  .game .overlay.partial .card>p#description{margin:0;max-width:none;font:700 clamp(10px,1.45cqw,20px)/1.4 'Inter Tight',Arial;color:#fff;text-shadow:0 1px 2px #000c}
  .game .overlay.partial .card #start{margin:auto 0 0;padding:.85cqw;font:800 clamp(13px,2.1cqw,28px) 'Inter Tight',Arial;gap:0}
  .game .overlay.partial .card #start span{display:none}
  .game .overlay.partial .card #hint{display:none}
}

/* Приближение игры и защита от случайного увеличения страницы двойным касанием */
html,body{touch-action:manipulation;-webkit-text-size-adjust:100%}
.game,.game *{touch-action:none}
#fs-zoom{display:none;position:absolute;left:7.6cqw;top:10.5cqw;z-index:6;height:4.2cqw;min-height:30px;min-width:7.4cqw;padding:0 1.4cqw;border:0;border-radius:2.1cqw;background:#19130fb8;color:#fff;font:700 clamp(12px,1.7cqw,20px) 'Inter Tight',Arial;box-shadow:0 0 0 .25cqw #ffffff55;cursor:pointer}
.game.fs #fs-zoom{display:block}
/* На телефонах подсказки по клавишам и кнопка «Начать заново» под игрой не нужны (управление — экранными кнопками) */
@media (max-width:760px),(pointer:coarse) and (max-width:1000px){.controls{display:none}}

/* Экран «Заказ доставлен!»: рамка assets/panel-won.webp (1254×1254, прозрачная) с нарисованными плашкой, заголовком и динозавром.
   Живые: подпись «Вся шаурма собрана! Время…», форма записи в рейтинг и кнопка «Сыграть ещё». Класс .won ставит game.js в victory().
   На узких экранах — обычная тёмная панель. */
@container (min-width:641px){
  .game .overlay.won{padding:0;justify-content:center;background:#07060cb8}
  .game .overlay.won .card{width:54cqw;max-width:none;aspect-ratio:1/1;box-sizing:border-box;overflow:hidden;
    padding:29.4cqw 6cqw 11.6cqw 5.6cqw;display:flex;flex-direction:column;justify-content:flex-start;
    background:url(assets/panel-won.webp) center/100% 100% no-repeat;border:0;border-radius:0;box-shadow:none}
  .game .overlay.won .card .eyebrow,.game .overlay.won .card h2{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);margin:0;padding:0;filter:none}
  .game .overlay.won .card>p#description{margin:0;max-width:none;font:700 clamp(10px,1.35cqw,19px)/1.35 'Inter Tight',Arial;color:#fff;text-shadow:0 1px 2px #000c}
  .game .overlay.won .card .rate,.game .overlay.won .card .rate:has(.tgw){margin:.9cqw 0 0;gap:.9cqw;flex-direction:row;align-items:center;flex-wrap:nowrap}
  .game .overlay.won .card .rate input{flex:1;min-width:0;padding:.65cqw .9cqw;font-size:clamp(10px,1.3cqw,18px);border-radius:.8cqw}
  .game .overlay.won .card .rate button{margin:0;padding:.7cqw 1.3cqw;font-size:clamp(9px,1.25cqw,17px);white-space:nowrap;border-radius:.9cqw}
  .game .overlay.won .card .rate p{flex:1;margin:0;max-width:none;font:700 clamp(9px,1.2cqw,17px)/1.3 'Inter Tight',Arial;color:#fff3b1}
  .game .overlay.won .card #start{margin:auto 0 0;padding:.8cqw;font:800 clamp(13px,2cqw,28px) 'Inter Tight',Arial;gap:0}
  .game .overlay.won .card #start span{display:none}
  .game .overlay.won .card #hint{display:none}
}

/* Управление пальцами: надёжность — без выделения, фокуса и меню, с запасом по зоне нажатия */
.game .touch button{outline:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
.game .touch button:focus,.game .touch button:focus-visible{outline:none}
.game .touch button::after{content:"";position:absolute;inset:-1cqw}
.game .touch button::selection{background:transparent}
.game *:not(input)::selection{background:transparent}

/* Плавающий джойстик вместо кнопок ◀ ▶: зона в левой части, круг появляется под пальцем */
.game .touch button:nth-child(1),.game .touch button:nth-child(2){display:none}
#stick-zone{position:absolute;left:0;bottom:0;width:48%;height:76%;pointer-events:auto;touch-action:none;-webkit-user-select:none;user-select:none}
#stick{--sx:11.5cqw;--sy:calc(100% - 10cqw);position:absolute;left:var(--sx);top:var(--sy);width:13.5cqw;height:13.5cqw;transform:translate(-50%,-50%);border-radius:50%;pointer-events:none;
  background:#19130f55 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><path d='M24 50 L38 38 L38 62 Z M76 50 L62 38 L62 62 Z' fill='white' fill-opacity='.75'/></svg>") center/80% no-repeat;
  box-shadow:0 0 0 .35cqw #f9530c88,inset 0 0 2cqw #00000055;opacity:.45;transition:opacity .15s,left .12s,top .12s}
#stick.live{opacity:1;background-color:#19130fb0;box-shadow:0 0 0 .4cqw #f9530c,0 .8cqw 2cqw #0008,inset 0 0 2cqw #00000055;transition:opacity .1s}
#stick.l{box-shadow:0 0 0 .4cqw #ffb184,-1.2cqw 0 2.4cqw #f9530c99,0 .8cqw 2cqw #0008}
#stick.r{box-shadow:0 0 0 .4cqw #ffb184,1.2cqw 0 2.4cqw #f9530c99,0 .8cqw 2cqw #0008}
#stick i{position:absolute;left:50%;top:50%;width:6cqw;height:6cqw;margin:-3cqw 0 0 -3cqw;border-radius:50%;background:radial-gradient(circle at 35% 30%,#ffd9bf,#f9530c 60%,#c23c00);box-shadow:0 .4cqw .8cqw #000a,inset 0 .25cqw .2cqw #ffffffaa;opacity:0;transition:opacity .1s}
#stick.live i{opacity:1}

/* Прелоадер: экран загрузки поверх игры, пока тянутся картинки */
#preloader{position:absolute;inset:0;z-index:30;display:grid;place-items:center;background:radial-gradient(ellipse at 50% 38%,#4a1c08 0,#1c0d0c 55%,#0d0709 100%);opacity:1;transition:opacity .4s ease,visibility 0s .4s}
#preloader.done{opacity:0;visibility:hidden;pointer-events:none}
#preloader .pl-in{display:flex;flex-direction:column;align-items:center;gap:1.4cqw;width:min(46cqw,90%)}
#preloader .pl-logo{font:800 clamp(30px,8cqw,110px)/1 'Inter Tight',Arial,sans-serif;letter-spacing:-.03em;color:#f9530c;text-shadow:0 .3cqw 0 #8a2d00,0 0 3cqw #f9530c88,0 1cqw 2cqw #000a;animation:plpulse 1.6s ease-in-out infinite}
#preloader .pl-sub{font:700 clamp(9px,1.4cqw,20px) 'Inter Tight',Arial,sans-serif;letter-spacing:.32em;color:#ffd9bf;margin:-.4cqw 0 1.2cqw .32em}
#preloader .bar{width:100%;height:clamp(10px,1.7cqw,22px);border-radius:99px;background:#00000066;box-shadow:inset 0 .2cqw .5cqw #000c,0 0 0 .25cqw #f9530c66;overflow:hidden}
#preloader .bar i{display:block;height:100%;width:0;border-radius:99px;background:linear-gradient(180deg,#ffb184 0,#ff7a30 35%,#f9530c 70%,#d23c00 100%);box-shadow:inset 0 .25cqw .2cqw #ffffff99,0 0 2cqw #f9530caa;transition:none}
#preloader p{margin:.4cqw 0 0;font:700 clamp(10px,1.5cqw,20px) 'Inter Tight',Arial,sans-serif;color:#fff3e0;text-shadow:0 1px 2px #000a;display:flex;gap:1cqw}
#preloader .pct{color:#ffd24a;font-variant-numeric:tabular-nums}
@keyframes plpulse{0%,100%{transform:scale(1)}50%{transform:scale(1.035)}}
@media (prefers-reduced-motion:reduce){#preloader .pl-logo{animation:none}}

/* Вертикальное положение: игра сама разворачивается на 90° и занимает экран (работает и при выключенном повороте экрана) */
#rotate-hint{display:none!important}
.game.fs.rot{width:min(100vh,calc(100vw*16/9))!important;transform:translate(-50%,-50%) rotate(90deg)!important}
@supports (height:100dvh){.game.fs.rot{width:min(100dvh,calc(100vw*16/9))!important}}
