* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden; background: #140c14;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;   /* мобильный Chrome не раздувает текст сам (font boosting): на телефоне надписи вылезали из плашек (11-17) */
  font-family: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, "San Francisco", "Helvetica Neue", Arial, sans-serif;
  font-weight: 800; color: #3b2645;
  user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -webkit-touch-callout: none;
  touch-action: none; overscroll-behavior: none;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; touch-action: manipulation; }
img { -webkit-user-drag: none; user-select: none; pointer-events: none; }

/* анимированный фон по бокам */
/* фон страницы двигается только transform'ом (видеокарта, без перерисовки): background-position и top перерисовывали весь экран каждый кадр — на телефонах фризы в меню и на карте (11-07) */
#bg { position: fixed; inset: 0; overflow: hidden; background: #1f1236; }
#bg::before { content: ''; position: absolute; left: 0; top: 0; width: 300%; height: 100%; background: linear-gradient(135deg, #2a1a14, #1f1236 45%, #10243a); animation: bgmove 18s ease-in-out infinite; will-change: transform; }
@keyframes bgmove { 0%,100% { transform: translateX(0); } 50% { transform: translateX(-66.667%); } }
#bg i { position: absolute; width: 70px; height: 70px; border-radius: 50%; border: 6px dashed rgba(255,190,90,.25); background: radial-gradient(circle, rgba(255,190,90,.12), rgba(255,190,90,0)); animation: floaty 14s linear infinite; top: 0; will-change: transform; }
#bg i::after { content: ''; position: absolute; left: 50%; top: 50%; width: 30px; height: 8px; margin: -4px 0 0 -15px; background: rgba(255,190,90,.3); border-radius: 4px; }
#bg i:nth-child(1) { left: 5%; animation-delay: 0s; } #bg i:nth-child(2) { left: 15%; animation-delay: -4s; transform: scale(.6); }
#bg i:nth-child(3) { left: 25%; animation-delay: -8s; } #bg i:nth-child(4) { left: 75%; animation-delay: -2s; }
#bg i:nth-child(5) { left: 85%; animation-delay: -6s; } #bg i:nth-child(6) { left: 92%; animation-delay: -10s; }
#bg i:nth-child(7) { left: 40%; animation-delay: -12s; } #bg i:nth-child(8) { left: 60%; animation-delay: -3s; }
#bg i:nth-child(9) { left: 10%; animation-delay: -9s; } #bg i:nth-child(10) { left: 80%; animation-delay: -13s; }
@keyframes floaty { from { transform: translateY(110vh) rotate(0); } to { transform: translateY(-15vh) rotate(360deg); } }

/* сцена на весь экран с обрезкой: кадр 720×1280 до масштабирования шире телефона, и без обрезки мобильные
   браузеры (Safari, Яндекс) растягивают под него страницу — игра считала экран шире и видна была только часть */
#stage { position: fixed; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; }
#frame { position: absolute; left: 0; top: 0; width: 720px; height: 1280px; transform-origin: 0 0; overflow: hidden; border-radius: 0; box-shadow: 0 0 60px rgba(0,0,0,.6); }
#cv { position: absolute; left: 0; top: 0; width: 720px; height: 1280px; display: block; }
#cvgl { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }   /* WebGL-слой под #cv: фон и картинка двери (render.backGL) */
.hidden { display: none !important; }
#hud > #hand { position: absolute; left: 0; top: 0; width: 200px; height: 200px; display: none; pointer-events: none; z-index: 20; }

/* HUD */
#hud { position: absolute; inset: 0; pointer-events: none; }
#hud > * { pointer-events: auto; }
.icon-btn { position: absolute; width: 72px; height: 72px; border-radius: 24px; background: #fff; box-shadow: 0 5px 0 #c9b6e6, 0 8px 16px rgba(80,40,140,.2); display: grid; place-items: center; }
.icon-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #c9b6e6; }
.icon-btn svg { width: 38px; height: 38px; }
#btnPause { left: 20px; top: calc(20px + var(--dt, 0px)); width: 76px; height: 70px; border-radius: 24px; }   /* одна высота с плашкой уровня и монетами */
#btnPause svg { width: 42px; height: 42px; }
#hudLevel { position: absolute; left: 0; right: 0; top: calc(18px + var(--dt, 0px)); text-align: center; font-size: 36px; pointer-events: none; color: #fff; text-shadow: 0 3px 0 #000, 0 0 12px rgba(255,180,80,.6); }
.coins { position: absolute; right: 20px; top: calc(20px + var(--dt, 0px)); height: 70px; padding: 0 24px 0 10px; border-radius: 35px; background: #fff; display: flex; align-items: center; gap: 10px; font-size: 36px; box-shadow: 0 4px 0 #c9b6e6; }
/* монета — золотой «винтик»: ободок, шляпка с крестовым шлицем, блик (SVG; раньше был кружок с прямоугольником) */
.coin { width: 50px; height: 50px; border-radius: 50%; flex: none; background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'><circle cx='20' cy='20' r='18.5' fill='%23d98a00' stroke='%233b2645' stroke-width='3'/><circle cx='20' cy='19' r='16' fill='%23ffc21a'/><circle cx='20' cy='20' r='11' fill='%23ffd84d' stroke='%23c27a00' stroke-width='2'/><path d='M14.5 20h11M20 14.5v11' stroke='%23b06a00' stroke-width='3.2' stroke-linecap='round'/><path d='M9 15a12 12 0 0 1 8-7' fill='none' stroke='%23fff8c8' stroke-width='3' stroke-linecap='round'/></svg>") center / 100% 100% no-repeat; position: relative; filter: drop-shadow(0 2px 0 rgba(59,38,69,.35)); }
#progress { position: absolute; left: 120px; right: 120px; top: calc(86px + var(--dt, 0px)); height: 28px; pointer-events: none; }
#progress .bar { position: absolute; inset: 0; background: rgba(255,255,255,.75); border-radius: 14px; border: 3px solid #3b2645; overflow: hidden; }
#progress .bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #ff7ab8, #ffc21a, #4fd88a, #49b8ff); border-radius: 10px; }
#progress span { position: absolute; inset: 0; text-align: center; line-height: 28px; font-size: 19px; color: #3b2645; text-shadow: 0 0 4px #fff, 0 0 4px #fff; }
#tip { position: absolute; left: 60px; right: 60px; top: calc(1066px + var(--db, 0px)); padding: 14px 18px; text-align: center; font-size: 26px; background: #fff; border-radius: 22px; border: 3px solid #3b2645; box-shadow: 0 6px 0 rgba(60,20,90,.2); opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s; pointer-events: none !important; }
#tip.show { opacity: 1; transform: none; }

/* экраны */
.screen { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; }
.screen.show { display: flex; animation: fadein .25s ease-out; }
#levels.screen.show { animation: none; }   /* карта — сразу, как окно магазина, без проявления (пользователь 11-07) */
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
#loading { background: linear-gradient(180deg, #2a1a14, #140c0a); justify-content: center; gap: 60px; }
.loadbar { width: 360px; height: 26px; border-radius: 13px; background: #fff; border: 3px solid #3b2645; overflow: hidden; }
.loadbar i { display: block; height: 100%; width: 10%; background: linear-gradient(90deg, #ff7ab8, #ffc21a); transition: width .2s; }
.logo { display: flex; flex-direction: column; align-items: center; transform: rotate(-3deg); }
.logo .l1 { font-size: 112px; font-weight: 900; color: #ffb03a; letter-spacing: 2px; -webkit-text-stroke: 8px #3b2645; paint-order: stroke fill; text-shadow: 0 10px 0 #3b2645; line-height: 1.05; }
.logo .l2 { margin-top: 14px; font-size: 44px; font-weight: 900; color: #fff; background: #3a2a5a; padding: 4px 26px 8px; border-radius: 26px; border: 5px solid #3b2645; transform: rotate(2deg); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-width: 360px; height: 100px; padding: 0 40px; border-radius: 50px; font-size: 42px; font-weight: 900; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.25); background: linear-gradient(180deg, #ff8fc7, #ff5fa8); box-shadow: 0 8px 0 #c43c80, 0 14px 24px rgba(120,30,90,.25); border: 4px solid #3b2645; }
.btn:active { transform: translateY(5px); box-shadow: 0 3px 0 #c43c80; }
.btn.green { background: linear-gradient(180deg, #7ff0a8, #2fc45a); box-shadow: 0 8px 0 #1f9442, 0 14px 24px rgba(30,120,60,.25); }
.btn.blue { background: linear-gradient(180deg, #8fc6ff, #3b82f6); box-shadow: 0 8px 0 #2459b8, 0 14px 24px rgba(30,60,140,.25); }
.btn.yellow { background: linear-gradient(180deg, #ffe58a, #ffb81f); box-shadow: 0 8px 0 #c98a00, 0 14px 24px rgba(140,90,0,.25); color: #3b2645; text-shadow: 0 2px 0 rgba(255,255,255,.5); }
.btn.purple { background: linear-gradient(180deg, #c3a8ff, #8b5cf6); box-shadow: 0 8px 0 #5f36c2, 0 14px 24px rgba(80,40,160,.25); }
.btn.ghost { background: #fff; color: #3b2645; text-shadow: none; box-shadow: 0 8px 0 #c9b6e6; }
.btn.small { min-width: 0; height: 80px; font-size: 34px; padding: 0 30px; }
.btn .adtag { font-size: 22px; background: rgba(255,255,255,.9); color: #1f9442; text-shadow: none; padding: 4px 10px; border-radius: 12px; }

#menu { background: transparent; justify-content: flex-start; padding-top: calc(128px + var(--db, 0px)); gap: 0; }
#menu .logo { margin-bottom: 34px; } #menu .logo .l2 { font-size: 36px; }
#menu .hero { width: 380px; height: 506px; border-radius: 34px; border: 8px solid #c9a14a; box-shadow: 0 12px 30px rgba(0,0,0,.5), 0 0 40px rgba(255,170,60,.35); overflow: hidden; position: relative; margin-bottom: 18px; animation: bob 4s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }   /* ровно, без наклона */
#menu .hero img { width: 100%; height: 100%; display: block; }
#menu .hero .q { position: absolute; inset: 0; display: grid; place-items: center; font-size: 160px; color: #fff; -webkit-text-stroke: 6px #3b2645; paint-order: stroke fill; }
#menu .row { display: flex; gap: 26px; margin-top: 30px; }
/* название главы — плашкой на картинке сверху, как номер двери снизу */
#menu .hero .ch-name { position: absolute; left: 0; right: 0; top: 0; padding: 12px 0 14px; text-align: center; font-size: 41px; color: #ffd36b; text-shadow: 0 3px 0 #000; background: linear-gradient(180deg, rgba(20,10,24,.85), rgba(20,10,24,0)); }
#menu .btn.play { width: 440px; height: 112px; font-size: 48px; margin-top: 34px; }
#menu .btn.play svg { width: 52px; height: 52px; } #menu .btn.play svg path { fill: #3fdc6a; }
#menu .row .btn { min-width: 0; width: 300px; padding: 0 20px; font-size: 34px; height: 90px; }
#menu .gear { right: 20px; top: calc(28px + var(--dt, 0px)); width: 84px; height: 84px; font-size: 46px; } #menu .gear svg { width: 46px; height: 46px; }
#menu .coins { left: 20px; right: auto; top: calc(30px + var(--dt, 0px)); height: 80px; border-radius: 40px; font-size: 40px; } #menu .coins .coin { width: 56px; height: 56px; }   /* крупнее и ниже — по просьбе пользователя */
.lvl-badge { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: #fff; padding: 6px 20px; border-radius: 20px; font-size: 26px; white-space: nowrap; border: 3px solid #3b2645; }

.topbar { position: absolute; left: 0; right: 0; top: 0; height: 110px; display: flex; align-items: center; justify-content: center; font-size: 46px; color: #fff; text-shadow: 0 3px 0 #000; }
.topbar .icon-btn { left: 20px; top: 18px; }
#levels { background: linear-gradient(180deg, #1f1236, #10243a); }
.lgrid { position: absolute; top: 130px; left: 36px; right: 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.ltile { position: relative; height: 250px; border-radius: 28px; background: #fff; border: 5px solid #3b2645; overflow: hidden; box-shadow: 0 7px 0 rgba(60,20,90,.25); display: grid; place-items: center; }
.ltile:active { transform: translateY(4px); }
.ltile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ltile .num { position: relative; font-size: 84px; font-weight: 900; color: #fff; -webkit-text-stroke: 6px #3b2645; paint-order: stroke fill; }
.ltile.done .num { position: absolute; left: 10px; top: 4px; font-size: 44px; -webkit-text-stroke: 5px #3b2645; }
.ltile.done::after { content: '★'; position: absolute; right: 12px; top: 6px; font-size: 40px; color: #ffc21a; -webkit-text-stroke: 3px #3b2645; paint-order: stroke fill; }
.ltile.next { background: linear-gradient(180deg, #ff9fd0, #ff5fa8); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 7px 0 rgba(60,20,90,.25), 0 0 0 0 rgba(255,95,168,.6); } 50% { box-shadow: 0 7px 0 rgba(60,20,90,.25), 0 0 0 14px rgba(255,95,168,0); } }
.ltile.locked { background: #d9cfe8; }
.ltile.locked .num { opacity: .35; }
.devboss { position: absolute; right: 6px; bottom: 6px; z-index: 2; font-size: 30px; line-height: 44px; width: 48px; height: 48px; border-radius: 50%; background: #ff3b3b; color: #fff; border: 3px solid #3b2645; }

.devfresh { position: absolute; left: 6px; bottom: 6px; z-index: 2; font-size: 30px; line-height: 44px; width: 48px; height: 48px; border-radius: 50%; background: #2fb35a; color: #fff; border: 3px solid #3b2645; }
.lock { position: absolute; width: 70px; height: 70px; }


/* модальные окна */
.modal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(30,10,50,.5); animation: fadein .2s; }
.panel { width: 600px; padding: 40px 40px 50px; border-radius: 44px; background: #fff; border: 6px solid #3b2645; box-shadow: 0 14px 0 rgba(60,20,90,.3); display: flex; flex-direction: column; align-items: center; gap: 26px; animation: pop .35s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.panel h2 { margin: 0; font-size: 56px; font-weight: 900; color: #ff5fa8; -webkit-text-stroke: 3px #3b2645; paint-order: stroke fill; text-align: center; }
.panel p { margin: 0; font-size: 30px; text-align: center; color: #6b5580; font-weight: 700; }
.panel .btn { min-width: 460px; font-size: 34px; white-space: nowrap; padding: 0 24px; }
.vol { width: 460px; display: flex; flex-direction: column; gap: 6px; padding: 12px 28px 14px; border-radius: 30px; background: #f1ebfa; box-sizing: border-box; font-size: 28px; }
.vol-t { display: flex; justify-content: space-between; }
.vol input { -webkit-appearance: none; appearance: none; width: 100%; height: 64px; background: transparent; margin: 0; touch-action: none; cursor: pointer; }
.vol input::-webkit-slider-runnable-track { height: 18px; border-radius: 9px; border: 3px solid #3b2645; background: linear-gradient(90deg, #2fc45a var(--p), #cbbfe0 var(--p)); }
.vol input::-moz-range-track { height: 18px; border-radius: 9px; border: 3px solid #3b2645; background: linear-gradient(90deg, #2fc45a var(--p), #cbbfe0 var(--p)); }
.vol input::-webkit-slider-thumb { -webkit-appearance: none; width: 50px; height: 50px; margin-top: -19px; border-radius: 50%; background: #ffc21a; border: 3px solid #3b2645; box-sizing: border-box; }
.vol input::-moz-range-thumb { width: 50px; height: 50px; border-radius: 50%; background: #ffc21a; border: 3px solid #3b2645; box-sizing: border-box; }
.toggle { width: 460px; height: 84px; border-radius: 42px; background: #f1ebfa; display: flex; align-items: center; padding: 0 16px 0 28px; font-size: 28px; justify-content: space-between; white-space: nowrap; gap: 12px; }
.toggle .sw { width: 100px; height: 56px; border-radius: 28px; background: #cbbfe0; position: relative; transition: .2s; border: 3px solid #3b2645; }
.toggle .sw::after { content: ''; position: absolute; left: 4px; top: 4px; width: 42px; height: 42px; border-radius: 50%; background: #fff; transition: .2s; border: 3px solid #3b2645; box-sizing: border-box; }
.toggle.on .sw { background: #2fc45a; }
.toggle.on .sw::after { left: 48px; }
.modal.win { align-items: flex-end; background: transparent; padding-bottom: 24px; }
.modal.win .panel { padding: 26px 40px 34px; gap: 18px; }
.win-name { position: absolute; top: 30px; left: 0; right: 0; text-align: center; font-size: 46px; font-weight: 900; color: #fff; -webkit-text-stroke: 6px #3b2645; paint-order: stroke fill; animation: pop .5s cubic-bezier(.3,1.6,.5,1); }
.reward { display: flex; align-items: center; gap: 14px; font-size: 54px; font-weight: 900; }
.reward .coin { width: 56px; height: 56px; }
.win-btns { display: flex; gap: 20px; }
.panel .btn.win-shop { min-width: 0; width: 530px; height: 80px; font-size: 30px; }
.win-time { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 32px; font-weight: 900; color: #3b2645; }
.win-time svg { width: 36px; height: 36px; }
.win-new { margin-top: 4px; font-size: 24px; font-weight: 900; color: #2f7d32; text-align: center; }
/* после босса: тизер следующей главы — силуэт следующего босса в клетке */
.win-next { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0 0 6px; padding: 8px 22px; border-radius: 16px; background: rgba(43,33,64,.1); }
.win-next small { font-size: 20px; font-weight: 700; color: #6b5a78; }
.win-next b { font-size: 25px; font-weight: 900; color: #3b2645; line-height: 1.1; }
.win-btns { justify-content: center; }
.win-btns .btn { min-width: 0; width: 380px; font-size: 29px; height: 92px; padding: 0 14px; gap: 8px; line-height: 1.05; }
.win-btns .btn svg { width: 34px; height: 34px; flex: none; }
/* значок рекламы — кружок в углу кнопки ×2, чтобы подпись не вылезала за кнопку (#65) */
/* ×2 — маленькая кнопка рядом с суммой (пользователь 11-17) */
.win-info .reward .x2b { position: relative; overflow: visible; min-width: 0; width: auto; height: 80px; margin-left: 10px; padding: 0 50px; font-size: 24px; }
.win-info .reward .x2b .adb { position: absolute; top: -14px; right: -12px; width: 46px; height: 46px; border-radius: 50%; background: #fff; border: 4px solid #3b2645; display: grid; place-items: center; }
.win-info .reward .x2b .adb svg { width: 28px; height: 28px; }
/* панель победы: время и монеты в одну строку; кнопки крупные (на телефоне мелкие не видно — пользователь 11-07), картинка заходит под панель сверху */
.modal.win { padding-bottom: 18px; }
.modal.win .panel { padding: 22px 36px 28px; gap: 14px; }
.modal.win .stars.big i { font-size: 72px; }
.win-info { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 30px; }
.win-info .win-time { font-size: 32px; }
.win-info .reward { font-size: 52px; gap: 12px; }
.win-info .reward .coin { width: 54px; height: 54px; }
.modal.win .panel .btn.win-shop { font-size: 30px; }
.modal.win .win-btns .btn { font-size: 38px; }   /* «Дальше» — главная кнопка, одна и крупно */
.modal.win .btn.win-shop.pulse { animation: shopPulse 1.4s ease-in-out infinite; }   /* магазин мигает — заметнее (пользователь 11-17) */
/* окно победы (пользователь 11-17): «Дальше» — самая крупная и мигает, как магазин; магазин чуть меньше; ×2 за рекламу — ещё меньше */
.modal.win .win-btns .btn { width: 540px; height: 108px; font-size: 46px; animation: shopPulse 1.4s ease-in-out infinite; }
.modal.win .panel .btn.win-shop { zoom: .84; }   /* меньше — целиком (zoom), а не высотой: при низкой высоте боковины картинки дают щели */
.modal.win .win-info .reward .x2b { zoom: .78; }
@keyframes shopPulse { 0%, 100% { transform: scale(1); filter: none; } 50% { transform: scale(1.04); filter: brightness(1.18); } }   /* высоту не трогать: края таблички растянуты по высоте, на 64 px между ними и серединой видны щели */
/* ПК: табличка победы выше и крупнее — снизу у края она терялась (пользователь 11-17) */
/* не по центру: между надписью и табличкой встаёт картинка открытой двери (render.winBox) — по центру табличка её перекрывала */
#frame.land .modal.win { padding-bottom: 24px; }   /* ниже — картинке победы больше места (11-17) */
#frame.land .modal.win > .win-name, #frame.land .modal.win > .panel { zoom: 1.1; }
.panel .btn svg { width: 40px; height: 40px; flex: none; }

#toast { position: absolute; left: 50%; top: calc(560px + var(--db, 0px)); transform: translate(-50%, 20px); padding: 20px 34px; border-radius: 30px; background: #3b2645; color: #fff; font-size: 30px; opacity: 0; transition: .25s; pointer-events: none; white-space: nowrap; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
/* достижения */
#achToast { position: absolute; left: 50%; top: 24px; z-index: 50; transform: translate(-50%, -160px); display: flex; align-items: center; gap: 18px; padding: 14px 34px 14px 18px; border-radius: 34px; background: linear-gradient(180deg, #ffe066, #ffb81a); border: 5px solid #3b2645; box-shadow: 0 8px 0 rgba(60,20,90,.3); color: #3b2645; pointer-events: none; transition: transform .35s cubic-bezier(.3,1.5,.5,1); white-space: nowrap; }
#achToast.show { transform: translate(-50%, 0); }
#achToast .achi { font-size: 54px; }
#achToast small { display: block; font-size: 22px; font-weight: 800; opacity: .75; }
#achToast b { display: block; font-size: 32px; }
#menu .trophy { right: 118px; top: calc(28px + var(--dt, 0px)); width: 84px; height: 84px; font-size: 46px; }   /* в одной строке с шестерёнкой */
#menu .trophy i:not(.gi) { position: absolute; right: -8px; top: -8px; min-width: 32px; height: 32px; border-radius: 16px; background: #ff5fa8; color: #fff; font-size: 20px; font-style: normal; font-weight: 900; line-height: 32px; text-align: center; border: 3px solid #3b2645; }
.achr { width: 100%; box-sizing: border-box; display: flex; align-items: center; gap: 16px; background: #eee9f4; border: 3px solid #b9aac9; border-radius: 24px; padding: 10px 16px; margin-bottom: 10px; text-align: left; }
.achr .achi { font-size: 46px; width: 64px; text-align: center; filter: grayscale(1); opacity: .45; }
.achr .upt b { color: #8a7a9a; }
.achr .achm { width: 44px; text-align: center; font-size: 34px; color: #2fb35a; opacity: .5; }
.achr .achm svg { position: static; width: 34px; height: 34px; }
.achr.got { background: #fff6d6; border-color: #3b2645; }
.achr.got .achi { filter: none; opacity: 1; }
.achr.got .upt b { color: #3b2645; }
.achr.got .achm { opacity: 1; }

.ad-stub { position: absolute; inset: 0; background: #111; display: grid; place-items: center; z-index: 100; }
.ad-box { display: flex; flex-direction: column; align-items: center; gap: 30px; color: #fff; }
.ad-tag { font-size: 30px; background: #ffc21a; color: #111; padding: 6px 18px; border-radius: 10px; }
.ad-title { font-size: 40px; }
.ad-bar { width: 400px; height: 12px; background: #333; border-radius: 6px; overflow: hidden; }
.ad-bar i { display: block; height: 100%; background: #ffc21a; animation: adbar 1.4s linear forwards; }
@keyframes adbar { from { width: 0; } to { width: 100%; } }
.ad-btns { display: flex; flex-direction: column; gap: 24px; min-height: 200px; }

/* техномагия: способности, мана, звёзды, карта, сюжет */
#progress .bar i.boss { background: linear-gradient(90deg, #ff2a4a, #ff7a3a); }
/* Нижний пульт в одну строку (вариант А): Перемотка слева от лотка, Магнит и Рентген справа; лоток рисует холст.
   Шара маны нет — каждая кнопка сама заполняется по кругу (--p = мана / цена). */
#abilities { position: absolute; left: 0; right: 0; bottom: var(--de, 0px); height: 170px; pointer-events: none; transition: transform .7s cubic-bezier(.5, -0.4, .7, 1), opacity .7s; }
#abilities.away { transform: translateY(220px); opacity: 0; pointer-events: none; visibility: hidden; transition: transform .7s cubic-bezier(.5, -0.4, .7, 1), opacity .7s, visibility 0s .7s; }   /* бой с лентой: панель уезжает, внизу рогатка */
#mana { position: relative; width: 74px; height: 74px; border-radius: 50%; background: #1a1030; border: 4px solid #3b2645; overflow: hidden; box-shadow: 0 0 16px rgba(120,180,255,.5); pointer-events: none; }
#mana i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(0deg, #3b82f6, #5ee0ff); transition: height .3s; }
#mana span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 24px; text-shadow: 0 2px 0 #000; }
.abil { position: absolute; bottom: 36px; width: 92px; height: 92px; border-radius: 50%; pointer-events: auto; --p: 0;
  background: radial-gradient(circle, #fff 0 36px, transparent 37px), conic-gradient(#5ee0ff calc(var(--p) * 1turn), #3b2645 0);
  box-shadow: 0 4px 14px rgba(0,0,0,.35);   /* без «ступеньки» вниз — круг ровный (пользователь) */ display: grid; place-items: center; }
.abil[data-ab="undo"] { left: 40px; }   /* чуть правее, не у самого края (пользователь) */
.abil[data-ab="magnet"] { left: 516px; }
.abil[data-ab="xray"] { left: 616px; }
.abil:active { transform: translateY(3px); box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.abil b { width: 52px; height: 52px; display: grid; place-items: center; }
.abil b svg { width: 46px; height: 46px; }
.abil em { position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%); font-style: normal; padding: 2px 8px; border-radius: 12px; background: #ffe58a; border: 2px solid #3b2645; font-size: 17px; display: flex; align-items: center; gap: 2px; white-space: nowrap; }
.abil em.mana { background: #bfe6ff; }
.abil em.ad { background: #b9f3c9; }
.abil.ready { box-shadow: 0 0 18px rgba(94,224,255,.9); }
.abil.off { opacity: .45; }
#tip { top: calc(985px + var(--db, 0px)); }
#tip.fight { top: 210px; }
#tip.lore { background: #2b2140; color: #fff; border-color: #ffb13d; text-align: left; }
#tip .who { display: block; color: #ffb13d; font-size: 20px; margin-bottom: 2px; }
/* боевые способности героя: супер-снаряды слева внизу, щит справа; кольцо — перезарядка, внизу секунды */
#fightAbil { position: absolute; left: 0; right: 0; bottom: var(--de, 0px); height: 170px; pointer-events: none; }
.fab { position: absolute; bottom: 52px; width: 104px; height: 104px; border-radius: 50%; pointer-events: auto; --p: 1; display: grid; place-items: center;
  background: radial-gradient(circle, #f4efe6 0 41px, transparent 42px), conic-gradient(#ffd84a calc(var(--p) * 1turn), #3b2645 0);
  box-shadow: 0 4px 14px rgba(0,0,0,.35); animation: abilPop .45s ease-out; }
.fab[data-fa="super"] { left: 48px; }
.fab[data-fa="shield"] { right: 48px; }
.fab b svg { width: 60px; height: 60px; display: block; }
.fab:active { transform: translateY(3px); box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.fab em { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); font-style: normal; padding: 1px 10px; border-radius: 12px; background: #3b2645; color: #fff; border: 2px solid #8a7aa6; font-size: 18px; white-space: nowrap; }
.fab em:empty { display: none; }
.fab.cd b { filter: grayscale(.85) brightness(.85); }
.fab.ready { box-shadow: 0 0 0 4px #ffd84a, 0 0 22px rgba(255,216,74,.75); }
.fab.on { box-shadow: 0 0 0 5px #7dd8ff, 0 0 28px rgba(125,216,255,.95); }
.fab[data-fa="super"].on { animation: fabRainbow 1.2s linear infinite; }
@keyframes fabRainbow { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } }
.fab.pulse { animation: abilPulse .7s ease-in-out infinite; }
body.aiming #fightAbil { pointer-events: none; }
/* Магазин: метка «Новое!» на кнопке (после боя открылось улучшение), бейдж на карточке, замок на ненайденных способностях */
.has-new { position: relative; }
.has-new::after { content: attr(data-new); position: absolute; top: -14px; right: -10px; padding: 2px 9px; border-radius: 12px; background: #ff4b5c; color: #fff; border: 2px solid #3b2645; font-size: 16px; line-height: 1.2; transform: rotate(8deg); animation: newPulse 1.1s ease-in-out infinite; pointer-events: none; }
@keyframes newPulse { 0%,100% { transform: rotate(8deg) scale(1); } 50% { transform: rotate(8deg) scale(1.12); } }
.newtag { font-style: normal; font-size: 14px; padding: 1px 7px; border-radius: 10px; background: #ff4b5c; color: #fff; vertical-align: middle; }
.upc.locked { opacity: .55; filter: grayscale(.8); }
body.aiming #ammo, body.aiming #abilities { pointer-events: none; }   /* оттяжка рогатки не жмёт кнопки */
.stars { display: flex; gap: 6px; justify-content: center; }
.stars i { font-style: normal; color: #6b5580; -webkit-text-stroke: 3px #3b2645; paint-order: stroke fill; }
.stars i.on { color: #ffc21a; }
.stars.big i { font-size: 80px; }
.stars.sm { position: absolute; bottom: 8px; left: 0; right: 0; }
.stars.sm i { font-size: 30px; }
.lmap { position: absolute; top: 120px; left: 26px; right: 26px; bottom: 20px; overflow-y: auto; touch-action: pan-y; display: flex; flex-direction: column; gap: 18px; }
.chap { border-radius: 26px; padding: 12px 16px 16px; background: rgba(0,0,0,.35); border: 3px solid var(--g); box-shadow: 0 0 18px color-mix(in srgb, var(--g) 40%, transparent); }
.chap-t { color: #fff; font-size: 28px; margin: 0 0 10px 6px; text-shadow: 0 2px 0 #000; }
.lrow { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.lrow[hidden] { display: none; }
.lwrap.paged { display: flex; align-items: center; gap: 8px; }
.lwrap.paged .lrow { flex: 1; gap: 10px; }
.lpg { flex: none; width: 40px; height: 96px; border: 0; border-radius: 14px; background: rgba(0,0,0,.45); color: #fff; display: flex; align-items: center; justify-content: center; padding: 0; }
.lpg svg { width: 26px; height: 26px; }
.lpg.next svg { transform: scaleX(-1); }
.lpg:disabled { opacity: .25; }
.ltile { height: 130px; }
.ltile .num { font-size: 64px; }
.ltile.done .num { position: relative; left: auto; top: -10px; font-size: 52px; }
.ltile.done::after { content: none; }
.ltile.done { background: #e9e2f5; }
.ltile.boss { background: linear-gradient(180deg, #ffb3b3, #ff6b6b); }
.ltile.boss.locked { background: #b9a9b9; }
.ltile .skull { position: absolute; right: 6px; top: 4px; line-height: 0; }
.ltile .skull svg { width: 32px; height: 32px; }
.ltile.boss.done::after { display: none; }   /* на месте звёздочки «пройдено» — череп босса */
.ltile.locked .lock { width: 54px; height: 54px; right: 10px; bottom: 8px; }
.panel.story, .panel.intro { gap: 20px; }
.story-img { width: 300px; height: 220px; object-fit: cover; border-radius: 22px; border: 5px solid #3b2645; }
.panel.story p, .panel.intro p { font-size: 27px; line-height: 1.3; color: #4a3a5c; }
.panel.story h2, .panel.intro h2 { font-size: 46px; color: #ffb03a; }
.intro-ico { width: 140px; height: 140px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(#fff, #e6dcff); border: 5px solid #3b2645; }
.intro-ico svg { width: 90px; height: 90px; }
.intro-ico img { width: 140px; height: 140px; }
#ammo { position: absolute; left: 0; right: 0; top: calc(1112px + var(--dd, 0px)); height: 90px; display: flex; justify-content: center; align-items: center; gap: 14px; }
.am { position: relative; width: 78px; height: 78px; border-radius: 50%; border: 5px solid #1a1020; box-shadow: 0 5px 0 rgba(0,0,0,.4); transition: transform .12s; }
.am::after { content: ''; position: absolute; inset: 14px; border-radius: 50%; background: rgba(255,255,255,.35); }
.am span { position: absolute; right: -8px; bottom: -6px; min-width: 34px; height: 34px; padding: 0 6px; border-radius: 17px; background: #fff; border: 3px solid #1a1020; font-size: 20px; display: grid; place-items: center; z-index: 1; }
.am.sel { transform: scale(1.18) translateY(-8px); box-shadow: 0 0 0 6px #fff, 0 0 24px 8px rgba(255,255,255,.7); }
.am.empty { opacity: .25; }
.am.frozen { filter: grayscale(.7) brightness(1.2); box-shadow: 0 0 0 5px #bdf3ff; }
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; width: 100%; }
.steps li { display: flex; gap: 14px; align-items: center; font-size: 25px; line-height: 1.25; color: #4a3a5c; text-align: left; }
.steps li b { flex: none; width: 58px; height: 58px; border-radius: 50%; background: #f1ebfa; display: grid; place-items: center; font-size: 32px; border: 3px solid #3b2645; }

/* способности: готовые светятся, в опасности — мигают */
/* зарядилась: короткий «хлоп», потом мерцает и по ней пробегает блик */
.abil.ready { box-shadow: 0 0 0 4px #ffd84a, 0 0 22px rgba(255,216,74,.75); overflow: hidden;
  animation: abilPop .45s ease-out, abilGlow 1.4s ease-in-out .45s infinite; }
.abil.ready::after { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.85) 50%, transparent 65%) no-repeat; background-size: 250% 100%;
  animation: abilShine 2.2s ease-in-out infinite; }
@keyframes abilPop { 0% { transform: scale(1); } 45% { transform: scale(1.22); } 100% { transform: scale(1); } }
@keyframes abilGlow { 0%,100% { box-shadow: 0 0 0 4px #ffd84a, 0 0 14px rgba(255,216,74,.5); } 50% { box-shadow: 0 0 0 6px #fff1a8, 0 0 34px rgba(255,216,74,1); } }
@keyframes abilShine { 0%,55% { background-position: 130% 0; } 100% { background-position: -30% 0; } }
.abil em.hide { display: none; }
.abil.pulse { animation: abilPulse .7s ease-in-out infinite; }
@keyframes abilPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); box-shadow: 0 0 0 6px #ff5fa8, 0 0 30px rgba(255,95,168,.9); } }
.btn.violet { background: linear-gradient(180deg, #c4b6ff, #8b6cff); box-shadow: 0 8px 0 #5a3fc4, 0 14px 24px rgba(60,30,140,.25); }
.btn .price { font-style: normal; display: inline-flex; align-items: center; gap: 4px; background: rgba(0,0,0,.25); border-radius: 20px; padding: 2px 12px; font-size: 26px; }
.btn .price svg { width: 26px; height: 26px; }
/* мастерская */
.topbar .shop-btn { position: absolute; right: 20px; top: 22px; min-width: 0; width: auto; height: 70px; font-size: 30px; padding: 0 24px; }   /* обычная кнопка «Магазин» вместо 🔧 */
.topbar .tb-title { position: absolute; left: 245px; right: 125px; text-align: center; pointer-events: none; }
.panel.shop { background: #f6e9cf; position: relative; width: 640px; max-height: calc(1150px + var(--db, 0px)); gap: 16px; }
.panel.shop .shop-list { width: 100%; min-height: 0; flex: 1 1 auto; overflow-y: auto; touch-action: pan-y; padding: 4px 4px 0; margin: 0 -4px; }
.panel.shop .xclose, .panel.trials .xclose { position: absolute; top: -22px; right: -22px; z-index: 3; width: 76px; height: 76px; margin: 0; border-radius: 50%; background: #ff3b4e; color: #fff; font-size: 42px; font-weight: 900; line-height: 1; border: 5px solid #3b2645; box-shadow: 0 5px 0 #a3182a; display: grid; place-items: center; flex: none; }
.panel.shop .xclose:active, .panel.trials .xclose:active { transform: translateY(3px); box-shadow: 0 2px 0 #a3182a; }
.panel.shop .coins { position: static; margin: 0 auto 8px; border: 3px solid #3b2645; box-shadow: 0 4px 0 #b89a6a; }
.shop-sub { font-size: 24px; opacity: .75; margin: 0 0 12px; }
.upc { width: 100%; box-sizing: border-box; display: flex; align-items: center; gap: 16px; background: #fff8ea; border: 3px solid #3b2645; border-radius: 24px; padding: 12px 16px; margin-bottom: 12px; text-align: left; }
.upi { font-size: 50px; width: 70px; text-align: center; flex: none; } .upi svg { width: 62px; height: 62px; display: block; margin: 0 auto; }
.upt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.upt b { font-size: 28px; } .upt span { font-size: 22px; opacity: .8; }
.dots { display: flex; gap: 6px; margin-top: 4px; }
.dots i { width: 18px; height: 18px; border-radius: 50%; background: #d8cdea; border: 2px solid #3b2645; }
.dots i.on { background: #ffc21a; }
.upc .btn.small { min-width: 130px; height: 70px; font-size: 28px; padding: 0 16px; gap: 6px; }
.upc .btn .coin { width: 32px; height: 32px; }
.upc.dim { opacity: .35; pointer-events: none; }
.upc.focus { border-color: #ffb03a; box-shadow: 0 0 0 6px rgba(255,176,58,.55); animation: upPulse 1s ease-in-out infinite; }
@keyframes upPulse { 50% { box-shadow: 0 0 0 12px rgba(255,176,58,.25); } }
.shop-tut { font-size: 27px !important; line-height: 1.3; color: #4a3a5c !important; background: #fff4d6; border: 3px solid #ffb03a; border-radius: 22px; padding: 14px 18px; margin: 0 0 14px !important; }
.shop-tut .who { display: block; color: #ff8a00; font-size: 24px; margin-bottom: 4px; }
.maxed { font-weight: 900; color: #2fc45a; font-size: 26px; min-width: 130px; text-align: center; }
.abil.na { opacity: .35; filter: grayscale(1); }

/* сердца: всегда внизу слева (и на дверях, и в бою) — одно крупное сердце с числом внутри.
   Последнее сердце пульсирует. Раньше был ряд сердец сверху/внизу — при «Броне» ряд перегружал экран */
#hearts { position: absolute; left: 6px; top: calc(126px + var(--dt, 0px)); width: 100px; height: 92px; pointer-events: none; }   /* сверху, у прогресса: одно место и на двери, и в бою */
#hearts i { position: absolute; inset: 0; filter: drop-shadow(0 0 1.5px #2a1530) drop-shadow(0 0 1.5px #2a1530) drop-shadow(0 4px 0 rgba(0,0,0,.45)); }   /* двойной контур: белый внутри + тёмный снаружи — читается и на тёмном, и на светлом фоне */
#hearts i svg { width: 100%; height: 100%; fill: #ff4b5c; }
#hearts i svg path:first-child { stroke: #6e0c22; stroke-width: 4; paint-order: stroke; }   /* тёмно-бордовый контур: на жёлтых фонах поздних глав жёлтый и белый сливались */
#hearts b { position: absolute; left: 0; right: 0; top: 23px; text-align: center; font-size: 42px; font-weight: 900; color: #fff; text-shadow: 0 3px 0 #3b2645, 0 0 4px #3b2645, 0 0 4px #3b2645; }
#hearts.zero i svg { fill: #5a4a66; }
#hearts.last i { animation: heartLast 0.9s ease-in-out infinite; }
#hearts.lost i { animation: heartLost .8s ease-out; }
@keyframes heartLast { 50% { transform: scale(1.12); filter: drop-shadow(0 0 14px #ff2a3a); } }
@keyframes heartLost { 0% { transform: scale(1.6); filter: drop-shadow(0 0 16px #ff2a3a); } 30% { transform: scale(1.3) rotate(-12deg); } 100% { transform: none; } }
#progress span { font-size: 18px; white-space: nowrap; }
.abil em.lk { background: #3b2645; color: #fff; font-size: 16px; }
/* вступление-комикс */
.modal.comic { background: rgba(10,4,16,.85); }
.panel.comic { position: relative; }
.cbar { width: 420px; height: 12px; border-radius: 6px; background: rgba(255,255,255,.18); overflow: hidden; }
.cbar i { display: block; height: 100%; background: #ffb13d; transform-origin: left; animation: cbarFill linear forwards; }
@keyframes cbarFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.panel.comic { width: 620px; padding: 22px 22px 34px; gap: 18px; background: #241a30; border-color: #ffb13d; }
.comic-img { width: 560px; height: 420px; object-fit: cover; border-radius: 26px; border: 5px solid #120a18; }
.panel.comic p { color: #fff; font-size: 32px; line-height: 1.25; font-weight: 800; }
.cdots { display: flex; gap: 10px; } .cdots i { width: 14px; height: 14px; border-radius: 50%; background: #5a4a6a; } .cdots i.on { background: #ffb13d; }

/* подсказка компактнее: шире и ниже — проще найти полосу доски без винтиков */
#tip { left: 22px; right: 22px; padding: 16px 22px; font-size: 32px; line-height: 1.25; transition: opacity .3s, transform .3s, top .25s; }   /* крупнее: пользователь «еле видно» */
#tip .who { display: inline; margin-right: 8px; font-size: 30px; }
#tip.show { pointer-events: auto !important; cursor: pointer; }   /* тап по плашке — пропустить */
#tip.show.passive { pointer-events: none !important; }
#tip.lore { background: rgba(43,33,64,.94); }
#tip.side { left: auto; right: 22px; width: 240px; padding: 12px 16px; font-size: 28px; }   /* обучение отбитию: сбоку, в несколько строк */
#tip.side.left { left: 22px; right: auto; }
/* звёзды главы на карте */
.chap-t { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.chs { color: #ffd84d; white-space: nowrap; }
.chs.full { text-shadow: 0 0 8px #ffc21a; }

/* бой: здоровье босса — крупная полоса сверху, наши сердца — внизу слева (у рогатки) */
/* верхняя строка: пауза — «Дверь N» — монеты, всегда на одном месте (дверь и бой).
   Под ней: на двери сердце слева от капсул, в бою — сердце, полоса босса по центру, «?» справа */
#hudTitle { position: absolute; left: 50%; top: calc(20px + var(--dt, 0px)); width: 330px; margin-left: -165px; height: 70px; line-height: 64px; border-radius: 35px; text-align: center; font-size: 40px; font-weight: 900; color: #fff; background: rgba(30,16,40,.8); border: 3px solid rgba(255,255,255,.18); text-shadow: 0 3px 0 #000; pointer-events: none; box-sizing: border-box; }
#chapStrip { position: absolute; left: 50%; top: calc(20px + var(--dt, 0px)); width: 330px; margin-left: -165px; height: 70px; display: flex; align-items: center; justify-content: center; gap: 12px; pointer-events: none; box-sizing: border-box; }
#chapStrip.hidden { display: none; }
#chapStrip i { width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.2); border: 3px solid rgba(255,255,255,.55); box-sizing: border-box; }
#chapStrip i.done { background: #4fd88a; border-color: #d6ffe6; }
#chapStrip i.cur { background: #ffc21a; border-color: #fff; box-shadow: 0 0 12px #ffc21a; animation: stripPulse 1s ease-in-out infinite alternate; }
@keyframes stripPulse { to { transform: scale(1.22); } }
#chapStrip .rat { position: relative; flex: none; width: 68px; height: 64px; zoom: .8; margin: 0 -2px; filter: drop-shadow(0 2px 2px #000); }   /* высота — с головой (8 + 56): было 51, голова вылезала за рамку плашки (BUGS #28) */   /* голова из частей рига: уши в них отдельно */
#chapStrip .rat img { position: absolute; }
#chapStrip .bhead { flex: none; width: 58px; height: 52px; display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 2px 2px #000); }   /* голова босса главы 2–5 */
#chapStrip .bhead img { max-width: 100%; max-height: 100%; }
#chapStrip .bhead.cur { filter: drop-shadow(0 0 8px #ff4f4f); }
#chapStrip .rat.cur { filter: drop-shadow(0 0 8px #ff4f4f); }
#chapStrip b { font-size: 28px; line-height: 1; color: #ffd23f; text-shadow: 0 2px 0 #000; }
#hud #progress { display: none; }
#devNext { position: absolute; right: 8px; top: calc(96px + var(--dt, 0px)); width: 60px; height: 60px; border-radius: 35px; font-size: 36px; color: #fff; background: rgba(30,16,40,.8); border: 3px solid rgba(255,255,255,.18); }   /* ?dev=1, бесконечный режим: следующая дверь */
#hud.fight #progress { display: block; top: calc(144px + var(--dt, 0px)); left: 124px; right: 124px; height: 56px; }   /* по центру строки сердца, симметрично */
#hud:not(.fight) #hearts { top: calc(110px + var(--dt, 0px)); }   /* на двери — по центру строки капсул */
#hud #hearts { transition: top .6s ease-in-out, left .6s ease-in-out; }   /* дверь → бой: сердца переезжают плавно, как и кадр (BUGS #30) */
#hud.fight #progress .bar { border-width: 4px; border-radius: 20px; background: rgba(40,10,30,.75); }
#hud.fight #progress span { line-height: 56px; font-size: 28px; font-weight: 900; color: #fff; text-shadow: 0 2px 0 #3b2645, 0 0 6px #3b2645, 0 0 6px #3b2645; }


/* «?» — обучение этого экрана заново (глава 1) */
#btnHelp { left: 106px; top: calc(20px + var(--dt, 0px)); width: 76px; height: 70px; border-radius: 24px; font-size: 44px; font-weight: 900; color: #3b2645; background: linear-gradient(180deg, #ffe066, #ffb21a); box-shadow: 0 5px 0 #c97a00, 0 0 18px rgba(255,190,40,.55); }   /* рядом с паузой, яркая — по просьбе пользователя */
body.aiming #btnHelp { pointer-events: none; }

/* ===== Техно-панк оформление меню, кнопок и карты (2026-10-29) ===== */
@font-face { font-family: 'Russo One'; src: url(fonts/RussoOne-Regular.woff2) format('woff2'); font-display: swap; }
.logo .l1, .logo .l2, .btn, .panel h2, .chap-t, .topbar, .ltile .num, #menu .hero .ch-name, #menu .lvl-badge { font-family: 'Russo One', "Segoe UI", Arial, sans-serif; font-weight: 400; }
/* иконки game-icons.net — маска, цвет из color */
.gi { display: inline-block; width: 1em; height: 1em; flex: none; font-style: normal; background: currentColor; -webkit-mask: var(--gi) center / contain no-repeat; mask: var(--gi) center / contain no-repeat; }
.btn .gi { width: 1.05em; height: 1.05em; }

/* кнопки: металл с заклёпками по краям */
.btn { --rv: radial-gradient(circle at 22px 50%, rgba(255,255,255,.75) 0 2px, rgba(50,25,15,.55) 2.5px 6px, transparent 6.5px), radial-gradient(circle at calc(100% - 22px) 50%, rgba(255,255,255,.75) 0 2px, rgba(50,25,15,.55) 2.5px 6px, transparent 6.5px);
  background: var(--rv), linear-gradient(180deg, #ffc07a, #ff8a2a 55%, #dc6318); box-shadow: inset 0 3px 0 rgba(255,255,255,.45), inset 0 -5px 0 rgba(0,0,0,.14), 0 8px 0 #93400f, 0 14px 24px rgba(0,0,0,.3); }
.btn:active { box-shadow: inset 0 3px 0 rgba(255,255,255,.45), 0 3px 0 #93400f; }
.btn.green { background: var(--rv), linear-gradient(180deg, #a6f58a, #45c454 55%, #2c9a3c); box-shadow: inset 0 3px 0 rgba(255,255,255,.45), inset 0 -5px 0 rgba(0,0,0,.14), 0 8px 0 #1d6e2a, 0 14px 24px rgba(0,0,0,.3); }
.btn.blue { background: var(--rv), linear-gradient(180deg, #b4dcf7, #5d9fd6 55%, #3a74b0); box-shadow: inset 0 3px 0 rgba(255,255,255,.45), inset 0 -5px 0 rgba(0,0,0,.14), 0 8px 0 #234b77, 0 14px 24px rgba(0,0,0,.3); }
.btn.yellow { background: var(--rv), linear-gradient(180deg, #ffeaa0, #f4bb3a 55%, #d59316); box-shadow: inset 0 3px 0 rgba(255,255,255,.55), inset 0 -5px 0 rgba(0,0,0,.12), 0 8px 0 #8f5c06, 0 14px 24px rgba(0,0,0,.3); }
.btn.purple { background: var(--rv), linear-gradient(180deg, #d0b8ff, #9168f0 55%, #6a43c8); box-shadow: inset 0 3px 0 rgba(255,255,255,.45), inset 0 -5px 0 rgba(0,0,0,.14), 0 8px 0 #45288a, 0 14px 24px rgba(0,0,0,.3); }
.btn.ghost { background: var(--rv), linear-gradient(180deg, #fbf7ef, #ddd4c4); box-shadow: inset 0 3px 0 #fff, 0 8px 0 #95876f, 0 14px 24px rgba(0,0,0,.2); }
.btn.small { --rv: linear-gradient(transparent, transparent); }   /* на маленьких кнопках (цена, Магазин) заклёпки налезали на текст — без них (пользователь) */

/* квадратные иконки-кнопки и монеты — латунная пластина с четырьмя заклёпками */
.icon-btn { --rc: rgba(90,55,20,.55); border: 0; color: #3b2645;
  background: radial-gradient(circle at 11px 11px, var(--rc) 0 3.5px, transparent 4px), radial-gradient(circle at calc(100% - 11px) 11px, var(--rc) 0 3.5px, transparent 4px),
    radial-gradient(circle at 11px calc(100% - 11px), var(--rc) 0 3.5px, transparent 4px), radial-gradient(circle at calc(100% - 11px) calc(100% - 11px), var(--rc) 0 3.5px, transparent 4px),
    linear-gradient(180deg, #fff6df, #e8cf98);
  box-shadow: 0 5px 0 #b8975a, 0 8px 16px rgba(80,40,140,.2); }   /* плоско, как раньше (пользователь); текстура латуни осталась */
.coins { background: linear-gradient(180deg, #fff6df, #e8cf98); border: 0; box-shadow: 0 4px 0 #b8975a; color: #3b2645; }
.icon-btn:active { box-shadow: 0 2px 0 #b8975a; }
.icon-btn .gi { width: 38px; height: 38px; }
#menu .gear .gi { width: 46px; height: 46px; animation: cdspin 14s linear infinite; }
#menu .trophy .gi { width: 42px; height: 42px; color: #a8650a; }

/* часовые узоры (как фон 5-й главы): циферблаты и шестерни медленно крутятся */
#menu, #levels, .panel.settings { isolation: isolate; }
.clockdeco { position: absolute; inset: 0; overflow: hidden; z-index: -1; pointer-events: none; color: #ffb03a; border-radius: inherit; }
.clockdeco > * { position: absolute; will-change: transform; }   /* вращение — на видеокарте: маски не перерисовываются каждый кадр (фризы на телефоне) */
.clockdeco b { background: currentColor; -webkit-mask: var(--face) center / contain no-repeat; mask: var(--face) center / contain no-repeat;
  --face: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%23000'%3E%3Ccircle cx='100' cy='100' r='95' stroke-width='5'/%3E%3Ccircle cx='100' cy='100' r='86' stroke-width='1.5'/%3E%3Ccircle cx='100' cy='100' r='76' stroke-width='3' stroke-dasharray='1.6 6.36'/%3E%3Ccircle cx='100' cy='100' r='76' stroke-width='14' stroke-dasharray='3.5 36.3'/%3E%3Ccircle cx='100' cy='100' r='40' stroke-width='2' stroke-dasharray='6 4'/%3E%3Cpath d='M100 100V38M100 100l40 24' stroke-width='7' stroke-linecap='round'/%3E%3C/g%3E%3Ccircle cx='100' cy='100' r='9'/%3E%3C/svg%3E"); }
.clockdeco .cd1 { width: 420px; height: 420px; left: -150px; top: 330px; opacity: .13; animation: cdspin 160s linear infinite; }
.clockdeco .cd2 { width: 300px; height: 300px; right: -110px; bottom: 120px; opacity: .12; animation: cdspin 110s linear infinite reverse; }
.clockdeco .cd3 { width: 230px; height: 230px; right: -50px; top: 200px; opacity: .1; animation: cdspin 70s linear infinite; }
.clockdeco .cd4 { width: 220px; height: 220px; left: -40px; bottom: -40px; opacity: .1; animation: cdspin 90s linear infinite reverse; }
@keyframes cdspin { to { transform: rotate(360deg); } }
/* мелкий узор из винтов поверх фона (шестерёнки убраны — пользователь) */
#menu::before, #levels::before { content: ''; position: absolute; inset: 0; z-index: -2; pointer-events: none; opacity: .09;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='%23ffb03a'%3E%3Ccircle cx='180' cy='60' r='10' stroke-width='3'/%3E%3Cpath d='M173 60h14M180 53v14' stroke-width='3'/%3E%3Ccircle cx='60' cy='180' r='10' stroke-width='3'/%3E%3Cpath d='M53 180h14' stroke-width='3'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 288px 288px; }   /* реже на 30% (пользователь) */

/* меню */
.logo .l1 { background: linear-gradient(180deg, #ffe08a, #ff9a2a 60%, #e0661a); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 0; text-shadow: none;
  filter: drop-shadow(4px 0 0 #3b2645) drop-shadow(-4px 0 0 #3b2645) drop-shadow(0 4px 0 #3b2645) drop-shadow(0 -4px 0 #3b2645) drop-shadow(0 8px 0 #3b2645); }
.logo .l2 { background: linear-gradient(180deg, #4a3a6a, #2c2048); border-color: #c9a14a; box-shadow: 0 0 0 4px #3b2645; }
#menu .hero { box-shadow: 0 0 0 5px #3b2645, 0 12px 30px rgba(0,0,0,.5), 0 0 40px rgba(255,170,60,.35); }
#menu .btn.play svg path { fill: #fff; stroke: #3b2645; }

/* окна: тёплый металл, латунное кольцо и заклёпки по углам */
.panel { position: relative; --rc: #b98a3a;
  background: radial-gradient(circle at 26px 26px, var(--rc) 0 6px, transparent 7px), radial-gradient(circle at calc(100% - 26px) 26px, var(--rc) 0 6px, transparent 7px),
    radial-gradient(circle at 26px calc(100% - 26px), var(--rc) 0 6px, transparent 7px), radial-gradient(circle at calc(100% - 26px) calc(100% - 26px), var(--rc) 0 6px, transparent 7px), #fff8ec;
  box-shadow: inset 0 0 0 8px #fff8ec, inset 0 0 0 12px #e2b863, 0 14px 0 rgba(30,15,40,.4); }
.panel h2 { color: #ff9a3c; display: flex; align-items: center; justify-content: center; gap: 14px; }
.panel h2 .h2i { width: 52px; height: 52px; color: #3b2645; animation: cdspin 12s linear infinite; }
.panel.settings { overflow: hidden; }
.panel.settings .clockdeco { color: #b98a3a; }
.panel.settings .clockdeco .cd1 { width: 360px; height: 360px; left: -170px; top: -150px; opacity: .26; }
.panel.settings .clockdeco .cd2 { width: 300px; height: 300px; right: -150px; bottom: -130px; opacity: .26; }
.panel.settings .clockdeco .cd3 { width: 160px; height: 160px; right: -40px; top: 20px; opacity: .2; }
.panel.settings .clockdeco .cd4 { width: 150px; height: 150px; left: -30px; bottom: 30px; opacity: .2; }
.vol { background: rgba(226,184,99,.22); border: 3px solid rgba(185,138,58,.45); }
.vol-t { align-items: center; } .vol-t .gi { width: 34px; height: 34px; color: #3b2645; vertical-align: -6px; }
.panel .credits { font-size: 16px; line-height: 1.3; color: #9a8670; font-weight: 600; margin-top: -6px; }

/* карта: у каждой главы свой материал плиток и узор */
.chap { position: relative; overflow: hidden; isolation: isolate; }
.chap::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .06; background: var(--chp) 0 0 / 120px 120px; }   /* реже и ровно, без поворота — прежний плотный узор казался багом (пользователь) */
.chap::after { content: ''; position: absolute; inset: 0; z-index: -2; pointer-events: none; background: linear-gradient(180deg, rgba(10,6,20,.45), rgba(10,6,20,.18) 45%, rgba(10,6,20,.5)), var(--cbg, none) center 40% / cover; }   /* задник двери главы (#77) */
.chap-t { justify-content: flex-start; } .chap-t .chs { margin-left: auto; }
.chap-t .chi { width: 34px; height: 34px; color: var(--g); filter: drop-shadow(0 0 6px var(--g)); }
.ltile, .ltile.done, .ltile.boss, .ltile.locked, .ltile.boss.locked { background: linear-gradient(180deg, var(--t1), var(--t2)); }
.ltile { box-shadow: inset 0 3px 0 rgba(255,255,255,.35), 0 7px 0 rgba(0,0,0,.35); }
.ltile .deco { position: absolute; left: 34%; top: 30%; width: 62%; height: 62%; color: var(--dc); opacity: .6; pointer-events: none; filter: drop-shadow(0 2px 0 rgba(0,0,0,.25)); }   /* в углу, а не под цифрой — так читается (пользователь) */
.ltile .num { z-index: 1; }
.ltile.next { background: linear-gradient(180deg, var(--t1), var(--t2)); animation: tilePulse 1.2s ease-in-out infinite; }
@keyframes tilePulse { 0%,100% { box-shadow: inset 0 3px 0 rgba(255,255,255,.35), 0 7px 0 rgba(0,0,0,.35), 0 0 0 0 var(--g); } 50% { box-shadow: inset 0 3px 0 rgba(255,255,255,.35), 0 7px 0 rgba(0,0,0,.35), 0 0 0 10px transparent; } }
.ltile.next .deco { opacity: .8; }
.ltile.boss { box-shadow: inset 0 3px 0 rgba(255,255,255,.35), 0 7px 0 rgba(0,0,0,.35); }
/* красная обводка босса — отдельным слоем поверх снежной шапки, полосы «осторожно» и затемнения (#71) */
.ltile .bring { position: absolute; inset: 0; border-radius: 23px; box-shadow: inset 0 0 0 6px #ff2e44, inset 0 0 12px 6px rgba(255,60,80,.55); z-index: 3; pointer-events: none; }   /* толще и ярче (пользователь) */
.ltile.locked::after { content: ''; position: absolute; inset: 0; background: rgba(30,20,40,.38); z-index: 1; }
.ltile.locked .lock { z-index: 2; color: #ffd36b; filter: drop-shadow(2px 0 0 #3b2645) drop-shadow(-2px 0 0 #3b2645) drop-shadow(0 2px 0 #3b2645) drop-shadow(0 -2px 0 #3b2645); }
.ltile .skull, .ltile .stars, .ltile .devboss, .ltile .devfresh { z-index: 2; }
/* 1 Трущобы — ржавая жесть, трубы */
.chap.c0 { --t1: #eaa874; --t2: #b4602f; --dc: #fff1dc; --chp: url(img/icons/pat-pipes.svg); }
/* 2 Робозавод — сталь, манипуляторы, полоса «осторожно» */
.chap.c1 { --t1: #d3dee8; --t2: #8ea2b6; --dc: #34465a; --chp: url(img/icons/pat-gears.svg); }
.chap.c1 .ltile::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 15px; z-index: 1; border-bottom: 2px solid #3b2645; background: repeating-linear-gradient(-45deg, #ffc21a 0 10px, #3b2645 10px 20px); }   /* полоса «осторожно» — сверху, как у остальных глав */
/* 3 Ледяной цех — лёд, снежная шапка, снежинки */
.chap.c2 { --t1: #f2fdff; --t2: #93d4ec; --dc: #3f9cc4; --chp: url(img/icons/pat-snowflake-2.svg); }
.chap.c2 .ltile::before { content: ''; position: absolute; left: -4px; right: -4px; top: -2px; height: 30px; z-index: 1;
  background: radial-gradient(circle at 14px 7px, #fff 12.5px, transparent 13.5px) 0 0 / 30px 28px repeat-x, linear-gradient(#fff, #fff) 0 0 / 100% 9px no-repeat; filter: drop-shadow(0 2px 0 rgba(60,140,190,.45)); }
.chap.c2 .ltile .deco { animation: cdspin 40s linear infinite; }
/* 4 Электростанция — тёмный щит, искрящая молния */
.chap.c3 { --t1: #3f8c62; --t2: #17402b; --dc: #ffe23d; --chp: url(img/icons/pat-power-lightning.svg); }
.chap.c3 .ltile .deco { opacity: .75; filter: drop-shadow(0 0 6px #ffe23d); }
.chap.c3 .ltile:not(.locked) .deco { animation: zap 2.6s steps(1) infinite; }
@keyframes zap { 0%, 100% { opacity: .75; } 6% { opacity: 1; } 9% { opacity: .3; } 12% { opacity: 1; } 16% { opacity: .75; } }
/* 5 Башня Часовщика — латунь, часовой механизм крутится */
.chap.c4 { --t1: #a688bb; --t2: #5a3f70; --dc: #ffd84d; --chp: url(img/icons/pat-clockwork.svg); }
.chap.c4 .ltile .deco { opacity: .7; animation: cdspin 24s linear infinite; }
/* полоски сверху плиток (пользователь: как снег гл.3 и «осторожно» гл.2): гл.1 доска с гвоздями, гл.4 провода, гл.5 зубчатая рейка */
.chap.c0 .ltile::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 19px; z-index: 1; border-bottom: 2px solid #3b2645;
  background: radial-gradient(circle at 13px 9.5px, #d9d2c4 3px, #3b2645 4px, transparent 4.5px), radial-gradient(circle at calc(100% - 13px) 9.5px, #d9d2c4 3px, #3b2645 4px, transparent 4.5px),
  repeating-linear-gradient(90deg, transparent 0 17px, rgba(60,25,8,.35) 17px 19px, transparent 19px 31px), linear-gradient(#c8854a, #8a4d22); }
.chap.c3 .ltile::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 19px; z-index: 1; border-bottom: 2px solid #3b2645;
  background: radial-gradient(ellipse 5px 8px at 50% 50%, #c9d3cc 3.5px, #3b2645 4.5px, transparent 5.5px) 0 0 / 28px 100% repeat-x,
  linear-gradient(transparent 3.5px, #ff5a3c 3.5px 7px, transparent 7px 10.5px, #ffd23d 10.5px 14px, transparent 14px), #1a2a22; }
.chap.c4 .ltile::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 20px; z-index: 1;
  background: radial-gradient(circle at 50% 5px, #fff1b0 2px, #7a5214 3px, transparent 3.5px) 0 0 / 40px 10px repeat-x, linear-gradient(#ffe27a, #c8921f) 0 0 / 100% 10px no-repeat, linear-gradient(#3b2645, #3b2645) 0 10px / 100% 2px no-repeat, linear-gradient(90deg, #d9a52e 0 9px, #3b2645 9px 10px, transparent 10px) 2px 12px / 16px 7px repeat-x;
  filter: drop-shadow(0 2px 0 rgba(30,15,45,.5)); }
@media (prefers-reduced-motion: reduce) { .clockdeco > *, .ltile .deco, #menu .gear .gi, .panel h2 .h2i { animation: none !important; } }
/* 10-29: в меню без половинки шестерни у края (казалась сломанной); летающих шестерёнок фона на 30% меньше */
#menu .clockdeco .cd3 { display: none; }   /* шестерни-«солнышки» узора убраны (пользователь); часы слева внизу и одно «солнышко» по центру внизу — вернуть просил */
#menu .clockdeco::after { content: ""; position: absolute; left: 50%; bottom: 40px; width: 110px; height: 110px; margin-left: -55px; opacity: .12; animation: cdspin 60s linear infinite;
  background: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 100 100%27%3E%3Cg fill=%27none%27 stroke=%27%23ffb03a%27%3E%3Ccircle cx=%2750%27 cy=%2750%27 r=%2734%27 stroke-width=%2712%27 stroke-dasharray=%279 8.8%27/%3E%3Ccircle cx=%2750%27 cy=%2750%27 r=%2721%27 stroke-width=%275%27/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; }
#bg i:nth-child(n+8) { display: none; }
/* замок не перекрывает dev-кнопку боя */
.ltile .lock { pointer-events: none; }
.chap:not(.c2)::before { content: none; }   /* старые узоры (трубы, шестерни, молнии, часы) поверх задника двери не нужны — остался только снег гл.3 */
.ltile.locked .lock { right: 5px; bottom: 5px; width: 36px; height: 36px; color: #ffe680; filter: drop-shadow(0 0 6px rgba(255,214,90,.9)) drop-shadow(2px 0 0 #3b2645) drop-shadow(-2px 0 0 #3b2645) drop-shadow(0 2px 0 #3b2645) drop-shadow(0 -2px 0 #3b2645); }   /* номер по центру, яркий замок в правом нижнем углу (пользователь) */
.ltile .devboss, .ltile .devfresh { z-index: 3; }
/* 10-29 (пользователь): цены в Магазине плоские; поле с монетами в Магазине на 20% крупнее; рука-подсказка не висит поверх окон */
.panel.shop .btn.small { box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.panel.shop .btn.small:active { box-shadow: 0 1px 6px rgba(0,0,0,.18); }
.panel.shop .coins { height: 96px; border-radius: 48px; font-size: 40px; padding: 0 40px 0 20px; gap: 14px; border: 3px solid #3b2645; box-sizing: border-box; box-shadow: 0 4px 0 #b8975a; } .panel.shop .coins .coin { width: 56px; height: 56px; }   /* рамка на 20% больше, чем в меню; монета и число как в меню; тёмная окантовка (пользователь) */
#frame:has(.modal) #hand { display: none !important; }

/* Испытания: кнопка в меню и окно с двумя большими карточками */
#menu .play-row { display: flex; align-items: center; gap: 18px; margin-top: 34px; }   /* «Испытания» — небольшая кнопка справа от «Играть» (#74) */
#menu .play-row .btn.play { margin-top: 0; }
#menu .btn.trialsb { min-width: 0; width: 150px; height: 112px; padding: 4px 6px 0; flex-direction: column; gap: 2px; font-size: 21px; line-height: 1; --rv: none; }
#menu .btn.trialsb .gi { width: 92px; height: 92px; }   /* без подписи — только мечи, крупно (пользователь) */
.panel.trials { gap: 22px; }
.tcard { position: relative; width: 100%; height: 330px; border: 5px solid #3b2645; border-radius: 30px; overflow: hidden; color: #fff; font: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; padding: 0 0 22px; box-shadow: 0 8px 0 rgba(60,20,90,.35); }
.tcard:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 4px 0 rgba(60,20,90,.35); }
.tcard.rushc { background: radial-gradient(ellipse at 50% 40%, #ff9a3c 0%, #c2361f 45%, #3b1424 100%); }
.tcard.off { background: #2b1d3a; cursor: default; }
.tcard.rushc.off { background: #3a2a44; }
.tcard.off > :not(small) { filter: grayscale(1) brightness(.6); }
.tcard img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tcard b { position: relative; font-size: 46px; white-space: nowrap; font-weight: 900; -webkit-text-stroke: 3px #3b2645; paint-order: stroke fill; }
.tcard small { position: relative; font-size: 26px; font-weight: 800; }
.tcard.off small { background: #3b2645; padding: 4px 18px; border-radius: 14px; }
.tcard .ti { position: absolute; top: 40px; width: 170px; height: 170px; color: #ffd34d; }
.tbosses { position: absolute; inset: 14px 0 92px; display: flex; justify-content: center; align-items: flex-end; }
.tbosses img { height: 170px; margin: 0 -34px; filter: drop-shadow(0 6px 6px rgba(0,0,0,.55)); }
.tbosses img:nth-child(2), .tbosses img:nth-child(4) { height: 200px; z-index: 1; }
.tbosses img:nth-child(3) { height: 230px; z-index: 2; }
.panel.rush .rush-boss { height: 240px; margin-top: -20px; filter: drop-shadow(0 8px 8px rgba(0,0,0,.35)); }
.panel.rush .rush-boss.dead { filter: grayscale(.4) drop-shadow(0 8px 8px rgba(0,0,0,.35)); }
.panel.rush p { margin: 0; font-size: 30px; text-align: center; }
.rush-h { display: flex; gap: 10px; } .rush-h i svg { width: 56px; height: 56px; fill: #ff4d6d; } .rush-h i.off svg { fill: #d8cfe0; }

/* ===== Рисованный UI (img/ui, ChatGPT 2026-11): значки, способности в латунном ободе, кнопки-таблички ===== */
.gi.pic { background: var(--gi) center / contain no-repeat; -webkit-mask: none; mask: none; }
#menu .trophy .gi.pic, #menu .gear .gi.pic { color: inherit; }
/* способности: обод-шестерёнка уже в картинке — она на весь круг, снаружи остаётся тонкое кольцо отката */
.abil b, .abil b svg { width: 86px; height: 86px; }
.fab b svg { width: 98px; height: 98px; }
/* кнопки: табличка растянута целиком, поверх — края с заклёпками в родных пропорциях, к середине растворяются (у border-image на стыках были полосы) */
.btn { border: 0; box-shadow: none; background: url(img/ui/b_large_pink_l.webp) left center / auto 100% no-repeat, url(img/ui/b_large_pink_r.webp) right center / auto 100% no-repeat, url(img/ui/b_large_pink_m.webp) center / calc(100% - 116px) 100% no-repeat; }
.btn:active { box-shadow: none; transform: translateY(4px); }
.btn.green { box-shadow: none; background: url(img/ui/b_large_green_l.webp) left center / auto 100% no-repeat, url(img/ui/b_large_green_r.webp) right center / auto 100% no-repeat, url(img/ui/b_large_green_m.webp) center / calc(100% - 116px) 100% no-repeat; }
.btn.blue { box-shadow: none; background: url(img/ui/b_large_blue_l.webp) left center / auto 100% no-repeat, url(img/ui/b_large_blue_r.webp) right center / auto 100% no-repeat, url(img/ui/b_large_blue_m.webp) center / calc(100% - 116px) 100% no-repeat; }
.btn.yellow { box-shadow: none; background: url(img/ui/b_large_yellow_l.webp) left center / auto 100% no-repeat, url(img/ui/b_large_yellow_r.webp) right center / auto 100% no-repeat, url(img/ui/b_large_yellow_m.webp) center / calc(100% - 116px) 100% no-repeat; }
.btn.purple { box-shadow: none; background: url(img/ui/b_large_purple_l.webp) left center / auto 100% no-repeat, url(img/ui/b_large_purple_r.webp) right center / auto 100% no-repeat, url(img/ui/b_large_purple_m.webp) center / calc(100% - 116px) 100% no-repeat; }
.btn.violet { box-shadow: none; background: url(img/ui/b_large_dark_purple_l.webp) left center / auto 100% no-repeat, url(img/ui/b_large_dark_purple_r.webp) right center / auto 100% no-repeat, url(img/ui/b_large_dark_purple_m.webp) center / calc(100% - 116px) 100% no-repeat; }
.btn.ghost { box-shadow: none; background: url(img/ui/b_large_disabled_l.webp) left center / auto 100% no-repeat, url(img/ui/b_large_disabled_r.webp) right center / auto 100% no-repeat, url(img/ui/b_large_disabled_m.webp) center / calc(100% - 116px) 100% no-repeat; }
.btn.small { padding: 0 50px; background: url(img/ui/b_small_pink_l.webp) left center / auto 100% no-repeat, url(img/ui/b_small_pink_r.webp) right center / auto 100% no-repeat, url(img/ui/b_small_pink_m.webp) center / calc(100% - 92px) 100% no-repeat; }   /* текст не налезает на заклёпки */
.btn.small.green { background: url(img/ui/b_small_green_l.webp) left center / auto 100% no-repeat, url(img/ui/b_small_green_r.webp) right center / auto 100% no-repeat, url(img/ui/b_small_green_m.webp) center / calc(100% - 92px) 100% no-repeat; }
.btn.small.blue { background: url(img/ui/b_small_blue_l.webp) left center / auto 100% no-repeat, url(img/ui/b_small_blue_r.webp) right center / auto 100% no-repeat, url(img/ui/b_small_blue_m.webp) center / calc(100% - 92px) 100% no-repeat; }
.btn.small.yellow { background: url(img/ui/b_small_yellow_l.webp) left center / auto 100% no-repeat, url(img/ui/b_small_yellow_r.webp) right center / auto 100% no-repeat, url(img/ui/b_small_yellow_m.webp) center / calc(100% - 92px) 100% no-repeat; }
.btn.small.purple { background: url(img/ui/b_small_purple_l.webp) left center / auto 100% no-repeat, url(img/ui/b_small_purple_r.webp) right center / auto 100% no-repeat, url(img/ui/b_small_purple_m.webp) center / calc(100% - 92px) 100% no-repeat; }
.btn.small.violet { background: url(img/ui/b_small_dark_purple_l.webp) left center / auto 100% no-repeat, url(img/ui/b_small_dark_purple_r.webp) right center / auto 100% no-repeat, url(img/ui/b_small_dark_purple_m.webp) center / calc(100% - 92px) 100% no-repeat; }
.btn.small.ghost { background: url(img/ui/b_small_disabled_l.webp) left center / auto 100% no-repeat, url(img/ui/b_small_disabled_r.webp) right center / auto 100% no-repeat, url(img/ui/b_small_disabled_m.webp) center / calc(100% - 92px) 100% no-repeat; }
/* круглые кнопки (пауза, назад, настройки): латунная шайба с кремовым центром */
.icon-btn { background: url(img/ui/b_round_1.webp) center / contain no-repeat; box-shadow: none; border-radius: 50%; }
.icon-btn:active { box-shadow: none; transform: translateY(3px); }
/* кнопка цены в Мастерской — прежняя, без таблички (пользователь) */
.btn.small[data-act="buy"] { border: 4px solid #3b2645; padding: 0 30px; background: linear-gradient(180deg, #a6f58a, #45c454 55%, #2c9a3c); box-shadow: inset 0 3px 0 rgba(255,255,255,.45), inset 0 -5px 0 rgba(0,0,0,.14), 0 8px 0 #1d6e2a, 0 14px 24px rgba(0,0,0,.3); }
.btn.small[data-act="buy"].ghost { background: linear-gradient(180deg, #fbf7ef, #ddd4c4); box-shadow: 0 3px 10px rgba(0,0,0,.18); } /* та же мягкая тень, что у доступной покупки, без нижней ступеньки */
.btn.small[data-act="buy"]:active { transform: translateY(5px); box-shadow: inset 0 3px 0 rgba(255,255,255,.45), 0 3px 0 #1d6e2a; }
/* кнопки в окнах: отступы под заклёпки (было 24 — «Сбросить прогресс» заклёпками на тексте) */
.panel .btn { padding: 0 64px; }
.panel .btn.small:not([data-act="buy"]) { padding: 0 54px; }
/* круглые: шайба целиком (нижний край был срезан), побольше, значок по центру кремового круга */
.icon-btn { width: 80px; height: 80px; background-size: 100% 100%; }
.icon-btn svg, .icon-btn .gi { width: 42px; height: 42px; }
#menu .gear, #menu .trophy { width: 92px; height: 92px; }
#menu .trophy { right: 124px; }
#menu .gear .gi, #menu .trophy .gi, #menu .gear svg { width: 48px; height: 48px; }
#btnPause { left: 16px; top: calc(15px + var(--dt, 0px)); width: 80px; height: 80px; border-radius: 50%; }   /* шайба круглая: 76×70 сплющивало, пауза вылезала за обод */
#btnPause svg { width: 40px; height: 40px; }
/* круглые +10% (пользователь: значки впритык к ободу) */
#menu .gear, #menu .trophy { width: 101px; height: 101px; }
#menu .trophy { right: 132px; }
#btnPause { width: 88px; height: 88px; top: calc(11px + var(--dt, 0px)); left: 14px; }
#btnHelp { left: 112px; }
/* «Испытания»: подпись убрана — кнопка под крупные мечи */
#menu .btn.trialsb { width: 150px; padding: 0; }
/* зелёная: белый на светло-зелёном сливался — тёмный текст, как на жёлтой; лицо таблички выше центра — текст чуть вверх */
.btn.green { color: #1f3d1a; text-shadow: 0 2px 0 rgba(255,255,255,.45); padding-bottom: 7px; }
.btn.green[data-act="buy"] { color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.25); padding-bottom: 0; }
/* счётчик монет — латунная таблетка (img/ui/coins*): края с заклёпками поверх растянутой середины */
.coins { border: 0; box-shadow: none; border-radius: 0; padding: 0 34px 0 30px;
  background: url(img/ui/coins_l.webp) left center / auto 100% no-repeat, url(img/ui/coins_r.webp) right center / auto 100% no-repeat, url(img/ui/coins_m.webp) center / calc(100% - 108px) 100% no-repeat; }
.panel.shop .coins { border: 0; box-shadow: none; padding: 0 44px 0 36px; }
/* середина — ровная полоса без концов; начинается под непрозрачной частью краёв (края длинные — один отступ годится для высот 80–112) */
/* монеты: таблетка крупнее, монета правее заклёпки — внутри кремового поля, не на ободе */
.coins { height: 84px; padding: 0 34px 0 26px; top: calc(13px + var(--dt, 0px)); }
#menu .coins { height: 100px; padding: 0 38px 0 28px; }
.panel.shop .coins { height: 100px; padding: 0 44px 0 28px; }
.panel.shop .coins { flex-shrink: 0; }   /* окно магазина — колонка flex: сжимало таблетку до 61 px, края расходились с серединой */
.coins { min-width: 230px; justify-content: flex-start; }   /* в игре до трёх-четырёх цифр — таблетка с запасом */
/* карта: «Назад» и «Магазин» крупнее */
.topbar .icon-btn { width: 96px; height: 96px; left: 14px; top: 10px; }
.topbar .icon-btn svg { width: 50px; height: 50px; }
.topbar .shop-btn { height: 84px; top: 16px; font-size: 32px; padding: 0 48px; }   /* крупнее, но не наезжает на заголовок «Карта» */
/* боевые способности: без жёлтого круга-подложки — обод-шестерёнка уже в картинке; готовность — свечение по контуру */
.fab { background: none; box-shadow: none; }
.fab.ready { box-shadow: none; filter: drop-shadow(0 0 6px #ffd84a) drop-shadow(0 0 12px rgba(255,216,74,.7)); }
.fab.on { box-shadow: none; filter: drop-shadow(0 0 6px #7dd8ff) drop-shadow(0 0 14px rgba(125,216,255,.9)); }
/* монеты: в игре — прежняя высота, не наезжает на «Уровень»; число по центру свободной части таблетки */
.coins { height: 76px; min-width: 170px; top: calc(17px + var(--dt, 0px)); padding: 0 30px 0 24px; }
.coins .cval { flex: 1; text-align: center; }
.panel.shop .coins { padding: 0 30px 0 28px; min-width: 230px; }
/* способности в уровне — как в бою: без круга-подложки и кольца, крупнее, готовность — свечение по ободу */
.abil { width: 104px; height: 104px; background: none; box-shadow: none; }
.abil b, .abil b svg { width: 104px; height: 104px; }
.abil[data-ab="undo"] { left: 34px; }
.abil[data-ab="magnet"] { left: 494px; }
.abil[data-ab="xray"] { left: 604px; }
.abil.ready { box-shadow: none; overflow: visible; filter: drop-shadow(0 0 6px #ffd84a) drop-shadow(0 0 12px rgba(255,216,74,.7)); }
.abil.ready::after { display: none; }
.abil:active { box-shadow: none; }
/* карта: стрелка «Назад» помельче внутри шайбы */
.topbar .icon-btn svg { width: 42px; height: 42px; }
.abil.ready { animation: abilPop .45s ease-out, abilGlowF 1.4s ease-in-out .45s infinite; }
@keyframes abilGlowF { 0%,100% { filter: drop-shadow(0 0 4px #ffd84a) drop-shadow(0 0 8px rgba(255,216,74,.5)); } 50% { filter: drop-shadow(0 0 8px #fff1a8) drop-shadow(0 0 18px rgba(255,216,74,1)); } }
.btn { padding-left: 56px; padding-right: 56px; }   /* текст не заходит на заклёпки новых табличек */

/* Единый набор: шайбы навигации, рисованные значки и медали достижений. */
#btnHelp {
  left: 108px; width: 88px; height: 88px; top: calc(11px + var(--dt, 0px));   /* как пауза: одна высота и размер (пользователь) */
  border-radius: 50%; background: url(img/ui/b_round_1.webp) center / contain no-repeat;
  box-shadow: none; filter: drop-shadow(0 0 9px rgba(255,190,40,.5));
}
#btnHelp img { width: 46px; height: 46px; object-fit: contain; }
.panel.shop .xclose, .panel.trials .xclose {
  width: 84px; height: 84px; border: 0; box-shadow: none;
  background: url(img/ui/b_round_1.webp) center / contain no-repeat;
}
.panel.shop .xclose:active, .panel.trials .xclose:active { box-shadow: none; }
.xclose img {
  position: absolute; left: calc(50% - 4px); top: calc(50% - 1px);   /* по центру лица шайбы: замер по картинкам, было -6px — крестик выше (#100) */
  transform: translate(-50%, -50%); display: block;
  width: 46px; height: 46px; object-fit: contain;
} /* в исходнике крестик сдвинут вправо; светлый центр шайбы выше её нижней тени */
.achr .achi { width: 76px; flex: none; opacity: .75; }
.ach-medal {
  position: relative; display: inline-grid; place-items: center;
  width: 76px; height: 76px; vertical-align: middle;
  border: 3px solid #b38337; border-radius: 50%;
  background: radial-gradient(circle at 40% 30%, #fff9e9, #eddbad);
  box-shadow: inset 0 1px 0 #fff7d6, 0 2px 0 #604126;
}
.ach-medal > img { width: 64px; height: 64px; object-fit: contain; }
.ach-medal > img.portal { border-radius: 50%; object-fit: cover; }
.ach-medal > small {
  position: absolute; right: 0; bottom: -2px; display: grid; place-items: center;
  width: 25px; height: 25px; border: 2px solid #493024; border-radius: 50%;
  background: #ffe19a; color: #493024; font: 900 18px Arial, sans-serif;
}
.achr .achm { display: grid; place-items: center; }
.ach-check { width: 15px; height: 26px; border: solid #308249; border-width: 0 6px 6px 0; transform: rotate(45deg); }
.achr { background: #eee7da; border-color: #c3b69e; }
.achr .upt b { color: #786d60; }
.achr.got { border-color: #a87d32; }
.panel.ach h2 .h2i { animation: none; }
.abil em.lk, .upc.locked .maxed { display: inline-flex; align-items: center; justify-content: center; gap: 3px; }
.abil em.lk::before, .upc.locked .maxed::before { content: ''; width: 18px; height: 20px; flex: none; background: url(img/ui/i_lock.webp) center / contain no-repeat; }

/* Кириллическая типографика: механические заголовки и мягкий читаемый текст. */
@font-face { font-family: 'Exo 2'; src: url(fonts/Exo2-Variable.woff2) format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url(fonts/Nunito-Variable.woff2) format('woff2'); font-weight: 200 1000; font-style: normal; font-display: swap; }
html, body { font-family: 'Nunito', sans-serif; font-weight: 700; line-height: 1.25; font-synthesis: none; }
.btn, .panel h2, .chap-t, .topbar, .ltile .num, #menu .hero .ch-name,
#menu .lvl-badge, #hudTitle, .win-name, .tcard b {
  font-family: 'Exo 2', sans-serif; font-weight: 800; letter-spacing: .35px;
}
.logo .l2 { font-family: 'Nunito', sans-serif; font-weight: 900; line-height: 1.2; }
.btn { line-height: 1.15; }
.panel h2 { font-size: 50px; line-height: 1.18; -webkit-text-stroke-width: 1.5px; }
.panel p, .shop-sub, .shop-tut { line-height: 1.35; }
.upt { min-width: 0; gap: 5px; }
.upt b { font-family: 'Exo 2', sans-serif; font-weight: 750; line-height: 1.2; }
.upt span { font-weight: 700; line-height: 1.3; }
.upc .btn.small { width: 130px; min-width: 130px; flex: none; padding-left: 12px; padding-right: 12px; }
.win-btns .btn { padding-left: 28px; padding-right: 28px; font-size: 27px; line-height: 1.2; }
.panel .btn[data-act="continue"] {
  width: 100%; min-width: 0; height: auto; min-height: 118px;
  padding: 14px 56px 20px; white-space: normal; font-size: 30px; line-height: 1.2;
}
#menu .btn.trialsb { line-height: 1.2; }
.tcard b { max-width: 100%; padding: 0 16px; font-size: 42px; line-height: 1.2; white-space: normal; -webkit-text-stroke-width: 1.5px; }
.tcard small { line-height: 1.3; font-weight: 750; }
.win-name { line-height: 1.2; -webkit-text-stroke-width: 2px; }
.coins, .reward, .maxed { font-variant-numeric: tabular-nums; }
.ach-medal > small { font-family: 'Exo 2', sans-serif; font-weight: 800; }
/* Главное меню: подписи «Играть», «Карта», «Магазин» крупнее и по центру таблички (пользователь) */
#menu .btn.play { font-size: 60px; gap: 14px; padding: 0 44px 6px; }
#menu .btn.play svg { width: 56px; height: 56px; }
#menu .row .btn { width: 322px; font-size: 40px; gap: 10px; padding: 0 36px 5px; }
#menu .row .btn .gi { width: 46px; height: 46px; }
/* Главное меню: картинки-кнопки «Карта», «Магазин», «Испытания» (пользователь), «Играть» зелёная */
#menu .imgbtn { display: block; padding: 0; border: 0; background: none; cursor: pointer; filter: drop-shadow(0 6px 6px rgba(0,0,0,.35)); transition: transform .08s; }
#menu .imgbtn img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
#menu .imgbtn:active { transform: translateY(4px) scale(.98); }
#menu .row .imgbtn { width: 230px; height: 150px; }
#menu .imgbtn.trialsb { width: 160px; height: 112px; }
#menu .btn.green.play { color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.3); }
/* меню по эскизу пользователя: три кнопки-картинки в ряд, под ними большая «Играть» */
#menu .row.icons { gap: 18px; margin-top: 30px; }
#menu .row.icons .imgbtn { width: 140px; height: 96px; }
#menu .play-row { justify-content: center; margin-top: 34px; }
#menu .play-row .btn.play { width: 440px; height: 119px; font-size: 62px; padding: 0 58px 16px; line-height: 1; }   /* +10%; надпись по центру лица таблички, не у заклёпок (пользователь) */
/* золотая окантовка у кнопки магазина — обводка по контуру картинки (пользователь) */
#menu .imgbtn[data-act="shop"] { filter: drop-shadow(3px 0 0 #ffd54a) drop-shadow(-3px 0 0 #ffd54a) drop-shadow(0 3px 0 #ffd54a) drop-shadow(0 -3px 0 #ffd54a) drop-shadow(0 0 1.5px #8a5a10) drop-shadow(0 6px 6px rgba(0,0,0,.35)); }
#hudCoins { right: 6px; }   /* счётчик монет в игре чуть правее (пользователь) */
.panel.settings > .btn[data-act="closeModal"] { font-size: 50px; }   /* «Закрыть» крупнее (пользователь) */
.panel.shop .coins { min-width: 250px; } .panel.shop .coins span { flex: 1; text-align: center; }   /* число по центру поля между монетой и заклёпкой (пользователь) */
/* окно «Играть» (#86): сюжет крупнее остальных, под ним свободный режим и босс-раш */
.panel.modes { gap: 18px; }
.panel.modes .tcard { height: 220px; justify-content: flex-end; padding-bottom: 18px; }
.panel.modes .tcard.storyc { height: 330px; border-color: #ffd34d; }
.panel.modes .tcard img.bg { filter: brightness(.75); }
.panel.modes .tcard .ti { top: 18px; width: 100px; height: 100px; }
.tcard small.rec { margin-top: 6px; padding: 4px 16px; border-radius: 14px; background: rgba(59,38,69,.85); color: #ffe27a; font-size: 22px; }
#menu .row .btn.blue { min-width: 0; flex: 1; gap: 10px; }
#menu .row .btn.blue .gi { width: 52px; height: 52px; }
.rush-open { padding: 12px 16px; border-radius: 16px; background: rgba(194,54,31,.15); }
.panel.shop .coins { font-size: 58px; font-weight: 900; } .panel.shop .coins .coin { width: 64px; height: 64px; }   /* поле большое, цифра была мелкой (#99) */
/* окно режимов (отзыв 11-03): шире на 10%, «Сюжет» вверху карточки, белые буквы с обводкой, боссы ниже — видны целиком */
.panel.modes { width: 660px; }
.panel.modes .tcard.storyc b { position: absolute; top: 22px; left: 0; right: 0; font-size: 54px; -webkit-text-stroke: 3px #3b2645; }
.panel.modes .tcard small:not(.rec) { -webkit-text-stroke: 4px #3b2645; paint-order: stroke fill; }
.panel.modes .tbosses { inset: auto 0 64px; height: 150px; }
.panel.modes .tbosses img { height: 112px; margin: 0 -24px; }
.panel.modes .tbosses img:nth-child(2), .panel.modes .tbosses img:nth-child(4) { height: 130px; }
.panel.modes .tbosses img:nth-child(3) { height: 148px; }
/* главное меню: достижения и настройки на 7% больше (пользователь 11-03) */
#menu .gear, #menu .trophy { width: 108px; height: 108px; }
#menu .trophy { right: 139px; }
#menu .gear .gi, #menu .trophy .gi, #menu .gear svg { width: 51px; height: 51px; }
/* окно режимов, отзыв 2: сюжет заметно крупнее, глава и уровень сразу под «Сюжет»; боссы крупно и за надписью */
.panel.modes .tcard.storyc { height: 400px; }
.panel.modes .tcard.storyc small:not(.rec) { position: absolute; top: 96px; left: 0; right: 0; font-size: 30px; }
.panel.modes .tcard > b, .panel.modes .tcard > small { z-index: 3; }
.panel.modes .tbosses { inset: 0 0 auto; height: 100%; align-items: center; z-index: 1; }
.panel.modes .tbosses img { height: 175px; margin: 0 -30px; }
.panel.modes .tbosses img:nth-child(2), .panel.modes .tbosses img:nth-child(4) { height: 200px; }
.panel.modes .tbosses img:nth-child(3) { height: 220px; }
/* окно режимов, отзыв 3: бесконечность выше, обводка надписей у свободного режима и босс-раша как у «Сюжета» */
.panel.modes .tcard .ti { top: 4px; }
.panel.modes .tcard b { -webkit-text-stroke: 3px #3b2645; paint-order: stroke fill; }
.panel.modes .tcard small:not(.rec) { -webkit-text-stroke: 5px #3b2645; }
/* замок способности — плашкой сверху кнопки и крупнее (пользователь 11-03: снизу её прятала рамка) */
.abil em.lk { top: 0; bottom: auto; font-size: 19px; padding: 3px 11px; border-radius: 13px; z-index: 2; }
.abil em.lk::before { width: 20px; height: 22px; }
#frame.land .abil em.lk { font-size: 25px; padding: 3px 12px; }   /* на ПК в окне 16:9 «Ch.2» было ~10 px — CrazyGames проверяет читаемость при 800×450 */
#frame.land .abil em.lk::before { width: 24px; height: 27px; }
#menu .coins { cursor: pointer; } #menu .coins:active { transform: translateY(3px); }   /* счётчик в меню открывает Магазин */
.panel.modes .tcard.rushc b { position: absolute; top: 14px; left: 0; right: 0; }   /* «Босс-раш» — вверху карточки, над боссами (пользователь 11-03) */
/* финал: блок «Открыт Босс-раш» ярче — огненная плашка с рамкой и пульсом (пользователь 11-03) */
.rush-open { background: linear-gradient(180deg, #ff9a3c, #d8402a); color: #fff; border: 4px solid #3b2645; border-radius: 20px; padding: 14px 18px;
  font-weight: 800; box-shadow: 0 6px 0 #8f2516, 0 0 26px rgba(255,120,40,.65); animation: rushGlow 1.6s ease-in-out infinite; }
.rush-open b { display: block; font-size: 1.25em; color: #ffe27a; -webkit-text-stroke: 2px #3b2645; paint-order: stroke fill; }
@keyframes rushGlow { 50% { box-shadow: 0 6px 0 #8f2516, 0 0 44px rgba(255,170,60,.95); } }
@media (prefers-reduced-motion: reduce) { .rush-open { animation: none; } }
/* ?dev=1: 💀 — босс с одного выстрела (под ▶ свободного режима; на уровнях с боссом) */
#devKill { position: absolute; right: 8px; top: calc(164px + var(--dt, 0px)); width: 60px; height: 60px; border-radius: 35px; font-size: 30px; background: rgba(30,16,40,.8); border: 3px solid rgba(255,255,255,.35); z-index: 5; }
#devKill.on { background: #d8402a; border-color: #ffe27a; box-shadow: 0 0 16px rgba(255,120,40,.9); }
.panel.shop > .btn { flex-shrink: 0; }   /* «Вперёд!» в обучении Магазину: колонка flex сжимала кнопку, края-картинки отрывались от середины */
/* заряд способности (пользователь 11-03): незаряженная часть значка серая, цвет наливается по часовой с каждым винтиком
   в цветном лотке (--p из main.updateAbilities). Только фильтр по самому значку — без колец и подложек поверх */
.abil:not(.off):not(.ready)::after { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none; display: block; background: none;
  -webkit-backdrop-filter: grayscale(1) brightness(.42) contrast(.85); backdrop-filter: grayscale(1) brightness(.42) contrast(.85);   /* темнее — остаток до заряда видно (пользователь 11-03) */
  -webkit-mask: conic-gradient(transparent calc(var(--p) * 1turn), #000 0); mask: conic-gradient(transparent calc(var(--p) * 1turn), #000 0); }
/* финал: «Поздравляем!» / «Ты выбрался!» — две строки, светлые с толстой тёмной обводкой (раньше сливались с панелью, пользователь 11-03) */
.panel.final h2.final-t { display: flex; flex-direction: column; gap: 2px; line-height: 1.05; -webkit-text-stroke: 8px #3b2645; paint-order: stroke fill; }
.panel.final h2.final-t span:first-child { color: #ffffff; font-size: 58px; }
.panel.final h2.final-t span:last-child { color: #ffd23a; font-size: 46px; }
.rush-open[data-act] { cursor: pointer; }
.rush-open[data-act]:active { transform: translateY(3px); box-shadow: 0 3px 0 #8f2516, 0 0 26px rgba(255,120,40,.65); }
/* иконка карты: у картинки внизу ~15% пустого поля — без подгонки булавка выше и мельче ключа «Магазина» (пользователь 11-03) */
.gi.pic[style*="i_map"] { background: var(--gi) center top / auto 118% no-repeat; }

/* ---------- горизонтальный экран (main.js layout → класс land) ----------
   столбец игры 720×1280 — как в портрете; по высоте видна его полоса --y0…--y1, шапка, лоток и способности — в боковых
   колонках шириной --sw (левая колонка сдвинута к полю: центр --lc, чтобы зазор до поля был как у широких капсул справа; левая — x < 0, правая — x > 720 в координатах столбца). Меню и окна — столбцом по центру, масштаб --ck */
#frame.land { box-shadow: none; }
#frame.land #hud { inset: auto; left: var(--sw); top: calc(-1 * var(--y0)); width: 720px; height: 1280px; }
#frame.land #screens { position: absolute; left: var(--cx); top: 0; width: 720px; height: 1280px; transform: scale(var(--ck)); transform-origin: 0 0; pointer-events: none; }
#frame.land #screens > * { pointer-events: auto; }
#frame.land #screens:has(.modal) { box-shadow: 0 0 0 4000px rgba(30,10,50,.5); }   /* окно затемняет и боковые колонки */
#frame.land #loading { inset: auto; left: var(--cx); top: 0; width: 720px; height: 1280px; transform: scale(var(--ck)); transform-origin: 0 0; box-shadow: 0 0 0 4000px #140c0a; }
#frame.land #toast { top: 45%; }
#frame.land #btnPause { left: calc(var(--lc) - 95px); top: calc(var(--y0) + 16px); }
#frame.land #btnHelp { left: calc(var(--lc) + 5px); top: calc(var(--y0) + 16px); }
#frame.land #hearts, #frame.land #hud:not(.fight) #hearts { left: calc(var(--lc) - 50px); top: calc(var(--y0) + 140px); }
#frame.land #hudTitle, #frame.land #chapStrip { left: var(--rc); top: calc(var(--y0) + 34px); }
#frame.land #chapStrip { scale: 1.2; }   /* крупнее и чуть ниже (пользователь 11-10) */
/* Мастерская прямо из игры — только на широком экране, под монетами (решение пользователя 11-28); в портрете места нет */
#btnShop { display: none; }
#frame.land #btnShop { display: inline-flex; position: absolute; right: calc(720px - var(--rc) - 150px); top: calc(var(--y0) + 244px); height: 84px; font-size: 32px; padding: 0 46px 10px 40px; gap: 10px; scale: 0.9; }   /* поля шире заклёпок по краям — надпись на них не заезжает */
#frame.land #btnShop .gi { width: 46px; height: 46px; }
#frame.land #hudCoins { right: calc(720px - var(--rc) - 85px); top: calc(var(--y0) + 142px); scale: 1.2; }   /* под серединой полоски прогресса (пользователь 11-10) */
/* ПК (пользователь 11-10): сердце, отмена и способности крупнее — scale не спорит с transform анимаций */
#frame.land #hearts { scale: 1.3; }
#frame.land .abil { scale: 1.25; }
#frame.land #hud.fight #progress { left: 60px; right: 60px; width: auto; top: calc(var(--y0) + 16px); }   /* над боссом во всю ширину поля, с именем — как в портрете (BUGS #23, пользователь 11-17) */
#frame.land #devNext { right: calc(8px - var(--sw)); top: calc(var(--y0) + 460px); }
#frame.land #devKill { right: calc(8px - var(--sw)); top: calc(var(--y0) + 530px); }
#frame.land #abilities, #frame.land #fightAbil { bottom: calc(1370px - var(--y1)); }
#frame.land .abil[data-ab="undo"] { left: calc(var(--lc) - 52px); }
#frame.land .fab[data-fa="super"] { left: -160px; width: 130px; height: 130px; }   /* в бою способности вплотную к полю (пользователь 11-09) */
#frame.land .abil[data-ab="magnet"] { left: calc(var(--rc) - 128px); }   /* после увеличения ×1,25 — шире друг от друга (пользователь 11-10) */
#frame.land .abil[data-ab="xray"] { left: calc(var(--rc) + 24px); }
#frame.land .fab[data-fa="shield"] { right: -160px; width: 130px; height: 130px; }   /* на ПК щит крупнее на 25% (пользователь 11-09) */
#frame.land .fab b svg { width: 122px; height: 122px; }

/* телефон боком — слишком мелко: просим повернуть */
#rotate { display: none; position: fixed; inset: 0; z-index: 1000; background: #140c0a; color: #ffd36b; font: 800 22px Nunito, sans-serif; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; padding: 20px; }
#rotate b::before { content: ''; display: block; width: 52px; height: 92px; border: 6px solid #ffd36b; border-radius: 12px; box-sizing: border-box; }
#rotate b { font-size: 64px; display: inline-block; animation: rotHint 2s ease-in-out infinite; }
@keyframes rotHint { 0%, 30% { transform: rotate(90deg); } 60%, 100% { transform: rotate(0); } }
@media (orientation: landscape) and (max-height: 520px) and (pointer: coarse) { #rotate { display: flex; } }
#frame.land #menu > .clockdeco { left: calc(-1 * var(--cxs)); right: calc(-1 * var(--cxs)); }   /* часы меню — у краёв экрана, а не обрезаны краем столбца (пользователь) */
#frame.land #hud:has(#btnHelp.hidden) #btnPause { left: calc(var(--lc) - 44px); }   /* без помощи пауза одна — по центру колонки */

/* ===== главный экран: режимы листаются стрелками (#119), название с номером сверху, «Продолжить» снизу (#115) ===== */
#menu .hero-wrap { position: relative; display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
#menu .hero-wrap .hero { margin-bottom: 0; }
#menu .hero .slide { position: absolute; inset: 0; opacity: 0; pointer-events: none; /* без проявления: смена мгновенная (проявление маски Босс-раша и серого фильтра перерисовывалось каждый кадр, 11-07) */ }
#menu .hero .slide.on { opacity: 1; pointer-events: auto; }
#menu .hero .slide.off img { filter: grayscale(1) brightness(.55); }
#menu .hero .slide img { width: 100%; height: 100%; display: block; object-fit: cover; }
#menu .hero .ch-name { padding-bottom: 30px; line-height: 1.15; }
#menu .hero .ch-name .lvl-badge { position: static; transform: none; display: inline-block; margin-top: 8px; color: #3b2645; text-shadow: none; font-size: 24px; }
#menu .hero .btn.go { position: absolute; left: 0; right: 0; bottom: 24px; margin: 0 auto; width: 300px; min-width: 0; height: 92px; padding: 0 20px; font-size: 38px; }
#menu .hero .btn.go svg { width: 40px; height: 40px; } #menu .hero .btn.go svg path { fill: #3fdc6a; }
#menu .hero .hlock { position: absolute; left: 0; right: 0; bottom: 40px; margin: 0 auto; width: 110px; height: 110px; }
.hnav { flex: none; width: 64px; height: 150px; border: 0; border-radius: 20px; background: rgba(20,10,24,.6); color: #ffd36b; display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; box-shadow: 0 0 0 3px #c9a14a; }
.hnav svg { width: 36px; height: 36px; } .hnav.next svg { transform: scaleX(-1); }
.hnav:active { transform: translateY(3px); }
/* окно режимов: «Продолжить» — лицо карточки (#115, #116) */
.tcard .btn.go { position: relative; z-index: 3; margin-top: 10px; min-width: 0; width: 300px; height: 76px; padding: 0 18px; font-size: 32px; pointer-events: none; }
.tcard .btn.go svg { width: 34px; height: 34px; } .tcard .btn.go svg path { fill: #3fdc6a; }
.panel.modes .tcard.flowc { height: 300px; }
/* карта: стрелка у «Назад» — на страницу Потока и обратно (#118) */
.topbar .icon-btn.mapsw { left: auto; right: 20px; }
.topbar .icon-btn.mapsw svg { transform: scaleX(-1); }
.topbar .icon-btn.mapsw.back svg { transform: none; }
.fmap { position: absolute; top: 120px; left: 26px; right: 26px; bottom: 20px; overflow-y: auto; touch-action: pan-y; }
.fmap[hidden], .lmap[hidden] { display: none; }
.chap.fchap { --g: #ffb347; --t1: #d9a066; --t2: #8a5530; --dc: #fff1dc; background: linear-gradient(rgba(20,10,24,.5), rgba(20,10,24,.5)), url(img/mode_flow.webp) center / cover; }
.fgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 12px; }
.chap.fcell { padding: 0; border: 0; border-radius: 20px; background: none; box-shadow: none; }
.chap.fcell::before, .chap.fcell::after { content: none; }
.ltile.ftile { width: 100%; height: 104px; border-radius: 20px; }
.ltile.ftile .deco { left: 40%; top: 38%; width: 56%; height: 56%; }
.ltile.ftile.locked .lock { width: 30px; height: 30px; right: 4px; bottom: 4px; }
.ltile.ftile .num, .ltile.ftile.done .num { position: relative; left: auto; top: auto; font-size: 46px; -webkit-text-stroke: 5px #3b2645; }
.ltile.ftile .fok { position: absolute; right: 8px; top: 2px; font-style: normal; font-size: 30px; color: #7dff8a; -webkit-text-stroke: 3px #3b2645; paint-order: stroke fill; z-index: 2; }
.ltile.ftile.done { filter: saturate(.8); }
.panel.modes .tcard.rushc img.bg { filter: brightness(.8); } .panel.modes .tcard.rushc.off img.bg { filter: grayscale(1) brightness(.5); }
/* главный экран: картинка режима крупнее, «Играть» — поверх неё, под «Продолжить» (пользователь 11-04) */
#menu .hero-wrap .hero { width: 480px; height: 640px; }
#menu .hero .btn.go { bottom: 148px; width: 320px; }
#menu .hero .hlock { bottom: 160px; }
#menu .hero .btn.hplay { position: absolute; left: 0; right: 0; bottom: 22px; margin: 0 auto; z-index: 2; width: 420px; height: 112px; font-size: 56px; }
#menu .hero-wrap + .row { margin-top: 34px; }
#menu .hero .ch-name .lvl-badge { display: table; margin: 8px auto 0; }
/* Фриплей на карте: простые двери, глава — цветом обводки (пользователь 11-04) */
#menu .hero .btn.hplay:disabled { filter: grayscale(1) brightness(.7); cursor: default; }
.fdoor { position: relative; height: 112px; padding: 0; border: 4px solid var(--g, #c9a14a); border-radius: 40px 40px 8px 8px; background: linear-gradient(90deg, rgba(0,0,0,.18) 0 4px, transparent 4px calc(100% - 4px), rgba(0,0,0,.18) 0), linear-gradient(180deg, #9a6a3e, #5e3a20); box-shadow: inset 0 0 0 3px #3b2645, 0 0 10px color-mix(in srgb, var(--g, #c9a14a) 55%, transparent), 0 6px 0 rgba(0,0,0,.35); display: grid; place-items: center; cursor: pointer; font: inherit; }
.fdoor::before { content: ''; position: absolute; left: 14%; right: 14%; top: 18%; bottom: 12%; border: 3px solid rgba(59,38,69,.55); border-radius: 26px 26px 4px 4px; pointer-events: none; }
.fdoor .knob { position: absolute; right: 13%; top: 54%; width: 12px; height: 12px; border-radius: 50%; background: #ffd36b; box-shadow: 0 0 0 2px #3b2645; }
.fdoor .num { position: relative; font-family: 'Russo One', "Segoe UI", Arial, sans-serif; font-size: 40px; color: #fff; -webkit-text-stroke: 5px #3b2645; paint-order: stroke fill; }
.fdoor:active:not(.locked) { transform: translateY(3px); }
.fdoor.cur { animation: tilePulse 1.2s ease-in-out infinite; background: linear-gradient(180deg, #d79a55, #8a5530); }
.fdoor.done { filter: saturate(.75); }
.fdoor .fok { position: absolute; right: 6px; top: 4px; font-style: normal; font-size: 28px; color: #7dff8a; -webkit-text-stroke: 3px #3b2645; paint-order: stroke fill; }
.fdoor.locked { cursor: default; background: linear-gradient(180deg, #5b4a5e, #3a2c3e); }
.fdoor.locked .num { opacity: .45; }
.fdoor.locked .lock { position: absolute; right: 4px; bottom: 4px; width: 30px; height: 30px; color: #ffe680; }
/* Фриплей: прямоугольные плитки как в сюжете — медь, планка с заклёпками сверху, обводка в цвет главы (пользователь 11-04) */
.fdoor { height: 116px; border-radius: 20px; overflow: hidden; background: linear-gradient(180deg, #e0a56c, #a2582b); box-shadow: inset 0 3px 0 rgba(255,255,255,.35), inset 0 0 0 3px #3b2645, 0 0 10px color-mix(in srgb, var(--g, #c9a14a) 55%, transparent), 0 6px 0 rgba(0,0,0,.35); }
.fdoor::before { left: 0; right: 0; top: 0; bottom: auto; height: 18px; border: 0; border-bottom: 2px solid #3b2645; border-radius: 0; background: radial-gradient(circle, #ffe2a0 0 3px, #6b3a1c 3.5px 4.5px, transparent 5px) 6px 50% / 22px 100% repeat-x, linear-gradient(180deg, #8a4c25, #5e3219); }
.fdoor .num { top: 6px; font-size: 44px; }
.fdoor.cur { background: linear-gradient(180deg, #ffc98a, #d0773a); }
.fdoor.locked { background: linear-gradient(180deg, #8a7488, #4e3d52); }
.fdoor.locked::after { content: ''; position: absolute; inset: 0; background: rgba(30,20,40,.3); }
.fdoor.locked .lock { z-index: 1; filter: drop-shadow(0 0 4px rgba(255,214,90,.8)) drop-shadow(1px 0 0 #3b2645) drop-shadow(-1px 0 0 #3b2645); }
.fdoor .fok { z-index: 1; top: 20px; }
/* карта: ← → слева листают страницы, справа — закрыть (пользователь 11-04) */
.topbar .icon-btn.mapsw.prev { left: 20px; right: auto; }
.topbar .icon-btn.mapsw.next { left: 124px; right: auto; }
.topbar .icon-btn.mapsw.prev svg { transform: none; } .topbar .icon-btn.mapsw.next svg { transform: scaleX(-1); }
.topbar .icon-btn.mapsw:disabled { opacity: .35; filter: grayscale(.6); }
.topbar .icon-btn.mapx { left: auto; right: 20px; padding: 0; }
.topbar .icon-btn.mapx img { width: 64%; height: 64%; object-fit: contain; }
/* карта: крестик — та же шайба, что у магазина; плитки Фриплея без свечения (пользователь 11-04) */
.topbar .xclose.mapx { position: absolute; right: 18px; top: 13px; width: 84px; height: 84px; margin: 0; padding: 0; border: 0; box-shadow: none; background: url(img/ui/b_round_1.webp) center / contain no-repeat; cursor: pointer; }
.topbar .xclose.mapx:active { transform: translateY(3px); }
.fdoor { box-shadow: inset 0 3px 0 rgba(255,255,255,.35), inset 0 0 0 3px #3b2645, 0 6px 0 rgba(0,0,0,.35); }
/* обводка плиток Фриплея на 20% тоньше: 4 → 3.2px (пользователь 11-04) */
.fdoor { border-width: 3.2px; }
/* название режима и уровень на картинке крупнее (пользователь 11-04) */
#menu .hero .ch-name { font-size: 52px; padding-top: 14px; }
#menu .hero .ch-name .lvl-badge { font-size: 31px; padding: 6px 24px; margin-top: 10px; }
/* плитки Фриплея — размером как сюжетные: 130px в высоту, номер 64px (пользователь 11-04) */
.fgrid { gap: 16px; }
.fdoor { height: 130px; border-radius: 24px; }
.fdoor .num { top: 8px; font-size: 62px; -webkit-text-stroke-width: 6px; }
.fdoor .fok { font-size: 32px; }
.fdoor.locked .lock { width: 36px; height: 36px; }
/* карта: стрелки +5% (96 → 101px), крестик того же размера (пользователь 11-04) */
.topbar .icon-btn.mapsw, .topbar .xclose.mapx { width: 101px; height: 101px; top: 7px; }
.topbar .icon-btn.mapsw.next { left: 130px; }
.topbar .xclose.mapx img { width: 55px; }
/* плашка на картинке режима: длинный текст («Откроется после прохождения игры») переносится, а не уходит за край */
#menu .hero .ch-name .lvl-badge { white-space: normal; max-width: 400px; line-height: 1.2; box-sizing: border-box; }
/* карта: узор из винтов остаётся, кроме одного — он вплотную у стрелки → (тайл 288px, винт в точке 216,72; пользователь 11-04) */
#levels::before { -webkit-mask: radial-gradient(circle 24px at 216px 72px, transparent 96%, #000 100%); mask: radial-gradient(circle 24px at 216px 72px, transparent 96%, #000 100%); }
/* Босс-раш на главном экране: картинка ниже на 49px (70 было много), чтобы надписи не закрывали головы боссов; сверху — цвет дыма картинки */
#menu .hero .slide.srush { background: #b7531f; }
#menu .hero .slide.srush img { transform: translateY(49px); -webkit-mask: linear-gradient(transparent, #000 50px); mask: linear-gradient(transparent, #000 50px); }
/* окно босса перед боем: арт «за решёткой» крупнее, текст короче (пользователь 11-04) */
.story-img[src*="cage_art"] { width: 540px; height: 396px; }
/* выбор языка (#111) */
.panel.settings .langbtn { margin: 6px 0 4px; font-size: 30px; }
.langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 8px 0 14px; }
.langs .btn.small { min-width: 260px; height: 72px; font-size: 30px; font-family: "Segoe UI", Arial, sans-serif; }
#menu .hero .btn.hplay svg { flex-shrink: 0; } #menu .hero .btn.hplay span { white-space: nowrap; }
#menu .hero .btn.hplay span, .panel.settings .btn .cl-t { position: relative; top: -0.07em; }
/* стрелки режимов шире (пользователь 11-07); пульс свечения — прозрачностью слоя ::before (box-shadow в анимации перерисовывался каждый кадр) */
.hnav { position: relative; width: 84px; height: 160px; background: linear-gradient(180deg, #ffd36b, #e0a021); color: #3b2645; box-shadow: 0 0 0 4px #3b2645, 0 0 10px 2px rgba(255,211,107,.6); }
.hnav::before { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 26px 8px rgba(255,211,107,1); opacity: 0; animation: hnavPulse 1.4s ease-in-out infinite; pointer-events: none; will-change: opacity; }
.hnav svg { width: 54px; height: 54px; }
@keyframes hnavPulse { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
.hnav.prev::before { animation-name: hnavPulse; }   /* центр строчных букв — на линии заклёпок (пользователь) */
/* настройки: сброс прогресса на 15% меньше, «Закрыть» на 15% больше (пользователь) */
.panel.settings .btn[data-act="resetAsk"] { min-width: 391px; width: 391px; height: 68px; font-size: 29px; padding: 0 46px; }
.panel.settings .btn[data-act="closeModal"] { min-width: 529px; width: 529px; height: 115px; font-size: 57px; padding: 0 74px; }

/* рисованные значки вместо эмодзи в тексте (js/icons.js) */
.ei { display: inline-block; width: 1.05em; height: 1.05em; vertical-align: -0.17em; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ei-heart { color: #ff4b5c; }

/* пока идёт игра, фон страницы не анимируется (лишние перерисовки на телефоне) */
body.playing #bg, body.playing #bg::before, body.playing #bg i, body.playing #bg i::after { animation-play-state: paused; }

/* карта без постоянной перерисовки (пользователь 11-07: «прогружается по частям»): значки на плитках неподвижные и без drop-shadow,
   почти невидимый узор глав (SVG-плитка с прозрачностью 6%) убран — SVG-маски с фильтром и вращением растеризовались на лету */
#levels .ltile .deco, #levels .chap .ltile .deco { animation: none !important; filter: none !important; }
#levels .chap::before { display: none; }
/* карта — постоянный слой (ui.js putLevels): под меню спрятана и НЕ рисуется (visibility + content-visibility: разметка готова, видеокарту
   не грузит — прозрачность .001 склеивалась в каждом кадре меню, телефон подвисал, 11-07); стрелки Сюжет ⇄ Фриплей — прозрачность */
#levels.park, #frame.land #screens > #levels.park { visibility: hidden; content-visibility: hidden; pointer-events: none; }
#levels.park * { pointer-events: none !important; }
#levels.sleep { display: none; }
.lmap, .fmap { will-change: opacity; }
.lmap.off, .fmap.off { opacity: .001; pointer-events: none; }
.topbar .tb-title.off { opacity: 0; }
/* меню — сразу, без проявления (после закрытия окон и возврата меню 0,25 с «проявлялось» — казалось задержкой, 11-07) */
#menu.screen.show { animation: none; }
/* Фриплей: обводка плиток одна, тёмная, без свечения; пульсирует только дверь, на которой игрок остановился (как следующий уровень в сюжете) */
.fdoor { --g: #3b2645; }
.fdoor.cur { --g: #ffd36b; }
/* карта без CSS-фильтров (11-07): замки рисовались через 3–5 drop-shadow каждый (≈70 замков), пройденные — saturate, значки глав — drop-shadow;
   на телефоне это отдельные проходы отрисовки на каждый элемент — карта и стрелки Сюжет ⇄ Фриплей открывались с задержкой. У значка замка своя обводка */
#levels .lock, #levels .chap-t .chi, #levels .fdoor.done, #levels .ltile.ftile.done { filter: none !important; }
/* текущая плитка карты моргает прозрачностью слоя ::after, а не анимацией box-shadow (та перерисовывала плитку каждый кадр) */
#levels .ltile.next, #levels .fdoor.cur { animation: none !important; }
#levels .ltile.next::after, #levels .fdoor.cur::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 5px var(--g), inset 0 0 20px 6px var(--g); opacity: 0; animation: curBlink 1.2s ease-in-out infinite; will-change: opacity; pointer-events: none; z-index: 2; }
@keyframes curBlink { 50% { opacity: 1; } }
/* моргает только текущая плитка видимой страницы карты */
#levels .lmap.off .ltile.next::after, #levels .fmap.off .fdoor.cur::after { animation: none; }

/* Карусель режимов в меню: центральная карточка и по краям две соседние (пользователь 11-08). Только transform/opacity — как и прежние экраны меню, без перерисовки */
#menu .hero-wrap { width: 720px; padding: 14px 0; margin: -14px 0 4px; overflow: visible; justify-content: center; gap: 0; }
#menu .hero-wrap .hero { width: 396px; height: 640px; border: 0; border-radius: 0; box-shadow: none; overflow: visible; animation: none; touch-action: pan-y; --dx: 0px; user-select: none; -webkit-user-select: none; }
#menu .hero .slide { opacity: 1; pointer-events: auto; box-sizing: border-box; border: 8px solid #c9a14a; border-radius: 34px; overflow: hidden; box-shadow: 0 0 0 5px #3b2645, 0 10px 24px rgba(0,0,0,.5); transition: transform .24s cubic-bezier(.2,.8,.3,1); will-change: transform; cursor: pointer; }
#menu .hero .slide::after { content: ''; position: absolute; inset: 0; background: #0b0a16; opacity: 0; transition: opacity .24s; pointer-events: none; }
#menu .hero .slide[data-pos="c"] { z-index: 2; transform: translateX(var(--dx)); cursor: default; }
#menu .hero .slide[data-pos="l"] { z-index: 1; transform: translate(calc(-200px + var(--dx)), 20px) rotate(-6deg) scale(.8); }
#menu .hero .slide[data-pos="r"] { z-index: 1; transform: translate(calc(200px + var(--dx)), 20px) rotate(6deg) scale(.8); }
#menu .hero .slide[data-pos="l"]::after, #menu .hero .slide[data-pos="r"]::after { opacity: .6; }
#menu .hero.drag .slide { transition: none; }
/* ленточка на карточке режима: сюжет — новичкам, Босс-раш — после сюжета (пользователь 11-17) */
#menu .hero .slide .mtag { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 3; padding: 8px 22px; border-radius: 18px; white-space: nowrap; font-size: 24px; font-weight: 900; color: #fff; background: #3b2645; border: 3px solid #ffd36b; box-shadow: 0 4px 0 rgba(0,0,0,.35); }
#menu .hero .slide .ch-name .mtag.new { position: static; transform: none; display: table; margin: 8px auto 0; background: #2f9e44; border-color: #d6ffe6; font-size: 22px; padding: 5px 16px; text-shadow: none; }   /* в потоке под плашкой уровня: при переносе плашки на 2 строки не наезжает (11-17, телефон) */
#menu .hero .slide .ch-name .mtag.after { position: static; transform: none; display: table; margin: 8px auto 0; font-size: 22px; padding: 5px 16px; }   /* «Откроется после сюжета» под плашкой — внизу её закрывала кнопка «Играть» */
/* широкий экран (ПК): места по бокам хватает — режимы рядом и целиком, а не спрятаны за центральной карточкой (пользователь 11-17) */
@media (min-aspect-ratio: 3/2) {
  #frame.land #menu .hero .slide[data-pos="l"] { transform: translate(calc(-410px + var(--dx)), 14px) rotate(-3deg) scale(.9); }
  #frame.land #menu .hero .slide[data-pos="r"] { transform: translate(calc(410px + var(--dx)), 14px) rotate(3deg) scale(.9); }
  #frame.land #menu .hero .slide[data-pos="l"]::after, #frame.land #menu .hero .slide[data-pos="r"]::after { opacity: .25; }
}
#menu .hero .btn.hplay { z-index: 3; width: 364px; }
#menu .hero .btn.hplay svg { width: 40px; height: 40px; }
#menu .hero .ch-name .lvl-badge { max-width: 350px; }

/* джойстик прицела: только бой на горизонтальном экране; ход ручки = оттяжка рогатки */
#joy { display: none; position: absolute; width: 210px; height: 210px; border-radius: 50%; box-sizing: border-box; background: rgba(30,16,40,.75); border: 4px solid rgba(255,211,107,.55); touch-action: none; cursor: grab; }
#frame.land #hud.boss #joy { display: block; left: calc(var(--rc) - 105px); top: calc(var(--y0) + 480px); }
#joy i { position: absolute; left: 50%; top: 50%; margin: -11px 0 0 -11px; border: 11px solid transparent; border-bottom: 16px solid rgba(255,211,107,.8); border-top-width: 0; transform-origin: 11px 11px; }
#joy i:nth-child(1) { transform: translateY(-78px); }
#joy i:nth-child(2) { transform: rotate(90deg) translateY(-78px); }
#joy i:nth-child(3) { transform: rotate(180deg) translateY(-78px); }
#joy i:nth-child(4) { transform: rotate(270deg) translateY(-78px); }
#joy b { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe58a, #c9882a); border: 3px solid #3b2645; pointer-events: none; }
body.aiming #joy { cursor: grabbing; }

/* лёгкий режим — приложение Playgama (Android WebView), класс lite ставит main.js (11-17): без вечных декоративных анимаций фона,
   без backdrop-filter на заряде способности (перерисовывался при каждом изменении заряда) — вместо него тёмная заливка */
/* (анимации фона и декораций в приложении вернули — пользователь 11-17) */
html.litefx .abil:not(.off):not(.ready)::after { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(18,10,28,.62); }

/* щит готов и не поднят — пульсирующий золотой ореол под кнопкой и лёгкое покачивание: напомнить, что откат прошёл (пользователь 11-17).
   Ореол — градиент на ::before с анимацией opacity/transform (дёшево, без filter: облегчённые эффекты его не вырезают) */
.fab[data-fa="shield"] { isolation: isolate; }
.fab[data-fa="shield"].ready:not(.pulse) { animation: shieldBob 1.1s ease-in-out infinite; }
.fab[data-fa="shield"].ready:not(.pulse)::before { content: ''; position: absolute; inset: -22px; border-radius: 50%; z-index: -1; pointer-events: none;
  background: radial-gradient(circle, rgba(255,226,110,.95) 0 38%, rgba(255,216,74,.45) 52%, rgba(255,216,74,0) 70%);
  animation: shieldGlow 1.1s ease-in-out infinite; }
@keyframes shieldGlow { 0%, 100% { opacity: .3; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.1); } }
@keyframes shieldBob { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
