/* ============================================================
   Покер-Трекер — дизайн-система
   «Подпольная покерная лига»: тёмный клубный стол, латунь,
   моноширинные цифры, condensed-заголовки, фишки-аватары.
   Две темы через токены. Мобайл-адаптив.
   ============================================================ */

/* ---------- Токены ---------- */
:root {
  /* LIGHT — «карты на пергаменте» */
  --felt: #E7E3D3;
  --felt-2: #EFEBDD;
  --surface: #F6F2E6;
  --surface-2: #FBF8EF;
  --line: rgba(58,48,22,0.16);
  --line-soft: rgba(58,48,22,0.09);
  --ink: #1B241C;
  --ink-dim: #5E6A5C;
  --ink-faint: #8A9384;
  --brass: #8A6A1E;
  --brass-hi: #6E5417;
  --brass-glow: rgba(138,106,30,0.14);
  --win: #1C824F;
  --win-soft: rgba(28,130,79,0.14);
  --loss: #BB392C;
  --loss-soft: rgba(187,57,44,0.13);
  --shadow: 0 1px 2px rgba(30,24,10,0.06), 0 8px 24px rgba(30,24,10,0.08);
  --shadow-lg: 0 2px 6px rgba(30,24,10,0.08), 0 24px 60px rgba(30,24,10,0.14);
  --radius: 14px;
  --radius-sm: 9px;
  --font-display: "Bahnschrift", "DIN Alternate", "Oswald", "Arial Narrow", system-ui, sans-serif;
  --font-num: "Cascadia Code", ui-monospace, "SF Mono", "Consolas", "Menlo", monospace;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --felt: #0E1512; --felt-2: #13201A; --surface: #16211A; --surface-2: #1D2B22;
    --line: rgba(201,162,75,0.16); --line-soft: rgba(201,162,75,0.08);
    --ink: #ECE7D6; --ink-dim: #AEBCB1; --ink-faint: #94A398;
    --brass: #C9A24B; --brass-hi: #E8CE85; --brass-glow: rgba(201,162,75,0.20);
    --win: #46C08A; --win-soft: rgba(70,192,138,0.15); --loss: #E5584C; --loss-soft: rgba(229,88,76,0.15);
    --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 10px 30px rgba(0,0,0,0.4);
    --shadow-lg: 0 2px 8px rgba(0,0,0,0.5), 0 30px 70px rgba(0,0,0,0.55);
  }
}
:root[data-theme="light"] {
  --felt: #E7E3D3; --felt-2: #EFEBDD; --surface: #F6F2E6; --surface-2: #FBF8EF;
  --line: rgba(58,48,22,0.16); --line-soft: rgba(58,48,22,0.09);
  --ink: #1B241C; --ink-dim: #5E6A5C; --ink-faint: #8A9384;
  --brass: #8A6A1E; --brass-hi: #6E5417; --brass-glow: rgba(138,106,30,0.14);
  --win: #1C824F; --win-soft: rgba(28,130,79,0.14); --loss: #BB392C; --loss-soft: rgba(187,57,44,0.13);
  --shadow: 0 1px 2px rgba(30,24,10,0.06), 0 8px 24px rgba(30,24,10,0.08);
  --shadow-lg: 0 2px 6px rgba(30,24,10,0.08), 0 24px 60px rgba(30,24,10,0.14);
}
:root[data-theme="dark"] {
  --felt: #0E1512; --felt-2: #13201A; --surface: #16211A; --surface-2: #1D2B22;
  --line: rgba(201,162,75,0.16); --line-soft: rgba(201,162,75,0.08);
  --ink: #ECE7D6; --ink-dim: #AEBCB1; --ink-faint: #94A398;
  --brass: #C9A24B; --brass-hi: #E8CE85; --brass-glow: rgba(201,162,75,0.20);
  --win: #46C08A; --win-soft: rgba(70,192,138,0.15); --loss: #E5584C; --loss-soft: rgba(229,88,76,0.15);
  --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 10px 30px rgba(0,0,0,0.4);
  --shadow-lg: 0 2px 8px rgba(0,0,0,0.5), 0 30px 70px rgba(0,0,0,0.55);
}

/* ---------- «Столы»: акцентные схемы поверх темы ---------- */
:root[data-table="ruby"]    { --brass: #C6455B; --brass-hi: #E4708A; --brass-glow: rgba(198,69,91,0.20); }
:root[data-table="emerald"] { --brass: #2FA574; --brass-hi: #57C79A; --brass-glow: rgba(47,165,116,0.20); }
:root[data-table="neon"]    { --brass: #24C7D6; --brass-hi: #78E7F0; --brass-glow: rgba(36,199,214,0.22); }
:root[data-table="royal"]   { --brass: #8E7BE6; --brass-hi: #B4A6F2; --brass-glow: rgba(142,123,230,0.22); }
:root[data-theme="light"][data-table="ruby"]    { --brass: #A32E44; --brass-hi: #7E2334; }
:root[data-theme="light"][data-table="emerald"] { --brass: #1F7E56; --brass-hi: #175E40; }
:root[data-theme="light"][data-table="neon"]    { --brass: #0E8996; --brass-hi: #0A6570; }
:root[data-theme="light"][data-table="royal"]   { --brass: #5E4CB8; --brass-hi: #48388F; }

/* ---------- База ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--felt);
  background-image:
    radial-gradient(120% 80% at 50% -10%, var(--felt-2), transparent 60%),
    radial-gradient(80% 60% at 85% 110%, var(--brass-glow), transparent 55%);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}
::selection { background: var(--brass); color: var(--felt); }
button { font-family: inherit; }
a { color: inherit; }

.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.pos { color: var(--win); }
.neg { color: var(--loss); }
.mut { color: var(--ink-dim); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- Топ-бар ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  padding: 12px clamp(14px, 4vw, 40px);
  background: color-mix(in srgb, var(--felt) 84%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 11px; cursor: pointer; user-select: none; }
.monogram {
  width: 38px; height: 38px; flex: none; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 var(--brass-glow), var(--shadow);
}
.monogram span { font-size: 18px; line-height: 1; color: var(--brass); }
.brand-txt { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; font-size: 14px; }
.brand-sub { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.2em; font-size: 9px; color: var(--brass); }

.nav { display: flex; gap: 2px; margin-left: 6px; }
.nav button {
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
  font-size: 12.5px; color: var(--ink-dim);
  background: none; border: 0; padding: 9px 14px; border-radius: 8px; cursor: pointer;
  transition: color .18s, background .18s;
}
.nav button:hover { color: var(--ink); background: var(--surface); }
.nav button.active { color: var(--brass); background: var(--surface); }
.spacer { flex: 1; }

.icon-btn {
  display: grid; place-items: center; cursor: pointer;
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-dim);
  transition: color .18s, border-color .18s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--brass); }
.icon-btn svg { width: 17px; height: 17px; display: block; }

/* ---------- Раскладка ---------- */
main { max-width: 1180px; margin: 0 auto; padding: clamp(18px, 4vw, 38px) clamp(14px, 4vw, 40px) 90px; }
.view { display: none; animation: fade .32s ease both; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.eyebrow { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.24em; font-size: 11px; color: var(--brass); margin: 0 0 8px; }
h1.page { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.02em; font-weight: 700; font-size: clamp(28px, 5vw, 44px); margin: 0; text-wrap: balance; line-height: 0.98; }

.sec-head { display: flex; align-items: center; gap: 14px; margin: 32px 0 16px; }
.sec-head h2 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; font-size: 16px; margin: 0; white-space: nowrap; }
.sec-head .rule { flex: 1; height: 1px; background: var(--line); }
.sec-head .count { font-family: var(--font-num); font-size: 12px; color: var(--ink-faint); }

/* ---------- Кнопки ---------- */
.btn {
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.09em; font-weight: 700; font-size: 13px;
  color: var(--felt); background: linear-gradient(160deg, var(--brass-hi), var(--brass));
  border: 0; border-radius: var(--radius-sm); padding: 11px 20px; cursor: pointer;
  box-shadow: 0 2px 10px var(--brass-glow); transition: transform .12s, filter .18s; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 15px; height: 15px; }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--brass); }
.btn.success { background: linear-gradient(160deg, color-mix(in srgb,var(--win) 80%,#fff), var(--win)); color: #fff; box-shadow: 0 2px 10px var(--win-soft); }
.btn.danger { background: none; color: var(--loss); border: 1px solid var(--loss-soft); box-shadow: none; }
.btn.danger:hover { background: var(--loss-soft); }
.btn.sm { padding: 8px 13px; font-size: 11.5px; }
.btn.block { width: 100%; justify-content: center; padding: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: none; }

.link-btn { background: none; border: 0; color: var(--brass); cursor: pointer; font-size: 13px; font-weight: 600; padding: 4px; }
.link-btn:hover { text-decoration: underline; }

/* ---------- Поля ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .flabel { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.12em; font-size: 10.5px; color: var(--ink-faint); }
.input, input[type="text"], input[type="number"], input[type="date"], select {
  font-family: var(--font-body); font-size: 15px; color: var(--ink);
  background: var(--felt); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; width: 100%;
}
input.num, .input.num { font-family: var(--font-num); }
.input:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--brass); outline-offset: 1px; border-color: var(--brass); }
.btn:focus-visible, .nav button:focus-visible, .icon-btn:focus-visible, .game-card:focus-visible,
.back:focus-visible, .link-btn:focus-visible, .chips-quick button:focus-visible,
[role="button"]:focus-visible, table.lb tbody tr:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

/* ---------- Hero / сводка сезона ---------- */
.hero {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: 20px;
  background:
    radial-gradient(90% 130% at 8% -20%, color-mix(in srgb, var(--brass) 12%, transparent), transparent 55%),
    linear-gradient(160deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow-lg); padding: clamp(20px, 4vw, 34px); margin-bottom: 24px;
}
.hero-suits { position: absolute; right: -10px; top: -30px; font-size: 210px; line-height: 1; color: var(--ink); opacity: 0.04; pointer-events: none; font-family: serif; letter-spacing: -30px; transform: rotate(-8deg); }
.hero-top { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 14px; position: relative; }
.hero h1 { margin: 6px 0 2px; }
.hero-meta { color: var(--ink-dim); font-size: 13.5px; }
.season-stats { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 24px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden; }
.stat { background: color-mix(in srgb, var(--surface) 70%, transparent); padding: 15px 17px; }
.stat .k { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.14em; font-size: 10.5px; color: var(--ink-faint); }
.stat .v { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: clamp(21px, 3vw, 29px); font-weight: 600; margin-top: 4px; letter-spacing: -0.03em; }
.stat .u { font-size: 12px; color: var(--ink-dim); }
.stat.leader .v { font-family: var(--font-display); font-size: 21px; letter-spacing: 0.02em; color: var(--brass); }

/* ---------- Фишки-аватары ---------- */
.chip { flex: none; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; color: #fff; position: relative; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px rgba(0,0,0,0.15); }
.chip::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; border: 1.5px dashed rgba(255,255,255,0.45); }
.chip.sm { width: 26px; height: 26px; font-size: 10px; }
.chip.md { width: 34px; height: 34px; font-size: 12px; }
.chip.lg { width: 54px; height: 54px; font-size: 18px; }
.chip.xl { width: 72px; height: 72px; font-size: 24px; }

/* ---------- Пилюли/бейджи ---------- */
.pill { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.08em; font-size: 9.5px; font-weight: 700; padding: 4px 8px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.pill.ok { color: var(--win); background: var(--win-soft); }
.pill.warn { color: var(--loss); background: var(--loss-soft); }
.pill.live { color: var(--brass); background: var(--brass-glow); }
.pill.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brass); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.tag { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.08em; font-size: 8.5px; font-weight: 700; padding: 3px 7px; border-radius: 999px; }
.tag.shark { color: var(--win); background: var(--win-soft); }
.tag.fish { color: var(--loss); background: var(--loss-soft); }

/* ---------- Игры: сетка карточек ---------- */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; }
.game-card { position: relative; text-align: left; cursor: pointer; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); overflow: hidden; transition: transform .16s, border-color .18s, box-shadow .18s; display: flex; flex-direction: column; gap: 14px; }
.game-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(var(--brass), transparent); opacity: 0; transition: opacity .2s; }
.game-card:hover { transform: translateY(-3px); border-color: var(--brass); box-shadow: var(--shadow-lg); }
.game-card:hover::before { opacity: 1; }
.game-card.live { border-color: color-mix(in srgb, var(--brass) 50%, var(--line)); }
.gc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.gc-date { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: 0.02em; }
.gc-time { font-family: var(--font-num); font-size: 11px; color: var(--ink-faint); margin-top: 1px; }
.gc-bank { display: flex; align-items: baseline; gap: 8px; }
.gc-bank .b { font-family: var(--font-num); font-size: 26px; font-weight: 600; letter-spacing: -0.03em; }
.gc-bank .l { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; font-size: 10px; color: var(--ink-faint); }
.gc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.gc-winner { display: flex; align-items: center; gap: 8px; min-width: 0; }
.gc-winner .lbl { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; font-size: 9px; color: var(--ink-faint); }
.gc-winner .wn { display: flex; gap: 7px; align-items: baseline; }
.gc-winner .wn .nm { font-weight: 600; font-size: 13px; white-space: nowrap; }
.gc-players { display: flex; align-items: center; gap: 6px; color: var(--ink-dim); font-size: 12px; white-space: nowrap; }

/* ---------- Панели ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.panel-head h3 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; margin: 0; }

.back { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px; font-weight: 600; color: var(--ink-dim); background: none; border: 0; padding: 6px 0; margin-bottom: 8px; transition: color .18s; }
.back:hover { color: var(--brass); }

.session-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.session-head .htitle { min-width: 0; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 20px 0 8px; }
.sum-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 17px; box-shadow: var(--shadow); }
.sum-card.accent { border-color: color-mix(in srgb, var(--brass) 45%, var(--line)); }
.sum-card .k { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.13em; font-size: 10px; color: var(--ink-faint); }
.sum-card .v { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 24px; font-weight: 600; margin-top: 3px; letter-spacing: -0.03em; }
.sum-card .v.name { font-family: var(--font-display); font-size: 19px; letter-spacing: 0.02em; }
.sum-card .s { font-size: 11.5px; color: var(--ink-dim); margin-top: 2px; }

.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; margin-top: 8px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Таблица участников с дивергентным баром ---------- */
.thead { display: grid; grid-template-columns: 34px 1fr 120px 96px; gap: 12px; padding: 9px 18px; border-bottom: 1px solid var(--line); font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; font-size: 9.5px; color: var(--ink-faint); }
.thead span:nth-child(3) { text-align: center; }
.thead span:nth-child(4) { text-align: right; }
.players { display: flex; flex-direction: column; }
.prow { display: grid; grid-template-columns: 34px 1fr 120px 96px; gap: 12px; align-items: center; padding: 11px 18px; position: relative; border-bottom: 1px solid var(--line-soft); }
.prow:last-child { border-bottom: 0; }
.prow:hover { background: color-mix(in srgb, var(--brass) 6%, transparent); }
.prow .who { display: flex; flex-direction: column; min-width: 0; }
.prow .who .nm { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .who .buy { font-family: var(--font-num); font-size: 11px; color: var(--ink-faint); }
.bar-cell { position: relative; height: 30px; }
.bar-axis { position: absolute; left: 50%; top: -6px; bottom: -6px; width: 1px; background: var(--line); }
.bar { position: absolute; top: 50%; transform: translateY(-50%); height: 15px; border-radius: 3px; min-width: 2px; transition: width .7s cubic-bezier(.2,.8,.25,1); }
.bar.p { left: 50%; background: linear-gradient(90deg, var(--win-soft), var(--win)); }
.bar.n { right: 50%; background: linear-gradient(270deg, var(--loss-soft), var(--loss)); }
.prow .rub { font-family: var(--font-num); font-variant-numeric: tabular-nums; text-align: right; font-size: 15px; font-weight: 600; }
.crown { color: var(--brass); font-size: 12px; }

/* ---------- Лента транзакций ---------- */
.txwrap { max-height: 560px; overflow-y: auto; }
.txwrap::-webkit-scrollbar { width: 8px; }
.txwrap::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.tx { display: grid; grid-template-columns: 24px 1fr auto; gap: 11px; align-items: center; padding: 9px 18px; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.tx:last-child { border-bottom: 0; }
.tx .dot { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: 11px; font-weight: 700; font-family: var(--font-display); }
.tx .dot.in { background: var(--brass-glow); color: var(--brass); }
.tx .dot.re { background: var(--line-soft); color: var(--ink-dim); }
.tx .dot.out { background: var(--win-soft); color: var(--win); }
.tx .meta { min-width: 0; }
.tx .meta .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx .meta .ty { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.09em; font-size: 9.5px; color: var(--ink-faint); }
.tx .amt { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 13.5px; text-align: right; }
.tx .amt .t { display: block; font-size: 10px; color: var(--ink-faint); }
.tx .del { opacity: .6; background: none; border: 0; color: var(--ink-faint); cursor: pointer; padding: 2px 6px; font-size: 15px; transition: color .15s, opacity .15s; }
.tx .del:hover { color: var(--loss); }

/* ---------- Live-стол ---------- */
.table-hero { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px,4vw,30px); margin-bottom: 20px; box-shadow: var(--shadow-lg);
  background: radial-gradient(70% 120% at 50% 0%, color-mix(in srgb,var(--win) 16%, var(--surface-2)), var(--surface)); }
.table-hero .felt-ring { position: absolute; inset: 12px; border-radius: 100px; border: 1px solid var(--line-soft); pointer-events: none; }
.bank-live { text-align: center; position: relative; }
.bank-live .k { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.2em; font-size: 11px; color: var(--ink-faint); }
.bank-live .v { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: clamp(40px, 9vw, 68px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; margin: 6px 0; }
.bank-live .sub { color: var(--ink-dim); font-size: 13px; }
.bank-live .chk { display: inline-flex; margin-top: 8px; }

.seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.seat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; transition: border-color .18s; }
.seat.out { opacity: 0.62; }
.seat.out .seat-stack { color: var(--ink-faint); }
.seat-top { display: flex; align-items: center; gap: 11px; }
.seat-id { min-width: 0; flex: 1; }
.seat-id .nm { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-id .buy { font-family: var(--font-num); font-size: 11px; color: var(--ink-faint); }
.seat-stack { text-align: right; }
.seat-stack .v { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 18px; font-weight: 600; }
.seat-stack .l { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; font-size: 8.5px; color: var(--ink-faint); }
.seat-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.seat-actions .btn { padding: 9px; font-size: 11px; justify-content: center; }
.seat-cashed { text-align: center; font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px; color: var(--ink-dim); padding: 8px; }
.seat-cashed b { color: var(--ink); }

/* ---------- Подиум и лидерборд ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 14px; align-items: end; margin: 8px 0 24px; }
.pod { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 16px; text-align: center; position: relative; overflow: hidden; cursor: pointer; transition: transform .15s, border-color .18s; }
.pod:hover { transform: translateY(-3px); border-color: var(--brass); }
.pod.first { border-color: var(--brass); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--brass-glow); }
.pod .rankmark { font-family: var(--font-display); font-weight: 700; font-size: 12px; letter-spacing: 0.1em; color: var(--ink-faint); }
.pod.first .rankmark { color: var(--brass); }
.pod .chip { margin: 12px auto 10px; }
.pod .pname { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; font-size: 16px; }
.pod .pv { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 600; margin-top: 4px; }
.pod .pg { font-size: 11px; color: var(--ink-dim); margin-top: 2px; }
.pod .glow { position: absolute; inset: -40% 0 auto 0; height: 80px; background: radial-gradient(50% 100% at 50% 0, var(--brass-glow), transparent); }

.board { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.board-scroll { overflow-x: auto; }
table.lb { border-collapse: collapse; width: 100%; min-width: 660px; }
table.lb th { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; font-size: 9.5px; font-weight: 600; color: var(--ink-faint); text-align: right; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.lb th.l, table.lb td.l { text-align: left; }
table.lb td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); text-align: right; font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 14px; white-space: nowrap; }
table.lb tr:last-child td { border-bottom: 0; }
table.lb tbody tr { transition: background .15s; cursor: pointer; }
table.lb tbody tr:hover { background: color-mix(in srgb, var(--brass) 6%, transparent); }
.lb th.sortable { cursor: pointer; user-select: none; transition: color .15s; }
.lb th.sortable:hover { color: var(--brass); }
.lb th.active { color: var(--brass); }
.lb th .arrow { margin-left: 4px; font-size: 8px; vertical-align: middle; }
.roster-table .racts { display: inline-flex; gap: 2px; }
.roster-table .ract { background: none; border: 0; color: var(--ink-faint); cursor: pointer; padding: 4px 7px; font-size: 15px; border-radius: 7px; transition: color .15s, background .15s; }
.roster-table .ract:hover { color: var(--brass); background: var(--brass-glow); }
.roster-table .ract.del:hover { color: var(--loss); background: var(--loss-soft); }
.rk { font-family: var(--font-display); font-weight: 700; color: var(--ink-faint); width: 30px; display: inline-block; }
.rk.top { color: var(--brass); }
.pl-cell { display: flex; align-items: center; gap: 11px; }
.pl-cell .nm { font-family: var(--font-body); font-weight: 600; }
.pl-cell .tag { margin-left: 4px; }
.big { font-size: 15px; font-weight: 600; }
.form-mini { display: inline-flex; gap: 3px; vertical-align: middle; align-items: flex-end; height: 24px; }
.form-mini i { width: 6px; border-radius: 2px; display: inline-block; }

/* ---------- Ростер ---------- */
.roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.rcard { display: flex; align-items: center; gap: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); transition: transform .15s, border-color .18s; cursor: pointer; position: relative; }
.rcard:hover { transform: translateY(-2px); border-color: var(--brass); }
.rcard .info { min-width: 0; flex: 1; }
.rcard .nm { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcard .sub { font-family: var(--font-num); font-size: 12px; margin-top: 2px; }
.rcard .rdel { opacity: .6; background: none; border: 0; color: var(--ink-faint); cursor: pointer; font-size: 16px; padding: 4px; transition: color .15s, opacity .15s; }
.rcard .rdel:hover { color: var(--loss); }

/* на устройствах с мышью — прятать до наведения; на тач всегда видно (иначе не нажать) */
@media (hover: hover) {
  .tx .del, .rcard .rdel { opacity: 0; }
  .tx:hover .del, .rcard:hover .rdel { opacity: 1; }
}

/* ---------- Профиль игрока ---------- */
.profile-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.profile-head .pmeta h1 { margin: 2px 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 20px 0; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 17px; box-shadow: var(--shadow); }
.kpi .k { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.13em; font-size: 10px; color: var(--ink-faint); }
.kpi .v { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 23px; font-weight: 600; margin-top: 3px; }
.chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 20px 44px; }
.chart-bars { display: flex; align-items: stretch; gap: 8px; height: 200px; position: relative; }
.chart-zero { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.cbar { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; }
.cbar .half { height: 50%; display: flex; overflow: hidden; }
.cbar .half.top { align-items: flex-end; }
.cbar .half.bot { align-items: flex-start; }
.cbar .fill { width: 100%; transition: height .6s cubic-bezier(.2,.8,.25,1); }
.cbar .half.top .fill { border-radius: 4px 4px 0 0; background: linear-gradient(var(--win), var(--win-soft)); }
.cbar .half.bot .fill { border-radius: 0 0 4px 4px; background: linear-gradient(var(--loss-soft), var(--loss)); }
.cbar .clabel { position: absolute; left: -4px; right: -4px; bottom: -34px; text-align: center; font-family: var(--font-num); font-size: 10px; line-height: 1.35; color: var(--ink-faint); white-space: nowrap; }
.cbar .clabel b { display: block; font-size: 11px; font-weight: 600; }

/* ---------- Модалка / шит ввода ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(3px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .2s ease; }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); width: 100%; max-width: 420px; overflow: hidden; animation: pop .22s cubic-bezier(.2,.9,.3,1.2); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line-soft); }
.modal-h .mt { flex: 1; min-width: 0; }
.modal-h .mt h3 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.06em; font-size: 15px; margin: 0; }
.modal-h .mt p { margin: 2px 0 0; font-size: 12px; color: var(--ink-dim); }
.modal-b { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.modal-close { background: none; border: 0; color: var(--ink-faint); font-size: 22px; cursor: pointer; line-height: 1; padding: 0 4px; }
.modal-close:hover { color: var(--ink); }
.amount-big { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 34px; font-weight: 600; text-align: center; letter-spacing: -0.02em; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--felt); }
.chips-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.chips-quick button { font-family: var(--font-num); font-size: 14px; padding: 11px 6px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--felt); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; }
.chips-quick button:hover { border-color: var(--brass); background: var(--brass-glow); }
.table-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.table-opt { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--felt); color: var(--ink); cursor: pointer; font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.06em; font-size: 12px; font-weight: 600; transition: border-color .15s, background .15s; }
.table-opt:hover { border-color: var(--brass); }
.table-opt.active { border-color: var(--brass); background: var(--brass-glow); }
.table-sw { width: 22px; height: 22px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25), 0 2px 5px rgba(0,0,0,.3); }
.chip-edit { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 50%; transition: transform .15s; position: relative; }
.chip-edit::after { content: "✎"; position: absolute; right: -2px; bottom: -2px; width: 20px; height: 20px; border-radius: 50%; background: var(--brass); color: var(--felt); font-size: 11px; display: grid; place-items: center; box-shadow: 0 2px 5px rgba(0,0,0,.35); }
.chip-edit:hover { transform: scale(1.05); }
.av-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.av-emoji { aspect-ratio: 1; display: grid; place-items: center; font-size: 20px; border: 1px solid var(--line); border-radius: 9px; background: var(--felt); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; font-family: var(--font-display); }
.av-emoji:hover { border-color: var(--brass); }
.av-emoji.active { border-color: var(--brass); background: var(--brass-glow); }
.av-colors { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.av-color { aspect-ratio: 1; border: 2px solid transparent; border-radius: 50%; cursor: pointer; font-family: var(--font-display); text-transform: uppercase; letter-spacing: .05em; font-size: 8.5px; font-weight: 700; color: var(--ink-dim); box-shadow: inset 0 0 0 1px var(--line); }
.av-color.active { border-color: var(--ink); }

/* достижения */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.badge { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; box-shadow: var(--shadow); }
.badge .bi { font-size: 28px; flex: none; line-height: 1; }
.badge .bn { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; font-size: 13px; }
.badge .bd { font-size: 11.5px; color: var(--ink-dim); margin-top: 1px; }

/* личные встречи */
.h2h-row { display: grid; grid-template-columns: 26px 1fr auto 90px; gap: 11px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.h2h-row:last-child { border-bottom: 0; }
.h2h-row:hover { background: color-mix(in srgb, var(--brass) 6%, transparent); }
.h2h-nm { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h2h-score { font-family: var(--font-num); font-weight: 600; font-size: 15px; }
.h2h-score .sep { color: var(--ink-faint); margin: 0 3px; }
.h2h-diff { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 13px; text-align: right; }

/* рекорды лиги */
.records { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.rec-card { display: flex; align-items: center; gap: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 17px; box-shadow: var(--shadow); }
.rec-ic { font-size: 26px; flex: none; line-height: 1; }
.rec-k { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; font-size: 10px; color: var(--ink-faint); }
.rec-v { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 18px; font-weight: 600; margin-top: 2px; }
.rec-s { font-size: 11.5px; color: var(--ink-dim); margin-top: 2px; }

/* таймер блайндов / турнир */
.tournament { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; padding: clamp(28px, 7vw, 64px) 20px; border: 1px solid var(--line); border-radius: 20px; background: radial-gradient(70% 100% at 50% 0, color-mix(in srgb, var(--brass) 10%, var(--surface-2)), var(--surface)); box-shadow: var(--shadow-lg); min-height: 58vh; }
.tmr-lvl { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.24em; font-size: clamp(13px, 2.5vw, 18px); color: var(--brass); }
.tmr-clock { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: clamp(72px, 22vw, 200px); font-weight: 700; line-height: 0.9; letter-spacing: -0.04em; }
.tmr-blinds { font-size: clamp(16px, 3vw, 26px); color: var(--ink-dim); }
.tmr-blinds b { color: var(--ink); font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.tmr-next { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; font-size: clamp(11px, 2vw, 15px); color: var(--ink-faint); }
.tmr-controls { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.tournament.warn .tmr-clock { color: var(--loss); animation: tmr-pulse 1s infinite; }
@keyframes tmr-pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
.tournament:fullscreen { min-height: 100vh; border-radius: 0; justify-content: center; background: radial-gradient(70% 100% at 50% 0, color-mix(in srgb, var(--brass) 12%, var(--felt-2)), var(--felt)); }
.tournament:fullscreen .tmr-clock { font-size: min(42vh, 32vw); }
.tournament:fullscreen .tmr-blinds { font-size: clamp(24px, 4vw, 44px); }

/* ---------- Settle-up ---------- */
.settle-list { display: flex; flex-direction: column; }
.settle-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); }
.settle-row:last-child { border-bottom: 0; }
.settle-who { display: flex; align-items: center; gap: 9px; min-width: 0; }
.settle-who.to { justify-content: flex-end; }
.settle-who .nm { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settle-arrow { display: flex; flex-direction: column; align-items: center; color: var(--brass); }
.settle-arrow .amt { font-family: var(--font-num); font-weight: 600; font-size: 14px; }
.settle-arrow .ar { font-size: 12px; opacity: .7; }

/* ---------- Пусто ---------- */
.empty { text-align: center; padding: 46px 20px; color: var(--ink-faint); border: 1px dashed var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 50%, transparent); }
.empty .em-ic { font-size: 34px; opacity: .5; }
.empty p { margin: 10px 0 16px; font-size: 14px; }

/* ---------- Тосты ---------- */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--felt); padding: 11px 18px; border-radius: 999px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-lg); animation: toastin .25s ease; max-width: 90vw; }
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Форма новой игры ---------- */
.newgame { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) auto; gap: 12px; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }

/* ---------- Подвал ---------- */
.foot { text-align: center; color: var(--ink-faint); font-size: 12px; margin-top: 46px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.foot .display { font-size: 11px; letter-spacing: 0.2em; color: var(--brass); }
.foot .fbtns { display: flex; gap: 14px; justify-content: center; margin-top: 10px; }

/* ---------- Анимации ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .5s cubic-bezier(.2,.8,.25,1) both; animation-delay: calc(var(--i, 0) * 45ms); }

@keyframes pop-in { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: none; } }
.pop-in { animation: pop-in .5s cubic-bezier(.2,.9,.3,1.15) both; animation-delay: calc(var(--i, 0) * 90ms); }

@keyframes grow-up { from { opacity: 0; transform: scaleY(0); } to { opacity: 1; transform: scaleY(1); } }

/* пульс банка при изменении */
@keyframes bank-bump { 0% { transform: scale(1); } 35% { transform: scale(1.09); color: var(--brass); } 100% { transform: scale(1); } }
.bank-bump { animation: bank-bump .5s cubic-bezier(.3,1.4,.5,1); }

/* всплывающая метка над банком (+2000 / вышел) */
.pop-label { position: absolute; left: 50%; top: 0; transform: translateX(-50%); font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 700; font-size: clamp(20px, 4vw, 30px); pointer-events: none; white-space: nowrap; animation: pop-float 1.15s cubic-bezier(.2,.7,.3,1) forwards; z-index: 5; }
.pop-label.up { color: var(--brass); }
.pop-label.out { color: var(--win); }
.pop-label.loss { color: var(--loss); }
@keyframes pop-float { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.8); } 22% { opacity: 1; transform: translate(-50%, -14px) scale(1.05); } 100% { opacity: 0; transform: translate(-50%, -58px) scale(1); } }

/* шиммер на первом месте подиума и на кнопке-акценте */
.pod.first::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, color-mix(in srgb, var(--brass) 22%, transparent) 48%, transparent 66%); transform: translateX(-120%); animation: shimmer 4.5s ease-in-out 1s infinite; pointer-events: none; }
@keyframes shimmer { 0% { transform: translateX(-120%); } 30%, 100% { transform: translateX(120%); } }

/* блик по карточке при наведении */
.game-card::after, .pod::after, .rcard::after { }
.card-shine { position: relative; overflow: hidden; }

/* конфетти из мастей */
.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 300; overflow: hidden; }
.confetti { position: absolute; top: -8vh; font-size: 22px; will-change: transform; animation: confetti-fall var(--dur, 2.4s) linear forwards; }
.confetti.red { color: var(--loss); }
.confetti.dark { color: var(--ink); }
@keyframes confetti-fall {
  0% { opacity: 0; transform: translateY(0) rotate(0deg); }
  10% { opacity: 1; }
  100% { opacity: .9; transform: translateY(112vh) rotate(var(--spin, 540deg)); }
}
.confetti.coin { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #F3DB94, #C9A24B 60%, #8A6A1E); box-shadow: inset 0 0 0 2px rgba(255,255,255,.35), 0 2px 6px rgba(0,0,0,.4); }

/* празднование победителя */
.celebrate { position: fixed; inset: 0; z-index: 260; display: grid; place-items: center; pointer-events: none; }
.celebrate .flash { position: absolute; inset: 0; background: radial-gradient(circle at 50% 42%, var(--brass-glow), transparent 62%); animation: cel-flash .9s ease forwards; }
.celebrate .card { position: relative; text-align: center; animation: cel-pop .7s cubic-bezier(.2,.9,.3,1.3) both; }
.celebrate .crown { font-size: clamp(64px, 14vw, 118px); line-height: 1; animation: cel-crown 1.1s ease; filter: drop-shadow(0 10px 22px rgba(0,0,0,.45)); }
.celebrate .lbl { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .32em; font-size: 13px; color: var(--brass); margin-top: 10px; }
.celebrate .nm { font-family: var(--font-display); text-transform: uppercase; font-weight: 700; font-size: clamp(34px, 8vw, 66px); color: var(--ink); text-shadow: 0 6px 26px rgba(0,0,0,.5); letter-spacing: .02em; }
.celebrate .amt { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: clamp(22px, 5vw, 36px); font-weight: 600; margin-top: 6px; }
.celebrate.out { animation: cel-out .45s ease forwards; }
@keyframes cel-flash { 0% { opacity: 0; } 35% { opacity: 1; } 100% { opacity: 0; } }
@keyframes cel-pop { 0% { opacity: 0; transform: scale(.6) translateY(30px); } 60% { opacity: 1; transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes cel-crown { 0%,100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-16px) rotate(-9deg); } 50% { transform: translateY(0) rotate(7deg); } 75% { transform: translateY(-7px) rotate(-3deg); } }
@keyframes cel-out { to { opacity: 0; transform: scale(1.12); } }

/* летящие фишки к банку */
.fly-chip { position: fixed; width: 26px; height: 26px; border-radius: 50%; z-index: 240; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 35% 30%, #F3DB94, #C9A24B 60%, #8A6A1E);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.35), 0 3px 8px rgba(0,0,0,.4);
  transition: transform .85s cubic-bezier(.35,0,.4,1), opacity .85s ease; }

/* раздача карт на старте игры */
.deal-overlay { position: fixed; inset: 0; z-index: 255; pointer-events: none; display: grid; place-items: center; }
.deal-card { position: absolute; width: 46px; height: 66px; border-radius: 6px; opacity: 0;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--brass); box-shadow: 0 6px 18px rgba(0,0,0,.5);
  background-image: repeating-linear-gradient(45deg, transparent 0 5px, var(--brass-glow) 5px 7px);
  animation: deal-fly .95s cubic-bezier(.2,.7,.3,1) forwards; }
@keyframes deal-fly { 0% { opacity: 0; transform: translate(0,0) rotate(0) scale(.55); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx,0), var(--dy,0)) rotate(var(--rot,0)) scale(1); } }

/* иконка темы — мягкий флип */
#th-icon { transition: transform .5s cubic-bezier(.3,1.2,.4,1); }
.icon-btn:active #th-icon { transform: rotate(180deg); }

/* плавная смена темы */
body { transition: background-color .5s ease; }

/* мигание строки при добавлении транзакции */
@keyframes flash-in { from { background: var(--brass-glow); } to { background: transparent; } }
.flash { animation: flash-in 1s ease; }

/* ---------- Адаптив ---------- */
@media (prefers-reduced-motion: reduce) { *, ::before, ::after { animation: none !important; transition: none !important; } }
@media (max-width: 640px) { .season-stats { grid-template-columns: repeat(2, 1fr); } .podium { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .nav button { padding: 9px 10px; font-size: 11.5px; }
  .brand-txt { display: none; }
  .prow { grid-template-columns: 30px 1fr auto; }
  .bar-cell { display: none; }
  .thead { grid-template-columns: 30px 1fr auto; }
  .thead span:nth-child(3) { display: none; }
}
