/* ==========================================================================
   «Ретро-Вегас»: сукно, дерево, латунь, неон и лампочки вывесок + пиксельный шрифт
   ========================================================================== */

@font-face {
  font-family: 'Tiny5';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/tiny5-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Tiny5';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/tiny5-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --sb: env(safe-area-inset-bottom, 0px);   /* отступ снизу (полоска жестов); в полноэкранном Telegram — свой */
  --pixel: 'Tiny5', ui-monospace, monospace;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --carpet: #1c0810;
  --carpet-2: #2c0c18;
  --felt: #0f6b3e;
  --felt-dark: #07432a;
  --wood: #6b3418;
  --wood-dark: #2f1409;
  --leather: #3a160e;
  --leather-dark: #220b07;
  --brass: #d4a537;
  --brass-light: #f6dc86;
  --brass-dark: #85601a;
  --red: #c8102e;
  --red-dark: #6e0717;
  --cream: #fbf4e2;
  --ink: #1d1712;

  --text: #fbf1dc;
  --muted: #c4ae8c;
  --green: #46e28a;
  --red-text: #ff6b6b;
  --gold: #ffd257;

  --neon-pink: #ff3fa4;
  --neon-cyan: #35e0ff;
  --neon-yellow: #ffd23f;
  --neon-green: #3dff8a;
  --neon-red: #ff4b3e;
  --neon-purple: #c47bff;
  --neon-orange: #ff9a3c;
  --neon-blue: #4d8dff;

  --radius: 14px;
  --tabbar-h: 66px;
  --brass-grad: linear-gradient(180deg, var(--brass-light), var(--brass) 45%, var(--brass-dark));
  --noise: url(/img/noise.png);
  --felt-bg: var(--noise), radial-gradient(ellipse at 50% 35%, #15834c, var(--felt) 45%, var(--felt-dark));
  --wood-bg: repeating-linear-gradient(92deg, rgba(255, 220, 170, .05) 0 2px, transparent 2px 7px, rgba(0, 0, 0, .08) 7px 9px, transparent 9px 15px),
             linear-gradient(180deg, #8a4823, var(--wood) 40%, var(--wood-dark));
  --leather-bg: var(--noise), radial-gradient(ellipse at 50% 0%, #52211a, var(--leather) 55%, var(--leather-dark));
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; color: var(--text); font-family: var(--font); font-size: 15px; }
html { font-synthesis: none; } /* пиксельный шрифт одного начертания — без поддельного жирного */
html { background: var(--carpet); }
body {
  min-height: 100vh;
  min-height: 100dvh;
  overscroll-behavior-y: none;
  background: transparent;
}
/* ковёр казино в отдельном слое: при прокрутке он не перерисовывается.
   (background-attachment: fixed заставлял браузер перерисовывать фон на каждом кадре скролла) */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; transform: translateZ(0);
  background-color: var(--carpet);
  background-image:
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .5)),
    radial-gradient(ellipse 120% 60% at 50% -10%, rgba(255, 180, 80, .16), transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(212, 165, 55, .16) 0 2px, transparent 2.5px),
    radial-gradient(circle at 0 0, rgba(53, 224, 255, .07) 0 2px, transparent 2.5px),
    repeating-conic-gradient(from 45deg, rgba(255, 255, 255, .028) 0 25%, transparent 0 50%),
    linear-gradient(180deg, var(--carpet-2), var(--carpet));
  background-size: 100% 100%, 100% 100%, 32px 32px, 32px 32px, 64px 64px, 100% 100%;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:disabled { cursor: default; }
input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; }
.muted { color: var(--muted); }
.pos { color: var(--green); }
.neg { color: var(--red-text); }
.gold { color: var(--gold); }
.small { font-size: 12px; }
code { padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, .35); border: 1px solid var(--brass-dark); font-size: 13px; color: var(--brass-light); }

#app { max-width: 520px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.view { flex: 1; padding: 14px 14px calc(var(--tabbar-h) + 26px + var(--sb)); }
body.in-game .view { padding-bottom: calc(26px + var(--sb)); }

/* ---------- общие «материалы» ---------- */
.neon { color: #fff; text-shadow: 0 0 2px #fff, 0 0 7px var(--neon, var(--neon-pink)), 0 0 16px var(--neon, var(--neon-pink)); }

/* лампочки вывески: бегущие огни сверху и снизу */
.bulbs { position: relative; }
.bulbs::before, .bulbs::after, .topbar::before, .topbar::after {
  --bulb: radial-gradient(circle, #fffbe6 0 1.4px, #ffcf3f 2.3px, rgba(255, 186, 40, .35) 3.2px, transparent 4.6px);
  content: ''; position: absolute; inset: 2px 8px; pointer-events: none; will-change: opacity;
  background: var(--bulb) 0 0 / 12px 9px repeat-x, var(--bulb) 0 100% / 12px 9px repeat-x;
  animation: bulbs-a 1.4s steps(1) infinite;
}
.bulbs::after, .topbar::after { background-position: 6px 0, 6px 100%; animation-name: bulbs-b; }
@keyframes bulbs-a { 0% { opacity: 1; } 50% { opacity: .22; } }
@keyframes bulbs-b { 0% { opacity: .22; } 50% { opacity: 1; } }

/* ---------- шапка-вывеска ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px; min-height: 64px;
  transition: transform .25s ease; will-change: transform;
  padding: 14px; background: linear-gradient(180deg, #8f0c22, #5c0614); border-bottom: 3px solid var(--brass);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .55), inset 0 -1px 0 rgba(255, 255, 255, .15);
}
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--pixel); font-weight: 700; font-size: 19px; letter-spacing: .5px; color: var(--gold); text-shadow: 0 2px 0 #4a0410, 0 0 10px rgba(255, 200, 60, .55); text-transform: uppercase; white-space: nowrap; }
.brand-ico { font-size: 20px; display: flex; }
.brand-sprite { width: 28px; height: 28px; }
.fatal-sprite { width: 72px; height: 72px; }
.back-btn { display: none; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--brass-grad); color: var(--ink); font-size: 24px; line-height: 30px; font-weight: 700; box-shadow: 0 2px 0 #4a0410; }
body.in-game:not(.in-tg) .back-btn { display: block; }
body.hdr-hidden .topbar { transform: translateY(-110%); }
.balance-pill {
  position: fixed; z-index: 21; top: calc(13px + env(safe-area-inset-top)); right: max(14px, calc(50vw - 246px));
  display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px;
  background: rgba(0, 0, 0, .45); border: 2px solid var(--brass); border-radius: 999px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6);
}
/* шапка уехала — пилюля плавает сама по себе: плотнее фон и тень, чтобы читалась поверх любого экрана */
body.hdr-hidden .balance-pill { background: #2a0a0f; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .6), 0 6px 16px rgba(0, 0, 0, .7); }
.balance-pill b { font-family: var(--pixel); font-size: 17px; color: var(--gold); font-variant-numeric: tabular-nums; text-shadow: 0 0 8px rgba(255, 200, 60, .45); }
.balance-pill.up { animation: pill-up .6s; }
.balance-pill.down { animation: pill-down .6s; }
@keyframes pill-up { 30% { border-color: var(--green); box-shadow: 0 0 0 3px rgba(70, 226, 138, .35), inset 0 2px 6px rgba(0, 0, 0, .6); } }
@keyframes pill-down { 30% { border-color: var(--red-text); } }

/* настоящая глиняная фишка: вставки по краю, кольцо, центр */
.chip-dot, .casino-chip {
  --c: var(--red);
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--c) 0 50%, rgba(255, 255, 255, .92) 51% 55%, var(--c) 56% 66%, transparent 67%),
    repeating-conic-gradient(var(--c) 0 30deg, #f7f1e3 30deg 45deg);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(0, 0, 0, .35);
}
.chip-dot { width: 24px; height: 24px; flex: none; }

/* ---------- нижнее меню: дерево и латунь ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; max-width: 520px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 7px 6px calc(7px + var(--sb));
  background: var(--wood-bg); border-top: 3px solid var(--brass);
  box-shadow: 0 -6px 18px rgba(0, 0, 0, .55);
}
body.in-game .tabbar { display: none; }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0 5px; font-family: var(--pixel); font-size: 11px; color: #e8cfa6; border-radius: 10px; text-shadow: 0 1px 0 rgba(0, 0, 0, .6); }
.tabbar a span { font-size: 20px; line-height: 0; filter: grayscale(.5) brightness(.85); transition: filter .2s, transform .2s; }
.tab-sprite { width: 24px; height: 24px; }
.tabbar a.active { color: var(--ink); background: var(--brass-grad); text-shadow: none; box-shadow: 0 2px 0 #3a1a08, inset 0 1px 0 rgba(255, 255, 255, .5); }
.tabbar a.active span { filter: none; transform: translateY(-1px); }

/* ---------- кнопки: лак, латунь, «толстая» тень ---------- */
.btn {
  --sh: #2a0f08;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px;
  padding: 0 18px; border-radius: 12px; font-family: var(--pixel); font-weight: 600; font-size: 16px; letter-spacing: .3px;
  color: var(--text); background: var(--wood-bg); border: 2px solid var(--brass-dark);
  box-shadow: 0 4px 0 var(--sh), 0 7px 14px rgba(0, 0, 0, .45);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .4); transition: transform .06s, box-shadow .06s, filter .2s;
}
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--sh), 0 3px 8px rgba(0, 0, 0, .45); }
.btn:disabled { filter: grayscale(.55) brightness(.75); }
.btn-primary { --sh: #5a0412; color: #fff; background: linear-gradient(180deg, #ee2846, var(--red) 55%, #9b0b23); border-color: var(--brass-light); }
.btn-primary::after { content: ''; position: absolute; left: 8%; right: 8%; top: 3px; height: 38%; border-radius: 10px; background: linear-gradient(180deg, rgba(255, 255, 255, .35), transparent); pointer-events: none; }
.btn-win { --sh: #07401e; color: #fff; background: linear-gradient(180deg, #31c46c, #1a9249 55%, #116b34); border-color: var(--brass-light); }
.btn-warn { --sh: #6b2c00; color: #fff; background: linear-gradient(180deg, #ffa13c, #e46a0c); border-color: var(--brass-light); }
.btn-ghost { min-height: 38px; padding: 0 12px; font-size: 14px; color: var(--brass-light); background: rgba(0, 0, 0, .3); border: 2px solid var(--brass-dark); box-shadow: 0 3px 0 rgba(0, 0, 0, .5); }
.btn-big { width: 100%; min-height: 56px; font-size: 20px; border-radius: 14px; text-transform: uppercase; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; box-shadow: 0 3px 0 var(--sh); }
.btn-wide { width: 100%; min-height: 42px; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { flex: 1; }
.btn-pair { display: flex; gap: 6px; }
.btn-action { min-height: 54px; font-size: 18px; text-transform: uppercase; color: #fff; border-color: var(--brass-light); }
.btn-action[data-act="hit"] { --sh: #07401e; background: linear-gradient(180deg, #2fb865, #157a3c); }
.btn-action[data-act="stand"] { --sh: #5a0412; background: linear-gradient(180deg, #ee2846, #9b0b23); }
.btn-action[data-act="double"] { --sh: #10244f; background: linear-gradient(180deg, #4d8dff, #1f4fb8); }
.btn-action[data-act="split"] { --sh: #351052; background: linear-gradient(180deg, #a35cf0, #6327a8); }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; background: var(--brass-grad); color: var(--ink); font-weight: 700; box-shadow: 0 2px 0 #3a1a08; }
.chip-btn {
  padding: 6px 12px; border-radius: 999px; font-family: var(--pixel); font-size: 14px; color: var(--brass-light);
  background: rgba(0, 0, 0, .35); border: 2px solid var(--brass-dark); box-shadow: 0 2px 0 rgba(0, 0, 0, .5);
}
.chip-btn.active { color: #fff; background: linear-gradient(180deg, #ee2846, #9b0b23); border-color: var(--brass-light); }

/* ---------- панели ---------- */
.card {
  position: relative; padding: 16px; border-radius: var(--radius);
  background: var(--leather-bg); border: 2px solid var(--brass-dark);
  box-shadow: inset 0 0 0 1px rgba(246, 220, 134, .18), 0 8px 18px rgba(0, 0, 0, .45);
}
/* строчка-шов по коже */
.card::before, .controls::before, .list::before {
  content: ''; position: absolute; inset: 5px; border: 1.5px dashed rgba(246, 220, 134, .22); border-radius: calc(var(--radius) - 5px); pointer-events: none;
}
.card > * { position: relative; }
.input, .bet-input {
  width: 100%; min-height: 46px; padding: 0 14px; border-radius: 10px; border: 2px solid var(--brass-dark);
  background: #120604; outline: none; font-family: var(--pixel); font-size: 18px; color: var(--gold);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, .7);
}
.input::placeholder, .bet-input::placeholder { color: #7a6448; }
.input:focus, .bet-input:focus { border-color: var(--brass-light); box-shadow: inset 0 3px 8px rgba(0, 0, 0, .7), 0 0 0 3px rgba(212, 165, 55, .25); }
.field-label { display: block; margin: 0 0 6px; font-family: var(--pixel); font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--brass); }
.hint { margin: 4px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.two-col { display: grid; grid-template-columns: auto 1fr; gap: 12px; }
.quick-row { display: flex; flex-wrap: wrap; gap: 6px; }
.picker { max-height: 88px; overflow-y: auto; }

.segmented { display: flex; padding: 4px; gap: 4px; border-radius: 12px; background: #120604; border: 2px solid var(--brass-dark); box-shadow: inset 0 3px 8px rgba(0, 0, 0, .6); }
.segmented button { flex: 1; min-height: 38px; padding: 0 8px; border-radius: 8px; font-family: var(--pixel); font-size: 15px; color: var(--muted); white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.segmented button.active { color: var(--ink); background: var(--brass-grad); box-shadow: 0 2px 0 #3a1a08; }
.segmented.disabled { opacity: .5; pointer-events: none; }

.bet-control.disabled { opacity: .55; }
/* прогресс отыгрыша стартового бонуса — в строке с подписью «Ставка», высоту панели не меняет */
.bet-control { position: relative; }
.wager-note { position: absolute; top: 0; right: 0; font-size: 12px; line-height: 15px; color: var(--gold); white-space: nowrap; }
.wager-note[hidden] { display: none; }
.bet-row { display: grid; grid-template-columns: 1fr repeat(3, auto); gap: 6px; }
.bet-btn { min-width: 48px; min-height: 46px; padding: 0 10px; border-radius: 10px; font-family: var(--pixel); font-size: 16px; color: var(--brass-light); background: var(--wood-bg); border: 2px solid var(--brass-dark); box-shadow: 0 3px 0 #1a0904; }
.bet-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #1a0904; }

/* ---------- тосты и модалки ---------- */
#toasts { position: fixed; top: 6px; left: max(8px, calc(50% - 252px)); width: min(calc(100% - 156px), 330px); z-index: 60; display: flex; flex-direction: column; align-items: stretch; gap: 6px; pointer-events: none; }
.toast {
  padding: 7px 11px; border-radius: 10px; font-family: var(--pixel); font-size: 14px; line-height: 1.25;
  background: var(--leather-bg); border: 2px solid var(--brass); color: var(--text);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .55); animation: toast-in .25s ease-out; transition: opacity .3s, transform .3s;
}
.toast-error { border-color: var(--red-text); background: linear-gradient(180deg, #4a0b12, #2a0509); }
.toast-win { border-color: var(--green); background: linear-gradient(180deg, #0f3d22, #082414); }
.toast-achievement { color: var(--ink); background: var(--brass-grad); border-color: #fff3c4; text-shadow: 0 1px 0 rgba(255, 255, 255, .4); }
.toast.hide { opacity: 0; transform: translateY(-8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(.96); } }
.modal-overlay { position: fixed; inset: 0; z-index: 50; background: rgba(10, 2, 4, .7); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.modal-overlay.hide { opacity: 0; transition: opacity .2s; }
.modal { width: 100%; max-width: 520px; max-height: 85vh; overflow: auto; background: var(--leather-bg); border: 2px solid var(--brass); border-bottom: 0; border-radius: 20px 20px 0 0; padding: 16px 16px calc(22px + var(--sb)); animation: sheet .25s ease-out; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.modal-head h3 { font-family: var(--pixel); font-size: 20px; color: var(--gold); }
@keyframes fade { from { opacity: 0; } }
@keyframes sheet { from { transform: translateY(40px); opacity: .5; } }
.rules { line-height: 1.5; color: #eadcc0; }
.rules ul { padding-left: 18px; margin: 8px 0; }
.rules li { margin: 4px 0; }
.paytable { width: 100%; border-collapse: collapse; margin: 8px 0; font-family: var(--pixel); font-size: 15px; }
.paytable th, .paytable td { padding: 6px 4px; text-align: center; border-bottom: 1px solid rgba(212, 165, 55, .25); }
.paytable th { color: var(--brass); font-weight: 500; }
.pt-sym { font-size: 22px; }

/* ---------- страницы ---------- */
.page { display: flex; flex-direction: column; gap: 14px; }
.page-title { font-family: var(--pixel); font-size: 26px; font-weight: 700; color: var(--gold); text-transform: uppercase; text-shadow: 0 3px 0 #3a0610, 0 0 14px rgba(255, 200, 60, .35); }
.section-title { font-family: var(--pixel); font-size: 15px; font-weight: 600; color: var(--brass); text-transform: uppercase; letter-spacing: 1.5px; margin-top: 6px; display: flex; align-items: center; gap: 10px; }
.section-title::after { content: ''; flex: 1; height: 2px; background: linear-gradient(90deg, var(--brass-dark), transparent); }

/* главная вывеска лобби */
.vegas-sign {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 20px 14px 18px; text-align: center;
  border-radius: 18px; background: radial-gradient(ellipse at 50% 30%, #b0102c, #6e0717 70%); border: 3px solid var(--brass);
  box-shadow: inset 0 0 0 3px #3a0610, inset 0 0 30px rgba(0, 0, 0, .45), 0 10px 26px rgba(0, 0, 0, .55), 0 0 30px rgba(255, 60, 90, .2);
}
.sign-top { font-family: var(--pixel); font-size: 13px; letter-spacing: 3px; color: var(--brass-light); text-transform: uppercase; }
.sign-name { --neon: var(--neon-yellow); font-family: var(--pixel); font-weight: 700; font-size: clamp(30px, 10vw, 44px); line-height: 1.05; text-transform: uppercase; letter-spacing: 1px; animation: flicker 6s infinite; will-change: opacity; }
.sign-sub { margin-top: 6px; padding: 3px 12px; border-radius: 999px; background: rgba(0, 0, 0, .35); font-family: var(--pixel); font-size: 13px; color: #ffd8e0; letter-spacing: 1px; }
@keyframes flicker { 0%, 92%, 94%, 100% { opacity: 1; } 93% { opacity: .55; } }
.hello { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 4px; }
.hello h1 { font-family: var(--pixel); font-size: 18px; font-weight: 600; }
.hello p { margin: 0; color: var(--muted); font-size: 13px; }

/* ежедневный бонус — купон казино */
.daily {
  --hole: var(--carpet);
  position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 10px; color: var(--ink);
  background:
    radial-gradient(circle at 0 50%, var(--hole) 0 9px, transparent 10px),
    radial-gradient(circle at 100% 50%, var(--hole) 0 9px, transparent 10px),
    linear-gradient(180deg, #fff8e6, #efe0bd);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .5);
}
.daily::before { content: ''; position: absolute; inset: 5px 14px; border: 2px dashed rgba(110, 7, 23, .35); border-radius: 6px; pointer-events: none; }
.daily-ready::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: 0 0 22px rgba(255, 210, 87, .55); opacity: 0; will-change: opacity; animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { opacity: 1; } }
.daily-ico { position: relative; font-size: 30px; }
.daily-text { flex: 1; display: flex; flex-direction: column; gap: 2px; position: relative; }
.daily-text b { font-family: var(--pixel); font-size: 22px; color: var(--red-dark); font-variant-numeric: tabular-nums; }
.daily-text span { font-size: 13px; color: #6b4a2a; }
.daily .btn { position: relative; }
/* копилка бонусов: 4 ячейки на купоне */
.daily.bank { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px 22px 14px; }
.bank-head { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.bank-head b { font-family: var(--pixel); font-size: 16px; color: var(--red-dark); letter-spacing: .5px; }
.bank-head span { font-size: 13px; color: #6b4a2a; }
.bank-cells { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.bank-cell { position: relative; height: 62px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: rgba(110, 7, 23, .07); border: 2px dashed rgba(110, 7, 23, .25); color: #6b4a2a; font-size: 11px; text-align: center; contain: layout paint; }
.bank-cell b { font-family: var(--pixel); font-size: 14px; color: var(--red-dark); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bank-cell.full { border: 2px solid var(--brass); background: linear-gradient(180deg, #fffaf0, #f3e2b8); box-shadow: 0 2px 0 var(--brass-dark); }
.bank-cell.full.rnd b { font-size: 18px; }
.bank-cell.next b { font-size: 12px; }
.bank-cell.later span { opacity: .7; }
.bank-ico { width: 24px; height: 24px; image-rendering: pixelated; }
.bank-mult { position: absolute; top: 2px; right: 4px; font-style: normal; font-family: var(--pixel); font-size: 10px; color: var(--red); }
.bank-cell.pop { animation: bank-pop .28s ease-out; }
.bank-cell.taken { transform: translateY(-14px) scale(.85); opacity: 0; transition: transform .32s ease-in, opacity .32s ease-in; }
@keyframes bank-pop { 50% { transform: scale(1.12); } }
.bank-foot { position: relative; display: flex; align-items: center; gap: 10px; }
.bank-note { flex: 1; font-size: 12px; line-height: 1.25; color: #6b4a2a; }
.bank-claim { flex: none; min-width: 128px; }
.bank-claim:disabled { opacity: .55; }

/* игровой зал: игры — неоновые вывески */
.games-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.games-grid > .game-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }  /* нечётная последняя плитка — во всю ширину */
.game-tile {
  --neon: var(--neon-pink);
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 10px 14px; min-height: 132px; text-align: center;
  border-radius: 16px; background: radial-gradient(ellipse at 50% 20%, #241016, #0d0508 75%);
  border: 2px solid #2a1418;
  box-shadow: inset 0 0 0 2px #000, 0 0 0 1px rgba(255, 255, 255, .04), 0 8px 18px rgba(0, 0, 0, .55);
  transition: transform .1s;
}
.game-tile::before { content: none; }
.game-tile:active { transform: scale(.96); }
.tile-ico { margin-top: 2px; line-height: 0; }
.tile-sprite { width: 48px; height: 48px; }
.tile-name { font-family: var(--pixel); font-weight: 700; font-size: 21px; text-transform: uppercase; color: #fff; text-shadow: 0 0 2px #fff, 0 0 7px var(--neon), 0 0 16px var(--neon); }
.tile-desc { font-size: 11.5px; color: #cdb9c0; line-height: 1.25; }
.tile-badge { position: absolute; top: -6px; right: -4px; z-index: 1; padding: 3px 8px; border-radius: 6px; font-family: var(--pixel); font-size: 11px; background: var(--brass-grad); color: var(--ink); box-shadow: 0 2px 0 #3a1a08; animation: flicker 2s infinite; }
.game-tile:nth-child(3n+1) .tile-name { animation: flicker 7s infinite; will-change: opacity; }
.hue-violet { --neon: var(--neon-purple); }
.hue-green { --neon: var(--neon-green); }
.hue-red { --neon: var(--neon-red); }
.hue-orange { --neon: var(--neon-orange); }
.hue-blue { --neon: var(--neon-cyan); }
.hue-teal { --neon: var(--neon-blue); }
.hue-pink { --neon: var(--neon-pink); }
.hue-gold { --neon: var(--neon-yellow); }

.form { display: flex; flex-direction: column; gap: 8px; }
.form .btn-big { margin-top: 6px; }

/* списки — табло на тёмной коже */
.list { position: relative; display: flex; flex-direction: column; border-radius: var(--radius); background: var(--leather-bg); border: 2px solid var(--brass-dark); box-shadow: 0 8px 18px rgba(0, 0, 0, .45); overflow: hidden; }
.row { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid rgba(212, 165, 55, .18); }
.row:last-child { border-bottom: 0; }
.row b { font-family: var(--pixel); font-weight: 600; font-size: 16px; }
.row-me { background: linear-gradient(90deg, rgba(212, 165, 55, .22), transparent); }
.row-ico, .row-rank { width: 30px; text-align: center; font-family: var(--pixel); font-size: 18px; font-weight: 700; color: var(--brass); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-main b, .row-main span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-main span { font-size: 12px; }
.empty { padding: 26px; text-align: center; color: var(--muted); font-family: var(--pixel); }
.my-rank { display: flex; align-items: center; gap: 12px; font-family: var(--pixel); }
.my-rank b { font-size: 28px; color: var(--gold); text-shadow: 0 0 10px rgba(255, 200, 60, .4); }
.my-rank .muted { margin-left: auto; }

.profile-card { display: flex; align-items: flex-start; gap: 14px; }
.profile-main { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.profile-main > b { font-family: var(--pixel); font-size: 21px; }
.avatar { position: relative; flex: none; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle, var(--red) 0 50%, #f7f1e3 51% 55%, var(--red) 56% 66%, transparent 67%), repeating-conic-gradient(var(--red) 0 30deg, #f7f1e3 30deg 45deg);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .5); box-shadow: 0 3px 0 rgba(0, 0, 0, .5); }
.avatar-lvl { position: absolute; right: -6px; bottom: -6px; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 6px; display: grid; place-items: center; font-size: 13px; background: var(--brass-grad); color: var(--ink); text-shadow: none; box-shadow: 0 2px 0 #3a1a08; }
.lvl-bar { height: 10px; border-radius: 4px; background: #120604; overflow: hidden; margin-top: 4px; border: 2px solid var(--brass-dark); }
.lvl-bar > div { height: 100%; background: repeating-linear-gradient(90deg, var(--gold) 0 6px, #e0a526 6px 8px); transition: width .6s; box-shadow: 0 0 8px rgba(255, 200, 60, .6); }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stats-4 { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; min-width: 0; background: #120604; border: 2px solid var(--brass-dark); box-shadow: inset 0 3px 8px rgba(0, 0, 0, .6); }
.stat span { font-size: 11px; color: var(--brass); text-transform: uppercase; letter-spacing: .5px; font-family: var(--pixel); }
.stat b { font-family: var(--pixel); font-size: 20px; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 0 8px rgba(255, 200, 60, .3); }
.stat b.pos { color: var(--green); text-shadow: 0 0 8px rgba(70, 226, 138, .35); }
.stat b.neg { color: var(--red-text); text-shadow: 0 0 8px rgba(255, 107, 107, .35); }
.stats-4 .stat { padding: 8px 6px; }
.stats-4 .stat b { font-size: 16px; }
.stats-4 .stat span { font-size: 10px; }
.fatal { text-align: center; padding: 60px 12px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.fatal h2 { font-family: var(--pixel); font-size: 24px; color: var(--gold); }
.fatal-ico { font-size: 56px; }
.fatal p { color: var(--muted); margin: 0; line-height: 1.5; }

/* ---------- игровой экран ---------- */
.game { display: flex; flex-direction: column; gap: 14px; }
.game-head { display: flex; align-items: center; justify-content: space-between; }
.game-head h2 { --neon: var(--neon-yellow); display: flex; align-items: center; gap: 10px; font-family: var(--pixel); font-size: 26px; font-weight: 700; text-transform: uppercase; color: #fff; text-shadow: 0 0 2px #fff, 0 0 8px var(--neon), 0 0 18px rgba(255, 210, 63, .6); }
.game-head-ico { font-size: 26px; text-shadow: none; }
.stage { display: flex; flex-direction: column; gap: 12px; }
.controls { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--radius); background: var(--leather-bg); border: 2px solid var(--brass-dark); box-shadow: inset 0 0 0 1px rgba(246, 220, 134, .18), 0 8px 18px rgba(0, 0, 0, .5); }
.controls > * { position: relative; }
.result-line { min-height: 26px; text-align: center; font-family: var(--pixel); font-size: 18px; color: var(--muted); }
.result-line.win { color: var(--green); text-shadow: 0 0 10px rgba(70, 226, 138, .5); }
.result-line.lose { color: var(--muted); }
.result-line.big { --neon: var(--neon-yellow); font-size: 21px; color: #fff; text-shadow: 0 0 2px #fff, 0 0 8px var(--neon), 0 0 18px var(--neon); animation: pulse 1s ease-in-out 3; }
@keyframes pulse { 50% { transform: scale(1.07); } }
.recent { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-height: 28px; }
.recent::-webkit-scrollbar { display: none; }
.recent-num { flex: none; min-width: 32px; padding: 4px 8px; border-radius: 6px; font-family: var(--pixel); font-size: 14px; text-align: center; background: #120604; border: 1px solid var(--brass-dark); }
.recent-num.hi { color: var(--green); }
.recent-num.lo { color: var(--red-text); }

/* стол из сукна в деревянном борте (общий стиль для столов) */
.felt, .roulette-board, .mines-grid, .dice-stage {
  position: relative; border: 10px solid transparent;
  background: var(--felt-bg) padding-box, var(--wood-bg) border-box;
  box-shadow: inset 0 0 0 2px rgba(246, 220, 134, .55), inset 0 0 40px rgba(0, 0, 0, .45), 0 0 0 1px #1a0904, 0 10px 24px rgba(0, 0, 0, .6);
}

/* ---------- слоты: автомат ---------- */
.slot-cabinet { position: relative; padding-right: 16px; }
.slot-machine {
  position: relative; padding: 0 12px 14px; border-radius: 26px 26px 16px 16px;
  background: linear-gradient(90deg, #6e0717, #c8102e 18%, #e0213e 50%, #c8102e 82%, #6e0717);
  border: 4px solid; border-color: #f2f2f2 #9a9a9a #6a6a6a #c4c4c4;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .6), inset 0 0 0 2px rgba(0, 0, 0, .25);
}
.slot-top {
  position: relative; margin: 10px 0 12px; padding: 14px 8px 12px; border-radius: 16px 16px 8px 8px; text-align: center;
  background: radial-gradient(ellipse at 50% 30%, #2a0610, #0b0204 80%); border: 3px solid var(--brass);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, .7);
}
.slot-top .neon { --neon: var(--neon-yellow); display: block; font-family: var(--pixel); font-weight: 700; font-size: 26px; letter-spacing: 2px; text-transform: uppercase; animation: flicker 5s infinite; }
.slot-top small { display: block; margin-top: 2px; font-family: var(--pixel); font-size: 12px; color: var(--neon-pink); text-shadow: 0 0 6px var(--neon-pink); letter-spacing: 1px; }
.reels-window { position: relative; padding: 8px; border-radius: 12px; background: #0b0204; border: 3px solid var(--brass); box-shadow: inset 0 0 0 2px #000; }
.reels-window::after { content: ''; position: absolute; inset: 8px; border-radius: 8px; pointer-events: none; background: linear-gradient(180deg, rgba(255, 255, 255, .18), transparent 30%, transparent 70%, rgba(0, 0, 0, .25)); }
.reels { --reels: 5; --cell: clamp(50px, calc((min(100vw, 520px) - 110px) / var(--reels) - 5px), 96px); display: grid; grid-template-columns: repeat(var(--reels), var(--cell)); justify-content: center; gap: 5px; }
.reel { height: calc(var(--cell) * 3); overflow: hidden; border-radius: 6px; background: linear-gradient(180deg, #8f877a, #fffaf0 22%, #fffaf0 78%, #8f877a); box-shadow: inset 0 10px 10px -6px rgba(0, 0, 0, .55), inset 0 -10px 10px -6px rgba(0, 0, 0, .55); }
.reel-strip { will-change: transform; }
.cell { height: var(--cell); display: grid; place-items: center; }
.cell .sym { width: calc(var(--cell) * .74); height: calc(var(--cell) * .74); }
.cell { position: relative; }
.cell.win::after, .cell.scatter-hit::after { content: ''; position: absolute; inset: 1px; border-radius: 6px; pointer-events: none;
  background: rgba(255, 210, 87, .55); box-shadow: inset 0 0 0 3px #e0a526; animation: cell-win .6s steps(2) infinite alternate; will-change: opacity; }
.cell.scatter-hit::after { background: rgba(197, 139, 255, .5); box-shadow: inset 0 0 0 3px #b36bff; }
.cell .sym { position: relative; z-index: 1; }
@keyframes cell-win { from { opacity: .35; } to { opacity: 1; } }
.lever { position: absolute; right: -4px; top: 34%; width: 14px; height: 116px; transform-origin: 50% 100%; z-index: 1; }
.lever::before { content: ''; position: absolute; left: 4px; top: 18px; bottom: 0; width: 6px; border-radius: 3px; background: linear-gradient(90deg, #8a8a8a, #f4f4f4, #8a8a8a); }
.lever::after { content: ''; position: absolute; left: -5px; top: 0; width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff8a9a, var(--red) 50%, #5a0412); box-shadow: 0 3px 0 rgba(0, 0, 0, .4); }
.lever-base { position: absolute; right: -8px; top: calc(34% + 100px); width: 24px; height: 34px; border-radius: 6px; background: linear-gradient(90deg, #6a6a6a, #e6e6e6, #6a6a6a); box-shadow: 0 3px 8px rgba(0, 0, 0, .5); }
.lever.pull { animation: pull .6s ease-in-out; }
@keyframes pull { 40% { transform: scaleY(-0.5); } }

/* ---------- блэкджек и карты ---------- */
.felt { display: flex; flex-direction: column; gap: 10px; min-height: 390px; padding: 16px 12px 34px; border-radius: 26px 26px 50% 50% / 26px 26px 26% 26%; }
.felt-arc { width: 100%; height: auto; margin: -2px 0; overflow: visible; }
.felt-arc text { font-family: var(--pixel); font-weight: 700; fill: rgba(255, 236, 190, .78); letter-spacing: 1.5px; }
.felt-arc .arc-small { font-weight: 500; fill: rgba(255, 236, 190, .45); }
.felt-text { display: none; }
.bj-side { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bj-label { display: flex; align-items: center; gap: 8px; font-family: var(--pixel); font-size: 14px; letter-spacing: 2px; text-transform: uppercase; color: rgba(255, 236, 190, .8); }
.cards { display: flex; justify-content: center; min-height: 90px; }
.cards .pcard + .pcard { margin-left: -28px; }
.pcard {
  position: relative; width: 62px; height: 90px; flex: none; border-radius: 7px; color: #1d1712;
  background: linear-gradient(160deg, #fffdf6, var(--cream)); border: 1px solid #d8cdb3;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .25), 0 6px 12px rgba(0, 0, 0, .35);
}
.pcard.red { color: #c8102e; }
.c-rank { position: absolute; top: 4px; left: 5px; font-family: var(--pixel); font-weight: 700; font-size: 18px; line-height: 1; }
.c-suit { position: absolute; top: 22px; left: 5px; font-size: 13px; line-height: 1; }
.c-big { position: absolute; inset: 0; display: grid; place-items: center; font-size: 32px; line-height: 1; padding: 10px 0 0 8px; }
.c-corner { position: absolute; right: 5px; bottom: 4px; transform: rotate(180deg); display: flex; flex-direction: column; align-items: center; line-height: 1; font-family: var(--pixel); font-weight: 700; font-size: 13px; }
.pcard.back {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .18) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .18) 0 2px, transparent 2px 7px),
    linear-gradient(160deg, #c8203a, #8e0c22);
  border: 4px solid var(--cream); box-shadow: inset 0 0 0 1px #8e0c22, 0 3px 0 rgba(0, 0, 0, .25), 0 6px 12px rgba(0, 0, 0, .35);
}
.deal-in { animation: deal .32s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes deal { from { opacity: 0; transform: translate(50px, -80px) rotate(14deg) scale(.8); } }
.hands { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: auto; }
.hand { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px; border-radius: 14px; border: 2px dashed transparent; transition: border-color .2s; }
.hand.active { border-color: var(--brass-light); background: rgba(255, 220, 120, .08); }
.hand-meta { display: flex; align-items: center; gap: 8px; font-family: var(--pixel); font-size: 14px; }
.total-badge { min-width: 32px; padding: 2px 8px; border-radius: 6px; font-family: var(--pixel); font-weight: 700; font-size: 15px; text-align: center; color: var(--ink); background: var(--brass-grad); box-shadow: 0 2px 0 rgba(0, 0, 0, .4); }
.total-badge:empty { display: none; }
.total-badge.bust { color: #fff; background: linear-gradient(180deg, #ee2846, #9b0b23); }
.bj-banner { align-self: center; padding: 0 20px; border-radius: 10px; font-family: var(--pixel); font-weight: 700; font-size: 24px; background: rgba(0, 0, 0, .6); border: 2px solid var(--brass); opacity: 0; transform: scale(.8); transition: all .25s; }
.bj-banner.show { opacity: 1; transform: none; padding: 6px 20px; }
.felt-hint { align-self: center; margin-bottom: 40px; padding: 8px 16px; border-radius: 8px; background: rgba(0, 0, 0, .3); color: rgba(255, 236, 190, .8); font-family: var(--pixel); font-size: 15px; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- рулетка ---------- */
.wheel-wrap { display: flex; justify-content: center; padding: 6px 0; }
.wheel-stack { position: relative; width: min(80vw, 310px); aspect-ratio: 1; border-radius: 50%; box-shadow: 0 14px 24px rgba(0, 0, 0, .55); }
.wheel-stack > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wheel-rotor { position: absolute; inset: 0; border-radius: 50%; will-change: transform; transition: transform 3.2s cubic-bezier(.12, .6, .12, 1); }
.wheel-rotor > svg { width: 100%; height: 100%; overflow: visible; display: block; }
.rw-rim { fill: #5a2a14; stroke: var(--brass); stroke-width: 3; }
.rw-seg { stroke: #d4a537; stroke-width: .6; }
.rw-red { fill: #b3122a; }
.rw-black { fill: #141414; }
.rw-green { fill: #0f7a45; }
.rw-num { fill: #fbf4e2; font-family: var(--pixel); font-size: 9px; font-weight: 700; text-anchor: middle; dominant-baseline: middle; }
.rw-inner { fill: #6b3418; stroke: var(--brass); stroke-width: 2; }
.rw-spoke { stroke: var(--brass); stroke-width: 4; stroke-linecap: round; }
.rw-hub { fill: var(--brass); stroke: #85601a; stroke-width: 2; }
.rw-ball { position: absolute; left: 50%; top: 50%; z-index: 2; width: 5.2%; height: 5.2%; margin: -2.6% 0 0 -2.6%; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff 0 18%, #e9e9e9 45%, #8f8f8f 100%); box-shadow: 0 1px 2px rgba(0, 0, 0, .7);
  opacity: 0; will-change: transform; pointer-events: none; }
.rw-ball.show { opacity: 1; }
.rw-label { font-family: var(--pixel); font-size: 22px; font-weight: 700; text-anchor: middle; fill: var(--ink); }
.rw-bg-red { background: #b3122a; color: #fff; }
.rw-bg-black { background: #141414; color: #fff; }
.rw-bg-green { background: #0f7a45; color: #fff; }

.chip-row { display: flex; gap: 10px; overflow-x: auto; padding: 10px 4px 8px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.casino-chip { flex: none; width: 50px; height: 50px; font-family: var(--pixel); font-size: 14px; font-weight: 700; color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .6), 0 0 3px rgba(0, 0, 0, .8); transition: transform .12s; }
.casino-chip.active { transform: translateY(-5px) scale(1.08); box-shadow: 0 0 0 3px var(--gold), 0 8px 12px rgba(0, 0, 0, .5); }
.casino-chip.c10 { --c: #2a6fd6; }
.casino-chip.c50 { --c: #c8102e; }
.casino-chip.c100 { --c: #1c1c1c; }
.casino-chip.c500 { --c: #6b2bbf; }
.casino-chip.c1000 { --c: #e0a526; color: #2a1a05; text-shadow: 0 1px 0 rgba(255, 255, 255, .4); }
.casino-chip.c5000 { --c: #0f8a4a; }

.roulette-board { display: flex; flex-direction: column; padding: 8px; border-radius: 14px; }
.roulette-board.locked { pointer-events: none; }
.roulette-board { gap: 8px; }
.rb-cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 46px; padding: 0 2px;
  border-radius: 9px; font-family: var(--pixel); font-weight: 700; font-size: 17px; color: #fff; border: 1.5px solid rgba(255, 255, 255, .55);
  background: rgba(0, 0, 0, .14); text-shadow: 0 1px 0 rgba(0, 0, 0, .5); touch-action: manipulation; }
.rb-cell:active { transform: scale(.96); }
.rb-outside, .rb-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rb-outside { grid-template-columns: repeat(6, 1fr); gap: 5px; }
.rb-diamond { display: block; width: 28px; height: 20px; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.rb-diamond.red { background: #ff2a48; }
.rb-diamond.black { background: #0a0a0a; }
/* как на сукне: ромбы цвета на нейтральной клетке, а не залитые клетки */
.rb-outside .rb-red-out, .rb-outside .rb-black-out { background: rgba(0, 0, 0, .14) !important; }
.rb-outside .rb-cell { min-height: 50px; font-size: 13px; padding: 0 1px; }
.rb-cols .rb-cell { min-height: 48px; font-size: 16px; }
.rb-zero { min-height: 46px; background: linear-gradient(180deg, #1aa35c, #0b6b39); border-radius: 22px; }
.rb-sector { display: flex; flex-direction: column; gap: 5px; padding: 6px; border-radius: 12px; background: rgba(0, 0, 0, .16); border: 1px solid rgba(255, 255, 255, .14); }
.rb-numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.rb-numbers .rb-cell { min-height: 46px; font-size: 18px; border-width: 1px; }
.rb-cell.rb-red { background: linear-gradient(180deg, #d01a35, #9b0b23); }
.rb-cell.rb-black { background: linear-gradient(180deg, #2a2a2e, #0b0b0d); }
.rb-dozen { min-height: 38px; flex-direction: row; gap: 8px; font-size: 15px; border-style: dashed; }
.rb-sub { font-size: 10px; font-weight: 400; letter-spacing: 0; color: rgba(255, 255, 255, .7); }
.rb-col { font-size: 13px; }
.rb-cell.cover { box-shadow: inset 0 0 0 2px var(--brass-light); }
.roulette-wheel { display: flex; justify-content: center; padding: 4px 0 2px; cursor: pointer; }
.roulette-wheel .wheel-stack { width: min(64vw, 250px); }
.rb-out { font-size: 14px; letter-spacing: .5px; }
.rb-red-out .rb-label, .rb-black-out .rb-label { display: inline-block; width: 28px; height: 18px; font-size: 0; vertical-align: middle; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.rb-red-out .rb-label { background: #e0213e; }
.rb-black-out .rb-label { background: #0b0b0b; }
.rb-cell.hit { z-index: 1; box-shadow: inset 0 0 0 3px var(--gold), 0 0 16px rgba(255, 210, 87, .8); background: rgba(255, 210, 87, .22); }
.bet-badge {
  position: absolute; top: 50%; right: 3px; transform: translateY(-50%); min-width: 26px; height: 26px; padding: 0 2px;
  display: grid; place-items: center; border-radius: 50%; font-size: 10px; color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .8);
  background: radial-gradient(circle, #1f4fb8 0 52%, #fff 53% 58%, #1f4fb8 59% 66%, transparent 67%), repeating-conic-gradient(#1f4fb8 0 30deg, #f7f1e3 30deg 45deg);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .5);
}
.bet-badge:empty { display: none; }
.bet-summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: var(--pixel); font-size: 15px; color: var(--muted); }
.bet-summary b { color: var(--gold); }

/* ---------- колесо фортуны (Big Six) ---------- */
.fw-rim { fill: #5a2a14; stroke: var(--brass); stroke-width: 4; }
.fw-seg { stroke: #2a1408; stroke-width: 1; }
.fw-peg { fill: var(--brass-light); stroke: #5a3a08; stroke-width: .8; }
.fw-hub { fill: #2a1408; stroke: var(--brass); stroke-width: 3; }
.fw-center { font-family: var(--pixel); font-size: 17px; font-weight: 700; text-anchor: middle; fill: var(--text); }
.fw-flapper { fill: #2a1408; stroke: var(--brass-light); stroke-width: 1.5; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.legend-item { display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; font-family: var(--pixel); font-size: 14px; background: #120604; border: 1px solid var(--brass-dark); }
.legend-dot { width: 12px; height: 12px; border-radius: 3px; }

/* ---------- кости: светодиодное табло на сукне ---------- */
.dice-stage { padding: 18px 14px 14px; border-radius: 14px; }
.dice-roll {
  margin: 0 auto 22px; padding: 6px 18px; width: fit-content; min-width: 200px; text-align: center; border-radius: 10px;
  font-family: var(--pixel); font-weight: 700; font-size: 56px; color: #ffb000; text-shadow: 0 0 8px rgba(255, 176, 0, .8), 0 0 22px rgba(255, 176, 0, .45);
  background: #0a0202; border: 3px solid var(--brass-dark); box-shadow: inset 0 0 18px rgba(0, 0, 0, .9); font-variant-numeric: tabular-nums;
}
.dice-roll.pos { color: #3dff8a; text-shadow: 0 0 8px rgba(61, 255, 138, .8), 0 0 22px rgba(61, 255, 138, .5); }
.dice-roll.neg { color: #ff3b30; text-shadow: 0 0 8px rgba(255, 59, 48, .8), 0 0 22px rgba(255, 59, 48, .5); }
.dice-track { position: relative; }
.dice-range { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; border-radius: 4px; outline: none; margin: 0; border: 2px solid rgba(0, 0, 0, .5); }
.dice-range::-webkit-slider-thumb { -webkit-appearance: none; width: 34px; height: 34px; border-radius: 50%; cursor: grab; background: radial-gradient(circle, #1c1c1c 0 50%, #fff 51% 55%, #1c1c1c 56% 66%, transparent 67%), repeating-conic-gradient(#1c1c1c 0 30deg, #f7f1e3 30deg 45deg); box-shadow: 0 3px 0 rgba(0, 0, 0, .5); }
.dice-range::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #1c1c1c; border: 4px dashed #f7f1e3; }
.dice-marker { position: absolute; top: -38px; transform: translateX(-50%); opacity: 0; transition: left .35s ease-out, opacity .2s; pointer-events: none; }
.dice-marker.show { opacity: 1; }
.dice-marker span { display: block; padding: 3px 7px; border-radius: 5px; font-family: var(--pixel); font-size: 14px; background: #0a0202; border: 1px solid var(--brass); }
.dice-marker.pos span { color: #3dff8a; }
.dice-marker.neg span { color: #ff3b30; }
/* кости: два кубика на сукне */
.cubes-table { position: relative; height: 240px; overflow: hidden; border-radius: 18px; border: 8px solid transparent;
  background: var(--felt-bg) padding-box, var(--wood-bg) border-box; box-shadow: inset 0 0 0 2px rgba(246, 220, 134, .45), 0 10px 22px rgba(0, 0, 0, .55); }
.cubes-table.win { box-shadow: inset 0 0 0 2px var(--gold), 0 0 22px rgba(255, 210, 87, .45), 0 10px 22px rgba(0, 0, 0, .55); }
.dice-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.cubes-sum { position: absolute; left: 0; right: 0; top: 12px; z-index: 3; pointer-events: none; font-family: var(--pixel); font-size: 22px; color: var(--cream); text-shadow: 0 2px 0 rgba(0, 0, 0, .6); min-height: 28px; text-align: center; }
.cubes-table.win .cubes-sum { color: var(--gold); }
.cubes-sum.pending { opacity: .45; }
.cubes-bets { display: flex; flex-direction: column; gap: 8px; }
.cubes-bets .field-label { margin: 4px 0 0; }
.cubes-main { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cubes-sums { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.cubes-bet { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; padding: 4px; border-radius: 12px;
  font-family: var(--pixel); color: var(--text); background: #120604; border: 2px solid #3a2410; touch-action: manipulation; }
.cubes-bet b { font-size: 15px; color: var(--brass-light); }
.cubes-bet span { font-size: 12px; color: var(--muted); }
.cubes-bet.small { min-height: 48px; }
.cubes-bet.small b { font-size: 17px; }
.cubes-bet.small span { font-size: 10px; }
.cubes-bet.wide { flex-direction: row; gap: 10px; min-height: 44px; }
.cubes-bet.active { border-color: var(--brass-light); background: rgba(212, 165, 55, .2); }
.cubes-bet.active b { color: var(--gold); }
.cubes-bet:active { transform: scale(.96); }
.dice-scale { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--pixel); font-size: 12px; color: rgba(255, 236, 190, .7); }

/* ---------- мины: карты рубашкой вверх ---------- */
.mines-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 12px; border-radius: 16px; }
.tile {
  aspect-ratio: 5 / 6; border-radius: 7px; font-size: clamp(22px, 7vw, 32px);
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .16) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .16) 0 2px, transparent 2px 6px),
    linear-gradient(160deg, #2a5bd0, #13307a);
  border: 3px solid var(--cream); box-shadow: inset 0 0 0 1px #13307a, 0 3px 0 rgba(0, 0, 0, .35);
  transition: transform .12s;
}
.mines-grid.live .tile:not(.gem) {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .18) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .18) 0 2px, transparent 2px 6px),
    linear-gradient(160deg, #c8203a, #8e0c22);
  box-shadow: inset 0 0 0 1px #8e0c22, 0 3px 0 rgba(0, 0, 0, .35);
}
.mines-grid.live .tile:not(.gem):active { transform: scale(.93) rotate(-2deg); }
.tile.pending { animation: pending .4s infinite alternate; }
@keyframes pending { to { transform: rotateY(60deg); } }
.tile.gem { background: linear-gradient(160deg, #fffdf6, var(--cream)) !important; border-color: #d8cdb3; box-shadow: 0 3px 0 rgba(0, 0, 0, .3) !important; animation: flip .3s; }
.tile.mine { background: linear-gradient(160deg, #2a2a2a, #0b0b0b) !important; border-color: #5a5a5a; box-shadow: 0 3px 0 rgba(0, 0, 0, .3) !important; }
.tile.boom { background: radial-gradient(circle, #ffd23f, #ff6a00 45%, #7a0a0a) !important; border-color: #ffd23f; animation: flip .3s; }
.tile.dim { opacity: .75; }
.tile:disabled:not(.gem):not(.mine) { opacity: .7; }
@keyframes flip { from { transform: rotateY(90deg); } }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.mines-ctl { display: flex; flex-direction: column; gap: 8px; }
.stepper { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; }
.stepper-val { text-align: center; font-family: var(--pixel); font-size: 28px; color: var(--gold); }

/* ---------- краш: старый ЭЛТ-монитор ---------- */
.crash-box {
  position: relative; height: 270px; border-radius: 26px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 50%, #1d1a10, #070604 80%);
  border: 14px solid; border-color: #3a3a3a #1e1e1e #141414 #2b2b2b;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, .9), inset 0 0 0 2px #000, 0 0 0 2px #0a0a0a, 0 10px 24px rgba(0, 0, 0, .6);
}
.crash-box::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: 12px;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .25) 0 1px, transparent 1px 3px), radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, .08), transparent 50%); }
.crash-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.crash-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; z-index: 1; }
.crash-mult { font-family: var(--pixel); font-weight: 700; font-size: 60px; color: #ffb000; text-shadow: 0 0 10px rgba(255, 176, 0, .8), 0 0 26px rgba(255, 176, 0, .45); font-variant-numeric: tabular-nums; }
.crash-mult.neg { color: #ff4b3e; text-shadow: 0 0 10px rgba(255, 75, 62, .8), 0 0 26px rgba(255, 75, 62, .45); }
.crash-mult.pos { color: #3dff8a; text-shadow: 0 0 10px rgba(61, 255, 138, .8), 0 0 26px rgba(61, 255, 138, .45); }
.crash-mult.countdown { font-size: 72px; }
.crash-sub { font-family: var(--pixel); font-size: 15px; color: #d9b36a; text-align: center; padding: 0 12px; text-shadow: 0 0 6px rgba(0, 0, 0, .9); }
.crash-sub.pos { color: #3dff8a; }
.crash-sub.neg { color: #ff6b5e; }
.players .row { padding: 10px 16px; }

/* ---------- плинко: автомат с латунными штырьками ---------- */
.plinko-box { position: relative; padding: 10px 0 12px; border-radius: 18px; overflow: hidden; border: 10px solid transparent;
  background: var(--noise) padding-box, radial-gradient(ellipse at 50% 0%, #3a1a10, #160805 75%) padding-box, var(--wood-bg) border-box;
  box-shadow: inset 0 0 0 2px rgba(246, 220, 134, .5), inset 0 0 30px rgba(0, 0, 0, .6), 0 10px 24px rgba(0, 0, 0, .6); }
.plinko-canvas { display: block; width: 100%; }
.buckets { display: grid; gap: 2px; margin-top: 2px; }
.bucket { padding: 6px 0; border-radius: 4px 4px 7px 7px; font-family: var(--pixel); font-size: 11px; font-weight: 700; color: #1a0f00; text-align: center; overflow: hidden; white-space: nowrap; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }
.buckets.dense .bucket { font-size: 9px; letter-spacing: -.3px; }
.bucket.hit { animation: bucket .45s ease-out; }
@keyframes bucket { 40% { transform: translateY(6px); filter: brightness(1.5); } }

/* ---------- сквады, дуэли, достижения ---------- */
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 75; }
.join-page { padding-top: 20px; }
.join-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.join-hero p { margin: 0; line-height: 1.5; max-width: 340px; }
.hint-card { font-size: 14px; line-height: 1.6; }
.duel-overlay { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; background: rgba(10, 2, 4, .75); animation: fade .2s; padding: 16px; }
.duel-card { width: min(100%, 340px); padding: 24px 18px; border-radius: 22px; text-align: center; display: flex; flex-direction: column; gap: 12px; animation: sheet .3s ease-out;
  border: 10px solid transparent; background: var(--felt-bg) padding-box, var(--wood-bg) border-box; box-shadow: inset 0 0 0 2px rgba(246, 220, 134, .55), 0 18px 40px rgba(0, 0, 0, .7); }
.duel-card h2 { font-family: var(--pixel); font-size: 30px; text-shadow: 0 3px 0 rgba(0, 0, 0, .5); }
.duel-card p { margin: 0; font-size: 13px; color: rgba(255, 236, 190, .7); }
.duel-faces { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.duel-faces > div { display: flex; flex-direction: column; gap: 6px; padding: 12px 6px; border-radius: 12px; background: rgba(0, 0, 0, .3); font-family: var(--pixel); }
.dice-faces { font-size: 44px; line-height: 1; letter-spacing: 4px; color: var(--cream); }
.duel-coin { font-size: 84px; animation: coin-flip 1s ease-out; }
@keyframes coin-flip { 0% { transform: rotateY(0) scale(.6); } 70% { transform: rotateY(1440deg) scale(1.1); } 100% { transform: rotateY(1440deg) scale(1); } }
.club-card { display: flex; flex-direction: column; gap: 10px; }
.club-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.club-head .field-label { margin: 0; }
.club-head b { font-family: var(--pixel); font-size: 20px; color: var(--gold); }
.club-card .segmented { flex-wrap: wrap; }
.invite-text { word-break: break-all; font-family: ui-monospace, monospace; }
/* сквады */
.club-head .squad-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.squad-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mode-badge { padding: 4px 10px; border-radius: 999px; font-family: var(--pixel); font-size: 14px; color: var(--cream, #ffe9c2); background: rgba(0, 0, 0, .35); border: 2px solid var(--brass-dark); }
.mode-badge.mode-hidden { border-color: #6c5a9a; }
.mode-badge.mode-private { border-color: #2f8f8a; }
.mode-list { display: flex; flex-direction: column; gap: 6px; }
.mode-list.disabled { opacity: .55; pointer-events: none; }
.mode-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; text-align: left; background: #120604; border: 2px solid #3a2410; color: var(--muted); }
.mode-opt.active { border-color: var(--brass-light); background: rgba(212, 165, 55, .14); color: var(--text); }
.mode-ico { flex: none; display: flex; }
.mode-sprite { width: 32px; height: 32px; }
.badge-sprite { width: 20px; height: 20px; }
.mode-badge, .members-btn { display: inline-flex; align-items: center; gap: 6px; }
.mode-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mode-text b { font-family: var(--pixel); font-size: 15px; color: var(--brass-light); }
.mode-opt.active .mode-text b { color: var(--gold); }
.mode-text span { font-size: 12px; line-height: 1.35; }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.inline-form .btn { min-height: 46px; }
.or-sep { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.or-sep::before, .or-sep::after { content: ''; flex: 1; height: 1px; background: rgba(246, 220, 134, .2); }
.squad-more summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 4px 0; }
.squad-more[open] { display: flex; flex-direction: column; gap: 8px; }
.btn-danger { --sh: #5a0412; color: #fff; background: linear-gradient(180deg, #b3122d, #6e0717); border-color: var(--brass-dark); }
.btn-danger-text { color: var(--red-text); }
.top-tabs { margin-bottom: 10px; }
.wager-card { display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: left; color: var(--text); margin-top: 12px; }
.wager-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.wager-head b { font-family: var(--pixel); font-size: 16px; color: var(--gold); }
.squad-switch { display: flex; flex-direction: column; gap: 6px; }
.squad-switch .field-label { margin: 0; }
.squad-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.squad-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.squad-chat { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.squad-chat { flex-wrap: wrap; }
.squad-chat > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.squad-chat-hint { flex-basis: 100%; font-size: 12px; line-height: 1.35; }
.squad-chat-btns { display: flex; gap: 6px; flex-shrink: 0; }
.squad-add { color: var(--gold); border-style: dashed; }
.chip-sprite { width: 18px; height: 18px; flex: none; }
.squad-create.compact .mode-opt { padding: 6px 10px; }
.squad-create.compact .mode-text span { display: none; }
.mate-sprite { width: 16px; height: 16px; margin-left: 6px; vertical-align: -2px; }
.ach-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ach { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; min-width: 0; background: #120604; border: 2px solid #3a2410; }
.ach-ico { font-size: 26px; filter: grayscale(1) brightness(.6); opacity: .5; }
.ach-name { font-family: var(--pixel); font-size: 11px; color: #7a6448; text-align: center; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ach.done { border-color: var(--brass); background: radial-gradient(ellipse at 50% 0%, #4a3410, #1a0d04); box-shadow: 0 0 12px rgba(255, 200, 60, .25); }
.ach.done .ach-ico { filter: none; opacity: 1; text-shadow: 0 0 8px rgba(255, 200, 60, .6); }
.ach.done .ach-name { color: var(--gold); }

@media (max-width: 360px) {
  .stats-4 { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .ach-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .bulbs::before, .bulbs::after, .topbar::before, .topbar::after, .sign-name, .tile-name, .tile-badge, .daily-ready { animation: none !important; }
}
body.no-club .back-btn, body.no-club .tabbar { display: none !important; }

/* выбор режима бонуса под купоном */
.bonus-mode { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.bonus-mode .segmented { flex: 1; }
.bonus-mode .segmented button { font-size: 14px; }

/* аватарки: буква строго по центру (пиксельный шрифт смещал её из-за метрик), фото — в латунном канте */
.avatar-letter { font-family: var(--font); font-weight: 800; line-height: 1; font-size: 26px; display: block; transform: translateY(.02em); }
.avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar.has-photo { background: var(--brass-grad); padding: 3px; }
.avatar.has-photo .avatar-img { inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); }
.avatar.has-photo .avatar-letter { visibility: hidden; }
.avatar-lg { width: 62px; height: 62px; }
.avatar-sm { width: 34px; height: 34px; box-shadow: 0 2px 0 rgba(0, 0, 0, .45); }
.avatar-sm .avatar-letter { font-size: 15px; }
.avatar-sm.has-photo { padding: 2px; }
.avatar-sm.has-photo .avatar-img { inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); }
.avatar-lvl { z-index: 1; }

/* ставка больше баланса — подсвечиваем, но не меняем молча */
.bet-input.over { border-color: var(--red-text); color: var(--red-text); }

/* ---------- свои пиксельные символы и автоматы ---------- */
.sprite { image-rendering: pixelated; image-rendering: crisp-edges; display: inline-block; vertical-align: middle; user-select: none; -webkit-user-drag: none; }
.game-head-ico .sprite { width: 30px; height: 30px; }
.row-sprite { width: 26px; height: 26px; }
.sym-blank { display: block; width: 40%; height: 3px; border-radius: 2px; background: rgba(0, 0, 0, .12); }
.pt-icons { display: flex; align-items: center; gap: 4px; justify-content: flex-start; }
.pt-sprite { width: 26px; height: 26px; }
.pt-name { font-size: 13px; color: var(--muted); }
.rules h4 { margin: 12px 0 6px; font-family: var(--pixel); color: var(--brass); font-weight: 400; letter-spacing: 1px; }
.line-diagrams { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.line-diagram { --reels: 5; display: grid; grid-template-columns: repeat(var(--reels), 1fr); gap: 1px; padding: 3px; border-radius: 4px; background: #120604; border: 1px solid var(--brass-dark); }
.line-diagram span { aspect-ratio: 1; border-radius: 1px; background: rgba(255, 255, 255, .08); }
.line-diagram span.on { background: var(--gold); }
/* оформление автоматов */
.theme-classic .slot-machine { background: linear-gradient(90deg, #0c2a6b, #1f4fb8 18%, #3b7be0 50%, #1f4fb8 82%, #0c2a6b); }
.theme-classic .slot-top .neon { --neon: var(--neon-cyan); }
.theme-classic .lever::after { background: radial-gradient(circle at 35% 30%, #b6dcff, #3b82f6 50%, #10244f); }
.theme-diamonds .slot-machine { background: linear-gradient(90deg, #1a0a2e, #4b1a8a 18%, #6b2bbf 50%, #4b1a8a 82%, #1a0a2e); border-color: #f6dc86 #b8860b #8a6514 #d4a537; }
.theme-diamonds .slot-top .neon { --neon: var(--neon-purple); }
.theme-diamonds .reel { background: linear-gradient(180deg, #3a2a52, #f3eaff 22%, #f3eaff 78%, #3a2a52); }
.theme-diamonds .lever::after { background: radial-gradient(circle at 35% 30%, #fff3c4, #d4a537 50%, #6a4a10); }
.stage > .segmented { margin-bottom: 2px; }

/* строка шансов под плинко и колесом */
.odds-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.odds-line { font-family: var(--pixel); font-size: 14px; color: var(--muted); text-align: center; flex: 1; }
.odds-row .odds-line { text-align: left; }
.plinko-result { position: absolute; top: 6px; left: 8px; right: 8px; z-index: 1; min-height: 0; margin: 0; font-size: 15px; text-align: left; pointer-events: none; text-shadow: 0 2px 0 rgba(0, 0, 0, .7); }
.win-lines { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); pointer-events: none; z-index: 2; overflow: visible; animation: fade .25s ease-out; }
.win-lines polyline, .win-lines circle { fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
/* расшифровка линий — одна строка фиксированной высоты, лишнее прокручивается вбок: кнопки под ней не прыгают */
.win-list { display: flex; flex-wrap: nowrap; gap: 10px; height: 20px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  font-family: var(--pixel); font-size: 13px; line-height: 20px; color: var(--muted); -webkit-overflow-scrolling: touch; }
.win-list::-webkit-scrollbar { display: none; }
.win-list > :first-child { margin-left: auto; }
.win-list > :last-child { margin-right: auto; }
.win-item { display: inline-flex; flex: none; align-items: center; gap: 6px; white-space: nowrap; }
.win-item i { width: 14px; height: 4px; border-radius: 2px; background: var(--c); }
.hist-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 10px; }
.hist-tabs::-webkit-scrollbar { display: none; }
.hist-tabs .chip-btn { flex: none; }
.lvl-btn { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; color: inherit; }
.lvl-btn u { text-decoration-style: dotted; }
.plinko-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.plinko-settings .segmented button { min-height: 34px; font-size: 14px; padding: 0 4px; }
.game-head h2 { margin-right: auto; }
.game-head .chip-btn + .chip-btn { margin-left: 6px; }

/* ---------- рулетка v2: крупные внешние ставки, колесо во всплывающем окне, панель снизу ---------- */
.rb-red-out { background: linear-gradient(180deg, #d01a35, #9b0b23) !important; }
.rb-black-out { background: linear-gradient(180deg, #2a2a2e, #0b0b0d) !important; }
.rb-red-out .rb-label, .rb-black-out .rb-label { display: inline; width: auto; height: auto; font-size: 15px; clip-path: none; background: none !important; }
.rb-cell.has-bet { background-color: rgba(255, 210, 87, .12); }
.bet-badge { min-width: 30px; height: 30px; font-size: 10.5px; right: 4px; }
.roulette-bar { position: sticky; bottom: calc(6px + var(--sb)); z-index: 5; gap: 10px; padding: 12px; }
.roulette-bar .chip-row { padding-top: 8px; }
.roulette-bar .bet-summary { flex-wrap: wrap; }
.btn-tool { min-height: 34px; padding: 0 9px; font-size: 13px; }
.wheel-overlay { position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: radial-gradient(ellipse at center, rgba(40, 8, 16, .92), rgba(10, 2, 4, .96)); animation: fade .2s; }
.wheel-overlay[hidden] { display: none !important; }
.wheel-overlay .wheel-stack { width: min(86vw, 360px); }
.wheel-result { min-width: 90px; padding: 6px 18px; border-radius: 12px; font-family: var(--pixel); font-size: 44px; text-align: center; color: #fff;
  border: 3px solid var(--brass); opacity: 0; transform: scale(.7); transition: all .25s; }
.wheel-result.show { opacity: 1; transform: none; }
.wheel-hint { font-family: var(--pixel); font-size: 13px; color: var(--muted); }

/* фишка-ставка — в верхнем правом углу клетки, не закрывает надпись */
.rb-cell .bet-badge { top: 2px; right: 2px; transform: none; min-width: 24px; height: 24px; font-size: 9.5px; }
.rb-outside .rb-cell .bet-badge { top: 3px; right: 3px; }

/* слоты: прошлый результат тускнеет во время спина, лента результатов, всплывающий выигрыш */
.result-line.pending { opacity: .45; transition: opacity .15s; }
.slot-recent { justify-content: center; }
.recent-num.mid { color: var(--gold); }
.cabinet-box { position: relative; }
.win-pop { position: absolute; left: 50%; top: 52%; z-index: 3; pointer-events: none; transform: translate(-50%, -50%);
  padding: 6px 16px; border-radius: 12px; font-family: var(--pixel); font-size: 30px; color: #fff; background: rgba(10, 30, 15, .82);
  border: 3px solid var(--green); text-shadow: 0 2px 0 rgba(0, 0, 0, .5); animation: win-pop 1.4s ease-out forwards; will-change: transform, opacity; }
.win-pop.big { font-size: 40px; border-color: var(--gold); background: rgba(40, 25, 0, .85); color: var(--gold); }
@keyframes win-pop {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  25% { transform: translate(-50%, -50%) scale(1); }
  75% { opacity: 1; transform: translate(-50%, -60%); }
  100% { opacity: 0; transform: translate(-50%, -80%); }
}
/* название — отдельным пиксельным шрифтом: у Tiny5 буква U похожа на V («Bvrmalda») */
@font-face { font-family: 'PressStart'; font-display: swap; src: url(/fonts/press-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'PressStart'; font-display: swap; src: url(/fonts/press-cyrillic.woff2) format('woff2'); unicode-range: U+0400-045F, U+0490-0491; }
.brand, .sign-name { text-transform: none; font-family: 'PressStart', var(--pixel); }
.brand { font-size: 14px; }
.sign-name { font-size: clamp(24px, 8.4vw, 38px); letter-spacing: 0; line-height: 1.25; }

/* слоты: результат всегда в одну строку, лента последних спинов — постоянной высоты, слева направо */
.stage .result-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 26px; line-height: 26px; }
.result-line.big { animation: none; }
.slot-recent { display: flex; align-items: center; gap: 8px; height: 30px; overflow: hidden; }
.slot-recent-label { flex: none; font-family: var(--pixel); font-size: 13px; color: var(--brass); }
.slot-recent-list { display: flex; gap: 6px; overflow: hidden; flex: 1; min-width: 0; mask-image: linear-gradient(90deg, #000 85%, transparent); }
.slot-recent-list:empty::before { content: 'тут появятся результаты спинов'; font-size: 12px; color: var(--muted); opacity: .6; white-space: nowrap; }

.privacy-card { display: flex; flex-direction: column; gap: 8px; }

/* ---------- BIG / MEGA / SUPER WIN ---------- */
.big-win { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; overflow: hidden; background: rgba(8, 2, 4, .62);
  animation: fade .18s ease-out; contain: strict; }
.big-win.hide { opacity: 0; transition: opacity .25s; }
.bw-rays { position: absolute; left: 50%; top: 50%; width: 170vmax; height: 170vmax; margin: -85vmax 0 0 -85vmax; opacity: .38; will-change: transform;
  background: repeating-conic-gradient(from 0deg, var(--bw-c) 0deg 9deg, transparent 9deg 22deg); animation: bw-spin 9s linear infinite;
  -webkit-mask-image: radial-gradient(circle, #000 0, transparent 55%); mask-image: radial-gradient(circle, #000 0, transparent 55%); }
.bw-box { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 34px; text-align: center; will-change: transform;
  background: radial-gradient(closest-side, rgba(10, 2, 4, .82), rgba(10, 2, 4, .55) 60%, transparent);
  animation: bw-in .45s cubic-bezier(.2, 1.6, .4, 1) both; }
.bw-label { --neon: var(--bw-c); font-family: var(--pixel); font-weight: 700; font-size: clamp(38px, 13vw, 60px); line-height: 1; color: #fff; letter-spacing: 2px;
  text-shadow: 0 0 2px #fff, 0 0 10px var(--neon), 0 0 24px var(--neon), 0 4px 0 #3a0610; }
.bw-amount { font-family: var(--pixel); font-size: clamp(30px, 10vw, 46px); color: var(--gold); font-variant-numeric: tabular-nums; text-shadow: 0 3px 0 #3a0610; }
.bw-box small { font-size: 13px; color: var(--cream); opacity: .75; }
.bw-big { --bw-c: #ffd257; }
.bw-mega { --bw-c: #ff4fd8; }
.bw-super { --bw-c: #4dfcff; }
.bw-super .bw-label { animation: bw-pulse .5s ease-in-out infinite alternate; }
@keyframes bw-spin { to { transform: rotate(360deg); } }
@keyframes bw-in { from { transform: scale(.3); opacity: 0; } }
@keyframes bw-pulse { to { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .bw-rays, .bw-super .bw-label { animation: none; } }

/* ---------- слоты: кнопки, рычаг, фриспины ---------- */
.slot-buttons { display: grid; grid-template-columns: 68px minmax(0, 1fr) 68px; gap: 8px; }
.slot-buttons .btn-big { min-width: 0; padding: 0 8px; white-space: nowrap; }
.slot-opt { min-height: 56px; padding: 2px 4px; flex-direction: column; gap: 1px; border-radius: 14px; --sh: #2a1206; }
.slot-opt b { font-size: 12px; letter-spacing: 0; }
.slot-opt span { font-family: var(--font); font-size: 11px; font-weight: 400; color: var(--muted); text-shadow: none; }
.slot-opt.on { border-color: var(--gold); background: linear-gradient(180deg, #5a3a08, #3a2404); }
.slot-opt.on b { color: var(--gold); }
.slot-opt.on span { color: var(--brass-light); }
.slot-spin.auto-on { background: linear-gradient(180deg, #ffa13c, #e46a0c); --sh: #6b2c00; }
.lever-hit { position: absolute; right: -8px; top: calc(34% - 10px); width: 46px; height: 150px; z-index: 2; touch-action: none; cursor: grab; -webkit-tap-highlight-color: transparent; }
.lever-hit .lever { right: 6px; top: 10px; transition: transform .35s cubic-bezier(.3, 1.7, .5, 1); will-change: transform; }
.lever-hit .lever.drag { transition: none; }
.lever-hit .lever-base { right: 2px; top: 110px; }
.fs-bar { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 10px; border-radius: inherit;
  background: radial-gradient(ellipse at 50% 30%, #3b0f63, #12041f 85%); font-family: var(--pixel); color: var(--cream); }
.fs-bar[hidden], .slot-banner[hidden] { display: none; }
.fs-title { --neon: var(--neon-purple); font-size: 15px; color: #fff; text-shadow: 0 0 6px var(--neon); white-space: nowrap; }
.fs-bar b { font-size: 18px; color: var(--gold); font-variant-numeric: tabular-nums; }
.fs-bar > span:not(.fs-title) { font-size: 15px; color: var(--green); font-variant-numeric: tabular-nums; }
.fs-skip { margin-left: auto; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--brass); background: rgba(0, 0, 0, .4); color: var(--brass-light); font-family: var(--font); font-size: 12px; }
.slot-banner { position: absolute; inset: 8px; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-radius: 8px;
  background: rgba(18, 4, 31, .82); text-align: center; pointer-events: auto; }
.slot-banner b { --neon: var(--neon-purple); font-family: var(--pixel); font-size: clamp(26px, 9vw, 40px); color: #fff; text-shadow: 0 0 2px #fff, 0 0 10px var(--neon), 0 0 22px var(--neon); }
.slot-banner span { font-size: 14px; color: var(--cream); }
.slot-banner.in b { animation: bw-in .4s cubic-bezier(.2, 1.6, .4, 1) both; }
.slot-cabinet.in-bonus .reels-window { border-color: #c58bff; }
.auto-picker { display: flex; flex-direction: column; gap: 12px; }
.auto-counts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.auto-counts .btn { padding: 0; font-size: 18px; }
.auto-check { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.auto-check input { width: 20px; height: 20px; accent-color: var(--gold); }

/* антитоп */
.top-mode { margin-bottom: 8px; }
.period-tabs { margin-bottom: 10px; }
.period-tabs[hidden] { display: none; }
.period-tabs button { font-size: 13px; }
.anti-lost { font-family: var(--pixel); color: #ff5d6c; font-variant-numeric: tabular-nums; white-space: nowrap; }
.my-rank.anti b { color: #ff5d6c; text-shadow: 0 0 10px rgba(255, 60, 80, .35); }
.my-rank.anti b.plus { color: var(--green); text-shadow: 0 0 10px rgba(70, 226, 138, .35); }

/* покупка бонуса */
.slot-buy { width: 100%; min-height: 44px; padding: 0 12px; gap: 8px; justify-content: center; border-color: #b36bff; --sh: #2a0a45;
  background: linear-gradient(180deg, #5b2398, #3b0f63); }
.slot-buy b { font-size: 15px; color: #fff; white-space: nowrap; }
.slot-buy span { font-family: var(--font); font-size: 12px; font-weight: 400; color: #e0c2ff; text-shadow: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-buy:disabled { filter: grayscale(.6) brightness(.7); }
.buy-ico { width: 24px; height: 24px; image-rendering: pixelated; flex: none; }
.buy-ico.big { width: 44px; height: 44px; }
.buy-confirm { display: flex; flex-direction: column; gap: 10px; }
.buy-price { display: flex; align-items: center; gap: 10px; justify-content: center; font-family: var(--pixel); }
.buy-price b { font-size: 34px; color: var(--gold); }
.buy-price span { color: var(--muted); }
.buy-warn { color: #ff6b7a; }
.buy-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }

/* иксы во фриспинах: прилипшие значки поверх ячеек */
.orb-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.orb { position: absolute; display: grid; place-items: center; }
.orb b { min-width: 60%; padding: 3px 6px; border-radius: 999px; font-family: var(--pixel); font-size: clamp(14px, 4.4vw, 20px); color: #fff; text-align: center;
  background: radial-gradient(circle at 35% 30%, #ff9de6, #c41fa0 55%, #5a0848); border: 2px solid #ffd257; box-shadow: 0 3px 0 rgba(0, 0, 0, .45);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .5); transform: translateY(28%); }
.orb.hot b { background: radial-gradient(circle at 35% 30%, #fff3a6, #ff9a1f 55%, #a33a00); }
/* икс едет на ленте барабана вместе с символом, а когда барабан встал — прилипает на том же месте и «щёлкает» */
.cell > .orb { inset: 0; z-index: 1; }
.orb.land b { animation: orb-land .38s cubic-bezier(.2, 1.7, .4, 1); }
@keyframes orb-land { 45% { transform: translateY(28%) scale(1.35); } }
.fs-mult { font-style: normal; font-size: 18px; color: #ff9de6; text-shadow: 0 0 8px #c41fa0; font-variant-numeric: tabular-nums; }
.fs-mult.bump { animation: fs-bump .4s ease-out; }
@keyframes fs-bump { 40% { transform: scale(1.5); } }
.fs-bar { gap: 8px; padding: 0 8px; }
.fs-bar b, .fs-bar span, .fs-mult { white-space: nowrap; }
.fs-title { font-size: 13px; }
.fs-bar b { font-size: 16px; }
.fs-skip { flex: none; }
.buy-confirm p { margin: 0; }

/* ---------- наперстки: три стакана на сукне ---------- */
.th-table { --cup: min(22vw, 100px); position: relative; height: calc(var(--cup) * 2.15); overflow: hidden; border-radius: 18px; border: 8px solid transparent;
  background: var(--felt-bg) padding-box, var(--wood-bg) border-box; box-shadow: inset 0 0 0 2px rgba(246, 220, 134, .45), 0 10px 22px rgba(0, 0, 0, .55);
  touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.th-table.win { box-shadow: inset 0 0 0 2px var(--gold), 0 0 22px rgba(255, 210, 87, .45), 0 10px 22px rgba(0, 0, 0, .55); }
.th-cup, .th-spot { position: absolute; left: 50%; bottom: 13%; width: var(--cup); height: var(--cup); margin-left: calc(var(--cup) / -2); will-change: transform; }
.th-cup { z-index: 2; padding: 0; border: 0; background: none; appearance: none; -webkit-appearance: none; cursor: default; -webkit-tap-highlight-color: transparent; }
.th-cup-in { display: block; width: 100%; height: 100%; }
.th-cup-img { display: block; width: 100%; height: 100%; }
.th-spot { z-index: 1; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
/* тень под стаканом — на месте, а не на стакане: поднятый стакан «отрывается» от стола */
.th-spot::before { content: ''; position: absolute; left: 6%; right: 6%; bottom: -5%; height: 16%; border-radius: 50%; background: rgba(0, 0, 0, .32); }
.th-spot.picked::before { background: rgba(255, 210, 87, .22); box-shadow: 0 0 0 2px var(--gold); }
.th-ball { position: relative; width: 40%; height: 40%; margin-bottom: 5%; opacity: 0; transform: scale(.5); transition: opacity .12s, transform .18s; }
.th-spot.on .th-ball { opacity: 1; transform: none; }
.th-spot::after { content: ''; position: absolute; left: 22%; right: 22%; bottom: 0; aspect-ratio: 1; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, rgba(255, 210, 87, .75), rgba(255, 210, 87, 0) 70%); }
.th-spot.hit::after { animation: th-hit .9s ease-out 2; }
@keyframes th-hit { 30% { opacity: 1; transform: scale(1.25); } to { opacity: 0; transform: scale(1.6); } }
.th-table.choose .th-cup { cursor: pointer; }
.th-table.choose .th-cup-in { animation: th-bob .55s ease-in-out infinite alternate; }
.th-table.choose .th-cup:nth-of-type(2) .th-cup-in { animation-delay: -.18s; }
.th-table.choose .th-cup:nth-of-type(3) .th-cup-in { animation-delay: -.36s; }
@keyframes th-bob { to { transform: translateY(-5%); } }
@media (prefers-reduced-motion: reduce) { .th-table.choose .th-cup-in, .th-spot.hit::after { animation: none; } }

/* ---------- полноэкранный режим Telegram (Bot API 8.0+) ----------
   Шапки Telegram нет: сверху системная строка (--st), под ней ряд кнопок Telegram (--ct): «Закрыть»/«Назад» слева,
   «⌄ ⋮» справа. Вывеска заполняет обе полосы, баланс — по центру между кнопками Telegram, «назад» — кнопка Telegram.
   Отступы приходят от telegram-web-app.js (--tg-safe-area-inset-*, --tg-content-safe-area-inset-*). */
body.tg-fs {
  --st: var(--tg-safe-area-inset-top, 0px);
  --ct: var(--tg-content-safe-area-inset-top, 46px);
  --sb: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
}
body.tg-fs .topbar { min-height: 0; height: calc(var(--st) + var(--ct) + 12px); padding: var(--st) 14px 12px; }
body.tg-fs.hdr-hidden .topbar { transform: none; }
body.tg-fs .brand { display: none; }
body.tg-fs .topbar::before, body.tg-fs .topbar::after { inset: auto 8px 2px; height: 9px; background: var(--bulb) 0 0 / 12px 9px repeat-x; }
body.tg-fs .topbar::after { background-position: 6px 0; }
body.tg-fs .balance-pill { top: calc(var(--st) + var(--ct) / 2); right: auto; left: 50%; transform: translate(-50%, -50%); padding: 3px 12px 3px 4px; }
body.tg-fs .balance-pill .chip-dot { width: 22px; height: 22px; }
body.tg-fs .balance-pill b { font-size: 16px; }
body.tg-fs #toasts { top: calc(var(--st) + var(--ct) + 18px); left: 50%; transform: translateX(-50%); width: min(calc(100% - 24px), 400px); }
body.tg-fs .modal { max-height: calc(100dvh - var(--st) - var(--ct) - 12px); }
