/*
 * Токени Spitech — канонічна таблиця. Не дублювати ці значення інлайн.
 * Роль            | Значення   | Де застосовувати
 * ---------------- | ---------- | -----------------------------------------
 * --violet          акцент      ЄДИНИЙ інтерактивний акцент: активний нав,
 *                               FAB, обраний чіп, primary-кнопка, focus-ring
 * --win / --rose /  семантика   ТІЛЬКИ стан гри: виграш / рулетка-червоне /
 * --green                       рулетка-зеро. Ніколи не як акцент UI.
 * --edge             межа       Функціональна межа тайлів/полів/панелей —
 *                               видима (на відміну від --line).
 * --line             розділювач Суто декоративний поділ (paytable, списки).
 * --radius-sm/md/lg/pill        Одна шкала кутів на весь застосунок.
 * --z-nav/splash/modal          Задокументована шкала нашарувань.
 */
:root {
  --void: #0F0A1A;
  --void-2: #170F28;
  --panel: #1B1330;
  --panel-2: #241A3D;
  --line: #332552;
  --edge: rgba(139,92,246,.35);
  --violet: #8B5CF6;
  --violet-deep: #6D28D9;
  --violet-dark: #4C1D95;
  --ink: #F1EAFB;
  --muted: #B0A3D6;
  --win: #F45FD1;
  --rose: #E23F73;
  --chip-black: #1B1526;
  --green: #2F9E6E;
  --shadow: 0 10px 30px rgba(0,0,0,.5);
  --glow-violet: 0 0 22px rgba(139,92,246,.42);
  --glow-win: 0 0 22px rgba(244,95,209,.48);
  --glow: var(--glow-violet); /* лишено для сумісності зі старими викликами */

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --z-nav: 10;
  --z-splash: 100;
  --z-modal: 200;

  --tap: transform .12s cubic-bezier(.3,.7,.4,1);

  /* Неон вивіски: ядро світла -> середній ореол -> далеке розсіювання.
     Три рівні потрібні, бо одна тінь дає пляму, а не світло трубки. */
  --neon-core: #FFFFFF;
  --neon: #C9A9FF;
  --neon-mid: #8B5CF6;
  --neon-far: #6D28D9;
}
@media (prefers-reduced-motion: reduce) {
  :root { --tap: none; }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--void);
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  height: 100%;
}

.app {
  position: relative;
  min-height: 100dvh;
  /* Запобіжник, а не виправлення: горизонтального прокручування в цьому
     застосунку не має бути в принципі, і якщо щось знову вилізе за край,
     краще обрізати, ніж дозволити возити екран убік. Самі причини
     переповнення лікуються там, де вони виникають. */
  overflow-x: clip;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(139,92,246,.22), transparent 60%),
    radial-gradient(700px 420px at 105% 8%, rgba(244,95,209,.10), transparent 55%),
    var(--void);
}
/* Лого водяним знаком на фоні всіх екранів. Окремий шар, щоб не заважав
   контенту і не перемальовувався разом із ним. */
.app::before {
  content: "";
  position: fixed;
  inset: 0;
  /* Заливний варіант знака: обведений при такій прозорості перетворювався
     на нитку в один піксель і на темному тлі його просто не було видно. */
  background: url("/assets/logo-watermark.svg") no-repeat center 42% / min(92vw, 520px) auto;
  opacity: .16;
  pointer-events: none;
  z-index: 0;
}
/* Друге, м'якше коло світла під знаком — воно й робить пляму читабельною:
   сам силует лишається приглушеним, а підсвітка відділяє його від фону. */
.app::after {
  content: "";
  position: fixed;
  left: 50%; top: 42%;
  width: min(92vw, 520px); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(139,92,246,.22) 0%, rgba(139,92,246,.07) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.app > * { position: relative; z-index: 1; }

/* Тактильний фідбек на тап — критично для Telegram Mini App: нема
   нативного touch-фідбеку браузера, тому кожен тап має відчуватись фізично. */
.chip, .rbet, .navbtn, .spin-btn, .cta-btn, .topup-chip, .method-tile,
.lobby-tile, .play-btn, .wallet-tile, .ghost-btn {
  transition: var(--tap), box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.chip:active, .rbet:active, .navbtn:active, .spin-btn:not(:disabled):active,
.cta-btn:not(:disabled):active, .topup-chip:active, .method-tile:active,
.lobby-tile:active, .play-btn:active, .wallet-tile:active {
  transform: scale(.97);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px 6px;
}

.brand { display: flex; align-items: center; gap: 9px; }
.brand-logo { width: 32px; height: 32px; }
/* Назва казино — неонова вивіска. Bungee має одну насиченість (400) і вже
   спроектований під вивіски, тому жирність тут не задається. */
.brand-name {
  font-family: "Bungee", "Manrope", sans-serif;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #FBF7FF;
  line-height: 1;
  /* Світіння лише НАВКОЛО літер, не поверх них. Білий кернел (0 0 1px)
     прибрано: саме він розмивав контури, бо лягав на сам гліф. Тепер дві
     слабкі фіолетові тіні дають ореол, а літери лишаються чистими. */
  text-shadow:
    0 0 5px rgba(139,92,246,.45),
    0 0 13px rgba(139,92,246,.20);
}

.balance {
  text-align: right;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius-md);
  padding: 7px 13px;
  box-shadow: var(--shadow);
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.balance-label {
  display: block;
  font-size: 9px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.balance-row { display: flex; align-items: baseline; gap: 5px; justify-content: flex-end; }
.balance-value {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.balance-coin { color: var(--violet); font-size: 13px; }

/* position потрібен, щоб накладки (святкування виграшу) лягали на сцену,
   а не на весь застосунок. */
.stage { flex: 1; padding: 4px 10px 8px; display: flex; flex-direction: column; position: relative; }

.game {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  padding: 12px 12px 14px;
  /* double-bezel: тонке зовнішнє фіолетове кільце + верхній/нижній inset —
     читається як скло у металевій оправі апарату (soft-skill). */
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(139,92,246,.08),
    inset 0 1px 0 rgba(255,255,255,.05),
    inset 0 -1px 0 rgba(0,0,0,.28);
  display: flex;
  flex-direction: column;
  gap: 11px;
}

/* ---------- bottom nav ---------- */
.bottomnav {
  position: sticky;
  bottom: 0;
  z-index: var(--z-nav);
  display: flex;
  gap: 6px;
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(15,10,26,0), var(--void-2) 40%);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.navbtn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  font-size: 10.5px;
  padding: 9px 4px 7px;
  border-radius: var(--radius-md);
  cursor: pointer;
}
.navbtn .ic { font-size: 19px; opacity: .65; filter: grayscale(.5); }
.navbtn.active {
  color: var(--ink);
  background: var(--panel-2);
  box-shadow: inset 0 0 0 1px rgba(139,92,246,.55), 0 0 16px rgba(139,92,246,.25);
}
.navbtn.active .ic { opacity: 1; filter: none; }

.navbtn:focus-visible, .chip:focus-visible, .rbet:focus-visible,
.spin-btn:focus-visible, .cta-btn:focus-visible, .topup-chip:focus-visible, .method-tile:focus-visible,
.lobby-tile:focus-visible, .wallet-tile:focus-visible, .play-btn:focus-visible,
.back-link:focus-visible, .ghost-btn:focus-visible, .straight-row input:focus-visible {
  outline: 2px solid var(--violet); outline-offset: 2px;
}

/* ---------- slots ---------- */
.reels {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  background: var(--void-2);
  border: 1px solid var(--edge);
  border-radius: var(--radius-md);
  padding: 8px 7px;
}
/* Сяйво — окремий шар зі статичною тінню, у якого анімується лише opacity.
   Анімувати сам box-shadow не можна: це перемальовування щокадру. */
.reels::after {
  content: "";
  position: absolute; inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease;
  box-shadow: 0 0 0 1px rgba(244,95,209,.6), var(--glow-win);
}
.reels.win-glow::after { opacity: 1; }
/* Передчуття: два барабани вже збіглись, третій ще крутиться. */
.reels.anticipating::after {
  box-shadow: 0 0 0 1px rgba(139,92,246,.55), var(--glow-violet);
  opacity: 1;
}
.reels.anticipating .reel[data-i="2"] { border-color: var(--violet); }
@media (prefers-reduced-motion: reduce) {
  .reels::after { transition: none; }
}
/* Барабан = вікно з обрізанням; усередині рухається стрічка символів.
   Висота вікна дорівнює висоті однієї комірки, тож видно рівно один символ. */
.reel {
  --sym-h: 64px;
  height: var(--sym-h);
  overflow: hidden;
  position: relative;
  background: var(--void);
  border-radius: var(--radius-sm);
  border: 1px solid var(--edge);
}
/* Затемнення згори й знизу — дешевий замінник motion blur:
   дає відчуття глибини барабана без filter:blur, який важкий на Android WebView. */
.reel::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(15,10,26,.85) 0%, rgba(15,10,26,0) 32%,
    rgba(15,10,26,0) 68%, rgba(15,10,26,.85) 100%);
}
.reel-strip {
  display: flex;
  flex-direction: column;
  transform: translate3d(0,0,0);
}
/* will-change ставимо ТІЛЬКИ на час руху: постійно ввімкнений, він тримає
   три промотовані GPU-шари живими навіть у лобі. */
.reel-strip.rolling, .reel-strip.landing { will-change: transform; }
.sym {
  height: var(--sym-h);
  display: flex; align-items: center; justify-content: center;
  /* Символ росте разом із вікном барабана, а не лишається 36px на будь-якому
     розмірі — інакше збільшений барабан виглядає порожньою рамкою. */
  font-size: calc(var(--sym-h) * .58); line-height: 1;
}
/* Безшовне прокручування: стрічка складена з повторюваних блоків по --period
   символів, тож зсув рівно на один блок замикається без стрибка. */
@keyframes reel-roll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, calc(var(--sym-h) * var(--period) * -1), 0); }
}
.reel-strip.rolling { animation: reel-roll var(--roll-ms, 420ms) linear infinite; }
.reel.landed .sym-win { animation: sym-pop .45s cubic-bezier(.2,.9,.3,1.4); }
@keyframes sym-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.28); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .reel-strip.rolling { animation: none; }
  .reel.landed .sym-win { animation: none; }
}

.result-line {
  min-height: 20px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
}
.result-line.win { color: var(--win); text-shadow: 0 0 14px rgba(244,95,209,.5); }

.bet-row { display: flex; align-items: center; gap: 12px; justify-content: center; flex-wrap: wrap; }
.bet-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bet-chips { display: flex; gap: 8px; }
.chip {
  min-width: 46px; height: 46px; border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 11px; white-space: nowrap;
  border: 2px dashed rgba(241,234,251,.25);
  background: radial-gradient(circle at 35% 30%, #2c1f4a, var(--void-2) 70%);
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700; font-size: 12.5px;
  cursor: pointer;
}
.chip.chip-active {
  background: radial-gradient(circle at 35% 30%, #b491ff, var(--violet-deep) 75%);
  color: #150A28;
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(139,92,246,.20), var(--glow);
}

.spin-btn, .cta-btn {
  align-self: center;
  /* Ширина — побажання, а не вимога.
     Раніше тут стояв жорсткий min-width: 200px. Поодинці кнопка від цього
     виглядала добре, але в сітці з трьох колонок (дії блекджека: ЩЕ, ДОСИТЬ,
     ×2) кожна комірка ставала щонайменше 200px — разом понад 600 при ширині
     екрана 390, і сторінку доводилось совати вбік. Тепер кнопка прагне тієї
     ж ширини, але стискається, коли місця немає. */
  min-width: min(200px, 100%);
  max-width: 100%;
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--violet), var(--violet-deep));
  color: #fff;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(109,40,217,.45), var(--glow);
}
.spin-btn:disabled, .cta-btn:disabled { opacity: .5; cursor: default; box-shadow: none; }

.paytable { color: var(--muted); font-size: 13px; }
.paytable summary { cursor: pointer; color: var(--violet); font-weight: 600; }
.paytable table { width: 100%; margin-top: 10px; border-collapse: collapse; }
.paytable th {
  text-align: left; font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; padding-bottom: 6px; border-bottom: 1px solid var(--edge);
}
.paytable th:last-child, .paytable td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.paytable td { padding: 7px 0; border-bottom: 1px dashed var(--line); color: var(--ink); font-size: 14px; }
.paytable tr:last-child td { border-bottom: none; }

/* ---------- roulette ---------- */
/* Стрічка чисел замість колеса: на телефоні 37 секторів дають нечитабельні
   цифри, а горизонтальна стрічка під стрілкою читається миттєво. */
.rl-history { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 2px; }
.rl-history::-webkit-scrollbar { display: none; }
.rl-hist-num {
  flex: 0 0 auto;
  min-width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-family: "JetBrains Mono", monospace; font-size: 11.5px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rl-hist-empty { font-size: 11.5px; color: var(--muted); padding: 5px 0; }

.rl-track {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--void-2);
  border: 1px solid var(--edge);
  padding: 12px 0;
}
.rl-track::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg,
    rgba(15,10,26,.92) 0%, rgba(15,10,26,0) 22%,
    rgba(15,10,26,0) 78%, rgba(15,10,26,.92) 100%);
}
.rl-pointer {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; margin-left: -1px;
  background: var(--violet);
  box-shadow: var(--glow-violet);
  z-index: 2;
}
.rl-pointer::before {
  content: "";
  position: absolute; top: -1px; left: 50%; margin-left: -6px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--violet);
}
.rl-strip {
  display: flex;
  gap: 6px;
  will-change: transform;
  transform: translate3d(0,0,0);
}
.rl-num {
  flex: 0 0 auto;
  width: 50px; height: 50px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-family: "JetBrains Mono", monospace;
  font-size: 17px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rl-red { background: var(--rose); color: #2B0812; }
.rl-black { background: var(--chip-black); color: #fff; }
.rl-green { background: var(--green); color: #06251A; }

.rl-yourbet {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  padding: 9px 12px;
  border: 1px dashed var(--edge);
  border-radius: var(--radius-sm);
}
.rl-yourbet.chosen { color: var(--ink); border-style: solid; font-weight: 700; }
.rbet.rbet-selected {
  outline: 2px solid var(--violet);
  outline-offset: -2px;
  box-shadow: var(--glow-violet);
}

.wheel-result { display: flex; justify-content: center; align-items: center; height: 96px; }
.wheel-number {
  width: 84px; height: 84px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700; font-size: 30px;
  font-variant-numeric: tabular-nums;
  background: var(--void-2);
  border: 3px solid var(--edge);
  color: var(--ink);
}
/* Ink/білий на --rose дає ~3.45:1 (провал) — темний текст на червоному, як і в .rbet-red. */
.wheel-number.wheel-red { background: var(--rose); border-color: #7c2340; color: #2B0812; }
.wheel-number.wheel-black { background: var(--chip-black); border-color: #0b0810; color: #fff; }
.wheel-number.wheel-green { background: var(--green); border-color: #1c5138; color: #06251A; }

.roulette-bets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.rbet {
  border: 1px solid var(--edge);
  background: var(--void-2);
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
/* Напис тут білий, як на решті кнопок.
   Раніше він був темним: білий на світло-рожевій заливці давав 3.45:1 і
   провалював навіть UI-поріг 3:1. Але темний напис на екрані читався ще
   гірше, тому правильний вихід — не міняти текст, а ПРИТЕМНИТИ заливку.
   На #7c1c33 білий дає ~7:1, на #a52847 ~5:1 — обидва з запасом. */
.rbet-red { background: linear-gradient(180deg, #a52847, #7c1c33); border-color: #7c2340; color: #fff; }
.rbet-black { background: linear-gradient(180deg, #34302d, var(--chip-black)); border-color: #0b0810; color: #fff; }

.straight-row { display: flex; gap: 8px; }
.straight-row input {
  flex: 1;
  background: var(--void-2);
  border: 1px solid var(--edge);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  padding: 10px;
  min-width: 0;
}
.rbet-straight { flex: 1.4; background: linear-gradient(180deg, var(--violet), var(--violet-deep)); color: #fff; border-color: var(--violet); }

/* ---------- wallet ---------- */
.wallet-hero { text-align: center; padding: 6px 4px 4px; }
.wallet-hero .w-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.wallet-hero .w-amount {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 36px; font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}
.wallet-title {
  font-family: "Fraunces", serif; font-style: italic; font-weight: 600;
  font-size: 16px; color: var(--ink); text-align: center; margin: 2px 0 0;
}

.topup-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.topup-chip {
  background: var(--void-2);
  border: 1px solid var(--edge);
  border-radius: var(--radius-sm);
  padding: 13px 6px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
}
.topup-chip.active {
  border-color: var(--violet);
  box-shadow: var(--glow);
  color: #fff;
  background: linear-gradient(180deg, var(--violet-deep), var(--violet-dark));
}
/* Чіп «Своя» стоїть у тій самій сітці, що й суми, але підписаний словом,
   а не числом — тому шрифт тут інтерфейсний, інакше слово в моноширинному
   виглядає як помилка верстки. */
.topup-own {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  font-family: "Manrope", sans-serif; font-weight: 800; font-size: 12px;
  letter-spacing: .04em;
}
.topup-own .gi { width: 12px; height: 12px; }
.topup-custom {
  display: flex; align-items: center; gap: 6px;
  margin-top: 8px; width: 100%;
}
.topup-custom input {
  flex: 1 1 auto; min-width: 0;
  background: var(--void-2); border: 1px solid var(--edge); color: var(--ink);
  border-radius: var(--radius-sm); padding: 9px 11px;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 700;
  font-size: 15px; font-variant-numeric: tabular-nums;
}
.topup-custom input:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.topup-custom-apply {
  flex: 0 0 auto;
  border: 1px solid var(--violet); border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--violet), var(--violet-deep));
  color: #fff; font-family: "Manrope", sans-serif; font-weight: 800; font-size: 12px;
  padding: 9px 12px; cursor: pointer;
}
.topup-custom-hint { font-size: 10.5px; color: var(--muted); margin-top: 4px; text-align: center; }
.topup-custom-hint.bad { color: var(--rose); }

.method-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.method-tile {
  display: flex; align-items: center; gap: 8px;
  background: var(--void-2);
  border: 1px solid var(--edge);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  font-weight: 700;
  font-size: 12.5px;
  color: var(--ink);
  cursor: pointer;
}
.method-tile .m-ic { font-size: 17px; }
.method-tile.active { border-color: var(--violet); box-shadow: inset 0 0 0 1px var(--violet), 0 0 12px rgba(139,92,246,.3); }

.wallet-note {
  font-size: 11px; color: var(--muted); text-align: center; line-height: 1.5;
  border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 8px 10px;
}

.tx-heading {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  margin-top: 2px;
}
.tx-list { display: flex; flex-direction: column; gap: 7px; }
.tx-empty { font-size: 12.5px; color: var(--muted); text-align: center; padding: 10px 0; }
.tx-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px;
  background: var(--void-2);
  border: 1px solid var(--edge);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
}
.tx-row .tx-kind { color: var(--muted); font-weight: 600; }
.tx-row .tx-delta { font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 700; }
.tx-row .tx-delta.pos { color: var(--win); }
.tx-row .tx-delta.neg { color: var(--muted); }

.ghost-btn {
  align-self: center;
  background: transparent;
  border: none;
  color: var(--violet);
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
}
.ghost-btn:hover { text-decoration: underline; }

/* ---------- splash ---------- */
.splash {
  position: fixed; inset: 0; z-index: var(--z-splash);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background:
    radial-gradient(900px 500px at 50% 20%, rgba(139,92,246,.28), transparent 60%),
    var(--void);
  opacity: 1; pointer-events: auto;
  transition: opacity .2s ease;
}
.splash.hide { opacity: 0; pointer-events: none; }
/* Без !important атрибут hidden програє правилу .splash{display:flex} вище —
   екран лишається на місці й невидимо блокує всі натискання. */
.splash[hidden] { display: none !important; }
.splash-mark { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.splash-mark { position: relative; }
/* Круглий ореол окремим шаром. drop-shadow на самому <svg> у WebView дає
   підсвітку по прямокутній рамці елемента — саме звідси був «квадрат». */
.splash-mark::before {
  content: "";
  position: absolute;
  left: 50%; top: 52px;
  width: 260px; height: 260px;
  margin: -130px 0 0 -130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,.42) 0%, rgba(139,92,246,.16) 42%, transparent 68%);
  pointer-events: none;
  animation: sp-halo .9s ease-out both;
}
@keyframes sp-halo {
  0% { opacity: 0; transform: scale(.6); }
  100% { opacity: 1; transform: scale(1); }
}
.splash-logo {
  position: relative;
  width: 132px; height: 132px;
}
/* Кожна карта стартує розведеною й повернутою, потім сходиться на місце. */
.sp-card { transform-box: fill-box; transform-origin: center; }
.sp-card-l {
  transform: translate(34px, 52px);
  animation: sp-join-l .72s cubic-bezier(.22,.9,.28,1.06) both;
}
.sp-card-r {
  transform: translate(67px, 54px);
  animation: sp-join-r .72s cubic-bezier(.22,.9,.28,1.06) both;
}
@keyframes sp-join-l {
  0%   { transform: translate(10px, 62px) rotate(-38deg); opacity: 0; }
  55%  { opacity: 1; }
  100% { transform: translate(34px, 52px) rotate(-11deg); opacity: 1; }
}
@keyframes sp-join-r {
  0%   { transform: translate(92px, 62px) rotate(38deg); opacity: 0; }
  55%  { opacity: 1; }
  100% { transform: translate(67px, 54px) rotate(10deg); opacity: 1; }
}
.splash-name {
  display: flex; gap: .07em;
  font-family: "Bungee", sans-serif; font-weight: 400;
  font-size: clamp(24px, 8vw, 32px); letter-spacing: .04em;
  color: #FBF7FF;
}
/* Кожна літера — окрема трубка: спалахує з невеликою затримкою, як справжня
   вивіска, що запалюється. Анімуються лише opacity й text-shadow. */
.splash-name i {
  font-style: normal;
  opacity: 0;
  animation: sp-ignite .42s cubic-bezier(.2,.9,.3,1.2) both;
  animation-delay: calc(.30s + var(--i) * .075s);
}
@keyframes sp-ignite {
  0%   { opacity: 0; text-shadow: none; }
  40%  { opacity: 1; text-shadow: 0 0 2px var(--neon-core), 0 0 10px var(--neon), 0 0 26px var(--neon-mid); }
  55%  { opacity: .55; text-shadow: 0 0 2px var(--neon-core), 0 0 5px var(--neon); }
  70%  { opacity: 1; text-shadow: 0 0 3px var(--neon-core), 0 0 14px var(--neon), 0 0 34px var(--neon-mid), 0 0 58px var(--neon-far); }
  100% { opacity: 1; text-shadow: 0 0 6px rgba(139,92,246,.5), 0 0 16px rgba(139,92,246,.26); }
}
.splash-bar { width: 120px; height: 3px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.splash-bar-fill {
  display: block; height: 100%; width: 40%;
  background: linear-gradient(90deg, var(--violet-deep), var(--violet), var(--violet-deep));
  border-radius: 3px;
  animation: splash-slide 1s ease-in-out infinite;
}
@keyframes splash-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(280%); }
}
@media (prefers-reduced-motion: reduce) {
  .sp-card-l, .sp-card-r, .splash-mark::before { animation: none; }
  .splash-name i {
    animation: none; opacity: 1;
    text-shadow: 0 0 6px rgba(139,92,246,.5), 0 0 16px rgba(139,92,246,.26);
  }
  .sp-card-l { transform: translate(34px, 52px) rotate(-11deg); }
  .sp-card-r { transform: translate(67px, 54px) rotate(10deg); }
  .splash-bar-fill { animation: none; width: 100%; }
}

/* ---------- bottom nav: center play FAB ---------- */
.navbtn-play {
  position: relative;
  color: var(--ink);
}
.play-fab {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--violet), var(--violet-deep));
  color: #fff; font-size: 17px;
  margin-top: -22px;
  box-shadow: 0 8px 20px rgba(109,40,217,.5), 0 0 0 5px var(--void-2);
}
.play-caption { font-size: 10.5px; font-weight: 700; color: var(--muted); }
.navbtn-play.active .play-caption { color: var(--ink); }
.navbtn-play.active .play-fab { box-shadow: 0 8px 22px rgba(109,40,217,.6), 0 0 0 5px var(--void-2), var(--glow); }

/* ---------- profile ---------- */
.profile-hero { align-items: center; text-align: center; }
.avatar {
  width: 66px; height: 66px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--violet), var(--violet-dark));
  color: #fff; font-family: "Fraunces", serif; font-weight: 700; font-size: 26px;
  box-shadow: var(--glow);
  margin: 2px auto 0;
}
.profile-name {
  font-family: "Unbounded", "Manrope", sans-serif;
  font-weight: 600; font-size: 17px; letter-spacing: -.005em;
  color: var(--ink); margin-top: 12px;
}
.profile-greeting { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; margin-top: 14px; }
.stat {
  background: var(--void-2); border: 1px solid var(--edge); border-radius: var(--radius-sm);
  padding: 10px 8px; display: flex; flex-direction: column; gap: 3px;
}
.stat-label { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat-value { font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 700; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }

.play-btn {
  width: 100%; margin-top: 16px;
  padding: 15px; border: none; border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--violet), var(--violet-deep));
  color: #fff; font-family: "Manrope", sans-serif; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; font-size: 15px; cursor: pointer;
  box-shadow: 0 10px 26px rgba(109,40,217,.5), var(--glow);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.play-btn-ic { font-size: 13px; }

.wallet-tile {
  width: 100%; margin-top: 10px;
  display: flex; align-items: center; gap: 10px;
  background: var(--void-2); border: 1px solid var(--edge); border-radius: var(--radius-md);
  padding: 12px 14px; cursor: pointer; text-align: left;
}
.wallet-tile-ic { font-size: 20px; }
.wallet-tile-text { display: flex; flex-direction: column; flex: 1; gap: 1px; }
.wallet-tile-title { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.wallet-tile-sub { font-size: 11px; color: var(--muted); }
.wallet-tile-arrow { color: var(--muted); font-size: 18px; }

/* ---------- lobby ---------- */
.lobby { display: flex; flex-direction: column; gap: 12px; }
.lobby-title { font-family: "Bungee", sans-serif; font-weight: 400; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); text-align: center; margin-top: 2px; text-shadow: 0 0 10px rgba(139,92,246,.5); }
/* Категорії — рядок фільтрів над сіткою. */
.lobby-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.lobby-cats::-webkit-scrollbar { display: none; }
.lobby-cat {
  flex: 0 0 auto;
  border: 1px solid var(--edge); background: var(--void-2); color: var(--muted);
  border-radius: var(--radius-pill); padding: 6px 12px;
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 11.5px;
  cursor: pointer;
}
.lobby-cat.active {
  background: linear-gradient(180deg, var(--violet), var(--violet-deep));
  border-color: var(--violet); color: #fff; box-shadow: var(--glow-violet);
}

/* Лобі — сітка квадратних плиток, як у звичайному казино-застосунку.
   Чотири в ряд: на 13 ігор три колонки давали обрізаний останній рядок
   і забагато гортання. */
.lobby-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.lobby-tile {
  position: relative;
  aspect-ratio: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius-md);
  padding: 8px 4px;
  cursor: pointer;
  box-shadow: var(--shadow);
  overflow: hidden;
}
/* Кольоровий ореол свій у кожної гри — щоб плитки читались як різні, а не як список. */
.lobby-tile::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120px 90px at 50% 12%, var(--tint, rgba(139,92,246,.22)), transparent 70%);
  pointer-events: none;
}
.lobby-tile-ic {
  position: relative;
  width: clamp(30px, 10vw, 38px); aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--void-2);
  border: 1px solid var(--edge);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  color: var(--icon, var(--violet));
}
/* Іконка масштабується від плитки, а не фіксованим кеглем — інакше на
   вузькому екрані вона вилазить за свою підкладку. */
.lobby-tile-ic .gi { width: 62%; height: 62%; filter: drop-shadow(0 0 6px currentColor); }
.lobby-tile-name {
  position: relative;
  font-family: "Manrope", sans-serif; font-weight: 700;
  font-size: clamp(9px, 2.9vw, 11px);
  color: var(--ink); text-align: center; line-height: 1.12;
  /* Довга назва не має розсувати плитку — вона переноситься або обрізається. */
  max-width: 100%; overflow-wrap: anywhere; hyphens: auto;
}
.lobby-tile-sub { display: none; }
/* Мітка «нове» на щойно доданих іграх. */
.lobby-tile-new::after {
  content: "NEW";
  position: absolute; top: 5px; right: 5px;
  font-family: "Manrope", sans-serif; font-weight: 800; font-size: 7.5px;
  letter-spacing: .08em;
  padding: 2px 4px; border-radius: 4px;
  background: var(--win); color: #2a0a22;
}
.lobby-tile-slots     { --tint: rgba(139,92,246,.26); --icon: #C9A9FF; }
.lobby-tile-roulette  { --tint: rgba(244,95,209,.22); --icon: #F45FD1; }
.lobby-tile-crash     { --tint: rgba(47,158,110,.24); --icon: #4FD1A0; }
.lobby-tile-mines     { --tint: rgba(226,63,115,.22); --icon: #FF6E93; }
.lobby-tile-dice      { --tint: rgba(139,92,246,.20); --icon: #B18CFF; }
.lobby-tile-coin      { --tint: rgba(255,196,84,.20); --icon: #FFC454; }
.lobby-tile-plinko    { --tint: rgba(84,196,255,.20); --icon: #54C4FF; }
.lobby-tile-wheel     { --tint: rgba(244,95,209,.18); --icon: #FF8AD8; }
.lobby-tile-hilo      { --tint: rgba(139,92,246,.22); --icon: #C9A9FF; }
.lobby-tile-limbo     { --tint: rgba(47,158,110,.20); --icon: #4FD1A0; }
.lobby-tile-keno      { --tint: rgba(84,196,255,.18); --icon: #7FD4FF; }
.lobby-tile-tower     { --tint: rgba(255,140,84,.20); --icon: #FF9C54; }
.lobby-tile-blackjack { --tint: rgba(226,63,115,.20); --icon: #FF6E93; }

.back-link {
  background: transparent; border: none; color: var(--muted);
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 12.5px; cursor: pointer;
  padding: 4px 0; align-self: flex-start;
}
.back-link:hover { color: var(--violet); }

.game-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: -4px; }
.game-title { font-family: "Fraunces", serif; font-weight: 600; font-size: 13.5px; color: var(--muted); }

/* ---------- checkout preview ---------- */
.checkout-note {
  font-size: 11px; color: var(--muted); text-align: center;
  border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 7px 10px;
}
.checkout-amount { text-align: center; }
.checkout-amount .w-label { font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.checkout-amount .w-amount { font-family: "JetBrains Mono", monospace; font-size: 26px; font-weight: 700; color: var(--ink); margin-top: 2px; font-variant-numeric: tabular-nums; }

.card-preview {
  background: linear-gradient(135deg, #7C3AED 0%, #4C1D95 60%, #2c1359 100%);
  border-radius: var(--radius-md); padding: 18px 18px 16px; color: #fff;
  box-shadow: 0 14px 30px rgba(76,29,149,.45);
  display: flex; flex-direction: column; gap: 18px;
}
.card-preview-top { display: flex; align-items: center; justify-content: space-between; }
.card-chip { width: 32px; height: 22px; border-radius: 5px; background: linear-gradient(145deg,#f3d98a,#c79a3a); }
.card-brand { font-family: "Fraunces", serif; font-style: italic; font-weight: 700; font-size: 15px; letter-spacing: .04em; }
.card-preview-number { font-family: "JetBrains Mono", monospace; font-size: 18px; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.card-preview-bottom { display: flex; justify-content: space-between; gap: 12px; }
.card-preview-bottom > div { display: flex; flex-direction: column; gap: 2px; }
.card-preview-label { font-size: 9px; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.card-preview-value { font-family: "JetBrains Mono", monospace; font-size: 12.5px; letter-spacing: .03em; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field span { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field input {
  background: var(--void-2); border: 1px solid var(--edge); border-radius: var(--radius-sm);
  color: var(--ink); font-family: "JetBrains Mono", monospace; font-size: 13.5px; padding: 10px 12px;
}

.checkout-processing {
  align-items: center; text-align: center; gap: 14px; padding: 44px 16px;
}
.proc-ring {
  width: 52px; height: 52px; border-radius: 50%;
  border: 4px solid var(--line); border-top-color: var(--violet);
  animation: proc-spin .8s linear infinite;
}
@keyframes proc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .proc-ring { animation: none; } }
.proc-text { font-weight: 700; color: var(--ink); font-size: 14.5px; }
.proc-sub { font-size: 12px; color: var(--muted); }

.checkout-success { align-items: center; text-align: center; gap: 10px; padding: 30px 16px; }
.success-mark {
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #ff9be3, var(--win));
  color: #2a0a22; font-size: 28px; font-weight: 800;
  box-shadow: var(--glow-win);
  animation: success-pop .4s cubic-bezier(.2,.9,.3,1.4);
}
@keyframes success-pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.success-title { font-family: "Fraunces", serif; font-weight: 600; font-style: italic; font-size: 17px; color: var(--ink); }
.success-sub { font-size: 12px; color: var(--muted); margin-top: -4px; }
.receipt { width: 100%; display: flex; flex-direction: column; gap: 7px; margin-top: 6px; }
.receipt-row {
  display: flex; justify-content: space-between; font-size: 12.5px;
  background: var(--void-2); border: 1px solid var(--edge); border-radius: var(--radius-sm); padding: 9px 12px;
}
.receipt-row span:last-child { font-family: "JetBrains Mono", monospace; color: var(--ink); font-weight: 600; }

/* ---------- crash ---------- */
.cr-history { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 2px; }
.cr-history::-webkit-scrollbar { display: none; }
.cr-hist {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--void-2);
  border: 1px solid var(--edge);
  color: var(--muted);
}
.cr-hist.low { color: var(--rose); border-color: rgba(226,63,115,.5); }
.cr-hist.mid { color: var(--ink); }
.cr-hist.high { color: var(--win); border-color: rgba(244,95,209,.5); }
.cr-hist-empty { font-size: 11.5px; color: var(--muted); padding: 5px 0; }

.cr-stage {
  position: relative;
  height: 210px;
  border-radius: var(--radius-md);
  background:
    radial-gradient(420px 220px at 12% 92%, rgba(139,92,246,.20), transparent 65%),
    var(--void-2);
  border: 1px solid var(--edge);
  overflow: hidden;
}
.cr-stage.crashed {
  background:
    radial-gradient(420px 220px at 50% 50%, rgba(226,63,115,.28), transparent 68%),
    var(--void-2);
}
/* Слід ракети — SVG-крива на всю сцену. Раніше тут був розтягнутий
   прямокутник: він міг лише повертатись, тож траєкторія завжди виходила
   прямою, хоч множник росте з прискоренням. */
.cr-graph { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cr-line {
  fill: none;
  stroke: #4FD1A0;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 7px rgba(79,209,160,.75));
}
.cr-area { fill: rgba(79,209,160,.13); stroke: none; }
.cr-stage.crashed .cr-line { stroke: var(--rose); filter: drop-shadow(0 0 8px rgba(226,63,115,.8)); }
.cr-stage.crashed .cr-area { fill: rgba(226,63,115,.14); }
.cr-rocket {
  position: absolute;
  font-size: 26px;
  line-height: 1;
  will-change: transform;
}
.cr-mult {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 44px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  text-shadow: 0 0 24px rgba(139,92,246,.45);
  pointer-events: none;
}
.cr-mult.crashed { color: var(--rose); text-shadow: 0 0 26px rgba(226,63,115,.55); }
.cr-mult.cashed { color: var(--win); text-shadow: 0 0 26px rgba(244,95,209,.55); }
.cr-hint {
  position: absolute; left: 0; right: 0; bottom: 10px;
  text-align: center; font-size: 11.5px; color: var(--muted);
}
@media (prefers-reduced-motion: reduce) {
  .cr-rocket { transition: none !important; }
}

/* ---------- mines ---------- */
.mn-hud { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mn-stat {
  background: var(--void-2); border: 1px solid var(--edge);
  border-radius: var(--radius-sm); padding: 9px 10px;
  display: flex; flex-direction: column; gap: 2px;
}
.mn-stat-label { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mn-stat-value {
  font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 16px;
  font-variant-numeric: tabular-nums; color: var(--ink);
}

.mines-grid {
  --tension: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}
/* Напруга росте з кожним відкриттям, але анімується лише прозорість —
   статична тінь на окремому шарі, без перемальовування щокадру. */
.mines-grid::after {
  content: ""; position: absolute; inset: -6px;
  border-radius: var(--radius-md); pointer-events: none;
  box-shadow: 0 0 30px rgba(244,95,209,.55);
  opacity: var(--tension);
  transition: opacity .3s ease;
}
.mcell {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--edge);
  border-radius: var(--radius-sm);
  background: var(--void-2);
  cursor: pointer;
  padding: 0;
  display: flex; align-items: center; justify-content: center;
  transition: var(--tap), background .15s ease, border-color .15s ease;
}
.mcell:disabled { cursor: default; }
.mcell:not(:disabled):active { transform: scale(.94); }
.mcell-face { font-size: 20px; line-height: 1; display: block; }
.mcell.flipping .mcell-face { transform: scaleX(0); transition: transform 90ms ease-in; }
.mcell.safe {
  background: linear-gradient(180deg, rgba(139,92,246,.22), rgba(109,40,217,.16));
  border-color: var(--violet);
}
.mcell.safe .mcell-face { animation: mcell-pop 260ms cubic-bezier(.34,1.56,.64,1); }
@keyframes mcell-pop {
  0% { transform: scale(.2); }
  60% { transform: scale(1.14); }
  100% { transform: scale(1); }
}
.mcell.mine-shown { background: rgba(226,63,115,.16); border-color: rgba(226,63,115,.5); opacity: .75; }
.mcell.boom { background: var(--rose); border-color: #7c2340; }
.mcell.boom::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 26px rgba(226,63,115,.9);
  transform: scale(0); opacity: .9;
  transition: transform 420ms cubic-bezier(.2,.6,.2,1), opacity 420ms linear;
}
.mcell.boom.go::after { transform: scale(2.4); opacity: 0; }
@keyframes mn-shake {
  0%, 100% { transform: translate3d(0,0,0); }
  20% { transform: translate3d(-6px,0,0); }
  45% { transform: translate3d(5px,0,0); }
  70% { transform: translate3d(-3px,0,0); }
}
.mines-grid.shake { animation: mn-shake 320ms ease-in-out; }
@media (prefers-reduced-motion: reduce) {
  .mcell.safe .mcell-face { animation: none; }
  .mines-grid.shake { animation: none; }
  .mcell.flipping .mcell-face { transition: none; }
  .mcell.boom::after { transition: none; opacity: 0; }
}

/* Перемикач валюти відображення */
.cur-row { display: flex; gap: 6px; justify-content: center; }
.cur-btn {
  flex: 1;
  background: var(--void-2);
  border: 1px solid var(--edge);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-weight: 700; font-size: 12px;
  padding: 8px 6px;
  cursor: pointer;
}
.cur-btn.active {
  color: #fff;
  background: linear-gradient(180deg, var(--violet-deep), var(--violet-dark));
  border-color: var(--violet);
  box-shadow: var(--glow-violet);
}

/* Поява екрана при перемиканні розділів */
.stage-enter { animation: stage-in .26s cubic-bezier(.22,.9,.3,1) both; }
@keyframes stage-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .stage-enter { animation: none; }
}

/* Аватарка з Telegram, якщо вона доступна */
.avatar-img { object-fit: cover; padding: 0; border: 2px solid var(--violet); }

/* ---------- кістка ---------- */
.dice-roll {
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--ink); padding: 6px 0;
}
.dice-roll.win { color: var(--win); text-shadow: var(--glow-win); }
.dice-roll.rolling { opacity: .45; }
.dice-bar {
  position: relative; height: 12px;
  background: var(--void-2); border: 1px solid var(--edge);
  border-radius: var(--radius-pill); overflow: hidden;
}
.dice-bar-fill {
  position: absolute; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--violet-deep), var(--violet));
  transition: left .15s ease, width .15s ease;
}
.dice-bar-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); }
.dice-slider { width: 100%; accent-color: var(--violet); }

/* ---------- монетка ---------- */
.coin-stage { display: flex; justify-content: center; padding: 12px 0; }
.coin {
  width: 92px; height: 92px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
  background: radial-gradient(circle at 34% 28%, #b491ff, var(--violet-deep) 72%);
  box-shadow: var(--glow-violet);
}
.coin.flipping { animation: coin-flip .9s cubic-bezier(.3,.1,.3,1); }
@keyframes coin-flip {
  0% { transform: rotateY(0) scale(1); }
  50% { transform: rotateY(900deg) scale(1.12); }
  100% { transform: rotateY(1800deg) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .coin.flipping { animation: none; } }

/* ---------- більше-менше ---------- */
.hl-row { display: flex; align-items: center; justify-content: center; gap: 14px; }
.hl-card {
  width: 74px; height: 100px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  background: var(--void-2); border: 2px solid var(--edge);
  font-family: "Fraunces", serif; font-weight: 700; font-size: 34px; color: var(--ink);
}
.hl-card.win { border-color: var(--win); box-shadow: var(--glow-win); }
.hl-next { border-style: dashed; }
.hl-vs { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ---------- колесо ---------- */
.wh-seg {
  flex: 0 0 auto;
  width: 62px; height: 50px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 14px;
  background: var(--void); color: var(--muted); border: 1px solid var(--edge);
}
.wh-zero { color: var(--muted); }
.wh-low { background: rgba(226,63,115,.18); color: #ffc9d8; }
.wh-mid { background: rgba(139,92,246,.24); color: #e6dcff; }
.wh-high { background: linear-gradient(180deg, var(--violet), var(--violet-deep)); color: #fff; }

/* ---------- плінко ---------- */
.pk-stage {
  position: relative; height: 230px;
  background: var(--void-2); border: 1px solid var(--edge);
  border-radius: var(--radius-md); overflow: hidden;
}
.pk-peg {
  position: absolute; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px;
  border-radius: 50%; background: rgba(241,234,251,.28);
}
.pk-ball {
  position: absolute; top: 0; left: 50%;
  width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #ffd0f2, var(--win));
  box-shadow: var(--glow-win);
  will-change: transform;
}
.pk-buckets { display: flex; gap: 3px; }
.pk-bucket {
  flex: 1; text-align: center;
  padding: 6px 2px; border-radius: var(--radius-sm);
  font-family: "JetBrains Mono", monospace; font-size: 9.5px; font-weight: 700;
  background: var(--void-2); border: 1px solid var(--edge); color: var(--muted);
}
.pk-bucket.pk-hot { color: var(--win); border-color: rgba(244,95,209,.45); }
.pk-bucket.pk-cold { color: var(--rose); border-color: rgba(226,63,115,.4); }
.pk-bucket.active {
  background: linear-gradient(180deg, var(--violet), var(--violet-deep));
  color: #fff; border-color: var(--violet); box-shadow: var(--glow-violet);
}

/* ======================================================================
   Захист від переповнення на вузьких екранах
   ----------------------------------------------------------------------
   Причина бага «цифри вилазять за круг»: кегль великих числових табло був
   заданий у фіксованих px, а підкладка — теж у фіксованих px. На вузькому
   телефоні (або при збільшеному системному шрифті) число переростало свою
   рамку. Скрізь, де цифра живе в колі чи плашці, кегль тепер рахується від
   ширини екрана через clamp(), а сама підкладка не має права стискатись.
   ====================================================================== */
.wheel-number {
  flex: 0 0 auto;
  width: clamp(64px, 22vw, 84px);
  height: clamp(64px, 22vw, 84px);
  font-size: clamp(21px, 7.4vw, 30px);
  padding: 0 2px;
  line-height: 1;
}
.cr-mult { font-size: clamp(30px, 11vw, 44px); }
.dice-roll { font-size: clamp(28px, 10vw, 40px); }
.balance-value { font-size: clamp(15px, 4.6vw, 18px); }
.mn-stat-value { font-size: clamp(13px, 4vw, 16px); }
.coin { width: clamp(72px, 24vw, 92px); height: clamp(72px, 24vw, 92px); font-size: clamp(30px, 10vw, 40px); flex: 0 0 auto; }
.avatar { flex: 0 0 auto; font-size: clamp(21px, 7vw, 26px); }
/* Кошики плінко: 13 штук у рядок — на вузькому екрані підпис має зменшуватись
   разом із ними, інакше множник вилазить за плашку. */
.pk-bucket { font-size: clamp(7px, 2.3vw, 10px); min-width: 0; overflow: hidden; }

/* ---------- своя сума ставки ---------- */
.chip-custom { font-family: "Manrope", sans-serif; font-weight: 800; letter-spacing: .04em; }
.bet-custom {
  display: flex; align-items: center; gap: 6px;
  margin-top: 8px; width: 100%;
}
.bet-custom input {
  flex: 1 1 auto; min-width: 0;
  background: var(--void-2); border: 1px solid var(--edge); color: var(--ink);
  border-radius: var(--radius-sm); padding: 9px 11px;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 700;
  font-size: 15px; font-variant-numeric: tabular-nums;
}
.bet-custom input:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.bet-custom-apply {
  flex: 0 0 auto;
  border: 1px solid var(--violet); border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--violet), var(--violet-deep));
  color: #fff; font-family: "Manrope", sans-serif; font-weight: 800; font-size: 12px;
  padding: 9px 12px; cursor: pointer;
}
.bet-custom-hint { font-size: 10.5px; color: var(--muted); margin-top: 4px; text-align: center; }
.bet-custom-hint.bad { color: var(--rose); }

/* ---------- limbo ---------- */
.lb-stage {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 132px;
  background: var(--void-2); border: 1px solid var(--edge);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.lb-mult {
  font-family: "JetBrains Mono", monospace; font-weight: 700;
  font-size: clamp(34px, 13vw, 52px); font-variant-numeric: tabular-nums;
  color: var(--ink); text-shadow: 0 0 26px rgba(139,92,246,.45);
  line-height: 1;
}
.lb-mult.win { color: var(--win); text-shadow: 0 0 30px rgba(244,95,209,.6); }
.lb-mult.lose { color: var(--rose); text-shadow: 0 0 26px rgba(226,63,115,.5); }
.lb-mult.rolling { opacity: .8; }
.lb-target-row { display: flex; align-items: center; gap: 8px; }
.lb-target-row input {
  flex: 1 1 auto; min-width: 0;
  background: var(--void-2); border: 1px solid var(--edge); color: var(--ink);
  border-radius: var(--radius-sm); padding: 10px 12px;
  font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 16px;
}
.lb-quick { display: flex; gap: 6px; }
.lb-quick button {
  flex: 1 1 0; min-width: 0;
  background: var(--void-2); border: 1px solid var(--edge); color: var(--muted);
  border-radius: var(--radius-sm); padding: 7px 4px; cursor: pointer;
  font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 12px;
}
.lb-quick button:active { transform: scale(.97); }
/* Обраний множник світиться так само, як обраний чіп ставки: людина має
   бачити ОБИДВА свої вибори однаково, інакше половина екрана
   виглядає активною, а половина — ні. */
.lb-quick button.on {
  background: linear-gradient(180deg, #B693FF, var(--violet-deep));
  border-color: #C9A9FF;
  color: #1B1030;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.42),
    0 0 0 3px rgba(139,92,246,.20),
    0 0 14px rgba(139,92,246,.38);
}

/* ---------- keno ---------- */
.kn-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.kn-cell {
  aspect-ratio: 1; min-width: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--void-2); border: 1px solid var(--edge);
  border-radius: var(--radius-sm);
  color: var(--muted); cursor: pointer;
  font-family: "JetBrains Mono", monospace; font-weight: 700;
  font-size: clamp(9px, 3vw, 13px); font-variant-numeric: tabular-nums;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.kn-cell.picked {
  background: linear-gradient(180deg, var(--violet), var(--violet-deep));
  border-color: var(--violet); color: #fff;
}
.kn-cell.drawn { border-color: var(--muted); color: var(--ink); }
/* Збіг: обране число, яке випало. Спалах робиться зміною масштабу, а не
   тінню, щоб 40 клітинок не перемальовувались щокадру. */
.kn-cell.hit {
  background: linear-gradient(180deg, #ff8ee0, var(--win));
  border-color: var(--win); color: #2a0a22;
  animation: kn-pop .38s cubic-bezier(.2,.9,.3,1.5);
}
@keyframes kn-pop { 0% { transform: scale(1); } 45% { transform: scale(1.22); } 100% { transform: scale(1); } }
.kn-meta { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.kn-pay { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.kn-pay::-webkit-scrollbar { display: none; }
.kn-pay-item {
  flex: 0 0 auto; text-align: center;
  background: var(--void-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 5px 8px;
  font-size: 10.5px; color: var(--muted);
}
.kn-pay-item.on { border-color: var(--win); color: var(--ink); }
.kn-pay-item b { display: block; font-family: "JetBrains Mono", monospace; font-size: 11.5px; color: var(--ink); }

/* ---------- dragon tower ---------- */
.tw-tower { display: flex; flex-direction: column-reverse; gap: 5px; }
.tw-row { display: grid; gap: 5px; }
.tw-row[data-tiles="2"] { grid-template-columns: repeat(2, 1fr); }
.tw-row[data-tiles="3"] { grid-template-columns: repeat(3, 1fr); }
.tw-row[data-tiles="4"] { grid-template-columns: repeat(4, 1fr); }
.tw-tile {
  min-width: 0; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--void-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted); font-size: 15px; cursor: default;
  opacity: .5;
  transition: transform .12s ease, opacity .2s ease, border-color .2s ease, background .2s ease;
}
.tw-row.current .tw-tile { opacity: 1; cursor: pointer; border-color: var(--edge); }
.tw-row.current .tw-tile:active { transform: scale(.96); }
.tw-row.cleared { opacity: .85; }
.tw-tile.safe { background: linear-gradient(180deg, #3fbe8c, var(--green)); border-color: var(--green); color: #06251A; }
.tw-tile.dragon { background: linear-gradient(180deg, #ff7a9c, var(--rose)); border-color: var(--rose); color: #2B0812; }
.tw-tile.bust { animation: tw-shake .4s ease; }
@keyframes tw-shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-5px); } 75% { transform: translateX(5px); }
}
.tw-row-mult {
  font-family: "JetBrains Mono", monospace; font-size: 10.5px; font-weight: 700;
  color: var(--muted); min-width: 42px; text-align: right;
}
.tw-line { display: flex; align-items: center; gap: 7px; }
.tw-line .tw-row { flex: 1 1 auto; }
.tw-modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tw-mode {
  min-width: 0;
  background: var(--void-2); border: 1px solid var(--edge); color: var(--muted);
  border-radius: var(--radius-sm); padding: 7px 2px; cursor: pointer;
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 10.5px;
}
.tw-mode.active {
  background: linear-gradient(180deg, var(--violet), var(--violet-deep));
  border-color: var(--violet); color: #fff;
}

/* ---------- blackjack ---------- */
.bj-felt {
  background: radial-gradient(160px 110px at 50% 0%, rgba(47,158,110,.14), transparent 70%), var(--void-2);
  border: 1px solid var(--edge); border-radius: var(--radius-md);
  padding: 12px 10px; display: flex; flex-direction: column; gap: 10px;
}
.bj-side { display: flex; flex-direction: column; gap: 5px; }
.bj-side-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.bj-total {
  font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 12px;
  color: var(--ink); background: var(--void); border: 1px solid var(--line);
  border-radius: var(--radius-pill); padding: 1px 8px;
}
.bj-hand { display: flex; gap: 5px; flex-wrap: wrap; min-height: 62px; }
.pcard {
  width: 42px; height: 60px; flex: 0 0 auto;
  border-radius: 7px; background: linear-gradient(170deg, #FFFDFB, #E8E0F2);
  color: #1B1526; border: 1px solid #cdbfe0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: "Manrope", sans-serif; font-weight: 800; line-height: 1;
  box-shadow: 0 4px 10px rgba(0,0,0,.4);
  animation: pcard-deal .3s cubic-bezier(.2,.9,.3,1.25) both;
}
@keyframes pcard-deal {
  0% { opacity: 0; transform: translateY(-16px) rotate(-8deg) scale(.9); }
  100% { opacity: 1; transform: none; }
}
.pcard-rank { font-size: 17px; }
.pcard-suit { font-size: 14px; margin-top: 2px; }
.pcard.red { color: #C02348; }
.pcard.back {
  background: repeating-linear-gradient(45deg, var(--violet-deep) 0 5px, var(--violet-dark) 5px 10px);
  border-color: var(--violet);
}
.bj-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
/* min-width: 0 обовʼязковий: елемент сітки за замовчуванням не стискається
   вужче за свій вміст, і без цього три кнопки знову розіпхали б рядок. */
.bj-actions .cta-btn { padding: 12px 6px; font-size: 13px; min-width: 0; }
@media (prefers-reduced-motion: reduce) {
  .pcard, .kn-cell.hit, .tw-tile.bust { animation: none; }
}

/* ---------- реферальна програма ---------- */
.ref-card {
  background: var(--void-2); border: 1px solid var(--edge);
  border-radius: var(--radius-md); padding: 12px; width: 100%;
  display: flex; flex-direction: column; gap: 9px; margin-top: 12px;
}
.ref-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ref-title { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 13px; color: var(--ink); }
.ref-code {
  font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 15px;
  letter-spacing: .12em; color: var(--violet);
  background: var(--void); border: 1px dashed var(--edge);
  border-radius: var(--radius-sm); padding: 7px 10px; text-align: center;
  user-select: all;
}
.ref-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.ref-terms { font-size: 11px; color: var(--muted); line-height: 1.45; text-align: left; }
.ref-copied { font-size: 11px; color: var(--win); text-align: center; min-height: 14px; }

/* Колонкове розкладання ТІЛЬКИ для контейнерів, які малює betChips: під
   чіпами там живе панель «своя сума». Групи чіпів, які гра малює сама
   (наприклад кількість мін у Сапері), лишаються звичайним рядом. */
.bet-chips.has-custom { flex-direction: column; gap: 6px; flex: 1 1 100%; }
.bet-chips-inner { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }

/* ---------- плінко: опції рядів і кульок ---------- */
.pk-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pk-opt { display: flex; flex-direction: column; gap: 5px; align-items: center; }
.pk-seg { display: flex; gap: 4px; width: 100%; }
.pk-seg button {
  flex: 1 1 0; min-width: 0;
  background: var(--void-2); border: 1px solid var(--edge); color: var(--muted);
  border-radius: var(--radius-sm); padding: 7px 2px; cursor: pointer;
  font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 12px;
}
.pk-seg button.on {
  background: linear-gradient(180deg, var(--violet), var(--violet-deep));
  border-color: var(--violet); color: #fff;
}
.pk-seg button:active { transform: scale(.96); }
/* Чіп «…» вужчий за числові: він не число, а перемикач панелі. */
.pk-seg button[data-own] { flex: 0 0 34px; letter-spacing: .06em; }
.pk-own { display: flex; align-items: center; gap: 6px; width: 100%; }
.pk-own input {
  flex: 1 1 auto; min-width: 0;
  background: var(--void-2); border: 1px solid var(--edge); color: var(--ink);
  border-radius: var(--radius-sm); padding: 9px 11px;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 700;
  font-size: 15px; font-variant-numeric: tabular-nums;
}
.pk-own input:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.pk-own-ok {
  flex: 0 0 auto;
  border: 1px solid var(--violet); border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--violet), var(--violet-deep));
  color: #fff; font-family: "Manrope", sans-serif; font-weight: 800; font-size: 12px;
  padding: 9px 12px; cursor: pointer;
}
.pk-own-hint { font-size: 10.5px; color: var(--muted); text-align: center; min-height: 13px; }
.pk-own-hint.bad { color: var(--rose); }
.pk-total { font-size: 11px; color: var(--muted); text-align: center; min-height: 14px; }
/* Кульки живуть у власному шарі: їх може бути кілька одночасно. */
.pk-balls { position: absolute; inset: 0; pointer-events: none; }
.pk-balls .pk-ball { position: absolute; left: 50%; top: 0; }

/* ---------- кістка: справжній кубик ---------- */
.dc-scene {
  display: flex; align-items: center; justify-content: center;
  height: 118px;
  perspective: 620px;
}
.dc-cube {
  position: relative;
  width: 84px; height: 84px;
  transform-style: preserve-3d;
  transform: rotateX(-18deg) rotateY(22deg);
  transition: transform .45s cubic-bezier(.2,.9,.3,1.25);
}
.dc-cube.tumbling { animation: dc-tumble .62s cubic-bezier(.3,.05,.3,1) both; }
.dc-cube.landed { transform: rotateX(-14deg) rotateY(16deg); }
@keyframes dc-tumble {
  0%   { transform: rotateX(-18deg) rotateY(22deg); }
  100% { transform: rotateX(-378deg) rotateY(742deg); }
}
.dc-face {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(160deg, #F6F0FF, #D8CBF0);
  border: 1px solid #b9a6dc;
  box-shadow: inset 0 2px 6px rgba(255,255,255,.7), inset 0 -3px 8px rgba(80,60,120,.25);
  backface-visibility: hidden;
}
/* Крапки на бічних гранях. Розкладка проста: центрована сітка 3×3,
   кожна грань отримує стільки крапок, скільки в неї <i>. */
.dc-face i {
  width: 12px; height: 12px; border-radius: 50%;
  background: #2A1B45; box-shadow: inset 0 1px 2px rgba(0,0,0,.5);
}
.dc-f-back, .dc-f-bottom { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 16px; }
.dc-f-right, .dc-f-left  { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 18px; }
.dc-f-top { place-items: center; }
.dc-f-front  { transform: translateZ(42px); }
.dc-f-back   { transform: rotateY(180deg) translateZ(42px); }
.dc-f-right  { transform: rotateY(90deg) translateZ(42px); }
.dc-f-left   { transform: rotateY(-90deg) translateZ(42px); }
.dc-f-top    { transform: rotateX(90deg) translateZ(42px); }
.dc-f-bottom { transform: rotateX(-90deg) translateZ(42px); }
/* Число живе на передній грані, тому воно темне на світлій кістці. */
.dc-f-front .dice-roll {
  font-size: clamp(17px, 6vw, 22px); color: #2A1B45; padding: 0;
  text-shadow: none;
}
.dc-f-front .dice-roll.win { color: #A6197B; text-shadow: none; }
@media (prefers-reduced-motion: reduce) {
  .dc-cube, .dc-cube.tumbling { animation: none; transition: none; }
}

/* Заголовок гри: та сама іконка, що й на плитці лобі. */
.game-title { display: inline-flex; align-items: center; gap: 6px; }
.game-title-ic { display: inline-flex; color: var(--violet); }
.game-title-ic .gi { width: 16px; height: 16px; }

/* ======================================================================
   Щільність: ігрове поле на весь доступний простір
   ----------------------------------------------------------------------
   Усі ігрові сцени мали фіксовану висоту в px, підібрану під маленький
   екран. На звичайному телефоні через це під полем лишалась порожня
   смуга. Тепер висота рахується від вікна (vh) з нижньою межею — на
   малих екранах усе як було, на великих сцена росте.
   ====================================================================== */
.cr-stage { height: clamp(210px, 34vh, 310px); }
.pk-stage { height: clamp(230px, 37vh, 340px); }
.lb-stage { min-height: clamp(132px, 22vh, 195px); }
.coin-stage { padding: 4px 0; }
.wheel-result { height: clamp(88px, 15vh, 110px); }
.tw-tile { height: clamp(34px, 5.2vh, 46px); font-size: clamp(15px, 4vw, 19px); }
.tw-tower { gap: 4px; }
.tw-row { gap: 4px; }

/* Кубик кістки: розмір і винос граней зав'язані на одну змінну, інакше
   при зміні розміру грані розлітаються (translateZ лишається старим). */
.dc-scene { height: clamp(118px, 21vh, 168px); }
.dc-cube { --cube: clamp(84px, 27vw, 116px); width: var(--cube); height: var(--cube); }
.dc-f-front  { transform: translateZ(calc(var(--cube) / 2)); }
.dc-f-back   { transform: rotateY(180deg) translateZ(calc(var(--cube) / 2)); }
.dc-f-right  { transform: rotateY(90deg)  translateZ(calc(var(--cube) / 2)); }
.dc-f-left   { transform: rotateY(-90deg) translateZ(calc(var(--cube) / 2)); }
.dc-f-top    { transform: rotateX(90deg)  translateZ(calc(var(--cube) / 2)); }
.dc-f-bottom { transform: rotateX(-90deg) translateZ(calc(var(--cube) / 2)); }

/* Карти блекджека: більші, щоб стіл не був смужкою вгорі екрана. */
.pcard { width: clamp(42px, 13vw, 56px); height: clamp(60px, 18.5vw, 80px); }
.pcard-rank { font-size: clamp(17px, 5vw, 22px); }
.pcard-suit { font-size: clamp(14px, 4vw, 18px); }
.bj-hand { min-height: clamp(60px, 18.5vw, 80px); }
.bj-felt { padding: 10px; gap: 8px; }

/* Кено: сітка теж тягнеться, бо клітинки квадратні від ширини колонки. */
.kn-grid { gap: 4px; }

/* ======================================================================
   Слоти: барабан на три ряди
   ----------------------------------------------------------------------
   Вікно показує три символи, як у механічному автоматі: середній — на
   виграшній лінії, верхній і нижній лише визирають і завертаються всередину
   барабана. Загин робиться поворотом по X навколо краю, ближчого до лінії:
   комірка ніби відходить від глядача по циліндру.

   Важливо: загин вішається ЛИШЕ на три комірки у вікні і тільки коли барабан
   стоїть. Якби він був на всіх комірках, під час обертання нахил їхав би
   разом зі стрічкою і замість циліндра вийшла б хвиля.
   ====================================================================== */
.reels { --sym-h: 58px; }
.reel { height: calc(var(--sym-h) * 3); }

/* Глибина барабана: темніше по краях вікна, чисто посередині. */
.reel::after {
  background: linear-gradient(180deg,
    rgba(15,10,26,.97) 0%,
    rgba(15,10,26,.58) 15%,
    rgba(15,10,26,0) 35%,
    rgba(15,10,26,0) 65%,
    rgba(15,10,26,.58) 85%,
    rgba(15,10,26,.97) 100%);
}
/* Корпус: внутрішня тінь згори й знизу читається як металева оправа. */
.reels {
  box-shadow:
    inset 0 3px 12px rgba(0,0,0,.55),
    inset 0 -3px 12px rgba(0,0,0,.55);
}

/* Виграшна лінія через усі три барабани. z-index потрібен, бо ::before
   батька за замовчуванням малюється ПІД його дітьми. */
.reels::before {
  content: "";
  position: absolute;
  left: 5px; right: 5px;
  top: 50%;
  height: var(--sym-h);
  transform: translateY(-50%);
  border-top: 1px solid rgba(244,95,209,.38);
  border-bottom: 1px solid rgba(244,95,209,.38);
  background: linear-gradient(180deg, rgba(244,95,209,.09), rgba(244,95,209,.03));
  pointer-events: none;
  z-index: 2;
}

/* Перехід у загин має тривати стільки ж, скільки гальмує стрічка (~820мс),
   і з тим самим характером — повільно наприкінці. Короткий .28s наростав
   уже на нерухомому барабані, тому читався як окремий різкий рух. */
.sym { transition: transform .8s cubic-bezier(.16,.84,.28,1), opacity .8s cubic-bezier(.16,.84,.28,1); }
/* Поки барабан крутиться, комірки трохи стиснуті по вертикалі — це і є
   «змазування» від швидкості, і водночас загин потім не стартує з нуля. */
.reel-strip.rolling .sym { transform: scaleY(.9); opacity: .82; transition: none; }
.sym-top {
  transform-origin: center bottom;
  transform: perspective(300px) rotateX(46deg);
  opacity: .5;
}
.sym-bot {
  transform-origin: center top;
  transform: perspective(300px) rotateX(-46deg);
  opacity: .5;
}
.sym-mid { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .sym { transition: none; }
}

/* ======================================================================
   Колесо (рулетка й «Колесо»)
   ====================================================================== */
.wheel-wrap { display: flex; justify-content: center; padding: 2px 0; }
.wheel-svg { width: min(100%, 330px); height: auto; display: block; }

/* Обід — металева оправа навколо секторів. */
.wheel-rim {
  fill: none;
  stroke: var(--violet-dark);
  stroke-width: 5;
  filter: drop-shadow(0 0 10px rgba(139,92,246,.45));
}
.wsec { stroke: rgba(8,4,16,.55); stroke-width: .6; }
.wsec-red   { fill: #C82E58; }
.wsec-black { fill: #171223; }
.wsec-green { fill: #2F9E6E; }
.wsec-zero  { fill: #241A3D; }
.wsec-low   { fill: #3B2A63; }
.wsec-mid   { fill: var(--violet-deep); }
.wsec-high  { fill: var(--violet); }

.wlab {
  fill: #F6F0FF;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(8,4,16,.55);
  stroke-width: 1.6px;
}

/* Маточина — вона ж табло результату: число видно великим, тож дрібні
   підписи на секторах не мусять бути читабельними на ходу. */
.wheel-hub {
  fill: var(--void-2);
  stroke: var(--edge);
  stroke-width: 1.5;
}
.wheel-hub-text {
  fill: var(--muted);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700;
  font-size: 19px;
  text-anchor: middle;
}
.wheel-hub-text.hub-red   { fill: #FF6E93; }
.wheel-hub-text.hub-black { fill: #F1EAFB; }
.wheel-hub-text.hub-green { fill: #4FD1A0; }
.wheel-hub-text.hub-high, .wheel-hub-text.hub-mid { fill: #C9A9FF; }
.wheel-hub-text.hub-low   { fill: #FFC454; }
.wheel-hub-text.hub-zero  { fill: var(--muted); }

.wheel-ball {
  fill: #FFFDF8;
  filter: drop-shadow(0 0 4px rgba(255,255,255,.8));
}
.wheel-pointer {
  fill: var(--win);
  filter: drop-shadow(0 0 5px rgba(244,95,209,.8));
}

/* ======================================================================
   Монетка
   ----------------------------------------------------------------------
   Дві грані з backface-visibility:hidden плюс одна площина ребра,
   повернута на 90°. Повного циліндра з нарізаних смуг тут не будую
   навмисно: він видимий лише в момент проходження через ребро, а коштує
   десятків додаткових 3D-шарів, які Android WebView тягне погано.
   ====================================================================== */
.cn-stage {
  position: relative;
  display: flex; align-items: flex-end; justify-content: center;
  height: clamp(150px, 26vh, 210px);
  perspective: 800px;
}
.cn-shadow {
  position: absolute;
  left: 50%; bottom: 10px;
  width: clamp(76px, 25vw, 100px); height: 12px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.75), transparent 72%);
  transform: translateX(-50%);
  opacity: .5;
  pointer-events: none;
}
.cn-toss { will-change: transform; margin-bottom: 16px; }
.cn-coin {
  position: relative;
  width: clamp(84px, 27vw, 112px);
  aspect-ratio: 1;
  transform-style: preserve-3d;
  will-change: transform;
}
.cn-face {
  position: absolute; inset: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  backface-visibility: hidden;
  font-size: clamp(30px, 10vw, 42px);
  font-weight: 800;
  color: #6B4A12;
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
  /* Кільце по краю дає товщину без додаткової геометрії. */
  box-shadow:
    inset 0 0 0 4px rgba(150,106,20,.55),
    inset 0 3px 8px rgba(255,255,255,.55),
    inset 0 -4px 10px rgba(110,74,10,.5),
    0 6px 16px rgba(0,0,0,.45);
}
.cn-heads {
  background: radial-gradient(circle at 34% 28%, #FFE9A8, #E5B23C 58%, #B07C16 100%);
  transform: translateZ(3px);
}
.cn-tails {
  background: radial-gradient(circle at 34% 28%, #E8D9FF, #A98BE8 58%, #6D4FB0 100%);
  color: #33215C;
  transform: rotateX(180deg) translateZ(3px);
}
/* Ребро: одна площина, яку видно рівно тоді, коли монета стоїть боком. */
.cn-edge {
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 6px; margin-top: -3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #8A6110, #F0CE6A 28%, #FFF2C4 50%, #F0CE6A 72%, #8A6110);
  transform: rotateX(90deg);
}
/* Приземлення: коротке присідання, щоб удар відчувався. Живе на власному
   шарі, бо CSS-анімація перебиває інлайновий transform — на самій монеті
   вона стерла б кут повороту й показала б не ту грань. */
.cn-squash { transform-style: preserve-3d; }
.cn-land { animation: cn-squash .26s cubic-bezier(.25,.9,.3,1.3); }
@keyframes cn-squash {
  0%   { transform: scaleY(.82) scaleX(1.06); }
  60%  { transform: scaleY(1.04) scaleX(.98); }
  100% { transform: scaleY(1) scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .cn-land { animation: none; }
}

/* ======================================================================
   Більше-Менше: колода, роздача, переворот
   ====================================================================== */
.hl-row {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(6px, 2.4vw, 14px);
}
/* Колода — три сорочки зі зсувом, щоб було звідки роздавати. */
.hl-deck { position: relative; width: 26px; height: 74px; flex: 0 0 auto; }
.hl-deck i {
  position: absolute; inset: 0;
  border-radius: 6px;
  background: repeating-linear-gradient(45deg, var(--violet-deep) 0 5px, var(--violet-dark) 5px 10px);
  border: 1px solid var(--violet);
  box-shadow: 0 3px 8px rgba(0,0,0,.45);
}
.hl-deck i:nth-child(2) { transform: translate(2px, -2px); }
.hl-deck i:nth-child(3) { transform: translate(4px, -4px); }

.hl-slot { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.hl-cap { font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* Переворот: контейнер крутиться, обидві грані сховані з вивороту. */
.hl-flip {
  position: relative;
  width: clamp(58px, 18vw, 76px);
  height: clamp(82px, 25vw, 106px);
  transform-style: preserve-3d;
  transition: transform .42s cubic-bezier(.3,.8,.35,1.05);
}
.hl-flip.flipped { transform: rotateY(180deg); }
.hl-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border-radius: 8px;
  display: grid; place-items: center;
}
.hl-back {
  background: repeating-linear-gradient(45deg, var(--violet-deep) 0 6px, var(--violet-dark) 6px 12px);
  border: 1px solid var(--violet);
  box-shadow: 0 4px 10px rgba(0,0,0,.45);
}
.hl-front { transform: rotateY(180deg); }
/* Карта всередині слота тягнеться на весь слот — спільний вигляд із блекджеком. */
.hl-front .pcard { width: 100%; height: 100%; animation: none; }
.hl-flip.won .hl-front .pcard {
  box-shadow: 0 0 0 2px var(--win), 0 4px 12px rgba(0,0,0,.45), var(--glow-win);
}

/* Роздача: карта виїжджає з боку колоди. */
.hl-flip.dealing { animation: hl-deal .3s cubic-bezier(.2,.9,.3,1.1) both; }
@keyframes hl-deal {
  0%   { opacity: 0; transform: translate(-46px, -10px) rotate(-14deg) scale(.86); }
  100% { opacity: 1; transform: none; }
}
/* Коли карта вже перевернута, анімація роздачі не має скидати поворот. */
.hl-flip.dealing.flipped { animation: none; }
.hl-vs { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .hl-flip { transition: none; }
  .hl-flip.dealing { animation: none; }
}

/* ======================================================================
   Іконки замість емодзі
   ----------------------------------------------------------------------
   Емодзі малює операційна система: вони різні на iOS, Android і десктопі,
   ігнорують палітру застосунку і не підхоплюють колір активного стану.
   Інтерфейсні іконки — штрихові в currentColor, символи барабанів —
   кольорові, бо це головне видовище гри.
   ====================================================================== */
.gi { display: block; width: 100%; height: 100%; }
.gsym { display: block; width: 100%; height: 100%; }

/* --- нижня навігація --- */
.navbtn .ic {
  width: 22px; height: 22px;
  display: block;
  color: var(--muted);
  opacity: 1; filter: none;
  transition: color .15s ease;
}
.navbtn.active .ic { color: var(--violet); }
.play-fab { padding: 0; }
/* Зсув більше не потрібен: трикутник відцентровано в самій іконці. */
.play-fab .gi { width: 20px; height: 20px; }

/* --- баланс --- */
.balance-coin { width: 13px; height: 13px; display: inline-block; }

/* --- профіль і гаманець --- */
.play-btn-ic { width: 15px; height: 15px; display: inline-block; }
.wallet-tile-ic { width: 21px; height: 21px; display: block; flex: 0 0 auto; color: var(--violet); }
.m-ic { width: 18px; height: 18px; display: block; color: var(--violet); }
.method-tile.active .m-ic { color: var(--ink); }
.success-mark .gi { width: 30px; height: 30px; }
.success-mark { color: #2a0a22; }

/* --- чіп «своя сума» --- */
.chip-custom { gap: 5px; }
.chip-custom .gi { width: 13px; height: 13px; }

/* --- crash: ракета --- */
.cr-rocket { width: 30px; height: 30px; font-size: 0; color: #FFD9F2; }
.cr-mult .gi {
  width: .8em; height: .8em; display: inline-block;
  vertical-align: -.06em; color: var(--rose);
}

/* --- сапер: діамант і бомба --- */
.mcell-face { width: 58%; height: 58%; margin: 0 auto; color: var(--ink); }
.mcell.safe .mcell-face { color: #7BE6FF; }
/* Клітинка з міною — .mine-shown; підірвана — .boom, у неї рожевий фон,
   тож бомба на ній має бути темною, інакше зливається. */
.mcell.mine-shown .mcell-face { color: #FF6E93; }
.mcell.boom .mcell-face { color: #2B0812; }

/* --- слоти: символи --- */
.sym { font-size: 0; padding: 12%; }
.sym .gsym { filter: drop-shadow(0 2px 4px rgba(0,0,0,.55)); }
.pt-sym { display: flex; align-items: center; gap: 3px; }
.pt-sym .gsym { width: 19px; height: 19px; }
.pt-any { font-size: 12px; color: var(--muted); margin-left: 4px; }

/* ======================================================================
   Оздоблення ігрового екрана
   ----------------------------------------------------------------------
   Одна логіка на всі поверхні: світло падає згори. Звідси тонкий світлий
   рядок по верхньому краю кожної панелі (inset 0 1px 0) і темний по
   нижньому — саме ця пара робить площину об'ємною, а не плоскою заливкою.
   ====================================================================== */

/* --- картка гри --- */
.game {
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0) 20%),
    radial-gradient(130% 55% at 50% -8%, rgba(139,92,246,.17), transparent 62%),
    var(--panel);
  border-color: rgba(139,92,246,.26);
}

/* --- шапка гри: відбивка від поля --- */
.game-top {
  margin-bottom: 0;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(139,92,246,.16);
}
.game-title { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 12.5px;
  letter-spacing: .04em; color: var(--ink); }
.game-title-ic .gi { width: 17px; height: 17px; }

/* Кнопка «назад» — тепер справжня кнопка, а не текст у порожнечі. */
.back-link {
  padding: 5px 11px 5px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--void-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.back-link:active { transform: scale(.96); }

/* --- головна кнопка --- */
.spin-btn, .cta-btn {
  background: linear-gradient(180deg, #A681FF, var(--violet) 46%, var(--violet-deep));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.34),
    inset 0 -2px 0 rgba(0,0,0,.22),
    0 8px 20px rgba(109,40,217,.40),
    0 0 18px rgba(139,92,246,.26);
}
.spin-btn:not(:disabled):active, .cta-btn:not(:disabled):active {
  transform: scale(.975);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.32), 0 3px 10px rgba(109,40,217,.32);
}
/* Вимкнена кнопка — власна приглушена палітра, а не напівпрозора яскрава:
   прозорість просвічувала фон і кнопка виглядала брудною, а не спокійною. */
.spin-btn:disabled, .cta-btn:disabled {
  opacity: 1;
  background: linear-gradient(180deg, #3A2F58, #281F40);
  color: rgba(241,234,251,.42);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

/* --- кнопки вибору --- */
.rbet {
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,0)), var(--void-2);
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.rbet.rbet-selected {
  outline: none;
  border-color: var(--violet);
  background: linear-gradient(180deg, rgba(139,92,246,.30), rgba(109,40,217,.16));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 0 14px rgba(139,92,246,.30);
}

/* --- чіпи ставки --- */
.chip {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #2F2253, #1E1636);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 2px 6px rgba(0,0,0,.35);
}
.chip.chip-active {
  background: linear-gradient(180deg, #B693FF, var(--violet-deep));
  border-color: #C9A9FF;
  color: #1B1030;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.42),
    0 0 0 3px rgba(139,92,246,.20),
    0 0 14px rgba(139,92,246,.38);
}

/* --- табло показників --- */
.mn-stat {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0)), var(--void-2);
  border-color: var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.mn-stat-label { font-size: 9.5px; letter-spacing: .12em; }

/* --- рядок результату: постійна смуга статусу --- */
.result-line {
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.028);
  font-size: 13px;
  min-height: 0;
}
.result-line.win {
  color: var(--win);
  border-color: rgba(244,95,209,.42);
  background: rgba(244,95,209,.10);
  text-shadow: none;
}

/* --- таблиця виплат: власна стрілка замість системного маркера --- */
.paytable summary {
  list-style: none;
  display: flex; align-items: center; gap: 7px;
  padding: 7px 0;
  font-size: 12.5px;
}
.paytable summary::-webkit-details-marker { display: none; }
/* Куточок із двох меж повертається на 45° при розкритті — це та сама
   стрілка, але намальована нами, а не системою. */
.paytable summary::before {
  content: "";
  width: 6px; height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .2s ease;
  flex: 0 0 auto;
}
.paytable[open] summary::before { transform: rotate(45deg) translate(-1px, -1px); }

/* Іконки в лобі більші. Стеля 46px і 12.5vw узгоджені з шириною плитки:
   при чотирьох колонках на екрані 360px плитка виходить ~69px, тож значок
   із відступами лишається всередині й не впирається в рамку. */
.lobby-tile-ic { width: clamp(36px, 12.5vw, 46px); }
/* Малюнок усередині підкладки: 78% — помітно більший, але рамка ще
   лишається видимою як окрема форма, а не як обвідка впритул. */
.lobby-tile-ic .gi { width: 78%; height: 78%; }
.lobby-tile { padding: 9px 4px; gap: 7px; }

/* ======================================================================
   Кубики
   ----------------------------------------------------------------------
   Справжній куб із шістьма гранями. Протилежні грані дають у сумі 7, як на
   звичайному кубику, тож під час обертання він не виглядає підробкою.
   Дивимось трохи згори (perspective-origin), щоб було видно верхнє ребро —
   інакше куб, повернутий гранню просто на глядача, читається як квадрат.
   ====================================================================== */
.d3-row { display: flex; justify-content: center; gap: clamp(14px, 6vw, 28px); padding: 6px 0 2px; }
.d3-scene { perspective: 640px; perspective-origin: 50% 24%; }
.d3-cube {
  --die: clamp(62px, 21vw, 88px);
  position: relative;
  width: var(--die); height: var(--die);
  transform-style: preserve-3d;
  will-change: transform;
}
.d3-face {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  padding: 12%;
  border-radius: 15%;
  background: linear-gradient(158deg, #FBF7FF, #D9CCF0);
  border: 1px solid #b3a0d6;
  box-shadow:
    inset 0 2px 7px rgba(255,255,255,.8),
    inset 0 -3px 9px rgba(78,58,118,.3);
  backface-visibility: hidden;
}
.d3-face i {
  grid-row: var(--r); grid-column: var(--c);
  width: 72%; aspect-ratio: 1; border-radius: 50%;
  align-self: center; justify-self: center;
  background: radial-gradient(circle at 34% 30%, #543C7C, #22132F);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.55);
}
.d3-front  { transform: translateZ(calc(var(--die) / 2)); }
.d3-back   { transform: rotateY(180deg) translateZ(calc(var(--die) / 2)); }
.d3-right  { transform: rotateY(90deg)  translateZ(calc(var(--die) / 2)); }
.d3-left   { transform: rotateY(-90deg) translateZ(calc(var(--die) / 2)); }
.d3-top    { transform: rotateX(90deg)  translateZ(calc(var(--die) / 2)); }
.d3-bottom { transform: rotateX(-90deg) translateZ(calc(var(--die) / 2)); }

.d3-total {
  text-align: center;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700; font-size: clamp(14px, 4.4vw, 17px);
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.d3-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.d3-target { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.d3-target-label { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.d3-target-row { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
.d3-t {
  min-width: 32px; padding: 7px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,0)), var(--void-2);
  color: var(--muted); cursor: pointer;
  font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 13px;
}
.d3-t.on {
  background: linear-gradient(180deg, #B693FF, var(--violet-deep));
  border-color: #C9A9FF; color: #1B1030;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 0 12px rgba(139,92,246,.35);
}
.d3-t:active { transform: scale(.95); }
@media (prefers-reduced-motion: reduce) {
  .d3-cube { transition: none !important; }
}

/* ======================================================================
   Нові ігри
   ====================================================================== */

/* --- картковий стіл (Дракон і Тигр, Війна, Баккара, Червоне-Чорне) --- */
.cd-table {
  display: flex; justify-content: space-around; gap: 10px;
  background: radial-gradient(160px 110px at 50% 0%, rgba(47,158,110,.13), transparent 70%), var(--void-2);
  border: 1px solid var(--edge); border-radius: var(--radius-md);
  padding: 12px 10px;
}
.cd-seat { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cd-seat-label {
  font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 5px;
}
.cd-total { font-family: "JetBrains Mono", monospace; color: var(--ink); font-size: 11.5px; }
.cd-cards { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; min-height: 60px; }
.cd-sides { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 7px; }
.cd-pay {
  display: block; margin-top: 3px;
  font-family: "JetBrains Mono", monospace; font-size: 10.5px; font-weight: 700;
  color: var(--muted);
}
.rbet-selected .cd-pay { color: var(--ink); }

/* --- Андар Бахар: джокер зверху, дві доріжки під ним --- */
.cd-andar {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--void-2); border: 1px solid var(--edge);
  border-radius: var(--radius-md); padding: 10px;
}
.cd-joker { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.cd-lane { display: flex; flex-direction: column; gap: 4px; }
.cd-lane .cd-cards {
  min-height: 52px; justify-content: flex-start;
  overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none;
}
.cd-lane .cd-cards::-webkit-scrollbar { display: none; }
.cd-lane .pcard { width: 34px; height: 48px; }
.cd-lane .pcard-rank { font-size: 13px; }
.cd-lane .pcard-suit { font-size: 11px; }

/* --- миттєві ігри: спільна сітка --- */
.in-grid { display: grid; gap: 6px; }
.in-grid-6 { grid-template-columns: repeat(3, 1fr); }
/* Дванадцять полів: чотири колонки на три ряди. */
.in-grid-12 { grid-template-columns: repeat(4, 1fr); gap: 5px; }
.in-grid-12 .in-cell { padding: 12%; }
.in-cell {
  position: relative; aspect-ratio: 1;
  display: grid; place-items: center; padding: 14%;
  background: var(--void-2); border: 1px solid var(--edge);
  border-radius: var(--radius-sm); overflow: hidden;
}
.in-cover {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, var(--violet-deep) 0 6px, var(--violet-dark) 6px 12px);
}
.in-cell.open .in-cover { display: none; }
.in-cell.hit {
  border-color: var(--win);
  box-shadow: inset 0 0 0 1px var(--win), 0 0 12px rgba(244,95,209,.35);
}
.in-cell .gsym { width: 100%; height: 100%; }

.in-gems { display: flex; justify-content: center; gap: 8px; padding: 8px 0; }
.in-gem {
  width: clamp(38px, 13vw, 52px); aspect-ratio: 1;
  border-radius: 22%;
  background: var(--void-2); border: 1px solid var(--edge);
  transform: rotate(45deg) scale(.86);
  transition: transform .2s ease, box-shadow .2s ease;
}
.in-gem.on { transform: rotate(45deg) scale(1); }
.in-gem.hit { box-shadow: 0 0 0 2px var(--win), 0 0 14px rgba(244,95,209,.45); }
.in-gem.g0 { background: linear-gradient(150deg, #FF9BB5, #C82E58); }
.in-gem.g1 { background: linear-gradient(150deg, #FFD98A, #E0A800); }
.in-gem.g2 { background: linear-gradient(150deg, #9BE6C0, #2F9E6E); }
.in-gem.g3 { background: linear-gradient(150deg, #9FD8FF, #2C8FD6); }
.in-gem.g4 { background: linear-gradient(150deg, #C9A9FF, #6D28D9); }
.in-gem.g5 { background: linear-gradient(150deg, #FFB48A, #D2642A); }
.in-gem.g6 { background: linear-gradient(150deg, #E8E2F2, #8C82A6); }

.in-duel { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 6px 0; }
.in-duel-side { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.in-mark {
  width: clamp(58px, 19vw, 76px); aspect-ratio: 1;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  background: var(--void-2); border: 1px solid var(--edge);
  font-size: clamp(26px, 9vw, 34px); color: var(--ink);
}
.in-vs { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.in-three { grid-template-columns: repeat(3, 1fr); }

/* --- пенальті --- */
.pn-goal {
  position: relative;
  display: flex; gap: 4px;
  height: clamp(96px, 17vh, 130px);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 10px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 10px),
    var(--void-2);
  border: 2px solid rgba(241,234,251,.45);
  border-bottom-width: 3px;
  border-radius: 6px; padding: 5px;
}
.pn-zone {
  flex: 1; min-width: 0;
  border: 1px dashed var(--line); border-radius: var(--radius-sm);
  background: transparent; cursor: pointer;
}
.pn-zone.on { border-style: solid; border-color: var(--violet); background: rgba(139,92,246,.16); }
.pn-zone.saved { border-color: var(--rose); background: rgba(226,63,115,.22); }
.pn-zone.goal { border-color: var(--win); background: rgba(244,95,209,.24); }
/* Воротар — силует, а не заливка.
   Раніше тут стояв оранжевий прямокутник із заокругленнями: за ним не
   читалось ані що це людина, ані в який бік вона кинулась. */
.pn-keeper {
  position: absolute; bottom: 4px; left: 50%;
  width: 30px; height: 40px; margin-left: -15px;
  color: #FFC454;
  filter: drop-shadow(0 0 6px rgba(255,196,84,.45));
  transition: left .34s cubic-bezier(.3,.8,.35,1.1), transform .34s ease;
}
.pn-keeper .gi { width: 100%; height: 100%; }
/* Кидок: тіло нахиляється, руки розлітаються ширше — напрямок видно одразу. */
.pn-keeper.dive { transform: rotate(-16deg) scale(1.08); }
.pn-keeper .pn-arm { transition: transform .28s ease; transform-box: view-box; }
.pn-keeper.dive .pn-arm-l { transform: rotate(-16deg); transform-origin: 12px 12.4px; }
.pn-keeper.dive .pn-arm-r { transform: rotate(16deg); transform-origin: 12px 12.4px; }

/* --- кейси --- */
.cs-track {
  position: relative; overflow: hidden;
  height: 70px; border-radius: var(--radius-md);
  background: var(--void-2); border: 1px solid var(--edge);
}
.cs-strip { display: flex; gap: 6px; padding: 8px 0; will-change: transform; }
.cs-tile {
  flex: 0 0 auto; width: 78px; height: 54px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #2F2253, #1E1636);
  border: 1px solid var(--line); color: var(--muted);
  font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 14px;
}
.cs-tile.cs-hot { color: var(--win); border-color: rgba(244,95,209,.5); }
.cs-tile.cs-cold { color: var(--rose); }
.cs-pointer {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px;
  background: var(--win); box-shadow: 0 0 10px rgba(244,95,209,.85); z-index: 2;
}

/* --- скарби --- */
.tr-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tr-box {
  aspect-ratio: 1; min-width: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--edge);
  background: linear-gradient(180deg, #2F2253, #1E1636);
  color: var(--ink); cursor: pointer;
  font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 12.5px;
}
.tr-box.on { border-color: var(--violet); box-shadow: inset 0 0 0 1px var(--violet); }
.tr-box.open {
  background: linear-gradient(180deg, rgba(139,92,246,.30), rgba(109,40,217,.16));
  border-color: var(--violet);
}
.tr-box:active { transform: scale(.95); }

/* --- пласкі кубики (Сік Бо, Покер-кості) --- */
.dface-row { display: flex; justify-content: center; gap: 7px; flex-wrap: wrap; padding: 6px 0; }
/* Грань кубика — SVG.
   Раніше крапки були порожніми <i> у сітці CSS, а місце їм задавали
   grid-row: var(--r) разом із відсотковою шириною й aspect-ratio. Усе це
   мало збігтися одночасно, і на пристрої не збігалось — кубики виходили
   порожніми білими квадратами. Тепер координати крапок задані числами
   всередині viewBox і не залежать ні від сітки, ні від відсотків. */
.dface {
  display: block;
  width: clamp(44px, 14vw, 58px);
  filter: drop-shadow(0 3px 6px rgba(10,6,20,.45));
}
.dface svg { display: block; width: 100%; height: auto; }
.dface-body {
  fill: #F4EFFC;
  stroke: #b3a0d6;
  stroke-width: 0.9;
}
.dface-pip { fill: #32204F; }

/* Кидок: кубик дрібно трясеться, доки міняються грані. */
.dface.rolling { animation: dface-shake .16s linear infinite; }
@keyframes dface-shake {
  0%   { transform: translate(0, 0) rotate(0deg); }
  25%  { transform: translate(-1px, -1.5px) rotate(-7deg); }
  50%  { transform: translate(1px, 1px) rotate(6deg); }
  75%  { transform: translate(-1px, 1px) rotate(-3deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}
/* Приземлення: коротке присідання на фінальній грані. */
.dface.landed { animation: dface-land .42s cubic-bezier(.2,.9,.3,1.3); }
@keyframes dface-land {
  0%   { transform: scale(1.18) translateY(-3px); }
  55%  { transform: scale(.94) translateY(0); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .dface.rolling, .dface.landed { animation: none; }
}

/* --- Сік Бо: варіанти ставки --- */
.sb-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.sb-options-num { grid-template-columns: repeat(3, 1fr); }
.sb-kinds { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sb-opt {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 6px; min-width: 0;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,0)), var(--void-2);
  color: var(--ink); cursor: pointer;
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 12px;
}
.sb-opt b { font-family: "JetBrains Mono", monospace; font-size: 10.5px; color: var(--muted); font-weight: 700; }
.sb-opt.on {
  border-color: var(--violet);
  background: linear-gradient(180deg, rgba(139,92,246,.30), rgba(109,40,217,.16));
}
.sb-opt.on b { color: var(--ink); }

/* --- Покер-кості: таблиця виплат --- */
.pd-table { display: flex; flex-direction: column; gap: 3px; }
.pd-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center;
  padding: 5px 9px; border-radius: var(--radius-sm);
  border: 1px solid transparent; font-size: 12px; color: var(--muted);
}
.pd-row b { font-family: "JetBrains Mono", monospace; color: var(--ink); font-size: 12px; }
.pd-row i { font-style: normal; font-size: 10.5px; opacity: .8; min-width: 44px; text-align: right; }
.pd-row.on { border-color: var(--win); background: rgba(244,95,209,.10); color: var(--ink); }

/* --- п'ять барабанів --- */
.reels[data-reels="5"] { grid-template-columns: repeat(5, 1fr); gap: 5px; padding: 8px 5px; }
.reels[data-reels="3"] { grid-template-columns: repeat(3, 1fr); }

/* --- смужка різновидів під шапкою гри --- */
.variant-bar {
  display: flex; gap: 6px;
  overflow-x: auto; scrollbar-width: none;
  padding-bottom: 1px;
}
.variant-bar::-webkit-scrollbar { display: none; }
.variant-bar .tw-mode { flex: 1 1 0; min-width: 84px; white-space: nowrap; }

/* Мітка «у грі кілька різновидів» — щоб не шукати їх навмання. */
.lobby-tile-modes {
  position: relative;
  font-family: "Manrope", sans-serif; font-weight: 700;
  font-size: 7.5px; letter-spacing: .04em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 1px 5px;
  margin-top: -2px;
}

/* ======================================================================
   Лобі на дві колонки
   ----------------------------------------------------------------------
   Плитка стала вдвічі ширшою, тож усе всередині масштабується разом із нею:
   значок, підкладка й підпис рахуються від ширини екрана, а не фіксовані.
   Стелі підібрані так, щоб на широкому екрані плитка не перетворювалась на
   порожнє поле з маленькою іконкою посередині.
   ====================================================================== */
.lobby-tile { padding: 7px 6px; gap: 6px; border-radius: var(--radius-lg); }
/* Плитка (зовнішня рамка) лишається того самого розміру — росте тільки те,
   що всередині: значок, назва й підпис. Відступи й проміжки стиснуті до
   мінімуму саме заради цього.

   Стеля 104px не випадкова: плитка квадратна, тож уся колонка вмісту
   мусить вкластися в її ВИСОТУ. При 104px стовпчик виходить приблизно
   161px проти 168px плитки на екрані 390 — із запасом, але без порожнечі. */
.lobby-tile-ic {
  width: clamp(72px, 26vw, 104px);
  border-radius: var(--radius-md);
  overflow: visible;
  border-color: rgba(139,92,246,.22);
}
.lobby-tile-ic .gi { width: 106%; height: 106%; }
.lobby-tile-name { font-size: clamp(14px, 4.4vw, 17px); line-height: 1.15; }
.lobby-tile-modes { font-size: 9.5px; padding: 2px 8px; margin-top: -1px; }
.lobby-tile-new::after { font-size: 9px; padding: 3px 6px; top: 8px; right: 8px; }
/* Ореол під іконкою росте разом із плиткою. */
.lobby-tile::before {
  background: radial-gradient(180px 140px at 50% 16%, var(--tint, rgba(139,92,246,.22)), transparent 70%);
}
.lobby-cat { padding: 8px 16px; font-size: 12.5px; }

/* ======================================================================
   Живі логотипи в лобі
   ----------------------------------------------------------------------
   Кожна плитка має свою зациклену анімацію, щоб стрічка не була мертвою,
   поки людина гортає й обирає.

   Два правила, без яких це стало б гальмом:
   1. Рухаються ТІЛЬКИ transform і opacity — жодних змін геометрії, інакше
      двадцять п'ять плиток щокадру перераховували б розкладку.
   2. Анімація вмикається лише на плитках у полі зору (клас .in-view його
      ставить IntersectionObserver). Двадцять п'ять одночасних циклів на
      слабкому телефоні — це помітне тепло й розряд, а видно з них шість.

   Для елементів усередині SVG обов'язковий transform-box: view-box —
   інакше обертання рахується навколо власної рамки фігури, а не навколо
   центра значка, і деталі розлітаються.
   ====================================================================== */
.lobby-tile .gi * { transform-box: view-box; }

/* --- рулетка й колесо: розгін, сповільнення, зупинка ---
   Раніше тут було рівномірне обертання по колу без початку й кінця. Саме
   рівномірність і читалась як «просто крутиться»: у справжній грі колесо
   розганяється, уповільнюється і ЗУПИНЯЄТЬСЯ на числі — і цікаве саме
   сповільнення. Сповільнення закладене в самі проценти кадрів: за першу
   половину циклу колесо проходить більшу частину обертів, далі крок різко
   меншає, наприкінці воно завмирає й тримає паузу перед новим заходом. */
.lobby-tile.in-view .a-rotor {
  transform-origin: 12px 12px;
  animation: a-wheelspin 4.6s cubic-bezier(.16,.72,.24,1) infinite;
}
/* Кулька йде НАЗУСТРІЧ колесу, як на справжньому столі, і наприкінці падає
   всередину: зменшення масштабу підтягує її від обода до центра. */
.lobby-tile.in-view .a-orbit {
  transform-origin: 12px 12px;
  animation: a-ballsettle 4.6s cubic-bezier(.16,.72,.24,1) infinite;
}
@keyframes a-wheelspin {
  0%   { transform: rotate(0deg); }
  46%  { transform: rotate(486deg); }
  72%  { transform: rotate(640deg); }
  88%  { transform: rotate(694deg); }
  96%  { transform: rotate(706deg); }
  100% { transform: rotate(708deg); }
}
@keyframes a-ballsettle {
  0%   { transform: rotate(0deg) scale(1); }
  46%  { transform: rotate(-560deg) scale(1); }
  72%  { transform: rotate(-742deg) scale(.98); }
  86%  { transform: rotate(-800deg) scale(.82); }
  94%  { transform: rotate(-818deg) scale(.7); }
  100% { transform: rotate(-822deg) scale(.7); }
}

/* --- Більше-Менше: стрілки ходять по черзі --- */
.lobby-tile.in-view .a-hi { transform-origin: 18.6px 7.5px; animation: a-updown 2.6s ease-in-out infinite; }
.lobby-tile.in-view .a-lo { transform-origin: 18.6px 16.5px; animation: a-updown 2.6s ease-in-out infinite 1.3s; }
@keyframes a-updown {
  0%, 70%, 100% { transform: translateY(0); opacity: .55; }
  20%, 45%      { transform: translateY(-1.6px); opacity: 1; }
}

/* --- Блекджек: карта заходить у роздачу --- */
.lobby-tile.in-view .a-deal-in {
  transform-origin: 7px 13px;
  animation: a-dealin 3.2s cubic-bezier(.2,.8,.3,1) infinite;
}
@keyframes a-dealin {
  0%       { transform: translate(6px, 3px) rotate(14deg); opacity: 0; }
  22%, 88% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100%     { transform: translate(0, 0) rotate(0deg); opacity: 1; }
}

/* --- Баккара: карти відкриваються по черзі (звуження по ширині = переворот) --- */
.lobby-tile.in-view .a-flipL { transform-origin: 7.3px 12px; animation: a-flip 3.4s ease-in-out infinite; }
.lobby-tile.in-view .a-flipR { transform-origin: 16.7px 12px; animation: a-flip 3.4s ease-in-out infinite .5s; }
@keyframes a-flip {
  0%, 62%, 100% { transform: scaleX(1); }
  28%           { transform: scaleX(.12); }
}

/* --- Дракон і Тигр: сторони наступають по черзі --- */
.lobby-tile.in-view .a-sideL { animation: a-lunge 2.8s ease-in-out infinite; }
.lobby-tile.in-view .a-sideR { animation: a-lunge-back 2.8s ease-in-out infinite 1.4s; }
@keyframes a-lunge {
  0%, 60%, 100% { transform: translateX(0); opacity: .6; }
  25%           { transform: translateX(2.4px); opacity: 1; }
}
@keyframes a-lunge-back {
  0%, 60%, 100% { transform: translateX(0); opacity: .6; }
  25%           { transform: translateX(-2.4px); opacity: 1; }
}

/* --- Війна: клинок б'є вниз --- */
.lobby-tile.in-view .a-blade {
  transform-origin: 12px 4px;
  animation: a-strike 2.9s cubic-bezier(.3,.9,.3,1) infinite;
}
@keyframes a-strike {
  0%, 55%, 100% { transform: rotate(0deg); }
  12%           { transform: rotate(-7deg); }
  26%           { transform: rotate(5deg); }
  38%           { transform: rotate(-2deg); }
}

/* --- Червоне-Чорне: карти хитаються поперемінно --- */
.lobby-tile.in-view .a-tiltL { transform-origin: 7px 18px; animation: a-tilt 3s ease-in-out infinite; }
.lobby-tile.in-view .a-tiltR { transform-origin: 17px 18px; animation: a-tilt 3s ease-in-out infinite 1.5s; }
@keyframes a-tilt {
  0%, 55%, 100% { transform: rotate(0deg) translateY(0); }
  25%           { transform: rotate(-5deg) translateY(-1.2px); }
}

/* --- Андар Бахар: карта згори лягає то ліворуч, то праворуч --- */
.lobby-tile.in-view .a-drop {
  transform-origin: 12px 7px;
  animation: a-dealsides 4s cubic-bezier(.3,.7,.3,1) infinite;
}
@keyframes a-dealsides {
  0%        { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  18%       { transform: translate(-4.4px, 7px) rotate(-16deg); opacity: 0; }
  20%, 50%  { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  68%       { transform: translate(4.4px, 7px) rotate(16deg); opacity: 0; }
  70%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
}

/* --- кубики: Сік Бо торохтить, Покер-кості підстрибують ---
   Обидві гри малюються тими самими класами .a-d1/.a-d2/.a-d3, тому правила
   РОЗВЕДЕНІ за класом плитки. Без цього вони перекривали б одне одного, і
   кубики оберталися б навколо чужих центрів: координати в іконках різні. */
.lobby-tile-sicbo.in-view .a-d1 { transform-origin: 6.4px 12.6px; animation: a-rattle3 1.5s ease-in-out infinite; }
.lobby-tile-sicbo.in-view .a-d2 { transform-origin: 17.6px 12.6px; animation: a-rattle3 1.5s ease-in-out infinite .18s; }
.lobby-tile-sicbo.in-view .a-d3 { transform-origin: 12px 7px; animation: a-rattle3 1.5s ease-in-out infinite .36s; }
@keyframes a-rattle3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  20%      { transform: translate(-.5px, -1px) rotate(-7deg); }
  45%      { transform: translate(.6px, .4px) rotate(6deg); }
  70%      { transform: translate(-.3px, -.4px) rotate(-3deg); }
}

/* Хвиля: кубики злітають один за одним зліва направо. */
.lobby-tile-pokerdice.in-view .a-d1 { transform-origin: 6.1px 12.9px; animation: a-hop 1.9s ease-in-out infinite; }
.lobby-tile-pokerdice.in-view .a-d2 { transform-origin: 12.7px 10.1px; animation: a-hop 1.9s ease-in-out infinite .13s; }
.lobby-tile-pokerdice.in-view .a-d3 { transform-origin: 18.6px 12.9px; animation: a-hop 1.9s ease-in-out infinite .26s; }
@keyframes a-hop {
  0%, 58%, 100% { transform: translateY(0) rotate(0deg); }
  22%           { transform: translateY(-2.2px) rotate(-8deg); }
  40%           { transform: translateY(0) rotate(3deg); }
}

/* --- слоти: смуги біжать, ручка смикається --- */
.lobby-tile.in-view .a-reel { transform-origin: 12px 12px; }
.lobby-tile.in-view .a-reel1 { animation: a-roll 1.1s linear infinite; }
.lobby-tile.in-view .a-reel2 { animation: a-roll 1.1s linear infinite .16s; }
.lobby-tile.in-view .a-reel3 { animation: a-roll 1.1s linear infinite .32s; }
@keyframes a-roll {
  0%   { transform: translateY(-2.2px) scaleY(.55); opacity: .35; }
  45%  { transform: translateY(0) scaleY(1); opacity: 1; }
  100% { transform: translateY(2.2px) scaleY(.55); opacity: .35; }
}
.lobby-tile.in-view .a-knob {
  transform-origin: 21px 12px;
  animation: a-lever 3.2s ease-in-out infinite;
}
@keyframes a-lever {
  0%, 62%, 100% { transform: translateY(0); }
  72%           { transform: translateY(5px); }
  86%           { transform: translateY(0); }
}

/* --- crash: ракета підстрибує, сопло тремтить --- */
.lobby-tile.in-view .a-rocket {
  transform-origin: 12px 12px;
  animation: a-bob 2.4s ease-in-out infinite;
}
@keyframes a-bob {
  0%, 100% { transform: translateY(1px); }
  50%      { transform: translateY(-1.6px); }
}
.lobby-tile.in-view .a-flame {
  transform-origin: 12px 17.4px;
  animation: a-flame .38s steps(2, end) infinite;
}
@keyframes a-flame {
  0%   { transform: scaleY(.55); opacity: .45; }
  100% { transform: scaleY(1.15); opacity: 1; }
}

/* --- сапер: іскра на гноті --- */
.lobby-tile.in-view .a-spark {
  transform-origin: 18.8px 5.2px;
  animation: a-spark 1.5s ease-in-out infinite;
}
@keyframes a-spark {
  0%, 100% { transform: scale(.8); opacity: .45; }
  40%      { transform: scale(1.25); opacity: 1; }
}

/* --- кено: крапки загоряються по черзі --- */
.lobby-tile.in-view .a-dot { animation: a-blink 2.1s ease-in-out infinite; }
.lobby-tile.in-view .a-dot2 { animation-delay: .35s; }
.lobby-tile.in-view .a-dot3 { animation-delay: .7s; }
@keyframes a-blink {
  0%, 55%, 100% { opacity: .3; }
  22%           { opacity: 1; }
}

/* --- плінко: кулька падає крізь кілочки --- */
.lobby-tile.in-view .a-ball {
  transform-origin: 12px 12px;
  animation: a-fall 2.6s cubic-bezier(.45,0,.75,.9) infinite;
}
@keyframes a-fall {
  0%   { transform: translate(0, 0); opacity: 0; }
  10%  { opacity: 1; }
  35%  { transform: translate(-3.4px, 5px); }
  62%  { transform: translate(2.6px, 10px); }
  88%  { transform: translate(-1.2px, 14.4px); opacity: 1; }
  100% { transform: translate(-1.2px, 15px); opacity: 0; }
}

/* --- вежа: полум'я --- */
.lobby-tile.in-view .a-flick {
  transform-origin: 12px 6.5px;
  animation: a-flick 1.3s ease-in-out infinite;
}
@keyframes a-flick {
  0%, 100% { transform: scale(1) translateY(0); opacity: .85; }
  30%      { transform: scale(1.18, .92) translateY(-.6px); opacity: 1; }
  65%      { transform: scale(.9, 1.12) translateY(.3px); opacity: .7; }
}

/* --- монетка: переворот --- */
.lobby-tile.in-view .a-flip {
  transform-origin: 12px 12px;
  animation: a-coin 3s cubic-bezier(.5,0,.5,1) infinite;
}
@keyframes a-coin {
  0%, 58%  { transform: scaleX(1); }
  72%      { transform: scaleX(.08); }
  86%      { transform: scaleX(1); }
  100%     { transform: scaleX(1); }
}

/* --- кубик: трясеться, крапки перескакують --- */
.lobby-tile.in-view .a-shake {
  transform-origin: 12px 12px;
  animation: a-shake 2.8s ease-in-out infinite;
}
@keyframes a-shake {
  0%, 62%, 100% { transform: rotate(0); }
  68%           { transform: rotate(-9deg); }
  74%           { transform: rotate(8deg); }
  80%           { transform: rotate(-4deg); }
  86%           { transform: rotate(0); }
}
.lobby-tile.in-view .a-pip { animation: a-pip 2.8s ease-in-out infinite; }
.lobby-tile.in-view .a-pip2 { animation-delay: .06s; }
.lobby-tile.in-view .a-pip3 { animation-delay: .12s; }
@keyframes a-pip {
  0%, 64%, 100% { opacity: 1; }
  70%           { opacity: .25; }
  84%           { opacity: 1; }
}

/* ----------------------------------------------------------------------
   Ігри без власних деталей анімуються цілим значком. Три характери на всі:
   карти гойдаються, кості трясуться, решта «дихає».
   ---------------------------------------------------------------------- */
.lobby-tile.in-view.lobby-tile-blackjack .gi,
.lobby-tile.in-view.lobby-tile-baccarat .gi,
.lobby-tile.in-view.lobby-tile-cardduel .gi,
.lobby-tile.in-view.lobby-tile-andarbahar .gi,
.lobby-tile.in-view.lobby-tile-redblack .gi,
.lobby-tile.in-view.lobby-tile-hilo .gi {
  animation: a-sway 3.6s ease-in-out infinite;
}
@keyframes a-sway {
  0%, 100% { transform: rotate(-2.4deg); }
  50%      { transform: rotate(2.4deg); }
}

.lobby-tile.in-view.lobby-tile-sicbo .gi,
.lobby-tile.in-view.lobby-tile-pokerdice .gi {
  animation: a-rattle 3s ease-in-out infinite;
}
@keyframes a-rattle {
  0%, 66%, 100% { transform: translate(0, 0) rotate(0); }
  72%           { transform: translate(-1px, .5px) rotate(-5deg); }
  78%           { transform: translate(1px, -.5px) rotate(5deg); }
  84%           { transform: translate(0, 0) rotate(0); }
}

/* ----------------------------------------------------------------------
   Решта ігор: анімація показує ДІЮ гри, а не просто рухає значок.
   Спільне «дихання» прибрано — воно нічого не розповідало про гру.
   ---------------------------------------------------------------------- */

/* Limbo: лінія малюється знизу вгору, точка їде по ній, стрілка спалахує
   на вершині. pathLength="100" у самій фігурі дає незалежну від довжини
   шкалу, тож dasharray не треба підганяти під конкретний контур. */
.lobby-tile.in-view .a-climb { stroke-dasharray: 100; animation: a-draw 2.8s ease-in-out infinite; }
@keyframes a-draw {
  0%       { stroke-dashoffset: 100; }
  55%, 84% { stroke-dashoffset: 0; }
  100%     { stroke-dashoffset: 100; }
}
.lobby-tile.in-view .a-rider { animation: a-rider 2.8s ease-in-out infinite; }
@keyframes a-rider {
  0%       { transform: translate(0, 0); opacity: 0; }
  10%      { opacity: 1; }
  28%      { transform: translate(5.5px, -6.5px); }
  38%      { transform: translate(8.9px, -3.5px); }
  55%      { transform: translate(17px, -13.5px); opacity: 1; }
  78%,100% { transform: translate(17px, -13.5px); opacity: 0; }
}
.lobby-tile.in-view .a-tip { animation: a-tip 2.8s ease-in-out infinite; }
@keyframes a-tip {
  0%, 46%  { opacity: .2; }
  58%, 84% { opacity: 1; }
  100%     { opacity: .2; }
}

/* Скарби: кришка відкидається на завісі, монети вилітають і тануть. */
.lobby-tile.in-view .a-lid {
  transform-origin: 3.2px 10.6px;
  animation: a-lid 3.2s ease-in-out infinite;
}
@keyframes a-lid {
  0%, 16%  { transform: rotate(0); }
  36%, 72% { transform: rotate(-26deg); }
  92%,100% { transform: rotate(0); }
}
.lobby-tile.in-view .a-gold { opacity: 0; animation: a-gold 3.2s ease-out infinite; }
.lobby-tile.in-view .a-gold2 { animation-delay: .1s; }
.lobby-tile.in-view .a-gold3 { animation-delay: .2s; }
@keyframes a-gold {
  0%, 28%  { transform: translateY(5px) scale(.4); opacity: 0; }
  44%      { transform: translateY(-1px) scale(1); opacity: 1; }
  66%      { transform: translateY(-3px) scale(1); opacity: 1; }
  82%,100% { transform: translateY(-6px) scale(.6); opacity: 0; }
}

/* Кейс: падає згори, пружинить об підлогу, далі відкидається кришка. */
.lobby-tile.in-view .a-drop {
  transform-origin: 12px 20px;
  animation: a-casedrop 3.4s ease-in-out infinite;
}
@keyframes a-casedrop {
  0%   { transform: translateY(-10px); opacity: 0; }
  11%  { transform: translateY(0) scaleY(1); opacity: 1; }
  15%  { transform: translateY(0) scaleY(.9); }
  20%  { transform: translateY(-2.4px) scaleY(1.04); }
  26%  { transform: translateY(0) scaleY(.97); }
  31%, 100% { transform: translateY(0) scaleY(1); opacity: 1; }
}
.lobby-tile.in-view .a-caselid {
  transform-origin: 2.8px 13px;
  animation: a-caselid 3.4s ease-in-out infinite;
}
@keyframes a-caselid {
  0%, 36%  { transform: rotate(0); }
  56%, 80% { transform: rotate(-34deg); }
  94%,100% { transform: rotate(0); }
}

/* Пенальті: мʼяч летить у ворота й повертається на точку. */
.lobby-tile.in-view .a-shot { animation: a-shot 2.4s cubic-bezier(.3,0,.5,1) infinite; }
@keyframes a-shot {
  0%       { transform: translate(0, 0) scale(1); opacity: 1; }
  8%       { transform: translate(0, 1px) scale(.88, 1.12); }
  46%      { transform: translate(2px, -8.6px) scale(.7); opacity: 1; }
  66%      { transform: translate(2.4px, -7.8px) scale(.7); opacity: 1; }
  78%      { transform: translate(2.4px, -7.8px) scale(.7); opacity: 0; }
  88%      { transform: translate(0, 0) scale(1); opacity: 0; }
  100%     { transform: translate(0, 0) scale(1); opacity: 1; }
}

/* Камінь-ножиці-папір: три замахи й кидок, як рахують «раз-два-три». */
.lobby-tile.in-view .a-throw {
  transform-origin: 11px 20px;
  animation: a-throw 2.6s ease-in-out infinite;
}
@keyframes a-throw {
  0%, 62%, 100% { transform: rotate(0); }
  10% { transform: rotate(-15deg); }
  20% { transform: rotate(4deg); }
  30% { transform: rotate(-15deg); }
  40% { transform: rotate(4deg); }
  50% { transform: rotate(-20deg); }
  57% { transform: rotate(8deg); }
}

/* Скретч: штрихування біжить, під ним проступають рядки. */
.lobby-tile.in-view .a-scratch { animation: a-scratchmove 1.4s linear infinite; }
@keyframes a-scratchmove { to { stroke-dashoffset: -9.6; } }
.lobby-tile.in-view .a-line { animation: a-reveal 3s ease-in-out infinite; }
.lobby-tile.in-view .a-line2 { animation-delay: .32s; }
@keyframes a-reveal {
  0%, 18%  { opacity: .15; }
  42%, 80% { opacity: 1; }
  100%     { opacity: .15; }
}

/* Діаманти: по грані пробігає відблиск. */
.lobby-tile.in-view .a-shine { opacity: 0; animation: a-shine 2.8s ease-in-out infinite; }
@keyframes a-shine {
  0%, 14%  { transform: translateX(0); opacity: 0; }
  30%      { opacity: .85; }
  60%      { transform: translateX(9px); opacity: .85; }
  74%,100% { transform: translateX(11px); opacity: 0; }
}

/* Сяйво під значком ледь пульсує — воно й тримає плитку «живою»,
   коли сама фігура рухається мало. */
.lobby-tile.in-view .lobby-tile-ic .gi { filter: drop-shadow(0 0 6px currentColor); }
.lobby-tile.in-view::before { animation: a-glow 4.2s ease-in-out infinite; }
@keyframes a-glow {
  0%, 100% { opacity: .75; }
  50%      { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .lobby-tile .gi,
  .lobby-tile .gi *,
  .lobby-tile::before { animation: none !important; }
}

/* ======================================================================
   Повтор ставки й автогра
   ====================================================================== */
.auto-panel { display: flex; flex-direction: column; gap: 8px; }

.auto-box { color: var(--muted); font-size: 12.5px; }
.auto-box summary {
  list-style: none;
  display: flex; align-items: center; gap: 7px;
  padding: 7px 0;
  color: var(--violet); font-weight: 600; cursor: pointer;
}
.auto-box summary::-webkit-details-marker { display: none; }
.auto-box summary::before {
  content: "";
  width: 6px; height: 6px; flex: 0 0 auto;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .2s ease;
}
.auto-box[open] summary::before { transform: rotate(45deg) translate(-1px, -1px); }

.auto-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.auto-chips { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
.auto-cost {
  text-align: center; margin: 7px 0 2px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11.5px; color: var(--ink);
}
.auto-grid {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 10px;
  align-items: center; margin: 8px 0;
}
.auto-label { font-size: 11.5px; color: var(--muted); }
.auto-input {
  width: 108px;
  background: var(--void-2); border: 1px solid var(--edge); color: var(--ink);
  border-radius: var(--radius-sm); padding: 7px 9px;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 700; font-size: 13px;
}
.auto-input:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.auto-note {
  margin-top: 7px; text-align: center;
  font-size: 11.5px; color: var(--muted); min-height: 15px;
}
.auto-box .cta-btn { width: 100%; min-width: 0; padding: 11px; font-size: 13px; }

/* ======================================================================
   Домашній екран: банер, пошук, горизонтальні ряди, стрічка виграшів
   ====================================================================== */
.lobby { gap: 14px; }

/* --- банер акцій: гортається пальцем, крапки показують позицію --- */
.lb-promo { position: relative; }
.lb-promo-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  gap: 8px;
}
.lb-promo-track::-webkit-scrollbar { display: none; }
.lb-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--edge);
  background:
    radial-gradient(180px 120px at 88% 10%, rgba(244,95,209,.22), transparent 70%),
    linear-gradient(135deg, rgba(139,92,246,.30), rgba(109,40,217,.14)),
    var(--panel);
  color: var(--ink); text-align: left; cursor: pointer;
  box-shadow: var(--shadow);
}
.lb-slide:active { transform: scale(.985); }
.lb-slide-title {
  font-family: "Manrope", sans-serif; font-weight: 800;
  font-size: 15px; letter-spacing: .01em;
}
.lb-slide-text { font-size: 12px; color: var(--muted); }
.lb-dots { display: flex; gap: 5px; justify-content: center; margin-top: 7px; }
.lb-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--line); transition: background .2s ease, width .2s ease;
}
.lb-dot.on { background: var(--violet); width: 14px; border-radius: 3px; }

/* --- пошук --- */
.lb-search input {
  width: 100%;
  background: var(--void-2);
  border: 1px solid var(--edge);
  border-radius: var(--radius-pill);
  color: var(--ink);
  padding: 10px 15px;
  font-family: "Manrope", sans-serif; font-size: 13.5px;
}
.lb-search input::placeholder { color: var(--muted); }
.lb-search input:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }

/* --- ряди --- */
.lb-row { display: flex; flex-direction: column; gap: 8px; }
.lb-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.lb-row-head h3 {
  margin: 0;
  font-family: "Manrope", sans-serif; font-weight: 800; font-size: 13.5px;
  color: var(--ink); letter-spacing: .01em;
}
.lb-count { font-size: 11.5px; color: var(--muted); font-family: "JetBrains Mono", monospace; }

.lb-strip {
  display: flex; gap: 8px;
  overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x proximity;
  padding-bottom: 2px;
}
.lb-strip::-webkit-scrollbar { display: none; }
/* Плитка в ряду вужча за сітку: у ряд має поміщатись три з половиною —
   обрізана четверта і є підказкою, що ряд гортається. */
.lb-strip .lobby-tile {
  flex: 0 0 auto;
  width: clamp(88px, 27vw, 108px);
  scroll-snap-align: start;
  padding: 8px 5px 10px;
  gap: 5px;
}
.lb-strip .lobby-tile-ic { width: 74%; }
.lb-strip .lobby-tile-name { font-size: clamp(10.5px, 3.2vw, 12px); }
.lb-strip .lobby-tile-new::after { font-size: 7.5px; padding: 2px 4px; top: 5px; right: 5px; }

.lb-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 22px 0;
  color: var(--muted); font-size: 13px;
}

/* --- стрічка виграшів --- */
.lb-feed-strip {
  display: flex; gap: 7px;
  overflow-x: auto; scrollbar-width: none;
  padding-bottom: 2px;
}
.lb-feed-strip::-webkit-scrollbar { display: none; }
.lb-win {
  flex: 0 0 auto;
  display: flex; flex-direction: column; gap: 1px;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--void-2);
}
.lb-win b { font-family: "Manrope", sans-serif; font-weight: 700; font-size: 11.5px; color: var(--ink); }
.lb-win i { font-style: normal; font-size: 10px; color: var(--muted); }
.lb-win em {
  font-style: normal;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 700; font-size: 11.5px;
  color: var(--win);
}

/* ======================================================================
   Обкладинки ігор
   ----------------------------------------------------------------------
   Формат 3:4 із артом на весь кадр, назвою поверх нього й чипом категорії
   знизу — так виглядає полиця з іграми, а не список застосунків.
   Ілюстрацій у нас немає, тож арт збирається з того, що є: кольоровий
   градієнт гри, її ж значок у великому масштабі зі зсувом і світінням.
   ====================================================================== */
.lobby-tile {
  aspect-ratio: 3 / 4;
  display: block;
  position: relative;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--edge);
  background: var(--panel);
}
.lobby-tile::before { content: none; }

/* Арт: діагональний градієнт у кольорі гри плюс м'яке світло згори. */
.lobby-tile-art {
  position: absolute; inset: 0;
  display: block;
  background:
    radial-gradient(120% 70% at 50% 4%, rgba(255,255,255,.14), transparent 62%),
    linear-gradient(158deg, var(--tint, rgba(139,92,246,.30)), rgba(15,10,26,.92) 78%),
    var(--void-2);
}
/* Значок зміщений угору й ліворуч від центра: строго по центру він читається
   як піктограма, зі зсувом — як ілюстрація. */
.lobby-tile-ic {
  position: absolute;
  left: 50%; top: 42%;
  width: 62%; aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: none; background: none; box-shadow: none;
  color: var(--icon, var(--violet));
  display: grid; place-items: center;
}
.lobby-tile-ic .gi {
  width: 100%; height: 100%;
  filter: drop-shadow(0 0 14px currentColor) drop-shadow(0 4px 10px rgba(0,0,0,.5));
}

/* Підвал: затемнення знизу, щоб назва читалась поверх будь-якого арту. */
.lobby-tile-foot {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 26px 6px 9px;
  background: linear-gradient(180deg, transparent, rgba(11,7,20,.88) 52%);
}
.lobby-tile-name {
  font-family: "Manrope", sans-serif; font-weight: 800;
  font-size: clamp(11px, 3.6vw, 14px);
  letter-spacing: .01em; line-height: 1.1;
  color: #fff; text-align: center;
  text-shadow: 0 1px 3px rgba(0,0,0,.7);
  max-width: 100%; overflow-wrap: anywhere;
}
.lobby-tile-tag {
  font-family: "Manrope", sans-serif; font-weight: 800;
  font-size: 7.5px; letter-spacing: .1em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 2px 7px;
  background: rgba(0,0,0,.35);
}
/* Стрічка «нове» в куті — як у них, але в нашому рожевому. */
.lobby-tile-new::after {
  content: "NEW";
  position: absolute; top: 0; left: 0;
  font-family: "Manrope", sans-serif; font-weight: 800; font-size: 8px;
  letter-spacing: .08em;
  padding: 3px 9px 3px 7px;
  border-radius: var(--radius-md) 0 var(--radius-md) 0;
  background: var(--win); color: #2a0a22;
  z-index: 2;
}
.lobby-tile-modes { display: none; }

/* У горизонтальних рядах обкладинка вужча, підпис менший. */
.lb-strip .lobby-tile { width: clamp(96px, 29vw, 120px); padding: 0; }
.lb-strip .lobby-tile-ic { width: 60%; }
.lb-strip .lobby-tile-name { font-size: clamp(10px, 3.1vw, 12px); }
.lb-strip .lobby-tile-foot { padding: 22px 5px 7px; }

/* ======================================================================
   Бонусні картки на головній
   ====================================================================== */
.lb-bonus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lb-bonus {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 11px 12px 12px;
  min-height: 108px;
  border-radius: var(--radius-md);
  border: 1px solid var(--edge);
  background:
    radial-gradient(140px 100px at 88% 8%, var(--tint), transparent 72%),
    var(--panel);
  color: var(--ink); text-align: left; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), var(--shadow);
}
.lb-bonus:disabled { cursor: default; opacity: .72; }
.lb-bonus.on:active { transform: scale(.98); }
.lb-bonus-title {
  font-family: "Manrope", sans-serif; font-weight: 800; font-size: 12.5px;
  line-height: 1.15;
}
.lb-bonus-sum {
  font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 700;
  font-size: 15px; color: var(--win);
}
.lb-bonus-text { font-size: 10.5px; color: var(--muted); line-height: 1.25; }
/* Дія притиснута до низу картки: у сітці вони мають бути на одній лінії,
   незалежно від довжини опису. */
.lb-bonus-act, .lb-bonus-wait {
  margin-top: auto;
  font-family: "Manrope", sans-serif; font-weight: 800; font-size: 10.5px;
  letter-spacing: .04em;
  padding: 4px 10px; border-radius: var(--radius-pill);
}
.lb-bonus-act {
  background: linear-gradient(180deg, var(--violet), var(--violet-deep));
  color: #fff; box-shadow: 0 0 12px rgba(139,92,246,.4);
}
.lb-bonus-wait { color: var(--muted); border: 1px solid var(--line); }

/* ======================================================================
   Сцена гри: колір і глибина замість плоскої панелі
   ----------------------------------------------------------------------
   Кожна гра має свій відтінок — той самий, що й на її обкладинці. Фон
   збирається шарами: кольорове світло згори, друге знизу, дрібна сітка
   для фактури. Жодних картинок: усе градієнтами, тож нічого не вантажиться.
   ====================================================================== */
.stage[data-game] { --theme: rgba(139,92,246,.30); --theme2: rgba(244,95,209,.16); }
.stage[data-game="slots"]      { --theme: rgba(139,92,246,.34); --theme2: rgba(244,95,209,.18); }
.stage[data-game="roulette"]   { --theme: rgba(226,63,115,.30); --theme2: rgba(139,92,246,.18); }
.stage[data-game="wheel"]      { --theme: rgba(244,95,209,.28); --theme2: rgba(139,92,246,.18); }
.stage[data-game="keno"]       { --theme: rgba(84,196,255,.26); --theme2: rgba(139,92,246,.16); }
.stage[data-game="blackjack"]  { --theme: rgba(47,158,110,.28); --theme2: rgba(139,92,246,.16); }
.stage[data-game="baccarat"]   { --theme: rgba(47,158,110,.26); --theme2: rgba(84,196,255,.14); }
.stage[data-game="cardduel"]   { --theme: rgba(226,63,115,.28); --theme2: rgba(255,196,84,.14); }
.stage[data-game="andarbahar"] { --theme: rgba(139,92,246,.30); --theme2: rgba(84,196,255,.14); }
.stage[data-game="redblack"]   { --theme: rgba(226,63,115,.30); --theme2: rgba(27,21,38,.5); }
.stage[data-game="hilo"]       { --theme: rgba(139,92,246,.28); --theme2: rgba(244,95,209,.16); }
.stage[data-game="dice"]       { --theme: rgba(177,140,255,.30); --theme2: rgba(84,196,255,.14); }
.stage[data-game="sicbo"]      { --theme: rgba(84,196,255,.26); --theme2: rgba(139,92,246,.18); }
.stage[data-game="pokerdice"]  { --theme: rgba(255,196,84,.24); --theme2: rgba(139,92,246,.18); }
.stage[data-game="crash"]      { --theme: rgba(47,158,110,.30); --theme2: rgba(84,196,255,.16); }
.stage[data-game="limbo"]      { --theme: rgba(47,158,110,.28); --theme2: rgba(139,92,246,.16); }
.stage[data-game="mines"]      { --theme: rgba(226,63,115,.30); --theme2: rgba(255,140,84,.16); }
.stage[data-game="tower"]      { --theme: rgba(255,140,84,.28); --theme2: rgba(226,63,115,.16); }
.stage[data-game="plinko"]     { --theme: rgba(84,196,255,.28); --theme2: rgba(244,95,209,.16); }
.stage[data-game="coin"]       { --theme: rgba(255,196,84,.28); --theme2: rgba(139,92,246,.16); }
.stage[data-game="scratch"]    { --theme: rgba(255,196,84,.24); --theme2: rgba(244,95,209,.16); }
.stage[data-game="diamonds"]   { --theme: rgba(84,196,255,.30); --theme2: rgba(139,92,246,.18); }
.stage[data-game="rps"]        { --theme: rgba(255,140,84,.26); --theme2: rgba(139,92,246,.16); }
.stage[data-game="penalty"]    { --theme: rgba(47,158,110,.30); --theme2: rgba(255,196,84,.14); }
.stage[data-game="treasure"]   { --theme: rgba(255,196,84,.30); --theme2: rgba(255,140,84,.18); }
.stage[data-game="cases"]      { --theme: rgba(139,92,246,.32); --theme2: rgba(255,196,84,.16); }

.stage[data-game] .game {
  background:
    radial-gradient(140% 70% at 50% -6%, var(--theme), transparent 62%),
    radial-gradient(120% 60% at 12% 106%, var(--theme2), transparent 60%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.018) 0 1px, transparent 1px 9px),
    linear-gradient(180deg, var(--panel-2), var(--panel));
  border-color: rgba(255,255,255,.10);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255,255,255,.10),
    inset 0 -1px 0 rgba(0,0,0,.35),
    0 0 0 1px rgba(139,92,246,.10);
}
/* Ігрові поля всередині сцени теж перестають бути плоскими. */
.stage[data-game] .reels,
.stage[data-game] .cr-stage,
.stage[data-game] .pk-stage,
.stage[data-game] .lb-stage,
.stage[data-game] .bj-felt,
.stage[data-game] .cd-table,
.stage[data-game] .cd-andar,
.stage[data-game] .mines-grid {
  background-image:
    radial-gradient(90% 60% at 50% 0%, var(--theme), transparent 66%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.18));
  background-color: var(--void-2);
}

/* Головна кнопка на сцені важча: вона тут головна дія. */
.stage[data-game] .spin-btn {
  min-width: 62%;
  padding: 16px 30px;
  font-size: 15px;
  letter-spacing: .1em;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.4),
    inset 0 -3px 0 rgba(0,0,0,.3),
    0 10px 26px rgba(109,40,217,.5),
    0 0 26px rgba(139,92,246,.4);
}

/* ---------------------------------------------------------------------
   Святкування виграшу
   --------------------------------------------------------------------- */
.celebrate {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  pointer-events: none;
  z-index: 5;
  animation: cel-in .28s ease-out both, cel-out .4s ease-in 1.4s both;
}
.celebrate-big { animation: cel-in .3s ease-out both, cel-out .5s ease-in 2.1s both; }
@keyframes cel-in { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: scale(1); } }
@keyframes cel-out { to { opacity: 0; transform: scale(1.06); } }

/* Промені — один конічний градієнт, що повільно обертається. Дешевше за
   будь-які частинки й не навантажує розкладку. */
.celebrate-rays {
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(244,95,209,.22) 0deg 7deg,
    transparent 7deg 20deg);
  mask-image: radial-gradient(circle, #000 12%, transparent 66%);
  -webkit-mask-image: radial-gradient(circle, #000 12%, transparent 66%);
  animation: cel-spin 7s linear infinite;
}
.celebrate-big .celebrate-rays {
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255,214,102,.30) 0deg 6deg,
    transparent 6deg 17deg);
}
@keyframes cel-spin { to { transform: rotate(360deg); } }

.celebrate-sum {
  position: relative;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 700;
  font-size: clamp(26px, 9vw, 40px);
  color: #fff;
  text-shadow: 0 0 10px rgba(244,95,209,.9), 0 0 28px rgba(244,95,209,.6), 0 3px 8px rgba(0,0,0,.6);
}
.celebrate-big .celebrate-sum {
  color: #FFF4CE;
  text-shadow: 0 0 12px rgba(255,196,84,.95), 0 0 34px rgba(255,150,40,.7), 0 3px 8px rgba(0,0,0,.6);
}
.celebrate-label {
  position: relative;
  font-family: "Manrope", sans-serif; font-weight: 800;
  font-size: 11px; letter-spacing: .22em;
  color: var(--win);
}
.celebrate-big .celebrate-label { color: #FFC454; }
@media (prefers-reduced-motion: reduce) { .celebrate { display: none; } }

/* ======================================================================
   Барабани: кольорові плашки під символами
   ----------------------------------------------------------------------
   Однакові темні комірки — головна причина, чому барабан виглядав мертвим.
   Тепер під кожним символом своя плашка в його ж кольорі: око чіпляється
   за колір раніше, ніж встигає розібрати форму.
   ====================================================================== */
.sym { position: relative; padding: 9%; }
.sym::before {
  content: "";
  position: absolute; inset: 7%;
  border-radius: 22%;
  background: linear-gradient(170deg, var(--s1, rgba(139,92,246,.30)), var(--s2, rgba(15,10,26,.4)));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -2px 6px rgba(0,0,0,.35);
}
.sym .gsym { position: relative; }
.sym-cherry { --s1: rgba(226,63,90,.55);  --s2: rgba(80,10,25,.55); }
.sym-lemon  { --s1: rgba(245,197,24,.55); --s2: rgba(90,60,0,.55); }
.sym-bell   { --s1: rgba(240,180,41,.55); --s2: rgba(95,55,5,.55); }
.sym-star   { --s1: rgba(255,210,63,.55); --s2: rgba(100,60,0,.55); }
.sym-gem    { --s1: rgba(72,214,245,.52); --s2: rgba(6,60,80,.55); }
.sym-seven  { --s1: rgba(177,76,255,.55); --s2: rgba(52,10,90,.55); }

/* Виграшна комірка світиться й трохи виступає. */
.reel.landed .sym-win::before {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.35),
    0 0 0 2px var(--win),
    0 0 18px rgba(244,95,209,.65);
}
/* Сума, надрукована просто на символі. */
.sym-pay {
  position: absolute; left: 50%; bottom: 6%;
  transform: translateX(-50%);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: rgba(10,6,18,.86);
  border: 1px solid var(--win);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700; font-size: 10px; white-space: nowrap;
  color: #fff;
  animation: pay-pop .34s cubic-bezier(.2,.9,.3,1.4) both;
}
@keyframes pay-pop {
  0% { opacity: 0; transform: translateX(-50%) translateY(6px) scale(.7); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* Табло кредиту й ставки — як на панелі справжнього автомата. */
.slot-hud {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.slot-hud-cell {
  display: flex; flex-direction: column; gap: 2px; align-items: center;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(0,0,0,.34), rgba(0,0,0,.14));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.slot-hud-cell b {
  font-family: "Manrope", sans-serif; font-weight: 800;
  font-size: 8.5px; letter-spacing: .14em; color: var(--muted);
}
.slot-hud-cell i {
  font-style: normal;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 700;
  font-size: 15px; color: #FFD36B;
  text-shadow: 0 0 10px rgba(255,196,84,.45);
}
@media (prefers-reduced-motion: reduce) { .sym-pay { animation: none; } }

/* ======================================================================
   Чому ігри виглядали сплющеними
   ----------------------------------------------------------------------
   .stage — вертикальний флекс-контейнер, .game — його дочірній елемент.
   За замовчуванням флекс-елемент МОЖЕ стискатись, і коли вміст гри не
   вміщався у висоту екрана, браузер тиснув картку замість того, щоб дати
   сторінці прокрутитись. Разом із карткою стискалось усе всередині —
   зокрема поля з фіксованою висотою.
   Заборона стискатись повертає кожному елементу його справжній розмір.
   ====================================================================== */
.stage > .game { flex: 0 0 auto; }
.game > * { flex-shrink: 0; }
.cr-stage, .pk-stage, .lb-stage, .dc-scene, .d3-scene, .cn-stage,
.cs-track, .pn-goal, .reels, .mines-grid, .kn-grid, .tr-grid,
.in-grid, .in-gems, .in-duel, .dface-row, .bj-felt, .cd-table,
.cd-andar, .wheel-wrap, .hl-row, .tw-tower {
  flex-shrink: 0;
}

/* ======================================================================
   Оздоблення: більше повітря й мʼякші межі
   ----------------------------------------------------------------------
   Після того як зникло стискання, зʼявилось місце — і його варто віддати
   вмісту, а не залишати щільним «про запас».
   ====================================================================== */
.stage[data-game] .game {
  padding: 18px 14px 20px;
  gap: 15px;
  border-radius: 22px;
}
.stage[data-game] .game-top { padding-bottom: 12px; }

/* Межі приглушені: різка лінія по контуру сперечається з підсвіткою
   всередині й робить картку схожою на таблицю. */
.stage[data-game] .mn-stat,
.stage[data-game] .rbet,
.stage[data-game] .sb-opt,
.stage[data-game] .d3-t,
.stage[data-game] .tw-mode,
.stage[data-game] .pk-seg button {
  border-color: rgba(255,255,255,.09);
}
.stage[data-game] .result-line {
  padding: 11px 14px;
  border-color: rgba(255,255,255,.08);
  background: rgba(0,0,0,.22);
  font-size: 13.5px;
}
.stage[data-game] .bet-row { gap: 10px; }
.stage[data-game] .bet-label { font-size: 10.5px; letter-spacing: .14em; }

/* Приглушений текст був на межі читабельності на кольоровому фоні. */
.stage[data-game] { --muted: #C2B6E4; }

/* Поля гри трохи вищі — тепер вони не стискаються, тож можна дозволити. */
.cr-stage { height: clamp(230px, 36vh, 330px); }
.pk-stage { height: clamp(250px, 39vh, 360px); }
.d3-scene { height: clamp(132px, 23vh, 180px); }
.cn-stage { height: clamp(164px, 28vh, 224px); }

/* ======================================================================
   Джунглі: персонажі живуть на барабані
   ----------------------------------------------------------------------
   Анімація вмикається ЛИШЕ на комірці, що зупинилась у вікні. Рухомий
   звіринець на всій стрічці під час обертання не лише марно жер би кадри,
   а й заважав стежити за самим барабаном.
   ====================================================================== */
.reel.landed .sym-mid .s-eye,
.reel.landed .sym-mid .s-crest,
.reel.landed .sym-mid .s-tongue,
.reel.landed .sym-mid .s-shine,
.reel.landed .sym-mid .s-glow { transform-box: fill-box; transform-origin: center; }

/* Кліпання: очі стискаються по вертикалі й одразу розкриваються. */
.reel.landed .sym-mid .s-eye { animation: s-blink 3.6s ease-in-out infinite; }
@keyframes s-blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95%           { transform: scaleY(.1); }
}
/* Другий і третій барабани кліпають не в такт — синхронне моргання
   трьох персонажів виглядає як збій, а не як життя. */
.reel[data-i="1"].landed .sym-mid .s-eye { animation-delay: .7s; }
.reel[data-i="2"].landed .sym-mid .s-eye { animation-delay: 1.5s; }
.reel[data-i="3"].landed .sym-mid .s-eye { animation-delay: 2.2s; }
.reel[data-i="4"].landed .sym-mid .s-eye { animation-delay: 1.1s; }

/* Чуб папуги смикається. */
.reel.landed .sym-mid .s-crest {
  transform-origin: bottom center;
  animation: s-crest 2.4s ease-in-out infinite;
}
@keyframes s-crest {
  0%, 70%, 100% { transform: rotate(0); }
  78%           { transform: rotate(-9deg); }
  86%           { transform: rotate(6deg); }
}

/* Язик змії висовується. */
.reel.landed .sym-mid .s-tongue { animation: s-tongue 2.2s ease-in-out infinite; }
@keyframes s-tongue {
  0%, 62%, 100% { transform: translateY(-3px); opacity: 0; }
  70%, 84%      { transform: translateY(0); opacity: 1; }
}

/* Блиск по банану. */
.reel.landed .sym-mid .s-shine { animation: s-shine 2.8s ease-in-out infinite; }
@keyframes s-shine {
  0%, 60%, 100% { opacity: 0; }
  72%           { opacity: .9; }
}

/* Тотем світиться. */
.reel.landed .sym-mid .s-glow { animation: s-glow 1.8s ease-in-out infinite; }
@keyframes s-glow {
  0%, 100% { opacity: .35; transform: scaleY(.7); }
  50%      { opacity: 1; transform: scaleY(1.25); }
}

/* Виграшний персонаж підстрибує — реакція на подію, а не постійний рух. */
.reel.landed .sym-win .gsym { animation: s-cheer .6s cubic-bezier(.3,.9,.4,1.4) 2; }
@keyframes s-cheer {
  0%, 100% { transform: translateY(0) scale(1); }
  35%      { transform: translateY(-8%) scale(1.1); }
  60%      { transform: translateY(0) scale(.97); }
}

/* Плашки під персонажами — у кольорі кожного. */
.sym-monkey { --s1: rgba(154,107,240,.58); --s2: rgba(45,16,90,.6); }
.sym-parrot { --s1: rgba(63,196,232,.55); --s2: rgba(6,58,80,.6); }
.sym-snake  { --s1: rgba(79,209,160,.52); --s2: rgba(8,66,46,.6); }
.sym-frog   { --s1: rgba(79,209,160,.44); --s2: rgba(12,72,52,.6); }
.sym-banana { --s1: rgba(245,197,24,.52); --s2: rgba(92,62,0,.6); }
.sym-totem  { --s1: rgba(255,196,84,.58); --s2: rgba(100,58,4,.62); }

/* Своє тло машини: тепла зелень замість фіолету решти слотів. */
.reels[data-machine="jungle"] {
  background-image:
    radial-gradient(90% 60% at 50% 0%, rgba(79,209,160,.30), transparent 68%),
    radial-gradient(70% 50% at 12% 100%, rgba(255,196,84,.18), transparent 64%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.2));
  background-color: #0E1B18;
}
@media (prefers-reduced-motion: reduce) {
  .reel.landed .sym-mid .s-eye, .reel.landed .sym-mid .s-crest,
  .reel.landed .sym-mid .s-tongue, .reel.landed .sym-mid .s-shine,
  .reel.landed .sym-mid .s-glow, .reel.landed .sym-win .gsym { animation: none; }
}

/* Кнопка швидкого доступу до автогри — стоїть поруч зі ставкою, бо панель
   під кнопкою спіна легко проґавити. Саму панель не переносить. */
.auto-jump {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--edge);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0)), var(--void-2);
  color: var(--muted); cursor: pointer;
  font-family: "Manrope", sans-serif; font-weight: 800; font-size: 10.5px;
  letter-spacing: .08em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.auto-jump .gi { width: 11px; height: 11px; }
.auto-jump:active { transform: scale(.96); }
.auto-jump.on {
  border-color: var(--violet);
  background: linear-gradient(180deg, rgba(139,92,246,.32), rgba(109,40,217,.16));
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 0 12px rgba(139,92,246,.3);
}

/* ======================================================================
   Правила гри
   ====================================================================== */
.rules-box { color: var(--muted); font-size: 12.5px; }
.rules-box summary {
  list-style: none;
  display: flex; align-items: center; gap: 7px;
  padding: 7px 0;
  color: var(--violet); font-weight: 600; cursor: pointer;
}
.rules-box summary::-webkit-details-marker { display: none; }
.rules-box summary::before {
  content: "";
  width: 6px; height: 6px; flex: 0 0 auto;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .2s ease;
}
.rules-box[open] summary::before { transform: rotate(45deg) translate(-1px, -1px); }

.rules-body { display: flex; flex-direction: column; gap: 9px; padding-bottom: 4px; }
.rules-how {
  margin: 0;
  color: var(--ink); font-size: 13px; line-height: 1.45;
}
/* Схема на прикладі: пояснення картинкою доходить швидше за абзац. */
.rules-art {
  display: flex; justify-content: center;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(0,0,0,.24);
}
.rule-dia { width: 100%; max-width: 240px; height: auto; }
.rules-list { margin: 0; padding-left: 16px; display: flex; flex-direction: column; gap: 4px; }
.rules-list li { line-height: 1.4; }
.rules-list li::marker { color: var(--violet); }
.rules-note {
  margin: 2px 0 0;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 11px; color: var(--muted); line-height: 1.4;
}

/* Екран для призупиненого доступу. Сторінка віддається всім, тож без цього
   заблокований гравець бачив би просто непрацюючий інтерфейс. */
.blocked-veil {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(8, 5, 16, .92);
  backdrop-filter: blur(6px);
}
.blocked-card {
  max-width: 340px; width: 100%; text-align: center;
  background: var(--panel); border: 1px solid var(--edge);
  border-radius: var(--radius-lg); padding: 22px 18px;
}
.blocked-title {
  font-family: "Manrope", sans-serif; font-weight: 800; font-size: 17px;
  color: var(--ink); margin-bottom: 10px;
}
.blocked-text { font-size: 13.5px; color: var(--ink); line-height: 1.5; margin: 0 0 8px; }
.blocked-sub { font-size: 11.5px; color: var(--muted); line-height: 1.45; margin: 0; }

/* ======================================================================
   Приклад роздачі на порожньому столі
   ----------------------------------------------------------------------
   Карткові ігри відкривались порожніми: підписані рамки, прочерки замість
   очок — і жодного уявлення, як виглядає зіграна роздача. Тепер на старті
   показано приклад.

   Дві речі тут принципові.

   1. Приклад ПРИГЛУШЕНИЙ і підписаний. Повноколірні карти на старті гравець
      прийняв би за вже зіграний раунд і вирішив, що гра щось видала без його
      ставки. Позначка лишається помітною (не сірою на сірому) саме тому, що
      вона тут не прикраса, а запобіжник від хибного враження.
   2. Позначка існує ТІЛЬКИ разом із класом .cd-demo. Клас знімається першою
      роздачею, тож на справжньому результаті напису вже немає.
   ====================================================================== */
.cd-demo-badge { display: none; }
.cd-table, .cd-andar, .bj-felt, .hl-row { position: relative; }
.cd-demo { position: relative; }
.cd-demo .cd-demo-badge {
  display: inline-block;
  position: absolute; top: 6px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px dashed rgba(241,234,251,.34);
  background: rgba(12, 8, 22, .86);
  color: var(--muted);
  font-family: "Manrope", sans-serif; font-weight: 800;
  font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}
/* Приглушуємо самі карти й підсумки, а не весь блок: підписи місць
   («Дилер», «Андар») мають лишатись читними — вони пояснюють розкладку. */
.cd-demo .pcard,
.cd-demo .cd-total,
.cd-demo .bj-total { opacity: .38; filter: saturate(.55); }
.cd-demo .hl-flip { opacity: .38; filter: saturate(.55); }

/* Смужка прогресу в картці завдання. */
.lb-bonus-bar {
  display: block; width: 100%; height: 4px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.10);
  overflow: hidden;
}
.lb-bonus-bar i {
  display: block; height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--violet), var(--violet-deep));
  transition: width .4s ease;
}

/* Смуга «немає звʼязку». Вгорі, поверх усього, не блокує керування —
   гравець має бачити причину, але не опинятись у пастці. */
.offline-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9998;
  padding: 9px 14px calc(9px + env(safe-area-inset-top));
  background: linear-gradient(180deg, #7c1c33, #5e1329);
  color: #fff; text-align: center;
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 12.5px;
  box-shadow: 0 6px 18px rgba(0,0,0,.45);
}

/* ======================================================================
   Стовпчик чіпа: сам чіп і «+» під ним
   ----------------------------------------------------------------------
   «+» лежить у спільній колонці зі своїм чіпом, а не окремим рядом. Так
   його не треба вирівнювати вручну, і він не зʼїде, коли чіпи перенесуться
   на новий рядок на вузькому екрані.
   ====================================================================== */
.chip-stack {
  display: inline-flex; flex-direction: column; align-items: stretch; gap: 4px;
}
.chip-plus {
  height: 22px; padding: 0 8px;
  border-radius: var(--radius-pill);
  border: 1px dashed rgba(241,234,251,.28);
  background: var(--void-2);
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 700; font-size: 14px; line-height: 1;
  cursor: pointer;
}
.chip-plus:active { transform: scale(.94); }
.chip-plus:hover { border-color: var(--violet); color: #fff; }

/* Скидання стоїть поруч зі «Своя» і гасне, коли скидати нема чого. */
.chip-reset {
  font-family: "Manrope", sans-serif; font-weight: 800;
  font-size: 10.5px; letter-spacing: .04em;
}
.chip-reset:disabled { opacity: .35; cursor: default; }

/* ======================================================================
   Кнопка запуску завжди під рукою
   ----------------------------------------------------------------------
   У високих іграх (Кено, Сапер, Плінко) кнопка опинялась нижче краю екрана:
   щоб запустити раунд, треба було гортати вниз, а сам початок гри при цьому
   легко пропустити — він відбувався вище.

   Робимо її липкою над нижньою панеллю. Порядок елементів не змінюється,
   тож нічого не «стрибає»: кнопка просто не дає себе загорнути за край.
   z-index нижчий за панель навігації — та має лишатись зверху.
   ====================================================================== */
.game > .spin-btn {
  position: sticky;
  bottom: calc(78px + env(safe-area-inset-bottom));
  z-index: 3;
}
/* Тінь знизу — щоб липка кнопка не зливалась із вмістом, який під неї заїжджає. */
.game > .spin-btn::after {
  content: '';
  position: absolute; left: -12px; right: -12px; top: -10px; bottom: -14px;
  background: radial-gradient(60% 120% at 50% 50%, rgba(10,6,20,.55), transparent 72%);
  z-index: -1;
  pointer-events: none;
}

/* Камінь-Ножиці-Папір: кнопка з фігурою замість емодзі. */
.rbet-rps {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 9px 4px;
}
.rbet-rps .rps-ic { display: block; width: 26px; height: 26px; }
.rbet-rps .rps-ic .gi { width: 100%; height: 100%; }
/* Фігура в полі результату росте разом із самим полем. */
.in-mark .gi { width: 62%; height: 62%; }

/* Рядок «на що поставлено» в Сік Бо: назва, умова, виплата.
   Без нього на екрані були самі лише кубики й сітка кнопок, з яких не
   читалось ані що вони означають, ані чого чекати від кидка. */
.sb-yourbet {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 10px;
  background: var(--void-2); border: 1px solid var(--edge);
  border-radius: var(--radius-sm);
  text-align: center;
}
.sb-yourbet b { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 13px; color: var(--ink); }
.sb-yourbet span { font-size: 11px; color: var(--muted); line-height: 1.35; }
.sb-yourbet i {
  font-style: normal; font-family: "JetBrains Mono", monospace; font-weight: 700;
  font-size: 11.5px; color: var(--violet);
}

/* Підпис профілю ставки під чіпами: пояснює, що саме змінює сума ставки —
   частоту виграшів і стелю, але не віддачу. */
.profile-note {
  margin: 6px 0 2px;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  color: var(--muted, #8a93a6);
}
