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

:root {
    --bg: #111111;
    --bg-2: #161616;
    --card: #1b1b1b;
    --card-2: #222222;
    --line: #2a2a2a;
    --line-2: #333333;
    --text: #f4f4f4;
    --muted: #8b8b8b;
    --dim: #5e5e5e;
    --accent: #d92b2b;
    --accent-2: #ff4a4a;
    --accent-soft: rgba(217, 43, 43, .14);
    --win: #5fd13a;
    --lose: #e5484d;
    --gold: #f2b630;

    --r-common: #6f6f6f;
    --r-uncommon: #5fd13a;
    --r-rare: #3b7bff;
    --r-epic: #e03a3a;
    --r-legendary: #f2b630;

    --radius: 16px;
    --radius-sm: 11px;
    --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    user-select: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
img { display: block; }
svg { flex-shrink: 0; }
[hidden] { display: none !important; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #2e2e2e; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- загрузка ---------- */
.boot { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; background: radial-gradient(60% 60% at 50% 40%, #2a0b0b 0%, var(--bg) 70%); z-index: 50; transition: opacity .4s; }
.boot.out { opacity: 0; pointer-events: none; }
.boot-logo { font-size: 44px; font-weight: 800; letter-spacing: .06em; }
.boot-logo span { color: var(--accent); margin-left: 10px; font-size: .45em; vertical-align: middle; letter-spacing: .3em; }
.boot-bar { width: 180px; height: 4px; border-radius: 4px; background: #262626; overflow: hidden; }
.boot-bar i { display: block; width: 40%; height: 100%; background: var(--accent); border-radius: 4px; animation: boot 1.1s ease-in-out infinite; }
@keyframes boot { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
.boot-text { color: var(--muted); font-size: 14px; text-align: center; max-width: 320px; line-height: 1.5; }
/* версия сборки — видно, что загрузился свежий код */
.boot-ver { position: absolute; bottom: 14px; font-size: 11px; color: var(--dim); }
.boot-text a, .boot-text button { color: var(--text); text-decoration: underline; }

/* ---------- каркас ---------- */
.app { display: flex; height: 100vh; height: 100dvh; }
.nav { width: 104px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; padding: 18px 12px; border-right: 1px solid var(--line); background: var(--bg-2); }
.nav-logo { width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; font-size: 22px; background: linear-gradient(135deg, var(--accent-2), #8f1414); box-shadow: 0 8px 24px rgba(217, 43, 43, .35); }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 13px 4px; border-radius: 14px; color: var(--muted); font-size: 13px; font-weight: 600; background: var(--card); border: 1px solid transparent; transition: .2s var(--ease); }
.nav-item svg { width: 22px; height: 22px; }
.nav-item:hover { color: var(--text); background: var(--card-2); }
.nav-item.active { color: var(--text); background: var(--card-2); border-color: var(--line-2); }
.nav-item.active svg { color: var(--accent-2); }
.nav-balance { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; background: var(--card); font-weight: 700; font-size: 13px; text-align: center; }
.nav-balance svg { width: 22px; height: 22px; }

.main { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 26px 30px 40px; scroll-behavior: smooth; }
.page { max-width: 1120px; margin: 0 auto; animation: pageIn .35s var(--ease); }
.page.narrow { max-width: 860px; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- общие элементы ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.h1 { font-size: 30px; font-weight: 800; letter-spacing: -.01em; }
.h2 { font-size: 19px; font-weight: 700; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.coin { width: 18px; height: 18px; vertical-align: -3px; }
.money { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plus { color: var(--win); }
.minus { color: var(--lose); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 14px; }
.section-title .h2 { display: flex; align-items: center; gap: 10px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #2a2a2a; flex-shrink: 0; }
.avatar.sm { width: 28px; height: 28px; }
.avatar.lg { width: 76px; height: 76px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 28px 16px; text-align: center; color: var(--dim); font-size: 14px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--card-2); color: var(--muted); font-size: 12px; font-weight: 600; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--win); box-shadow: 0 0 0 3px rgba(95, 209, 58, .2); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(95, 209, 58, 0); } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 12px; font-weight: 700; font-size: 15px; transition: .18s var(--ease); white-space: nowrap; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #e83434; box-shadow: 0 8px 26px rgba(217, 43, 43, .35); }
.btn-primary:active { transform: scale(.98); }
.btn-ghost { background: var(--card-2); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: #2a2a2a; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; height: 54px; font-size: 17px; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.icon-btn { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; background: var(--card); border: 1px solid var(--line); transition: .2s; }
.icon-btn:hover { background: var(--card-2); }
.icon-btn svg { width: 22px; height: 22px; }

.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; margin-bottom: 16px; padding: 6px 10px 6px 4px; border-radius: 8px; }
.back svg { width: 18px; height: 18px; }
.back:hover { color: var(--text); background: var(--card); }

.segmented { display: flex; gap: 4px; padding: 5px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; }
.segmented button { flex: 1; padding: 10px 6px; border-radius: 10px; font-weight: 700; color: var(--muted); transition: .2s var(--ease); border-bottom: 2px solid transparent; }
.segmented button small { display: block; font-size: 12px; font-weight: 600; color: var(--dim); margin-top: 3px; }
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--card-2); color: var(--text); border-bottom-color: var(--accent); }
.segmented button.active small { color: var(--accent-2); }
.segmented button.active.voice { border-bottom-color: var(--win); }
.segmented button.active.voice small { color: var(--win); }

.progress { height: 6px; border-radius: 6px; background: #2a2a2a; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 6px; background: var(--accent); transition: width .6s var(--ease); }
.progress.green i { background: var(--win); }
.progress.gold i { background: var(--gold); }

/* ---------- главная ---------- */
.hero { position: relative; overflow: hidden; border-radius: 22px; padding: 30px; min-height: 210px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
    background: radial-gradient(120% 140% at 100% 0%, #b51f1f 0%, #5c0d0d 38%, #1b1b1b 75%); border: 1px solid #3a1616; }
.hero::after { content: ''; position: absolute; inset: 0; background: repeating-conic-gradient(from 200deg at 105% -10%, rgba(255, 255, 255, .05) 0 4deg, transparent 4deg 12deg); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero-user { display: flex; align-items: center; gap: 16px; }
.hero-user .avatar { width: 64px; height: 64px; border: 3px solid rgba(255, 255, 255, .15); }
.hero-hello { font-size: 14px; color: rgba(255, 255, 255, .65); font-weight: 600; }
.hero-name { font-size: 28px; font-weight: 800; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-stat { padding: 12px 16px; border-radius: 14px; background: rgba(0, 0, 0, .35); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .06); min-width: 130px; }
.hero-stat small { display: block; font-size: 12px; color: rgba(255, 255, 255, .55); font-weight: 600; margin-bottom: 4px; }
.hero-stat b { font-size: 19px; display: inline-flex; align-items: center; gap: 6px; }

.home-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-top: 18px; }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; transition: background .2s; }
.list-item + .list-item { border-top: 1px solid #222; }
.list-item:hover { background: #202020; }
.list-item .title { font-weight: 600; font-size: 14px; }
.list-item .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.feed-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--card-2); flex-shrink: 0; }
.feed-icon svg { width: 26px; height: 26px; }
.place { width: 26px; text-align: center; font-weight: 800; color: var(--dim); }
.place.p1 { color: var(--gold); } .place.p2 { color: #c9d1db; } .place.p3 { color: #d08a4a; }

.voice-card { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.voice-card .row b { font-size: 15px; }

/* ---------- карточки игр ---------- */
.games-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.game-card { position: relative; overflow: hidden; height: 176px; border-radius: 20px; padding: 22px; text-align: left; display: flex; flex-direction: column; justify-content: flex-end;
    background: radial-gradient(130% 120% at 85% 30%, #a51b1b 0%, #4a0c0c 45%, #1b1b1b 80%); border: 1px solid #2e1a1a; transition: transform .25s var(--ease), box-shadow .25s; }
.game-card::before { content: ''; position: absolute; inset: 0; background: repeating-conic-gradient(from 180deg at 80% 50%, rgba(0, 0, 0, .18) 0 6deg, transparent 6deg 14deg); }
.game-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(0, 0, 0, .45); }
.game-card:hover .game-art { transform: scale(1.06) rotate(-2deg); }
.game-card .game-art { position: absolute; right: -8px; top: 50%; height: 120%; width: 60%; object-fit: contain; object-position: right center; translate: 0 -50%; transition: transform .4s var(--ease); pointer-events: none; z-index: 1; }
.game-card::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(22, 8, 8, .82) 0%, rgba(22, 8, 8, .35) 45%, transparent 65%); }
.game-card.soon::after { background: linear-gradient(90deg, rgba(27, 27, 27, .9) 0%, transparent 60%); }
.game-card .game-ico { position: absolute; top: 18px; left: 20px; width: 22px; height: 22px; color: rgba(255, 255, 255, .45); }
.game-card h3 { position: relative; z-index: 2; font-size: 26px; font-weight: 800; text-shadow: 0 2px 12px rgba(0, 0, 0, .5); }
.game-card .game-ico { z-index: 2; }
.game-card p { position: relative; z-index: 2; color: rgba(255, 255, 255, .55); font-size: 13.5px; max-width: 55%; margin-top: 4px; line-height: 1.35; }
.game-card .badge { position: absolute; top: 16px; right: 16px; z-index: 3; }
.game-card.soon .badge { right: auto; left: 18px; }
.game-card.soon { background: var(--card); border-color: var(--line); cursor: default; }
.game-card.soon::before { display: none; }
.game-card.soon:hover { transform: none; box-shadow: none; }
.games-sep { height: 1px; background: var(--line); margin: 26px 0; }
.badge { padding: 5px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: #141414; color: #fff; border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 4px 14px rgba(0, 0, 0, .4); }
.badge.live { background: #16240f; color: var(--win); border-color: rgba(95, 209, 58, .4); }

/* ---------- кейсы ---------- */
.case-top { display: flex; gap: 10px; padding: 8px; }
.case-top .btn-ghost { flex: 1; height: 52px; }
.online-line { display: flex; justify-content: center; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 14px; }

.strip-wrap { position: relative; margin: 26px -30px 22px; overflow: hidden; padding: 14px 0; }
.strip-wrap::before, .strip-wrap::after { content: ''; position: absolute; top: 0; bottom: 0; width: 120px; z-index: 2; pointer-events: none; }
.strip-wrap::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.strip-wrap::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.strip-pointer { position: absolute; left: 50%; top: 0; translate: -50% 0; width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 9px solid var(--accent); z-index: 3; filter: drop-shadow(0 0 6px rgba(217, 43, 43, .8)); }
.strip-pointer.bottom { top: auto; bottom: 0; border-top: 0; border-bottom: 9px solid var(--accent); }
.strip { display: flex; gap: 10px; will-change: transform; }
.strip + .strip { margin-top: 10px; }
.drop { --c: var(--r-common); flex: 0 0 156px; height: 168px; padding: 7px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); }
.drop-in { position: relative; height: 100%; border-radius: 11px; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 18px 8px 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--c) 28%, #1f1f1f) 0%, #1f1f1f 70%); }
.drop-in::before { content: ''; position: absolute; left: -10%; right: -10%; top: 62%; height: 1px; background: rgba(255, 255, 255, .06); transform: rotate(-6deg); }
.drop svg { width: 68px; height: 68px; position: relative; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
.drop-label { position: relative; font-weight: 700; font-size: 14px; text-align: center; line-height: 1.2; min-height: 34px; display: flex; align-items: center; }
.drop-bar { position: relative; width: calc(100% + 16px); height: 6px; background: var(--c); }
.drop[data-r="common"] { --c: var(--r-common); }
.drop[data-r="uncommon"] { --c: var(--r-uncommon); }
.drop[data-r="rare"] { --c: var(--r-rare); }
.drop[data-r="epic"] { --c: var(--r-epic); }
.drop[data-r="legendary"] { --c: var(--r-legendary); }
.drop.win { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 0 34px color-mix(in srgb, var(--c) 55%, transparent); animation: winPop .6s var(--ease); }
@keyframes winPop { 40% { transform: scale(1.07); } }

.case-controls { display: flex; flex-direction: column; gap: 10px; }
.pity { padding: 14px 14px 12px; }
.pity .row b { font-size: 14px; }
.pity .count { font-weight: 800; color: var(--gold); font-size: 14px; }
.pity .count.green { color: var(--win); }
.pity .progress { margin: 10px 0 8px; }
.pity small { color: var(--muted); font-size: 12.5px; }
.case-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.multi { display: flex; gap: 4px; padding: 5px; }
.multi button { flex: 1; height: 40px; border-radius: 9px; font-weight: 700; color: var(--muted); transition: .2s; }
.multi button.active { background: #2b2b2b; color: var(--text); box-shadow: inset 0 0 0 1px #3a3a3a; }
.balance-box { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; font-weight: 600; color: var(--muted); }
.balance-box b { color: var(--text); font-size: 18px; }

.loot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.loot-grid .drop { flex: none; height: 176px; }
.loot-chance { position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 6px; background: rgba(0, 0, 0, .45); color: rgba(255, 255, 255, .8); }

.recent-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.recent-chip { --c: var(--r-common); flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); border-bottom: 3px solid var(--c); }
.recent-chip svg { width: 30px; height: 30px; }
.recent-chip .avatar { width: 22px; height: 22px; }
.recent-chip b { font-size: 13px; display: block; }
.recent-chip small { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.recent-chip[data-r="uncommon"] { --c: var(--r-uncommon); } .recent-chip[data-r="rare"] { --c: var(--r-rare); }
.recent-chip[data-r="epic"] { --c: var(--r-epic); } .recent-chip[data-r="legendary"] { --c: var(--r-legendary); }

/* ---------- кости / дуэль ---------- */
.pvp-layout { display: grid; grid-template-columns: 360px 1fr; gap: 18px; align-items: start; }
.bet-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; }
.bet-input { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-2); transition: border-color .2s; }
.bet-input:focus-within { border-color: var(--accent); }
.bet-input input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bet-input svg { width: 26px; height: 26px; }
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.chips button { height: 34px; border-radius: 9px; background: var(--card-2); border: 1px solid var(--line-2); font-weight: 700; font-size: 13px; color: var(--muted); transition: .15s; }
.chips button:hover { color: var(--text); border-color: #444; }
.bet-note { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.bet-note b { color: var(--text); }

.lobby-item { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); animation: pageIn .3s var(--ease); }
.lobby-item + .lobby-item { margin-top: 8px; }
.lobby-item.mine { border-color: #4a2020; background: linear-gradient(90deg, rgba(217, 43, 43, .08), var(--card) 60%); }
.lobby-item .title { font-weight: 700; }
.lobby-item .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.lobby-bet { font-size: 17px; }
.timer { font-variant-numeric: tabular-nums; }

.result-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; }
.result-item + .result-item { border-top: 1px solid #222; }
.result-item .vs { color: var(--dim); font-weight: 700; font-size: 12px; }
.result-item .w { font-weight: 700; }
.result-item .avatar { width: 26px; height: 26px; }
.result-item .avatar.lost { filter: grayscale(1); opacity: .45; }

/* арена (модалка результата) */
.arena { padding: 26px 22px 22px; text-align: center; }
.arena-title { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.arena-sides { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 22px 0 18px; }
.fighter { display: flex; flex-direction: column; align-items: center; gap: 8px; transition: .4s var(--ease); }
.fighter .avatar { width: 72px; height: 72px; border: 3px solid var(--line-2); transition: .4s var(--ease); }
.fighter .name { font-weight: 700; max-width: 140px; }
.fighter.winner .avatar { border-color: var(--win); box-shadow: 0 0 30px rgba(95, 209, 58, .45); transform: scale(1.06); }
.fighter.loser { opacity: .45; filter: grayscale(.9); }
.fighter.hit .avatar { animation: hit .5s; }
@keyframes hit { 20% { transform: translateX(-6px) rotate(-6deg); } 50% { transform: translateX(5px) rotate(4deg); } }
.vs-big { font-size: 22px; font-weight: 800; color: var(--accent); }
.dice-pair { display: flex; gap: 8px; justify-content: center; min-height: 52px; }
.die { width: 50px; height: 50px; border-radius: 12px; background: linear-gradient(145deg, #ff5b5b, #b81d1d); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25), 0 6px 14px rgba(0, 0, 0, .4); display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 8px; }
.die i { width: 8px; height: 8px; border-radius: 50%; background: #fff; place-self: center; opacity: 0; }
.die.rolling { animation: roll .45s linear infinite; }
@keyframes roll { 25% { transform: rotate(90deg) scale(.92); } 50% { transform: rotate(180deg); } 75% { transform: rotate(270deg) scale(.92); } 100% { transform: rotate(360deg); } }
.dice-sum { font-size: 22px; font-weight: 800; min-height: 28px; }
.arena-log { min-height: 24px; color: var(--muted); font-weight: 600; margin-bottom: 18px; }
.arena-result { font-size: 26px; font-weight: 800; margin-bottom: 4px; }
.arena-result.win { color: var(--win); }
.arena-result.lose { color: var(--lose); }
.shot-flash { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 100; }
.shot-flash.on { animation: flash .25s; }
@keyframes flash { 10% { opacity: .35; } }
.bullets { display: flex; gap: 6px; justify-content: center; margin-bottom: 14px; min-height: 14px; }
.bullets i { width: 10px; height: 14px; border-radius: 3px 3px 2px 2px; background: #444; }
.bullets i.hit { background: var(--accent); }
.bullets i.miss { background: #777; }

/* ---------- лотерея ---------- */
.lotto-layout { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.lotto-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; padding: 14px; }
.ticket { aspect-ratio: 1.25; border-radius: 9px; background: var(--card-2); border: 1px solid var(--line-2); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; transition: .15s var(--ease); position: relative; }
.ticket:hover:not(:disabled) { border-color: #555; transform: translateY(-1px); }
.ticket.sel { background: var(--accent); border-color: var(--accent-2); color: #fff; box-shadow: 0 4px 16px rgba(217, 43, 43, .4); }
.ticket.taken { background: #181818; color: #3c3c3c; border-color: #1f1f1f; cursor: default; }
.ticket.mine { background: rgba(242, 182, 48, .14); color: var(--gold); border-color: rgba(242, 182, 48, .4); cursor: default; }
.ticket.won { background: var(--gold); color: #111; }
.pot { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.pot-big { font-size: 34px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.pot-big svg { width: 32px; height: 32px; }
.kv { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.kv b { color: var(--text); }

/* ---------- профиль ---------- */
.profile-layout { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
.profile-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; }
.profile-head { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.profile-head .name { font-size: 22px; font-weight: 800; }
.profile-head .user { color: var(--muted); font-weight: 600; }
.stat-box { padding: 12px 14px; border-radius: 13px; background: var(--card-2); border: 1px solid var(--line-2); }
.stat-box small { display: block; color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.stat-box b { font-size: 18px; display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.stat-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.partner { display: flex; align-items: center; gap: 10px; }
.inv-item { --c: var(--r-common); display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--card-2); border-left: 3px solid var(--c); }
.inv-item svg { width: 34px; height: 34px; }
.inv-item b { font-size: 14px; }
.inv-item small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.inv-item[data-r="rare"] { --c: var(--r-rare); } .inv-item[data-r="epic"] { --c: var(--r-epic); } .inv-item[data-r="legendary"] { --c: var(--r-legendary); }

.history-tabs { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 6px; margin-bottom: 16px; }
.history-tabs button { height: 50px; border-radius: 11px; background: var(--card-2); display: grid; place-items: center; color: var(--muted); font-weight: 700; font-size: 13px; transition: .2s; }
.history-tabs button svg { width: 22px; height: 22px; }
.history-tabs button.active { background: var(--accent); color: #fff; }
.h-item { position: relative; border-radius: 14px; background: var(--card); border: 1px solid var(--line); overflow: hidden; animation: pageIn .3s var(--ease); }
.h-item + .h-item { margin-top: 10px; }
.h-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.h-item.win::before { background: var(--win); }
.h-head { display: flex; justify-content: space-between; padding: 12px 18px 10px 22px; color: var(--dim); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid #242424; }
.h-body { display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 22px; }
.h-body svg.r { width: 38px; height: 38px; }
.h-body .title { font-weight: 700; }
.h-body .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.h-foot { display: flex; justify-content: space-between; padding: 10px 18px 12px 22px; border-top: 1px solid #242424; color: var(--muted); font-size: 13.5px; }

/* ---------- настольные игры ---------- */
.game-card.board { background: radial-gradient(130% 120% at 85% 30%, #3a1d1d 0%, #1f1a1a 50%, #1b1b1b 80%); border-color: #2e2323; }
.game-card.board::before { display: none; }
.board-hero { display: flex; align-items: center; gap: 18px; padding: 18px 22px; margin-bottom: 18px; border-radius: 20px; background: radial-gradient(120% 140% at 0% 0%, #3a1414, #1b1b1b 70%); border: 1px solid #2e1a1a; }
.board-hero img { width: 120px; height: 90px; object-fit: contain; }
.room-page { max-width: 1180px; }
.room-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 12px; }
.room-bank { font-weight: 600; color: var(--muted); }
.room-status { padding: 12px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-height: 48px; }
.room-status.my { border-color: rgba(95, 209, 58, .45); background: linear-gradient(90deg, rgba(95, 209, 58, .1), var(--card) 70%); }
.player-chip { display: flex; align-items: center; gap: 10px; min-width: 0; }
.player-chip b { max-width: 180px; }

/* шахматы */
.chess-layout { display: grid; grid-template-columns: minmax(0, 600px) minmax(220px, 300px); gap: 18px; align-items: start; justify-content: center; }
.chess-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.chess-player { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); height: 58px; box-sizing: border-box; }
.chess-player .player-chip { flex: 1; min-width: 0; }
.caps { display: flex; flex-wrap: nowrap; line-height: 1; opacity: .85; min-width: 0; overflow: hidden; height: 20px; align-items: center; }
.caps .pc { font-size: 17px; }
.clock { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 20px; padding: 6px 12px; border-radius: 9px; background: #151515; color: var(--muted); flex-shrink: 0; min-width: 76px; text-align: center; }
.clock.on { background: #f2f2f2; color: #111; }
.clock.low { background: var(--lose); color: #fff; }
.chess-board { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-template-rows: repeat(8, minmax(0, 1fr)); width: 100%; aspect-ratio: 1; container-type: inline-size; border-radius: 12px; overflow: hidden; box-shadow: 0 18px 50px rgba(0, 0, 0, .5); border: 3px solid #2a1a1a; box-sizing: border-box; }
.sq { position: relative; display: grid; place-items: center; cursor: pointer; min-width: 0; min-height: 0; overflow: hidden; }
.chess-board .pc { font-size: 9.4cqw; }
.chess-board .pc.pawn { width: 9cqw; height: 9cqw; }
.sq.light { background: #ecd9c2; }
.sq.dark { background: #a8705a; }
.sq.last { box-shadow: inset 0 0 0 999px rgba(242, 182, 48, .35); }
.sq.sel { box-shadow: inset 0 0 0 999px rgba(95, 209, 58, .45); }
.sq.check { background: radial-gradient(circle, #ff4d4d 0%, #c41c1c 60%, #8a1010 100%) !important; }
.sq.tgt::after { content: ''; width: 28%; height: 28%; border-radius: 50%; background: rgba(20, 20, 20, .35); }
.sq.cap::after { content: ''; position: absolute; inset: 4%; border-radius: 50%; border: 5px solid rgba(20, 20, 20, .35); }
.crd { position: absolute; font-style: normal; font-size: 11px; font-weight: 800; opacity: .55; color: #3b2418; }
.crd.r { top: 3px; left: 4px; }
.crd.f { bottom: 2px; right: 5px; }
.pc { font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "DejaVu Sans", sans-serif; font-size: clamp(26px, 5.6vw, 54px); line-height: 1; position: relative; z-index: 1; pointer-events: none; }
.pc.pw { color: #fff; text-shadow: 0 0 2px #000, 0 0 1px #000, 0 2px 4px rgba(0, 0, 0, .45); -webkit-text-stroke: 1px #222; }
.pc.pb { color: #1b1b1b; text-shadow: 0 2px 4px rgba(0, 0, 0, .35); }
.pc.pawn { width: 72%; height: 72%; display: grid; place-items: center; }
.pc.pawn svg { width: 100%; height: 100%; }
.pc.pawn.pw svg { fill: #fff; stroke: #222; stroke-width: 1.5; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45)); }
.pc.pawn.pb svg { fill: #1b1b1b; stroke: #000; stroke-width: 1; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.caps .pc.pawn { width: 17px; height: 17px; }
.promo-row .pc { font-size: 50px; }
.chess-moves { padding: 16px; }
.mv-list { max-height: 460px; overflow-y: auto; font-size: 14px; font-variant-numeric: tabular-nums; }
.mv { display: grid; grid-template-columns: 34px 1fr 1fr; padding: 5px 4px; border-radius: 6px; }
.mv:nth-child(odd) { background: #202020; }
.promo-row { display: flex; gap: 10px; justify-content: center; }
.promo-row button { width: 76px; height: 76px; border-radius: 14px; background: #a8705a; display: grid; place-items: center; }
.promo-row button:hover { background: #c08468; }

/* морской бой */
.sea-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sea-side { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.sea-grid { display: grid; grid-template-columns: 22px repeat(10, 1fr); gap: 3px; user-select: none; }
.sea-grid .lbl { font-style: normal; font-size: 11px; font-weight: 700; color: var(--dim); display: grid; place-items: center; }
.sea-grid .cell { aspect-ratio: 1; border-radius: 5px; background: #1d2633; position: relative; transition: background .2s; }
.sea-grid .cell.ship { background: #8a94a6; }
.sea-grid .cell.ship.ghost { background: #3d4553; }
.sea-grid .cell.ship.sunk { background: #5a1a1a; }
.sea-grid .cell.miss::after { content: ''; position: absolute; inset: 38%; border-radius: 50%; background: #6b7a90; }
.sea-grid .cell.hit { background: #c62828; }
.sea-grid .cell.hit::after { content: '\2715'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; }
.sea-grid .cell.ship.sunk.hit { background: #7a1616; }
.sea-grid .cell.fresh { animation: fresh .8s var(--ease); z-index: 1; }
@keyframes fresh { 0% { transform: scale(1.6); box-shadow: 0 0 0 6px rgba(255, 255, 255, .5); } }
.sea-grid.aim .cell:not(.hit):not(.miss) { cursor: crosshair; }
.sea-grid.aim .cell:not(.hit):not(.miss):hover { background: #2f4a6b; box-shadow: inset 0 0 0 2px var(--accent-2); }
.fleet { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 14px; }
.fleet-ship { display: inline-flex; gap: 2px; }
.fleet-ship i { width: 10px; height: 10px; border-radius: 2px; background: #8a94a6; }

/* дурак */
.durak { display: flex; flex-direction: column; gap: 16px; padding: 18px; border-radius: 22px; background: radial-gradient(120% 100% at 50% 40%, #1d3a28 0%, #12241a 60%, #0e1a13 100%); border: 1px solid #1f3a2a; min-height: 560px; }
.durak-opp { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.opp-hand { display: flex; padding-left: 26px; }
.opp-hand .pcard { width: 44px; height: 64px; margin-left: -26px; }
.durak-mid { display: grid; grid-template-columns: 130px 1fr 100px; gap: 14px; align-items: center; flex: 1; }
.deck-box { position: relative; height: 140px; }
.trump-card .pcard { position: absolute; left: 46px; top: 10px; transform: rotate(14deg); }
.deck-box .deck { position: absolute; left: 0; top: 18px; z-index: 1; }
.deck-count { position: absolute; bottom: -10px; left: 0; font-size: 12px; color: rgba(255, 255, 255, .55); font-weight: 600; }
.trump-only { font-weight: 800; font-size: 18px; color: rgba(255, 255, 255, .8); }
.table { display: flex; flex-wrap: wrap; gap: 18px 28px; justify-content: center; align-items: center; min-height: 160px; }
.table-empty { color: rgba(255, 255, 255, .45); font-weight: 600; }
.pair { position: relative; width: 74px; height: 106px; border-radius: 10px; transition: .2s; }
.pair .def { position: absolute; left: 18px; top: 22px; transform: rotate(8deg); }
.pair.target { cursor: pointer; box-shadow: 0 0 0 3px var(--gold), 0 0 24px rgba(242, 182, 48, .6); }
.discard { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: rgba(255, 255, 255, .55); font-weight: 600; }
.discard .pcard { transform: rotate(-14deg); width: 54px; height: 78px; }
.durak-actions { display: flex; justify-content: center; gap: 10px; min-height: 46px; }
.my-hand { display: flex; justify-content: center; flex-wrap: nowrap; padding: 24px 0 4px; overflow-x: auto; }
.my-hand .pcard { margin-left: -18px; cursor: pointer; transition: transform .18s var(--ease), box-shadow .18s; }
.my-hand .pcard:first-child { margin-left: 0; }
.my-hand .pcard.playable:hover { transform: translateY(-14px); }
.my-hand .pcard.selected { transform: translateY(-20px); box-shadow: 0 0 0 3px var(--gold), 0 10px 26px rgba(0, 0, 0, .5); }
.my-hand .pcard.dim-card { filter: brightness(.62); }
.my-hand .pcard.trump::before { content: ''; position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.pcard { position: relative; flex-shrink: 0; width: 74px; height: 106px; border-radius: 10px; background: linear-gradient(160deg, #ffffff, #eeeae4); color: #151515; box-shadow: 0 6px 16px rgba(0, 0, 0, .45); border: 1px solid #d8d2c8; }
.pcard.red { color: #d42a2a; }
.pcard .pr { position: absolute; top: 6px; left: 7px; font-weight: 800; font-size: 15px; line-height: 1.05; text-align: center; }
.pcard .ps { position: absolute; inset: 0; display: grid; place-items: center; font-size: 36px; padding-top: 10px; }
.pcard.back { background: repeating-linear-gradient(45deg, #b52222 0 6px, #9a1a1a 6px 12px); border: 3px solid #f4f4f4; }

@media (max-width: 1000px) {
    .chess-layout, .sea-layout { grid-template-columns: 1fr; }
    .chess-moves { display: none; }
}
@media (max-width: 680px) {
    .durak { padding: 12px; min-height: 0; }
    .durak-mid { grid-template-columns: 80px 1fr; }
    .discard { display: none; }
    .pcard, .pair { width: 54px; height: 78px; }
    .pcard .ps { font-size: 26px; }
    .pcard .pr { font-size: 12px; }
    .pair .def { left: 12px; top: 16px; }
    .deck-box { height: 110px; transform: scale(.75); transform-origin: left center; }
    .my-hand .pcard { margin-left: -22px; }
    .board-hero img { width: 80px; height: 60px; }
    .room-head .room-bank { display: none; }
}

/* ---------- модалка / тосты ---------- */
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .72); backdrop-filter: blur(4px); animation: fade .25s; }
.modal-card { position: relative; width: min(480px, 100%); max-height: 90vh; overflow: auto; border-radius: 22px; background: var(--card); border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: modalIn .35s var(--ease); }
.modal-card.wide { width: min(720px, 100%); }
.modal-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); z-index: 2; }
.modal-close:hover { background: var(--card-2); color: var(--text); }
.modal-close svg { width: 18px; height: 18px; }
.modal-body { padding: 24px; }
@keyframes fade { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }

.prize { text-align: center; padding: 30px 24px 24px; position: relative; overflow: hidden; }
.prize::before { content: ''; position: absolute; left: 50%; top: 110px; width: 460px; height: 460px; translate: -50% -50%; background: repeating-conic-gradient(color-mix(in srgb, var(--c) 30%, transparent) 0 8deg, transparent 8deg 20deg); border-radius: 50%; mask: radial-gradient(circle, #000 0, transparent 65%); animation: spin 14s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
.prize > * { position: relative; }
.prize-items { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 20px; }
.prize-items .drop { flex: 0 0 150px; animation: prizeIn .5s var(--ease) backwards; }
.prize-items .drop:nth-child(2) { animation-delay: .1s; } .prize-items .drop:nth-child(3) { animation-delay: .2s; }
@keyframes prizeIn { from { opacity: 0; transform: scale(.6) translateY(20px); } }

.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { padding: 13px 16px; border-radius: 12px; background: #242424; border: 1px solid #353535; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); font-weight: 600; font-size: 14px; max-width: 340px; animation: toastIn .3s var(--ease); }
.toast.err { border-color: #5a2323; background: #2a1717; }
.toast.ok { border-color: #2c5a23; background: #18261a; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

.skeleton { background: linear-gradient(90deg, #1b1b1b, #242424, #1b1b1b); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- адаптив ---------- */
@media (max-width: 1000px) {
    .home-grid, .pvp-layout, .lotto-layout, .profile-layout { grid-template-columns: 1fr; }
    .bet-card, .profile-card { position: static; }
    .games-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
    .app { flex-direction: column-reverse; }
    .nav { width: 100%; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); gap: 6px; }
    .nav-logo { display: none; }
    .nav-item { flex: 1; padding: 8px 4px; font-size: 11.5px; gap: 4px; background: none; }
    .nav-balance { margin: 0; flex-direction: row; padding: 0 10px; background: none; font-size: 12px; }
    .main { padding: 16px 16px 30px; }
    .games-grid { grid-template-columns: 1fr; }
    .game-card { height: 150px; }
    .h1 { font-size: 24px; }
    .hero { padding: 20px; }
    .hero-name { font-size: 22px; }
    .hero-stat { min-width: 0; flex: 1 1 40%; }
    .strip-wrap { margin: 18px -16px; }
    .drop { flex-basis: 124px; height: 140px; }
    .drop svg { width: 52px; height: 52px; }
    .drop-label { font-size: 12.5px; }
    .case-row { grid-template-columns: 1fr; }
    .balance-box { height: 50px; }
    .lotto-grid { gap: 4px; padding: 8px; }
    .ticket { font-size: 12px; border-radius: 7px; }
    .history-tabs button { height: 42px; }
    .segmented button { font-size: 13px; padding: 8px 2px; }
}

/* ==========================================
   DESIRE CASINO
   ========================================== */
.casino-hero { position: relative; overflow: hidden; text-align: center; padding: 40px 20px 30px; border-radius: 24px; margin-bottom: 18px;
    background: radial-gradient(70% 130% at 50% 0%, #6a1010 0%, #2a0a0a 55%, #140606 100%); border: 1px solid #3a1414; }
.marquee { position: absolute; inset: 10px; border-radius: 18px; border: 4px dotted rgba(242, 182, 48, .9); animation: marquee 1.1s steps(2) infinite; pointer-events: none; }
@keyframes marquee { 50% { border-color: rgba(255, 106, 106, .9); } }
.casino-logo { position: relative; font-size: 54px; font-weight: 800; letter-spacing: .08em; line-height: 1; background: linear-gradient(180deg, #fff2c4, #f2b630 55%, #b57a0c); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 18px rgba(242, 182, 48, .35)); }
.casino-logo span { display: block; margin-top: 8px; font-size: 15px; letter-spacing: .9em; padding-left: .9em; background: none; color: var(--accent-2); -webkit-text-fill-color: var(--accent-2); }
.casino-sub { position: relative; color: rgba(255, 255, 255, .6); margin-top: 14px; font-size: 14px; }
.casino-bal { position: relative; display: inline-flex; gap: 10px; align-items: center; margin-top: 16px; padding: 8px 16px; border-radius: 999px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(242, 182, 48, .3); color: rgba(255, 255, 255, .7); font-size: 13px; font-weight: 600; }
.casino-bal b { color: #fff; font-size: 15px; }

.venues { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.venue { position: relative; overflow: hidden; min-height: 320px; border-radius: 22px; padding: 22px; text-align: left; display: flex; flex-direction: column; justify-content: flex-end; border: 1px solid transparent; transition: transform .25s var(--ease), box-shadow .25s; }
.venue:hover { transform: translateY(-4px); box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.venue:hover .venue-art { transform: scale(1.06) rotate(-2deg); }
.venue::before, .venue::after { content: ''; position: absolute; pointer-events: none; }
.venue-art { position: absolute; top: 4px; right: -14px; width: 80%; z-index: 1; transition: transform .4s var(--ease); pointer-events: none; }
.venue-info { position: relative; z-index: 2; }
.venue-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: #f2d48a; }
.venue h3 { font-size: 30px; font-weight: 800; margin: 4px 0 6px; text-shadow: 0 2px 14px rgba(0, 0, 0, .5); }
.venue p { font-size: 13.5px; line-height: 1.45; color: rgba(255, 255, 255, .72); max-width: 92%; }
.venue-live { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(0, 0, 0, .4); border: 1px solid rgba(255, 255, 255, .12); }
/* 21 — зелёное сукно, золотая дуга, деревянный борт */
.v-bj { background: radial-gradient(120% 90% at 50% 0%, #17844e 0%, #0b4a2c 55%, #06291a 100%); border-color: #1d5a3a; box-shadow: inset 0 -12px 0 #4a2610, inset 0 -14px 0 #6b3a1c; }
.v-bj::before { left: -25%; right: -25%; top: -70%; height: 130%; border-radius: 50%; border: 2px solid rgba(233, 196, 106, .45); }
.v-bj::after { inset: 0; background: linear-gradient(0deg, rgba(4, 26, 15, .92) 10%, transparent 60%); z-index: 1; }
/* Бильярдная — дерево, голубое сукно и лампа сверху */
.v-pool { background: radial-gradient(70% 45% at 50% 0%, rgba(255, 210, 120, .32), transparent 70%), linear-gradient(160deg, #4a2410, #1d0e05); border-color: #4a2a14; }
.v-pool::before { inset: 14px; border-radius: 14px; background: radial-gradient(90% 90% at 50% 40%, #1f8fb8, #0b4a63); box-shadow: inset 0 0 0 6px #0b3e54, 0 0 0 3px #2a1306; }
.v-pool::after { inset: 0; background: linear-gradient(0deg, rgba(20, 10, 4, .95) 12%, transparent 62%); z-index: 1; }
/* Конфетная — пастельное небо и посыпка */
.v-candy { background: linear-gradient(180deg, #8fd3ff 0%, #c7b8ff 48%, #ff9fcf 100%); border-color: #ffc2e2; }
.v-candy::before { inset: 0; background: radial-gradient(circle at 12% 18%, #fff 0 22px, transparent 23px), radial-gradient(circle at 22% 14%, #fff 0 16px, transparent 17px), radial-gradient(circle at 80% 8%, rgba(255, 255, 255, .8) 0 18px, transparent 19px),
    radial-gradient(circle, rgba(255, 255, 255, .55) 2px, transparent 2.5px) 0 0 / 26px 26px; opacity: .85; }
.v-candy::after { inset: 0; background: linear-gradient(0deg, rgba(122, 20, 92, .9) 8%, rgba(122, 20, 92, .2) 55%, transparent 70%); z-index: 1; }

.casino-banner { width: 100%; margin-top: 18px; display: flex; align-items: center; gap: 18px; padding: 18px 22px; border-radius: 20px; text-align: left; position: relative; overflow: hidden;
    background: radial-gradient(80% 140% at 0% 50%, #6a1010, #1b0808 70%); border: 1px solid #4a1a1a; transition: transform .25s var(--ease); }
.casino-banner:hover { transform: translateY(-2px); }
.casino-banner::after { content: ''; position: absolute; inset: 6px; border-radius: 15px; border: 2px dotted rgba(242, 182, 48, .5); pointer-events: none; }
.casino-banner-logo { font-weight: 800; font-size: 20px; letter-spacing: .06em; color: #f2d48a; white-space: nowrap; }
.casino-banner-logo b { margin-left: 8px; color: var(--accent-2); font-size: .6em; letter-spacing: .4em; vertical-align: middle; }
.casino-banner-text { flex: 1; color: rgba(255, 255, 255, .65); font-size: 13.5px; }

.game-card.casino-card::before { display: none; }
.game-card.c-bj { background: radial-gradient(130% 120% at 85% 30%, #17844e 0%, #0b4a2c 50%, #1b1b1b 85%); border-color: #1d4a33; }
.game-card.c-bj::after { background: linear-gradient(90deg, rgba(6, 30, 18, .88) 0%, rgba(6, 30, 18, .3) 45%, transparent 65%); }
.game-card.c-pool { background: radial-gradient(130% 120% at 85% 30%, #1f8fb8 0%, #0b4a63 45%, #1b1b1b 85%); border-color: #173c4a; }
.game-card.c-pool::after { background: linear-gradient(90deg, rgba(6, 22, 30, .88) 0%, rgba(6, 22, 30, .3) 45%, transparent 65%); }
.game-card.c-candy { background: radial-gradient(130% 120% at 85% 30%, #ff9fcf 0%, #9b5de5 50%, #1b1b1b 88%); border-color: #4a2a4a; }
.game-card.c-candy::after { background: linear-gradient(90deg, rgba(40, 10, 40, .85) 0%, rgba(40, 10, 40, .3) 45%, transparent 65%); }

/* ---------- 21: список столов ---------- */
.bj-hero { background: radial-gradient(120% 140% at 0% 0%, #0f5a36, #1b1b1b 70%); border-color: #1d4a33; }
.pool-hero { background: radial-gradient(120% 140% at 0% 0%, #0b4a63, #1b1b1b 70%); border-color: #173c4a; }
.bj-tables { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bj-tcard { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 20px; text-align: left; background: var(--card); border: 1px solid var(--line); transition: transform .25s var(--ease), border-color .2s; }
.bj-tcard:hover { transform: translateY(-3px); border-color: var(--line-gold); }
.bj-tcard .btn { align-self: stretch; }
.bj-mini { padding: 7px; border-radius: 16px 16px 50% 50% / 16px 16px 70% 70%; background: linear-gradient(180deg, var(--rail-1), var(--rail-2)); }
.bj-mini-felt { position: relative; height: 120px; border-radius: 12px 12px 50% 50% / 12px 12px 72% 72%; background: radial-gradient(90% 90% at 50% 0%, var(--felt-1), var(--felt-2)); display: flex; justify-content: center; align-items: flex-end; gap: 8px; padding-bottom: 16px; }
.bj-mini-felt::before { content: ''; position: absolute; left: 12%; right: 12%; top: -30%; height: 90%; border-radius: 50%; border: 1.5px solid var(--line-gold); opacity: .6; }
.bj-mini-felt > i, .bj-mini-felt > img { width: 30px; height: 30px; border-radius: 50%; border: 2px dashed var(--line-gold); opacity: .8; }
.bj-mini-felt > img { border-style: solid; opacity: 1; }
.bj-mini-felt > :nth-child(1), .bj-mini-felt > :nth-child(5) { margin-bottom: 26px; }
.bj-mini-felt > :nth-child(2), .bj-mini-felt > :nth-child(4) { margin-bottom: 8px; }
.bj-tinfo { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.bj-tinfo b { font-size: 18px; }
.bj-tinfo span { display: inline-flex; align-items: center; gap: 6px; }
.bj-rules { margin-top: 18px; padding: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.bj-rules b { color: var(--text); }

/* ---------- 21: стол ---------- */
[data-theme="emerald"] { --felt-1: #17844e; --felt-2: #0a4a2b; --rail-1: #7a4320; --rail-2: #2e1608; --line-gold: #e9c46a; }
[data-theme="ruby"] { --felt-1: #b01e30; --felt-2: #4c0912; --rail-1: #4a2a18; --rail-2: #160a04; --line-gold: #f2cf7a; }
[data-theme="vip"] { --felt-1: #2b2b2b; --felt-2: #0b0b0b; --rail-1: #242424; --rail-2: #050505; --line-gold: #d4af37; }
.bj-page { max-width: 1180px; }
.bj-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.bj-title { display: flex; flex-direction: column; align-items: center; text-align: center; }
.bj-title b { font-size: 18px; color: var(--line-gold); }
.bj-title span { font-size: 12px; color: var(--muted); }
.bj-table-wrap { container-type: inline-size; }
.bj-table { --cw: 5.2cqw; --chip: 3cqw; position: relative; aspect-ratio: 16 / 9.6; padding: 1.6cqw; border-radius: 3cqw 3cqw 50% 50% / 3cqw 3cqw 62% 62%;
    background: linear-gradient(180deg, var(--rail-1), var(--rail-2)); box-shadow: 0 30px 70px rgba(0, 0, 0, .6), inset 0 2px 0 rgba(255, 255, 255, .12); }
[data-theme="vip"] .bj-table { box-shadow: 0 30px 70px rgba(0, 0, 0, .6), inset 0 0 0 2px #d4af37, inset 0 0 0 5px #111; }
.bj-felt { position: relative; height: 100%; border-radius: 2cqw 2cqw 50% 50% / 2cqw 2cqw 64% 64%; overflow: hidden;
    background: radial-gradient(80% 70% at 50% 25%, var(--felt-1), var(--felt-2)); box-shadow: inset 0 0 4cqw rgba(0, 0, 0, .55); }
.bj-felt::before { content: ''; position: absolute; inset: 0; opacity: .08; background: repeating-linear-gradient(45deg, #fff 0 1px, transparent 1px 4px); pointer-events: none; }
.bj-arc { position: absolute; left: 0; top: 0; width: 100%; pointer-events: none; font-family: Inter, Arial, sans-serif; }
.bj-tray { position: absolute; top: 0; left: 50%; translate: -50% 0; display: flex; gap: .4cqw; padding: .6cqw .9cqw; border-radius: 0 0 1cqw 1cqw; background: rgba(0, 0, 0, .45); box-shadow: inset 0 -2px 0 rgba(255, 255, 255, .06); }
.bj-tray i { width: 1.6cqw; height: 2.6cqw; border-radius: .3cqw; background: repeating-linear-gradient(180deg, var(--cc) 0 .35cqw, rgba(0, 0, 0, .35) .35cqw .42cqw); }
.bj-shoe { position: absolute; top: 4%; right: 7%; display: flex; flex-direction: column; align-items: center; gap: .3cqw; color: rgba(255, 255, 255, .5); font-size: 1.1cqw; font-weight: 700; }
.bj-shoe i { width: 5.6cqw; height: 4.2cqw; border-radius: .8cqw; background: linear-gradient(160deg, #3a3a3a, #111); box-shadow: inset 1.4cqw 0 0 #b52222, 0 .6cqw 1.2cqw rgba(0, 0, 0, .5); transform: skewX(-12deg); }
.bj-dealer { position: absolute; top: 10%; left: 50%; translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: .6cqw; }
.bj-dealer-name { color: var(--line-gold); opacity: .55; font-weight: 800; letter-spacing: .3em; font-size: 1.2cqw; text-transform: uppercase; margin-top: 3cqw; }
.bj-banner { position: absolute; top: 5%; left: 5%; padding: .7cqw 1.8cqw; border-radius: 999px; background: rgba(0, 0, 0, .55); color: var(--line-gold); font-weight: 700; font-size: max(12px, 1.35cqw); white-space: nowrap; border: 1px solid rgba(255, 255, 255, .08); }
.bj-banner.my { background: rgba(95, 209, 58, .2); color: #c8ffb0; border-color: rgba(95, 209, 58, .5); animation: pulse 2s infinite; }
.bj-dl { font-variant-numeric: tabular-nums; }
.bj-cards { display: flex; }
.bj-cards .pcard + .pcard { margin-left: calc(var(--cw) * -.58); }
.bj-table .pcard.bj-c { width: var(--cw); height: calc(var(--cw) * 1.42); border-radius: calc(var(--cw) * .12); box-shadow: 0 .5cqw 1cqw rgba(0, 0, 0, .45); }
.bj-table .pcard.bj-c .pr { top: calc(var(--cw) * .06); left: calc(var(--cw) * .09); font-size: calc(var(--cw) * .24); }
.bj-table .pcard.bj-c .ps { font-size: calc(var(--cw) * .52); padding-top: calc(var(--cw) * .2); }
.bj-table .pcard.bj-c.back { border-width: calc(var(--cw) * .05); }
.pcard.deal { animation: bjDeal .45s var(--ease) backwards; }
@keyframes bjDeal { from { opacity: 0; transform: translate(14cqw, -18cqw) rotate(-25deg) scale(.7); } }
.bj-total { min-width: 2.6cqw; padding: .25cqw .7cqw; border-radius: 999px; background: rgba(0, 0, 0, .65); color: #fff; font-weight: 800; font-size: max(11px, 1.15cqw); text-align: center; }

.bj-seat { position: absolute; left: var(--x); top: var(--y); translate: -50% -50%; display: flex; flex-direction: column; align-items: center; gap: .5cqw; width: 15cqw; }
.bj-seat[data-i="0"] { --x: 11.5%; --y: 54%; }
.bj-seat[data-i="1"] { --x: 30%; --y: 70%; }
.bj-seat[data-i="2"] { --x: 50%; --y: 76%; }
.bj-seat[data-i="3"] { --x: 70%; --y: 70%; }
.bj-seat[data-i="4"] { --x: 88.5%; --y: 54%; }
.bj-hands { position: absolute; bottom: calc(100% - .6cqw); left: 50%; translate: -50% 0; display: flex; gap: 1.2cqw; align-items: flex-end; }
.bj-hand { position: relative; display: flex; flex-direction: column; align-items: center; gap: .4cqw; padding: .4cqw; border-radius: 1cqw; transition: box-shadow .2s; }
.bj-hand.active { box-shadow: 0 0 0 2px #c8ffb0, 0 0 2cqw rgba(95, 209, 58, .55); }
.bj-hand.r-bust .bj-cards, .bj-hand.r-lose .bj-cards { filter: brightness(.6); }
.bj-res { position: absolute; top: -1.2cqw; padding: .2cqw .7cqw; border-radius: 999px; font-size: max(10px, 1cqw); font-weight: 800; white-space: nowrap; background: #333; color: #fff; animation: prizeIn .4s var(--ease); }
.r-blackjack .bj-res { background: linear-gradient(90deg, #f2b630, #ffe08a); color: #3a2400; }
.r-win .bj-res { background: var(--win); color: #0b2a04; }
.r-push .bj-res { background: #5a5a5a; }
.r-lose .bj-res, .r-bust .bj-res { background: var(--lose); }
.bj-spot { position: relative; width: 6.4cqw; height: 6.4cqw; border-radius: 50%; border: 2px solid var(--line-gold); opacity: .55; display: grid; place-items: center; }
.bj-spot.has { opacity: 1; }
.bj-seat.mine .bj-spot { opacity: 1; box-shadow: 0 0 0 3px rgba(255, 255, 255, .12), 0 0 2cqw rgba(233, 196, 106, .35); }
.chip-stack { position: relative; width: var(--chip); height: calc(var(--chip) + 2.4cqw); }
.chip-stack .chip { position: absolute; left: 0; bottom: calc(var(--k) * .42cqw); }
.chip { width: var(--chip, 3cqw); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
    background: radial-gradient(circle, var(--cc) 0 44%, rgba(255, 255, 255, .85) 45% 49%, transparent 50%), repeating-conic-gradient(var(--cc) 0 22.5deg, #f4f4f4 22.5deg 45deg);
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25), 0 2px 3px rgba(0, 0, 0, .55); }
.bj-amt { position: absolute; bottom: -1.3cqw; padding: .1cqw .6cqw; border-radius: 999px; background: rgba(0, 0, 0, .7); color: #fff; font-size: max(10px, 1cqw); font-weight: 800; white-space: nowrap; }
.bj-ready { position: absolute; top: -.6cqw; right: -.6cqw; width: 1.8cqw; height: 1.8cqw; min-width: 16px; min-height: 16px; border-radius: 50%; background: var(--win); color: #0b2a04; font-style: normal; font-weight: 800; font-size: max(10px, 1cqw); display: grid; place-items: center; }
.bj-player { display: flex; align-items: center; gap: .6cqw; max-width: 15cqw; margin-top: .6cqw; padding: .3cqw .8cqw .3cqw .3cqw; border-radius: 999px; background: rgba(0, 0, 0, .45); font-size: max(11px, 1.1cqw); }
.bj-seat.mine .bj-player { background: rgba(217, 43, 43, .55); }
.bj-player .avatar.sm { width: max(20px, 2.4cqw); height: max(20px, 2.4cqw); }
.bj-ava { display: grid; border-radius: 50%; }
.bj-ava.ring { padding: 2px; background: conic-gradient(var(--gold) calc(var(--p, 1) * 360deg), rgba(255, 255, 255, .15) 0); }
.bj-sit { padding: .8cqw 1.6cqw; border-radius: 999px; border: 2px dashed var(--line-gold); color: var(--line-gold); font-weight: 800; font-size: max(11px, 1.2cqw); background: rgba(0, 0, 0, .25); transition: .2s; }
.bj-sit:hover { background: rgba(0, 0, 0, .5); transform: scale(1.05); }
.bj-float { position: absolute; top: -10cqw; font-weight: 800; font-size: max(14px, 2cqw); color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); animation: bjFloat 2.4s var(--ease) forwards; pointer-events: none; }
.bj-float.plus { color: #9dff7a; }
.bj-float.minus { color: #ff8a8a; }
@keyframes bjFloat { from { opacity: 0; transform: translateY(2cqw) scale(.8); } 15% { opacity: 1; transform: none; } 80% { opacity: 1; } to { opacity: 0; transform: translateY(-2cqw); } }

.bj-controls { margin-top: 18px; padding: 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); min-height: 84px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.bj-hint { text-align: center; color: var(--muted); font-weight: 600; }
.bj-chips { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.chip.big { --chip: 58px; width: 58px; font-weight: 800; font-size: 13px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .8); transition: transform .15s var(--ease); }
.chip.big:hover:not(:disabled) { transform: translateY(-4px); }
.chip.big:disabled { opacity: .3; cursor: not-allowed; }
.bj-betline { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bj-mybet { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; }
.bj-mybet b { color: var(--text); font-size: 18px; }
.bj-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.bj-act { height: 64px; flex-direction: column; gap: 2px; background: var(--card-2); border: 1px solid var(--line-2); font-size: 16px; }
.bj-act small { font-size: 11px; font-weight: 600; color: var(--muted); }
.bj-act:hover:not(:disabled) { background: #2a2a2a; }
.bj-act.hit { background: #1f5a2e; border-color: #2c7a40; }
.bj-act.stand { background: var(--accent); border-color: var(--accent-2); }
.bj-act.hit small, .bj-act.stand small { color: rgba(255, 255, 255, .7); }

/* ---------- бильярд ---------- */
.pool { display: flex; flex-direction: column; gap: 12px; }
.pool-players { display: flex; gap: 12px; flex-wrap: wrap; }
.pool-pl { flex: 1 1 300px; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); transition: border-color .2s; }
.pool-pl.on { border-color: rgba(95, 209, 58, .55); background: linear-gradient(90deg, rgba(95, 209, 58, .08), var(--card) 70%); }
.pool-pl.right { flex-direction: row-reverse; }
.pool-pl.right.on { background: linear-gradient(270deg, rgba(95, 209, 58, .08), var(--card) 70%); }
.pool-tray { display: flex; gap: 3px; margin-left: auto; flex-wrap: wrap; }
.pool-pl.right .pool-tray { margin-left: 0; margin-right: auto; }
.mini-ball { width: 19px; height: 19px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 9px; font-weight: 800; color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000;
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .55), transparent 45%), var(--bc); box-shadow: inset -2px -2px 4px rgba(0, 0, 0, .35); }
.mini-ball.stripe { background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .55), transparent 45%), linear-gradient(#f6f3ea 0 24%, var(--bc) 24% 76%, #f6f3ea 76%); }
.mini-ball.gone { opacity: .18; }
.pool-table-wrap { padding: 8px; border-radius: 30px; background: radial-gradient(60% 70% at 50% 0%, rgba(255, 214, 120, .2), transparent 75%); }
#pool-canvas { display: block; width: 100%; height: auto; border-radius: 26px; touch-action: none; cursor: crosshair; box-shadow: 0 26px 60px rgba(0, 0, 0, .6); }
.pool-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pool-power { flex: 1 1 260px; display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-weight: 600; color: var(--muted); }
.pool-power input { flex: 1; accent-color: var(--accent); }
.pool-power b { color: var(--text); min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; }
.pool-controls .btn-primary { min-width: 140px; }

/* ---------- Sweet Desire ---------- */
.candy-page { max-width: 1120px; }
.candy-scene { position: relative; overflow: hidden; padding: 18px 18px 14px; border-radius: 28px; color: #fff; transition: background 1s;
    background: linear-gradient(180deg, #8fd3ff 0%, #b9c4ff 38%, #ffb8dc 72%, #ffd9ec 100%); border: 3px solid rgba(255, 255, 255, .55); box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.candy-scene.fs { background: linear-gradient(180deg, #2a0f5a 0%, #6a2bd8 45%, #ff5fa2 100%); }
.candy-deco { position: absolute; inset: 0; pointer-events: none; }
.cloud { position: absolute; height: 34px; border-radius: 999px; background: #fff; opacity: .85; box-shadow: 0 6px 0 rgba(200, 180, 255, .4); }
.cloud::before, .cloud::after { content: ''; position: absolute; border-radius: 50%; background: #fff; }
.cloud::before { width: 44px; height: 44px; left: 16px; top: -22px; }
.cloud::after { width: 32px; height: 32px; right: 18px; top: -14px; }
.cloud.c1 { width: 120px; left: 3%; top: 26px; animation: cloud 18s ease-in-out infinite alternate; }
.cloud.c2 { width: 90px; right: 6%; top: 18px; animation: cloud 22s ease-in-out infinite alternate-reverse; }
.cloud.c3 { width: 70px; left: 38%; top: 8px; opacity: .6; animation: cloud 26s ease-in-out infinite alternate; }
.candy-scene.fs .cloud { opacity: .18; }
@keyframes cloud { to { translate: 40px 0; } }
.lolly { position: absolute; width: 74px; height: 74px; border-radius: 50%; background: radial-gradient(circle, transparent 0 30%, rgba(255, 255, 255, .0) 31%), repeating-conic-gradient(#ff5fa2 0 20deg, #fff 20deg 40deg); box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .6); }
.lolly::after { content: ''; position: absolute; left: 50%; top: 100%; width: 8px; height: 120px; translate: -50% 0; border-radius: 4px; background: #fdf6ec; }
.lolly.l1 { left: -18px; bottom: 120px; rotate: -12deg; }
.lolly.l2 { right: -20px; bottom: 160px; width: 60px; height: 60px; background: repeating-conic-gradient(#7b5cff 0 20deg, #fff 20deg 40deg); rotate: 14deg; }
.swirl { position: absolute; left: -10%; right: -10%; bottom: -60px; height: 140px; border-radius: 50%; background: radial-gradient(60% 60% at 30% 40%, #fff, #ffd1e8 60%, #ff9fcf); opacity: .7; }
.candy-scene.fs .swirl, .candy-scene.fs .lolly { opacity: .35; }
.candy-title { position: relative; text-align: center; font-size: 40px; font-weight: 800; font-style: italic; letter-spacing: .02em; margin-bottom: 12px;
    text-shadow: 0 3px 0 #e2479a, 0 6px 0 #9b2f75, 0 10px 20px rgba(120, 20, 90, .5); }
.candy-title span { color: #ffe066; }
.candy-main { position: relative; display: grid; grid-template-columns: 190px 1fr; gap: 16px; align-items: center; }
.candy-side { display: flex; flex-direction: column; gap: 12px; }
.candy-buy { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 12px; border-radius: 20px; color: #4a1060; text-align: center;
    background: linear-gradient(180deg, #fff3a8, #ffc23d); border: 3px solid #fff; box-shadow: 0 6px 0 #d98b0f, 0 12px 24px rgba(120, 40, 0, .35); transition: transform .15s; }
.candy-buy:hover:not(:disabled) { transform: translateY(-2px); }
.candy-buy:disabled { filter: grayscale(.6); opacity: .7; cursor: not-allowed; }
.candy-buy small { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.candy-buy b { font-size: 26px; font-weight: 800; line-height: 1; }
.candy-buy span { font-size: 12px; font-weight: 600; opacity: .8; }
.candy-buy em { margin-top: 6px; font-style: normal; font-weight: 800; display: inline-flex; gap: 5px; align-items: center; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .7); }
.candy-fs { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 10px; border-radius: 20px; background: linear-gradient(180deg, #8f4bff, #5a14a8); border: 3px solid #ffe066; box-shadow: 0 10px 24px rgba(40, 0, 80, .4); }
.candy-fs small { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.candy-fs b { font-size: 30px; font-weight: 800; }
.candy-fs span { display: inline-flex; gap: 5px; align-items: center; font-weight: 800; color: #ffe066; }
.candy-info { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border-radius: 999px; font-weight: 700; color: #6a2bd8; background: rgba(255, 255, 255, .8); }
.candy-info svg { width: 18px; height: 18px; }
.candy-board { position: relative; justify-self: center; width: min(100%, calc((100dvh - 340px) * 1.2 + 16px)); min-width: min(100%, 420px); padding: 8px; border-radius: 26px; background: repeating-linear-gradient(45deg, #ff6fae 0 12px, #fff 12px 24px); box-shadow: 0 16px 40px rgba(120, 20, 90, .35); }
.candy-banner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 14px; min-height: 42px; padding: 6px 14px; margin-bottom: 8px; border-radius: 18px; text-align: center;
    background: linear-gradient(90deg, #6a2bd8, #c2389b); font-weight: 700; font-size: 14px; }
.candy-banner b { color: #ffe066; }
.cb-win { display: inline-flex; align-items: center; gap: 6px; }
.cb-win svg { width: 24px; height: 24px; }
.cb-mult { padding: 2px 10px; border-radius: 999px; background: #ffe066; color: #5a14a8; font-weight: 800; }
.candy-grid { container-type: inline-size; position: relative; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(5, 1fr); aspect-ratio: 6 / 5; gap: 2px; padding: 6px; overflow: hidden; border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(255, 236, 248, .7)); box-shadow: inset 0 4px 14px rgba(160, 60, 120, .2); }
.candy-scene.fs .candy-grid { background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(240, 210, 255, .45)); }
.cc { position: relative; min-width: 0; min-height: 0; }
.cc::before { content: ''; position: absolute; inset: 3%; border-radius: 14px; background: radial-gradient(circle, rgba(255, 255, 255, .0), transparent); transition: background .2s; }
.cc-in { width: 100%; height: 100%; display: grid; place-items: center; will-change: transform; }
.cs { width: 88%; height: 88%; filter: drop-shadow(0 3px 2px rgba(90, 10, 60, .28)); }
.cs.bomb { position: relative; display: grid; place-items: center; animation: bombSpin 3s linear infinite; }
.cs.bomb svg { width: 100%; height: 100%; }
.cs.bomb b { position: absolute; font-size: 4.6cqw; font-weight: 800; color: #fff; -webkit-text-stroke: 1.5px #5a14a8; paint-order: stroke; }
@keyframes bombSpin { 50% { transform: rotate(8deg) scale(1.04); } }
.cc.win::before { background: radial-gradient(circle, rgba(255, 240, 120, .85), rgba(255, 160, 220, .2) 70%, transparent); }
.cc.win .cc-in { animation: candyWin .42s ease-in-out infinite alternate; }
.cc.scatter::before { background: radial-gradient(circle, rgba(255, 120, 200, .9), transparent 70%); }
@keyframes candyWin { to { transform: scale(1.16); } }
.cc.pop .cc-in { animation: candyPop .26s ease-in forwards; }
@keyframes candyPop { to { transform: scale(0) rotate(40deg); opacity: 0; } }
.candy-overlay { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; border-radius: 26px; background: rgba(50, 0, 70, .55); backdrop-filter: blur(3px); animation: fade .3s; cursor: pointer; }
.ov-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 34px; border-radius: 26px; text-align: center; color: #5a14a8;
    background: linear-gradient(180deg, #fff, #ffe3f2); border: 4px solid #ff6fae; box-shadow: 0 20px 50px rgba(0, 0, 0, .4); animation: modalIn .45s var(--ease); }
.ov-card small { font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; color: #c2389b; }
.ov-card b { font-size: 30px; font-weight: 800; }
.ov-card .ov-sum { font-size: 44px; color: #e2479a; }
.ov-card span { font-size: 13px; font-weight: 600; opacity: .75; max-width: 260px; }
.ov-big { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; animation: bigIn .6s var(--ease); }
.ov-big small { font-size: 34px; font-weight: 800; font-style: italic; color: #fff; text-shadow: 0 3px 0 #e2479a, 0 6px 0 #9b2f75; }
.ov-big b { font-size: 64px; font-weight: 800; background: linear-gradient(180deg, #fff6c4, #ffc23d 60%, #f07a1a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 #9b2f75); font-variant-numeric: tabular-nums; }
.ov-big span { font-weight: 700; color: #ffe3f2; }
@keyframes bigIn { from { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); } }
.candy-bar { position: relative; display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 10px 14px; border-radius: 22px; background: rgba(60, 10, 80, .55); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .25); }
.candy-stat { display: flex; flex-direction: column; min-width: 0; }
.candy-stat small { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #ffd1e8; }
.candy-stat b { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.candy-stat.win { flex: 1; align-items: center; }
.candy-stat.win b { color: #ffe066; font-size: 24px; }
.candy-bet { display: flex; align-items: center; gap: 8px; }
.candy-bet .candy-stat { min-width: 76px; align-items: center; }
.candy-bet button { width: 34px; height: 34px; border-radius: 50%; font-size: 20px; font-weight: 800; background: rgba(255, 255, 255, .2); border: 2px solid rgba(255, 255, 255, .5); }
.candy-bet button:disabled { opacity: .4; }
.candy-btns { display: flex; align-items: center; gap: 10px; }
.candy-spin { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 35% 30%, #ffa8d4, #e2479a 55%, #8f1d6b); border: 4px solid #fff; box-shadow: 0 6px 0 #8f1d6b, 0 12px 26px rgba(120, 20, 90, .5); transition: transform .15s; }
.candy-spin svg { width: 34px; height: 34px; }
.candy-spin:hover:not(:disabled) { transform: scale(1.05); }
.candy-spin:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 3px 0 #8f1d6b; }
.candy-spin:disabled { cursor: default; }
.candy-scene.spinning .candy-spin svg { animation: spin .9s linear infinite; }
.candy-toggle { height: 34px; padding: 0 14px; border-radius: 999px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; background: rgba(255, 255, 255, .18); border: 2px solid rgba(255, 255, 255, .45); }
.candy-toggle.on { background: #ffe066; color: #5a14a8; border-color: #fff; }
.pay-list { display: flex; flex-direction: column; gap: 6px; }
.pay-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 12px; background: var(--card-2); }
.pay-row > svg { width: 40px; height: 40px; }
.pay-row b { display: block; }
.pay-row small { font-size: 12px; }
.pay-row > span { display: flex; flex-direction: column; align-items: flex-end; min-width: 64px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pay-row > span small { color: var(--muted); font-weight: 600; font-size: 11px; }

@media (max-width: 1000px) {
    .venues, .bj-tables { grid-template-columns: 1fr; }
    .venue { min-height: 230px; }
    .venue-art { width: 52%; top: 50%; translate: 0 -50%; }
    .venue p { max-width: 55%; }
    .candy-main { grid-template-columns: 1fr; }
    .candy-side { flex-direction: row; flex-wrap: wrap; }
    .candy-side > * { flex: 1 1 140px; }
    .candy-buy { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 4px 8px; padding: 10px; }
    .candy-buy b { font-size: 18px; }
    .candy-buy span { display: none; }
    .candy-buy em { margin: 0; }
    .candy-fs { flex-direction: row; gap: 10px; justify-content: center; padding: 8px; }
    .candy-fs b { font-size: 20px; }
}
@media (max-width: 680px) {
    .casino-logo { font-size: 36px; }
    .casino-logo span { font-size: 12px; }
    .casino-banner { flex-wrap: wrap; }
    .casino-banner-text { flex-basis: 100%; order: 3; }
    .venue p { max-width: 62%; font-size: 12.5px; }
    .venue h3 { font-size: 24px; }
    .bj-table { --cw: 8.4cqw; --chip: 4.6cqw; aspect-ratio: 10 / 12.5; border-radius: 4cqw 4cqw 50% 50% / 4cqw 4cqw 40% 40%; }
    .bj-felt { border-radius: 3cqw 3cqw 50% 50% / 3cqw 3cqw 42% 42%; }
    .bj-seat { width: 22cqw; }
    .bj-seat[data-i="0"] { --x: 14%; --y: 50%; }
    .bj-seat[data-i="1"] { --x: 28%; --y: 73%; }
    .bj-seat[data-i="2"] { --x: 50%; --y: 86%; }
    .bj-seat[data-i="3"] { --x: 72%; --y: 73%; }
    .bj-seat[data-i="4"] { --x: 86%; --y: 50%; }
    .bj-spot { width: 9cqw; height: 9cqw; }
    .bj-player { max-width: 22cqw; }
    .bj-player b { max-width: 12cqw; }
    .bj-dealer { top: 9%; }
    .bj-banner { top: 3%; left: 4%; }
    .bj-dealer { top: 12%; }
    .bj-arc { top: 13%; }
    .bj-shoe { display: none; }
    .bj-tray i { width: 2.4cqw; height: 3.6cqw; }
    .bj-actions { grid-template-columns: repeat(2, 1fr); }
    .chip.big { --chip: 48px; width: 48px; font-size: 12px; }
    .bj-head .back { font-size: 13px; }
    .pool-pl { flex-basis: 100%; }
    .pool-controls .btn { flex: 1; }
    .candy-scene { padding: 12px 10px 10px; border-radius: 22px; margin: 0 -8px; }
    .candy-title { font-size: 28px; }
    .candy-board { padding: 6px; border-radius: 20px; }
    .candy-banner { font-size: 12.5px; min-height: 38px; }
    .candy-bar { flex-wrap: wrap; justify-content: space-between; gap: 10px; }
    .candy-stat.win { order: -1; flex-basis: 100%; }
    .candy-btns { flex-basis: 100%; justify-content: center; }
    .ov-big b { font-size: 44px; }
    .ov-big small { font-size: 26px; }
}

/* ---------- правила для новичков ---------- */
.howto-card { margin-top: 14px; padding: 18px; }
.howto { display: flex; flex-direction: column; gap: 10px; }
.howto-row { display: grid; grid-template-columns: 92px 1fr; gap: 10px; font-size: 13.5px; line-height: 1.45; }
.howto-row b { color: var(--accent-2); font-weight: 700; }
.howto-row span { color: var(--muted); }

/* ---------- настройки стола ---------- */
.opt-label { font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 2px 0 -4px; }
.segmented.seg-num button { padding: 9px 4px; }
.toggle-row { display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); }
.toggle-row small { display: block; font-size: 12px; color: var(--dim); margin-top: 2px; font-weight: 500; }
.toggle { position: relative; width: 38px; height: 22px; border-radius: 999px; background: #333; flex-shrink: 0; transition: .2s; }
.toggle i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #bbb; transition: .2s var(--ease); }
.toggle-row.on { border-color: rgba(217, 43, 43, .5); }
.toggle-row.on .toggle { background: var(--accent); }
.toggle-row.on .toggle i { left: 19px; background: #fff; }
.seat-stack { display: inline-flex; align-items: center; flex-shrink: 0; }
.seat-stack .avatar { margin-left: -8px; box-shadow: 0 0 0 2px var(--card); }
.seat-stack .avatar:first-child { margin-left: 0; }
.seat-empty { width: 28px; height: 28px; border-radius: 50%; margin-left: -8px; border: 2px dashed #444; background: var(--card); box-sizing: border-box; }

/* ---------- дурак на компанию ---------- */
.durak-opps { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.opp-seat { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .06); min-width: 0; flex: 1 1 200px; max-width: 320px; transition: .2s; }
.durak:not(.many) .opp-seat { flex-direction: row; align-items: center; justify-content: space-between; max-width: none; background: none; border-color: transparent; padding: 0; }
.opp-seat.turn { border-color: rgba(242, 182, 48, .6); box-shadow: 0 0 18px rgba(242, 182, 48, .18); }
.opp-seat.def .opp-meta span { color: #ffb36b; }
.opp-seat.out { opacity: .45; }
.opp-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.opp-meta { display: flex; flex-direction: column; min-width: 0; }
.opp-meta b { font-size: 13.5px; }
.opp-meta span { font-size: 12px; color: rgba(255, 255, 255, .55); font-weight: 600; }
.opp-hand { position: relative; display: flex; align-items: center; padding-left: 26px; min-height: 64px; }
.durak.many .opp-hand { padding-left: 16px; min-height: 46px; }
.durak.many .opp-hand .pcard { width: 32px; height: 46px; margin-left: -16px; border-width: 2px; }
.opp-count { margin-left: 8px; font-weight: 800; font-size: 13px; color: rgba(255, 255, 255, .7); }
.durak-actions { align-items: center; flex-wrap: wrap; }
.my-role { background: rgba(0, 0, 0, .3); }
.my-hand .pcard.cheaty { filter: brightness(.85); }
.my-hand .pcard.cheaty:hover { transform: translateY(-10px); box-shadow: 0 0 0 2px #b36bff; }
.catch-btn { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); z-index: 3; padding: 3px 9px; border-radius: 999px; background: #2a1030; border: 1px solid #b36bff; color: #e4c8ff; font-size: 11px; font-weight: 800; white-space: nowrap; opacity: .85; }
.catch-btn:hover { opacity: 1; background: #3e1747; }

/* ---------- джокер ---------- */
.joker { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: 22px; background: radial-gradient(120% 100% at 50% 40%, #1d2f45 0%, #121d2b 60%, #0d141e 100%); border: 1px solid #1f3048; }
.jk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 13.5px; color: rgba(255, 255, 255, .7); font-weight: 600; }
.jk-bar b { color: #fff; }
.jk-bar b.red, .jk-suit.red { color: #ff5a5a; }
.jk-bar .btn { margin-left: auto; }
.jk-table { display: grid; grid-template-columns: 1fr minmax(0, 1.5fr) 1fr; grid-template-areas: ". top ." "left mid right"; gap: 12px; align-items: center; }
.jk-left { grid-area: left; } .jk-top { grid-area: top; justify-self: center; } .jk-right { grid-area: right; }
.jk-center { grid-area: mid; position: relative; height: 250px; }
.jk-seat { position: relative; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 14px; background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .06); min-width: 0; }
.jk-seat.turn { border-color: rgba(242, 182, 48, .65); box-shadow: 0 0 18px rgba(242, 182, 48, .18); }
.jk-seat.gone { opacity: .55; }
.jk-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.jk-info b { font-size: 13.5px; }
.jk-info span { font-size: 12px; color: rgba(255, 255, 255, .6); }
.jk-info span b { font-size: 12px; color: #fff; }
.jk-info span b.ok { color: var(--win); }
.jk-score { font-weight: 800; font-variant-numeric: tabular-nums; padding: 4px 9px; border-radius: 8px; background: rgba(255, 255, 255, .08); }
.jk-badge { position: absolute; top: -9px; right: 10px; padding: 1px 7px; border-radius: 999px; background: var(--gold); color: #111; font-size: 10.5px; font-weight: 800; }
.jk-badge + .jk-badge { right: 64px; background: #888; }
.jk-me { display: flex; justify-content: center; }
.jk-me .jk-seat { min-width: 260px; }
.jk-play { position: absolute; left: 50%; top: 50%; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: .2s; }
.jk-p-bottom { transform: translate(-50%, -6%); }
.jk-p-top { transform: translate(-50%, -94%); }
.jk-p-left { transform: translate(-128%, -50%); }
.jk-p-right { transform: translate(28%, -50%); }
.jk-play.win .pcard { box-shadow: 0 0 0 3px var(--gold), 0 8px 22px rgba(0, 0, 0, .5); }
.jk-note { font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #ffd36b; white-space: nowrap; }
.jk-last { position: absolute; left: 0; right: 0; bottom: -4px; text-align: center; font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .55); }
.jk-center .table-empty { position: absolute; inset: 0; display: grid; place-items: center; }
.jk-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 10px; border-radius: 14px; background: rgba(0, 0, 0, .25); }
.jk-controls .muted { width: 100%; text-align: center; font-size: 13px; }
.jk-suit { font-size: 22px; min-width: 52px; }
.jk-suit.active, .jk-bid.active { border-color: var(--gold); }
.jk-bid { min-width: 44px; }
.jk-bid:disabled { opacity: .3; text-decoration: line-through; }
.pcard.joker-card { background: linear-gradient(160deg, #fff7e0, #f1e3bf); }
.pcard.joker-card .ps { font-size: 40px; padding-top: 4px; }
.pcard .jk-word { position: absolute; left: 0; right: 0; bottom: 7px; text-align: center; font-size: 9px; font-weight: 800; letter-spacing: 1px; }
.jk-score-wrap { overflow-x: auto; }
.jk-score-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.jk-score-table th, .jk-score-table td { padding: 7px 8px; text-align: center; white-space: nowrap; }
.jk-score-table th { font-weight: 700; color: var(--muted); max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
.jk-score-table td:first-child, .jk-score-table th:first-child { text-align: left; }
.jk-score-table tbody tr:nth-child(odd) { background: #202020; }
.jk-score-table tfoot td { border-top: 1px solid var(--line-2); }
.jk-score-table .neg { color: var(--lose); }

@media (max-width: 680px) {
    .durak.many .durak-opps { gap: 6px; }
    .durak.many .opp-seat { flex: 1 1 140px; padding: 8px; }
    .catch-btn { bottom: -12px; padding: 2px 7px; font-size: 10px; }
    .jk-table { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "left top right" "mid mid mid"; gap: 6px; }
    .jk-top { justify-self: stretch; }
    .jk-seat { flex-wrap: wrap; padding: 7px 8px; gap: 6px; }
    .jk-seat .avatar { display: none; }
    .jk-me .jk-seat { min-width: 0; width: 100%; }
    .jk-me .jk-seat .avatar { display: block; }
    .jk-center { height: 210px; }
    .jk-p-left { transform: translate(-118%, -50%); }
    .jk-p-right { transform: translate(18%, -50%); }
    .howto-row { grid-template-columns: 78px 1fr; font-size: 13px; }
}

/* ==========================================
   МОБИЛЬНАЯ АДАПТАЦИЯ (iOS / Android / Discord Mobile)
   ========================================== */
.m-topbar { display: none; }
.boot { padding: calc(20px + env(safe-area-inset-top)) 18px calc(40px + env(safe-area-inset-bottom)); }
.boot-ver { bottom: calc(12px + env(safe-area-inset-bottom)); }
.boot-text .boot-login-btn { display: inline-flex; margin-top: 16px; width: min(260px, 100%); height: 48px; text-decoration: none; font-size: 15px; }
.boot-sub { margin-top: 12px; font-size: 12.5px; color: var(--dim); line-height: 1.45; }
.modal { padding: calc(14px + env(safe-area-inset-top)) 12px calc(14px + env(safe-area-inset-bottom)); }
.modal-card { max-height: calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }

@media (max-width: 680px) {
    .app { flex-direction: column; }
    .m-topbar {
        order: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: calc(8px + env(safe-area-inset-top)) 14px 8px;
        background: var(--bg-2);
        border-bottom: 1px solid var(--line);
        flex-shrink: 0;
        z-index: 4;
    }
    /* Запас под верхнюю плавающую панель управления активностью в мобильном Discord */
    html.discord-mobile .m-topbar {
        padding-top: calc(8px + max(env(safe-area-inset-top), 38px));
    }
    html.discord-mobile .boot {
        padding-top: calc(24px + max(env(safe-area-inset-top), 42px));
    }
    .m-brand { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
    .m-logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 15px; flex-shrink: 0; background: var(--card-2); }
    .m-brand b { font-size: 14px; font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
    .m-brand b span { font-size: 10px; letter-spacing: .2em; margin-left: 5px; color: var(--muted); }
    .m-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
    .m-balance { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 11px; border-radius: 999px; background: var(--card); border: 1px solid var(--line-2); font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
    .m-balance svg { width: 17px; height: 17px; }
    .m-icon-btn { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line-2); font-weight: 800; font-size: 11.5px; color: var(--muted); flex-shrink: 0; }
    .m-icon-btn svg { width: 17px; height: 17px; }

    .main { order: 1; flex: 1; min-height: 0; padding: 14px 14px 26px; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }
    .nav { order: 2; width: 100%; flex-direction: row; padding: 5px 6px calc(5px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); gap: 4px; flex-shrink: 0; }
    .nav-bottom { display: none !important; }
    .nav-item { flex: 1 1 0; min-width: 0; padding: 7px 2px; font-size: 10.5px; gap: 4px; }
    .nav-item svg { width: 20px; height: 20px; }
    .nav-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    .toasts { left: 12px; right: 12px; bottom: calc(70px + env(safe-area-inset-bottom)); align-items: center; pointer-events: none; }
    .toast { pointer-events: auto; width: 100%; max-width: 400px; text-align: center; }
    .modal-body { padding: 18px 16px; }

    /* Кейсы на телефоне */
    .strip-wrap { margin: 16px -14px; }
    .strip-wrap::before, .strip-wrap::after { width: 44px; }
    .segmented { gap: 3px; padding: 4px; }
    .segmented button { min-width: 0; font-size: 12px; padding: 8px 3px; }
    .segmented button small { font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .loot-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
    .loot-grid .drop { height: 148px; }
    .prize { padding: 22px 14px 18px; }
    .prize-items .drop { flex: 0 1 124px; height: 142px; }

    /* Лобби и арена костей / дуэлей */
    .lobby-item { flex-wrap: wrap; gap: 8px 10px; padding: 12px; }
    .lobby-item .grow { min-width: 140px; }
    .arena { padding: 20px 12px 18px; }
    .fighter .avatar { width: 56px; height: 56px; }
    .fighter .name { max-width: 105px; font-size: 13px; }
    .board-hero { flex-wrap: wrap; gap: 12px; padding: 14px 16px; }
    .board-hero img { width: 64px; height: 48px; }

    /* Блэкджек и карты в руке (без обрезки левых карт при переполнении) */
    .bj-controls { padding: 12px; gap: 10px; }
    .bj-chips { gap: 8px; }
    .bj-act { height: 54px; font-size: 14px; }
    .my-hand { justify-content: flex-start; padding: 20px 8px 6px; -webkit-overflow-scrolling: touch; }
    .my-hand .pcard:first-child { margin-left: auto; }
    .my-hand .pcard:last-child { margin-right: auto; }

    /* Запрет авто-зума iOS WebKit при фокусе на полях ввода */
    input, textarea, select { font-size: 16px; }
    .bet-input input { font-size: 22px; }
}

@media (hover: none) {
    .my-hand .pcard.playable:hover:not(.selected) { transform: none; }
    .game-card:hover, .venue:hover, .bj-tcard:hover, .casino-banner:hover { transform: none; }
}
