/* Токены платформы (--bg, --surface, --ink, --accent и др.) приходят из shared/theme.css.
   Здесь стол, карты, фишки и экраны «Покера: просто» по макету. */
:root {
  --card-bg: oklch(0.985 0.005 90);
  --back-red: oklch(0.48 0.17 25);
  --card-line: oklch(0.8 0.01 90);
  --card-ink: oklch(0.24 0.02 260);
  --suit-red: oklch(0.55 0.19 25);
  --danger: oklch(0.5 0.15 25);
  --warn: oklch(0.5 0.12 60);
  --warn-bg: oklch(0.94 0.05 80);
  --felt-a: oklch(0.74 0.09 158); --felt-b: oklch(0.64 0.09 160); --felt-edge: oklch(0.5 0.08 160); --felt-ring: oklch(0.85 0.06 158 / 0.6);
  --felt-ink: oklch(0.2 0.03 160);
  --scrim: oklch(0.2 0.02 260 / 0.45);
  --focus: oklch(0.55 0.18 260);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --danger: oklch(0.75 0.12 25); --warn: oklch(0.78 0.11 60); --warn-bg: oklch(0.33 0.05 80);
    --felt-a: oklch(0.42 0.075 158); --felt-b: oklch(0.32 0.065 160); --felt-edge: oklch(0.27 0.05 160); --felt-ring: oklch(0.5 0.07 160 / 0.5);
    --felt-ink: oklch(0.97 0.01 90); --focus: oklch(0.78 0.14 260);
  }
}
:root[data-theme="dark"] {
  --danger: oklch(0.75 0.12 25); --warn: oklch(0.78 0.11 60); --warn-bg: oklch(0.33 0.05 80);
  --felt-a: oklch(0.42 0.075 158); --felt-b: oklch(0.32 0.065 160); --felt-edge: oklch(0.27 0.05 160); --felt-ring: oklch(0.5 0.07 160 / 0.5);
  --felt-ink: oklch(0.97 0.01 90); --focus: oklch(0.78 0.14 260);
}
/* размеры карт и мест по ширине экрана: узкий (до 360), обычный, широкий (от 600) */
:root {
  --bw: 44px; --bh: 63px; --mw: 64px; --mh: 92px; --ow: 24px; --oh: 34px; --avs: 42px; --area-h: 340px; --stat-w: 96px; --btn-w: 112px; --btn-gap: 20px; --nick-fs: 11px;
}
@media (max-width: 359px) { :root { --bw: 32px; --bh: 46px; --mw: 50px; --mh: 72px; --ow: 16px; --oh: 22px; --avs: 30px; --area-h: 300px; --stat-w: 64px; --btn-w: 88px; --btn-gap: 12px; } }
@media (min-width: 600px) { :root { --bw: 68px; --bh: 97px; --mw: 96px; --mh: 137px; --ow: 34px; --oh: 48px; --avs: 56px; --area-h: 400px; --stat-w: 130px; --btn-w: 160px; --btn-gap: 28px; --nick-fs: 13px; } }

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
button { font-family: inherit; transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .15s ease, opacity .2s ease; }
button:not(:disabled):active { transform: scale(.97); }
button:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.noscript { margin: 0; padding: 12px 16px; background: var(--accent-soft); color: var(--ink); text-align: center; }
.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.screen { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }

/* Кнопки и общие элементы */
.btn { min-height: 46px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-align: center; line-height: 1.15; text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.full { width: 100%; }
.btn:disabled { background: var(--line); color: var(--muted); border-color: var(--line); cursor: not-allowed; }
.btn-link { background: none; border: 0; color: var(--ink); text-decoration: underline; font-size: 13px; font-weight: 600; min-height: 44px; cursor: pointer; }
.icon-btn { width: 44px; height: 44px; flex: none; padding: 0; border-radius: 14px; border: 0; background: transparent; color: var(--ink); font-size: 20px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.icon-btn svg { width: 22px; height: 22px; }
.muted { color: var(--muted); }
.bar { height: 48px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 12px; gap: 8px; }
.bar .title { font-weight: 700; font-size: 15px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .right { display: flex; align-items: center; gap: 4px; }
.bal { font-size: 13px; font-weight: 700; background: var(--accent-soft); color: var(--ink); border-radius: 14px; padding: 6px 10px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.page { display: flex; flex-direction: column; gap: 16px; padding: 8px 16px 16px; width: 100%; max-width: 560px; margin: 0 auto; }
.h1 { font-size: 28px; font-weight: 700; line-height: 1.1; margin: 8px 0 6px; }
.lbl { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.seg { display: flex; gap: 8px; }
.seg button { flex: 1 1 0; min-width: 44px; min-height: 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; padding: 0; }
.seg button[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--accent-soft); font-weight: 700; }
.warnbox { background: var(--warn-bg); border: 1px solid var(--warn); border-radius: 14px; padding: 10px 14px; font-size: 13px; line-height: 1.4; }
.stackline { font-size: 15px; font-weight: 700; background: var(--accent-soft); border-radius: 14px; padding: 10px 14px; }
.capline { font-size: 13px; color: var(--muted); margin-top: -8px; }
.prev { position: relative; height: 120px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.prev .felt { position: absolute; inset: 14% 8%; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--line); }
.prev .dot { position: absolute; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; background: var(--accent-soft); border: 1px solid var(--accent); }
.prev .dot.me { background: var(--accent); }

/* Окна */
.scrim { position: fixed; inset: 0; background: var(--scrim); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 30; }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 20px; width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 10px; }
.modal h2 { margin: 0; font-size: 19px; line-height: 1.25; }
.modal p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.4; }
.modal .row { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; }
.modal .row .btn { flex: 1 1 0; min-width: 0; }
.rules { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 16px; width: 100%; max-width: 560px; max-height: calc(100dvh - 32px); overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.rules .head { display: flex; justify-content: space-between; align-items: center; }
.rules h2 { margin: 0; font-size: 20px; }
.rules ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.4; }
.rules .hands { display: flex; flex-direction: column; gap: 6px; }
.hand-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; border-bottom: 1px solid var(--line); padding-bottom: 5px; }
.hand-row b { font-weight: 600; }
.mini-cards { display: flex; gap: 3px; }
.mini { font-weight: 700; font-size: 12px; color: var(--card-ink); background: var(--card-bg); border: 1px solid var(--card-line); border-radius: 4px; padding: 2px 3px; }
.mini.red { color: var(--suit-red); }
.note-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.note-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.4; }
.combos { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 8px 14px 10px; width: 100%; max-width: 340px; max-height: calc(100dvh - 40px); overflow: auto; box-shadow: 0 8px 24px oklch(0.2 0.02 260 / 0.18); }
.combos .head { display: flex; justify-content: space-between; align-items: center; font-size: 17px; font-weight: 700; }
.combos .row { display: flex; align-items: center; gap: 8px; min-height: 36px; border-top: 1px solid var(--line); font-size: 13px; }
.combos .row .n { width: 18px; color: var(--muted); font-weight: 700; }
.combos .row .name { flex: 1; font-weight: 600; }
.combos .row .cards { display: flex; gap: 2px; }
.menu { position: absolute; left: 8px; top: 48px; z-index: 12; width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 6px; display: flex; flex-direction: column; box-shadow: 0 8px 24px oklch(0.2 0.02 260 / 0.18); }
.menu button { min-height: 44px; display: flex; align-items: center; padding: 0 12px; background: none; border: 0; border-radius: 14px; color: var(--ink); font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.menu button:hover { background: var(--accent-soft); }
.menu-back { position: fixed; inset: 0; z-index: 11; }

/* Карты */
.card { position: relative; flex: none; width: var(--cw); height: var(--ch); border-radius: calc(var(--cw) * .14); background: var(--card-bg); border: 1px solid var(--card-line); color: var(--card-ink); }
.card.red { color: var(--suit-red); }
.card .tl, .card .br { position: absolute; font-size: calc(var(--cw) * .3); font-weight: 700; line-height: 1; text-align: center; }
.card .tl { left: 3px; top: 2px; }
.card .br { right: 3px; bottom: 2px; transform: rotate(180deg); }
.card .mid { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-35%); text-align: center; font-size: calc(var(--cw) * .55); line-height: 1; }
.card.back { border: 3px solid var(--card-bg); background: repeating-linear-gradient(45deg, transparent 0 4px, oklch(0.9 0.05 25 / .5) 4px 5px), repeating-linear-gradient(-45deg, transparent 0 4px, oklch(0.9 0.05 25 / .5) 4px 5px), var(--back-red); box-shadow: inset 0 0 0 1.5px var(--back-red), inset 0 0 0 2.5px oklch(0.9 0.05 25 / .6); }
.card.empty { background: transparent; border: 1.5px dashed var(--muted); opacity: .6; }
/* победные карты не подсвечиваются: итог и название комбинации показывает панель итога */
.card.dim, .card.hl { opacity: 1; box-shadow: none; transform: none; }
.card.tiny .tl { left: 0; right: 0; top: 3px; font-size: 11px; }
.card.tiny .mid, .card.tiny .br { display: none; }
/* Переворот: сначала рубашка, на середине карта сужается в линию, потом открывается лицо. Задержка d0…d5 переворачивает карты по очереди */
.card.flip { animation: flipx .8s ease-in-out both; }
.card.flip .tl, .card.flip .mid, .card.flip .br { animation: faceon .8s step-end both; }
.card.flip::before { content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: 1; background: repeating-linear-gradient(45deg, transparent 0 4px, oklch(0.9 0.05 25 / .5) 4px 5px), repeating-linear-gradient(-45deg, transparent 0 4px, oklch(0.9 0.05 25 / .5) 4px 5px), var(--back-red); box-shadow: inset 0 0 0 1.5px var(--back-red), inset 0 0 0 2.5px oklch(0.9 0.05 25 / .6); animation: backoff .8s step-end both; }
.card.d1, .card.d1 .tl, .card.d1 .mid, .card.d1 .br, .card.d1::before { animation-delay: .5s; }
.card.d2, .card.d2 .tl, .card.d2 .mid, .card.d2 .br, .card.d2::before { animation-delay: 1s; }
.card.d3, .card.d3 .tl, .card.d3 .mid, .card.d3 .br, .card.d3::before { animation-delay: 1.5s; }
.card.d4, .card.d4 .tl, .card.d4 .mid, .card.d4 .br, .card.d4::before { animation-delay: 2s; }
.card.d5, .card.d5 .tl, .card.d5 .mid, .card.d5 .br, .card.d5::before { animation-delay: 2.5s; }
@keyframes flipx { 0% { transform: scaleX(1); } 50% { transform: scaleX(0); } 100% { transform: scaleX(1); } }
@keyframes faceon { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 1; } }
@keyframes backoff { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 0; } }
.card.deal { animation: deal .25s ease-out both; }
@keyframes deal { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }
.board-card { --cw: var(--bw); --ch: var(--bh); }
.mine-card { --cw: var(--mw); --ch: var(--mh); }
.opp-card { --cw: var(--ow); --ch: var(--oh); }
.sum-card { --cw: 22px; --ch: 30px; }
.combo-card { --cw: 20px; --ch: 28px; }

/* Стол */
.area { position: relative; flex: 1 1 0; min-height: var(--area-h); max-height: calc(var(--area-h) + 40px); width: 100%; max-width: 900px; margin: 0 auto; }
.felt { position: absolute; inset: 8% 2% 4% 2%; border-radius: 999px; background: radial-gradient(ellipse at 50% 45%, var(--felt-a), var(--felt-b)); border: 5px solid var(--felt-edge); box-shadow: inset 0 0 0 2px var(--felt-ring), inset 0 6px 18px oklch(0.2 0.05 160 / 0.25); }
@media (max-width: 359px) { .felt { inset: 12% 2% 6% 2%; } }
@media (min-width: 600px) { .felt { inset: 8% 8% 4% 8%; } }
.center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -42%); display: flex; flex-direction: column; align-items: center; gap: 5px; color: var(--felt-ink); }
.center .round { font-size: 12px; font-weight: 600; }
.center .board { display: flex; gap: 4px; }
.center .pot { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; }
.pot-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 2px solid oklch(0.98 0.01 90); box-shadow: 0 0 0 1px var(--accent); display: inline-block; flex: none; }
.cap { font-size: 12px; font-weight: 600; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 4px 10px; text-align: center; max-width: 260px; }
.seat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; z-index: 2; }
.seat.folded { opacity: .55; }
.seat .status, .me-status { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 2px 6px; font-size: calc(var(--nick-fs)); font-weight: 700; color: var(--ink); line-height: 1.1; min-height: 13px; text-align: center; min-width: var(--stat-w); width: max-content; max-width: 130px; white-space: nowrap; box-sizing: border-box; }
.seat .status:empty, .me-status:empty { visibility: hidden; }
.seat.active .status, .me-status.active { border-color: var(--accent); color: var(--accent); }
.seat .box { position: relative; width: calc(var(--avs) + 20px); height: calc(var(--avs) + 6px + var(--oh) / 2 + 10px); }
.seat .ring { position: absolute; left: 50%; top: 0; transform: translateX(-50%); z-index: 3; padding: 3px; border-radius: 50%; }
.ring.active { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.av { width: var(--avs); height: var(--avs); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: calc(var(--avs) * .42); border: 1px solid var(--line); color: var(--ink); }
.seat .cards { position: absolute; left: 0; right: 0; top: calc(var(--avs) + 6px - var(--oh) / 2); display: flex; justify-content: center; gap: 2px; z-index: 2; }
.seat .nick { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--avs) + 6px + var(--oh) / 2 - 6px); z-index: 1; font-size: var(--nick-fs); font-weight: 600; line-height: 1; white-space: nowrap; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px 7px 2px; }
.bet-pill { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 2px 8px; z-index: 1; }
@media (min-width: 600px) { .bet-pill { font-size: 14px; } }
.me-row { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 8px; padding: 4px 12px 8px; max-width: 900px; width: 100%; margin: 0 auto; }
.me-box { display: flex; flex-direction: column; align-items: center; gap: 2px; justify-self: start; min-width: 56px; }
.me-box .ring { padding: 3px; border-radius: 50%; }
.me-box .nm { font-size: var(--nick-fs); font-weight: 600; line-height: 1.1; white-space: nowrap; }
.me-cards { display: flex; gap: 6px; }
.me-row.hidden, .actions.hidden { visibility: hidden; }
.line .mine { display: flex; gap: 3px; margin: 0 8px; }
.me-bet { justify-self: end; align-self: center; }
.actions { margin-top: auto; flex: none; border-top: 1px solid var(--line); background: var(--surface); padding: 10px 12px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mand { font-size: 12px; font-weight: 700; background: var(--warn-bg); border: 1px solid var(--warn); border-radius: 14px; padding: 5px 12px; text-align: center; }
.btn-row { display: flex; justify-content: center; align-items: stretch; gap: var(--btn-gap); width: 100%; }
.btn-row .btn { width: var(--btn-w); flex: none; min-height: 48px; font-size: 14px; padding: 0 6px; }
@media (min-width: 600px) { .btn-row .btn { min-height: 56px; } }
.btn-row .btn.soft { background: var(--accent-soft); border: 2px solid var(--accent); }
.btn-row .btn.wait { width: auto; min-width: 190px; background: var(--bg); color: var(--muted); cursor: not-allowed; }

/* Панели снизу: ставка, итог, вопросы */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--surface); border: 1px solid var(--line); border-radius: 24px 24px 0 0; padding: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 -6px 24px oklch(0.2 0.02 260 / 0.14); max-height: 70dvh; overflow: auto; animation: sheet .3s ease-out both; }
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 600px) { .sheet { padding: 16px calc((100% - 560px) / 2); } }
.sheet h3 { margin: 0; font-size: 18px; }
.sheet .big { font-size: 20px; font-weight: 700; }
.sheet .line { display: flex; justify-content: space-between; align-items: center; }
.sheet .stackrow { display: flex; gap: 16px; align-items: stretch; }
.stack-btn { flex: 1; min-width: 0; min-height: 44px; display: flex; align-items: center; justify-content: center; padding: 4px 10px; background: var(--bg); border: 1px dashed var(--muted); border-radius: 14px; cursor: pointer; color: var(--ink); font-size: 13px; }
.stack-btn .muted { font-size: 13px; }
.allin-btn { min-height: 44px; min-width: 80px; padding: 0 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip { width: 48px; height: 48px; border-radius: 50%; border: 3px dashed oklch(0.98 0.01 90 / 0.75); outline: 2px solid oklch(0.4 0.1 var(--h)); outline-offset: -1px; background: oklch(0.48 0.12 var(--h)); color: oklch(0.99 0.005 90); font-size: 14px; font-weight: 700; cursor: pointer; padding: 0; flex: none; display: flex; align-items: center; justify-content: center; }
.chip:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.chip.sm { width: 32px; height: 32px; font-size: 10px; margin-left: -10px; pointer-events: none; }
.chip.sm:first-child { margin-left: 0; }
.sheet .two { display: flex; justify-content: space-between; gap: 12px; }
.sheet .two .btn { flex: 1 1 0; min-width: 0; }
.col { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 320px; align-self: center; }
.sum-row { display: flex; align-items: center; gap: 8px; font-size: 13px; min-height: 36px; }
.sum-row .who { min-width: 74px; flex: none; }
.sum-row .who b { display: block; font-weight: 700; line-height: 1.15; }
.sum-row .who span { font-size: 11px; color: var(--muted); line-height: 1.2; }
.sum-row .cards { display: flex; gap: 3px; }
.sum-row .combo { flex: 1; text-align: right; }
.sum-row .combo.mute { color: var(--muted); }
.sum-row .win { font-weight: 700; color: var(--accent); font-size: 12px; white-space: nowrap; background: var(--accent-soft); border-radius: 10px; padding: 3px 8px; }
.sum-lines { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.sum-lines .ret { color: var(--warn); font-weight: 700; }
.toast { position: absolute; left: 12px; right: 12px; top: 52px; z-index: 5; display: flex; justify-content: center; }
.toast div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px 14px; font-size: 13px; font-weight: 600; box-shadow: 0 4px 14px oklch(0.2 0.02 260 / 0.15); }

@media (prefers-reduced-motion: reduce) {
  .card.flip, .card.flip .tl, .card.flip .mid, .card.flip .br, .card.deal, .sheet { animation: none; }
  .card.flip::before { display: none; }
  button { transition: none; }
}

/* Онлайн: список столов, код, создание, комната ожидания, вопросы */
.page.tight { gap: 12px; }
.page.center { flex: 1; justify-content: center; }
.banner { margin: 0 12px; padding: 8px 12px; border-radius: 14px; font-size: 13px; font-weight: 600; text-align: center; border: 1px solid var(--warn); background: var(--warn-bg); }
.banner.ok { border-color: var(--accent); background: var(--accent-soft); }
.rows { display: flex; flex-direction: column; gap: 8px; }
.trow { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 8px 10px; }
.trow .btn.sm { min-height: 40px; padding: 0 14px; }
.av-sm { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.skel { height: 56px; border-radius: 16px; background: var(--line); opacity: .5; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.emptybox { border: 1px dashed var(--line); border-radius: 16px; padding: 18px; text-align: center; color: var(--muted); font-size: 14px; }
.codeline { display: flex; gap: 8px; }
.code-input { flex: 1; min-width: 0; min-height: 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 0 12px; font: 700 18px/1 inherit; letter-spacing: 4px; text-transform: uppercase; }
.code-input.bad { border-color: var(--danger); }
.codehint { font-size: 12px; color: var(--muted); }
.codehint.bad { color: var(--danger); font-weight: 600; }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; color: var(--ink); font-size: 15px; cursor: pointer; }
.knob { flex: none; width: 46px; height: 28px; border-radius: 14px; background: var(--line); position: relative; }
.knob i { position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); transition: left .2s ease; }
.knob.on { background: var(--accent); }
.knob.on i { left: 21px; }
.prev.wait { height: 190px; }
.wseat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 1px; text-align: center; }
.wseat .nm { font-size: 12px; font-weight: 700; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av.empty { background: transparent; border: 1.5px dashed var(--muted); color: var(--muted); }
.errcard { text-align: center; align-items: center; }
.askrow { display: flex; align-items: center; gap: 12px; }
.asknum { font-size: 28px; font-weight: 700; min-width: 32px; font-variant-numeric: tabular-nums; }
.askbar { flex: 1; height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.askbar i { display: block; height: 100%; background: var(--accent); transition: width 1s linear; }

/* Веер у соперников: аватар держит карты, точка поворота у аватара (верхний край), нижние края расходятся. Ваши карты без наклона */
.seat .cards .card { transform-origin: 50% 0; }
.seat .cards .card:first-child { rotate: 10deg; }
.seat .cards .card:last-child { rotate: -10deg; }
/* Раздача: карта вылетает из центра стола рубашкой вверх */
.card.dealfly { animation: dealfly .65s cubic-bezier(.2, .8, .3, 1) both; z-index: 8; }
.card.dealfly[data-fly]::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: repeating-linear-gradient(45deg, transparent 0 4px, oklch(0.9 0.05 25 / .5) 4px 5px), repeating-linear-gradient(-45deg, transparent 0 4px, oklch(0.9 0.05 25 / .5) 4px 5px), var(--back-red); border: 3px solid var(--card-bg); box-sizing: border-box; animation: dealback .65s linear both; animation-delay: inherit; }
@keyframes dealfly { from { opacity: 0; transform: translate(var(--sx, 0px), var(--sy, -30px)) scale(.5) rotate(-16deg); } 15% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes dealback { 0%, 60% { opacity: 1; } 80%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .card.dealfly, .card.dealfly::after { animation: none; } }
/* Пас: карты остаются на столе и переворачиваются рубашкой вверх */
.card.fold { animation: flipx .6s ease-in-out both; }
.card.fold .tl, .card.fold .mid, .card.fold .br { opacity: 0; animation: faceoff .6s step-end both; }
.card.fold::before { content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: 1; opacity: 1; background: repeating-linear-gradient(45deg, transparent 0 4px, oklch(0.9 0.05 25 / .5) 4px 5px), repeating-linear-gradient(-45deg, transparent 0 4px, oklch(0.9 0.05 25 / .5) 4px 5px), var(--back-red); box-shadow: inset 0 0 0 1.5px var(--back-red), inset 0 0 0 2.5px oklch(0.9 0.05 25 / .6); animation: foldback .6s step-end both; }
.mine-card.fold { opacity: .6; }
@keyframes faceoff { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 0; } }
@keyframes foldback { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .card.fold, .card.fold .tl, .card.fold .mid, .card.fold .br, .card.fold::before { animation: none; } }

/* Шапка экранов выбора и настройки стоит в одной колонке с содержимым; на столе шапка во всю ширину */
.bar { width: 100%; max-width: 560px; margin: 0 auto; }
.bar.wide { max-width: none; }
/* Телефон: стол вытянут вниз и занимает всё свободное место между шапкой и кнопками, как в макете */
@media (max-width: 599px) {
  .area { max-height: none; min-height: 430px; }
  .felt { inset: 3% 3% 2% 3%; }
}

/* Длинное название «Покер: Чожук» помещается в одну строку */
.brand h1 { font-size: clamp(26px, 5vh, 34px); }

/* До первой раздачи общие карты и пустые места для карт игрока не рисуем: иначе они стоят на столе «уже раздатые», а потом раздача проигрывается заново */
.center .board.pre { visibility: hidden; }
