:root {
  --felt: #0b5c3a;
  --felt-dark: #073d27;
  --gold: #e0b04c;
  --panel: #1c1f26;
  --panel2: #262a33;
  --text: #f1f1f1;
  --muted: #9aa0aa;
  --danger: #d9534f;
  --accent: #3d8bfd;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: radial-gradient(circle at 50% 0%, #22262f, #14161b 70%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: auto;
  /* No min-height: 100vh here — on Android 100vh is the toolbar-hidden height, taller than what's
     visible, so the in-game page itself scrolled and the header (Отойти/Сдаться/Встать) slid away. */
  background-attachment: fixed; /* the gradient used to end partway down a long lobby, leaving a seam */
}
html { background: #14161b; }
body.ingame { overflow: hidden; }
body.ingame .top { padding: .35em 1em; gap: .55em; }
body.ingame .top h1 { font-size: 1em; }
.table-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .28em;
  font-size: .82em;
  color: var(--text);
}
.tm-chip {
  display: inline-flex;
  align-items: center;
  gap: .2em;
  padding: .16em .55em;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.25;
  white-space: nowrap;
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 1px 2px rgba(0, 0, 0, .35);
}
button.tm-chip { cursor: pointer; }
button.tm-chip:hover { filter: brightness(1.14); }
.tm-bots { background: linear-gradient(180deg, #2ea072, #1a6d4d); color: #f3fff8; border-color: #5ee0a855; }
.tm-easy { background: linear-gradient(180deg, #3cb56a, #1f7a42); color: #f0fff4; border-color: #7dff9f44; }
.tm-hard { background: linear-gradient(180deg, #e06a22, #b13a0c); color: #fff4ea; border-color: #ffb07066; }
.tm-tourney { background: linear-gradient(180deg, #e0b04c, #a67c12); color: #1a1400; border-color: #ffe08a77; }
.tm-pko { background: linear-gradient(180deg, #c4454a, #8a1e2a); color: #ffe4e6; border-color: #ff8a9466; }
.tm-table { background: linear-gradient(180deg, #3a4150, #262b36); color: #f4f6fa; border-color: #6b7384aa; }
.tm-blinds { background: linear-gradient(180deg, #f0c14b, #c99212); color: #1a1400; border-color: #ffe9a888; }
.tm-units { background: linear-gradient(180deg, #3a4150, #262b36); color: #f4f6fa; border-color: #6b7384aa; }
.tm-units.on { background: linear-gradient(180deg, #3d8bfd, #1f5fc4); color: #f2f7ff; border-color: #9dc4ff88; }
.tm-ante { background: linear-gradient(180deg, #5a3a12, #3d260a); color: #ffd789; border-color: #e0b04c77; }
.tm-level { background: linear-gradient(180deg, #3d8bfd, #1f5fc4); color: #f2f7ff; border-color: #9dc4ff88; }
.tm-clock { background: #2a2f3a; color: #c5cad3; font-weight: 600; box-shadow: none; }
.tm-clock:empty { display: none; }

#app {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
body.ingame #app {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: transparent;
}
/* render() puts every screen inside #screenRoot (modals live in a sibling #modalRoot). As a plain
   block it broke the height chain #app → .table-page: the table grid grew to its content instead of
   the viewport, so on a short phone the action bar was clipped off the bottom with no scroll, and a
   growing hand log could stretch the grid and drift the centred table lower and lower. */
#screenRoot { display: flex; flex-direction: column; flex: 1; min-height: 0; }
body.ingame .table-page,
body.ingame .table-stage { background: transparent; }

button {
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: .55em 1.1em;
  background: var(--panel2);
  color: var(--text);
}
button:disabled { opacity: .4; cursor: default; }
/* Hover: every live button brightens a little, so it reads as pressable. :where() keeps it at zero specificity —
   any button with a hover of its own wins. Not on the table itself (seats, cards, the action bar have their own
   looks, and a filter there would repaint the felt on every mouse move). */
@media (hover: hover) {
  :where(button:not(:disabled), [role="button"], a[data-act]):where(:not(.table-stage *)):hover { filter: brightness(1.18); }
  :where(button, [role="button"], a[data-act]) { transition: filter .12s, background-color .12s, border-color .12s, color .12s; }
}
[data-act]:not(:disabled) { cursor: pointer; }
button.primary { background: var(--accent); font-weight: 600; }
button.danger { background: var(--danger); color: #fff; }
button.gold { background: var(--gold); color: #221; font-weight: 700; }
input, select {
  font: inherit;
  background: var(--panel2);
  border: 1px solid #3a3f4a;
  color: var(--text);
  border-radius: 8px;
  padding: .5em .7em;
}

.top {
  display: flex;
  align-items: center;
  gap: .8em;
  padding: .7em 1.2em;
  background: var(--panel);
  border-bottom: 1px solid #000;
  flex-shrink: 0;
}
.top h1 { font-size: 1.2em; margin: 0; }
/* Header buttons never shrink or wrap their label: Safari squeezed them until the emoji dropped onto
   its own line ("🏆 / Итоги"), the header doubled in height and pushed the hero's seat off the bottom
   of the screen. When space runs out, the table info line gives way (ellipsis) instead. */
.top > button, .top > a, .top > .hdr-profile { white-space: nowrap; flex-shrink: 0; }
.top > .table-meta {
  min-width: 0; flex-shrink: 1; overflow: hidden;
  /* Chips wrap onto a second line before anything is clipped. */
}
.top .grow { flex: 1; }
.top a { color: var(--muted); text-decoration: none; }
.volume-ctl { display: inline-flex; align-items: center; gap: 4px; }
/* A fully custom track/fill/thumb (see sound.js's volumeControlHtml doc comment for why this
   replaced a styled native <input type=range>) — all three positioned off the same percentage in
   the same render, so the thumb can never visually disagree with the actual volume. */
.vol-track { position: relative; width: 70px; height: 4px; border-radius: 999px; background: var(--panel2); cursor: pointer; touch-action: none; }
.vol-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--accent); pointer-events: none; }
.vol-thumb {
  position: absolute; top: 50%; width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--panel); transform: translate(-50%, -50%);
  pointer-events: none;
}
.vol-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* The track is 4 px tall and the thumb (13 px) takes no clicks: grab-able area is the whole thumb and then some. */
.vol-track::before { content: ''; position: absolute; inset: -10px -8px; }

.center-screen {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1em;
}

.card-box {
  background: var(--panel);
  border-radius: 14px;
  padding: 1.4em;
  width: min(360px, 92vw);
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.card-box h2 { margin-top: 0; }
/* align-items defaults to stretch, which let the bold <b>nickname</b> flex item's line box render
   at a different vertical position than its plain-text siblings (the label, the "— hand (amount)"
   trailing text) — "никнейм не отцентрирован". Explicit center keeps every item's text on the same
   baseline-ish row regardless of which one happens to be a real element vs an anonymous text node. */
/* Label column fixed-width so both names start at the same x — space-between used to push each
   name to wherever its own row's leftover space fell, so "Рука дня"/"Рука недели" never lined up. */
.highlight-row { display: grid; grid-template-columns: 7.5em 1fr; align-items: baseline; gap: .6em; padding: .3em 0; font-size: .92em; }
.highlight-row > span:first-child { color: var(--muted); }
.highlight-row b { color: var(--gold); }
.card-box form, .card-box .row { display: flex; flex-direction: column; gap: .6em; }
.card-box .row-inline { display: flex; gap: .6em; }
.card-box .row-inline input { flex: 1; width: 0; }

.preset-row { display: flex; gap: .5em; margin-bottom: 1em; }
.preset-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: .15em;
  background: var(--panel2); border: 1px solid #3a3f4a; border-radius: 10px;
  padding: .55em .3em; cursor: pointer; color: var(--text, #eee);
}
.preset-btn:hover { border-color: var(--gold); }
.preset-btn.active { border-color: var(--gold); background: rgba(224,176,76,.12); box-shadow: 0 0 8px rgba(224,176,76,.25); }
.preset-name { font-weight: 700; font-size: .88em; }
.preset-sub { font-size: .7em; color: var(--muted); }
.create-form { display: flex; flex-direction: column; gap: .7em; }
.field-row { display: flex; gap: .6em; }
/* min-width: 0 guards the classic flex-item sizing bug (default min-width:auto lets a flex item's
   own intrinsic content width — an input's number-spinner chrome differs slightly by value/browser
   — win out over flex:1's "split evenly", most visible in Safari/WebKit): without it, two same-flex
   siblings can render at visibly different widths depending on what's typed into each. */
.field { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .25em; }
.field-label { font-size: .72em; color: var(--muted); }
.field input, .field select { width: 100%; box-sizing: border-box; }

.hint { color: var(--muted); }

/* --- table --- */
.table-page {
  display: grid;
  /* Table takes whatever is left; journal/chat hug the right edge instead of sitting in a
     centered 900+480 pair with empty window chrome on both sides. */
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  justify-content: stretch;
  width: 100%;
  gap: .6em;
  padding: .25em .5em .25em .6em;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.cam-phone-hint { display: none !important; }
.table-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45em;
  min-width: 0; /* let the oval shrink instead of forcing the grid column wide */
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.table-wrap > .table-tools,
.table-wrap > .action-bar,
.table-wrap > .action-slot,
.table-wrap > .spectator-banner { flex-shrink: 0; }
/* Reserves space for the tallest thing that ever lands here (the raise action-bar) so switching
   between it, a one-line hint ("ждём игроков…"), or nothing at all doesn't resize .table-stage
   above it — which otherwise visibly jumped the whole table on every turn/hand transition. */
.action-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .7em;
  /* Tall enough for the raise action-bar's controls wrapping onto a second line (fold/call/slider/
     number/raise/all-in buttons don't all fit on one row under ~700px) — a shorter reservation here
     just moves the jank from "row appears" to "row grows a second line", same complaint either way. */
  min-height: 146px; /* the raise bar's real height (it was 118 and the table shrank by the difference on every turn) */
  width: 100%;
  position: relative;
}
/* Seats hang off the felt rim; this box is the playground they must stay inside so they
   cannot cover the header, blinds line, emoji bar or betting controls — and so the page
   itself never grows a scrollbar. */
.table-stage {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  position: relative;
  display: flex;
  /* Extra top padding (and none at the bottom) shifts the flex-centered oval down the stage —
     the table used to sit too high, so the opposite seat landed on the felt instead of the rail
     and its bet chips overlapped the pot. The leftover top space is what the top seat hangs into. */
  align-items: center;
  justify-content: center;
  padding-top: 1.8em;
  padding-bottom: 0.6em;
  overflow: hidden;
}
/* Narrow screens: log drops below the table instead of squeezing it into a sliver of a column. */
@media (max-width: 860px) {
  .table-page {
    grid-template-columns: 1fr;
    /* Only reached with the journal *expanded* (collapsed has its own `auto` row below) — the player
       asked to see it, so it gets real room; 26vh couldn't even fit records + log + the chat input. */
    grid-template-rows: minmax(0, 1fr) minmax(180px, 45vh);
  }
  /* "журнал закрывает где кнопки фолд, колл ва-банк" — the log/chat row above always reserved at
     least 120px (up to 26vh) whether or not a player actually wanted to see it, which is exactly
     what was pushing the action buttons below the fold. Collapsed (the mobile default — see
     S.logCollapsed), the row shrinks to just the toggle bar itself and that space goes straight
     back to the table/actions above. */
  .table-page:has(.log-sidebar.collapsed) { grid-template-rows: minmax(0, 1fr) auto; }
  .log-toggle {
    display: block; width: 100%; text-align: center; font-weight: 600;
    padding: .5em; background: var(--panel2); border: 1px solid #3a3f4a; border-radius: 8px;
    color: var(--text); flex-shrink: 0;
  }
  .log-sidebar.collapsed { gap: 0; }
  .log-sidebar.collapsed .log-panel,
  .log-sidebar.collapsed .chat-panel,
  .log-sidebar.collapsed .records-card,
  .log-sidebar.collapsed .hist-guide { display: none; } /* records and the replay notes too: under the collapsed bar they pushed the action buttons off a phone screen */
}
@media (min-width: 861px) {
  .log-toggle { display: none; } /* desktop always has its own column for this — nothing to toggle */
}
/* Deliberately not a stacking context (no isolation/z-index/transform, nor on its ancestors): the
   webcam layer lives outside the re-rendered table (see #camLayer) yet must slot between the pot
   and the bet chips/stickers inside it. */
.table-oval {
  position: relative;
  width: min(1200px, 96%);
  aspect-ratio: 2.15 / 1;
  height: auto;
  max-height: 90%;
  margin: 0;
  flex: 0 0 auto;
  --rim: 18px; /* the wooden rail's width */
  border: var(--rim) solid transparent;
  border-radius: 999px;
}
/* The felt, the rail and the table's shadow are their own GPU layer (will-change), drawn once: on a
   phone every change on the table — a bet, a card — used to repaint its patch of felt, wood and
   shadow along with it, at 2.75× pixels (frames of 50–100 ms with no script running, by ?fps=1).
   A positioned ::before with z-index auto paints first, under the seats; the pot (z 10) stays above
   and no stacking context is added, so the webcam layer's place in between is unchanged. */
.table-oval::before {
  content: '';
  position: absolute;
  inset: calc(-1 * var(--rim));
  border: var(--rim) solid transparent;
  border-radius: inherit;
  pointer-events: none;
  will-change: transform;
  /* Color only on the last layer — a mid-list #hex drops the whole shorthand in some browsers. */
  background-color: #3d2618;
  background-image:
    var(--felt-img, url("/img/felt.jpg?v=4")),
    linear-gradient(180deg, rgba(255, 214, 160, .14), rgba(28, 14, 6, .38)),
    var(--wood-img, url("/img/wood.jpg?v=1"));
  background-size: cover, auto, 360px auto;
  background-position: center, center, center;
  background-repeat: no-repeat, no-repeat, repeat;
  background-origin: padding-box, border-box, border-box;
  background-clip: padding-box, border-box, border-box;
  box-shadow:
    0 22px 48px rgba(0, 0, 0, .7),
    0 0 0 2px #1a1008,
    inset 0 0 48px rgba(0, 0, 0, .14);
}
.table-oval::after {
  content: '';
  position: absolute;
  inset: 7.2% 5.4%;
  border: 1.5px solid #c9a84a;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0; /* under the plaques (seats are z 1 and up), it ran across the viewer's own */
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .12);
}
.table-oval > .seat { z-index: 1; }
.pot-area {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, calc(-50% + var(--pot-shift, 0px)));
  text-align: center;
  /* Same z-index as .seat (1) used to mean DOM order broke the tie — seats render after the pot
     area in the markup, so on a cramped mobile table where a seat's card genuinely overlaps the
     center, it painted over the community cards instead of the other way round ("5 карт на столе
     плохо видно, закрывается игроками"). The board is the one thing every seated player needs to
     be able to read at a glance regardless of layout — it wins any overlap now. */
  z-index: 3;
}
.pot-amount {
  position: relative;
  z-index: 2;
  background: rgba(8, 14, 10, .78);
  border: 1px solid rgba(224, 176, 76, .35);
  border-radius: 22px;
  padding: .35em 1.1em;
  font-weight: 700;
  color: var(--gold);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}
.community { position: relative; display: flex; gap: .4em; margin-top: .65em; justify-content: center; }
/* Same width as the five board slots (left edge of first card → right edge of last). */
.table-logo {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: auto;
  transform: translateY(-70%);
  pointer-events: none;
  z-index: 0;
  transition: opacity .6s ease;
}
/* Between hands, with nothing in the pot, the logo is the felt's own: an empty "Банк: 0" doesn't sit
   on it (its room is kept, so nothing moves when a hand starts). */
.pot-amount.pot-idle { visibility: hidden; }
/* With a pot or a board on the table the logo steps back, so "Банк" and the cards read over it. */
.community.board-busy .table-logo { opacity: .3; }
.community .playing-card,
.community .board-slot { position: relative; z-index: 1; }
.community .playing-card {
  box-shadow: 0 3px 8px rgba(0, 0, 0, .45), 0 0 0 1.5px var(--gold);
}
.community .playing-card.back {
  box-shadow: 0 3px 8px rgba(0, 0, 0, .45), 0 0 0 1.5px var(--gold);
}
.community .playing-card.board-slot {
  background: rgba(6, 16, 12, .42);
  box-shadow: inset 0 0 14px rgba(0, 0, 0, .3), 0 0 0 1.5px var(--gold), 0 0 10px rgba(224, 176, 76, .28);
  color: transparent;
}

/* No transform and no z-index on .seat: it must not be a stacking context, so its plaque can sit
   under the pot/board while its bet chip and sticker still paint over the webcam layer. The oval
   stacks: plaque 1 (hero 5) < pot 3 < #camLayer 7 < result plaque 8 < badges/chips 9 < sticker 10.
   --shw/--shh (half the seat's own size) are measured in applyTableLayout(). */
.seat {
  position: absolute;
  top: calc(50% + var(--sy) - var(--shh, 54px));
  left: calc(50% + var(--sx) - var(--shw, 75px));
  width: 150px;
  text-align: center;
}
.seat > .seat-card { z-index: 1; }
.seat[data-is-me="1"] > .seat-card { z-index: 5; }
/* During a showdown, revealed opponents' cards sit just above the table's gold outline (z 0).
   Keep them below the board/pot and camera layers. A winner's seat stays unstacked for its flying
   chips, so lift only that winner's plaque instead. */
.table-oval:has(.result-overlay) > .seat:not([data-is-me="1"]):not(.over-drama):not(:has(.outs-row)):not(:has(> .seat-chip.win-chips, > .seat-chip.win-fly, > .seat-chip.collecting, > .seat-chip.to-rack)):has(> .seat-card > .hole > .playing-card:not(.back)) { z-index: 2; }
.table-oval:has(.result-overlay) > .seat:not([data-is-me="1"]):not(.over-drama):not(:has(.outs-row)):has(> .seat-chip.win-chips) > .seat-card:has(> .hole > .playing-card:not(.back)) { z-index: 2; }
/* Webcam sits on the felt-facing edge of the plaque — not inside the 28px avatar. Top seats
   drop it below the card so it doesn't climb into the chip legend. */
.seat-cam {
  position: absolute;
  left: 50%;
  width: 112px;
  height: 112px;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  transform: translateX(-50%);
  bottom: calc(100% + 4px);
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(224, 176, 76, .7);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .5);
  background: #111;
  cursor: zoom-in;
  z-index: 3;
}
.seat-top .seat-cam {
  bottom: auto;
  top: calc(100% + 4px);
}
.seat-cam video,
.seat-cam canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #111;
}
.seat-cam video.local,
.seat-cam canvas.local { transform: scaleX(-1); }
.seat.has-cam .seat-avatar-wrap { display: none; }
/* «Вебки на месте карт» (Вид и настройки): another player's camera lies on the square where their card backs are. The seat keeps that
   square (the width of the card pair) all the time, with or without a camera, so the plaques stand at one height; cam.js puts the camera on it.
   Face-up cards show in the same square, so the camera steps aside while they do. */
html.cam-cards .seat:not([data-is-me="1"]) .hole { aspect-ratio: 1; align-items: center; }
/* the two cards fill the square side by side, apart, never one over the other (cam.js sets --hk, the size of a card against its usual 50×70, and --hs, the square's side) */
html.cam-cards .seat:not([data-is-me="1"]) .hole[style*="--hk"] { gap: 4px; }
html.cam-cards .seat:not([data-is-me="1"]) .hole[style*="--hk"] .playing-card { width: calc(50px * var(--hk)); height: calc(70px * var(--hk)); font-size: calc(1.15em * var(--hk)); border-radius: calc(6px * var(--hk)); flex: none; }
/* inside the seat: above its plaque (1), under its bet chips (9) */
/* with that setting on, your own camera and the enlarged one (the phone's tap) are squares too, not circles */
html.cam-cards #camLayer .seat-cam { border-radius: 10px; }
html.cam-cards .cam-lightbox video { border-radius: 14px; }
.seat > .seat-card > .seat-cam.in-cards { right: auto; bottom: auto; margin: 0; transform: none; z-index: 3; border-radius: 10px; border-width: 2px; }
/* The cards that lie open (shown at the showdown, the x-ray) are drawn over the camera, which stays where it is. Read the cards from
   the DOM itself, not cam.js's cards-up mark: that one lags a frame, and an all-in reveal left the camera over a card for that long. */
.seat-card:has(> .seat-cam.in-cards) > .hole:has(> .playing-card:not(.back)) { position: relative; z-index: 4; }
/* No photo left on the plaque: the crown sits beside the name instead of on an empty circle. */
.seat.has-cam > .seat-card .seat-face { display: flex; align-items: center; width: auto; height: auto; }
.seat.has-cam > .seat-card .seat-face .champ-crown {
  position: static; transform: none; margin: 0 .12em 0 0;
  font-size: 1em; line-height: 1; filter: drop-shadow(0 0 4px rgba(255, 200, 80, .8));
}
/* Desktop keeps the same seat/card scale at 9–12 as at 6–8 — shrinking them with the crowd made
   hole and board cards unreadably small on a wide screen. Phone widths still step down (see the
   max-width: 480px crowd-9 / crowd-11 rules). */
.seat .seat-card {
  position: relative;
  background: linear-gradient(180deg, rgba(32, 26, 20, .9), rgba(12, 10, 8, .94));
  border-radius: 14px;
  padding: .5em .6em;
  border: 1px solid rgba(212, 176, 106, .28);
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .4);
  transition: opacity .3s ease, border-color .2s ease, box-shadow .2s ease;
  /* .seat centres itself with translate(-50%, -50%), which is relative to its OWN current box —
     so if the card's content height changes at all (the hand-preview line, or a badge appearing,
     or the bankroll chip-pile needing a different number of denomination piles for a new stack
     total after a bet), that self-centering silently shifts by the same amount, reading as the
     whole seat — or, since chip clearance measures off real rects, even the table — visibly
     nudging every time someone bets. A fixed minimum height absorbs that instead of translating it
     into a shift. 126px covers the two-line name (the name itself, then the badges under it) +
     stack row + a folded hand-preview line + two mini hole cards; bump it in the mobile block too
     if cards ever grow there. */
  min-height: 126px;
  box-sizing: border-box;
}
/* Before «Начать игру» nobody has cards, so a seat shows the player instead of an empty card square: a big photo, the name and
   the stack under it, the plaque only as tall as that. A camera that lies on the card square («Вебки на месте карт») keeps it. */
.seat.pre-game .seat-card { min-height: 0 !important; padding: .6em .6em .5em; } /* !important: the crowded phone tables set their own floor later on */
.seat.pre-game .hole, .seat.pre-game .shown-note { display: none; }
html.cam-cards .seat.pre-game.has-cam:not([data-is-me="1"]) .hole { display: flex; }
.seat.pre-game .seat-who { flex-direction: column; gap: .3em; }
.seat.pre-game :is(.seat-face, .seat-avatar-wrap, .seat-avatar) { width: 64px; height: 64px; }
.seat.pre-game .seat-avatar { border: 2px solid rgba(224, 176, 76, .65); box-shadow: 0 3px 10px rgba(0, 0, 0, .5); }
.seat.pre-game .seat-avatar.placeholder { font-size: 1.6em; }
.seat.pre-game .seat-face .champ-crown { font-size: 22px; }
.seat.pre-game .stack-line { margin-top: .1em; }
@media (max-width: 480px), (orientation: landscape) and (max-height: 520px) and (max-width: 1100px) {
  .seat.pre-game :is(.seat-face, .seat-avatar-wrap, .seat-avatar) { width: 40px; height: 40px; }
  .seat.pre-game .seat-avatar.placeholder { font-size: 1.1em; }
}
.seat.folded .seat-card { opacity: .45; }
/* «в огне» (3+ hands won in a row) / «дымится» (3+ played and lost): the whole plaque glows — red-hot with sparks rising, or
   grey and smoking. No badge in a corner (it hid under the rebuy mark); the count is in the plaque's tooltip. */
.seat.streak-fire .seat-card { position: relative; border-color: #ffc060;
  box-shadow: 0 0 0 2px #ff9a2a, 0 0 22px 7px rgba(255,100,20,.8), 0 0 50px 14px rgba(255,50,0,.35), inset 0 0 34px 8px rgba(255,70,0,.55), inset 0 0 8px 2px rgba(255,220,120,.6);
  animation: fireGlow 1.4s ease-in-out infinite alternate; }
.seat.streak-fire .streak-fx { position: absolute; left: 6%; right: 6%; top: -44px; height: 46px; pointer-events: none; z-index: 7;
  background-image: radial-gradient(circle 2px at 12% 90%, #ffe9a0 60%, transparent), radial-gradient(circle 1.5px at 30% 70%, #ffb040 60%, transparent), radial-gradient(circle 2px at 52% 95%, #fff0b0 60%, transparent), radial-gradient(circle 1.5px at 70% 60%, #ff9a30 60%, transparent), radial-gradient(circle 2px at 90% 85%, #ffe27a 60%, transparent);
  animation: fireSparks 1.6s linear infinite; }
@keyframes fireGlow { to { box-shadow: 0 0 0 2px #ffb24a, 0 0 28px 9px rgba(255,120,30,.9), 0 0 60px 18px rgba(255,50,0,.45), inset 0 0 40px 10px rgba(255,90,10,.65), inset 0 0 10px 2px rgba(255,230,140,.7); } }
@keyframes fireSparks { from { transform: translateY(18px); opacity: 0; } 25% { opacity: 1; } to { transform: translateY(-26px); opacity: 0; } }
.seat.streak-smoke .seat-card { position: relative; border-color: #98a2ad;
  box-shadow: 0 0 0 1px #7c8793, 0 0 30px 12px rgba(135,145,160,.55), inset 0 0 32px 7px rgba(70,78,90,.7); } /* static: an animated blur/shadow made the plaque judder on phones */
.seat.streak-smoke .streak-fx { position: absolute; left: -26px; right: -26px; top: -40px; bottom: 30%; pointer-events: none; z-index: 7;
  background: radial-gradient(ellipse 30px 26px at 8% 30%, rgba(200,205,212,.8), transparent 72%), radial-gradient(ellipse 34px 28px at 92% 24%, rgba(205,210,216,.8), transparent 72%), radial-gradient(ellipse 36px 24px at 50% 10%, rgba(210,214,220,.85), transparent 72%), radial-gradient(ellipse 26px 22px at 22% 70%, rgba(190,196,204,.6), transparent 72%), radial-gradient(ellipse 26px 22px at 78% 66%, rgba(190,196,204,.6), transparent 72%);
  will-change: transform, opacity; backface-visibility: hidden; animation: smokeDrift 3.6s ease-in-out infinite alternate; }
@keyframes smokeDrift { from { transform: translate3d(0, 1px, 0); opacity: .65; } to { transform: translate3d(0, -5px, 0); opacity: 1; } }
html.lite .seat.streak-fire .seat-card, html.lite .seat.streak-smoke .seat-card, html.lite .seat .streak-fx { animation: none; }
@media (prefers-reduced-motion: reduce) { .seat.streak-fire .seat-card, .seat.streak-smoke .seat-card, .seat .streak-fx { animation: none; } }
/* a player who folded goes grey as well as dim, so the ones still in the hand stand out */
.seat :is(.seat-avatar, .seat-face) { transition: filter .45s ease-out; }
.seat.folded :is(.seat-avatar, .seat-face) { filter: grayscale(.9); }
/* a camera on the card backs lives inside the plaque, so the plaque's own fade would fade the camera too (the cards showed through it):
   the fade is then done on the plaque's looks and its contents, the camera stays solid */
.seat.folded > .seat-card:has(> .seat-cam.in-cards) { opacity: 1; background: linear-gradient(180deg, rgba(32, 26, 20, .41), rgba(12, 10, 8, .42)); border-color: rgba(212, 176, 106, .13); box-shadow: 0 8px 18px rgba(0, 0, 0, .18); }
.seat.folded > .seat-card:has(> .seat-cam.in-cards) > :not(.seat-cam) { opacity: .45; }
/* a folded player who shows his cards: the open cards over the camera are not faded with the rest of the plaque */
.seat.folded > .seat-card:has(> .seat-cam.in-cards) > .hole:has(> .playing-card:not(.back)) { opacity: 1; }
/* A dead connection (tab closed, network dropped) used to look completely normal — no way to tell
   it apart from someone just quietly still there. A red ring flags it at a glance; the
   "· нет связи"/"· покидает стол" text (see main.js) says what's actually going on. */
.seat.offline .seat-card { border-color: #c0392b; box-shadow: 0 0 0 1px #c0392b, 0 0 10px rgba(192, 57, 43, .4); }
.seat-who {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35em;
  min-width: 0;
}
.seat-face {
  position: relative;
  display: block;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}
.seat-face > .seat-avatar-wrap { display: block; width: 100%; height: 100%; }
.seat.has-cam .seat-face > .seat-avatar-wrap { display: none; }
/* The bottom of the crown sits on the top rim of the photo, up at the plaque's edge.
   The box has to be a block: an inline span ignores width/height, and the crown then
   drops into the badge row the moment that row grows (a skull after a knockout). */
.seat-face .champ-crown {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 0;
  transform: translate(-50%, -100%);
  margin: 0;
  font-size: 15px;
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .75)) drop-shadow(0 0 2px rgba(255, 200, 80, .9));
}
.seat-avatar-wrap {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.seat-avatar {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  display: block; border: 1px solid #3a3f4a;
  position: absolute; inset: 0;
}
.seat-avatar.placeholder {
  display: grid; place-items: center;
  background: var(--panel2); color: var(--gold);
  font-weight: 700; font-size: .75em; border-color: #3a3f4a;
}
/* Both the real <img> and the letter placeholder are absolutely positioned on top of each other
   (see avatarHtml()) — the placeholder paints later in DOM order, so with no rule to hide it, it
   permanently covers a real photo the instant it finishes loading and un-hides itself. Once the
   image is genuinely loaded (its own `hidden` attribute cleared — see the document-level load/error
   listeners in main.js), hide its sibling placeholder instead. */
img.hdr-avatar:not([hidden]) ~ .placeholder,
img.seat-avatar:not([hidden]) ~ .placeholder,
img.profile-avatar:not([hidden]) ~ .placeholder,
img.lb-avatar:not([hidden]) ~ .placeholder,
img.lt-avatar:not([hidden]) ~ .placeholder,
img.lobby-me-avatar:not([hidden]) ~ .placeholder,
img.ltr-avatar:not([hidden]) ~ .placeholder,
img.ht-ava:not([hidden]) ~ .placeholder {
  display: none;
}
.seat .name {
  font-weight: 600; font-size: .9em; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .04em;
  line-height: 1.15;
}
/* The name takes the whole row. Badges, the skull and the kick button sit on the line under it —
   in one row they flexed to nothing and a name collapsed to a letter. The marks line keeps its
   height even when empty, so a kill mid-hand doesn't grow the plaque and nudge the seat. */
.seat .name > .name-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 100%; }
.seat .name-marks {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: .12em; max-width: 100%; min-height: 1.15em; line-height: 1;
}
.seat .name-marks .name-badge { margin-right: 0; }
.seat .name img.ic { width: 1.05em; height: 1.05em; vertical-align: middle; }
.seat .kills { flex-shrink: 0; }
/* Top-right corner, opposite the D/SB/BB cluster on the top-left. */
.seat .rebuys {
  position: absolute; top: calc(-6px + var(--by, 0px)); right: calc(-6px + var(--br, 0px)); z-index: 9;
  height: 20px; min-width: 20px; box-sizing: border-box; padding: 0 .4em;
  display: flex; align-items: center; justify-content: center;
  font-size: .62em; font-weight: 700; border-radius: 10px;
  background: var(--panel2); color: var(--muted); border: 1px solid rgba(255,255,255,.25);
}
/* A thin countdown bar hugging the bottom edge of the seat card, instead of a text badge that used
   to get wedged into the name row — that badge was wide enough to push the player's own name out of
   view on a crowded table. Sits just outside the card's own bottom border (not inside the padding)
   so it never steals space from anything already there. */
.act-clock-bar {
  position: absolute; left: 8%; right: 8%; bottom: -5px; height: 4px;
  background: rgba(255, 255, 255, .15); border-radius: 2px; overflow: hidden; z-index: 1;
}
/* Drains by scaleX (set by the ticker), not width: a width transition re-laid out the page every frame. */
.act-clock-fill { height: 100%; width: 100%; background: #2ecc71; transform-origin: left center; transition: transform .25s linear, background-color .2s ease; }
.act-clock-fill.act-clock-bank { background: #3d8bfd; }
.act-clock-fill.act-clock-warn { background: #e74c3c; animation: actClockPulse .5s ease-in-out infinite; }
@keyframes actClockPulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.seat .name { position: relative; }
.seat .kick-btn {
  position: absolute; right: -.1em; top: 100%; margin: 0; font-size: .75em; line-height: 1; padding: .05em .35em; /* out of the row: the marks stay centred */
  border-radius: 50%; opacity: .6; vertical-align: middle; z-index: 1;
}
.seat .kick-btn:hover { opacity: 1; background: #c0392b; color: #fff; border-color: #c0392b; }
.records-card {
  background: var(--panel2); border: 1px solid #3a3f4a; border-radius: 8px;
  padding: .5em .6em; margin-bottom: .6em; font-size: .85em;
}
.records-card h3 { margin: 0 0 .3em; font-size: .95em; }
.records-row { padding: .1em 0; }
.records-row b { color: var(--gold); }
.log-highlight { color: var(--gold); font-weight: 600; }
.seat .stack { color: var(--gold); font-size: .82em; white-space: nowrap; } /* "100 BB" on two lines made the seat taller and pushed the hero's action clock off-screen */
.seat .hole { display: flex; gap: .25em; justify-content: center; margin-top: .4em; }
.seat .dealer-btn {
  position: absolute;
  top: calc(-6px + var(--by, 0px));
  left: calc(-6px + var(--bx, 0px));
  background: radial-gradient(circle at 35% 30%, #fff6d6, #e0b04c 55%, #8a6415);
  color: #3a2410;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: .7em;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #6a4a18;
  box-shadow: 0 2px 4px rgba(0,0,0,.45);
  z-index: 9;
}
.seat .blind-btn {
  position: absolute;
  top: calc(-6px + var(--by, 0px));
  left: calc(-6px + var(--bx, 0px));
  background: var(--panel2);
  border: 1px solid var(--muted);
  color: var(--text);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: .62em;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9;
}
/* Heads-up the dealer also posts the SB: sit it just right of the D instead of under it. */
.seat:has(> .dealer-btn) > .blind-btn { left: calc(-6px + 22px + 3px + var(--bx, 0px)); }
.seat .blind-btn.sb { background: #3a5a8f; border-color: #3a5a8f; }
.seat .blind-btn.bb { background: #8f3a3a; border-color: #8f3a3a; }
.hand-preview {
  display: inline-block;
  margin-top: .3em;
  font-size: .72em;
  color: var(--gold);
  background: rgba(0,0,0,.4);
  border-radius: 8px;
  padding: .1em .5em;
}
/* Your own «пара / старшая карта» line hangs under the plaque instead of adding to its height: the plaque (and with it the whole table's
   fit) used to grow when it appeared on your turn, so the plaque moved up from where it was placed and the table jumped. */
.seat[data-is-me="1"] > .seat-card { position: relative; }
.seat[data-is-me="1"] .hand-preview { position: absolute; left: 50%; top: calc(100% + 2px); transform: translateX(-50%); margin: 0; white-space: nowrap; z-index: 3; }
.reveal-row { display: flex; gap: .5em; justify-content: center; margin-top: .3em; }
.reveal-row button { font-size: .8em; padding: .3em .7em; }
.action-slot .reveal-row { margin: 0; }
.action-slot .reveal-row button { font-size: .95em; padding: .45em 1.1em; }
.spectator-banner {
  background: rgba(255,255,255,.06);
  border: 1px dashed var(--muted);
  border-radius: 10px;
  padding: .6em 1em;
  width: min(720px, 94vw);
  text-align: center;
  color: var(--muted);
}
.seat-chip {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 9;
  pointer-events: none;
}
/* Rack "in hand" — as tall as the plaque, flush with its side (applyTableLayout places it).
   The box is centered on the point --bx/--by names. */
.seat-bankroll {
  position: absolute;
  top: 50%;
  left: 50%;
  /* Above the hero plaque (z 5) so its gold turn-glow cannot paint over the rack. */
  z-index: 6;
  width: auto;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5));
  transform: translate(calc(-50% + var(--bx, 0px)), calc(-50% + var(--by, 0px)));
}
/* A short column of denomination piles. Discs of one denomination sit on each other; the next
   colour starts above that pile. A bet stays a loose pile with the amount, further toward the pot. */
.chip-stack.bankroll.piles {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 2px;
  box-sizing: border-box;
  width: auto;
  height: auto;
  padding: 3px 2px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(90, 58, 32, .55), rgba(28, 16, 8, .88));
  border: 1px solid rgba(232, 196, 120, .7);
  box-shadow: inset 0 0 0 1px rgba(255, 220, 160, .18);
}
.chip-pile.tower-pile {
  position: relative;
  width: 13px;
  height: calc(12px + (var(--tower-h, 1) - 1) * 2.8px);
  flex: none;
}
.chip-pile.tower-pile .chip.mini {
  width: 12px;
  height: 12px;
  left: 50%;
  margin-left: -6px;
  bottom: calc(var(--i, 0) * 2.8px);
}
.chip-pile.tower-pile .chip-count { right: -2px; bottom: -1px; font-size: .55em; }
.seat.fold-anim .seat-bankroll, .seat.folded .seat-bankroll { opacity: .35; transition: opacity .45s ease-out; } /* stays dim after the fold animation class is gone */
.seat-chip .chip-stack.table-bet {
  padding: .12em .38em;
  border-radius: 999px;
  background: rgba(8, 12, 10, .72);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
}
.seat-chip .ante-chip { display: flex; margin-top: .2em; opacity: .9; }
.seat-chip .ante-chip .chip-amt { font-size: .85em; }
@keyframes chipFlyToTable {
  from {
    transform: translate(calc(var(--cx, 0px) + var(--fly-fx, 0px)), calc(var(--cy, 0px) + var(--fly-fy, 0px))) scale(0.5);
    opacity: .45;
  }
  to { transform: translate(var(--cx, 0px), var(--cy, 0px)) scale(1); opacity: 1; }
}
.seat-chip.chip-fly-in:not(.collecting) { animation: chipFlyToTable .48s cubic-bezier(.22, .72, .24, 1) forwards; }

/* --- chips: real denomination colors (see DENOMS in main.js — white 1, red 5, green 25, black
   100, purple 500, gold 1000), rendered as one stacked pile per denomination actually present in
   the amount, so e.g. 340 chips reads as a black pile + a green pile + a red pile, not one
   indistinct blob. Swap a .chip's background for an image later (real chip art) without touching
   the breakdown logic. */
.chip-stack {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  vertical-align: middle;
}
.chip-pile {
  position: relative;
  display: inline-block;
}
.chip-pile.mini { width: 15px; height: 20px; }
.chip-pile.pot { width: 32px; height: 42px; }
.chip {
  position: absolute;
  left: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 55%, var(--chip-edge) 57%, var(--chip-edge) 62%, transparent 64%),
    repeating-conic-gradient(var(--chip-color) 0deg 22deg, var(--chip-edge) 22deg 44deg);
  border: 1px solid rgba(0,0,0,.4);
  box-shadow: 0 2px 2px rgba(0,0,0,.6);
}
.chip.mini { width: 15px; height: 15px; bottom: calc(var(--i, 0) * 3px); }
.chip.pot { width: 32px; height: 32px; bottom: calc(var(--i, 0) * 6px); }
.chip-count {
  position: absolute;
  right: -4px;
  bottom: -2px;
  background: rgba(0,0,0,.75);
  color: #fff;
  font-size: .6em;
  font-weight: 700;
  border-radius: 6px;
  padding: 0 .25em;
  z-index: 2;
}
.chip-amt {
  font-size: .78em;
  font-weight: 700;
  background: rgba(0,0,0,.6);
  color: var(--gold);
  border-radius: 8px;
  padding: .1em .55em;
  white-space: nowrap;
}
.chip-stack.pot-grow .chip-amt { animation: potWin .5s ease-in-out; }
.chip-stack.chip-in { animation: chipIn .3s ease-out; }
.chip-stack.bankroll { gap: .3em; }

.chip-legend {
  position: absolute;
  top: .4em;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .2em .55em;
  font-size: .72em;
  color: var(--muted);
  opacity: .75;
  pointer-events: none;
  z-index: 2;
}
.legend-item { display: inline-flex; align-items: center; gap: .3em; }
.legend-item .chip { position: static; }

.seat .stack-line {
  display: flex; align-items: center; justify-content: center; gap: .25em; margin-top: .1em;
  max-width: 100%; min-width: 0;
}
.seat .stack { flex: 1 1 auto; text-align: center; min-width: 0; }
/* Once the pot pays out the stack text grows ("0 · вне игры", a bigger winner's number) and would
   push the % past this row's overflow:hidden edge — the % must survive until the next deal. */
.equity-badge { flex-shrink: 0; position: relative; z-index: 3; } /* above the kick cross that sits on the same line */
.seat .stack-line:has(.equity-badge) .stack { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.equity-badge {
  font-size: .8em; font-weight: 800; padding: .05em .4em; border-radius: 6px;
  background: rgba(0,0,0,.35);
}
.equity-badge.equity-good { color: #4fce72; }
.equity-badge.equity-bad { color: #e07a7a; }
.equity-badge.equity-mid { color: var(--gold); }
.outs-row { position: absolute; top: 0; z-index: 6; width: max-content; max-width: 190px; padding: 3px 5px; border-radius: 8px; background: rgba(0,0,0,.72); text-align: center; pointer-events: none; }
.seat.over-drama { z-index: 61; }
.outs-row.outs-right { left: 100%; margin-left: 4px; }
.outs-row.outs-left { right: 100%; margin-right: 4px; }
.outs-row:not([data-placed]) { visibility: hidden; } /* until placeOutsRows() has found its spot */
.outs-row.outs-low { top: auto; bottom: 0; } /* bottom-half seats grow upwards, not off the page */
/* The row sits inside its seat's card (a stacking context), so a later seat used to paint over it: lift the card above the other plaques while it carries outs.
   Not above #camLayer (7) — the card would hide its own camera; placeOutsRows() keeps the rows off the camera circles instead. */
.table-oval .seat > .seat-card:has(.outs-row) { z-index: 6; }
/* …and the whole seat with it: every seat is its own layer (z 1), so a later seat's plaque, bet and stack used to paint over the outs. 20 is above the plaques, bets, stacks and
   the pot, below chips flying to the winner (30), the result banner (31) and the drama seat (61). */
.table-oval > .seat:has(.outs-row) { z-index: 20; }
.outs-row.outs-many { max-width: 270px; }
.outs-row.outs-many .playing-card { width: 27px; height: 38px; font-size: .68em; }
.outs-row .log-cards { margin: 2px 0 0; justify-content: center; }
.outs-count { font-weight: 800; font-size: 11px; color: #e07a7a; }
.outs-who { display: inline-block; max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; color: var(--gold); }

@keyframes chipCollect {
  from { opacity: 1; transform: translate(var(--cx, 0), var(--cy, 0)) scale(1); }
  to { opacity: 0; transform: translate(calc(-1 * var(--sx) * 1), calc(-1 * var(--sy) * 1)) scale(.5); }
}
.seat-chip.collecting { animation: chipCollect .55s ease-in forwards; }

.playing-card {
  position: relative;
  width: 50px;
  height: 70px;
  border-radius: 6px;
  background: #fff;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.15em;
  font-family: 'Iowan Old Style', Palatino, Georgia, 'Times New Roman', serif;
  flex-direction: column;
  line-height: 1;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0,0,0,.4), 0 0 0 1px rgba(0,0,0,.08);
  font-variant-numeric: tabular-nums;
}
.playing-card .pip.mid {
  position: static;
  font-size: 1.85em;
  font-weight: 400;
  line-height: 1;
}
.playing-card .pip.tl,
.playing-card .pip.br {
  position: absolute;
  z-index: 2;
  width: 1.85em;
  line-height: .95;
  text-align: center;
  letter-spacing: -.04em;
}
.playing-card .pip.tl small,
.playing-card .pip.br small { display: block; font-size: .85em; margin-top: 1px; font-weight: 400; }
.playing-card .pip.tl { top: 3px; left: 2px; font-size: .72em; }
.playing-card .pip.br { bottom: 3px; right: 2px; font-size: .72em; transform: rotate(180deg); }
.playing-card.red { color: #c41e3a; }
.playing-card.back {
  background:
    radial-gradient(circle at 50% 50%, rgba(255,220,180,.18) 0 14%, transparent 15%),
    repeating-linear-gradient(45deg, #7a1824 0 3px, #4e0f18 3px 6px);
  box-shadow: 0 3px 8px rgba(0,0,0,.4), 0 0 0 1px #3a1014;
  color: transparent;
}
.playing-card.back .pip { display: none; }
.playing-card.big { width: 70px; height: 98px; font-size: 1.5em; }
.playing-card.big .pip.tl,
.playing-card.big .pip.br { font-size: .62em; }
.playing-card.big .pip.mid { font-size: 1.7em; }
.hist-cards .pip.mid,
.hist-cards .pip.br,
.hist-community .pip.mid,
.hist-community .pip.br,
.log-cards .pip.mid,
.log-cards .pip.br,
.rp-board .pip.mid,
.rp-board .pip.br,
.rp-hole .pip.mid,
.rp-hole .pip.br { display: none; }
.hist-cards .pip.tl,
.hist-community .pip.tl,
.log-cards .pip.tl,
.rp-board .pip.tl,
.rp-hole .pip.tl {
  position: static;
  width: auto;
  font-size: 11px;
  line-height: 1.05;
}
.hist-cards .pip.tl small,
.hist-community .pip.tl small,
.log-cards .pip.tl small,
.rp-board .pip.tl small,
.rp-hole .pip.tl small { font-size: 11px; margin: 0; }

@keyframes dealIn {
  from { opacity: 0; transform: scale(.25) translateY(-40px) rotate(-8deg); }
  to { opacity: 1; transform: scale(1) translateY(0) rotate(0); }
}
.playing-card.deal-in { animation: dealIn .38s cubic-bezier(.22,.66,.16,1); }
html.dealer-nodealin .playing-card.deal-in { animation: none; } /* the dealer's cards fly in themselves; the slot must already sit where it lands */

@keyframes chipIn {
  from { opacity: 0; transform: scale(.4); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes foldFade {
  to { opacity: .4; transform: translateY(10px) rotate(-5deg); }
}
.seat.fold-anim .seat-card { animation: foldFade .45s ease-out forwards; }
/* The dealer's table only (the plain table stays as it was): a folded plaque stays dropped and tilted (also after its player shows
   the cards and the fold animation is gone), and the action slot is tall enough for the bar with its quick-bet row (at 118 the table
   grew by ~6% on every fold). */
@keyframes foldFadeD {
  from { translate: 0 0; rotate: 0deg; }
}
.table-stage.has-frame .seat.fold-anim .seat-card { animation: foldFadeD .45s ease-out; }
.table-stage.has-frame .seat.folded .seat-card { translate: 0 10px; rotate: -5deg; }
/* SB / BB / D sit on the plaque's corner: when the plaque drops and tilts they go with it (about where the corner lands) */
.seat > :is(.dealer-btn, .blind-btn) { transition: translate .45s ease-out, rotate .45s ease-out; }
.table-stage.has-frame .seat.folded > :is(.dealer-btn, .blind-btn) { translate: -3px 16px; rotate: -5deg; }
.table-page:has(.table-stage.has-frame) .action-slot { min-height: 146px; }

@keyframes potWin {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); box-shadow: 0 0 24px var(--gold); }
  100% { transform: scale(1); }
}
.seat.won-anim .seat-card { animation: potWin .7s ease-in-out; }

.action-bar {
  display: flex;
  flex-direction: column;
  gap: .45em;
  align-items: stretch;
  background: var(--panel);
  border-radius: 12px;
  padding: .5em .8em;
  width: min(760px, 96%);
  z-index: 6;
  box-shadow: 0 6px 18px rgba(0,0,0,.45);
}
.raise-pct-row { display: flex; gap: .4em; width: 100%; justify-content: center; align-items: stretch; }
.pct-group {
  display: flex; gap: 2px; padding: 2px; min-width: 0;
  background: #15181f; border: 1px solid #3a3f4a; border-radius: 10px;
}
.pct-group.bb { flex: 2 1 0; border-color: rgba(224, 176, 76, .55); background: rgba(224, 176, 76, .08); }
.pct-group.pot { flex: 4 1 0; }
.action-bar .pct-btn {
  flex: 1 1 0; min-width: 0; margin: 0;
  padding: .28em .4em; font-size: .8em; font-weight: 700; line-height: 1.15;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  background: transparent; color: var(--text); border-radius: 8px; box-shadow: none;
}
.pct-group.bb .pct-btn { color: var(--gold); }
.action-bar .pct-btn.on { background: rgba(224, 176, 76, .24); color: var(--gold); }
.pct-group.pot .pct-btn.on { background: #2c3342; color: var(--text); }
.action-bar .pct-btn:disabled { opacity: .35; }
.action-row {
  display: flex;
  flex-wrap: wrap; /* was nowrap + a scrollbar (Edge on Windows drew it under the buttons): when it does not fit, the raise button goes to a second line */
  align-items: center;
  justify-content: center;
  gap: .5em;
  width: 100%;
  min-width: 0;
  overflow-x: visible;
}
.allin-row { display: flex; justify-content: center; width: 100%; }
/* Buttons never squeeze: when the row ran out of room (a big call amount, a tall chip preview) they shrank,
   the label wrapped onto a second line and the buttons grew taller. The slider and the preview give way instead. */
.action-row button { flex: 0 0 auto; white-space: nowrap; }
/* Fixed boxes for what changes while the bet is dragged — the chip preview (six piles at most: 6 x 15 px + gaps)
   and the "Рейз до N" button — so the slider between them doesn't change width with every chip. The amount isn't
   repeated in the preview: the number box has it. */
.action-row #raisePreview { flex: 0 0 132px; width: 132px; display: flex; align-items: center; justify-content: flex-start; overflow: visible; }
.action-row #raisePreview .chip-stack { gap: 2px; }
/* Four modern piles occupy 102px, leaving room for their shadows inside the 108px preview. */
.action-row #raisePreview .piles2.raise { --d: 24px; gap: 2px; }
@media (min-width: 861px) { .action-row #raiseBtn { min-width: 11.5em; } }
@media (min-width: 861px) and (max-width: 1100px) { .action-row { flex-wrap: wrap; overflow-x: visible; } } /* the journal narrows the bar here: wrap, never hide the raise button */
@media (max-width: 1100px) { .action-row #raisePreview { display: none; } } /* a narrow window has no room for it next to the slider */
/* A slider is its own track: the page-wide input padding/border made the draggable track ~35% shorter than
   the drawn control, so the thumb and the blue fill ran ahead of the mouse. */
input[type=range] { padding: 0; border: 0; background: transparent; margin: 0; height: 24px; box-shadow: none; cursor: pointer; }
.action-bar input[type=range] { flex: 1 1 64px; min-width: 64px; }
.action-bar [data-act="allin"] { flex: 0 0 auto; }
.action-bar .amount {
  width: 4.6em;
  text-align: center;
  color: var(--gold);
  font-weight: 700;
  background: var(--panel2);
  border: 1px solid #3a3f4a;
  border-radius: 6px;
  padding: .3em .2em;
}

.hint-line { color: var(--muted); text-align: center; }
.table-tools {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2em;
  width: min(780px, 96%);
  margin: .2em auto 0;
  padding-top: .45em;
  flex-shrink: 0;
  overflow: visible;
  position: relative;
  z-index: 8;
}
.preact-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .6em 1em;
  justify-content: center;
  width: 100%;
}
.preact-btn {
  color: var(--muted);
  font-size: .9em;
  font-weight: 600;
  cursor: pointer;
  margin: 0;
  background: var(--panel);
  border: 1px solid #3a3f4a;
  border-radius: 8px;
  padding: .4em .8em;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.preact-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.log-panel {
  width: 100%;
  /* Belt-and-suspenders: a burst of log lines (e.g. an offline seat's action clock repeatedly
     firing) should never be able to grow this past its flex share (see the flex:1 1 42% rule
     below) — this is the actual hard ceiling that guarantees it, on top of that. */
  max-height: 60vh;
  overflow-y: auto;
  background: var(--panel);
  border-radius: 10px;
  padding: .6em 1em;
  font-size: .9em;
  color: var(--muted);
  box-sizing: border-box;
}
.log-panel div { padding: .1em 0; }
/* Shrunk-down copies of the same table cards (see logCardsHtml() in main.js) — the board first,
   then each winner's hole cards grouped in their own little cluster. */
.log-cards { display: flex; flex-wrap: wrap; align-items: center; gap: .15em; margin: .25em 0 .5em; }
.log-cards .playing-card {
  width: 34px;
  height: 47px;
  font-size: .78em;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.log-cards { flex-direction: column; align-items: flex-start; gap: 4px; }
.log-board { display: flex; flex-wrap: nowrap; gap: .15em; }
.log-hand { display: flex; align-items: center; gap: .5em; padding: 2px 0 2px .5em; border-left: 2px solid var(--gold); }
.log-hand-name { color: var(--text, #e8e8e8); font-weight: 600; font-size: .9em; min-width: 3.5em; max-width: 7em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-hand-cards { display: inline-flex; gap: .1em; }
.log-panel .log-line.log-win { margin-top: .5em; padding-top: .45em; border-top: 1px solid #2c313b; }
.log-panel .log-line.log-win:first-of-type { border-top: 0; margin-top: 0; }
.outs-row .log-cards { flex-direction: row; }
/* Chat sits right under the log in the same sidebar column — same card look, its own scroll box
   so a burst of messages doesn't push the log (or the input) out of view. */
.chat-panel {
  width: 100%;
  background: var(--panel);
  border-radius: 10px;
  padding: .6em 1em;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.chat-panel h3, .log-panel h3 { margin: 0 0 .4em; font-size: .9em; color: var(--text); }
.chat-log {
  flex: 1;
  min-height: 80px;
  max-height: none;
  overflow-y: auto;
  font-size: .9em;
}
.chat-line { padding: .15em 0; overflow-wrap: anywhere; }
.chat-line b { color: var(--accent); font-weight: 600; }
.chat-input-row { display: flex; gap: .4em; margin-top: .5em; }
.chat-input-row input { flex: 1; min-width: 0; }
.chat-input-row button { padding: .5em .8em; }
/* The sidebar column (log + chat stacked) is its own flex column so both can share the available
   height next to the table, instead of two independently-sized boxes fighting for space. */
.sidebar-col {
  width: 100%;
  height: 100%;
  max-height: none;
  min-height: 0;
  display: flex;
  flex-direction: column;
  /* Visibly separates the log from the chat below it — they used to sit right on top of each
     other with only a thin 1em gap, easy to misread as one continuous block. */
  gap: 1.2em;
  overflow: hidden;
}
/* Pushes the chat panel down to the bottom of the sidebar column instead of sitting right under
   the log — .chat-panel's own flex:1 (see below) still lets it grow to fill whatever's left. */
.log-panel { flex: 1 1 42%; min-height: 0; }
@media (max-width: 860px) {
  /* Scrolls as one column on a phone: with overflow hidden the chat panel got squeezed to ~30px and
     its input landed below the clipped edge — the chat could be neither read nor typed into. */
  .sidebar-col { max-height: none; height: 100%; overflow-y: auto; }
  .log-panel { max-height: 120px; flex: none; }
  .chat-panel { flex: none; }
  .chat-log { max-height: 160px; }
}

/* --- emoji reactions --- */
.emoji-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: .15em;
  justify-content: center;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* Belt-and-suspenders against a Chromium build (some Yandex Browser releases included) that
     doesn't fully honor scrollbar-width/::-webkit-scrollbar's `display:none` and still reserves
     the native scrollbar's track height: push it past the bottom edge with a negative margin, then
     clip it off with the padding-matched wrapper's own overflow — the bar itself never grows. */
  padding-bottom: 17px;
  margin-bottom: -17px;
}
.emoji-bar::-webkit-scrollbar { display: none; width: 0; height: 0; }
.emoji-btn {
  background: var(--panel2);
  border-radius: 8px;
  padding: .1em .28em;
  font-size: 1.15em;
  line-height: 1;
  flex-shrink: 0;
}
.emoji-btn:hover { background: var(--accent); }
.emoji-btn img { width: 1.5em; height: 1.5em; object-fit: contain; vertical-align: middle; }

/* --- sticker reactions (image/video, some with a voice line heard by everyone — see poker:sticker) --- */
.sticker-bar {
  display: flex; flex-wrap: nowrap; gap: .3em; justify-content: center;
  width: 100%; overflow-x: auto; margin-top: .3em;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 17px; /* see .emoji-bar's comment on this fallback */
  margin-bottom: -17px;
}
.sticker-bar::-webkit-scrollbar { display: none; width: 0; height: 0; }
.sticker-btn {
  background: var(--panel2); border-radius: 8px; padding: .2em; flex-shrink: 0;
  width: 40px; height: 40px; display: grid; place-items: center; overflow: hidden;
}
.sticker-btn:hover { background: var(--accent); }
.sticker-btn:disabled,
.sticker-btn.busy { opacity: .4; cursor: default; pointer-events: none; }
.sticker-btn img, .sticker-btn video { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; background: transparent; }
.sticker-thumb { position: relative; display: block; width: 100%; height: 100%; }
.sticker-btn.captioned { width: 62px; height: auto; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .25em .2em .3em; }
.sticker-btn.captioned .sticker-thumb { width: 40px; height: 40px; }
.sticker-caption { font-size: 9.5px; line-height: 1.1; color: var(--text); text-align: center; max-width: 100%;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sticker-sound { position: absolute; right: -4px; bottom: -3px; font-size: 10px; font-style: normal; line-height: 1;
  background: rgba(0, 0, 0, .7); border-radius: 6px; padding: 1px 2px; pointer-events: none; }

/* --- reaction packs: one button per pack (emoji, or a themed sticker group), opening a panel of
   its individual items below the row instead of always showing every item at once. --- */
.pack-picker { position: relative; width: 100%; display: flex; justify-content: center; }
.pack-row {
  display: flex; flex-wrap: nowrap; gap: .3em; justify-content: center;
  width: 100%; overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.pack-row::-webkit-scrollbar { display: none; width: 0; height: 0; }
.pack-btn {
  background: var(--panel2); border-radius: 8px; padding: .2em; flex-shrink: 0;
  width: 40px; height: 40px; display: grid; place-items: center; overflow: hidden;
  border: 2px solid transparent;
}
.pack-btn:hover { background: var(--accent); }
.pack-btn.active { border-color: var(--accent); }
.pack-btn img, .pack-btn video { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }
.pack-emoji-icon { font-size: 1.4em; line-height: 1; }
/* A Lottie animated emoji: the box is sized like the glyph it replaces (same em), the SVG fills it. */
.emoji-anim { display: inline-block; width: 1.2em; height: 1.2em; line-height: 1.2em; vertical-align: middle; text-align: center; }
.emoji-anim svg { display: block; width: 100% !important; height: 100% !important; }
.pack-panel {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: max-content;
  max-width: min(420px, 94vw);
  max-height: min(240px, 36vh);
  display: flex;
  flex-direction: column;
  gap: .35em;
  background: var(--panel);
  border: 1px solid #3a3f4a;
  border-radius: 12px;
  padding: .55em .65em .65em;
  box-sizing: border-box;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .55);
  z-index: 12;
}
.pack-panel::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: var(--panel);
}
.pack-panel-title {
  font-size: .78em;
  font-weight: 700;
  color: var(--muted);
  text-align: left;
  padding: 0 .15em .1em;
}
.pack-panel-items {
  display: flex;
  flex-wrap: wrap;
  gap: .3em;
  justify-content: flex-start;
  overflow-y: auto;
  min-height: 0;
}
/* Voiced packs share one face — keep every sticker on a single row so the captions stay
 * readable as a strip. Narrow screens scroll sideways instead of wrapping. Papich and
 * Mellstroy wrap into two equal rows instead. */
.pack-panel.sticker-pack {
  max-width: min(580px, 96vw);
}
.pack-panel.sticker-pack .pack-panel-items {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.pack-panel.sticker-pack .pack-panel-items::-webkit-scrollbar { display: none; }
.pack-panel.pack-papich {
  max-width: min(360px, 96vw);
  max-height: none;
}
.pack-panel.pack-papich .pack-panel-items {
  flex-wrap: wrap;
  overflow: visible;
  justify-content: center;
}
.pack-panel.pack-mellstroy,
.pack-panel.pack-tinkoff {
  max-width: min(420px, 96vw);
  max-height: none;
}
.pack-panel.pack-mellstroy .pack-panel-items,
.pack-panel.pack-tinkoff .pack-panel-items {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  justify-content: center;
  justify-items: center;
  overflow: visible;
  flex-wrap: unset;
}

/* A big reaction floating above the sender's seat, visible to the whole table — see
   poker:emoji/S.reactions. Deliberately much larger than the hole cards so it reads at a glance. */
.seat-reaction {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  bottom: 100%;
  font-size: 2.6em;
  line-height: 1;
  z-index: 11;
  pointer-events: none;
  animation: reactionPop 2.4s ease-out forwards;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.5));
  transform-origin: 50% 100%;
}
/* height-based, not a fixed square: a wide source (e.g. a landscape GIF) was getting squeezed down
   to a fraction of the intended size inside a 1em x 1em box via object-fit — letting width follow
   the source's own aspect ratio keeps every reaction visually the same height regardless of shape. */
.seat-reaction img, .seat-reaction video { height: 1.3em; width: auto; max-width: 3em; }
/* Stickers (a picture/clip, not an emoji glyph) pop at twice the size so they're actually readable. */
.seat-reaction.sticker img, .seat-reaction.sticker video { height: 2.6em; max-width: 6em; background: transparent; }

/* A seat in the table's top half (see the .seat-top class, set from the seat's own computed y
   offset) has little to no room above it before running off the visible table/viewport — floating
   the reaction there the same way as every other seat made it "поплохо видно"/cut off at the top
   edge. Flip it to float below the seat instead for exactly those seats. */
.seat-top .seat-reaction { bottom: auto; top: 100%; transform-origin: 50% 0; }
@keyframes reactionPop {
  0% { opacity: 0; transform: scale(.3) translateY(10px); }
  12% { opacity: 1; transform: scale(1.15) translateY(-6px); }
  22% { transform: scale(1) translateY(0); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: scale(.9) translateY(-14px); }
}

/* Sits just under the community cards (the overlay is a child of .pot-area, so top:100% is
   the bottom of the board). Used to be flex-end on the whole oval, which parked the plaque on
   the hero's hole cards. Absolute so it doesn't grow .pot-area and shift the board. */
.result-overlay {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  min-width: 12.25em; /* the pot's width follows its content: at 9 players it is narrower and «Leoj — 1800» wrapped onto two lines */
  margin-top: .35em;
  z-index: 6;
  pointer-events: none;
}
/* The overlay lives inside .pot-area (z-index 3). A hero seat is z-index 5, so on a desktop oval
   the hole cards at the bottom of the table painted over the plaque — including "Показать свои
   карты". Lifting the whole pot cluster above the hero while the plaque is up keeps the button
   clickable without clipping. Above the D/SB/BB badges (9) too; sticker reactions (11) stay on top. */
.table-oval:has(.result-overlay) .pot-area { z-index: 10; }
.result-banner {
  background: linear-gradient(180deg, rgba(20,22,26,.94), rgba(20,22,26,.88));
  border: 2px solid var(--gold);
  border-radius: 14px;
  padding: .55em .8em;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  box-shadow: 0 0 30px rgba(0,0,0,.6), 0 0 22px rgba(224,176,76,.35);
  animation: resultPulse .9s ease-out;
  pointer-events: auto;
}
.result-banner .winner-line {
  font-size: 1.5em;
  font-weight: 800;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(224,176,76,.6);
}
.result-banner .sub-line { font-size: .95em; color: var(--text); margin-top: .2em; }
@keyframes resultPulse {
  0% { transform: scale(.85); box-shadow: 0 0 0 rgba(224,176,76,0); }
  40% { transform: scale(1.04); }
  100% { transform: scale(1); box-shadow: 0 0 22px rgba(224,176,76,.35); }
}

.toasts, #toasts {
  position: fixed;
  top: 1em;
  right: 1em;
  display: flex;
  flex-direction: column;
  gap: .5em;
  z-index: 500; /* above every window, the Academy's too (80) */
  pointer-events: none;
}
.toast {
  background: var(--panel2);
  border-radius: 8px;
  padding: .6em 1em;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
  max-width: min(22em, 90vw);
}
.toast.error { background: var(--danger); }
.toast.success { background: linear-gradient(135deg, #3a2f10, var(--panel2)); border: 1px solid var(--gold); }

.error-text { color: #ff8a80; }

/* Phone widths: seats at their desktop size (150px) crowd into each other around a narrow oval —
   shrink the seat card, its text and the cards so a full ring of players actually fits on screen
   without overlapping (their *positions* already rescale via applyTableLayout() in main.js; this
   just keeps their on-screen footprint small enough to fit those tighter positions). Placed last
   in the file on purpose — same specificity as the base `.seat` etc. rules above, so it must come
   after them in source order to actually win the cascade. */
@media (max-width: 480px) {
  .table-oval { width: min(1200px, 96%); max-height: 90%; margin: 0; }
  /* Shrunk another ~15% from the previous defaults (84px seat / 30x42 card) per direct feedback
     that both the seats and the hole cards read as too big on a phone, crowding the table and
     leaving less room to actually see what's happening. */
  .seat { width: 72px; }
  /* The desktop 126px floor (two-line name + full-size cards) leaves a tall empty tail under the
     smaller phone cards, and that tail is what the hero's own bet lands on. Hug the content;
     9- and 12-handed tables keep their own shorter floors below. */
  .seat .seat-card { padding: .25em .3em; border-width: 1px; min-height: 0; }
  .seat-face, .seat-avatar-wrap, .seat-avatar { width: 19px; height: 19px; }
  .seat-face .champ-crown { font-size: 11px; }
  .seat-avatar.placeholder { font-size: .58em; }
  .seat .name { font-size: .6em; }
  .seat .stack { font-size: .56em; }
  .seat .dealer-btn, .seat .blind-btn { width: 14px; height: 14px; font-size: .5em; }
  .seat:has(> .dealer-btn) > .blind-btn { left: calc(-6px + 14px + 2px + var(--bx, 0px)); }
  .seat .rebuys { height: 14px; min-width: 14px; padding: 0 .25em; font-size: .5em; }
  .hand-preview { font-size: .52em; padding: .05em .3em; }
  .playing-card { width: 26px; height: 36px; font-size: .65em; }
  .playing-card.big { width: 34px; height: 48px; font-size: .82em; }
  /* On a phone, more players needs to shrink further still. Desktop no longer shrinks 9–12. */
  .table-oval.crowd-9 .seat { width: 58px; }
  .table-oval.crowd-9 .seat .seat-card { padding: .2em .25em; }
  .table-oval.crowd-9 .seat .name { font-size: .52em; }
  .table-oval.crowd-9 .seat .stack { font-size: .48em; }
  .table-oval.crowd-9 .seat-face, .table-oval.crowd-9 .seat-avatar-wrap, .table-oval.crowd-9 .seat-avatar { width: 15px; height: 15px; }
  .table-oval.crowd-9 .seat-face .champ-crown { font-size: 10px; }
  .table-oval.crowd-9 .playing-card { width: 20px; height: 28px; font-size: .58em; }
  .table-oval.crowd-9 .playing-card.big { width: 25px; height: 35px; font-size: .67em; }
  .table-oval.crowd-11 .seat { width: 50px; }
  .table-oval.crowd-11 .seat .seat-card { padding: .15em .2em; }
  .table-oval.crowd-11 .seat .name { font-size: .46em; }
  .table-oval.crowd-11 .seat .stack { font-size: .43em; }
  .table-oval.crowd-11 .seat-face, .table-oval.crowd-11 .seat-avatar-wrap, .table-oval.crowd-11 .seat-avatar { width: 13px; height: 13px; }
  .table-oval.crowd-11 .seat-face .champ-crown { font-size: 9px; }
  .table-oval.crowd-11 .playing-card { width: 17px; height: 24px; font-size: .5em; }
  .table-oval.crowd-11 .playing-card.big { width: 21px; height: 30px; font-size: .56em; }
  .table-oval.crowd-11 .seat .dealer-btn, .table-oval.crowd-11 .seat .blind-btn { width: 10px; height: 10px; font-size: .4em; }
  .table-oval.crowd-11 .seat:has(> .dealer-btn) > .blind-btn { left: calc(-6px + 10px + 2px + var(--bx, 0px)); }
  .table-oval.crowd-11 .seat .rebuys { height: 10px; min-width: 10px; font-size: .4em; }
  /* The desktop 108px floor (see .seat .seat-card) is taller than a crowded phone table has room
     for — 9-12 seats around a ~360px oval stacked into each other on the curved ends. */
  .table-oval.crowd-9 .seat .seat-card { min-height: 72px; }
  .table-oval.crowd-11 .seat .seat-card { min-height: 62px; }
  .table-oval.crowd-9 .hand-preview, .table-oval.crowd-11 .hand-preview { font-size: .45em; }
  .chip-pile.mini { width: 11px; height: 15px; }
  .chip.mini { width: 11px; height: 11px; }
  .chip-pile.tower-pile { width: 11px; height: calc(10px + (var(--tower-h, 1) - 1) * 2.4px); }
  .chip-pile.tower-pile .chip.mini { width: 10px; height: 10px; margin-left: -5px; bottom: calc(var(--i, 0) * 2.4px); }
  .chip-stack.bankroll.piles { gap: 1px; padding: 2px 1px; }
  .emoji-btn { font-size: 1.15em; padding: .15em .3em; }
  .seat-reaction { font-size: 1.9em; }
  .seat-reaction.sticker img, .seat-reaction.sticker video { height: .65em; max-width: 1.5em; } /* on a phone stickers stay small: bigger ones covered the pot and your own cards */
  .seat-cam { width: 36px; height: 36px; border-width: 2px; }
  .seat-chip .chip-amt { font-size: .6em; padding: 0 .35em; } /* bet amounts next to the seats were oversized on a phone */
  .result-banner { padding: .6em .8em; }
  .result-banner .winner-line { font-size: 1.15em; }
  .result-banner .sub-line { font-size: .8em; }

  /* The header never wrapped or scrolled — on a narrow phone its items (title, table info, leave
     button, the Monopoly link, volume, profile/username/logout) add up to way more than the
     viewport width, and with nothing to shrink further or wrap onto, everything past a certain
     point (the leave button included — see the "Встать" report) just renders past the right edge,
     unreachable by any scroll. Force a two-line header instead of letting content run off. The
     `.grow` spacer, given a full-width 0-height flex-basis here, is what forces the actual line
     break: everything before it (title/table meta/leave) ends up on line 1, everything after
     (Monopoly link onward) on line 2, each side then free to wrap further/shrink within its own line. */
  .top { flex-wrap: wrap; row-gap: .35em; padding: .5em .6em; }
  .top h1 { font-size: 1em; }
  .table-meta { font-size: .74em; }
  .hdr-name { max-width: 110px; }

  /* Same root cause as the header above, on a smaller scale: no side padding meant the first/last
     button in the horizontally-scrolled row sat flush against the viewport edge, so it read as
     "half eaten by the screen" even though scrolling could technically reach it. */
  .emoji-bar, .sticker-bar, .pack-row {
    justify-content: flex-start;
    justify-content: safe center;
    padding-inline: max(12px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
    scroll-padding-inline: 12px;
    gap: .18em;
    box-sizing: border-box;
  }
  .pack-btn { width: 32px; height: 32px; padding: .12em; }
  .pack-emoji-icon { font-size: 1.15em; }
  .sticker-btn { width: 32px; height: 32px; }
  .sticker-btn.captioned { width: 48px; padding: .15em .12em .2em; }
  .sticker-btn.captioned .sticker-thumb { width: 32px; height: 32px; }
  .table-tools { width: 100%; padding-top: .25em; }
  /* The pre-act row only shows while it's someone else's turn, when the action slot below holds
     just a "Ход: …" line — so overlay the slot's empty top instead of reserving another ~31px
     row, which was exactly what pushed "Ва-банк" off a short phone screen on your own turn. */
  .preact-bar { position: absolute; top: 100%; left: 0; right: 0; }
  .pack-panel { max-width: calc(100vw - 16px); }
  .pack-panel.sticker-pack .pack-panel-items {
    justify-content: flex-start;
    padding-inline: 8px;
  }
  .pack-panel.pack-papich { max-width: min(360px, calc(100vw - 16px)); }
  .pack-panel.pack-papich .pack-panel-items {
    justify-content: center;
    padding-inline: 0;
  }
  .pack-panel.pack-mellstroy,
  .pack-panel.pack-tinkoff { max-width: min(420px, calc(100vw - 16px)); }
  .pack-panel.pack-mellstroy .pack-panel-items,
  .pack-panel.pack-tinkoff .pack-panel-items {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    padding-inline: 0;
  }

  /* The header above only stops content running off-screen — it still wraps into 5 separate rows at
     the table (title / table-meta+leave / "В Монополию"+volume+avatar / username+"Сменить имя"),
     eating ~450px before the table even starts. On a phone the table itself is what actually needs
     that space: with so little left, applyTableLayout()'s own shrink-to-fit logic has to squash the
     oval down to near-zero height, and at that point two seats on opposite sides of the stadium (top
     and bottom) land almost exactly on top of each other instead of at opposite ends — the "table
     looks like a pile of overlapping cards" report. Collapse the in-game header to two tight rows
     instead of four, and drop what a player mid-hand doesn't need at all (their own name — they
     know who they are; "Сменить имя" — not a mid-game action). */
  body.ingame .top { padding: .35em .5em; gap: .3em; row-gap: .25em; }
  body.ingame .top h1 { font-size: .85em; }
  body.ingame .table-meta { font-size: .68em; }
  body.ingame .top > button,
  body.ingame .top .hdr-menu-btn { font-size: .78em; padding: .3em .55em; }
  body.ingame .top .hdr-name,
  body.ingame .top .hdr-caret { display: none; } /* just the avatar — the player knows who they are */
  body.ingame .volume-ctl .vol-track { width: 46px; }
  body.ingame .hdr-profile { padding: .2em; }

  /* Give the table itself a real floor: without this, every stacked sibling above/below it (header,
     emoji/sticker bars, action bar, journal, chat) claims whatever height it wants first and the
     oval — the only flexible element — gets whatever's left, which on a short viewport can be next
     to nothing. 44svh guarantees the stadium (and therefore the seats) always has enough room to
     lay out without collapsing into itself. */
  .table-stage { min-height: 44svh; padding-top: 1.8em; padding-bottom: 1.6em; }
  /* The chip-denomination key floats at the very top of .table-stage, which is exactly where a
     top-seated player's card now sits once the stage actually has real height — it's purely
     informational (every chip already shows its own value), so it's the one thing worth just
     dropping on a phone rather than fighting the top seat for the same few pixels. */
  .chip-legend { display: none; }
  /* The raise row's chip-stack preview repeats the number already in the amount box next to it;
     dropping it lets amount + "Рейз до" + "Ва-банк" share one row instead of wrapping to a fourth. */
  .action-bar #raisePreview { display: none; }
  .action-slot { min-height: 128px; } /* the raise bar's real height: a shorter reserve made the stage (and the table) shrink on your turn */
  .action-bar {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    gap: .28em;
    padding: .35em max(10px, env(safe-area-inset-right, 0px)) .35em max(10px, env(safe-area-inset-left, 0px));
    border-radius: 10px;
  }
  .raise-pct-row { gap: .22em; width: 100%; }
  .action-bar .pct-btn { padding: .34em .08em; font-size: .74em; }
  .action-row {
    gap: .28em;
    justify-content: flex-start;
    justify-content: safe center;
    padding-inline: 2px;
  }
  .action-bar button { padding: .38em .55em; font-size: .84em; }
  .action-bar .amount { width: 3.5em; padding: .22em .1em; font-size: .9em; }
  .action-bar input[type=range] { flex: 1 1 56px; min-width: 48px; }
  /* The pot was sized for desktop — on a phone its label and 32px chips took up most of the felt
     between the seats and sat under/over the opposite seat's cards. */
  .pot-amount { padding: .15em .6em; font-size: .72em; border-radius: 14px; }
  .blinds-banner { font-size: .72em; padding: .28em .65em; }
  .chip-pile.pot { width: 20px; height: 27px; }
  .chip.pot { width: 20px; height: 20px; bottom: calc(var(--i, 0) * 4px); }
  /* With the 44svh table floor above, a short phone (iPhone SE, or any phone with browser toolbars
     showing) couldn't fit the whole raise bar: "Ва-банк" sat below the screen edge with no way to
     scroll to it. Letting this column scroll is the safety net for those sizes only — on a normal
     phone everything already fits and nothing scrolls. */
  .table-wrap { overflow-y: auto; }
  /* The desktop oval is very flat (2.15:1) because a wide screen has width to spare and seats ring
     the whole rim; on a narrow phone that same flatness puts the top/bottom seats (where 2-4
     players always land) right on top of the pot in the middle, since there's barely any vertical
     radius between "edge of stage" and "center". A rounder oval trades some width for real vertical
     clearance around the pot — applyTableLayout()'s own shrink-to-fit pass still runs on top of this
     for anything it still doesn't fit. */
  .table-oval { aspect-ratio: 1.3 / 1; }
  /* 9-12 seats need even more rim: a near-round table and a taller stage give the chairs on the
     curved ends room to stack instead of sitting on top of each other. */
  .table-oval.crowd-9, .table-oval.crowd-11 { aspect-ratio: 1.05 / 1; }
  .table-stage:has(.table-oval.crowd-9), .table-stage:has(.table-oval.crowd-11) { min-height: 47svh; }

  /* Own hole cards sit on the bottom of a short portrait oval and used to paint over the board
     (hero z-index 5 vs pot 3). The community cards have to win that overlap — you can still
     read your hand around/under the board, but the flop/turn/river stay in front. Landscape
     hangs the hole cards below the felt instead (see the orientation block below). */
  .seat[data-is-me="1"] > .seat-card { z-index: 2; }
  .pot-area { z-index: 6; }
  /* Same for the D/SB/BB badges: over the plaques, under the board. */
  .seat .dealer-btn, .seat .blind-btn, .seat .rebuys { z-index: 5; }
}

/* Phone landscape is its own layout, not a squeezed portrait or a half-desktop. Width is plentiful
   and height is the scarce axis (~360–430px on a typical iPhone), so: keep a single column (the
   journal stays a thin toggle under the actions — a side column here stole table width for a panel
   nobody has open mid-hand), flatten the oval so seats spread along the long sides instead of
   stacking on the caps, and spend the extra width on one action row. Portrait overlap of your own
   hole cards is a z-index issue (see .seat[data-is-me="1"]) and is not solved by rotating. */
@media (orientation: landscape) and (max-height: 520px) and (max-width: 1100px) {
  .table-page {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: .2em;
    padding: .12em .35em .12em;
  }
  .table-page:has(.log-sidebar.collapsed) { grid-template-rows: minmax(0, 1fr) auto; }
  .table-wrap { position: relative; gap: .15em; overflow: hidden; }
  .table-stage {
    min-height: 0;
    padding-top: .25em;
    /* Empty strip under the felt: own hole cards hang here so they don't sit on the board.
       A Xiaomi landscape viewport is short (~320–360px); without this the 2.6:1 oval hit
       max-height and CSS shrank its width, which is the "стол очень узкий" on a Note 13. */
    padding-bottom: 3.1em;
    overflow: visible;
  }
  .table-oval {
    width: min(1200px, 97%);
    aspect-ratio: 3.35 / 1;
    max-height: 100%;
    margin: 0;
    --rim: 8px;
  }
  .seat .seat-card { overflow: visible; }
  /* Name/stack stay on the rail; the two hole cards and the hand name drop below the oval. */
  .seat[data-is-me="1"] .hole {
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    margin-top: 3px;
    z-index: 2;
  }
  /* Beside the cards, not under them: the strip under the felt is only as tall as the cards. */
  .seat[data-is-me="1"] .hand-preview {
    position: absolute;
    left: calc(100% + 4px);
    top: calc(100% + 14px);
    white-space: nowrap;
    z-index: 2;
  }
  .chip-legend { display: none; }
  .unit-toggle { top: .15em; left: .25em; font-size: .62em; }

  .seat { width: 68px; }
  .seat-cam { width: 32px; height: 32px; border-width: 2px; }
  .seat .seat-card {
    padding: .18em .22em;
    border-width: 1px;
    border-radius: 10px;
    min-height: 0;
  }
  .seat-face, .seat-avatar-wrap, .seat-avatar { width: 16px; height: 16px; }
  .seat-face .champ-crown { font-size: 10px; }
  .seat-avatar.placeholder { font-size: .5em; }
  .seat .name { font-size: .55em; }
  .seat .stack { font-size: .5em; }
  .seat .hole { margin-top: .2em; gap: .15em; }
  .seat .dealer-btn, .seat .blind-btn { width: 12px; height: 12px; font-size: .42em; }
  .seat:has(> .dealer-btn) > .blind-btn { left: calc(-6px + 12px + 2px + var(--bx, 0px)); }
  .seat .rebuys { height: 12px; min-width: 12px; padding: 0 .2em; font-size: .42em; }
  .seat-no { font-size: .5em; right: 4px; bottom: 3px; }
  .hand-preview { font-size: .48em; padding: .02em .25em; }
  .playing-card { width: 20px; height: 28px; font-size: .54em; }
  .playing-card.big { width: 28px; height: 39px; font-size: .72em; }
  .table-oval.crowd-9 .seat { width: 58px; }
  .table-oval.crowd-9 .seat .name { font-size: .5em; }
  .table-oval.crowd-9 .seat .stack { font-size: .46em; }
  .table-oval.crowd-9 .playing-card { width: 17px; height: 24px; font-size: .48em; }
  .table-oval.crowd-9 .playing-card.big { width: 26px; height: 36px; font-size: .66em; }
  .table-oval.crowd-11 .seat { width: 52px; }
  .table-oval.crowd-11 .seat .name { font-size: .46em; }
  .table-oval.crowd-11 .seat .stack { font-size: .42em; }
  .table-oval.crowd-11 .playing-card { width: 15px; height: 21px; font-size: .44em; }
  .table-oval.crowd-11 .playing-card.big { width: 24px; height: 34px; font-size: .6em; }
  .empty-chair { width: 32px; height: 32px; font-size: .8em; }
  .empty-chair span { display: none; }
  .chip-pile.mini { width: 10px; height: 13px; }
  .chip.mini { width: 10px; height: 10px; }
  .pot-area { top: 38%; }
  .pot-amount { padding: .1em .5em; font-size: .68em; border-radius: 12px; }
  .blinds-banner { font-size: .68em; padding: .22em .55em; }
  .chip-pile.pot { width: 16px; height: 22px; }
  .chip.pot { width: 16px; height: 16px; bottom: calc(var(--i, 0) * 3px); }
  .community { gap: .25em; margin-top: .35em; }
  .seat-reaction { font-size: 1.5em; }
  .seat-reaction.sticker img, .seat-reaction.sticker video { height: .55em; max-width: 1.3em; }
  .seat-chip .chip-amt { font-size: .55em; padding: 0 .3em; }

  /* One tight header row — height is the budget, not width. */
  body.ingame .top { padding: .18em .4em; gap: .3em; flex-wrap: nowrap; }
  body.ingame .top h1 { font-size: .78em; }
  body.ingame .table-meta {
    font-size: .62em;
    flex-wrap: nowrap;
    overflow: hidden;
  }
  body.ingame .tm-chip { padding: .1em .4em; }
  body.ingame .top > button,
  body.ingame .top .hdr-menu-btn { font-size: .72em; padding: .2em .45em; }
  body.ingame .top .hdr-name,
  body.ingame .top .hdr-caret { display: none; }
  body.ingame .volume-ctl .vol-track { width: 40px; }
  body.ingame .hdr-profile { padding: .1em; }

  /* Stickers/preact used to sit in the page flow under the oval and ate the height the table
     needed. Park them as a vertical strip on the left of the felt instead. */
  .table-tools {
    position: absolute;
    left: 4px;
    top: 52%;
    transform: translateY(-50%);
    width: auto;
    max-height: 62%;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    gap: .25em;
    align-items: flex-start;
    z-index: 8;
    scrollbar-width: none;
  }
  .table-tools::-webkit-scrollbar { display: none; }
  .pack-row { flex-direction: column; width: auto; gap: .18em; }
  .pack-btn { width: 26px; height: 26px; }
  .pack-emoji-icon { font-size: 1.05em; }
  .pack-panel {
    left: calc(100% + 8px);
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    max-height: min(220px, 70vh);
  }
  .pack-panel::after {
    left: 0;
    top: 50%;
    transform: translate(-100%, -50%);
    border: 7px solid transparent;
    border-right-color: var(--panel);
    border-top-color: transparent;
  }
  .preact-bar { flex-direction: column; width: auto; gap: .15em; }
  .preact-btn { padding: .15em .4em; font-size: .65em; }

  /* Width lets fold/call/raise sit on the same line as the pot-% chips; all-in stays its own
     centred row underneath. Desktop/portrait keep the stacked 3-row bar. */
  .action-slot { min-height: 52px; }
  .action-bar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .2em .35em;
    padding: .22em .45em;
    width: min(980px, 98%);
  }
  .raise-pct-row { width: auto; flex: 0 0 auto; max-width: none; }
  .action-row { width: auto; flex: 1 1 120px; min-width: 0; }
  .allin-row { flex: 0 0 auto; }
  .action-bar #raisePreview { display: none; }
  .action-bar button { padding: .32em .65em; }
  .action-bar .pct-btn { flex: 0 0 auto; min-width: max-content; padding: .2em .45em; font-size: .72em; }
  .raise-pct-row kbd.hk { display: none; }
  .action-bar .amount { width: 3.8em; padding: .2em .15em; }
  .hint-line { font-size: .8em; }
  .log-toggle { padding: .28em; font-size: .85em; }
  .log-sidebar.collapsed .hist-guide { display: none; }
  .sidebar-col .hist-lessons { max-height: 7em; }
  .result-banner { padding: .35em .55em; }
  .result-banner .winner-line { font-size: 1.05em; }
  .result-banner .sub-line { font-size: .72em; }
}

.profile-overlay {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(10, 12, 18, .55);
  display: grid; place-items: center; padding: 16px;
  /* Without this, a tall achievements grid (24-28 badges) could overflow past the top/bottom of the
     viewport with no way to reach the rest of it — place-items: center has no built-in scrolling. */
  overflow-y: auto;
  grid-template-columns: minmax(0, 1fr); /* the column is the screen, never what the content wants (a wide table) */
  overflow-x: hidden; /* a phone's finger must not slide the whole window sideways */
  overscroll-behavior: contain;
}
.profile-card {
  background: var(--panel); border: 1px solid #3a3f4a; border-radius: 12px;
  padding: 1.4em 1.6em 1.2em; width: min(560px, 100%); max-width: 100%; position: relative;
  box-shadow: 0 8px 28px rgba(0,0,0,.45); text-align: center;
}
.profile-close { position: absolute; top: .5em; right: .5em; }
.profile-close:hover:not(:disabled) { background: #3a404c; color: #fff; filter: none; }
.profile-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45em;
  margin-bottom: 1em;
}
.profile-avatar-wrap {
  display: block;
  position: relative;
  width: 88px; height: 88px; flex-shrink: 0;
}
.profile-avatar {
  width: 88px; height: 88px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--gold); display: block;
  position: absolute; inset: 0;
}
.profile-avatar.placeholder {
  display: grid; place-items: center; font-size: 2.4em;
  background: var(--panel2); border-color: #3a3f4a; color: var(--gold);
}
.profile-avatar-hit {
  padding: 0; border: 0; background: none; line-height: 0;
  cursor: zoom-in; border-radius: 50%; min-height: 0;
}
.profile-avatar-hit:hover .profile-avatar { box-shadow: 0 0 0 3px var(--gold); }
.avatar-lightbox {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0, 0, 0, .82);
  display: grid; place-items: center;
  cursor: zoom-out; padding: 24px;
}
.avatar-lightbox img {
  max-width: min(92vw, 720px); max-height: 92vh;
  border-radius: 12px; object-fit: contain;
  box-shadow: 0 12px 48px rgba(0, 0, 0, .5);
}
.cam-lightbox video {
  width: min(72vw, 72vh);
  height: min(72vw, 72vh);
  max-width: 560px;
  max-height: 560px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(224, 176, 76, .75);
  box-shadow: 0 12px 48px rgba(0, 0, 0, .5);
  background: #111;
}
.cam-lightbox video.local { transform: scaleX(-1); }
.hdr-profile { display: inline-flex; align-items: center; gap: .4em; }
.hdr-avatar-wrap { position: relative; width: 22px; height: 22px; flex-shrink: 0; }
.hdr-avatar {
  width: 22px; height: 22px; border-radius: 50%; object-fit: cover;
  border: 1px solid #3a3f4a; display: block;
  position: absolute; inset: 0;
}
.hdr-avatar.placeholder {
  display: grid; place-items: center; font-size: .7em; font-weight: 700;
  background: var(--panel2); color: var(--gold);
}
.profile-card h2 { margin: .2em 0 .6em; }
.avatar-upload {
  display: inline-block; cursor: pointer; color: var(--accent);
  font-size: .85em; margin-bottom: .8em; text-decoration: underline;
}
.default-avatars {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .4em;
  margin-top: .5em;
}
.default-avatar {
  width: 34px; height: 34px; border-radius: 50%; font-size: 1.1em;
  border: 1px solid #3a3f4a; cursor: pointer; display: grid; place-items: center;
  line-height: 1; padding: 0; transition: transform .1s ease, border-color .1s ease;
}
.default-avatar:hover { transform: scale(1.08); border-color: var(--gold); }
.fighter-picker { margin-top: .7em; }
.fighter-picker-label { font-size: .8em; color: var(--muted); margin-bottom: .35em; }
.fighter-list { display: flex; flex-wrap: wrap; justify-content: center; gap: .4em; }
.fighter-btn {
  width: 44px; height: 44px; border-radius: 8px; overflow: hidden;
  border: 1px solid #3a3f4a; cursor: pointer; display: grid; place-items: center;
  line-height: 1; padding: 0; background: var(--panel2); transition: transform .1s ease, border-color .1s ease;
}
.fighter-btn:hover { transform: scale(1.08); border-color: var(--gold); }
.fighter-btn.active { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(224,176,76,.35); }
/* Shared by both the fighter picker (small, in a .fighter-btn) and the duel overlay (large, in
   .duel-fighter) — see main.js's fighterIconHtml. The emoji fallback is what's actually visible by
   default; the <img> only takes over once it's confirmed to have loaded (see the 'load' listener),
   so a fighter with no .gif dropped into public/img/fighters/ never shows a broken-image icon. */
.fighter-icon-wrap { position: relative; display: grid; place-items: center; width: 100%; height: 100%; }
.fighter-icon-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.fighter-icon-emoji { font-size: 1.3em; line-height: 1; }
.fighter-icon-emoji.fighter-emoji-fallback-hidden { display: none; }
.profile-stats { display: grid; gap: .35em; text-align: left; margin: 0; }
.profile-stats > div { display: flex; justify-content: space-between; gap: 1em; font-size: .92em; }
.profile-stats dt { color: var(--muted); }
.profile-stats dd { margin: 0; font-weight: 600; color: var(--gold); }
.profile-stats b { color: var(--gold); }
/* Title ladder + achievement showcase under the name, and sectioned stats (same layout as Monopoly's). */
.profile-title { font-size: .9em; font-weight: 700; color: var(--gold); }
.title-progress { width: min(260px, 100%); display: grid; gap: .2em; text-align: center; }
.title-progress-bar { height: 6px; border-radius: 3px; background: var(--panel2); border: 1px solid #3a3f4a; overflow: hidden; }
.title-progress-bar span { display: block; height: 100%; background: linear-gradient(90deg, #2ecc71, var(--gold)); }
.title-progress small { font-size: .72em; color: var(--muted); }
.ach-showcase { display: flex; flex-wrap: wrap; justify-content: center; gap: .4em; }
.ach-showcase.empty { font-size: .78em; color: var(--muted); }
.showcase-badge {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; padding: 6px;
  background: var(--panel2); border: 2px solid currentColor; box-sizing: border-box;
}
.showcase-badge svg { width: 100%; height: 100%; }
.showcase-badge:has(.ui-art) { padding: 3px; }
.showcase-badge.tier-easy { color: #cd7f32; }
.showcase-badge.tier-medium { color: #c0c0c0; }
.showcase-badge.tier-hard { color: #ffd700; box-shadow: 0 0 10px rgba(255, 215, 0, .45); }
.showcase-badge.tier-impossible { color: #e879f9; box-shadow: 0 0 12px rgba(232, 121, 249, .6); }
.profile-section { text-align: left; margin-top: .9em; }
.profile-section h4 { margin: 0 0 .4em; font-size: .75em; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.profile-hero {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .6em;
  margin-bottom: 1em;
}
.hero-stat {
  background: var(--panel2); border: 1px solid #3a3f4a; border-radius: 10px;
  padding: .6em .3em; text-align: center;
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
  min-width: 0;
}
.hero-val {
  font-size: 1.35em; font-weight: 700; color: var(--gold); line-height: 1.15;
  min-height: 2.5em; /* two lines, so a wrapped style name and a one-line number share one band */
  display: flex; align-items: center; justify-content: center; width: 100%;
  font-variant-numeric: tabular-nums; text-align: center;
}
.hero-val.long { font-size: .98em; line-height: 1.15; min-height: calc(2.5em * 1.35 / 0.98); overflow-wrap: break-word; }
.hero-label { font-size: .68em; color: var(--muted); margin-top: .2em; line-height: 1.25; }
.hero-meter { height: 14px; display: flex; align-items: center; margin: .28em .2em 0; }
.hero-rank, .hero-zero {
  position: relative; height: 6px; width: 100%; border-radius: 99px; background: #3e4554; overflow: hidden;
}
.hero-rank > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #2ecc71, var(--gold)); }
.hero-zero::after {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px;
  background: rgba(255, 255, 255, .72); z-index: 1;
}
.hero-zero > span { position: absolute; top: 0; height: 100%; }
.hero-zero > span.pos { left: 50%; background: var(--gold); }
.hero-zero > span.neg { right: 50%; background: #ff9a8f; }

.profile-tabs { display: flex; gap: .4em; margin-bottom: .9em; border-bottom: 1px solid #3a3f4a; }
.profile-tab {
  flex: 1; background: none; border: none; color: var(--muted); cursor: pointer;
  padding: .5em .4em; font-size: .85em; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.profile-tab.active { color: var(--gold); border-bottom-color: var(--gold); font-weight: 600; }
.profile-tab { border-radius: 8px 8px 0 0; } /* a straight underline (the button's round corners bent it) */
.profile-tab:hover:not(.active) { color: var(--text); background: rgba(255, 255, 255, .05); border-bottom-color: #5a6170; filter: none; }

.ach-progress { color: var(--muted); font-size: .8em; text-align: center; margin-bottom: .7em; }
.ach-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: .6em;
  max-height: 46vh; overflow-y: auto; padding: .1em;
}
.ach-badge {
  display: flex; flex-direction: column; align-items: center; gap: .15em;
  padding: .5em .3em .4em; border-radius: 10px; border: 1px solid #3a3f4a;
  background: var(--panel2); cursor: default;
}
.ach-icon { width: 34px; height: 34px; }
.ach-icon svg { width: 100%; height: 100%; }
.ui-art { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.ach-icon .ui-art, .showcase-badge .ui-art { width: 100%; height: 100%; }
.ach-badge.unlocked .ach-icon .ui-art { filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.ach-name { font-size: .65em; font-weight: 600; text-align: center; line-height: 1.15; }
.ach-tier { font-size: .55em; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }

.ach-badge.locked { opacity: .55; color: #6b7280; }
.ach-badge.locked .ach-icon { filter: grayscale(1) brightness(.7); }
.ach-badge.unlocked { color: var(--gold); border-color: currentColor; box-shadow: 0 0 10px rgba(224,176,76,.25); }
.ach-badge.unlocked.tier-easy { color: #cd7f32; }
.ach-badge.unlocked.tier-medium { color: #c0c0c0; }
.ach-badge.unlocked.tier-hard { color: #ffd700; }
.ach-badge.unlocked.tier-impossible { color: #e879f9; box-shadow: 0 0 14px rgba(232, 121, 249, .5); }
.ach-badge.tier-impossible .ach-tier { color: #e879f9; }
.ach-badge.unlocked .ach-name { color: #f2f2f2; }

.fav-hand {
  display: flex; align-items: center; gap: .8em; margin-bottom: 1em;
  background: var(--panel2); border: 1px solid #3a3f4a; border-radius: 10px; padding: .6em .8em;
}
.fav-hand-cards { display: flex; gap: .3em; flex-shrink: 0; }
.fav-hand-info { text-align: left; }
.fav-hand-title { font-size: .78em; font-weight: 600; }
.fav-hand-stats { font-size: .72em; color: var(--muted); margin-top: .15em; }
.nemesis-card {
  display: flex; flex-direction: column; gap: .3em; margin-bottom: 1em;
  background: var(--panel2); border: 1px solid #3a3f4a; border-radius: 10px; padding: .6em .8em;
  text-align: left; font-size: .85em;
}
.nemesis-row b { color: var(--gold); }

.hist-filter:not(.seg) { display: flex; gap: .4em; margin-bottom: .5em; }
.hist-filter .mini.active { background: var(--gold, #d4a93a); color: #1a1a1a; }
.hist-fav { font-size: 1.1em; line-height: 1; padding: .2em .45em; color: var(--muted); }
.hist-fav.on { color: #f5c542; }
.hist-list { display: flex; flex-direction: column; gap: .5em; max-height: 46vh; overflow-y: auto; padding: .1em; }
.hist-row {
  display: flex; align-items: center; gap: .6em; padding: .5em .6em;
  background: var(--panel2); border-radius: 8px; border-left: 3px solid transparent;
}
.hist-row.won { border-left-color: #3fae5c; }
.hist-row.lost { border-left-color: #b94a4a; }
.hist-cards, .hist-community { display: flex; gap: .2em; flex-shrink: 0; }
.hist-info { flex: 1; text-align: left; min-width: 0; }
.hist-amount { font-weight: 800; font-size: 1.05em; }
.hist-row.won .hist-amount { color: #4fce72; }
.hist-row.lost .hist-amount { color: #e07a7a; }
.hist-meta { font-size: .78em; color: var(--muted); margin-top: .15em; white-space: nowrap; }
/* Wide enough for a history row to stay on one line — hole cards, "+1234", the longest meta line
   ("старшая карта · соперников: 11"), the board and the replay button. On a phone the row wraps
   instead (see .hist-row's flex-wrap). */
.profile-card.profile-main { width: min(720px, 100%); }

/* ---------- the profile (A+, profileModalHtml / pf* in main.js): the player's card on the left, tabs on the right ---------- */
.profile-card.pf-a { width: min(1080px, 100%); padding: 0; text-align: left; --pf-line: #343944; }
.pf-a .profile-close { /* square, centred on the tab row (it used to hang over the line under it) */
  z-index: 2; top: 8px; right: 10px; width: 32px; height: 32px; min-height: 0; padding: 0;
  display: grid; place-items: center; line-height: 1;
}
.pf-grid { display: grid; grid-template-columns: 330px minmax(0, 1fr); }
.pf-side { padding: 18px; border-right: 1px solid var(--pf-line); }
.pf-sticky { position: sticky; top: 0; } /* the card stays in view while the right column scrolls (the overlay is the scroller) */
.pf-main { min-width: 0; }
.pf-a .profile-tabs { margin: 0; padding: 6px 48px 0 14px; }
.pf-a .profile-tab { flex: none; padding: .7em .8em; white-space: nowrap; }
.pf-body { padding: 16px 18px 20px; display: grid; gap: 16px; align-content: start; }
.pf-body > .levels-panel { margin: 0; }
.pf-h { margin: 0 0 8px; font-size: .75em; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pf-h small, .pf-h .link-btn { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 1.15em; }
.pf-a .pos { color: #4cc38a; }
.pf-a .neg { color: #e5616b; }

/* the card */
.pf-plate {
  position: relative; border-radius: 16px; padding: 18px 16px 16px; text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(255, 207, 90, .22), transparent 60%), linear-gradient(160deg, #2a2418, #1d1b17);
  border: 2px solid var(--gold); box-shadow: inset 0 0 0 4px rgba(0, 0, 0, .25), 0 6px 18px rgba(0, 0, 0, .4);
}
.pf-lvl { position: absolute; top: 10px; left: 10px; width: 46px; height: 46px; padding: 0; border: 0; background: none; min-height: 0; cursor: pointer; }
.pf-lvl .lvl-ico, .pf-lvl .lvl-emoji { width: 100%; height: 100%; font-size: 30px; line-height: 46px; }
.pf-elo { position: absolute; top: 10px; right: 10px; display: block; width: 40px; height: 40px; padding: 0; border: 0; background: none; min-height: 0; cursor: pointer; }
.pf-elo .lvl-ico, .pf-elo .pf-rank-ico, .pf-elo .lvl-emoji { width: 40px; height: 40px; }
.lvl-ico.dim, .lvl-emoji.dim { opacity: .45; }
.pf-avwrap { position: relative; width: 132px; height: 132px; margin: 6px auto 10px; }
.pf-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.pf-ring circle { fill: none; stroke-width: 5; }
.pf-ring .track { stroke: rgba(255, 255, 255, .08); }
.pf-ring .fill { stroke: #ffcf5a; stroke-linecap: round; }
.pf-avwrap .profile-avatar-hit { position: absolute; inset: 9px; }
.pf-avwrap .profile-avatar-wrap { position: absolute; inset: 9px; width: auto; height: auto; }
.pf-avwrap .profile-avatar-hit .profile-avatar-wrap { inset: 0; }
.pf-avwrap .profile-avatar { width: 100%; height: 100%; border: 0; }
.pf-avwrap .profile-avatar.placeholder { font-size: 3em; }
.pf-name { font-size: 24px; font-weight: 800; margin: 0; line-height: 1.15; overflow-wrap: anywhere; }
.pf-a .champ-line { font-size: .75em; color: var(--gold); margin-top: 2px; }
.pf-title { color: #ffcf5a; font-weight: 700; margin-top: 2px; padding: 0; border: 0; background: none; min-height: 0; cursor: pointer; font-size: 1em; }
.pf-next { font-size: 12px; color: var(--muted); margin-top: 4px; }
.pf-style { display: flex; gap: 10px; align-items: center; margin-top: 14px; padding: 10px; border-radius: 12px; background: rgba(0, 0, 0, .25); text-align: left; }
.pf-style .pf-style-img { width: 46px; height: 46px; flex: none; }
.pf-style > div { flex: 1; min-width: 0; }
.pf-style b { display: block; }
.pf-style > div > span { font-size: 12px; color: var(--muted); }
.pf-bars { display: grid; gap: 5px; margin-top: 8px; }
.pf-bars > div { display: grid; grid-template-columns: 52px 1fr 42px; gap: 6px; align-items: center; font-size: 11px; color: var(--muted); }
.pf-bars .tr { position: relative; height: 6px; background: #2d323c; border-radius: 3px; }
.pf-bars .tr em { position: absolute; top: 0; bottom: 0; background: rgba(76, 195, 138, .3); border-radius: 3px; }
.pf-bars .tr i { position: absolute; top: -3px; width: 4px; height: 12px; border-radius: 2px; background: #ffcf5a; transform: translateX(-50%); }
.pf-bars b { text-align: right; color: var(--text); font-weight: 600; }
/* the favourite hand: its own row, two real cards in the viewer's card look, fanned, with the win share */
.pf-fav { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 12px 10px 8px; border-radius: 12px; text-align: left;
  background: radial-gradient(circle at 18% 50%, rgba(255, 207, 90, .22), transparent 55%), rgba(0, 0, 0, .25); border: 1px solid rgba(255, 207, 90, .35); }
.pf-fav-cards { position: relative; flex: none; width: 84px; height: 72px; }
.pf-fav-cards .playing-card { position: absolute; top: 2px; width: 48px; height: 67px; font-size: 1.05em; box-shadow: 0 4px 10px rgba(0, 0, 0, .5), 0 0 14px rgba(255, 207, 90, .35); }
.pf-fav-cards .playing-card:first-child { left: 2px; transform: rotate(-9deg); }
.pf-fav-cards .playing-card:last-child { left: 33px; transform: rotate(8deg) translateY(2px); }
.pf-fav-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.pf-fav-txt small { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.pf-fav-txt b { font-size: 22px; color: #ffcf5a; letter-spacing: .02em; }
.pf-fav-txt span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.pf-fav-pct { flex: none; text-align: center; line-height: 1.1; }
.pf-fav-pct b { display: block; font-size: 20px; color: #4cc38a; }
.pf-fav-pct small { font-size: 11px; color: var(--muted); }
.pf-sig { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.pf-sig > * { padding: 8px 4px; border-radius: 10px; background: rgba(0, 0, 0, .25); text-align: center; font-size: 11px; color: var(--muted); border: 0; min-height: 0; line-height: 1.3; min-width: 0; }
.pf-sig b { display: block; font-size: 15px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-sig-btn { cursor: pointer; font: inherit; font-size: 11px; }
.pf-sig-btn:hover { background: rgba(255, 255, 255, .06); }
.pf-show { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 14px; }
.pf-show > span { aspect-ratio: 1; border-radius: 10px; background: rgba(0, 0, 0, .3); border: 1px solid currentColor; display: grid; place-items: center; padding: 4px; }
.pf-show .ui-art { width: 100%; height: 100%; }
.pf-show .tier-easy { color: #cd7f32; } .pf-show .tier-medium { color: #c0c0c0; }
.pf-show .tier-hard { color: #ffd700; } .pf-show .tier-impossible { color: #e879f9; }
.pf-show.empty { display: block; font-size: .78em; color: var(--muted); }
.pf-btns { display: flex; gap: 6px; margin-top: 14px; }
.pf-btns:empty { display: none; }
.pf-btns .mini { flex: 1; padding: 8px; }
.pf-side .profile-edit { margin-top: 12px; }
.pf-more { margin-top: 12px; padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, .22); border: 1px solid var(--pf-line); display: grid; gap: 12px; }
.pf-more h4 { margin: 0 0 6px; font-size: .72em; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pf-elo-line { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--muted); }
.pf-elo-line b { font-size: 16px; color: var(--text); }
.pf-elo-line b.pos { color: #7dcea0; }
.pf-elo-line b.neg { color: #e77980; }
.pf-form-block.down .pf-spark polyline { stroke: #e77980; }
.pf-elo-line em { font-style: normal; font-weight: 700; }
.pf-spark { display: block; width: 100%; height: 40px; margin-top: 4px; }
.pf-spark polyline { fill: none; stroke: #ffcf5a; stroke-width: 1.6; }
.pf-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(3.1em, 1fr)); gap: 3px; }
.pf-form span { padding: 4px 1px; border-radius: 6px; text-align: center; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; background: #2d323c; color: var(--muted); }
.pf-form span.pos { background: rgba(76, 195, 138, .18); color: #7dcea0; }
.pf-form span.neg { background: rgba(229, 97, 107, .16); color: #e77980; }
.pf-acad { display: flex; gap: 10px; align-items: center; text-align: left; padding: 0; border: 0; background: none; min-height: 0; color: inherit; font: inherit; }
button.pf-acad { cursor: pointer; }
.pf-acad img { width: 40px; height: 40px; flex: none; }
.pf-acad b { display: block; font-size: 13px; }
.pf-acad small { color: var(--muted); font-size: 11px; }

/* «Обзор» */
.pf-lines { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pf-line { display: flex; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--pf-line); }
.pf-line .pf-line-img { width: 34px; height: 34px; flex: none; }
.pf-line > div > b { display: block; font-size: 14px; }
.pf-line > div > span { color: var(--muted); font-size: 12px; }
.pf-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pf-kpi > div { position: relative; padding: 12px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--pf-line); min-width: 0; }
.pf-kpi > div > b { display: block; font-size: 22px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.pf-kpi small { color: var(--muted); font-size: 12px; }
.pf-kpi .pf-of { color: var(--muted); font-size: 14px; font-weight: 400; }
.pf-kpi .info-btn { position: absolute; top: 8px; right: 8px; }
.pf-kpi .ic { width: 1em; height: 1em; vertical-align: -.1em; }
.pf-rec { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pf-rec > div { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--pf-line); min-width: 0; }
.pf-rec .pf-rec-img { width: 40px; height: 40px; flex: none; }
.pf-rec b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.pf-rec small { color: var(--muted); font-size: 12px; }
.pf-combo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } /* three a row: six in one squeezed the cards to ~95 px */
/* the cards are drawn on ivory: green felt under them, like the table */
.pf-combo > div { padding: 10px 6px 8px; border-radius: 12px; text-align: center; color: #f3efe2; background: radial-gradient(120% 90% at 50% 30%, #23744c, #124430 75%); border: 1px solid rgba(255, 255, 255, .08); box-shadow: inset 0 0 18px rgba(0, 0, 0, .35), 0 3px 8px rgba(0, 0, 0, .35); min-width: 0; }
.pf-combo > div.zero { filter: grayscale(1) brightness(.6); }
.pf-combo .pf-combo-img { display: block; width: 100%; max-width: 200px; height: 74px; margin: 0 auto 6px; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .4)); }
.pf-combo b { display: block; font-size: 20px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pf-combo small { font-size: 11px; color: rgba(243, 239, 226, .75); white-space: nowrap; }

/* «Игра и стиль» */
.pf-body .lvl-note { font-size: .78em; margin: 0; line-height: 1.4; }
.pf-panel { padding: 14px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--pf-line); min-width: 0; }
.pf-panel.lvl-graph { margin: 0; padding: 10px 12px 6px; }
.pf-web-acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.pf-web-acts .style-help-btn { margin-left: 0; font-size: .82em; padding: .4em .8em; border: 1px solid #3a404c; }
.pf-box .pf-h .ic { width: 1.1em; height: 1.1em; vertical-align: -.15em; }
.pf-panel .play-tips, .pf-panel .style-help { margin-top: 12px; }
.pf-web { display: flex; gap: 18px; align-items: center; }
.pf-radar { flex: none; overflow: visible; }
.pf-radar .ring { fill: none; stroke: #3a404c; }
.pf-radar .zone { fill: rgba(76, 195, 138, .16); stroke: rgba(76, 195, 138, .55); stroke-dasharray: 3 3; }
.pf-radar .hole { fill: var(--panel2); }
.pf-radar .me { fill: rgba(255, 207, 90, .25); stroke: #ffcf5a; stroke-width: 2; }
.pf-radar circle { fill: #ffcf5a; }
.pf-radar text { fill: #aab; font-size: 10px; }
.pf-legend { display: grid; gap: 8px; flex: 1; min-width: 0; font-size: 13px; }
.pf-leg { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; }
.pf-leg > span { color: var(--muted); }
.pf-leg > b { font-variant-numeric: tabular-nums; }
.pf-leg.good > b { color: #4cc38a; } .pf-leg.ok > b { color: #e6c27a; } .pf-leg.bad > b { color: #e5616b; }
.pf-leg p { grid-column: 1 / -1; margin: 1px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.35; }
.pf-leg p i { font-style: normal; opacity: .75; }
.pf-leg p i:not(:first-child)::before { content: ' · '; }
.pf-legend .hint { font-size: 11px; }
.pf-pos { display: grid; gap: 8px; }
.pf-pos > div { display: grid; grid-template-columns: 150px 1fr 60px; gap: 10px; align-items: center; font-size: 13px; }
.pf-pos small { display: block; color: var(--muted); font-size: 11px; }
.pf-pos .tr { position: relative; height: 10px; background: #2d323c; border-radius: 5px; }
.pf-pos .tr::after { content: ''; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: #556; }
.pf-pos .tr i { position: absolute; top: 0; bottom: 0; border-radius: 5px; background: #4cc38a; }
.pf-pos .tr i.neg { background: #e5616b; }
.pf-pos b { text-align: right; font-variant-numeric: tabular-nums; }
.pf-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pf-box { padding: 12px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--pf-line); display: flex; flex-direction: column; min-width: 0; }
.pf-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; flex: 1; }
.pf-tiles > div { padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, .22); display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.pf-tiles small { color: var(--muted); font-size: 11px; line-height: 1.2; }
.pf-tiles b { font-size: 16px; line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pf-luck { display: grid; grid-template-rows: 1fr auto; gap: 6px; flex: 1; }
.pf-luck .hero { position: relative; border-radius: 10px; background: rgba(0, 0, 0, .22); display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.pf-luck .hero .info-btn { position: absolute; top: 6px; right: 6px; }
.pf-luck .pf-luck-img { width: 56px; height: 56px; flex: none; }
.pf-luck .hero b { display: block; font-size: 28px; line-height: 1; }
.pf-luck .hero small { color: var(--muted); font-size: 12px; }

/* the list that evens the two columns */
.pf-fill { display: grid; gap: 4px; }
.pf-fill[hidden], .pf-row[hidden] { display: none; }
.pf-side .pf-fill { margin-top: 12px; padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, .22); border: 1px solid var(--pf-line); }
.pf-fill .pf-h { margin-bottom: 4px; }
.pf-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 22px; gap: 10px; align-items: center; height: 38px; padding: 0 10px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--pf-line); font: inherit; font-size: 13px; color: inherit; text-align: left; width: 100%; box-sizing: border-box; min-height: 0; }
button.pf-row { cursor: pointer; }
button.pf-row:hover { border-color: #4a5160; }
.pf-side .pf-row { background: rgba(255, 255, 255, .03); }
.pf-what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-what small { color: var(--muted); margin-left: 6px; }
.pf-row > b { font-weight: 700; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pf-play { color: var(--muted); text-align: center; }
.pf-row.ach { grid-template-columns: 26px minmax(0, 1fr) auto; }
.pf-ach { width: 26px; height: 26px; }
.pf-date { color: var(--muted); font-size: 11px; }
.pf-a .hist-meta { overflow: hidden; text-overflow: ellipsis; } /* the right column is a little narrower than the old window */

/* «Достижения» */
.pf-ach-sum { display: flex; gap: 16px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--pf-line); flex-wrap: wrap; }
.pf-ach-total { flex: 1 1 220px; min-width: 0; }
.pf-ach-total > b { font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.pf-ach-total > b small { font-size: 16px; color: var(--muted); font-weight: 600; }
.pf-ach-total > span { margin-left: 8px; color: var(--muted); font-size: 13px; }
.pf-ach-bar { height: 8px; margin-top: 10px; border-radius: 4px; background: #2d323c; overflow: hidden; }
.pf-ach-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #cd7f32, #ffd700); }
.pf-ach-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pf-ach-chip { --t: #8a909c; display: flex; flex-direction: column; align-items: center; min-width: 74px; padding: 6px 8px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--t) 45%, transparent); background: color-mix(in srgb, var(--t) 10%, transparent); font-size: 11px; color: var(--muted); }
.pf-ach-chip b { font-size: 15px; color: var(--t); font-variant-numeric: tabular-nums; }
.pf-ach-chip.full b::after { content: ' ✓'; }
.t-easy { --t: #cd7f32; } .t-medium { --t: #c9ced6; } .t-hard { --t: #ffd700; } .t-impossible { --t: #e879f9; } .t-academy { --t: #4cc38a; }
.pf-ach-h, .pf-hist-h { justify-content: flex-start; align-items: center; }
.pf-ach-h { color: var(--t); }
.pf-ach-h span, .pf-hist-h > span { color: var(--muted); font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 12px; }
.pf-ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 8px; }
.pf-achc { --t: #8a909c; display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--pf-line); min-width: 0; }
.pf-achc.on { border-color: color-mix(in srgb, var(--t) 55%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--t) 13%, var(--panel2)), var(--panel2) 70%); }
.pf-ach-ic { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(0, 0, 0, .25); }
.pf-achc.on .pf-ach-ic { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 50%, transparent), 0 0 12px color-mix(in srgb, var(--t) 25%, transparent); }
.pf-ach-ic .ui-art { width: 38px; height: 38px; }
.pf-achc.on .pf-ach-ic .ui-art { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }
.pf-achc:not(.on) .pf-ach-ic { filter: grayscale(1) brightness(.75); opacity: .7; }
.pf-ach-txt { min-width: 0; flex: 1; }
.pf-ach-txt b { display: block; font-size: 13px; line-height: 1.2; }
.pf-achc:not(.on) .pf-ach-txt b { color: #b6bbc5; }
.pf-ach-txt small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 11.5px; line-height: 1.3; }
.pf-ach-when { display: inline-flex; align-items: center; gap: 4px; margin-top: 5px; font-size: 11px; font-weight: 700; color: var(--t); }
.pf-ach-when .ic { width: 11px; height: 11px; }
.pf-achc .ach-prog { margin-top: 6px; height: 10px; }
.pf-ach-grid.near .pf-achc { border-style: dashed; border-color: #565d6b; }

/* «История» */
.pf-tables { display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; padding: 10px 14px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--pf-line); color: inherit; font: inherit; text-align: left; cursor: pointer; min-height: 0; }
.pf-tables:hover { border-color: #4a5160; }
.pf-tables .ic { width: 26px; height: 26px; flex: none; }
.pf-tables span { flex: 1; min-width: 0; }
.pf-tables b { display: block; font-size: 14px; }
.pf-tables small { color: var(--muted); font-size: 12px; }
.pf-tables em { font-style: normal; font-size: 22px; color: var(--muted); }
.pf-hist-h { display: flex; align-items: center; gap: 8px; }
.pf-hist-h .ic { width: 1.1em; height: 1.1em; }
.pf-hist-h .mini { margin-left: auto; font-size: 12px; text-transform: none; letter-spacing: 0; white-space: nowrap; }
.pf-moments { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.pf-moment { --k: #f5c542; display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--k) 40%, transparent); background: radial-gradient(130% 120% at 0% 0%, color-mix(in srgb, var(--k) 16%, transparent), transparent 60%), var(--panel2); min-width: 0; }
.pf-moment.k-royal, .pf-moment.k-sflush { --k: #e879f9; } .pf-moment.k-quads { --k: #6cc6ff; } .pf-moment.k-comeback { --k: #ff8a3d; }
.pf-moment.k-bluff { --k: #b18cff; } .pf-moment.k-ko2 { --k: #e5616b; } .pf-moment.k-record { --k: #ffd700; } .pf-moment.k-72o { --k: #9bd36a; }
.pf-moment-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.pf-moment-cards { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.pf-moment-foot { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pf-moment-foot > b { font-size: 18px; font-variant-numeric: tabular-nums; }
.pf-moment-foot > span { flex: 1; min-width: 0; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-moment-foot .pos, .hist-amount.pos { color: #4fce72; } .pf-moment-foot .neg { color: #e07a7a; }
.pf-tag { --k: #f5c542; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--k); background: color-mix(in srgb, var(--k) 14%, transparent); border: 1px solid color-mix(in srgb, var(--k) 40%, transparent); white-space: nowrap; }
.pf-tag.k-royal, .pf-tag.k-sflush { --k: #e879f9; } .pf-tag.k-quads { --k: #6cc6ff; } .pf-tag.k-comeback { --k: #ff8a3d; } .pf-tag.k-bluff { --k: #b18cff; }
.pf-tag.k-ko2, .pf-tag.k-badbeat { --k: #e5616b; } .pf-tag.k-record { --k: #ffd700; } .pf-tag.k-72o { --k: #9bd36a; }
.hist-info > .pf-tag { font-size: 11px; padding: 0 6px; margin-top: 2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; box-sizing: border-box; }
.pf-hist-note { margin: 8px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.pf-a .hist-list { max-height: none; overflow: visible; }

/* one column: a phone, or a narrow window */
@media (max-width: 860px) {
  .pf-grid { grid-template-columns: minmax(0, 1fr); }
  .pf-side { border-right: 0; border-bottom: 1px solid var(--pf-line); padding: 44px 12px 12px; } /* room for ✕ above the card */
  .pf-sticky { position: static; }
  .pf-body { padding: 12px; }
  .pf-a .profile-tabs { overflow-x: auto; scrollbar-width: none; padding-left: 8px; padding-right: 8px; }
  .pf-lines, .pf-boxes { grid-template-columns: minmax(0, 1fr); }
  .pf-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-rec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-combo { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pf-web { flex-direction: column; }
  .pf-pos > div { grid-template-columns: 110px 1fr 52px; }
}
@media (max-width: 480px) {
  .profile-card.pf-a { border-radius: 0; }
  .pf-rec > div { padding: 8px; gap: 8px; }
  .pf-rec .pf-rec-img { width: 32px; height: 32px; }
  .pf-combo .pf-combo-img { height: 54px; }
  .pf-kpi > div > b { font-size: 19px; }
  .pf-row .hist-community { display: none; } /* the board leaves no room for the hand's name */
}
.hist-community { opacity: .85; }
.hist-community .playing-card, .hist-cards .playing-card { width: 34px; height: 47px; font-size: .78em; }
/* At this size a corner-positioned index reads as a stray number in the corner of an otherwise
   blank card — journal, history and replay lists keep rank+suit stacked in the centre. */
.hist-community .pip.tl,
.hist-cards .pip.tl,
.log-cards .pip.tl,
.rp-board .pip.tl,
.rp-hole .pip.tl {
  position: static;
  font-size: 1.05em;
  line-height: 1.1;
}
.hist-community .pip.tl small,
.hist-cards .pip.tl small,
.log-cards .pip.tl small,
.rp-board .pip.tl small,
.rp-hole .pip.tl small { font-size: .95em; margin-top: 1px; }

/* Named-sprite fatality above the winner plaque — see main.js's showDuelAnimation. Appended to
   <body> (not the re-rendered table) and laid out over .table-oval, from its top edge down to the
   result banner, so cards/chips/seats paint underneath. pointer-events none so "Показать карты"
   stays clickable. */
.fatality-layer {
  position: fixed;
  z-index: 32;
  pointer-events: none;
  overflow: visible;
  animation: fatalityIn .28s ease-out;
}
/* Not laid out yet (the table was mid-shake/zoom): a layer without its size would paint the
   fighters at their natural size for a frame. See layoutFatalityLayer(). */
.fatality-layer.pending { visibility: hidden; }
.fatality-layer.editing {
  pointer-events: auto;
  z-index: 36;
  user-select: none;
  cursor: default;
}
/* Sized and placed by layoutFatalityLayer(): the editor's proportions, fitted in, on the bottom edge. */
.fatality-stage {
  position: absolute;
  bottom: 0;
}
.fatality-fighter.free {
  left: auto;
  right: auto;
  width: auto;
  justify-content: center;
  cursor: grab;
  /* Every frame snaps exactly to its editor placement. Easing the position while the sprite and
     its size switch at once showed, mid-move, a figure nobody placed (a lying sprite at the
     standing spot and angle). */
  transition: none;
}
.fatality-fighter.free:active { cursor: grabbing; }
.fatality-layer.editing .fatality-fighter.free,
.fatality-fighter.free.no-anim {
  transition: none !important;
}
/* Editor poses are the animation. Old lunge/bob/drop keyframes offset those coords. */
.fatality-fighter.free .fatality-sprite,
.fatality-fighter.free.idle .fatality-sprite,
.fatality-fighter.free.downed .fatality-sprite,
.fatality-fighter.free.winding .fatality-sprite,
.fatality-fighter.free.bracing .fatality-sprite,
.fatality-fighter.free.striking .fatality-sprite,
.fatality-fighter.free.recoiling .fatality-sprite {
  animation: none !important;
}
.fatality-fighter.free .fatality-flip { height: 100%; }
/* Never shrink to fit — the sprite keeps its own aspect wherever the fighter stands (see applyFighterFree). */
.fatality-fighter.free .fatality-flip,
.fatality-fighter.free .fatality-sprite,
.fatality-fighter.free img { flex-shrink: 0; }
.fatality-fighter.free img {
  object-position: center bottom;
  pointer-events: none;
}
/* ---------- victory poses (see VICTORY_ART in main.js) ---------- */
.fatality-fighter.victory { z-index: 3; }
.victory-body {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform-origin: 50% 100%;
  isolation: isolate;
  will-change: transform;
}
.victory-body img { height: 100%; width: auto; }
.v-aura {
  position: absolute;
  left: 50%; top: 52%;
  width: 150%; height: 105%;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 214, 102, .55), rgba(255, 190, 60, .18) 55%, transparent 75%);
  z-index: -1;
  pointer-events: none;
  opacity: .65;
}
.v-live .v-aura { animation: vAura 2.6s ease-in-out infinite alternate; }
.v-champion .v-aura { background: radial-gradient(closest-side, rgba(255, 224, 120, .8), rgba(255, 190, 60, .3) 55%, transparent 78%); }
@keyframes vAura { from { opacity: .45; transform: translate(-50%, -50%) scale(.94); } to { opacity: .9; transform: translate(-50%, -50%) scale(1.05); } }
.v-crown {
  position: absolute;
  font-size: calc(var(--vpx, 300px) * .12);
  line-height: 1;
  /* --crown-rot tilts the crown per fighter (a sideways head, karatel's freeze): the studio's 👑⟲/⟳ */
  transform: translate(-50%, -84%) rotate(calc(-6deg + var(--crown-rot, 0deg)));
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5));
  pointer-events: none;
  z-index: 2;
}
.v-live.v-champion .v-crown { animation: vCrown 2.2s ease-in-out .7s infinite alternate; }
@keyframes vCrown {
  from { transform: translate(-50%, -84%) rotate(calc(-6deg + var(--crown-rot, 0deg))); }
  to { transform: translate(-50%, -92%) rotate(calc(3deg + var(--crown-rot, 0deg))); }
}
.v-drip {
  position: absolute;
  width: calc(var(--vpx, 300px) * .011);
  height: calc(var(--vpx, 300px) * .02);
  border-radius: 50% 50% 50% 50% / 35% 35% 65% 65%;
  background: radial-gradient(circle at 40% 70%, #d01818, #7a0606);
  pointer-events: none;
  z-index: 2;
}
.v-smoke {
  position: absolute;
  width: calc(var(--vpx, 300px) * .06);
  height: calc(var(--vpx, 300px) * .06);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(190, 190, 190, .75), rgba(160, 160, 160, 0) 70%);
  filter: blur(2px);
  pointer-events: none;
  z-index: 2;
}
.fx-fall {
  position: absolute;
  pointer-events: none;
  z-index: 6;
  backface-visibility: visible;
  will-change: transform;
}
.fx-fall-card {
  width: 24px; height: 34px;
  box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
  color: #111;
  font: 700 11px/1 system-ui, sans-serif;
  font-style: normal;
}
.fx-fall-card.red { color: #d22; }
.fx-fall-chip {
  width: 22px; height: 22px;
  transform-style: preserve-3d;
}
.fx-fall-chip img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
/* Idle loops — on the body, so the crown, drops and smoke move with it. Everyone breathes. */
.v-live .victory-body { animation: vBreathe 1.7s ease-in-out .52s infinite alternate; }
@keyframes vBreathe { from { transform: none; } to { transform: scale(.995, 1.018); } }
.v-live.v-leoj .victory-body { animation: vPush 2.4s ease-in-out .52s infinite; }
@keyframes vPush { 0%, 100% { transform: none; } 50% { transform: scale(1.025) translateY(-.6%); } }
.v-live.v-maxgorox .victory-body { animation: vBreathe 2.2s ease-in-out .52s infinite alternate; }
.v-live.v-sukharik1337 .victory-body { animation: vHover .9s ease-in-out .52s infinite alternate; }
@keyframes vHover { from { transform: translateY(0); } to { transform: translateY(-5%); } }
.v-live.v-tvoevyma .victory-body { animation: vLaugh .34s ease-in-out .52s infinite alternate; }
@keyframes vLaugh { from { transform: rotate(-1.3deg); } to { transform: rotate(1.3deg) translateY(-1%); } }
.v-live.v-svg .victory-body { animation: vPoint 1.6s ease-out .52s infinite; }
@keyframes vPoint { 0%, 55%, 100% { transform: none; } 66% { transform: scale(1.04) translateX(1%); } 78% { transform: scale(1.01); } }
.v-live.v-delovoikabanchik .victory-body,
.v-live.v-chupanyamanyanya .victory-body { animation: vSway 2.8s ease-in-out .52s infinite alternate; }
@keyframes vSway { from { transform: rotate(-1deg); } to { transform: rotate(1.1deg) scale(1.006, 1.012); } }
.v-live.v-getixer .victory-body,
.v-live.v-nyannyan .victory-body { animation: vBreathe 2.2s ease-in-out .52s infinite alternate; }
@media (prefers-reduced-motion: reduce) {
  .v-aura, .v-live .victory-body, .v-live .v-crown { animation: none !important; }
}
@keyframes fatalityIn { from { opacity: 0; } to { opacity: 1; } }
.fatality-fighter {
  position: absolute;
  bottom: 0;
  top: auto;
  height: 60%;
  display: flex;
  align-items: flex-end;
}
.fatality-fighter.left { left: 0; width: 47%; justify-content: flex-end; }
.fatality-fighter.right { right: 0; width: 50%; justify-content: flex-start; }
.fatality-fighter.winner { z-index: 2; }
.fatality-fighter.loser { z-index: 1; }
.fatality-flip {
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.fatality-fighter.right .fatality-flip { transform: scaleX(-1); }
.fatality-sprite {
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform-origin: 80% 100%;
}
.fatality-fighter img {
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: right bottom;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .55));
  user-select: none;
}
.fatality-fighter.idle .fatality-sprite {
  animation: fatalityBob 1.1s ease-in-out infinite alternate;
}
.fatality-fighter.winding .fatality-sprite {
  animation: fatalityWindup .55s ease-out forwards;
}
.fatality-fighter.bracing .fatality-sprite {
  animation: fatalityBrace .5s ease-out forwards;
}
.fatality-fighter.striking.atk-punch .fatality-sprite {
  animation: fatalityLungePunch .48s cubic-bezier(.15, .85, .25, 1) forwards;
}
.fatality-fighter.striking.atk-kick .fatality-sprite {
  animation: fatalityLungeKick .5s cubic-bezier(.2, .8, .2, 1) forwards;
  transform-origin: 25% 100%;
}
.fatality-fighter.left.striking.atk-kick { width: 58%; }
.fatality-fighter.right.striking.atk-kick { width: 61%; }
.fatality-fighter.left.striking.atk-knee { width: 56%; }
.fatality-fighter.right.striking.atk-knee { width: 59%; }
.fatality-fighter.left.striking.atk-uppercut { width: 54%; }
.fatality-fighter.right.striking.atk-uppercut { width: 57%; }
.fatality-fighter.striking.atk-knee .fatality-sprite {
  animation: fatalityLungeKnee .52s cubic-bezier(.18, .9, .22, 1) forwards;
}
.fatality-fighter.striking.atk-uppercut .fatality-sprite {
  animation: fatalityLungeUpper .5s cubic-bezier(.15, .85, .2, 1) forwards;
}
.fatality-fighter.recoiling .fatality-sprite {
  animation: fatalityRecoil .76s ease-out forwards;
}
.fatality-fighter.downed { z-index: 4; }
.fatality-fighter:not(.free).downed {
  width: 30%;
  top: auto;
  height: 32%;
}
.fatality-fighter:not(.free).downed.left { left: 3%; }
.fatality-fighter:not(.free).downed.right { right: 3%; }
.fatality-fighter:not(.free).downed .fatality-sprite {
  animation: fatalityDrop .68s cubic-bezier(.2, .9, .3, 1) both;
  height: 100%;
  width: auto;
  max-width: 100%;
}
.fatality-fighter.downed img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: bottom;
  filter: none;
}
@keyframes fatalityBob {
  0% { transform: translateY(0) rotate(-0.6deg); }
  100% { transform: translateY(-3.2%) rotate(0.8deg); }
}
@keyframes fatalityWindup {
  0% { transform: translateX(0) scale(1); }
  100% { transform: translateX(6%) scale(0.96, 1.04) rotate(-3deg); }
}
@keyframes fatalityBrace {
  0% { transform: translateX(0); }
  100% { transform: translateX(-4%) rotate(-2deg); }
}
@keyframes fatalityLungePunch {
  0% { transform: translateX(6%) scale(0.96, 1.04); }
  50% { transform: translateX(44%) scale(1.06, 0.94); }
  100% { transform: translateX(40%) scale(1); }
}
@keyframes fatalityLungeKick {
  0% { transform: translateX(8%) rotate(0); }
  40% { transform: translateX(88%) translateY(-2%) rotate(-6deg); }
  100% { transform: translateX(78%) rotate(-2deg); }
}
@keyframes fatalityLungeKnee {
  0% { transform: translate(8%, 0) rotate(0); }
  45% { transform: translate(62%, -16%) rotate(8deg); }
  100% { transform: translate(54%, -10%) rotate(4deg); }
}
@keyframes fatalityLungeUpper {
  0% { transform: translate(8%, 12%) rotate(8deg); }
  45% { transform: translate(40%, -14%) rotate(-2deg); }
  100% { transform: translate(34%, -8%) rotate(0); }
}
@keyframes fatalityRecoil {
  0% { transform: translateX(16%); }
  35% { transform: translateX(-4%) rotate(-4deg); }
  100% { transform: translateX(12%) rotate(-1deg); }
}
@keyframes fatalityShake {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-6px, 3px); }
  55% { transform: translate(5px, -2px); }
  100% { transform: translate(0, 0); }
}
@keyframes fatalityDrop {
  0% { transform: translateY(-18%) scale(.92); opacity: .4; }
  70% { transform: translateY(4%) scale(1.03); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

#fatalityPreviewTable {
  position: fixed;
  inset: 0;
  z-index: 14;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 0%, #22262f, #14161b 70%);
  padding-top: 48px;
}
#fatalityPreviewTable .table-page {
  grid-template-columns: 1fr;
  flex: 1;
  min-height: 0;
}

/* ---------- hotkeys, BB units, blind structure ---------- */
.link-btn {
  background: none; border: none; padding: 0; margin: 0; font: inherit; color: inherit;
  cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--gold); }
kbd.hk {
  display: inline-block; margin-left: .4em; padding: 0 .3em; min-width: 1.2em;
  border: 1px solid currentColor; border-radius: 3px; opacity: .65;
  font: inherit; font-size: .68em; line-height: 1.35; text-align: center; vertical-align: middle;
}
@media (hover: none), (pointer: coarse) { kbd.hk { display: none; } }
.unit-toggle {
  position: absolute; top: .35em; left: .5em; z-index: 12; font-size: .72em;
  display: inline-flex; padding: 2px; gap: 2px; border-radius: 6px;
}
.unit-toggle > span { padding: .15em .55em; border-radius: 4px; color: var(--muted); }
.unit-toggle > span.on { background: var(--gold); color: #1c1f26; font-weight: 700; }
.unit-toggle .unit-short { display: none; }
/* Phones: "Фишки" covered the nearest seat plaque. Same breakpoints as isCompactTable in cam.js. */
@media (max-width: 480px), (orientation: landscape) and (max-height: 520px) and (max-width: 1100px) {
  .seat-bankroll { display: none; }
  .unit-toggle .unit-long { display: none; }
  .unit-toggle .unit-short { display: inline; }
  .phone-cam-btn { display: none !important; }
  /* Gold already says the camera is on; the extra word wrapped the header onto another row and
     pushed "Ва-банк" below the screen edge. */
  .cam-on-label { display: none; }
  /* Every card on a phone (own hand, board, revealed hands): keep both corner ranks, hide only
     the tiny corner suits — at this size they crowd into the big suit in the middle. Journal,
     history and replay cards are the compact layout (rank + one suit stacked, the middle pip is
     hidden), so there the suit is the only one and stays. */
  .playing-card .pip.tl small,
  .playing-card .pip.br small { display: none; }
  .log-cards .pip.tl small,
  .hist-cards .pip.tl small,
  .hist-community .pip.tl small,
  .rp-board .pip.tl small,
  .rp-hole .pip.tl small { display: block; }
}
.seat .stack.stack-short { color: #f0c24b; font-weight: 700; }
.seat .stack.stack-critical { color: #ff6b5e; font-weight: 700; }
.blinds-card h2 { margin: 0 0 .3em; }
.blinds-table { width: 100%; border-collapse: collapse; margin: .6em 0; font-variant-numeric: tabular-nums; }
.blinds-table th, .blinds-table td { padding: .32em .5em; border-bottom: 1px solid #2f343e; }
.blinds-table th { color: var(--muted); font-weight: 600; font-size: .85em; }
.blinds-table tr.past td { color: var(--muted); opacity: .6; }
.blinds-table tr.current td { color: var(--gold); font-weight: 700; background: rgba(224,176,76,.1); }
.blinds-banner {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 50;
  background: rgba(20, 22, 27, .92); border: 1px solid var(--gold); color: var(--gold);
  border-radius: 10px; padding: .35em .9em; font-weight: 700; font-size: .88em; text-align: center;
  box-shadow: 0 6px 24px rgba(0,0,0,.5); pointer-events: none;
  animation: blindsBanner 4s ease forwards; max-width: calc(100vw - 32px); white-space: nowrap;
}
@keyframes blindsBanner {
  0% { opacity: 0; transform: translate(-50%, -8px); }
  10%, 80% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -4px); }
}

/* ---------- pause & time bank ---------- */
.pause-pill {
  display: inline-block; margin-bottom: .4em;
  background: rgba(20, 22, 27, .88); border: 1px solid var(--gold); color: var(--gold);
  padding: .35em 1.1em; border-radius: 999px; font-weight: 800; letter-spacing: .12em; font-size: .9em;
}
/* Pinned to the action panel's corner instead of sitting in the button row, where it wrapped onto a
   line of its own, made the panel taller and squeezed the table (hero's clock went off-screen). */
.action-bar { position: relative; }
/* Bottom-right of the panel, in its own strip: the top-right corner sat on the "банк" shortcut. */
.action-bar:has(.time-bank) { padding-bottom: 1.35em; }
.time-bank { position: absolute; top: auto; bottom: .28em; right: .7em; left: auto; font-size: .72em; color: var(--muted); white-space: nowrap; pointer-events: none; }
.time-bank.active { color: #6fa8ff; font-weight: 700; }

/* ---------- chairs ---------- */
.seat.empty-seat { z-index: 1; width: auto; }
.empty-chair {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  width: 58px; height: 58px; border-radius: 50%; padding: 0;
  background: rgba(20, 22, 27, .55); border: 2px dashed rgba(224,176,76,.55); color: var(--gold);
  font-size: 1.2em; line-height: 1;
}
.empty-chair span { font-size: .55em; margin-top: .15em; }
.empty-chair:hover { background: rgba(224,176,76,.18); border-style: solid; }
@media (max-width: 480px) {
  .empty-chair { width: 38px; height: 38px; font-size: .9em; }
  .empty-chair span { display: none; }
}

/* ---------- tournament results ---------- */
.results-card { width: min(620px, 100%); } /* the table's summary (graph, awards, key hands) lives here too */
.results-card > .profile-close { z-index: 2; }
@keyframes trophyPop { 0% { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
.results-card h2 { margin: .25em 0 .15em; color: var(--gold); }
.res-hero.res-draw { padding-bottom: 12px; }
.res-draw-symbol { display: block; font-size: 30px; line-height: 1.2; }
.res-draw-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 360px; margin: 18px auto 12px; }
.res-draw-player { --medal: #cfd6e2; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.res-draw-player .pd-ava-wrap { width: 56px; height: 56px; }
.res-draw-player b { max-width: 100%; overflow-wrap: anywhere; font-size: .94em; line-height: 1.25; }
.res-draw-player > span { color: var(--muted); font-size: .8em; }
.res-draw-summary { font-size: .9em; line-height: 1.4; margin: 12px 0 8px; }
.res-draw-rules { font-size: .82em; color: var(--muted); margin-bottom: 12px; text-align: left; }
.res-draw-rules summary { cursor: pointer; text-align: center; }
.res-draw-rules p { line-height: 1.45; }
.draw-results .results-list:not(.casual-res) li { display: grid; grid-template-columns: 1.8em minmax(0, 1fr); gap: .2em .6em; }
.draw-results .results-list:not(.casual-res) .res-place { grid-row: span 2; }
.draw-results .results-list:not(.casual-res) .res-name,
.draw-results .results-list:not(.casual-res) .res-notes { grid-column: 2; white-space: normal; overflow-wrap: anywhere; }
.results-list { list-style: none; margin: .8em 0; padding: 0; text-align: left; }
.results-list li {
  display: flex; align-items: center; gap: .6em; padding: .4em .6em; border-radius: 8px;
  border-bottom: 1px solid #2f343e;
}
.results-list.casual-res li {
  display: grid;
  grid-template-columns: 1.8em minmax(0, 1fr) 4.2em 3.4em 4.2em;
  gap: .35em;
  align-items: center;
}
.results-list li.podium { font-weight: 700; }
.results-list li.mine { background: rgba(224,176,76,.12); }
.results-list li.res-head {
  font-size: .72em; font-weight: 600; color: var(--muted); padding: .2em .6em;
  border-bottom: 1px solid #3a3f4a;
}
.res-place { width: 1.8em; text-align: center; font-size: 1.15em; flex-shrink: 0; }
.res-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.res-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-notes { color: var(--muted); font-size: .8em; font-weight: 400; white-space: nowrap; }
.res-num { text-align: right; font-variant-numeric: tabular-nums; font-size: .92em; font-weight: 600; }
.res-plus { color: #4fce72; }
.res-minus { color: #e07a7a; }
.res-total { color: var(--gold); }
.res-total.res-minus { color: #e07a7a; }
@media (max-width: 480px) {
  .results-list.casual-res li {
    grid-template-columns: 1.6em minmax(0, 1fr) 3.4em 2.6em 3.4em;
    gap: .22em;
    padding: .35em .4em;
  }
  .results-list li.res-head { font-size: .65em; }
  .res-num { font-size: .82em; }
}
@media (max-width: 360px) {
  .draw-results .results-list.casual-res li { grid-template-columns: 1.6em repeat(3, minmax(0, 1fr)); }
  .draw-results .results-list.casual-res li:not(.res-head) .res-place { grid-column: 1; grid-row: span 2; }
  .draw-results .results-list.casual-res .res-who { grid-column: 2 / -1; }
  .draw-results .results-list.casual-res .res-name { white-space: normal; overflow-wrap: anywhere; }
  .draw-results .results-list.casual-res .res-head > span:nth-child(2) { display: none; }
}
.results-facts { font-size: .88em; color: var(--muted); display: grid; gap: .3em; margin-bottom: 1em; }
.results-facts b { color: var(--text); }

/* ---------- leaderboard ---------- */
.leaderboard-card {
  display: flex; align-items: center; gap: .8em; text-align: left;
  font: inherit; color: var(--text); cursor: pointer; border: 1px solid transparent;
}
.leaderboard-card:hover { border-color: var(--gold); }
.lb-card-icon { font-size: 1.8em; }
.lb-card { width: min(620px, 100%); }
.lb-card h2 { margin: 0 0 .5em; }
.lb-tabs { display: flex; gap: .4em; justify-content: center; margin-bottom: .8em; }
.lb-tabs .mini.active { background: var(--gold); color: #1c1f26; font-weight: 700; }
.lb-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .92em; }
.lb-table th { color: var(--muted); font-weight: 600; font-size: .85em; padding: .3em .35em; }
.lb-table th.lb-tip { cursor: pointer; white-space: nowrap; }
.lb-table th.lb-tip:hover { color: var(--gold); }
.lb-tip-mark {
  display: inline-block; margin-left: .15em; font-size: .68em; font-weight: 700;
  width: 1.15em; line-height: 1.15em; text-align: center; vertical-align: .05em;
  border: 1px solid currentColor; border-radius: 99px; opacity: .55;
}
.lb-help-overlay { z-index: 46; }
.lb-help-card { width: min(440px, 100%); text-align: left; }
.lb-help-card h2 { text-align: center; margin-bottom: .5em; }
.lb-help-lead { margin: 0 0 .9em; line-height: 1.45; }
.lb-help-ex {
  background: var(--panel2); border: 1px solid #3a3f4a; border-radius: 10px;
  padding: .9em 1em; margin: 0 0 .85em;
}
.lb-help-ex > p:first-of-type { margin-top: 0; }
.lb-help-ex > p:last-child { margin-bottom: 0; }
.lb-help-ex-h {
  color: var(--gold); font-size: .75em; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; margin-bottom: .55em;
}
.lb-help-rows { display: grid; gap: .15em; }
.lb-help-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: .8em;
  padding: .4em 0; border-bottom: 1px solid #2f343e; font-variant-numeric: tabular-nums;
}
.lb-help-row:last-child { border-bottom: 0; padding-bottom: 0; }
.lb-help-formula {
  text-align: center; font-variant-numeric: tabular-nums; font-size: 1.15em;
  background: #1c1f26; border-radius: 8px; padding: .55em .7em; margin: .45em 0 .65em;
}
.lb-help-split { display: grid; grid-template-columns: 1fr 1fr; gap: .5em; margin-top: .65em; }
.lb-help-outcome {
  border-radius: 8px; padding: .65em .6em; text-align: center;
  background: rgba(255,255,255,.03); border: 1px solid #3a3f4a;
}
.lb-help-outcome.plus { background: rgba(63,174,92,.12); border-color: rgba(63,174,92,.4); }
.lb-help-outcome.minus { background: rgba(217,83,79,.12); border-color: rgba(217,83,79,.4); }
.lb-help-outcome-h { font-size: .85em; margin-bottom: .2em; }
.lb-help-outcome-v { font-size: 1.3em; font-weight: 700; font-variant-numeric: tabular-nums; }
.lb-help-card > .hint { margin: 0; }
.lb-help-ex .hint { margin: .7em 0 0; }
@media (max-width: 420px) {
  .lb-help-split { grid-template-columns: 1fr; }
}
.lb-table td { padding: .4em .35em; border-bottom: 1px solid #2f343e; text-align: center; }
.lb-table tr.mine td { background: rgba(224,176,76,.1); }
.lb-table .lb-name-h, .lb-table .lb-name { text-align: left; }
.lb-rank { width: 2em; font-size: 1.1em; }
.lb-player { display: inline-flex; align-items: center; gap: .45em; text-decoration: none; max-width: 100%; }
.lb-player span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-avatar-wrap { position: relative; width: 24px; height: 24px; flex-shrink: 0; }
.lb-avatar {
  width: 24px; height: 24px; border-radius: 50%; object-fit: cover; display: block;
  position: absolute; inset: 0; border: 1px solid #3a3f4a;
}
.lb-avatar.placeholder {
  display: grid; place-items: center; font-size: .7em; background: var(--panel2); color: var(--gold);
}
@media (max-width: 480px) {
  .lb-table { font-size: .8em; }
  .lb-table th, .lb-table td { padding: .35em .2em; }
}

/* ---------- hand replay ---------- */
.hist-replay { margin-left: auto; align-self: center; }
.replay-overlay { z-index: 45; }
.replay-card { width: min(540px, 100%); }
.replay-card h3 { margin: 0; }
.rp-board { display: flex; gap: .3em; justify-content: center; margin: .7em 0 .3em; }
.rp-board .playing-card { width: 38px; height: 53px; font-size: .85em; }
.rp-slot { background: rgba(255,255,255,.04); border: 1px dashed #3a3f4a; box-shadow: none; }
.rp-pot {
  display: flex; align-items: center; justify-content: center; gap: .4em;
  color: var(--gold); margin-bottom: .6em; font-weight: 700;
}
.rp-pot .chip-stack { gap: .25em; }
.rp-pot .chip-pile.mini { height: 18px; }
.rp-players { display: grid; gap: .3em; text-align: left; }
/* Fixed tracks (not `auto`): each row is its own grid, so auto columns sized to that row's bet
   and shoved the hole cards / stack left on anyone with chips in front. */
.rp-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 62px minmax(64px, .8fr) 4.8em 5.6em; align-items: center; gap: .4em;
  padding: .3em .5em; border-radius: 8px; background: var(--panel2); border: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease;
}
.rp-row.mine { border-color: #3a3f4a; }
.rp-row.active { border-color: var(--gold); background: rgba(224,176,76,.12); }
.rp-row.winner { border-color: #2ecc71; background: rgba(46,204,113,.12); }
.rp-row.folded { opacity: .45; }
.rp-who { display: flex; align-items: center; gap: .3em; min-width: 0; }
.rp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-badge { font-size: .62em; font-weight: 800; padding: .1em .35em; border-radius: 4px; background: #3a3f4a; color: var(--text); }
.rp-badge.d { background: var(--gold); color: #1c1f26; }
.rp-eq { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rp-eq-top { display: flex; justify-content: space-between; align-items: baseline; font-size: .72em; }
.rp-eq-top i { font-style: normal; color: var(--muted); }
.rp-eq-top b.hi, .rp-eq-bar i.hi { color: #5fd08a; }
.rp-eq-top b.lo, .rp-eq-bar i.lo { color: #ef7a6e; }
.rp-eq-bar { height: 5px; border-radius: 3px; background: #2c303a; overflow: hidden; display: block; }
.rp-eq-bar i { display: block; height: 100%; background: currentColor; transition: width .35s ease; }
.rp-hole { display: flex; gap: .2em; width: 62px; justify-content: flex-end; }
.rp-hole .playing-card { width: 28px; height: 39px; font-size: .68em; }
.rp-stack {
  text-align: right; color: var(--gold); font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.rp-bet {
  display: flex; justify-content: flex-end; align-items: center;
  min-height: 22px;
}
.rp-bet .chip-stack { gap: .25em; }
.rp-bet .chip-pile.mini { width: 14px; height: 16px; flex-shrink: 0; }
.rp-bet .chip.mini { width: 14px; height: 14px; }
.rp-bet .chip-amt { padding: .1em .4em; font-size: .75em; }
.rp-step { margin: .8em 0 .5em; font-weight: 700; min-height: 1.4em; }
.rp-step.final.won { color: #4fce72; }
.rp-step.final.lost { color: #e07a7a; }
.rp-controls { display: flex; gap: .35em; justify-content: center; align-items: center; flex-wrap: wrap; }
.rp-count { color: var(--muted); font-size: .8em; margin-left: .4em; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
  .rp-row { grid-template-columns: minmax(0, 1fr) 56px minmax(48px, .8fr) 4.2em 5em; font-size: .85em; gap: .28em; }
  .rp-hole { width: 56px; }
  .rp-hole .playing-card { width: 25px; height: 35px; font-size: .62em; }
}
.hist-row { flex-wrap: wrap; }

/* ---------- table mode ---------- */
.mode-row { display: flex; gap: .5em; margin-bottom: .8em; }
.mode-btn {
  flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: .15em; text-align: left;
  padding: .55em .7em; border: 1px solid #3a3f4a; background: var(--panel2);
}
.mode-btn.active { border-color: var(--gold); background: rgba(224,176,76,.12); box-shadow: 0 0 8px rgba(224,176,76,.25); }
.mode-name { font-weight: 700; font-size: .9em; }
.mode-sub { font-size: .7em; color: var(--muted); }
.lb-plus { color: #3fae5c; }
.elo-num { font-variant-numeric: tabular-nums; }
.elo-hot { color: #e0b04c; }
.elo-cold { color: var(--muted); }
.elo-title { color: var(--muted); font-size: .85em; font-weight: 400; }
.lb-muted { color: var(--muted); }
.lb-minus { color: #d9534f; }
@media (max-width: 480px) {
  .action-bar:has(.time-bank) { padding-bottom: 1.15em; }
  .time-bank { right: .45em; left: auto; top: auto; bottom: .15em; }
  .time-bank .tb-word { display: none; }
}

/* ---------- super-admin ---------- */
.admin-btn { background: #3a2c0e; color: var(--gold); }
.admin-card { width: min(1080px, 96vw); text-align: left; border-color: rgba(224, 176, 76, .35); }
.admin-card h2 { text-align: center; margin: 0 0 .5em; }
.admin-card button.mini {
  padding: .32em .7em; font-size: .82em; font-weight: 600;
  border: 1px solid transparent;
}
.admin-card button.adm-ok { background: #1f6b45; color: #e8ffef; }
.admin-card button.adm-ok:hover { background: #258055; }
.admin-card button.adm-fix { background: #2c4f8a; color: #e4eeff; }
.admin-card button.adm-fix:hover { background: #3560a8; }
.admin-card button.adm-undo { background: #8a6414; color: #fff4cc; }
.admin-card button.adm-undo:hover { background: #a37618; }
.admin-card button.adm-warn { background: #8a4a16; color: #ffe8d2; }
.admin-card button.adm-warn:hover { background: #a3581a; }
.admin-card button.adm-eye { background: #4a3a78; color: #efe8ff; }
.admin-card button.adm-eye:hover { background: #5a4890; }
.adm-legend {
  display: flex; flex-wrap: wrap; gap: .35em 1em; align-items: center;
  font-size: .78em; color: var(--muted); margin: 0 0 .7em;
}
.adm-swatch {
  display: inline-block; width: .75em; height: .75em; border-radius: 3px; margin-right: .35em;
  vertical-align: -1px;
}
.adm-swatch.ok { background: #1f6b45; }
.adm-swatch.fix { background: #2c4f8a; }
.adm-swatch.undo { background: #8a6414; }
.adm-swatch.warn { background: #8a4a16; }
.adm-swatch.danger { background: var(--danger); }
.adm-badge {
  display: inline-block; font-size: .72em; font-weight: 700; letter-spacing: .02em;
  padding: .12em .5em; border-radius: 999px; vertical-align: middle; white-space: nowrap;
}
.adm-badge.casual { background: rgba(31, 107, 69, .35); color: #9eecc0; }
.adm-badge.tourney { background: rgba(224, 176, 76, .28); color: var(--gold); }
.adm-badge.bots { background: rgba(90, 110, 140, .4); color: #c5d0e0; }
.adm-badge.wait { background: rgba(61, 139, 253, .25); color: #9cc4ff; }
.adm-badge.pause { background: rgba(138, 74, 22, .4); color: #ffc48a; }
.adm-badge.done { background: rgba(154, 160, 170, .25); color: var(--muted); }
.adm-announce, .adm-ban-form { display: flex; gap: .4em; flex-wrap: wrap; margin-bottom: .6em; }
.adm-announce input, .adm-ban-form input { flex: 1; min-width: 140px; }
.adm-body { max-height: 70vh; overflow-y: auto; }
.adm-table { background: var(--panel2); border-radius: 10px; padding: .6em .7em; margin-bottom: .6em; border-left: 4px solid #3a3f4a; }
.adm-table.is-casual { border-left-color: #1f6b45; }
.adm-table.is-tourney { border-left-color: var(--gold); }
.adm-table.is-bots { border-left-color: #6a7a94; }
.adm-table.is-paused { box-shadow: inset 0 0 0 1px rgba(138, 74, 22, .55); }
.adm-table.is-over { opacity: .85; }
.adm-table-head { display: flex; gap: .5em; align-items: center; flex-wrap: wrap; margin-bottom: .4em; }
.adm-players { display: grid; gap: .25em; margin-bottom: .4em; }
.adm-player { display: flex; align-items: center; gap: .45em; }
.adm-player.is-busted .adm-stack { color: #e08080; }
.adm-player.is-out { opacity: .7; }
.adm-player.is-rail { opacity: .75; }
.adm-pname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-stack { color: var(--gold); font-variant-numeric: tabular-nums; }
.adm-dot { width: 8px; height: 8px; border-radius: 50%; background: #666; flex-shrink: 0; }
.adm-dot.on { background: #3fae5c; }
.adm-actions { display: flex; gap: .35em; flex-wrap: wrap; }
.adm-list { display: grid; gap: .3em; }
.adm-row { display: flex; gap: .6em; align-items: center; flex-wrap: wrap; padding: .35em .5em; border-radius: 8px; background: var(--panel2); }
.adm-row > span:first-child { flex: 1; min-width: 0; }
.adm-row.muted { opacity: .55; }
.adm-game-row.is-rated { border-left: 4px solid var(--gold); }
.adm-game-row.is-casual { border-left: 4px solid #1f6b45; }
.announce-banner {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: .8em; max-width: calc(100vw - 32px);
  background: #3a2c0e; color: #ffe7a8; border: 1px solid var(--gold); border-radius: 10px;
  padding: .6em .9em; box-shadow: 0 8px 24px rgba(0,0,0,.5); font-size: .95em;
}
/* A phone can't fit a history row on one line: your cards and the one-line meta text
   ("старшая карта · соперников: 11") on top, the board and the replay button underneath. */
@media (max-width: 560px) {
  /* two lines: when + the cards, then the result with the star and «Повтор» */
  .hist-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 6px 10px; }
  .hist-row .hand-cards { grid-column: 2 / -1; }
  .hist-row .hist-info { grid-column: 1 / 3; }
  .hist-row .hist-replay { margin-left: 0; padding: .3em .6em; font-size: .85em; }
  .hist-filter.seg button { white-space: nowrap; font-size: 13px; padding-inline: 10px; }
}

/* ---------- bounty ---------- */
.head-badge { font-size: .8em; color: #ffcf5a; margin-left: .2em; white-space: nowrap; }
.bounty-toggle { display: flex; gap: .5em; align-items: flex-start; font-size: .8em; color: var(--muted); margin: -.2em 0 .8em; cursor: pointer; }
.bounty-toggle b { color: var(--text); }
.bounty-toggle input { margin-top: .2em; accent-color: var(--gold); }
.lb-sort { margin-top: -.3em; }
.lb-table td.lb-sorted { color: #ffcf5a; }
.rp-step.final { color: var(--gold); }
/* "Рука дня/недели": the name and the hand are clickable, but without the dotted underline. */
.highlight-card .link-btn { text-decoration: none; }
.highlight-card .link-btn:hover { color: var(--gold); }
/* Who watches with the x-ray: one small plaque (xrayStatusHtml) — «👁 Рентген: имя» or a count, «✦ Супер: …»; a click opens the
   names and what they see. Its spot is the table editor's (`xray`). */
.table-xray-status {
  position: absolute; top: .3em; right: .5em; z-index: 6;
  display: flex; flex-direction: column; align-items: flex-end; gap: .3em; max-width: min(42%, 26em);
}
.table-xray-status:empty { pointer-events: none; }
.xr-chips {
  all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: .3em; max-width: 100%;
  padding: .2em .3em; border-radius: 999px; background: rgba(30, 22, 8, .82); border: 1px solid rgba(255, 207, 90, .55);
  font-size: .72em; line-height: 1.2; color: #ffe7a8; box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.xr-chips:hover { border-color: var(--gold); background: rgba(48, 36, 12, .92); }
.xr-chip { display: inline-flex; align-items: center; gap: .3em; min-width: 0; padding: 0 .35em; white-space: nowrap; }
.xr-chip + .xr-chip { border-left: 1px solid rgba(255, 207, 90, .35); }
.xr-chip .ic { width: 1.05em; height: 1.05em; flex: none; }
.xr-lbl { font-weight: 600; }
.xr-who { font-weight: 700; color: #fff3cf; min-width: 0; max-width: 9em; overflow: hidden; text-overflow: ellipsis; }
.xr-n { min-width: 1.35em; padding: 0 .3em; border-radius: 999px; background: rgba(255, 207, 90, .22); color: #ffcf5a; text-align: center; font-size: .92em; }
.xr-n.xr-one { display: none; }
.xr-super { color: #ffd76e; }
.xr-star { font-size: 1.05em; color: #ffcf5a; }
.xr-pop {
  box-sizing: border-box; max-width: 100%; padding: .45em .65em; border-radius: 10px;
  background: rgba(30, 22, 8, .95); border: 1px solid var(--gold); color: #ffe7a8; font-size: .7em; line-height: 1.35;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .5); overflow-wrap: anywhere;
}
.xr-pop p { margin: 0; }
.xr-pop p + p { margin-top: .35em; }
.xr-pop .ic { width: 1em; height: 1em; vertical-align: -.12em; }
.super-xray-label-short { display: none; }
.community .super-xray-card { outline: 2px solid rgba(255, 207, 90, .72); outline-offset: 1px; }
.hand-preview.xray-hand { color: #ffcf5a; position: absolute; left: 50%; top: calc(100% + 2px); transform: translateX(-50%); margin: 0; white-space: nowrap; z-index: 3; } /* hangs under the plaque like the viewer's own: a plaque that grew by this line stood higher than the one laid out in the editor */
.empty-chair .chair-count { font-size: .6em; margin-left: .05em; }

/* ---------- entry form: name, (password), button — one under another ---------- */
form[data-form="entry"] { display: flex; flex-direction: column; gap: .6em; }
form[data-form="entry"] h2, form[data-form="entry"] .hint { margin-bottom: .1em; }
form[data-form="entry"] input, form[data-form="entry"] button { width: 100%; }
form[data-form="entry"] .error-text { margin: 0; }

/* ---------- admin panel polish ---------- */
.adm-corner { position: absolute; top: .5em; right: .5em; display: flex; gap: .35em; }
.admin-card h2 { padding: 0 5.5em; } /* room for the ↻ ✕ corner so the title never runs under it */
@media (max-width: 480px) {
  .admin-card h2 { padding: 0 0 0 0; margin-top: 1.9em; font-size: 1.2em; } /* on a phone the title drops below the corner buttons */
}
.adm-announce { align-items: stretch; margin-bottom: .8em; }
.adm-announce input { min-height: 2.5em; }
/* Tabs as one segmented bar across the whole panel, each the same width. */
.adm-tabs {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px;
  background: var(--panel2); border-radius: 10px; padding: 3px; margin-bottom: .9em;
}
.adm-tabs button {
  background: transparent; border-radius: 8px; padding: .5em .3em; font-size: .9em; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adm-tabs button:hover { color: var(--text); background: rgba(255,255,255,.04); }
.adm-tabs button.active { background: var(--gold); color: #1c1f26; font-weight: 700; }
@media (max-width: 480px) {
  .adm-tabs button { font-size: .75em; padding: .5em .15em; }
}

/* ---------- reigning champion: gold neon ---------- */
/* The halo is its own layer so the "your turn" gold border/glow on the card itself still shows. */
.seat.champion .seat-card::before {
  content: ''; position: absolute; inset: -3px; border-radius: 16px; pointer-events: none; z-index: 0;
  border: 1px solid rgba(255, 214, 110, .9);
  /* A fixed glow that only fades in and out — animating box-shadow itself repainted every frame. */
  box-shadow: 0 0 12px 3px rgba(255, 215, 110, .95), 0 0 34px 10px rgba(255, 190, 60, .45);
  animation: championGlow 2.4s ease-in-out infinite;
  will-change: opacity;
}
@keyframes championGlow {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}
.seat.champion .name-text { color: #ffe08a; text-shadow: 0 0 6px rgba(255, 200, 80, .8); }
.champ-crown { margin-right: .15em; filter: drop-shadow(0 0 4px rgba(255, 200, 80, .8)); }
.champ-line { color: #ffe08a; font-size: .85em; text-shadow: 0 0 6px rgba(255, 200, 80, .6); }
@media (prefers-reduced-motion: reduce) { .seat.champion .seat-card::before { animation: none; box-shadow: 0 0 12px 3px rgba(255, 215, 110, .8); } }

/* Header drop-downs (S.hdrMenu): "⋯" at the table, and the one under the avatar. */
.hdr-menu-wrap { position: relative; display: inline-flex; flex-shrink: 0; }
.hdr-menu-btn { white-space: nowrap; }
.hdr-menu-btn.open { background: #343a46; }
.hdr-dots { font-weight: 800; letter-spacing: .05em; padding: 0 .15em; }
.hdr-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hdr-caret { font-size: .7em; color: var(--muted); margin-left: -.1em; }
.hdr-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 60; min-width: 220px;
  display: flex; flex-direction: column; padding: .35em;
  background: var(--panel2); border: 1px solid rgba(255,255,255,.12); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  font-size: 1rem; /* not the shrunk header button size */
}
.hdr-menu > button, .hdr-menu > a {
  display: block; width: 100%; text-align: left; white-space: nowrap;
  padding: .55em .8em; border-radius: 7px; background: transparent;
  color: var(--text) !important; font: inherit; font-size: .92em; text-decoration: none;
}
.hdr-menu > button:hover, .hdr-menu > a:hover { background: rgba(255,255,255,.07); }
.hdr-menu > button.danger { color: #ff8f8a !important; background: transparent; }
.hdr-menu > button.danger:hover { background: rgba(217, 83, 79, .18); }
.hdr-menu > button.danger { margin-top: .3em; border-top: 1px solid rgba(255,255,255,.08); border-radius: 0 0 7px 7px; }
/* The "⋯" menu sits mid-header: it opens to the right of its button, never past the screen's edge. */
.hdr-menu-table .hdr-menu { right: auto; left: 0; }
.hdr-menu { max-width: calc(100vw - 16px); }
@media (max-width: 860px) { .admin-label { display: none; } }
/* A phone at the table: the spade alone, so the table info starts on the first line. */
@media (max-width: 480px) { body.ingame .top .hdr-title { display: none; } }

/* The admin's x-ray menu (hand it to a spectator) — drops down under the header button. */
.xray-wrap { position: relative; display: inline-flex; }
.xray-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 60; min-width: 230px;
  display: flex; flex-direction: column; gap: .4em; padding: .6em;
  background: var(--panel2); border: 1px solid rgba(255,255,255,.12); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.45); text-align: left;
}
.xray-menu-title { font-size: .78em; color: var(--muted); margin-top: .2em; }
.xray-menu-note { font-size: .8em; color: var(--muted); }
.xray-menu-row { display: flex; align-items: center; justify-content: space-between; gap: .6em; }
.xray-menu-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.adm-sub { margin: 1em 0 .4em; font-size: .95em; }

/* Lobby: "Рейтинг" and "Создать стол" side by side; the new-table form opens as its own window. */
.lobby-actions { display: flex; flex-direction: column; gap: .8em; } /* "Рейтинг" on top, "Создать стол" under it */
.create-card { width: min(600px, 96vw); text-align: left; max-height: 92vh; overflow-y: auto; }
.create-card h2 { text-align: center; margin: 0 0 .7em; }
.create-card .create-form { display: flex; flex-direction: column; gap: .7em; }
.create-card .mode-row, .create-card .preset-row { margin: 0; }
.create-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5em .8em; }
.bot-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5em .8em; }
.bot-fields select { width: 100%; box-sizing: border-box; }
.create-fields input, .create-fields select { width: 100%; box-sizing: border-box; }
.create-card .stack-depth { font-size: .8em; margin: -.2em 0 0; }
.create-card .create-ladder { font-size: .8em; margin: -.5em 0 0; }
@media (max-width: 560px) {
  .create-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Admin "Онлайн": name · where they are · the x-ray access button, with room to breathe. */
.adm-online-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .5em 1em; padding: .5em .7em; }
.adm-online-row > .hint { text-align: right; }
.adm-sub { margin: 1.3em 0 .5em; }
.adm-xray-form { margin-top: .6em; }
.adm-online-row > .adm-btns { justify-self: end; }
.adm-online-row > .adm-btns > button { white-space: nowrap; }
@media (max-width: 560px) {
  .adm-online-row { grid-template-columns: minmax(0, 1fr) auto; }
  .adm-online-row > button { grid-column: 1 / -1; justify-self: stretch; }
  .adm-online-row > .adm-btns { grid-column: 1 / -1; justify-self: stretch; }
  .adm-online-row > .adm-btns > button { flex: 1; }
}

/* Admin repairs: the results editor, a player's corrections, the undo log. */
.adm-table > .hint, .adm-edit > .hint, .adm-player-card > .hint { margin: .5em 0 0; }
.adm-player { flex-wrap: wrap; }
.adm-btns { display: flex; gap: .3em; flex-wrap: wrap; }
.adm-edit, .adm-player-card { background: var(--panel2); border-radius: 10px; padding: .6em .7em; }
.adm-results-form { display: grid; gap: .3em; }
.adm-res-row {
  display: grid; grid-template-columns: minmax(0, 1.6fr) 4em 4em minmax(0, 1.2fr) 4em minmax(0, 1fr) minmax(0, .9fr);
  gap: .4em; align-items: center;
}
.adm-res-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-res-row input, .adm-res-row select { width: 100%; min-width: 0; padding: .25em .35em; }
.adm-res-head { font-size: .8em; opacity: .7; }
.adm-results-form .adm-actions { margin-top: .4em; }
.adm-adjust { display: grid; grid-template-columns: 8.5em 7em minmax(0, 1fr) auto; gap: .4em; align-items: center; margin-bottom: .35em; }
.adm-adjust input { min-width: 0; }
.adm-player-card .adm-actions { margin: .3em 0; }
.adm-ach-row { padding: .25em .5em; }
.adm-log-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
@media (max-width: 560px) {
  .adm-res-row { grid-template-columns: minmax(0, 1fr) 3.2em 3.2em 5.5em 3.2em; }
  .adm-res-row > span:nth-last-child(-n+2) { grid-column: 1 / -1; text-align: right; }
  .adm-adjust { grid-template-columns: minmax(0, 1fr) 6em; }
  .adm-adjust > input[name=reason] { grid-column: 1 / -1; }
  .adm-log-row { grid-template-columns: minmax(0, 1fr) auto; }
  .adm-log-row > span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
}

/* Chair number on every seat and free spot — the table always draws you at the bottom and spreads
   players evenly, so without it every chair you pick looks like the same one. */
.seat-no { position: absolute; right: 7px; bottom: 5px; font-size: .62em; color: var(--muted); opacity: .75; pointer-events: none; }

/* /poker?cam=1 — a phone that is only someone's table camera. */
.phone-cam-page {
  max-width: 420px;
  margin: 1.5em auto;
  padding: 1em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8em;
  text-align: center;
}
.phone-cam-page h2 { margin: 0; font-size: 1.2em; }
.phone-cam-page p { margin: 0; }
.phone-cam-preview {
  width: min(70vw, 280px);
  height: min(70vw, 280px);
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(224, 176, 76, .7);
  background: #111;
}
.phone-cam-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.phone-cam-preview video.local { transform: scaleX(-1); }
.phone-cam-help { cursor: default; }
.phone-cam-card {
  max-width: min(92vw, 460px);
  padding: 1.2em 1.4em;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid rgba(224, 176, 76, .35);
  box-shadow: 0 12px 48px rgba(0, 0, 0, .5);
  text-align: left;
}
.phone-cam-card h3 { margin: 0 0 .6em; }
.phone-cam-card ol { margin: 0 0 .7em; padding-left: 1.3em; line-height: 1.5; }
.phone-cam-card b { word-break: break-all; }
.phone-cam-qr { width: 200px; height: 200px; margin: 1em auto .4em; background: #fff; border-radius: 8px; }
.phone-cam-qr svg { display: block; width: 100%; height: 100%; }

/* A direct child of <body>, never re-parented: moving a playing <video> blanks it for a frame, so
   the circles used to blink on every bet/card. Page coordinates, set in cam.js positionCams(). */
#camLayer {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 9; /* with .table-stage (9) and after it in the page: the circles lie over the table, not under it */
  pointer-events: none;
}
#camLayer .seat-cam {
  position: absolute;
  right: auto;
  bottom: auto;
  width: 112px;
  height: 112px;
  margin: 0;
  transform: none;
  pointer-events: auto;
}
@media (max-width: 480px) {
  #camLayer .seat-cam { width: 36px; height: 36px; }
}
@media (orientation: landscape) and (max-height: 520px) and (max-width: 1100px) {
  #camLayer .seat-cam { width: 32px; height: 32px; }
}

/* Duel sandbox — see main.js's duelSandboxRoom. */
#duelSandbox {
  position: fixed;
  right: 12px;
  top: 12px;
  z-index: 40;
  width: 330px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  overflow: auto;
  background: rgba(20, 22, 26, .95);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: .55em .65em;
  display: grid;
  gap: .35em;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
  font-size: .9em;
}
#duelSandbox.ds-min > :not(.ds-head) { display: none; }
#duelSandbox .ds-head { display: flex; align-items: center; justify-content: space-between; gap: .5em; }
#duelSandbox .ds-head b { color: var(--gold); font-weight: 800; margin-right: auto; }
#duelSandbox .ds-home { color: inherit; text-decoration: none; font-size: .82em; padding: .15em .55em; border: 1px solid rgba(212, 176, 106, .35); border-radius: 8px; white-space: nowrap; }
#duelSandbox .ds-home:hover { border-color: var(--gold); }
#duelSandbox .ds-row { display: flex; align-items: center; gap: .3em; flex-wrap: wrap; }
#duelSandbox .ds-row > span { min-width: 4.2em; font-size: .8em; color: var(--muted); }
#duelSandbox .ds-pair > span { min-width: 0; }
#duelSandbox select {
  flex: 1;
  min-width: 0;
  background: #1c1f24;
  color: inherit;
  border: 1px solid rgba(212, 176, 106, .35);
  border-radius: 8px;
  padding: .25em .4em;
}
#duelSandbox button {
  background: #1c1f24;
  color: inherit;
  border: 1px solid rgba(212, 176, 106, .3);
  border-radius: 8px;
  padding: .2em .5em;
  font-size: .82em;
  cursor: pointer;
}
#duelSandbox button:hover { border-color: var(--gold); color: var(--gold); }
#duelSandbox button.active { border-color: var(--gold); color: var(--gold); background: #2a2618; }
#duelSandbox .ds-go { margin-top: .2em; }
#duelSandbox .ds-play { font-size: 1em; font-weight: 800; padding: .35em .9em; border-color: var(--gold); color: var(--gold); }
#duelSandbox .ds-last { font-size: .75em; color: var(--muted); min-height: 1em; }
#duelSandbox .ds-last.ds-bad { color: #ff7b72; }

/* Fatality effects (main.js's playFatalityTimeline) — all live in .fatality-stage, none takes clicks. */
.fatality-stage > .fx-ghost { z-index: 0; pointer-events: none; }
.fatality-stage > .fx-ghost img { filter: none; }
.fx-star, .fx-drop, .fx-dust, .fx-ko { position: absolute; pointer-events: none; }
.fx-knife { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 11; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .55)); }
.fatality-sprite { position: relative; }
.fatality-sprite > img { position: relative; z-index: 1; }
.fx-knife-embed { position: absolute; z-index: 0; pointer-events: none; }
.fx-knife img, .fx-knife-embed img { width: 100%; height: 100%; display: block; }
.fx-tomahawk-wound {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  transform: translate(-50%, -38%);
  border-radius: 44% 60% 38% 55%;
  background: radial-gradient(ellipse at 50% 50%, rgba(66, 0, 3, .95) 10%, rgba(135, 4, 12, .8) 50%, transparent 76%);
}
.fx-tomahawk-wound::after {
  content: '';
  position: absolute;
  top: 60%;
  left: 47%;
  width: 11%;
  height: 120%;
  border-radius: 0 0 80% 80%;
  background: linear-gradient(#8d0711, rgba(75, 0, 4, .85) 72%, transparent);
}
.fx-star { width: 13%; aspect-ratio: 1; z-index: 12; transform: translate(-50%, -50%); }
.fx-star svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 0 10px rgba(255, 210, 90, .9)); }
.fx-drop { z-index: 11; border-radius: 50% 50% 50% 0; margin: -3px 0 0 -3px; }
.fx-drop.blood { background: radial-gradient(circle at 35% 35%, #e0303a, #8e0d14 70%); }
.fx-drop.sweat { background: radial-gradient(circle at 35% 35%, #ffffff, rgba(170, 215, 255, .85) 70%); }
.fx-dust {
  z-index: 6;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(222, 205, 175, .85), rgba(190, 170, 140, .35) 55%, transparent 72%);
  filter: blur(1px);
}
.fx-ko {
  z-index: 20;
  left: 50%;
  top: 50%;
  font-family: Impact, 'Arial Black', 'Helvetica Neue', sans-serif;
  font-weight: 900;
  letter-spacing: .02em;
  line-height: 1;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}
/* Blood red: glossy bright top, clotted dark bottom, a near-black rim. */
.fx-ko-text {
  position: relative;
  z-index: 1;
  display: block;
  background: linear-gradient(180deg, #ff6a5c 0%, #e8141c 32%, #b0000a 62%, #5c0004 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: .04em #240002;
  filter: drop-shadow(0 .05em 0 #240002) drop-shadow(0 0 .22em rgba(160, 0, 10, .55));
}
/* A run of blood from the bottom of the letters: a clip box (its width is the run's, its height the
   final length) with the run inside sliding down from above; the drop head hangs off the run. */
.fx-ko-drip {
  position: absolute;
  top: 80%;
  z-index: 0;
  transform: translateX(-50%) rotate(7deg); /* the K.O. stands at -7deg: the blood runs straight down, not along the tilted letters */
  transform-origin: 50% 0;
  overflow: hidden;
  padding: 0 .06em .09em;
  box-sizing: content-box;
}
.fx-ko-run {
  position: absolute;
  left: .06em;
  right: .06em;
  top: 0;
  bottom: .09em;
  border-radius: 0 0 .05em .05em;
  background: linear-gradient(180deg, #9a0009, #6e0006);
  box-shadow: inset .01em 0 0 rgba(255, 90, 90, .35);
  will-change: transform;
}
.fx-ko-run::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -.075em;
  width: .085em;
  min-width: 175%;
  aspect-ratio: .8;
  transform: translateX(-50%);
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: radial-gradient(circle at 35% 30%, #d0101a, #6e0006 70%);
}

/* A prop off a fighter (main.js's FIGHTER_PROPS) — the lying shixcite's cigarette. */
.fatality-prop {
  position: absolute;
  z-index: 5;
  height: auto;
  max-width: none;
  pointer-events: none;
  transform-origin: center;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .45));
}

/* ---------- 📼 История столов ---------- */
.hist-card { max-width: 620px; width: 100%; }
.hist-card h2 { margin-bottom: .2em; }
.hist-filter.seg {
  display: inline-flex; gap: 0; padding: 3px; margin: .3em 0 .7em; border-radius: 10px;
  background: rgba(0, 0, 0, .28); border: 1px solid #333a46;
}
.hist-filter.seg button {
  background: none; border: 0; color: var(--muted); font: inherit; font-size: .9em; font-weight: 700;
  padding: .38em 1em; border-radius: 7px; cursor: pointer; transition: color .15s, background .15s;
}
.hist-filter.seg button:hover:not(.active) { color: var(--text); background: rgba(255, 255, 255, .06); }
.hist-filter.seg button.active { background: var(--gold); color: #1a1a1a; }
.ht-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(6.5em, 1fr)); gap: 6px; margin-bottom: .7em; }
.ht-sum-tile {
  display: grid; justify-items: center; gap: 1px; padding: .45em .4em; border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015)); border: 1px solid #333a46;
}
.ht-sum-tile b { font-size: 1.35em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ht-sum-tile small { color: var(--muted); font-size: .76em; }
.ht-sum-tile.win b { color: var(--gold); }
.ht-sum-tile.plus b { color: #6fe0ae; }
.ht-sum-tile.minus b { color: #ff9a8f; }
.hist-tables { display: grid; gap: 6px; max-height: min(60vh, 34em); overflow-y: auto; padding-right: 2px; }
.ht-group { display: grid; gap: 6px; }
.ht-day {
  position: sticky; top: 0; z-index: 3; padding: .5em .2em .25em; background: var(--panel); /* above the winner's face (z 1) */
  color: var(--muted); font-size: .78em; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.ht-day:first-letter { text-transform: uppercase; }
.hist-table {
  display: grid; grid-template-columns: 3.3em minmax(0, 1fr) auto auto; gap: 12px; align-items: center; text-align: left;
  padding: .55em .75em .55em .55em; border-radius: 12px; color: var(--text); font: inherit; cursor: pointer;
  background: var(--panel2); border: 1px solid #333a46; transition: border-color .15s, background .15s, transform .15s;
}
.hist-table:hover { border-color: var(--gold); background: #2c313b; }
.hist-table:active { transform: scale(.995); }
.hist-table.won { background: linear-gradient(90deg, rgba(224, 176, 76, .13), var(--panel2) 45%); border-color: rgba(224, 176, 76, .45); }
.ht-place {
  display: grid; place-items: center; align-content: center; width: 3.3em; height: 3.3em; border-radius: 50%;
  background: rgba(255, 255, 255, .05); border: 2px solid #3d4452; line-height: 1;
}
.ht-place b { font-size: 1.35em; font-variant-numeric: tabular-nums; }
.ht-place small { font-size: .62em; color: var(--muted); margin-top: 2px; }
.ht-place.p1 { border-color: #f0c45a; background: radial-gradient(circle at 35% 30%, rgba(247, 214, 120, .35), rgba(224, 176, 76, .08)); }
.ht-place.p1 b { color: #f7d678; }
.ht-place.p2 { border-color: #c4ccd8; background: rgba(196, 204, 216, .1); }
.ht-place.p3 { border-color: #cf8a52; background: rgba(207, 138, 82, .12); }
.ht-place.watch { color: var(--muted); }
.ht-place.watch .icon, .ht-place.watch img { width: 1.25em; height: 1.25em; }
.ht-main { display: grid; gap: 6px; min-width: 0; }
.ht-top { display: flex; align-items: center; gap: .5em; min-width: 0; flex-wrap: wrap; }
.ht-kind { font-weight: 800; font-size: .92em; display: inline-flex; align-items: center; gap: .25em; }
.ht-kind.rated { color: var(--gold); }
.ht-kind .icon, .ht-kind img { width: 1.05em; height: 1.05em; }
.ht-meta { color: var(--muted); font-size: .8em; font-variant-numeric: tabular-nums; }
.ht-people { display: flex; align-items: center; gap: .6em; min-width: 0; }
.ht-faces { display: flex; flex-shrink: 0; }
.ht-face { position: relative; width: 26px; height: 26px; margin-left: -5px; border-radius: 50%; box-shadow: 0 0 0 2px var(--panel2); }
.ht-face:first-child { margin-left: 0; margin-right: 3px; }
.ht-face.first { width: 30px; height: 30px; margin-top: -2px; margin-bottom: -2px; box-shadow: 0 0 0 2px #f0c45a; z-index: 1; }
.ht-face.me:not(.first) { box-shadow: 0 0 0 2px var(--accent); }
.ht-ava-wrap { position: absolute; inset: 0; display: block; }
.ht-ava { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.ht-ava.placeholder {
  display: grid; place-items: center; background: #3a4150; color: #dfe3ea; font-size: .72em; font-weight: 800;
}
.ht-more { align-self: center; margin-left: 4px; color: var(--muted); font-size: .75em; }
.ht-win { color: var(--gold); font-size: .86em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-win .icon, .ht-win img { width: 1em; height: 1em; vertical-align: -.12em; }
.ht-side { display: grid; justify-items: end; gap: 3px; min-width: 4.2em; }
.ht-net { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ht-net small { font-size: .7em; color: var(--muted); font-weight: 600; }
.ht-net.plus { color: #6fe0ae; }
.ht-net.minus { color: #ff9a8f; }
.ht-net.win { color: var(--gold); }
.ht-ko { color: var(--muted); font-size: .78em; white-space: nowrap; }
.ht-ko .icon, .ht-ko img { width: 1em; height: 1em; vertical-align: -.12em; }
.ht-play {
  display: grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 50%;
  background: rgba(255, 255, 255, .07); color: var(--muted); font-size: .8em; transition: background .15s, color .15s;
}
.hist-table:hover .ht-play { background: var(--gold); color: #1a1a1a; }
.ht-empty { padding: 1.5em 0; text-align: center; }
@media (max-width: 480px) {
  .hist-table { grid-template-columns: 2.7em minmax(0, 1fr) auto; gap: 9px; padding: .5em .55em .5em .45em; }
  .ht-play { display: none; }
  .ht-side { min-width: 0; }
  .ht-place { width: 2.7em; height: 2.7em; }
  .ht-place b { font-size: 1.1em; }
  /* the winner first: only their face, and the name in full (it wraps rather than gets cut) */
  .ht-face:not(.first), .ht-more { display: none; }
  .ht-face.first { margin-right: 0; }
  .ht-people { gap: .45em; }
  .ht-win { white-space: normal; overflow: visible; overflow-wrap: anywhere; line-height: 1.2; }
}
.hist-tables-link { display: block; width: 100%; margin-bottom: .6em; }
.hist-bar { display: grid; gap: .4em; width: min(38em, 96vw); } /* fixed width: it used to follow the step's caption, so the buttons re-wrapped from step to step */
.hist-text {
  text-align: center; font-size: .92em; color: var(--text);
  height: 1.3em; line-height: 1.3em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hist-controls { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: .4em; flex: none; }
.hist-controls > button { min-width: 2.8em; }
.hist-controls select { max-width: 22em; }
@media (max-width: 480px) {
  .hist-controls select { max-width: 100%; flex: 1 1 100%; order: 9; }
}
.hist-legend { text-align: center; font-size: .78em; color: var(--muted); }
/* phone: the step buttons stay pinned to the bottom of the screen — under the hand list they could only be reached by scrolling */
@media (max-width: 860px) {
  .hist-bar .hist-controls {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; flex-wrap: nowrap; justify-content: space-between; gap: .3em;
    padding: .45em .5em calc(.45em + env(safe-area-inset-bottom)); background: rgba(16, 18, 22, .96); border-top: 1px solid #2c303a;
    box-shadow: 0 -6px 18px rgba(0, 0, 0, .45);
  }
  .hist-bar .hist-controls > button { flex: 1 1 0; min-width: 0; padding: .45em .2em; }
  .hist-bar .hist-controls .hc-l { display: none; }
  .hist-bar .hist-legend { display: none; }
  body:has(.hist-bar) .table-page { padding-bottom: calc(3.6em + env(safe-area-inset-bottom)); }
}
.hist-hot.active { background: var(--gold); color: #1a1a1a; }

/* ---------- 🎬 Ривер крупным планом (playRiverDrama) ---------- */
.river-drama {
  position: fixed; inset: 0; z-index: 62; pointer-events: none;
  background: rgba(0, 0, 0, 0); transition: background .45s ease;
}
.rd-pos { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); perspective: 1400px; }
.river-drama.in { background: rgba(0, 0, 0, .62); }
.river-drama.out { background: rgba(0, 0, 0, 0); transition: background .5s ease; }
.rd-card {
  --w: min(38vw, 30vh, 210px);
  position: relative; width: var(--w); height: calc(var(--w) * 1.4);
  transform-style: preserve-3d;
  opacity: 0; transform: translateY(40px) scale(.55);
  transition: transform .52s cubic-bezier(.2, .8, .25, 1.15), opacity .3s ease;
}
.river-drama.in .rd-card { opacity: 1; transform: none; }
.river-drama.in .rd-card.flipped { transform: rotateY(180deg); transition: transform 1.15s cubic-bezier(.45, .05, .25, 1); }
.river-drama.out .rd-card, .river-drama.out .rd-card.flipped { transition: transform .56s cubic-bezier(.55, 0, .7, .4); }
.rd-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.rd-front { transform: rotateY(180deg); }
.rd-face .playing-card {
  width: 100%; height: 100%;
  font-size: calc(var(--w) * .34); border-radius: calc(var(--w) * .085);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .65), 0 0 0 1px rgba(0, 0, 0, .25);
}
.rd-front .playing-card { box-shadow: 0 18px 50px rgba(0, 0, 0, .65), 0 0 34px rgba(255, 215, 120, .45); }
@media (prefers-reduced-motion: reduce) {
  .rd-card, .river-drama.in .rd-card.flipped, .river-drama.out .rd-card { transition-duration: .01s; }
}

/* ---------- Safari: cheap versions of the per-frame effects (see IS_SAFARI in main.js) ---------- */
/* A drop-shadow on a big moving sprite (and blur/glow filters on particles) is redrawn every frame in
   WebKit — the fatality dropped frames in Safari only. */
html.safari .fatality-fighter img,
html.safari .fx-star svg,
html.safari .fx-dust,
html.safari .fx-ko,
html.safari .v-smoke,
html.safari .seat-reaction { filter: none; }
/* Phones (a touch screen up to tablet width), in any browser: the same — a Redmi Note 13 lost 20–28
   frames in the 5 s of a strike with the fighters' drop-shadows and the particles' glow, 7–10 with
   ?lite=1 (Cursor's measurement, 2026-10-07). Pure CSS, so no script has to know the device. The felt,
   rail and table shadow keep theirs: they sit on their own GPU layer and are painted once. */
@media (pointer: coarse) and (max-width: 1000px) {
  .fatality-fighter img,
  .fx-star svg,
  .fx-dust,
  .fx-ko,
  .v-smoke,
  .seat-reaction,
  .champ-crown,
  .v-crown { filter: none; }
}
/* The one silent, invisible finish Safari runs after a page load (maybeWarmFatality). */
.fatality-layer.warmup { opacity: 0 !important; pointer-events: none !important; }

/* ?lite=1 — the GPU-heavy dressing off, for comparing a phone's frame rate (see main.js). */
html.lite *, html.lite *::before, html.lite *::after {
  box-shadow: none !important; text-shadow: none !important; filter: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
html.lite .table-oval::before { background-image: none !important; background-color: #1d5a33 !important; border-color: #5a3a22 !important; }

/* ---------- desktop: the journal/chat column folds away to a strip (S.sideHidden) ---------- */
.side-hide, .side-show { display: none; }
/* The replay has no sticker row, and without it the stage was taller than at a live table: the oval then grew until the open
   panel's width stopped it, its shape changed and the seats left the spots set in the editor. The row keeps its place, unseen. */
.hist-packs-hold { display: none; }
@media (min-width: 861px) {
  .hist-packs-hold { display: block; visibility: hidden; padding-bottom: 19px; } /* + the pre-action row, less the replay bar's extra height */
  .sidebar-col { position: relative; }
  .side-hide {
    display: block; position: absolute; top: .3em; right: .3em; z-index: 2;
    padding: .1em .55em; background: transparent; color: var(--muted); font-size: .95em;
  }
  .side-hide:hover { color: var(--text); background: var(--panel2); }
  .table-page.side-hidden { grid-template-columns: minmax(0, 1fr) 42px; }
  .table-page.side-hidden .sidebar-col > :not(.side-show) { display: none; }
  .table-page.side-hidden .side-show {
    display: flex; flex-direction: column; align-items: center; gap: .6em;
    width: 100%; height: 100%; padding: .7em 0; border-radius: 10px;
    background: var(--panel); color: var(--muted);
  }
  .side-show:hover { color: var(--text); }
  .side-show-label { writing-mode: vertical-rl; font-size: .85em; letter-spacing: .04em; }
  .side-unread {
    background: var(--accent); color: #fff; border-radius: 999px;
    min-width: 1.6em; padding: .1em .4em; font-size: .75em; text-align: center;
  }
}

/* ---------- phone, portrait: the raise bar as a grid ----------
   % of the pot / big equal Фолд · Колл · Рейз / the slider, the amount and Ва-банк — three rows as
   before, but nothing runs off a narrow screen and the main buttons are easy to hit. */
@media (max-width: 480px) {
  .action-bar.can-raise { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .32em; }
  .action-bar.can-raise .raise-pct-row { grid-column: 1 / -1; }
  .action-bar.can-raise .action-row,
  .action-bar.can-raise .allin-row { display: contents; }
  .action-bar.can-raise .action-row > button,
  .action-bar.can-raise .allin-row > button {
    padding: .55em .25em; font-size: .9em; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  }
  .action-bar.can-raise .action-row > [data-act="fold"] { grid-row: 2; grid-column: 1 / span 2; }
  .action-bar.can-raise .action-row > [data-act="check"],
  .action-bar.can-raise .action-row > [data-act="call"] { grid-row: 2; grid-column: 3 / span 2; }
  .action-bar.can-raise #raiseBtn { grid-row: 2; grid-column: 5 / span 2; }
  .action-bar.can-raise input[type=range] { grid-row: 3; grid-column: 1 / span 3; width: 100%; min-width: 0; align-self: center; }
  .action-bar.can-raise .raise-amount-box { grid-row: 3; grid-column: 4; width: 100%; box-sizing: border-box; }
  .action-bar.can-raise .allin-row > [data-act="allin"] { grid-row: 3; grid-column: 5 / span 2; }
}

/* ---------- phone, landscape: the whole bar on one line, so it doesn't cover your own cards ---------- */
@media (orientation: landscape) and (max-height: 520px) and (max-width: 1100px) {
  .action-bar { flex-wrap: nowrap; }
  .action-bar button { font-size: .8em; padding: .3em .55em; }
  .raise-pct-row { gap: .15em; flex: 0 0 auto; }
  .action-row { flex: 1 1 auto; min-width: 0; gap: .25em; overflow: visible; }
  .allin-row { width: auto; }
  .action-bar input[type=range] { flex: 1 1 40px; min-width: 40px; }
  .action-bar .amount { width: 3.4em; font-size: .85em; }
  .action-bar:has(.time-bank) { padding-bottom: .22em; }
  .time-bank { top: auto; bottom: calc(100% + 2px); right: .5em; left: auto; }
}

/* ---------- lobby: create / tables being played on the left, me / rating / finished tables on the right ---------- */
.lobby {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1em; align-items: start;
  width: 100%; max-width: 1120px; margin: 0 auto; padding: 1em;
}
.lobby .card-box { width: auto; padding: 1.1em 1.2em; }
.lobby .card-box h2 { font-size: 1.1em; margin: 0 0 .7em; display: flex; align-items: center; gap: .45em; }
.lobby-offline { grid-column: 1 / -1; margin: 0; }
.lobby-main, .lobby-side { display: flex; flex-direction: column; gap: 1em; min-width: 0; }
.h2-count { font-size: .75em; color: var(--muted); background: var(--panel2); border-radius: 999px; padding: .05em .55em; }
.h2-link { margin-left: auto; font-size: .78em; font-weight: 500; }
.lobby-start { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 1em; }
.start-create {
  display: flex; align-items: center; gap: .9em; text-align: left; cursor: pointer;
  font: inherit; color: var(--text); border: 1px solid rgba(212, 169, 58, .5);
  background: linear-gradient(135deg, #2a2516, var(--panel) 60%);
}
.start-create:hover { border-color: var(--gold); }
.start-create b { font-size: 1.12em; }
.start-code { display: flex; flex-direction: column; justify-content: center; gap: .45em; }
.start-code .row-inline input { min-width: 0; }

.live-empty { margin: .2em 0; }
.live-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .7em; }
.live-table {
  display: flex; flex-direction: column; gap: .5em; padding: .8em .9em;
  background: var(--panel2); border: 1px solid rgba(255,255,255,.06); border-radius: 12px;
}
.lt-head { display: flex; align-items: center; justify-content: space-between; gap: .5em; }
.lt-kind { font-weight: 700; font-size: .92em; }
.lt-status { font-size: .72em; font-weight: 700; border-radius: 999px; padding: .12em .6em; white-space: nowrap; }
.lt-live { background: rgba(46, 160, 114, .2); color: #6fe0ae; }
.lt-wait { background: rgba(224, 176, 76, .16); color: var(--gold); }
.lt-paused { background: rgba(61, 139, 253, .18); color: #8db8ff; }
.lt-done { background: rgba(255,255,255,.08); color: var(--muted); }
.lt-meta { font-size: .85em; color: var(--muted); }
.lt-meta b { color: var(--text); }
.lt-seats { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 30px; }
.lt-seat.out { opacity: .35; }
/* The lobby's avatars: same photo-over-letter stack as .hdr-avatar (see avatarHtml), three sizes. */
.lt-avatar-wrap, .lobby-me-avatar-wrap, .ltr-avatar-wrap { position: relative; display: block; flex-shrink: 0; }
.lt-avatar-wrap { width: 28px; height: 28px; }
.lobby-me-avatar-wrap { width: 44px; height: 44px; }
.ltr-avatar-wrap { width: 26px; height: 26px; }
.lt-avatar, .lobby-me-avatar, .ltr-avatar {
  position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover; border: 1px solid #3a3f4a; display: block; box-sizing: border-box;
}
.lt-avatar.placeholder, .lobby-me-avatar.placeholder, .ltr-avatar.placeholder {
  display: grid; place-items: center; font-weight: 700; background: #1f232b; color: var(--gold);
}
.lt-avatar.placeholder { font-size: .75em; }
.lobby-me-avatar.placeholder { font-size: 1.1em; }
.ltr-avatar.placeholder { font-size: .7em; }
.lt-free { font-size: .75em; color: var(--muted); padding: 0 .3em; }
.lt-foot { display: flex; align-items: center; justify-content: space-between; gap: .5em; margin-top: auto; }
.lt-btns { display: flex; gap: .35em; }
.lt-btns .mini { padding: .35em .75em; }

.lobby-me-head {
  display: flex; align-items: center; gap: .7em; width: 100%; text-align: left;
  background: transparent; padding: 0; color: var(--text); font: inherit;
}
.lobby-me-head:hover b { color: var(--gold); }
.lobby-elo { display: grid; grid-template-columns: 1fr 1fr; gap: .5em; margin-top: .9em; }
.lobby-elo > div { display: flex; flex-direction: column; gap: .1em; background: var(--panel2); border-radius: 10px; padding: .5em .7em; }
.lobby-elo .hint { font-size: .72em; }
.lobby-elo b { font-size: 1.25em; color: var(--gold); }
.elo-title { font-size: .75em; color: var(--muted); }
.lobby-form { margin-top: .8em; }
.lobby-form > .hint { font-size: .75em; display: block; margin-bottom: .35em; }
.form-chips { display: flex; gap: .3em; flex-wrap: wrap; }
.form-chip {
  min-width: 2.6em; padding: .3em .45em; border-radius: 8px; font-weight: 700; font-size: .9em;
  background: var(--panel2); color: var(--text); border: 1px solid transparent;
}
.form-chip small { font-weight: 400; color: var(--muted); font-size: .75em; }
.form-chip .form-tour { color: #c5a0ed; font-size: .62em; font-weight: 700; margin-left: 1px; }
.form-chip.win { border-color: var(--gold); background: rgba(224, 176, 76, .14); }
.form-chip.plus { color: #6fe0ae; }
.form-chip.minus { color: #ff9a8f; }
.form-chip:disabled { opacity: 1; cursor: default; }

.lobby-top-row, .lobby-recent-row {
  display: flex; align-items: center; gap: .55em; width: 100%; text-align: left;
  background: transparent; color: var(--text); font: inherit; padding: .4em .3em; border-radius: 8px;
}
.lobby-top-row:hover, .lobby-recent-row:hover { background: rgba(255,255,255,.05); }
.ltr-medal { width: 1.4em; text-align: center; }
.ltr-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ltr-elo { color: var(--gold); }
.lobby-recent-row { display: grid; grid-template-columns: auto 1fr auto; font-size: .88em; }
.lobby-recent-row > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 900px) {
  .lobby { grid-template-columns: minmax(0, 1fr); padding: .75em; gap: .75em; }
  /* One column: create and the tables first, then me, the rating and the finished tables. */
  .lobby-side { display: contents; }
}
@media (max-width: 560px) {
  .lobby-start { grid-template-columns: minmax(0, 1fr); gap: .75em; }
  .live-tables { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- profile: photo, avatar and fighter behind "✎ Настроить профиль" ---------- */
.profile-edit-btn { margin-top: .3em; }
.profile-edit {
  display: flex; flex-direction: column; align-items: center; gap: .6em;
  width: 100%; margin-top: .6em; padding: .8em; box-sizing: border-box;
  background: var(--panel2); border-radius: 12px;
}
.profile-edit .default-avatars, .profile-edit .fighter-picker { margin: 0; }

/* ---------- "🎨 Вид стола" (applyLook in main.js puts these on <html>) ---------- */
html[data-felt="blue"] { --felt-img: url("/img/felt-blue.jpg?v=1"); }
html[data-felt="red"] { --felt-img: url("/img/felt-red.jpg?v=1"); }
html[data-felt="purple"] { --felt-img: url("/img/felt-purple.jpg?v=1"); }
html[data-felt="graphite"] { --felt-img: url("/img/felt-graphite.jpg?v=1"); }

/* Card faces: the artwork of a card look that has it (LOOK_ART in main.js; html[data-face] once it has loaded).
   The artwork of an ace / court card sits in the middle; the corner index stays CSS text on top of it.
   Three sizes: full picture on a card ≥46 px wide, the small emblem at 27–45 px (journal, history, a phone's
   board), nothing on the tiniest cards (their CSS pip comes back). */
.playing-card .art { display: none; }
html[data-face] .playing-card.has-art .art {
  display: block; position: absolute; inset: 13% 9%; z-index: 1; pointer-events: none;
  background: var(--art-full) center / contain no-repeat;
}
/* the middle a card look draws (its big suit .ctr, Покерная's court picture .fc) gives way to the set's picture the same way as .pip.mid */
html[data-face] .playing-card.has-art :is(.pip.mid, .cx .ctr, .cx .fc) { visibility: hidden; }
html[data-face] .log-cards .playing-card.has-art .art, html[data-face] .hist-community .playing-card.has-art .art,
html[data-face] .hist-cards .playing-card.has-art .art, html[data-face] .outs-row .playing-card.has-art .art { background-image: var(--art-small); }
@media (max-width: 480px), (orientation: landscape) and (max-height: 520px) and (max-width: 1100px) {
  /* a phone: no pictures on the look's cards at all (the cards are too small: the rank over the picture read as a mess), the look's own
     big suit stays; the picker's «Картинки» switch is not shown there */
  html[data-face] .playing-card.has-art .art { display: none !important; }
  html[data-face] .playing-card.has-art :is(.pip.mid, .cx .ctr, .cx .fc) { visibility: visible !important; }
  .look-box.art-box { display: none; }
}

/* Card looks picked in «Вид и настройки» → «Вид карт» (LOOK_CARDS in main.js). «Исходные» is the plain .playing-card above; the others
   are a class on the card (cs-<id>, cardHtml) and draw its .cx layer instead of the .pip text: the rank in a system sans and the suits
   as SVG masks (the same on every phone, never an emoji). Sizes are in cqw — the card is its own container — so one design fits a
   20 px journal card and the river's full-screen one. A card under 60 px wide (a phone) keeps one big index instead of two tiny ones. */
.playing-card .cx { display: none; }
.playing-card.s-s { --su: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 4C70 24 95 40 95 61c0 14-10 23-22 23-8 0-15-4-19-10 1 9 5 17 13 22H33c8-5 12-13 13-22-4 6-11 10-19 10C15 84 5 75 5 61 5 40 30 24 50 4z'/%3E%3C/svg%3E"); }
.playing-card.s-h { --su: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 92C22 70 5 53 5 32 5 17 16 7 29 7c10 0 17 6 21 14 4-8 11-14 21-14 13 0 24 10 24 25 0 21-17 38-45 60z'/%3E%3C/svg%3E"); }
.playing-card.s-d { --su: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 3c10 17 23 33 40 47C73 64 60 80 50 97 40 80 27 64 10 50 27 36 40 20 50 3z'/%3E%3C/svg%3E"); }
.playing-card.s-c { --su: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='27' r='21'/%3E%3Ccircle cx='26' cy='58' r='21'/%3E%3Ccircle cx='74' cy='58' r='21'/%3E%3Ccircle cx='50' cy='52' r='12'/%3E%3Cpath d='M45 55c0 20-5 31-13 40h36c-8-9-13-20-13-40z'/%3E%3C/svg%3E"); }
.playing-card:not(.back):not(.board-slot) { container-type: inline-size; }
/* «Исходные» at full size: the corner index sat in a column half the card wide, so its small suits ran into the middle pip (on a
   50 px desktop card too). A narrower column keeps the index at the edges and a slightly smaller middle suit clears them. */
.playing-card:not(.cs) > .pip:is(.tl, .br) { width: 1.3em; }
.playing-card:not(.cs) > .pip.mid { font-size: 1.45em; transform: translateY(-.04em); }
.playing-card.big:not(.cs) > .pip.mid { font-size: 1.5em; transform: none; }
/* «Исходные» on a small card (a phone, the journal): the two corners and the middle suit don't fit — the corners ran into the middle
   pip. Below 44 px the card shows the journal's compact face instead, the rank over the suit in the middle, in its own serif. */
@container (max-width: 43.9px) {
  .playing-card:not(.cs) > .pip.mid,
  .playing-card:not(.cs) > .pip.br { display: none; }
  .playing-card:not(.cs) > .pip.tl {
    position: static; width: auto; transform: none; letter-spacing: -.03em; font-size: 54cqw; font-weight: 700; line-height: 1;
  }
  .playing-card:not(.cs) > .pip.tl small { display: block; font-size: .95em; margin-top: 1px; line-height: 1; font-weight: 400; }
}
.playing-card.cs > .pip, .playing-card.cs > .art { display: none; }
.playing-card.cs > .cx { display: block; position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.cx .pp, .cx .fc { display: none; }
.cx .su { display: block; background: currentColor; -webkit-mask: var(--su) center / contain no-repeat; mask: var(--su) center / contain no-repeat; }
.cx .ix { position: absolute; width: 28cqw; display: flex; flex-direction: column; align-items: center; }
.cx .ix b { font: 800 27cqw / .9 system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; letter-spacing: -.06em; }
.cx .ix .su { width: 17cqw; height: 17cqw; margin-top: 2.5cqw; }
.cx .tl { left: 3.5cqw; top: 5cqw; }
.cx .br { right: 3.5cqw; bottom: 5cqw; transform: rotate(180deg); }
.cx .ctr { position: absolute; left: 50%; top: 50%; width: 42cqw; height: 42cqw; transform: translate(-50%, -50%); }
@container (max-width: 59px) {
  :is(.cs-classic, .cs-dark, .cs-black) .cx .br { display: none; }
  :is(.cs-classic, .cs-dark, .cs-black) .cx .tl { left: 6cqw; top: 5cqw; width: auto; }
  :is(.cs-classic, .cs-dark, .cs-black) .cx .ix b { font-size: 40cqw; }
  :is(.cs-classic, .cs-dark, .cs-black) .cx .ix .su { width: 24cqw; height: 24cqw; }
  :is(.cs-classic, .cs-dark, .cs-black) .cx .ctr { left: auto; top: auto; right: 7cqw; bottom: 8cqw; width: 50cqw; height: 50cqw; transform: none; }
}
/* Классика: white, both corners, a big suit in the middle */
.playing-card.cs-classic { background: #fff; color: #111; }
.playing-card.cs-classic.red { color: #d0102b; }
/* Цветная кромка: warm paper, a frame in the suit's colour, a big rank top-left and a big suit bottom-right */
.playing-card.cs-edge { background: linear-gradient(160deg, #fffdf7, #f1e7d1); color: #13161c; }
.playing-card.cs-edge.red { color: #d0102b; }
.cs-edge .cx::before { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 max(1px, 2.5cqw) currentColor; }
.cs-edge .cx .br, .cs-edge .cx .ix .su { display: none; }
.cs-edge .cx .tl { left: 8cqw; top: 6cqw; width: auto; align-items: flex-start; }
.cs-edge .cx .tl b { font-size: 50cqw; letter-spacing: -.07em; }
.cs-edge .cx .ctr { left: auto; top: auto; right: 7cqw; bottom: 8cqw; width: 58cqw; height: 58cqw; transform: none; }
/* Тёмная: laid out like Классика, always four colours (above the 4-colour deck's own inks) */
.playing-card.cs-dark { background: linear-gradient(160deg, #2e3340, #14161c); }
.cs-dark .cx::before { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.playing-card.cs-dark.s-s:not(.back) { color: #f5f5f5; }
.playing-card.cs-dark.s-h:not(.back) { color: #ff4d5e; }
.playing-card.cs-dark.s-d:not(.back) { color: #4fa6ff; }
.playing-card.cs-dark.s-c:not(.back) { color: #45d97c; }
/* Чёрная: laid out like Классика on black, gold spades, red hearts, blue diamonds, green clubs (always four colours, like Тёмная) */
.playing-card.cs-black { background: linear-gradient(160deg, #1b1a19, #070707); }
.cs-black .cx::before { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(230, 195, 106, .25); }
.playing-card.cs-black.s-s:not(.back) { color: #e6c36a; }
.playing-card.cs-black.s-h:not(.back) { color: #ff5a5a; }
.playing-card.cs-black.s-d:not(.back) { color: #3d8bff; }
.playing-card.cs-black.s-c:not(.back) { color: #35c96c; }

/* ---- The decks laid out like a real one: Покерная, Ретро, Золото (and Мультяшная, one big suit like its picture). On a card ≥50 px
   wide a number card has its suits in the real spots (cardHtml's PIP_SPOTS, .pp); an ace — and on Ретро and Золото a court card too —
   one big suit (.ctr); a court card of Покерная its picture in a frame, of Ретро its picture lying straight on the card (.fc, --court-<look> from cardHtml; «Без картинок»,
   html.courts-plain, keeps the big suit). Under 50 px (a phone, the journal) every card shows the compact face: a big
   rank over its suit in the middle. Inks are under :where() so the 4-colour deck (below) still recolours diamonds and clubs. ---- */
@font-face { font-family: 'Card Oswald'; src: url('/fonts/card-oswald.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Card Slab'; src: url('/fonts/card-slab.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Card Playfair'; src: url('/fonts/card-playfair.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Card Baskerville'; src: url('/fonts/card-baskerville.woff2') format('woff2'); font-display: swap; }
.playing-card:is(.cs-poker, .cs-retro, .cs-gold).rk-n .cx .ctr { display: none; }
.playing-card:is(.cs-poker, .cs-retro, .cs-gold).rk-n .cx .pp { display: block; position: absolute; width: var(--pp); height: var(--pp); transform: translate(-50%, -50%); }
.cx .pp > .su { width: 100%; height: 100%; }
/* the pips grow when there are few of them: on a screen the real deck's ~17 % pips are a scatter of dots */
.playing-card.pg-a { --pp: 28cqw; }
.playing-card.pg-b { --pp: 22cqw; }
.playing-card.pg-c { --pp: 20cqw; }
.playing-card.pg-d { --pp: 18.5cqw; }
.playing-card:is(.cs-poker, .cs-retro, .cs-gold) .cx .pp.dn { transform: translate(-50%, -50%) rotate(180deg); }
.playing-card.cs-poker { --court: var(--court-poker); --court4: var(--court4-poker); }
.playing-card.cs-retro { --court: var(--court-retro); --court4: var(--court4-retro, var(--court-retro)); }
.playing-card:is(.cs-poker, .cs-retro).rk-f .cx .ctr { display: none; }
.playing-card:is(.cs-poker, .cs-retro).rk-f .cx .fc {
  display: block; position: absolute; inset: 20% 24%; border-radius: 3cqw; /* the picture's 0.62 shape, clear of the jumbo index */
  background: var(--court) center / 100% 100% no-repeat; box-shadow: inset 0 0 0 max(1px, .9cqw) var(--court-edge, #1c1c1c);
}
/* Ретро's figure has no frame and no paper of its own: it lies on the card's pattern, with a thin paper halo so it stands off it */
.playing-card.cs-retro.rk-f .cx .fc { inset: 21.8% 25.5%; border-radius: 0; box-shadow: none; filter: drop-shadow(0 0 1.4cqw #f6efdc) drop-shadow(0 0 .5cqw #f6efdc); }
.cs-retro.rk-f .cx::before { -webkit-mask: radial-gradient(ellipse 46% 50% at 50% 50%, rgba(0, 0, 0, .35) 40%, #000 100%); mask: radial-gradient(ellipse 46% 50% at 50% 50%, rgba(0, 0, 0, .35) 40%, #000 100%); }
/* the 4-colour deck: diamonds' and clubs' pictures with blue / green suits (the «Колода» previews force either one) */
html.deck4 .playing-card.rk-f:is(.s-d, .s-c) .cx .fc, .deck-4 .playing-card.rk-f:is(.s-d, .s-c) .cx .fc { background-image: var(--court4); }
.look-cards.deck-2 .playing-card.rk-f:is(.s-d, .s-c) .cx .fc { background-image: var(--court); }
/* «Фигуры: без картинок» (html.courts-plain; the window's previews force either one — .courts-pv, as html carries .courts-plain
   too): a court card keeps one big suit */
:is(html.courts-plain .playing-card:not(.courts-pic *), .courts-pv.courts-plain .playing-card):is(.cs-poker, .cs-retro).rk-f .cx .fc { display: none; }
:is(html.courts-plain .playing-card:not(.courts-pic *), .courts-pv.courts-plain .playing-card):is(.cs-poker, .cs-retro).rk-f .cx .ctr { display: block; }
/* … and on a look with artwork (Золото, LOOK_ART) its pictures go, the look's own big suit comes back */
:is(html.courts-plain .playing-card:not(.courts-pic *), .courts-pv.courts-plain .playing-card).has-art .art { display: none !important; }
:is(html.courts-plain .playing-card:not(.courts-pic *), .courts-pv.courts-plain .playing-card).has-art .cx .ctr { visibility: visible !important; }
.cs-poker.rk-f .cx .ctr { width: 44cqw; height: 44cqw; }
/* a jumbo index, like a poker deck's: the corner is what is read at a glance */
.playing-card:is(.cs-poker, .cs-retro, .cs-gold) .cx .ix { width: 22cqw; }
.playing-card:is(.cs-poker, .cs-retro, .cs-gold) .cx .ix .su { width: 16cqw; height: 16cqw; margin-top: 2cqw; }
.cs-toon .cx .ix { width: 18cqw; }
.cs-toon .cx .ix .su { width: 13cqw; height: 13cqw; margin-top: 2cqw; }
.playing-card.r10:is(.cs-poker, .cs-toon, .cs-retro, .cs-gold) .cx .ix b { letter-spacing: -.02em; margin-left: 0; } /* Keep both digits of «10» fully visible */
@container (max-width: 49.9px) {
  .playing-card:is(.cs-poker, .cs-toon, .cs-retro, .cs-gold) .cx :is(.pp, .fc, .ctr, .br) { display: none !important; }
  .playing-card:is(.cs-poker, .cs-toon, .cs-retro, .cs-gold) .cx .tl { inset: 0; width: auto; justify-content: center; }
  .playing-card:is(.cs-poker, .cs-toon, .cs-retro, .cs-gold) .cx .tl b { font-size: 50cqw; }

  .playing-card:is(.cs-poker, .cs-toon, .cs-retro, .cs-gold) .cx .tl .su { width: 34cqw; height: 34cqw; margin-top: 4cqw; }
  .cs-retro .cx::before { opacity: .32; } /* a small card: the pattern fades so the rank reads */
}
/* Покерная: a casino deck — white, a hairline edge, a narrow upright rank, the suits in their spots */
.playing-card.cs-poker { background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .4), 0 0 0 1px rgba(0, 0, 0, .22); }
.playing-card:where(.cs-poker) { color: #141414; }
.playing-card.red:where(.cs-poker) { color: #df0000; } /* the red of the court pictures */
.cs-poker .cx .ix b { font: 400 30cqw / .95 'Card Oswald', 'Arial Narrow', sans-serif; letter-spacing: -.02em; }
.cs-poker .cx .tl { left: 2cqw; top: 4cqw; }
.cs-poker .cx .br { right: 2cqw; bottom: 4cqw; }
.cs-poker.rk-a .cx .ctr { width: 36cqw; height: 36cqw; }
/* a big card (50 px and wider: every card of a computer's table; a phone's are narrower) needs no jumbo index to be read: a smaller one leaves room for a bigger court picture */
@container (min-width: 50px) {
  .playing-card:is(.cs-poker, .cs-retro) .cx .ix { width: 17cqw; }
  .playing-card:is(.cs-poker, .cs-retro) .cx .ix .su { width: 12cqw; height: 12cqw; margin-top: 1.5cqw; }
  :is(.cs-poker, .cs-retro) .cx .ix b { font-size: 23cqw; }
  .playing-card.r10.cs-retro .cx .ix b { font-size: 19.5cqw; } /* «10» is two letters wide: it must clear the first pips */
  .playing-card.cs-poker.rk-f .cx .fc { inset: 15.5% 20%; }
  .playing-card.cs-retro.rk-f .cx .fc { inset: 14% 17%; } /* no frame to clear: the figure may be bigger, Playfair's K and Q are wider than Oswald's */
}

/* Мультяшная: a cartoon card — a thick black outline, a grey edge on the right and the bottom, flat suits, a book serif */
.playing-card.cs-toon { background: #fff; border-radius: 9% / 6.4%; /* % not cqw: on the card itself cqw would measure its parent */ box-shadow: 0 3px 8px rgba(0, 0, 0, .35); }
.playing-card:where(.cs-toon) { color: #111; }
.playing-card.red:where(.cs-toon) { color: #ed1c24; }
.cs-toon .cx::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 max(1.5px, 3.4cqw) #1b1b1b, inset -8cqw -8cqw 0 0 #dedede;
}
.cs-toon .cx .ix b { font: 400 22cqw / .95 'Card Baskerville', 'Times New Roman', Times, serif; letter-spacing: -.03em; }
.cs-toon .cx .tl { left: 9cqw; top: 9cqw; }
.cs-toon .cx .br { right: 13cqw; bottom: 13cqw; }
.cs-toon .cx .ctr { width: 54cqw; height: 54cqw; left: 47%; top: 49%; }

/* Ретро: cream paper under a faded, worn pattern (checks, harlequin diamonds, plaid, tiles, dots — picked per card by rp-0..4 in
   one of four colour pairs rc-0..3), hatched suits, an old-style serif */
.playing-card.cs-retro { background: #f6efdc; box-shadow: 0 3px 8px rgba(0, 0, 0, .4), 0 0 0 1px rgba(90, 60, 40, .35); }
.playing-card:where(.cs-retro) { color: #1a1a1a; }
.playing-card.red:where(.cs-retro) { color: #8e2430; }
.cs-retro.rc-0 { --pa: #9db3ab; --pb: #c96f45; }
.cs-retro.rc-1 { --pa: #5f9294; --pb: #dba653; }
.cs-retro.rc-2 { --pa: #e59c86; --pb: #a9bdb4; }
.cs-retro.rc-3 { --pa: #8b9fb0; --pb: #b8603c; }
.cs-retro .cx::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; opacity: .68;
  background: conic-gradient(var(--pa) 25%, transparent 0 50%, var(--pa) 0 75%, transparent 0) 0 0 / 25cqw 25cqw;
}
.cs-retro.rp-1 .cx::before { background: conic-gradient(from 45deg, var(--pa) 25%, transparent 0 50%, var(--pb) 0 75%, transparent 0) 0 0 / 34cqw 46cqw; }
.cs-retro.rp-2 .cx::before {
  background: repeating-linear-gradient(90deg, var(--pa) 0 16cqw, transparent 0 33cqw),
    repeating-linear-gradient(0deg, color-mix(in srgb, var(--pb) 70%, transparent) 0 16cqw, transparent 0 33cqw);
}
.cs-retro.rp-3 .cx::before { background: conic-gradient(var(--pb) 25%, transparent 0 50%, var(--pa) 0 75%, transparent 0) 0 0 / 50cqw 50cqw; }
.cs-retro.rp-4 .cx::before { background: radial-gradient(circle, var(--pa) 0 30%, transparent 31%) 0 0 / 25cqw 25cqw; }
.cs-retro .cx::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: url('/img/cards/retro-wear.png?v=1') 0 0 / 110cqw;
}
.cs-retro.rc-1 .cx::after, .cs-retro.rc-3 .cx::after { background-position: 40% 60%; }
.cs-retro .cx .su { background: currentColor; }
/* hatching only on the one big suit; the pips are solid with a paper halo, so they stand off the pattern */
.cs-retro .cx .ctr {
  background: repeating-linear-gradient(115deg, currentColor 0 1.8cqw, color-mix(in srgb, currentColor 72%, #f6efdc) 1.8cqw 2.8cqw);
}
.cs-retro .cx .pp::before {
  content: ''; position: absolute; inset: -16%; background: #f6efdc;
  -webkit-mask: var(--su) center / contain no-repeat; mask: var(--su) center / contain no-repeat;
}
.cs-retro .cx .pp > .su { position: relative; }
/* and the pattern fades towards the middle of a number card, under the pips */
.cs-retro.rk-n .cx::before {
  -webkit-mask: radial-gradient(ellipse 48% 44% at 50% 50%, rgba(0, 0, 0, .3) 35%, #000 100%);
  mask: radial-gradient(ellipse 48% 44% at 50% 50%, rgba(0, 0, 0, .3) 35%, #000 100%);
}
.cs-retro .cx .ix b { font: 700 30cqw / .95 'Card Playfair', Georgia, 'Times New Roman', serif; letter-spacing: -.02em; font-variant-numeric: lining-nums; }
.cs-retro .cx .tl { left: 5cqw; top: 5cqw; } /* off the card's edge: the worn paper's border and the rank must not touch */
.cs-retro .cx .br { right: 5cqw; bottom: 5cqw; }
.playing-card.cs-retro .cx .ix .su { margin-top: 4.5cqw; } /* Playfair's Q has a tail and J drops below the line: the suit must not touch them */
.playing-card.r10.cs-retro .cx .ix { width: max-content; } /* «10» is wider than the index box: centred in it, it spilled onto the card's edge */
@container (min-width: 50px) {
  .playing-card.r10.cs-retro .cx .ix b { margin-left: 0; font-size: 20.5cqw; } /* «10»'s tight letters stay inside the margin, not pulled onto the edge */
}
.cs-retro .cx > * { z-index: 1; } /* above the wear (::after) */
.cs-retro:is(.rk-a, .rk-f) .cx .ctr { width: 58cqw; height: 58cqw; } /* aces and court cards: one big suit */

/* Золото: matte black with a fine glitter, everything in gold foil — every suit gold, told apart by its shape */
.playing-card.cs-gold {
  --gold: linear-gradient(160deg, #a77b2c 0%, #f7e29c 30%, #c99a3e 50%, #f3d78a 70%, #9a7330 100%);
  background: url('/img/cards/gold-glitter.png?v=1') 0 0 / 64px, linear-gradient(160deg, #1d1d20, #060607);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .5), 0 0 0 1px rgba(214, 178, 96, .35);
  color: #d9b45e;
}
.cs-gold .cx .su { background: var(--gold); }
.cs-gold .cx .ix b {
  font: 500 30cqw / .95 'Card Slab', 'Rockwell', Georgia, serif; letter-spacing: -.03em;
  background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cs-gold .cx .tl { left: 2cqw; top: 4cqw; }

@container (min-width: 50px) {
  .playing-card.r10.cs-gold .cx .ix b {
    font-size: 24cqw;
  }
}

/* Small-card "10" fix: keep both digits visible and centred at 40px and 22px. */
@container (max-width: 49.9px) {
  .playing-card.r10:is(.cs-poker, .cs-toon, .cs-retro, .cs-gold) .cx .tl {
    left: 50%;
    right: auto;
    width: max-content;
    max-width: none;
    transform: translateX(-50%);
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .playing-card.r10:is(.cs-poker, .cs-toon, .cs-retro, .cs-gold) .cx .tl b {
    display: inline-block;
    width: max-content;
    max-width: none;
    float: none;
    margin-left: 0;
    font-size: 44cqw;
    letter-spacing: -.06em;
    overflow: visible;
    white-space: nowrap;
  }
}

/* At 22 px, the cartoon J's descender and Q♥'s tail need a little more air above the suit.
   The two rank classes come from cardHtml; the other ranks keep their existing spacing. */
@container (max-width: 24.9px) {
  .playing-card.cs-toon:is(.r11, .r12.s-h) .cx .tl .su { margin-top: 7cqw; }
  .playing-card.r10.cs-toon .cx .tl b { font-size: 42cqw; transform: translateY(1.5cqw); }
}

.cs-gold .cx .br {
  right: 2cqw;
  bottom: 4cqw;
}

.cs-gold:is(.rk-a, .rk-f) .cx .ctr {
  width: 44cqw;
  height: 44cqw;
}

/* Gold's face artwork still covered the compact rank/suit on the 40 px and 22 px cardsheet rows. */
@container (max-width: 49.9px) {
  .playing-card.cs-gold.has-art .art {
    display: none !important;
  }
}

/* ?cardsheet=1 (main.js): the whole deck in the chosen look at four sizes */
.card-sheet { position: fixed; inset: 0; z-index: 99999; overflow: auto; padding: 10px 14px 40px; background: #1d4d35; color: #fff; font: 13px system-ui, sans-serif; }
.card-sheet-bar { position: sticky; top: -10px; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; background: #1d4d35; z-index: 1; }
.card-sheet-bar button { padding: 6px 10px; border-radius: 8px; border: 1px solid #ffffff55; background: #0003; color: #fff; cursor: pointer; }
.card-sheet-bar button.on { background: #ffd23c; color: #111; }
.card-sheet-size { margin: 12px 0 6px; opacity: .7; }
.card-sheet-row { display: flex; flex-wrap: wrap; gap: calc(var(--w) * .12); }
.card-sheet-row .playing-card { width: var(--w); height: calc(var(--w) * 1.4); flex: none; font-size: calc(var(--w) * .3); }

/* 4-colour deck: hearts red, spades black, diamonds blue, clubs green. */
html.deck4 .playing-card.s-d, .deck-4 .playing-card.s-d { color: #1f62d1; }
html.deck4 .playing-card.s-c, .deck-4 .playing-card.s-c { color: #13873a; }
.look-cards.deck-2 .playing-card.s-d { color: #c41e3a; }
.look-cards.deck-2 .playing-card.s-c { color: #111; }

/* Card backs: a .back-<id> class (the previews) or the viewer's choice on <html>. Classic red is the
   plain .playing-card.back rule. */
.playing-card.back.back-red {
  background:
    radial-gradient(circle at 50% 50%, rgba(255,220,180,.18) 0 14%, transparent 15%),
    repeating-linear-gradient(45deg, #7a1824 0 3px, #4e0f18 3px 6px);
}
/* The drawn backs (public/img/ui/back-*.webp). back-crimson is the new red; back-red stays the old
   CSS one ("Старая"). Every drawn back fills the card, which rounds its own corners. */
.playing-card.back.back-crimson, .playing-card.back.back-blue, .playing-card.back.back-black, .playing-card.back.back-green, .playing-card.back.back-purple, .playing-card.back.back-spade, .playing-card.back.back-stone,
html[data-back="crimson"] .playing-card.back:not([class*="back-"]), html[data-back="blue"] .playing-card.back:not([class*="back-"]), html[data-back="black"] .playing-card.back:not([class*="back-"]),
html[data-back="green"] .playing-card.back:not([class*="back-"]), html[data-back="purple"] .playing-card.back:not([class*="back-"]), html[data-back="spade"] .playing-card.back:not([class*="back-"]), html[data-back="stone"] .playing-card.back:not([class*="back-"]) {
  background-size: cover; background-position: center; background-repeat: no-repeat;
  box-shadow: 0 3px 8px rgba(0,0,0,.4), 0 0 0 1px rgba(0,0,0,.45);
}
.playing-card.back.back-crimson, html[data-back="crimson"] .playing-card.back:not([class*="back-"]) { background-image: url('/img/ui/back-red.webp?v=1'); }
.playing-card.back.back-blue, html[data-back="blue"] .playing-card.back:not([class*="back-"]) { background-image: url('/img/ui/back-blue.webp?v=1'); }
.playing-card.back.back-black, html[data-back="black"] .playing-card.back:not([class*="back-"]) { background-image: url('/img/ui/back-black.webp?v=1'); }
.playing-card.back.back-green, html[data-back="green"] .playing-card.back:not([class*="back-"]) { background-image: url('/img/ui/back-green.webp?v=1'); }
.playing-card.back.back-purple, html[data-back="purple"] .playing-card.back:not([class*="back-"]) { background-image: url('/img/ui/back-purple.webp?v=1'); }
.playing-card.back.back-spade, html[data-back="spade"] .playing-card.back:not([class*="back-"]) { background-image: url('/img/ui/back-spade.webp?v=1'); }
.playing-card.back.back-stone, html[data-back="stone"] .playing-card.back:not([class*="back-"]) { background-image: url('/img/ui/back-stone.webp?v=1'); }

.look-card { width: min(560px, 100%); }
.look-card h4 { margin: 1em 0 .5em; font-size: .9em; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.look-row { display: flex; flex-wrap: wrap; gap: .5em; }
.look-opt {
  display: flex; flex-direction: column; align-items: center; gap: .35em;
  padding: .55em .6em; border-radius: 10px; border: 1px solid #3a3f4a; background: var(--panel2);
  font-size: .8em; color: var(--text);
}
@media (hover: hover) { .look-opt:hover { border-color: #5a6170; } }
.look-opt.active { border-color: var(--gold); background: rgba(224,176,76,.12); }
.look-cards { display: flex; gap: 3px; font-size: 1.1em; }
.look-cards .playing-card { width: 34px; height: 48px; }
/* «Вид карт»: real cards (not the deck preview's compact layout), at a phone's size so the small-card layout shows */
.cardlook-pv { display: flex; gap: 4px; font-size: 1.1em; justify-content: center; }
.cardlook-pv .playing-card { width: 34px; height: 48px; flex: none; }
/* on a computer the picker's cards are full cards (52 px: from 50 the card shows its real layout and the court pictures), not the phone-sized
   34 px ones that read as a compact face; a phone keeps the small tiles (the phone block below) */
@media (min-width: 700px) {
  .look-opt[data-key="cards"] .cardlook-pv .playing-card, .look-opt[data-key="deck"] .look-cards .playing-card { width: 52px; height: 73px; }
  .look-opt[data-key="cards"] .cardlook-pv { font-size: 1.55em; gap: 4px; }
  .look-opt[data-key="deck"] .look-cards { font-size: 1.55em; gap: 4px; }
}
.courts-pv { display: flex; gap: 4px; justify-content: center; }
.courts-pv .playing-card { width: 58px; height: 81px; flex: none; } /* ≥50 px: big enough to show the picture */
.look-note { font-size: .78em; margin: .5em 0 0; }
.felt-swatch {
  display: block; width: 64px; height: 42px; border-radius: 21px;
  background: var(--felt-img, url("/img/felt.jpg?v=4")) center / cover;
  box-shadow: inset 0 0 0 3px #3d2618, inset 0 0 0 4px #c9a84a;
}
.felt-swatch.felt-green { --felt-img: url("/img/felt.jpg?v=4"); }
.felt-swatch.felt-blue { --felt-img: url("/img/felt-blue.jpg?v=1"); }
.felt-swatch.felt-red { --felt-img: url("/img/felt-red.jpg?v=1"); }
.felt-swatch.felt-purple { --felt-img: url("/img/felt-purple.jpg?v=1"); }
.felt-swatch.felt-graphite { --felt-img: url("/img/felt-graphite.jpg?v=1"); }
.look-opt .playing-card.big { width: 46px; height: 64px; font-size: 1.1em; }
/* A wood in the picker: a little piece of the rail, the picture tiled the way the table tiles it. */
.wood-swatch {
  display: block; width: 64px; height: 42px; border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 214, 160, .14), rgba(28, 14, 6, .38)), var(--wood-img, url("/img/wood.jpg?v=1")) center / 120px auto;
  box-shadow: inset 0 0 0 1px #1a1008;
}
/* Backs added from a list entry with a file (see LOOK_BACKS in main.js): the same treatment as the drawn ones
   above, with the picture in --back-img — set on <html> for the table's cards, on the swatch for the picker. */
.playing-card.back.back-file, html[data-back-file] .playing-card.back:not([class*="back-"]) {
  background-image: var(--back-img, none);
  background-size: cover; background-position: center; background-repeat: no-repeat;
  box-shadow: 0 3px 8px rgba(0,0,0,.4), 0 0 0 1px rgba(0,0,0,.45);
}

/* «Старая» in other colours (LOOK_BACKS entries with a [light, dark] pair): the same stripes, --back-a/--back-b. */
.playing-card.back.back-tint, html[data-back-tint] .playing-card.back:not([class*="back-"]) {
  background:
    radial-gradient(circle at 50% 50%, rgba(255,220,180,.18) 0 14%, transparent 15%),
    repeating-linear-gradient(45deg, var(--back-a) 0 3px, var(--back-b) 3px 6px);
  box-shadow: 0 3px 8px rgba(0,0,0,.4), 0 0 0 1px rgba(0,0,0,.45);
}

/* ---------- profile: "📈 Уровень игры" (playLevelHtml) ---------- */
.hero-sub { font-size: .66em; color: var(--muted); margin-top: .15em; line-height: 1.25; }
@media (max-width: 480px) { .profile-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.play-level .lvl-note { font-size: .78em; margin: 0 0 .7em; line-height: 1.4; }
.lvl-graph { background: var(--panel2); border-radius: 12px; padding: .6em .7em .4em; margin-bottom: .8em; }
.lvl-graph-tabs { display: flex; gap: .35em; margin-bottom: .4em; }
.lvl-graph-tabs .mini { font-size: .78em; padding: .3em .7em; }
.lvl-graph-tabs .mini.active { background: var(--accent); color: #fff; }
.lvl-empty { font-size: .82em; margin: .6em 0; }
.lvl-style { display: flex; flex-direction: row; align-items: center; gap: .7em; background: rgba(224,176,76,.1); border: 1px solid rgba(224,176,76,.35); border-radius: 10px; padding: .55em .8em; margin-bottom: .7em; }
.lvl-style b { color: var(--gold); }
.lvl-style span { font-size: .8em; color: var(--muted); }
.lvl-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45em; margin-bottom: .7em; }
.lvl-metric { background: var(--panel2); border-radius: 10px; padding: .5em .6em; min-width: 0; }
.lvl-label { font-size: .72em; color: var(--muted); font-weight: 700; letter-spacing: .03em; }
.lvl-gauge, .lvl-gauge.slot { width: 54px; height: 30px; display: block; margin: .2em auto 0; }
.lvl-gauge path { fill: none; stroke-width: 3.4; stroke-linecap: round; }
.lvl-gauge .track { stroke: #3e4554; }
.lvl-gauge .fill { stroke: var(--gold); }
.lvl-value { font-size: 1.2em; font-weight: 700; margin: .1em 0; }
.lvl-hint { font-size: .66em; color: var(--muted); line-height: 1.3; }
.lvl-positions { width: 100%; border-collapse: collapse; font-size: .84em; }
.lvl-positions th { text-align: left; font-weight: 600; color: var(--muted); font-size: .85em; padding: .3em .4em; border-bottom: 1px solid #333844; }
.lvl-positions td { padding: .35em .4em; border-bottom: 1px solid #2a2f39; }
.lvl-positions th:not(:first-child), .lvl-positions td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.lvl-positions td.pos { color: #6fe0ae; }
.lvl-positions td.neg { color: #ff9a8f; }
.lvl-positions td.mid { color: #e6c27a; }
.lvl-foot { font-size: .7em; margin: .45em 0 0; }
@media (max-width: 480px) { .lvl-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* The chart: series 1 blue, series 2 orange (validated on this panel, dataviz palette slots 1–2),
   the second one dashed as well, so the two never rely on colour alone. Text stays in text colours. */
.viz { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767; --so: #6b7280; }
.viz-legend { display: flex; gap: 1em; flex-wrap: wrap; font-size: .76em; color: var(--text); margin: .1em 0 .3em; }
.viz-legend span { display: inline-flex; align-items: center; gap: .4em; }
.viz-key { display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--s1); vertical-align: middle; }
.viz-key.s2 { border-top-color: var(--s2); }
.viz-key.s3 { border-top-color: var(--s3); } .viz-key.s4 { border-top-color: var(--s4); }
.viz-key.s5 { border-top-color: var(--s5); } .viz-key.s6 { border-top-color: var(--s6); }
.viz-key.s7 { border-top-color: var(--s7); } .viz-key.s8 { border-top-color: var(--s8); }
.viz-key.so { border-top-color: var(--so); }
.viz-key.dashed { border-top-style: dashed; }
.viz-chart { position: relative; touch-action: pan-y; }
.viz-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.viz-grid { stroke: rgba(255,255,255,.07); stroke-width: 1; }
.viz-grid.zero { stroke: rgba(255,255,255,.22); }
.viz-grid.vert { stroke: rgba(255,255,255,.05); }
.viz-unit { fill: var(--muted); font-size: 10px; opacity: .8; }
.viz-tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.viz-line { fill: none; stroke: var(--s1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-line.s2 { stroke: var(--s2); }
.viz-line.s3 { stroke: var(--s3); } .viz-line.s4 { stroke: var(--s4); } .viz-line.s5 { stroke: var(--s5); }
.viz-line.s6 { stroke: var(--s6); } .viz-line.s7 { stroke: var(--s7); } .viz-line.s8 { stroke: var(--s8); }
.viz-line.so { stroke: var(--so); stroke-width: 1.5; }
.viz-line.dashed { stroke-dasharray: 5 4; }
.viz-end { fill: var(--s1); stroke: var(--panel2); stroke-width: 2; }
.viz-end.s2 { fill: var(--s2); }
.viz-end.s3 { fill: var(--s3); } .viz-end.s4 { fill: var(--s4); } .viz-end.s5 { fill: var(--s5); }
.viz-end.s6 { fill: var(--s6); } .viz-end.s7 { fill: var(--s7); } .viz-end.s8 { fill: var(--s8); } .viz-end.so { fill: var(--so); }
.viz-end-label { fill: var(--text); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.viz-cross { stroke: rgba(255,255,255,.35); stroke-width: 1; }
.viz-tip {
  position: absolute; top: 4px; z-index: 2; pointer-events: none; white-space: nowrap;
  background: #11141a; border: 1px solid #3a3f4a; border-radius: 8px; padding: .35em .55em;
  font-size: .74em; color: var(--text); box-shadow: 0 4px 14px rgba(0,0,0,.45);
}
.viz-tip-head { color: var(--muted); margin-bottom: .15em; }
.viz-tip .viz-key { margin-right: .35em; }
.viz-caption { font-size: .72em; margin: .3em 0 .2em; }
.viz-table { font-size: .76em; margin-top: .2em; }
.viz-table summary { cursor: pointer; color: var(--muted); }
.viz-table table { width: 100%; border-collapse: collapse; margin-top: .3em; }
.viz-table th, .viz-table td { text-align: right; padding: .2em .3em; border-bottom: 1px solid #2a2f39; font-variant-numeric: tabular-nums; }
.viz-table th:first-child, .viz-table td:first-child { text-align: left; color: var(--muted); }

/* ---------- "Итоги стола" in the results window (tableSummaryHtml) ---------- */
.table-summary { text-align: left; margin: .8em 0; }
.table-summary h4 { margin: 1em 0 .45em; font-size: .85em; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.table-summary .viz { background: var(--panel2); border-radius: 12px; padding: .5em .7em .3em; }
.ts-awards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .45em; }
.ts-award { display: flex; gap: .55em; align-items: center; background: var(--panel2); border-radius: 10px; padding: .5em .65em; }
.ts-award-icon { font-size: 1.4em; width: 2.1em; height: 2.1em; flex: none; display: grid; place-items: center; }
.ts-award-icon .ui-art { width: 100%; height: 100%; }
.ts-award-text { display: flex; flex-direction: column; min-width: 0; font-size: .86em; }
.ts-award-text .hint { font-size: .78em; }
.ts-award-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-hands { display: flex; flex-direction: column; gap: .3em; }
.ts-hand {
  display: flex; align-items: center; gap: .55em; width: 100%; text-align: left;
  background: var(--panel2); border-radius: 9px; padding: .45em .65em; color: var(--text); font: inherit; font-size: .86em;
}
button.ts-hand:hover { background: #2f3440; }
.ts-hand-no { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 2.6em; }
.ts-hand-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ts-hand-text .hint { font-size: .85em; }
.ts-hand-go { color: var(--muted); }
.ts-note { font-size: .76em; margin-top: .4em; }

/* ---------- "⚔️ Кто кого" (rivalryModalHtml) ---------- */
.rivalry-card { width: min(600px, 96vw); }
.rivalry-card h2 { margin: 0 0 .6em; }
.rv-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .6em; margin-bottom: .8em; }
.rv-side { display: flex; flex-direction: column; align-items: center; gap: .3em; background: transparent; color: var(--text); font: inherit; padding: .3em; min-width: 0; }
.rv-side b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-side .hint { font-size: .75em; }
.rv-side:hover b { color: var(--gold); }
.rv-mid { text-align: center; }
.rv-score { display: flex; align-items: baseline; justify-content: center; gap: .3em; font-size: 2em; font-weight: 800; color: var(--gold); }
.rv-score span { color: var(--muted); font-weight: 400; }
.rv-score-note { font-size: .7em; }
.rv-rows { display: flex; flex-direction: column; gap: .25em; }
.rv-row { display: grid; grid-template-columns: 1fr 1.6fr 1fr; align-items: center; gap: .5em; background: var(--panel2); border-radius: 9px; padding: .45em .6em; font-size: .88em; }
.rv-label { text-align: center; color: var(--muted); font-size: .9em; }
.rv-label small { display: block; font-size: .8em; }
.rv-val { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.rv-val.lead { color: var(--gold); }
.rv-sub { margin: 1em 0 .4em; font-size: .85em; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; text-align: left; }
.rv-recent .lobby-recent-row:disabled { opacity: 1; cursor: default; }
.nemesis-vs { margin-left: .3em; }
@media (max-width: 480px) {
  .ts-awards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ts-award { flex-direction: column; align-items: flex-start; gap: .25em; }
  .rv-recent .lobby-recent-row { grid-template-columns: auto 1fr; row-gap: .1em; }
  .rv-recent .lobby-recent-row > span:last-child { grid-column: 1 / -1; font-size: .85em; }
  .rv-recent .lobby-recent-row > span:nth-child(2) { white-space: normal; }
}

/* ---------- admin, Oct 2026: «Сводка», «Ошибки», «Расписание», merge, the seat menu ---------- */
.adm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .5em; margin-bottom: .7em; }
.adm-tile { display: flex; flex-direction: column; gap: .15em; background: var(--panel2); border-radius: 10px; padding: .6em .75em; border-left: 3px solid transparent; }
.adm-tile[role="button"] { cursor: pointer; }
.adm-tile-label { font-size: .75em; color: var(--muted); }
.adm-tile b { font-size: 1.15em; overflow-wrap: anywhere; min-width: 0; }
.adm-tile .hint { font-size: .72em; }
.adm-tile.good { border-left-color: #2ea072; }
.adm-tile.bad { border-left-color: var(--danger); }
.adm-warn-text { color: #ffb4a8; }
.adm-error { background: var(--panel2); border-radius: 8px; padding: .45em .65em; margin-bottom: .3em; text-align: left; }
.adm-error summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: .4em; align-items: baseline; }
.adm-err-count { color: #ff9a8f; font-weight: 700; font-variant-numeric: tabular-nums; }
.adm-stack-trace { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .72em; color: var(--muted); background: #14161b; border-radius: 6px; padding: .5em; max-height: 220px; overflow: auto; margin: .4em 0; }
.adm-schedule-form { display: flex; flex-wrap: wrap; gap: .4em; align-items: center; margin-bottom: .7em; }
.adm-schedule-form input[name="title"] { flex: 1 1 220px; }
.adm-check { display: inline-flex; align-items: center; gap: .3em; font-size: .85em; }
.adm-sched-row { grid-template-columns: 1.4fr 1fr auto; }
.adm-merge-preview { display: flex; flex-direction: column; gap: .35em; align-items: flex-start; background: rgba(217, 83, 79, .08); border: 1px solid rgba(217, 83, 79, .35); border-radius: 10px; padding: .6em .75em; margin: .4em 0; text-align: left; }
.seat-admin-menu { z-index: 70; min-width: 240px; right: auto; width: max-content; }
.seat-throw-label { font-size: .75em; color: var(--muted); padding: .45em .8em .15em; border-top: 1px solid rgba(255,255,255,.08); margin-top: .2em; }
.seat-throws { display: grid; grid-template-columns: repeat(6, 40px); gap: 4px; padding: .25em .6em .5em; }
.hdr-menu .seat-throws .seat-throw { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; font-size: 22px; line-height: 1; border-radius: 10px; background: rgba(255,255,255,.05); }
.hdr-menu .seat-throws .seat-throw:hover { background: rgba(255,255,255,.14); transform: scale(1.08); }
.seat-throw img { width: 30px; height: 30px; object-fit: contain; display: block; pointer-events: none; }
.seat-menu-title { font-size: .8em; color: var(--muted); padding: .35em .8em .4em; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: .2em; }

/* "📅 Расписание" in the lobby */
.schedule-card { border: 1px solid rgba(224, 176, 76, .35); }
.schedule-row { display: flex; flex-direction: column; gap: .3em; padding: .65em .1em; border-top: 1px solid rgba(255,255,255,.06); }
.schedule-row:first-of-type { border-top: 0; padding-top: 0; }
.schedule-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6em; flex-wrap: wrap; }
.schedule-countdown { font-size: .8em; font-weight: 700; color: var(--gold); white-space: nowrap; }
.schedule-foot { display: flex; align-items: center; justify-content: space-between; gap: .6em; flex-wrap: wrap; }
.schedule-foot .hint { font-size: .8em; }
.schedule-row.mine .schedule-head b::after { content: ' ✓'; color: #6fe0ae; }

/* ---------- Rabbit hunt cards, the mini-coach, table settings (Oct 2026, stage 5) ---------- */
.community .playing-card.rabbit-card { opacity: .62; filter: saturate(.55); }

.coach-card {
  display: flex; align-items: flex-start; gap: .6em; margin: 0 auto .45em; max-width: 560px;
  background: var(--panel2); border: 1px solid rgba(224, 176, 76, .45); border-radius: 10px;
  padding: .5em .6em .5em .7em; font-size: .88em; line-height: 1.35; text-align: left;
}
.coach-icon { font-size: 1.35em; line-height: 1; padding-top: .1em; }
.coach-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15em; }
.coach-luck { color: var(--muted); }
.coach-good { color: #4cc38a; }
.coach-bad { color: #ef7b7b; }
.coach-close { flex: none; padding: .1em .45em; }
.coach-lesson { display: flex; flex-direction: column; gap: .12em; }
.coach-lesson b { font-size: 1.02em; }
.coach-lesson span { overflow-wrap: anywhere; }
.coach-lesson.bad b { color: #ef7b7b; }
.coach-lesson.good b { color: #4cc38a; }
.coach-lesson.note b { color: var(--gold); }
.guide-open-btn {
  align-self: flex-start; margin-top: .2em; padding: .28em .7em; font-size: .92em;
  background: transparent; border: 1px solid rgba(224, 176, 76, .55); color: var(--gold);
}
.pref-list > .guide-open-btn { margin: .15em 0 .25em; }
/* The all-in review hangs over the empty strip above the slot instead of adding its ~120px to it: the slot's height decides the table's size */
.action-slot > .coach-card { position: absolute; left: 50%; bottom: calc(100% + .2em); transform: translateX(-50%); width: min(560px, calc(100% - 8px)); margin: 0; box-sizing: border-box; z-index: 9; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); }
@media (max-width: 700px), (max-height: 500px) {
  .coach-card { font-size: .76em; padding: .35em .45em; margin-bottom: .3em; max-width: 100%; }
}

/* Учебная таблица — the study chart (guide.js) and the history review under it. */
.guide-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(10, 12, 18, .72);
  display: grid; place-items: center; padding: 12px;
  overflow-y: auto; overflow-x: hidden;
  grid-template-columns: minmax(0, 1fr);
  overscroll-behavior: contain;
}
.guide-card {
  width: min(560px, calc(96vw - 40px)); max-width: 100%;
  text-align: left; max-height: calc(100dvh - 24px); overflow-y: auto;
  padding: .95em .8em .85em; border-color: rgba(224, 176, 76, .45);
}
.guide-card h2 { text-align: center; margin: 0 1.6em .45em; font-size: 1.25em; }
.guide-modes, .guide-pos { display: flex; flex-wrap: wrap; gap: .35em; margin-bottom: .45em; }
.guide-modes button, .guide-pos button {
  padding: .32em .7em; font-size: .82em; border-radius: 999px;
  border: 1px solid #3a3f4a; background: var(--panel2); color: var(--text);
}
.guide-modes button.on, .guide-pos button.on { background: var(--gold); color: #1c1f26; border-color: var(--gold); font-weight: 700; }
.guide-now { margin: .15em 0 .35em; font-weight: 700; color: var(--gold); }
.guide-legend { display: flex; flex-wrap: wrap; gap: .35em .8em; font-size: .78em; margin: 0 0 .4em; color: var(--muted); }
.guide-legend i { display: inline-block; width: .8em; height: .8em; border-radius: 2px; margin-right: .28em; vertical-align: -1px; }
.guide-grid {
  display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 1px; width: 100%;
  font-size: clamp(8px, 2.35vw, 11px); font-weight: 700; line-height: 1; letter-spacing: -0.04em;
}
.guide-hd, .guide-cell {
  aspect-ratio: 1; display: grid; place-items: center; min-width: 0; overflow: hidden; border-radius: 2px;
}
.guide-hd { color: var(--muted); font-weight: 600; }
.guide-cell { background: #2a303a; color: #8b93a1; }
.guide-cell.raise, .guide-cell.push, .guide-legend i.raise, .guide-legend i.push { background: #e0b04c; color: #1c1f26; }
.guide-legend i.raise, .guide-legend i.push { color: transparent; }
.guide-cell.call, .guide-legend i.call { background: #1f8a70; color: #f4fffb; }
.guide-legend i.call { color: transparent; }
.guide-cell.three, .guide-legend i.three { background: #d4532c; color: #fff8f4; }
.guide-legend i.three { color: transparent; }
.guide-cell.check, .guide-legend i.check { background: #4a5568; color: #e6ebf2; }
.guide-legend i.check, .guide-legend i.fold { color: transparent; }
.guide-legend i.fold { background: #2a303a; }
.guide-help { background: var(--panel2); border-radius: 10px; padding: .6em .75em; margin: .35em 0 .5em; font-size: .86em; line-height: 1.45; }
.guide-what { margin: 0 0 .5em; font-size: .86em; line-height: 1.45; }
.guide-legend i.edge { background: #6b7280 repeating-linear-gradient(135deg, rgba(255,255,255,.35) 0 2px, transparent 2px 5px); }
.guide-help h4 { margin: .6em 0 .25em; font-size: .9em; color: var(--gold); }
.guide-meaning { list-style: none; margin: 0; padding: 0; display: grid; gap: .25em; }
.guide-meaning li { padding-left: 1.3em; position: relative; }
.guide-meaning li i { position: absolute; left: 0; top: .25em; width: .85em; height: .85em; border-radius: 2px; background: #2a303a; }
.guide-meaning i.raise, .guide-meaning i.push { background: #e0b04c; }
.guide-meaning i.call { background: #1f8a70; }
.guide-meaning i.three, .guide-meaning i.play { background: #d4532c; }
.guide-meaning i.check { background: #4a5568; }
.guide-meaning i.edge, .guide-cell.edge { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.28) 0 2px, transparent 2px 5px); }
.guide-meaning i.edge { background-color: #6b7280; }
.guide-exs { display: grid; gap: .45em; }
.guide-ex { display: flex; gap: .65em; align-items: center; background: rgba(0,0,0,.18); border-radius: 8px; padding: .4em .55em; }
.guide-ex-cards { flex: none; flex-wrap: nowrap; margin: 0; }
.guide-ex-text { display: grid; gap: .15em; min-width: 0; }
.guide-ex-text span { color: var(--muted); font-size: .92em; }
.guide-ex-arrow { font-style: normal; color: var(--muted); }
.guide-chip { font-style: normal; padding: .08em .5em; border-radius: 999px; font-size: .92em; color: #fff; background: #2a303a; }
.guide-chip.raise, .guide-chip.push { background: #e0b04c; color: #1c1f26; }
.guide-chip.call { background: #1f8a70; }
.guide-chip.three, .guide-chip.play { background: #d4532c; }
.guide-chip.check { background: #4a5568; }
.guide-posinfo { margin-top: .5em; }
.guide-posinfo summary { cursor: pointer; color: var(--gold); }
.guide-help-toggle { display: block; margin-top: .6em !important; background: none; border: 0; color: var(--muted); font-size: .78em; text-decoration: underline; padding: 0; margin: 0 0 .35em; cursor: pointer; }
.guide-prose {
  margin-top: .75em; background: var(--panel2); border-radius: 10px; padding: .7em .8em;
  font-size: .9em; line-height: 1.45;
}
.guide-prose p { margin: .4em 0; }
.guide-prose p:first-child { margin-top: 0; }
.guide-prose p:last-child { margin-bottom: 0; }
.guide-foot { margin: .65em 0 0; color: var(--muted); font-size: .8em; line-height: 1.45; }
.hist-guide { text-align: left; display: grid; gap: .35em; }
.hist-guide-head { display: flex; flex-wrap: nowrap; gap: .35em; align-items: center; }
.hist-guide-head b { font-size: .86em; }
.hist-guide-head select { max-width: 14em; flex: 1 1 8em; padding: .28em .45em; }
.hist-guide-head .guide-open-btn { margin-top: 0; }
/* The notes live in the journal column, beside the table, so a hand with one remark and a hand
   with five don't change how tall the table is or where the step buttons sit. The list scrolls
   once it would crowd the journal. */
.hist-lessons { display: flex; flex-direction: column; gap: .3em; max-height: min(16em, 38vh); overflow-y: auto; flex: none; }
.sidebar-col .hist-guide {
  background: var(--panel2); border: 1px solid #3a3f4a; border-radius: 8px;
  padding: .45em .5em; min-height: 0; flex: none;
}
/* a table's history has more blocks (hand list, notes, journal, chat) than a short window holds: the column scrolls and every block keeps its own size */
@media (min-width: 861px) {
  .sidebar-col:has(.hist-hands) { overflow-y: auto; scrollbar-width: thin; }
  .sidebar-col:has(.hist-hands) > * { flex: none; }
  .sidebar-col:has(.hist-hands) .hl-list { max-height: min(34vh, 320px); }
  .sidebar-col:has(.hist-hands) .log-panel { min-height: 5em; }
  .sidebar-col:has(.hist-hands) .chat-panel { min-height: 11em; }
}
.sidebar-col .hist-guide-head { flex-wrap: wrap; }
.sidebar-col .hist-guide-head select { max-width: 100%; flex-basis: 100%; }
.sidebar-col .hist-guide-head .study-links { flex: 1 1 100%; min-width: 0; }
.hist-lesson {
  display: flex; flex-direction: column; align-items: flex-start; gap: .12em;
  width: 100%; text-align: left; white-space: normal; overflow-wrap: anywhere;
  padding: .35em .55em; border-radius: 8px; border: 1px solid transparent;
  background: var(--panel2); color: inherit; font-size: .85em;
}
.hist-lesson b { font-size: .95em; }
.hist-lesson span { color: var(--muted); font-size: .92em; }
.hist-lesson.good { border-color: rgba(76, 195, 138, .5); }
.hist-lesson.bad { border-color: rgba(239, 123, 123, .6); }
.hist-lesson.note { border-color: rgba(224, 176, 76, .6); }
.hist-lesson.now { outline: 1px solid var(--gold); }
.hist-guide-empty { margin: 0; color: var(--muted); font-size: .82em; }
@media (max-width: 480px) {
  .guide-card { padding: .7em .45em .65em; }
  .guide-card h2 { font-size: 1.05em; }
  .guide-prose { font-size: .82em; padding: .6em .65em; }
  .guide-modes button, .guide-pos button { padding: .28em .55em; font-size: .78em; }
  .hist-lessons { max-height: min(11em, 32vh); }
  .hist-guide-head { flex-wrap: wrap; }
  .hist-guide-head select { max-width: 100%; flex-basis: 100%; }
  .hist-guide-head .study-links { flex: 1 1 100%; min-width: 0; }
  .hist-guide-head .study-btn { padding: .32em .55em; font-size: .82em; }
}

.pref-list { display: flex; flex-direction: column; gap: .35em; }
.pref-row { display: flex; align-items: flex-start; gap: .6em; padding: .45em .55em; text-align: left; border-radius: 8px; background: var(--panel2); cursor: pointer; }
.pref-row.off { opacity: .6; cursor: default; }
.pref-row input { margin: .2em 0 0; width: 1.05em; height: 1.05em; accent-color: var(--gold); flex: none; }
.pref-row span { display: flex; flex-direction: column; gap: .1em; }
.pref-row small { color: var(--muted); font-size: .82em; }

/* ---------- 🎛 the fatality studio (studio.js, Oct 2026, stage 6) ---------- */
.studio-overlay {
  position: fixed; inset: 0; z-index: 99990; background: var(--panel);
}
.st-card { width: 100%; height: 100%; display: flex; flex-direction: column; background: var(--panel); }
.st-head { display: flex; align-items: center; gap: .6em; padding: .6em .8em; border-bottom: 1px solid #2c313b; flex-wrap: wrap; }
.st-head > b { font-size: 1.05em; margin-right: .4em; }
.st-local { margin-left: auto; }
.st-menu { position: relative; }
.st-menu > summary { list-style: none; cursor: pointer; }
.st-menu > summary::-webkit-details-marker { display: none; }
.st-menu-list {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: flex; flex-direction: column; align-items: stretch; gap: .35em; width: 270px; padding: .5em;
  background: var(--panel2); border: 1px solid #3a3f4a; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.st-menu-list .mini { display: flex; align-items: center; justify-content: flex-start; gap: .4em; text-align: left; text-decoration: none; color: inherit; }
.st-tpl { display: flex; align-items: center; gap: .35em; color: var(--muted); font-size: .9em; }
.st-muted { color: var(--muted); font-size: .88em; }
.st-bad { color: #ef7b7b; }
.st-body { flex: 1; display: grid; grid-template-columns: 230px 1fr; min-height: 0; }
.st-list { overflow-y: auto; border-right: 1px solid #2c313b; padding: .4em; display: flex; flex-direction: column; gap: .25em; }
.st-fighter {
  display: flex; align-items: center; gap: .55em; text-align: left; padding: .3em .45em; border-radius: 8px;
  background: transparent; border: 1px solid transparent; color: var(--text); cursor: pointer; font: inherit;
}
.st-fighter:hover { background: var(--panel2); }
.st-fighter.active { background: var(--panel2); border-color: rgba(224, 176, 76, .6); }
.st-fighter img { width: 34px; height: 46px; object-fit: contain; flex: none; }
.st-fighter span { display: flex; flex-direction: column; min-width: 0; }
.st-fighter small { color: var(--muted); font-size: .78em; }
.st-main { overflow-y: auto; padding: .6em .9em 1em; }
.st-title { display: flex; align-items: baseline; gap: .8em; flex-wrap: wrap; }
.st-title h3 { margin: .1em 0 .3em; }
.st-row { display: flex; align-items: center; gap: .4em; flex-wrap: wrap; margin: .35em 0; }
.st-row .mini.active { background: var(--gold); color: #1a1a1a; }
.st-sep { width: 1px; height: 1.4em; background: #3a3f4a; margin: 0 .3em; }
.st-check { display: flex; align-items: center; gap: .3em; font-size: .88em; color: var(--muted); }
.st-proposal {
  display: flex; align-items: center; gap: .6em; flex-wrap: wrap; margin: .5em 0; padding: .5em .7em;
  border: 1px solid rgba(224, 176, 76, .6); border-radius: 8px; background: rgba(224, 176, 76, .08); font-size: .9em;
}
.st-proposal span { flex: 1; min-width: 240px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(var(--st-cell, 520px), 100%), 1fr)); gap: .6em; margin-top: .5em; }
.st-cell { background: #121418; border: 1px solid #2c313b; border-radius: 8px; overflow: hidden; }
.st-cell canvas.dragging { cursor: grabbing; }
.st-zoom { width: 140px; }
.st-cell.has-ex { border-color: rgba(61, 139, 253, .55); }
.st-cell.picked { border-color: var(--gold); }
.st-fixall { margin-left: auto; }
.st-queue-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(var(--st-cell, 520px), 100%), 1fr)); gap: .7em; margin-top: .5em; }
.st-issue { display: flex; flex-direction: column; gap: .35em; padding: .45em; border: 1px solid #2c313b; border-radius: 10px; background: var(--panel2); }
.st-issue.focus { border-color: var(--gold); }
.st-issue-head { display: flex; align-items: baseline; gap: .5em; flex-wrap: wrap; font-size: .92em; }
.st-issue-head span { color: var(--muted); }
.st-issue-actions { display: flex; gap: .4em; }
.st-queue-done { margin: 3em 0; text-align: center; font-size: 1.2em; }
.st-cell canvas { display: block; width: 100%; cursor: grab; touch-action: none; background: radial-gradient(ellipse at 50% 120%, #1d5a3c, #0f241a 70%); }
.st-cap { display: flex; align-items: center; gap: .5em; padding: .3em .5em; font-size: .85em; }
.st-cap > span:first-child { flex: 1; }
.st-ex { color: #7fb2ff; font-size: .85em; }
.st-help { margin-top: .9em; line-height: 1.45; }
/* the long list: every fighter, every frame — headings stay on top while its cells scroll by */
.st-sec { margin: 0 0 1.6em; }
.st-sec h2 {
  position: sticky; top: -1px; z-index: 3; display: flex; align-items: center; gap: .6em;
  margin: 0; padding: .45em .2em; font-size: 1.25em; background: var(--panel); border-bottom: 1px solid #3a3f4a;
}
.st-sec h2 img { height: 1.8em; width: auto; }
.st-frame h4 { margin: .9em 0 .2em; color: var(--gold); font-size: .95em; }
.st-cell canvas { aspect-ratio: 1104 / 389; }
@media (max-width: 800px) {
  .st-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .st-list { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid #2c313b; }
  .st-fighter { flex: none; }
  .st-grid { grid-template-columns: 1fr; }
}

/* ---------- "📰 Что нового" (Oct 2026) ---------- */
.news-link {
  display: flex; align-items: center; gap: .7em; width: 100%; margin-top: .4em; text-align: left;
  background: transparent; border: 1px dashed #3a3f4a; border-radius: 10px; padding: .55em .8em; color: var(--text); cursor: pointer; font: inherit;
}
.news-link:hover, .news-link:focus-visible { border-color: var(--gold); background: rgba(224, 176, 76, .06); outline: none; }
.news-link-icon { font-size: 1.3em; }
.news-link-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.news-link-text small { color: var(--muted); font-size: .8em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news-dot, .news-new {
  background: var(--gold); color: #1a1a1a; border-radius: 999px; padding: .1em .55em; font-size: .72em; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
}
.news-card-wrap { width: min(680px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; text-align: left; }
.news-card-wrap h2, .news-card-wrap > .hint { text-align: left; margin-right: 2.5em; }
.news-list { overflow-y: auto; display: flex; flex-direction: column; gap: .55em; margin-top: .8em; padding-right: 2px; }
.news-card { flex: none; background: var(--panel2); border: 1px solid #343944; border-radius: 12px; overflow: hidden; }
.news-card.open { border-color: rgba(224, 176, 76, .5); }
.news-head { display: flex; align-items: flex-start; gap: .8em; width: 100%; padding: .8em 1em; background: transparent; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.news-head:hover { background: rgba(255, 255, 255, .03); }
.news-head:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.news-head-main { display: flex; flex-direction: column; gap: .25em; flex: 1; min-width: 0; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4em; color: var(--muted); font-size: .8em; }
.news-tag { border: 1px solid #3a3f4a; border-radius: 999px; padding: 0 .55em; }
.news-title { font-size: 1.12em; font-weight: 700; line-height: 1.25; }
.news-lead { color: var(--muted); line-height: 1.4; }
.news-chevron { color: var(--gold); font-size: 1.1em; padding-top: .15em; }
.news-body { padding: .2em 1em 1em; border-top: 1px solid #343944; }
.news-items { list-style: none; margin: .8em 0 0; padding: 0; display: flex; flex-direction: column; gap: .8em; }
.news-items li { display: grid; grid-template-columns: 2.1em 1fr; gap: .6em; align-items: start; }
.news-ico { font-size: 1.4em; line-height: 1.2; text-align: center; }
.news-items b { display: block; margin-bottom: .1em; }
.news-items p { margin: 0; color: #cfd3da; line-height: 1.5; }
.news-where { margin: 1em 0 0; padding: .55em .8em; background: rgba(224, 176, 76, .08); border-radius: 8px; font-size: .92em; line-height: 1.45; }
.news-where span { color: var(--gold); font-weight: 700; margin-right: .3em; }

.hero-label .hero-style-img, .lvl-style-img { display: inline-block; }
.hero-stat .hero-style-img { width: 1.3em; height: 1.3em; vertical-align: -.3em; display: inline-block; }
.lvl-style { flex-direction: row; align-items: center; }
.lvl-style-img { width: 3.2em; height: 3.2em; flex: none; }
.lvl-style > div { display: flex; flex-direction: column; min-width: 0; }

.lvl-style { flex-wrap: wrap; }
.lvl-style > div { flex: 1 1 12em; min-width: min(100%, 12em); }
.lvl-style-acts { display: flex; flex-direction: column; align-items: stretch; gap: .35em; margin-left: auto; flex: none; max-width: 100%; }
.style-help-btn { margin-left: auto; flex: none; }
.lvl-style-acts .style-help-btn { margin-left: 0; white-space: normal; text-align: center; line-height: 1.25; padding: .4em .75em; }
.style-dials { display: flex; flex-wrap: wrap; gap: .15em .55em; margin-top: .4em; }
.style-dial { display: flex; flex-direction: column; align-items: center; min-width: 0; line-height: 1.15; }
.style-dial .lvl-gauge { width: 46px; height: 26px; margin: 0; }
.style-dial b { font-size: .95em; font-weight: 700; }
.style-dial span { font-size: .72em; color: var(--muted); }
.hero-sub.style-dials { font-size: .78em; justify-content: center; margin-top: .25em; }
.hero-sub.style-dials .style-dial b, .lvl-style .style-dial b { color: var(--text); }
@media (max-width: 480px) {
  .style-help-btn { margin-left: 0; }
  .lvl-style-acts { margin-left: 0; flex: 1 1 100%; }
}
.play-tips { min-width: 0; max-width: 100%; box-sizing: border-box; background: var(--panel2); border: 1px solid #343944; border-radius: 10px; padding: .7em .9em; margin-bottom: .8em; text-align: left; font-size: .9em; line-height: 1.45; }
.play-tips > p { margin: 0 0 .55em; }
.play-tip { padding: .55em .7em .6em; margin: 0 0 .5em; background: rgba(224, 176, 76, .08); border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; }
.play-tip b { display: flex; align-items: center; gap: .4em; color: var(--gold); margin-bottom: .15em; }
.tip-n {
  flex: none; width: 1.35em; height: 1.35em; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #e0b04c; color: #1c1608; font-size: .78em;
}
.tip-pills { display: flex; flex-wrap: wrap; gap: .35em; margin: .35em 0 .4em; }
.tip-pill {
  display: inline-flex; gap: .35em; align-items: baseline; max-width: 100%;
  padding: .12em .55em; border-radius: 999px; box-sizing: border-box;
  background: #141820; border: 1px solid #3a4150; font-size: .82em;
  overflow-wrap: anywhere; white-space: normal;
}
.tip-pill i { font-style: normal; color: var(--muted); flex: none; }
.tip-pill.goal { border-color: rgba(224, 176, 76, .55); }
.tip-pill.goal i { color: var(--gold); }
.tip-text { display: block; overflow-wrap: break-word; }
.tip-hands { display: flex; flex-wrap: wrap; gap: .28em; margin-top: .45em; }
.tip-hands i {
  font-style: normal; font-weight: 800; font-size: .78em; line-height: 1.2; white-space: nowrap;
  padding: .18em .42em; border-radius: 5px;
  background: linear-gradient(165deg, #fffaf0, #e6d7b8);
  color: #1a140c; border: 1px solid #1a140c;
}
.play-tips-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .45em .6em; margin: .15em 0 0; color: var(--muted); font-size: .92em; }
.play-tips-foot button { flex: none; }
.study-links { display: inline-flex; flex-wrap: wrap; gap: .4em; align-items: center; }
.study-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .3em;
  padding: .42em .85em; font-weight: 800; line-height: 1.2; white-space: nowrap;
  color: #1c1608; background: linear-gradient(180deg, #f3d78f, #e0b04c);
  border: 1px solid #8a6415; border-radius: 9px; box-shadow: 0 2px 0 #6d4e10;
}
.study-btn.alt {
  color: var(--gold); background: #1a1e27; border-color: rgba(224, 176, 76, .75); box-shadow: none;
}
.guide-card > .study-btn { margin: 0 0 .7em; }
.pref-list > .study-links { margin: .15em 0 .45em; }
@media (max-width: 480px) {
  .play-tips-foot .study-links, .pref-list > .study-links { display: flex; width: 100%; }
  .play-tips-foot .study-btn, .pref-list > .study-links .study-btn { flex: 1 1 0; min-width: 0; padding: .45em .4em; font-size: .82em; }
}

.terms-overlay {
  position: fixed; inset: 0; z-index: 85;
  background: rgba(10, 12, 18, .72);
  display: grid; place-items: center; padding: 12px;
  overflow-y: auto; overflow-x: hidden;
  grid-template-columns: minmax(0, 1fr);
}
.terms-card { width: min(560px, calc(96vw - 40px)); max-width: 100%; text-align: left; box-sizing: border-box; }
.terms-card h2 { text-align: center; margin-right: 1.6em; }
.terms-lead { margin: 0 0 .4em; color: var(--muted); font-size: .88em; line-height: 1.4; }
.term { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: .7em; align-items: center; padding: .65em 0; border-top: 1px solid #2c313b; }
.term b { color: var(--gold); display: block; }
.term p { margin: .15em 0 0; font-size: .88em; line-height: 1.4; overflow-wrap: break-word; }
.term-pic {
  height: 86px; border-radius: 12px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  background: radial-gradient(circle at 50% 70%, #1f6b45, #0d3322 72%);
  border: 1px solid #0a2818; box-shadow: inset 0 0 0 3px rgba(224, 176, 76, .18);
}
.term-pic .playing-card { width: 32px; height: 46px; font-size: .7em; border-radius: 4px; flex: none; }
.term-fold .playing-card { transform: rotate(-12deg); opacity: .72; }
.term-fold + .term-fold .playing-card { transform: rotate(11deg); }
.term-pile { position: relative; width: 26px; height: 38px; flex: none; display: block; }
.term-pile.tall { height: 52px; }
.term-pile .chip {
  position: absolute; left: 0; width: 26px; height: 26px;
  bottom: calc(var(--i, 0) * 5px);
}
.tcol { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; }
.tcol small { font-size: 9px; color: #f3d78f; letter-spacing: .02em; white-space: nowrap; line-height: 1; }
.teq, .tx, .tzero { font-style: normal; color: #f3d78f; font-weight: 800; }
.tx { font-size: 18px; }
.tzero {
  font-size: 13px; border: 1px solid rgba(243, 215, 143, .7); border-radius: 50%;
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; flex: none;
}
.ttable {
  position: relative; width: 92px; height: 54px; border-radius: 50%; flex: none;
  border: 2px solid rgba(224, 176, 76, .7);
  background: radial-gradient(circle at 50% 45%, #2a8a58, #0c3a26 70%);
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, .18);
}
.ttable i {
  position: absolute; width: 11px; height: 11px; border-radius: 50%;
  background: #f4efe4; border: 1px solid #1a140c; font-style: normal;
}
.ttable i:nth-child(1) { left: 8px; top: 16px; }
.ttable i:nth-child(2) { left: 22px; top: 4px; }
.ttable i.d {
  left: 50%; top: 2px; transform: translateX(-50%);
  width: 16px; height: 16px; background: #e0b04c; color: #1c1608;
  font-size: 8px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.ttable i.b:nth-child(4) { right: 20px; top: 4px; background: #c5d4cb; }
.ttable i.b:nth-child(5) { right: 6px; top: 18px; background: #c5d4cb; }
@media (max-width: 480px) {
  .term { grid-template-columns: 112px minmax(0, 1fr); gap: .5em; }
  .term-pic { height: 78px; }
  .term-pic .playing-card { width: 26px; height: 38px; font-size: .58em; }
  .term-pile, .term-pile .chip { width: 22px; }
  .term-pile .chip { height: 22px; }
  .term-pile { height: 32px; }
  .term-pile.tall { height: 44px; }
  .ttable { width: 78px; height: 46px; }
}
.style-help { min-width: 0; max-width: 100%; box-sizing: border-box; background: var(--panel2); border: 1px solid #343944; border-radius: 10px; padding: .7em .9em; margin-bottom: .8em; text-align: left; font-size: .9em; line-height: 1.45; }
.style-help p { margin: 0 0 .5em; }
.style-help .sh-me { padding: .45em .65em; background: rgba(224, 176, 76, .1); border-radius: 8px; }
.sh-scroll { overflow-x: auto; max-width: 100%; min-width: 0; margin: .6em 0; -webkit-overflow-scrolling: touch; }
.style-help table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .92em; }
.style-help th { text-align: left; color: var(--muted); font-weight: 600; font-size: .85em; padding: .3em .5em; border-bottom: 1px solid #343944; }
.style-help td { padding: .4em .5em; border-bottom: 1px solid #2c313b; vertical-align: middle; }
.sh-style { display: flex; align-items: center; gap: .45em; min-width: 0; }
.sh-style-img { width: 3em; height: 3em; object-fit: contain; flex: none; }
.style-help td small { display: block; color: var(--muted); font-size: .85em; }
.style-help tr.here td { background: rgba(224, 176, 76, .12); }
.style-help .sh-todo { color: #cfd3da; }
.style-help tr.here .sh-todo { color: var(--gold); font-weight: 700; }

/* "Вид и настройки": the deck preview cards use the journal's compact layout — the rank with ONE suit
   under it in the middle, no small corner suits. Comes last so it also wins over the phone rule. */
.look-cards .playing-card .pip.mid,
.look-cards .playing-card .pip.br { display: none; }
.look-cards .playing-card .pip.tl {
  position: static; width: auto; font-size: 1.1em; line-height: 1.05; transform: none; letter-spacing: 0;
}
.look-cards .playing-card .pip.tl small { display: block; font-size: 1.45em; margin-top: 1px; line-height: 1; }

/* Card backs, felts and woods: every choice is the same width, a long name ("Чёрное золото") wraps under its
   picture instead of making its button wider than the rest. */
.look-opt[data-key="back"], .look-opt[data-key="felt"], .look-opt[data-key="wood"], .look-opt[data-key="room"] { width: 92px; padding-inline: .3em; box-sizing: border-box; }
.look-opt > span:last-child { text-align: center; line-height: 1.15; }

/* Tall, narrow style art (the phone booth, the boulder) is full height but a half-width figure: give it a bigger box. */
.lvl-style-img.st-station { width: 4.6em; height: 4.6em; margin: -.7em -.7em -.7em -.35em; }
.lvl-style-img.st-rock { width: 3.8em; height: 3.8em; margin: -.3em -.3em -.3em 0; }
.hero-stat .hero-style-img.st-station { width: 1.8em; height: 1.8em; vertical-align: -.5em; }

/* Player levels: the title is a button, "Все уровни" opens both ladders under it. */
.title-btn { background: none; border: 0; padding: .1em .4em; margin: 0; font: inherit; font-weight: 700; font-size: .9em; color: var(--gold); cursor: pointer; border-radius: 8px; display: inline-flex; align-items: center; gap: .3em; }
.title-btn:hover { background: rgba(224, 176, 76, .1); }
.title-caret { font-size: .8em; opacity: .7; }
.lvl-ico, .lvl-emoji { width: 1.5em; height: 1.5em; display: inline-flex; align-items: center; justify-content: center; flex: none; line-height: 1; }
.lvl-ico { object-fit: contain; }
.lvl-row-ico { width: 2.4em; height: 2.4em; font-size: 1em; }
.lvl-emoji.lvl-row-ico { font-size: 1.7em; }
.levels-panel { width: min(420px, 100%); text-align: left; margin: .6em auto 0; padding: .6em .8em; background: rgba(255, 255, 255, .03); border: 1px solid #3a3f4a; border-radius: 10px; }
.levels-panel h4 { margin: .6em 0 .3em; font-size: .85em; color: var(--muted); }
.levels-panel h4:first-child { margin-top: 0; }
.levels-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25em; }
.levels-list li { display: flex; align-items: center; gap: .6em; padding: .3em .4em; border-radius: 8px; opacity: .6; }
.levels-list li.done { opacity: .9; }
.levels-list li.now { opacity: 1; background: rgba(224, 176, 76, .12); outline: 1px solid rgba(224, 176, 76, .45); }
.levels-list li > div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.levels-list li b { font-size: .92em; }
.levels-list li span { font-size: .75em; color: var(--muted); }
.levels-list li em { font-style: normal; font-size: .72em; color: var(--gold); font-weight: 700; text-align: right; }
.hero-btn {
  font: inherit; color: inherit; cursor: pointer; text-align: center; width: 100%;
  margin: 0; appearance: none; background: var(--panel2); line-height: 1.15;
}
.hero-btn:hover { border-color: var(--gold); }

.elo-rank-ico { width: 1.3em; height: 1.3em; vertical-align: -.3em; }
.lobby-score-rank { display: inline-flex; align-items: center; gap: .32em; width: fit-content; margin-top: .28em; padding: .12em .5em .12em .18em; border-radius: 999px; background: rgba(224, 176, 76, .14); color: #e4bc6a; font-size: .78em; font-weight: 700; }
.lobby-score-rank em { font-style: normal; }
.lobby-score-rank .lobby-rank-ico { width: 22px; height: 22px; }
.lbe-player small .elo-rank-ico, .rv-rank .elo-rank-ico { width: 1.05em; height: 1.05em; vertical-align: -.2em; }
.rv-rank { display: inline-flex; align-items: center; gap: .25em; }

/* "Выложить дважды": the question before the next card, and the second board under the first. */
.rt-offer { display: grid; gap: .5em; justify-items: center; text-align: center; padding: .6em .8em; background: rgba(224, 176, 76, .1); border: 1px solid rgba(224, 176, 76, .5); border-radius: 12px; max-width: 460px; margin: 0 auto; }
.rt-offer .rt-text { font-size: .92em; line-height: 1.4; }
.rt-offer .action-bar { margin: 0; }
.rt-timer { font-size: .78em; color: var(--muted); }
.rt-timer b { color: var(--gold); font-variant-numeric: tabular-nums; }
.board-tag { position: absolute; left: -1.6em; top: 50%; transform: translateY(-50%); font-size: 1.05em; color: var(--gold); opacity: .85; z-index: 2; pointer-events: none; }
.community.twice { transform: translateY(-1.7em) scale(.86); transform-origin: 50% 0; }
.community-run2 { position: absolute; left: 50%; top: calc(100% + .35em); transform: translateX(-50%); display: flex; gap: .4em; z-index: 1; }
.community-run2 .playing-card { position: relative; z-index: 1; }
.board-win { position: absolute; left: calc(100% + .6em); top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: .72em; font-weight: 700; color: var(--gold); background: rgba(0, 0, 0, .5); padding: .15em .55em; border-radius: 10px; z-index: 2; }
.community-run2 .board-win { left: calc(100% + .3em); }

/* Camera background (camBg.js): swatches in "Вид и настройки". */
.bg-row { flex-wrap: wrap; }
.bg-swatch { width: 92px; height: 52px; border-radius: 8px; display: grid; place-items: center; font-size: 1.6em; background: #1c2230 center / cover no-repeat; border: 1px solid #3a3f4a; }
.bg-swatch.bg-none { background: #0e1118; }
.bg-swatch.bg-blur { background: radial-gradient(circle at 30% 40%, #3a6b4f, #1c2f4a 60%, #6a4a2a); filter: none; }
.bg-swatch.bg-felt { background-image: url("/img/felt.jpg?v=4"); }
.bg-swatch.bg-plus { font-size: 1.8em; color: var(--gold); }
.bg-own { position: relative; display: inline-flex; }
.bg-del { position: absolute; top: -.3em; right: -.3em; width: 1.5em; height: 1.5em; border-radius: 50%; border: 1px solid #3a3f4a; background: #14161b; color: var(--muted); font-size: .8em; cursor: pointer; line-height: 1; padding: 0; }
.bg-del:hover { color: #ff6b6b; border-color: #ff6b6b; }
.bg-add { cursor: pointer; }

/* Password: the window for setting / changing it, and the lobby reminder for a nickname without one. */
.pw-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(10, 12, 18, .55); display: grid; place-items: center; padding: 16px; overflow-y: auto; grid-template-columns: minmax(0, 1fr); }
.pw-card { display: grid; gap: .6em; width: min(380px, 100%); }
.pw-card h3 { margin: 0; }
.pw-card .hint { margin: 0; }
.pw-buttons { display: flex; gap: .6em; justify-content: flex-end; }
.pw-hint { display: flex; align-items: center; justify-content: space-between; gap: .8em; flex-wrap: wrap; margin-bottom: .8em; border-color: var(--gold); }
.pw-hint > span { flex: 1 1 14em; min-width: 0; }


/* =====================================================================================================
   «Новый стол»: a warmer window — a felt header, sections with a small title each, big tiles for the mode and
   the pace, the seats as a switch, the special rules as switches, and a golden «Создать стол». Same form, same
   field names and actions as before; only the look (and a few headings) is new.
   ===================================================================================================== */
.create-overlay { background: rgba(8, 12, 10, .62); backdrop-filter: blur(3px); }
.create-card {
  width: min(640px, 96vw); padding: 0; overflow-x: hidden; border: 2px solid rgba(224, 176, 76, .55); border-radius: 22px;
  background: radial-gradient(120% 60% at 50% 0%, rgba(11, 92, 58, .22), transparent 70%), var(--panel);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(255, 255, 255, .04);
}
.create-card .profile-close { z-index: 2; top: .6em; right: .6em; background: rgba(0, 0, 0, .35); border-color: rgba(255, 255, 255, .25); }
.create-hero {
  position: relative; display: flex; align-items: center; gap: 1em; padding: 1.3em 3em 1.2em 1.4em; color: #f4f0e2;
  background:
    linear-gradient(90deg, rgba(5, 40, 24, .55), rgba(5, 40, 24, .15)),
    var(--felt-img, url("/img/felt.jpg?v=4")) center / cover;
  border-bottom: 2px solid rgba(224, 176, 76, .6);
  box-shadow: inset 0 -10px 24px rgba(0, 0, 0, .25);
}
.create-hero::after { content: ''; position: absolute; inset: 7px; border: 1px dashed rgba(224, 176, 76, .45); border-radius: 16px 16px 0 0; pointer-events: none; }
.create-hero-chip {
  flex: none; display: grid; place-items: center; width: 2.9em; height: 2.9em; font-size: 1.5em; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3c4, #e0b04c 70%); border: 3px solid #8a6414; box-shadow: 0 3px 8px rgba(0, 0, 0, .45), inset 0 0 0 3px rgba(255, 255, 255, .35);
}
.create-card .create-hero h2 { margin: 0 0 .15em; text-align: left; font-size: 1.45em; color: #fff7dc; text-shadow: 0 2px 4px rgba(0, 0, 0, .5); }
.create-hero p { margin: 0; font-size: .86em; color: rgba(244, 240, 226, .88); line-height: 1.35; }
.create-card .create-form { padding: 1.1em 1.4em 1.4em; gap: .75em; }
.create-sec { display: flex; align-items: center; gap: .45em; margin: .5em 0 -.15em; font-size: .78em; letter-spacing: .09em; text-transform: uppercase; color: var(--gold); }
.create-sec:first-child { margin-top: 0; }
.create-sec span { font-size: 1.25em; letter-spacing: 0; }

/* the mode and the pace: big tiles with a gold ring when picked */
.create-card .mode-btn, .create-card .preset-btn {
  position: relative; border: 2px solid #3a3f4a; border-radius: 14px; background: var(--panel2); transition: transform .12s ease, border-color .12s, box-shadow .12s;
}
.create-card .mode-btn:hover:not(:disabled), .create-card .preset-btn:hover { transform: translateY(-2px); border-color: rgba(224, 176, 76, .7); }
.create-card .mode-btn.active, .create-card .preset-btn.active {
  border-color: var(--gold); background: linear-gradient(180deg, rgba(224, 176, 76, .2), rgba(224, 176, 76, .07)); box-shadow: 0 0 0 3px rgba(224, 176, 76, .18), 0 6px 14px rgba(0, 0, 0, .3);
}
.create-card .mode-btn.active::after, .create-card .preset-btn.active::after {
  content: '✓'; position: absolute; top: -.5em; right: -.4em; display: grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 50%;
  background: var(--gold); color: #2a1c06; font-size: .78em; font-weight: 900; border: 2px solid #8a6414;
}
.create-card .mode-btn { padding: .75em .9em; }
.create-card .mode-name { font-size: 1em; }
.create-card .preset-btn { padding: .7em .3em .6em; gap: .1em; }
.preset-icon { font-size: 1.5em; line-height: 1; }
.create-card .preset-name { font-size: .95em; }

/* the fields */
.create-fields { gap: .7em .9em; }
.create-card .field-label { font-size: .76em; font-weight: 600; color: #c9ccd4; }
.create-card .field input[type="number"] {
  height: 2.5em; padding: 0 .75em; font-size: 1.05em; font-weight: 700; font-variant-numeric: tabular-nums; border-radius: 12px;
  border: 2px solid #3a3f4a; background: #15181f; color: var(--text);
}
.create-card .field input:focus-visible, .create-card .field select:focus-visible { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(224, 176, 76, .22); }
.create-card .field select { height: 2.5em; border-radius: 12px; border: 2px solid #3a3f4a; background: #15181f; color: var(--text); padding: 0 .6em; font-weight: 700; }
.seg { display: flex; gap: 0; border: 2px solid #3a3f4a; border-radius: 12px; overflow: hidden; background: #15181f; height: 2.5em; }
.seg-opt { flex: 1; display: block; cursor: pointer; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { display: grid; place-items: center; height: 100%; font-weight: 800; color: #c9ccd4; transition: background-color .12s, color .12s; }
.seg-opt + .seg-opt span { border-left: 2px solid #3a3f4a; }
.seg-opt input:checked + span { background: linear-gradient(180deg, #f2cf7a, #e0b04c); color: #2a1c06; }
.seg-opt input:focus-visible + span { box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .6); }
.create-card .stack-depth {
  align-self: flex-start; margin: 0; padding: .3em .9em; border-radius: 999px; font-size: .82em; font-weight: 600;
  background: rgba(224, 176, 76, .12); border: 1px solid rgba(224, 176, 76, .35); color: #f0dba0;
}

/* the special rules: a card with a switch each */
.create-card .bounty-toggle {
  display: flex; align-items: flex-start; gap: .75em; margin: 0; padding: .7em .85em; border: 2px solid #343944; border-radius: 14px;
  background: var(--panel2); font-size: .82em; line-height: 1.4; color: #b9bdc7; cursor: pointer; transition: border-color .12s, background-color .12s;
}
.create-card .bounty-toggle:hover { border-color: rgba(224, 176, 76, .5); }
.create-card .bounty-toggle:has(input:checked) { border-color: rgba(224, 176, 76, .75); background: rgba(224, 176, 76, .09); color: #d8dbe3; }
.create-card .bounty-toggle input {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 2.7em; height: 1.5em; margin: .1em 0 0; border-radius: 999px;
  background: #3a3f4a; border: 2px solid #4b5160; cursor: pointer; transition: background-color .15s, border-color .15s;
}
.create-card .bounty-toggle input::after { content: ''; position: absolute; top: 50%; left: .15em; width: 1em; height: 1em; border-radius: 50%; background: #d7dae2; transform: translateY(-50%); transition: left .15s, background-color .15s; }
.create-card .bounty-toggle input:checked { background: #2a8d47; border-color: #1d6a34; }
.create-card .bounty-toggle input:checked::after { left: calc(100% - 1.15em); background: #fff; }
.create-card .bounty-toggle input:disabled { opacity: .5; cursor: not-allowed; }
.create-card .bounty-toggle input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.create-card .bounty-toggle b { color: #f1f1f1; }
.create-card .create-ladder { margin: 0; padding: 0 .3em; font-size: .78em; }

/* the golden button */
.create-card .create-go {
  margin-top: .3em; height: 3em; font-size: 1.1em; font-weight: 900; letter-spacing: .02em; border-radius: 16px; border: 2px solid #8a6414;
  background: linear-gradient(180deg, #f9dc8e, #e0b04c 55%, #c8932a); color: #2a1c06; text-shadow: 0 1px 0 rgba(255, 255, 255, .4);
  box-shadow: 0 4px 0 #8a6414, 0 10px 20px rgba(0, 0, 0, .35); transition: transform .08s ease, box-shadow .08s ease;
}
.create-card .create-go:hover:not(:disabled) { filter: brightness(1.05); }
.create-card .create-go:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #8a6414, 0 4px 10px rgba(0, 0, 0, .35); }
@media (max-width: 560px) {
  .create-hero { padding: 1em 2.6em 1em 1em; }
  .create-hero p { display: none; }
  .create-card .create-form { padding: .9em 1em 1.1em; }
  .create-card .preset-btn { padding: .55em .2em .5em; }
}
@media (prefers-reduced-motion: reduce) { .create-card .mode-btn, .create-card .preset-btn, .create-card .create-go, .create-card .bounty-toggle input, .create-card .bounty-toggle input::after { transition: none; } }

/* the big picture at the top of the lobby, and on the entry screen */
.lobby > .hero-card { grid-column: 1 / -1; }
.entry-screen { flex-direction: column; align-content: center; gap: 14px; }
.entry-screen .hero-card { width: min(980px, 100%); }

/* Choosing which part of an own camera background shows behind you (camBgCrop.js) */
.bg-edit { position: absolute; top: -.3em; left: -.3em; width: 1.5em; height: 1.5em; border-radius: 50%; border: 1px solid #3a3f4a; background: #14161b; color: var(--gold); font-size: .8em; cursor: pointer; line-height: 1; padding: 0; z-index: 1; }
.bg-edit:hover { border-color: var(--gold); background: #1f2229; }
.cbe-overlay { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(8, 12, 10, .68); backdrop-filter: blur(3px); overflow-y: auto; }
.cbe-card { width: min(560px, 100%); display: grid; gap: .7em; padding: 1.1em 1.2em 1.2em; border: 2px solid rgba(224, 176, 76, .55); border-radius: 20px; background: var(--panel); box-shadow: 0 22px 60px rgba(0, 0, 0, .6); }
.cbe-card h3 { margin: 0; font-size: 1.1em; text-align: center; }
.cbe-card .hint { margin: 0; font-size: .82em; text-align: center; }
.cbe-frame { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; border: 2px solid #3a3f4a; background: #0e1118; cursor: grab; touch-action: none; outline: none; }
.cbe-frame.grabbing { cursor: grabbing; }
.cbe-frame:focus-visible { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(224, 176, 76, .25); }
.cbe-frame canvas { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.cbe-person { position: absolute; left: 0; right: 0; bottom: 0; height: 94%; width: 100%; pointer-events: none; }
.cbe-person circle, .cbe-person path { fill: rgba(255, 255, 255, .08); stroke: rgba(255, 255, 255, .75); stroke-width: .9; stroke-dasharray: 3 2; vector-effect: non-scaling-stroke; }
.cbe-zoom { display: flex; align-items: center; gap: .6em; }
.cbe-zoom input { flex: 1; accent-color: var(--gold); }
.cbe-zoom output { min-width: 3em; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.cbe-btns { display: flex; align-items: center; gap: .5em; }

/* The figure next to a name (data/badges.json): in the name row, so it stays when the webcam hides the avatar. */
.name-badge { display: inline-block; margin-right: .2em; line-height: 1; font-size: 1.05em; flex: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5)); }
.badge-group { margin: .7em 0 .1em; font-size: .78em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.badge-group small { text-transform: none; letter-spacing: 0; color: #7fd89a; font-weight: 600; margin-left: .3em; }
.badge-row { flex-wrap: wrap; gap: .4em; }
.badge-opt { min-width: 3.2em; display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .35em .6em; }
.badge-e { font-size: 1.5em; line-height: 1; }

/* Header chips on a phone in portrait: they wrap onto a second line inside their own space instead of being clipped, the «⋯» menu
   keeps its place, and a chip with nothing in it (the blind clock before the start) draws nothing. */
.tm-chip:empty { display: none; }
@media (max-width: 560px) and (orientation: portrait) {
  .top > .table-meta, body.ingame .top > .table-meta { flex: 1 1 0; min-width: 0; overflow: visible; flex-wrap: wrap; row-gap: .2em; }
  body.ingame .top { flex-wrap: wrap; align-items: center; row-gap: .35em; }
  body.ingame .top > .hdr-menu-wrap, body.ingame .top > button { flex: none; }
  .top > .table-meta { margin-right: .4em; }
  /* Two tidy rows at a table: the title, the volume and your avatar on top; below them the table's chips and the seat buttons
     (pause, step away, «⋯»). The chips used to share one row with all of it and were squeezed under the «Пауза» button. */
  body.ingame .top > * { order: 4; }
  body.ingame .top > h1 { order: 0; }
  body.ingame .top > .grow { order: 1; }
  body.ingame .top > .volume-ctl { order: 2; }
  body.ingame .top > .hdr-menu-user { order: 3; }
  body.ingame .top::after { content: ''; order: 3; flex: 0 0 100%; height: 0; }
  body.ingame .top > .table-meta { flex: 1 1 100%; margin-right: 0; }
  body.ingame .top > button.mini, body.ingame .top > .hdr-menu-table > button { padding: .25em .6em; min-height: 0; }
}
@media (max-width: 380px) and (orientation: portrait) { body.ingame .tm-chip { padding: .08em .32em; } .top > .table-meta { gap: .18em; } }

/* the drawn icons of the «Новый стол» window (ctIco in main.js): sized from the text they stand beside */
.ct-ico { width: 1.9em; height: 1.9em; object-fit: contain; vertical-align: -.5em; flex: none; }
.create-hero-chip .ct-ico { width: 1.9em; height: 1.9em; vertical-align: middle; }
.create-sec span .ct-ico { width: 1.9em; height: 1.9em; vertical-align: middle; }
.preset-icon .ct-ico { width: 2.5em; height: 2.5em; vertical-align: middle; }
.mode-name .ct-ico { width: 1.7em; height: 1.7em; vertical-align: -.5em; margin-right: .15em; }
.create-card .create-go .ct-ico { width: 1.7em; height: 1.7em; vertical-align: -.5em; margin-right: .25em; }
.bounty-toggle .ct-ico { width: 1.9em; height: 1.9em; vertical-align: -.6em; margin-right: .2em; }
.create-card .field-label { display: flex; align-items: center; gap: .4em; }
.create-card .field-label .ct-ico { width: 2.1em; height: 2.1em; vertical-align: middle; }

/* Rules on a lobby card, readable before sitting down. */
.lt-rules { display: flex; flex-wrap: wrap; gap: 4px; }
.lt-rules span {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: .72em; font-weight: 700; line-height: 1.3; border-radius: 999px;
  padding: .12em .55em; background: rgba(255, 255, 255, .08); color: var(--text);
}
.tm-restart { background: linear-gradient(180deg, #e0b04c, #a67c12); color: #1a1400; border-color: #ffe08a77; }
.adm-now-list { margin: .7em 0; }
.adm-now { display: block; min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }

/* ---------- 🎓 Академия ---------- */
.ac-overlay { position: fixed; inset: 0; z-index: 80; display: flex; align-items: stretch; justify-content: center; background: rgba(10, 12, 18, .7); backdrop-filter: blur(3px); }
.ac-window { width: min(720px, 100%); display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid #343944; border-right: 1px solid #343944; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.ac-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #343944; }
.ac-header h2 { margin: 0; font-size: 1.15rem; }
.ac-header .profile-close { position: static; }
.ac-scroll { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.ac-owl { font-size: 2.4rem; line-height: 1; }
.ac-bar, .ac-lbar { height: 8px; border-radius: 6px; background: rgba(255,255,255,.1); overflow: hidden; }
.ac-bar i, .ac-lbar i { display: block; height: 100%; background: linear-gradient(90deg, #2ea86b, var(--gold)); transition: width .3s; }
.ac-go { width: 100%; padding: 13px; font-size: 1rem; }
.ac-lessons { display: flex; flex-direction: column; gap: 6px; padding: 0 12px 12px; }
.ac-lesson { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: inherit; text-align: left; cursor: pointer; }
.ac-lesson b { flex: 1; font-weight: 600; }
.ac-lesson.done { border-color: rgba(46,168,107,.6); }
.ac-lesson.locked { opacity: .45; cursor: not-allowed; }
.ac-dot { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.1); font-size: .8rem; flex: none; }
.ac-lesson.done .ac-dot { background: #2ea86b; }
.ac-star { font-style: normal; color: rgba(255,255,255,.2); }
.ac-star.on { color: var(--gold); }
/* The star is a picture (the ★ is swapped for it), so «empty» must dim the picture, not the text colour. */
.ac-star:not(.on) img { filter: grayscale(1) brightness(.7); opacity: .28; }
.ac-stars.big { font-size: 2.2rem; letter-spacing: 6px; }
.ac-ref { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.ac-lhead { display: flex; align-items: center; gap: 10px; }
.ac-lhead b { flex: 1; }
.ac-back { padding: 4px 12px; }
.ac-lcount { opacity: .7; font-size: .85rem; }
.ac-card { padding: 20px 16px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); display: flex; flex-direction: column; gap: 10px; }
.ac-card-icon { font-size: 2.6rem; line-height: 1; }
.ac-card h3 { margin: 0; font-size: 1.2rem; }
.ac-card ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; line-height: 1.45; }
.ac-opts { display: flex; flex-direction: column; gap: 8px; }
.ac-opt { padding: 13px; text-align: left; font-size: 1rem; border-radius: 12px; background: var(--panel); border: 1px solid #3a404c; color: var(--text); }
.ac-opt:hover:not(:disabled) { border-color: #5a6170; }
.ac-opt.right { background: #1d7a4b; border-color: #2ea86b; color: #fff; }
.ac-opt.wrong { background: #7d2622; border-color: #d64541; color: #fff; }
.ac-opt.edge { background: #8a6a1f; border-color: #e0b04c; color: #fff; }
.ac-fb { padding: 12px; border-radius: 12px; line-height: 1.45; }
.ac-fb.ok { background: rgba(46,168,107,.18); }
.ac-fb.no { background: rgba(214,69,65,.18); }
.ac-fb.edge { background: rgba(224,176,76,.2); }
.ac-result { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 16px; }
.ac-big { font-size: 4rem; }
.ac-res-btns { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 8px; }
.lobby-academy { cursor: pointer; border-color: rgba(224,176,76,.4); background: linear-gradient(135deg, rgba(15,34,54,.9), rgba(7,61,39,.8)); }
.lobby-academy .ac-mini-head { display: flex; align-items: center; gap: 10px; }
.lobby-academy .ac-owl { font-size: 2rem; }
.lobby-academy .ac-bar { margin: 8px 0 4px; }
@media (max-width: 600px) { .ac-window { border: 0; } .ac-scroll { padding: 12px; } }

/* Академия: тренажёр и сетка */
.ac-gname { margin: 10px 0 4px; font-size: .85rem; opacity: .75; text-transform: uppercase; letter-spacing: .04em; }
.ac-spots { display: flex; flex-wrap: wrap; gap: 6px; }
.ac-spot { display: flex; flex-direction: column; align-items: flex-start; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.05); color: inherit; cursor: pointer; min-width: 84px; }
.ac-spot small { opacity: .65; min-height: 1em; font-size: .75rem; }
.ac-spot.on { border-color: var(--gold); background: rgba(224,176,76,.15); }
.ac-situ { margin: 0; line-height: 1.45; }
.ac-hand { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 0; }
.ac-pc { width: 64px; height: 90px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 9px; background: #fbf6e8; color: #1c1c1c; box-shadow: 0 3px 8px rgba(0,0,0,.45); font-size: 1.5rem; line-height: 1.1; }
.ac-pc.red { color: #c0302b; }
.ac-pc i { font-style: normal; font-size: 1.6rem; }
.ac-hand-name { margin-left: 8px; font-size: 1.1rem; font-weight: 700; opacity: .8; }
.ac-opts.row { flex-direction: row; flex-wrap: wrap; }
.ac-opts.row .ac-opt { flex: 1; text-align: center; min-width: 90px; font-weight: 700; }
.ac-k-three { border-color: #d64541; }
.ac-k-raise, .ac-k-push { border-color: #e0b04c; }
.ac-k-call { border-color: #2ea86b; }
.ac-opt.dim { opacity: .4; }
.ac-review { align-self: flex-start; font-size: .8rem; padding: 3px 10px; border-radius: 10px; background: rgba(224,176,76,.2); }
.ac-drill-foot { text-align: center; }
.ac-grid { display: grid; grid-template-columns: repeat(13, 1fr); gap: 2px; }
.ac-gc { aspect-ratio: 1; padding: 0; font-size: clamp(.5rem, 1.9vw, .75rem); border-radius: 4px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.06); color: inherit; cursor: pointer; }
.ac-gc.on { background: #b8892f; border-color: var(--gold); color: #fff; font-weight: 700; }
.ac-gc.ok { background: #1d7a4b; border-color: #2ea86b; color: #fff; }
.ac-gc.extra { background: #7d2622; border-color: #d64541; color: #fff; }
.ac-gc.soft { background: repeating-linear-gradient(135deg, rgba(224,176,76,.35) 0 3px, rgba(255,255,255,.05) 3px 6px); border-color: rgba(224,176,76,.6); color: var(--gold); }
.ac-gc.missed { background: rgba(255,255,255,.06); border: 2px solid var(--gold); color: var(--gold); font-weight: 700; }
.ac-ach-icon { font-size: 1.6rem; line-height: 1; }
/* Академия: столы-сценарии */
.ac-table { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 16px; background: radial-gradient(ellipse at center, #0e6b43, #073d27); border: 3px solid #5a3a1c; }
.ac-seats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ac-seat { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border-radius: 10px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.12); min-width: 0; }
.ac-seat small { opacity: .75; font-size: .72rem; }
.ac-seat b { font-size: .85rem; font-weight: 600; }
.ac-seat.fold { opacity: .45; }
.ac-seat.bet { border-color: var(--gold); }
.ac-seat.hero { background: rgba(224,176,76,.25); border-color: var(--gold); }
.ac-tinfo { display: flex; justify-content: space-between; font-size: .9rem; }
.ac-board { display: flex; justify-content: center; gap: 6px; }
.ac-board .ac-pc { width: 48px; height: 68px; font-size: 1.15rem; }
.ac-board .ac-pc i { font-size: 1.2rem; }
.ac-table .ac-hand { padding: 0; }
.ac-note { margin: 0; text-align: center; }
.ac-sc-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ac-sc-text small { opacity: .65; }
.ac-opt:disabled { color: inherit; opacity: .65; cursor: default; }
.ac-opt.right:disabled, .ac-opt.wrong:disabled, .ac-opt.edge:disabled { opacity: 1; color: #fff; }

/* Достижения, которые копятся: полоска «3/5» под названием */
.ach-prog { position: relative; height: 12px; margin: 4px 0 2px; border-radius: 6px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.15); overflow: hidden; width: 100%; }
.ach-prog i { display: block; height: 100%; background: linear-gradient(90deg, #2ea86b, #e0b04c); }
.ach-prog span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 9px; line-height: 1; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.8); }

/* Академия: картинки (public/img/academy, собраны .claude/skills/add-fighter/build-academy-art.py) */
.ac-img { display: block; object-fit: contain; user-select: none; }
.ac-owl { display: grid; place-items: center; }
.ac-rank-img { width: 62px; height: 62px; }
.ac-ch-img { width: 56px; height: 56px; }
.ac-task-img { width: 44px; height: 44px; }
.ac-card-icon { line-height: 1.15; min-height: 1.15em; }
.ac-card-icon img { display: block; }
.ac-card-icon .ac-task-img { width: 54px; height: 54px; }
.ac-ach-icon { line-height: 0; align-self: center; }
.ac-ach-img { width: 78px; height: 78px; object-fit: contain; }
.ac-ach-img.locked { filter: grayscale(1) brightness(.4); opacity: .75; }
.ac-owl-big { width: 190px; height: 190px; margin: 0 auto; }
.ac-big { line-height: 0; }
.ac-fb { display: flex; align-items: center; gap: 10px; }
.ac-fb-owl { width: 60px; height: 60px; flex: none; }
.lobby-academy { background: linear-gradient(90deg, rgba(10, 26, 43, .94) 38%, rgba(10, 26, 43, .25)), url("/img/academy/academy-hero.webp?v=2") 85% center / cover; }
.lobby-academy .ac-rank-img { width: 46px; height: 46px; }
@media (max-width: 600px) { .ac-ach-img { width: 64px; height: 64px; } }

/* Академия: ещё экраны (повторение, слабые места, термины, вызовы, таблица недели, диплом) */
.ac-sec { margin: 6px 0 -4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; opacity: .7; }
.ac-offer { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: rgba(224, 176, 76, .12); border: 1px solid rgba(224, 176, 76, .5); }
.ac-offer p { margin: 4px 0 8px; font-size: .88rem; line-height: 1.35; }
.ac-offer-owl { width: 72px; height: 72px; flex: none; }
.ac-offer-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.ac-weak-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ac-weak-list span { padding: 3px 10px; border-radius: 12px; background: rgba(255, 255, 255, .08); font-size: .82rem; }
.ac-weak-list i { font-style: normal; opacity: .75; margin-left: 4px; }
.ac-lesson.boss { border-style: dashed; border-color: rgba(224, 176, 76, .55); }
.ac-lesson.boss.done { border-style: solid; border-color: rgba(46, 168, 107, .6); }
.ac-term { background: color-mix(in srgb, var(--gold) 16%, transparent); border: 0; border-radius: 6px; padding: 0 .3em; margin: 0 -.05em; font: inherit; font-weight: 600; color: inherit; text-decoration: none; cursor: pointer; transition: background .15s ease, box-shadow .15s ease; }
.ac-term:hover, .ac-term:focus-visible { background: color-mix(in srgb, var(--gold) 32%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 55%, transparent); outline: none; }
.ac-termbox { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(224, 176, 76, .14); border: 1px solid rgba(224, 176, 76, .5); font-size: .9rem; line-height: 1.4; }
.ac-termbox button { margin-left: auto; flex: none; padding: 2px 8px; }
.ac-real { margin: 6px 0 0; }
.ac-empty { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 12px; }
.ac-table.post { padding: 10px; }
.ac-lesson .ac-dot { min-width: 38px; width: auto; padding: 0 8px; border-radius: 13px; white-space: nowrap; }
.ac-wtable { display: flex; flex-direction: column; gap: 6px; }
.ac-wrow { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); }
.ac-wrow b { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-wrow.me { border-color: var(--gold); background: rgba(224, 176, 76, .12); }
.ac-wplace { width: 28px; text-align: center; font-weight: 700; }
.ac-wpts { font-weight: 700; color: var(--gold); }
.ac-code { font-family: ui-monospace, Menlo, monospace; letter-spacing: .18em; color: var(--gold); font-size: 1.15em; }
.ac-codebox { display: flex; gap: 8px; }
.ac-codebox input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .25em; text-align: center; font-size: 1.1rem; padding: 10px; }
.ac-diploma { width: 100%; height: auto; border-radius: 12px; border: 1px solid rgba(224, 176, 76, .5); background: #0a1a2b; }
.ac-spots.modes { margin-bottom: 4px; }
.hist-lesson-row { display: flex; gap: 6px; align-items: stretch; }
.hist-lesson-row .hist-lesson { flex: 1; min-width: 0; }
.train-link { white-space: nowrap; }
.coach-lesson .train-link { margin-top: 4px; align-self: flex-start; }
@media (max-width: 600px) {
  .ac-offer { flex-direction: column; text-align: center; }
  .ac-offer-btns { justify-content: center; }
  .ac-grid { gap: 1px; }
  .ac-codebox input { letter-spacing: .15em; }
}
.ac-emoji-fallback { display: inline-grid; place-items: center; width: 78px; height: 78px; font-size: 2.6rem; line-height: 1; }
.ac-emoji-fallback.locked { filter: grayscale(1) brightness(.5); opacity: .75; }
.ach-badge .ac-emoji-fallback { width: 100%; height: 100%; }

/* Academy labs: numeric answer, ICM stacks, pot line */
.ac-num { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.ac-num input { width: 7em; font-size: 1.15rem; padding: 8px 10px; border-radius: 10px; border: 1px solid #3a3f4a; background: var(--panel2); color: var(--text); text-align: center; }
.ac-num span { color: var(--muted); }
.ac-pot { margin: 6px 0 0; text-align: center; color: var(--gold); font-weight: 700; }
.ac-icm { background: var(--panel2); border-radius: 12px; padding: 10px 12px; margin: 8px 0; display: grid; gap: 6px; }
.ac-icm-prizes { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: .8rem; color: var(--gold); }
.ac-icm-row { display: grid; grid-template-columns: 5.5em minmax(0, 1fr) 3.6em 2.6em; gap: 8px; align-items: center; font-size: .85rem; }
.ac-icm-row.me .ac-icm-name { color: var(--gold); font-weight: 700; }
.ac-icm-bar { height: 10px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; }
.ac-icm-bar i { display: block; height: 100%; background: linear-gradient(90deg, #1f8a70, #e0b04c); border-radius: 6px; }
.ac-icm-row b { text-align: right; }
.ac-icm-row small { color: var(--muted); text-align: right; }

.ac-story-hist { list-style: none; margin: 0 0 8px; padding: 8px 10px; background: var(--panel2); border-radius: 10px; font-size: .85rem; display: grid; gap: 3px; color: var(--muted); }
.ac-opt.real { outline: 2px dashed var(--gold); outline-offset: -2px; }

.ac-leak { display: grid; grid-template-columns: 6.5em minmax(0, 1fr) 5.2em 2em; gap: 8px; align-items: center; font-size: .85rem; }
.ac-leak-bar { position: relative; height: 10px; border-radius: 6px; background: rgba(255,255,255,.08); }
.ac-leak-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: #1f8a70; }
.ac-leak.tight .ac-leak-bar i { background: #5b8def; }
.ac-leak.loose .ac-leak-bar i { background: #d4532c; }
.ac-leak-bar u { position: absolute; top: -3px; bottom: -3px; width: 3px; background: var(--gold); border-radius: 2px; text-decoration: none; }
.ac-leak-num small { color: var(--muted); }
.ac-leak-ok { color: #2ea86b; text-align: center; font-weight: 700; }
.ac-leak > button.mini { justify-self: center; width: 2em; min-width: 0; padding: 2px 0; text-align: center; line-height: 1.3; } /* the bulb sits in the ✓ column, not past it */

.ac-opp { display: grid; gap: 2px; background: var(--panel2); border-left: 4px solid var(--gold); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.ac-opp span { color: var(--gold); font-weight: 700; font-size: .9rem; }
.ac-opp small { color: var(--muted); }

.ac-radar { width: min(100%, 360px); }
.ac-radar .grid polygon, .ac-radar .grid line { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 1; }
.ac-radar .area { fill: rgba(224,176,76,.28); stroke: var(--gold); stroke-width: 2; stroke-linejoin: round; }
.ac-radar circle { fill: var(--gold); }
.ac-radar text { fill: var(--text); font-size: 11px; }
.ac-radar text.none { fill: var(--muted); }
.ac-spark { width: 100%; display: grid; gap: 4px; }
.ac-spark svg { width: 100%; height: 70px; }
.ac-spark polyline { fill: none; stroke: #2ea86b; stroke-width: 2; vector-effect: non-scaling-stroke; }
.ac-spark circle { fill: #2ea86b; }
.ac-spark .mid { stroke: rgba(255,255,255,.12); stroke-dasharray: 3 3; }
.ac-spark small { color: var(--muted); }

.ac-dg { margin-top: 12px; padding: 10px; border-radius: 12px; background: rgba(0,0,0,.2); display: grid; gap: 6px; }
.ac-dg small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.ac-dg-bar { display: flex; gap: 3px; height: 34px; }
.ac-dg-bar i { display: grid; place-items: center; font-style: normal; font-size: .75rem; font-weight: 700; border-radius: 6px; color: #fff; padding: 0 4px; min-width: 0; overflow: hidden; white-space: nowrap; }
.ac-dg-bar .pot { background: #4a5568; }
.ac-dg-bar .bet { background: #d4532c; }
.ac-dg-bar .call { background: #1f8a70; }
.ac-dg-bar .fold { background: #2a303a; }
.ac-dg-rows { display: grid; gap: 6px; }
.ac-dg-rows > div { display: grid; gap: 3px; }
.ac-dg-rows span { font-size: .8rem; color: var(--muted); }
.ac-dg-rows u { display: block; text-decoration: none; background: linear-gradient(90deg, #1f8a70, #e0b04c); color: #1c1f26; font-weight: 700; font-size: .78rem; padding: 4px 8px; border-radius: 6px; white-space: nowrap; min-width: 3.2em; }
.ac-dg-rows.two u.chips { background: #4a5568; color: #fff; }
.ac-dg-rows.two u.money { background: #e0b04c; }
.ac-dg-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ac-dg-two > div { display: grid; gap: 4px; }
.ac-dg-fork { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.ac-dg-fork .top { grid-column: 1 / -1; font-weight: 700; color: var(--gold); }
.ac-dg-fork div { display: grid; gap: 2px; }
.ac-dg-fork b { padding: 8px 4px; border-radius: 8px; color: #fff; }
.ac-dg-fork b.three { background: #d4532c; }
.ac-dg-fork b.call { background: #1f8a70; }
.ac-dg-fork b.fold { background: #2a303a; }
.guide-pos-hint { color: var(--gold); }

/* «Шпаргалка» */
.ac-cheat { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.ac-cs { background: rgba(0,0,0,.2); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 10px 12px; }
.ac-cs h4 { margin: 0 0 4px; color: var(--gold); }
.ac-cs-pos { margin-top: 8px; }
.ac-cs-pos h5 { margin: 0 0 3px; font-size: .92em; }
.ac-cs-sub { font-size: .8em; color: var(--muted, #9aa3b2); margin: 4px 0 1px; text-transform: uppercase; letter-spacing: .04em; }
.ac-cs-line { display: flex; gap: 8px; font-size: .9em; line-height: 1.45; padding: 2px 0; }
.ac-cs-line span { flex: none; width: 6.8em; color: var(--muted, #9aa3b2); }
.ac-cs-line b { font-weight: 600; word-break: break-word; }
@media (max-width: 600px) { .ac-cs-line { flex-direction: column; gap: 0; } .ac-cs-line span { width: auto; font-size: .8em; } }

.ac-dg-legend { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
.ac-dg-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.ac-dg-legend i.pot { background: #4a5568; }
.ac-dg-legend i.call { background: #1f8a70; margin-left: 6px; }
.ac-dg-bar i.pot { min-width: 2.6em; }
.ac-dg-legend i.bet { background: #d4532c; margin-left: 6px; }
.ac-dg-legend i.chips { background: #4a5568; }
.ac-dg-legend i.money { background: #e0b04c; margin-left: 6px; }
.ac-dg-legend { flex-wrap: wrap; }

/* The Academy's main page (30 Oct 2026): the profile's look — neutral panels, thin lines, gold only for actions, red for mistakes */
.ac-window.map { width: min(1080px, 100%); }
.ac-top { flex: none; display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid #343944; }
.ac-top .ac-rank-img { width: 46px; height: 46px; flex: none; }
.ac-me { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ac-me b { font-size: 1.02rem; }
.ac-me small { color: var(--muted); font-size: .78rem; }
.ac-me .ac-bar { height: 6px; max-width: 360px; margin-top: 4px; background: #2d323c; }
.ac-me .ac-bar i { background: linear-gradient(90deg, #cd7f32, #ffd700); }
.ac-streak { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 999px; background: rgba(255,138,61,.12); border: 1px solid rgba(255,138,61,.35); white-space: nowrap; }
.ac-streak small { color: var(--muted); font-size: .72rem; }
.ac-ghost { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: 10px; background: var(--panel2); border: 1px solid #343944; font-size: .85rem; white-space: nowrap; }
.ac-ghost:hover { border-color: #4a5160; }
.ac-top .profile-close { position: static; }
.ac-btn { padding: 7px 14px; border-radius: 10px; border: 0; background: linear-gradient(180deg, #f3c45f, #d89b2b); color: #1b1408; font-weight: 800; font-size: .85rem; cursor: pointer; }
.ac-btn.red { background: linear-gradient(180deg, #ef7680, #d24b56); color: #fff; }
.ac-mini { padding: 6px 10px; border-radius: 9px; background: rgba(255,255,255,.04); border: 1px solid #343944; font-size: .78rem; color: inherit; cursor: pointer; }
.ac-mini:hover { border-color: #4a5160; }
.ac-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: var(--panel2); border: 1px solid #343944; font-size: .76rem; color: var(--muted); }
.ac-chip b { color: var(--text); }
button.ac-chip { cursor: pointer; }
button.ac-chip:hover { border-color: #4a5160; }
.ac-link { background: none; border: 0; padding: 0; color: var(--gold); font-size: .78rem; cursor: pointer; text-transform: none; letter-spacing: 0; margin-left: auto; }
.ac-ok { color: #4cc38a; font-weight: 700; font-size: .82rem; }
.ac-next { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: 16px; background: radial-gradient(120% 140% at 0% 0%, rgba(224,176,76,.18), transparent 60%), var(--panel2); border: 1px solid rgba(224,176,76,.45); }
.ac-next-owl { width: 60px; height: 60px; flex: none; }
.ac-next-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ac-next-t small { color: var(--gold); font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ac-next-t b { font-size: 1.12rem; margin: 2px 0; }
.ac-next-t span { color: var(--muted); font-size: .82rem; }
.ac-next-go { padding: 10px 18px; font-size: .95rem; white-space: nowrap; }
.ac-also { display: flex; gap: 8px; flex-wrap: wrap; margin-top: -6px; }
.ac-tabs { flex: none; display: flex; gap: 4px; border-bottom: 1px solid #343944; margin-bottom: -4px; }
.ac-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 9px 14px; margin-bottom: -1px; color: var(--muted); font-size: .95rem; cursor: pointer; white-space: nowrap; }
.ac-tabs button.on { color: var(--gold); border-bottom-color: var(--gold); font-weight: 700; }
.ac-tabs button i { font-style: normal; display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: #e5616b; color: #fff; font-size: .7rem; line-height: 18px; text-align: center; font-weight: 800; }
.ac-body { display: grid; gap: 18px; }
.ac-body > section { min-width: 0; }
.ac-h { margin: 0 0 10px; font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ac-h span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.ac-panel { padding: 14px; border-radius: 14px; background: var(--panel2); border: 1px solid #343944; min-width: 0; }
.ac-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.ac-daily { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.ac-feat { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--panel2); border: 1px solid #343944; min-width: 0; }
.ac-feat-img { width: 52px; height: 52px; flex: none; }
.ac-feat-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ac-feat-t > b { font-size: 1rem; }
.ac-feat-t > span { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.ac-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.ac-feat.due { border-color: rgba(229,97,107,.5); background: radial-gradient(120% 140% at 0% 0%, rgba(229,97,107,.14), transparent 60%), var(--panel2); }
.ac-feat.done { border-color: rgba(76,195,138,.45); }
.ac-remind { display: flex; gap: 8px; align-items: center; margin-top: 10px; font-size: .8rem; color: var(--muted); cursor: pointer; }
.ac-remind input { width: 16px; height: 16px; flex: none; margin: 0; }
.ac-remind small { opacity: .8; }
.ac-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ac-tile { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: var(--panel2); border: 1px solid #343944; min-width: 0; }
.ac-tile-hd { display: flex; gap: 10px; align-items: center; }
.ac-tile-img { width: 42px; height: 42px; flex: none; }
.ac-tile-hd b { display: block; font-size: .95rem; }
.ac-tile-hd small { color: var(--muted); font-size: .76rem; }
.ac-modes { display: flex; gap: 6px; flex-wrap: wrap; }
.ac-modes button { padding: 5px 10px; border-radius: 999px; font-size: .78rem; background: rgba(0,0,0,.25); border: 1px solid #3a404c; color: #dfe3ea; cursor: pointer; }
.ac-modes button:hover { border-color: var(--gold); color: #fff; }
.ac-acc { display: flex; align-items: center; gap: 8px; font-size: .76rem; color: var(--muted); margin-top: auto; }
.ac-acc-tr { flex: 1; height: 6px; border-radius: 3px; background: #2d323c; overflow: hidden; }
.ac-acc-tr i { display: block; height: 100%; border-radius: 3px; background: #3a404c; }
.ac-acc b { color: var(--text); font-variant-numeric: tabular-nums; }
.ac-window .good { --tone: #4cc38a; } .ac-window .mid { --tone: #e6c27a; } .ac-window .bad { --tone: #e5616b; }
.ac-acc-tr i.good, .ac-acc-tr i.mid, .ac-acc-tr i.bad, .ac-days i.good, .ac-days i.mid, .ac-days i.bad { background: var(--tone); }
/* two columns read top to bottom: an open chapter only makes its column longer, no holes */
.ac-chs { columns: 2; column-gap: 10px; }
.ac-ch { break-inside: avoid; margin-bottom: 10px; border-radius: 14px; background: var(--panel2); border: 1px solid #343944; padding: 10px 12px 12px; min-width: 0; }
.ac-ch.open { border-color: rgba(224,176,76,.45); }
.ac-ch.full { border-color: rgba(76,195,138,.4); }
.ac-ch.locked { opacity: .6; }
.ac-ch-hd { width: 100%; display: flex; gap: 12px; align-items: center; padding: 0; background: none; border: 0; color: inherit; text-align: left; cursor: pointer; }
.ac-ch-ic { width: 52px; height: 52px; flex: none; border-radius: 12px; background: rgba(0,0,0,.25); display: grid; place-items: center; }
.ac-ch-img { width: 46px; height: 46px; }
.ac-ch-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ac-ch-t b { font-size: .95rem; }
.ac-ch-t small { color: var(--muted); font-size: .76rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ac-ch-pr { text-align: right; font-size: .74rem; color: var(--muted); white-space: nowrap; }
.ac-ch-pr b { display: block; font-size: .95rem; color: var(--text); }
.ac-ch.full .ac-ch-pr b { color: #4cc38a; }
.ac-bar.thin { height: 5px; margin-top: 10px; background: #2d323c; }
.ac-bar.thin i { background: #4cc38a; }
.ac-ls { display: grid; gap: 6px; margin-top: 12px; }
.ac-ls-h { margin: 6px 0 0; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ac-l { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.2); border: 1px solid transparent; font-size: .84rem; min-width: 0; color: inherit; text-align: left; cursor: pointer; }
.ac-l:hover:not(:disabled) { border-color: #4a5160; }
.ac-l:disabled { opacity: .5; cursor: not-allowed; }
.ac-d { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; background: rgba(255,255,255,.08); }
.ac-l.done .ac-d { background: rgba(76,195,138,.18); color: #4cc38a; }
.ac-l.boss .ac-d { background: rgba(224,176,76,.18); color: var(--gold); }
.ac-l.prac .ac-d { background: rgba(108,198,255,.16); color: #6cc6ff; }
.ac-l-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-l .ac-stars { font-size: .72rem; letter-spacing: -1px; white-space: nowrap; }
.ac-days { display: flex; align-items: flex-end; gap: 3px; height: 90px; margin: 6px 0 8px; }
.ac-days i { flex: 1; max-width: 22px; border-radius: 3px 3px 0 0; background: #3a404c; min-height: 3px; }
.ac-panel .hint { margin: 0; font-size: .78rem; }
.ac-panel .ac-radar { display: block; margin: 0 auto; width: min(100%, 340px); }
.ac-panel .ac-leak { padding: 3px 0; }
.ac-panel .ac-weak-list { align-items: center; margin: 10px 0 8px; }
.ac-panel .ac-weak-list small { color: var(--muted); font-size: .76rem; margin-right: 2px; }
.ac-panel .ac-weak-list span { background: rgba(229,97,107,.12); border: 1px solid rgba(229,97,107,.35); color: #f0a5ab; }
.ac-panel.ac-feat { align-items: center; }
.ac-spotname { color: var(--muted); font-size: .78rem; margin-bottom: -4px; }
.ac-lhead .ac-mini { flex: none; }
.ac-scroll { padding: 16px 18px; }
@media (max-width: 760px) {
  .ac-daily, .ac-two { grid-template-columns: minmax(0, 1fr); }
  .ac-chs { columns: 1; }
  .ac-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ac-next { flex-wrap: wrap; gap: 12px; }
  .ac-next-owl { width: 46px; height: 46px; }
  .ac-next-t { flex-basis: calc(100% - 62px); }
  .ac-next-go { flex-basis: 100%; }
  .ac-tabs button { padding: 9px 10px; }
}
@media (max-width: 480px) {
  .ac-top { gap: 8px; padding: 10px 12px; }
  .ac-top .ac-rank-img { width: 38px; height: 38px; }
  .ac-streak small, .ac-ghost span { display: none; }
  .ac-streak, .ac-ghost { padding: 5px 8px; }
  .ac-tiles { grid-template-columns: minmax(0, 1fr); }
  .ac-scroll { padding: 12px; }
  .ac-feat { padding: 12px; gap: 10px; }
  .ac-feat-img { width: 42px; height: 42px; }
}

/* Profile: the stat sections as cards, two columns on a desktop */
.profile-sections { display: grid; gap: .8em; margin-top: .9em; }
.profile-sections > .profile-section { margin-top: 0; background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: .7em .9em; }
@media (min-width: 900px) {
  .profile-card.profile-main { width: min(1040px, 100%); }
  .profile-sections { grid-template-columns: 1fr 1fr; }
}
/* «Вид и настройки» as tabs, wider on a desktop */
.look-card { text-align: left; }
.look-card h2, .look-card > .hint { text-align: center; }
.look-tabs { position: sticky; top: -1.4em; z-index: 4; display: flex; gap: 6px; margin: .6em -1.6em .8em; padding: .6em 1.6em; background: var(--panel); border-bottom: 1px solid #3a3f4a; overflow-x: auto; scrollbar-width: none; }
.look-tabs::-webkit-scrollbar { display: none; }
.look-tabs button { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: .55em 1em; border-radius: 10px; font-weight: 700; white-space: nowrap; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); color: inherit; cursor: pointer; }
.look-tabs button.on { background: rgba(224,176,76,.2); border-color: var(--gold); }
.look-box { background: rgba(0,0,0,.16); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: .7em .9em; margin-bottom: .8em; }
.look-box > h4, .look-pane > h4 { margin-top: 0; }
.look-pane { display: block; }
@media (min-width: 900px) {
  .profile-card.look-card { width: min(920px, 100%); }
}

/* A number on a scale: red / amber / green zones and a marker */
.zone-bar { position: relative; display: flex; height: 8px; border-radius: 4px; overflow: hidden; margin: .45em auto .3em; background: #3e4554; }
.zone-bar i { display: block; height: 100%; }
.zone-bar .z-bad { background: #b9544e; } .zone-bar .z-ok { background: #c99a3c; } .zone-bar .z-good { background: #2e9b66; }
.zone-bar b { position: absolute; top: -2px; width: 3px; height: 12px; margin-left: -1.5px; background: #fff; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.55); }
.hero-meter.bench { display: block; height: auto; margin: .35em .2em 0; }
.hero-meter.bench .zone-bar { margin: 0 0 2px; }
.bench-ends { position: relative; height: 1.1em; font-size: .6em; color: var(--muted); }
.bench-ends span { position: absolute; transform: translateX(-50%); }
.bench-ends span:first-child { transform: none; } .bench-ends span:last-child { transform: translateX(-100%); }
.lvl-verdict { display: flex; align-items: flex-start; gap: 6px; margin-top: .35em; font-size: .68em; line-height: 1.3; text-align: left; }
.lvl-verdict i { flex: none; width: 8px; height: 8px; margin-top: .3em; border-radius: 50%; background: #888; }
.lvl-verdict.good i { background: #2e9b66; } .lvl-verdict.ok i { background: #c99a3c; } .lvl-verdict.bad i { background: #b9544e; }
.lvl-verdict.good { color: #8fdcb0; } .lvl-verdict.ok { color: #e6c27a; } .lvl-verdict.bad { color: #f0a29c; }
.lvl-metric.wide-result { grid-column: 1 / -1; }
.lvl-metric.wide-result .zone-bar { max-width: 360px; }

/* the speedometer takes the tone of its verdict */
.lvl-gauge.tone-good .fill { stroke: #2e9b66; } .lvl-gauge.tone-ok .fill { stroke: #d9a441; } .lvl-gauge.tone-bad .fill { stroke: #c9605a; }
/* «?» that opens a plain explanation */
.info-btn { float: right; width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); color: var(--muted); font-size: .75em; font-weight: 800; line-height: 1; cursor: pointer; }
.info-btn.on, .info-btn:hover { background: rgba(224,176,76,.25); color: #fff; border-color: var(--gold); }
.hero-stat { position: relative; }
.hero-stat .info-btn { position: absolute; top: 6px; right: 6px; float: none; }
.lvl-label .info-btn { margin-left: 6px; float: none; vertical-align: middle; }
.info-box { margin: .5em 0; padding: .6em .8em; background: rgba(224,176,76,.1); border: 1px solid rgba(224,176,76,.4); border-radius: 10px; text-align: left; font-size: .85em; line-height: 1.45; }
.info-box p { margin: .25em 0 0; }
.hist-when { flex: none; font-size: .72em; color: var(--muted); width: 6.2em; text-align: left; line-height: 1.25; }
.hist-head { margin: .9em 0 .4em; font-size: .78em; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; text-align: left; }
.hist-fav:not(.on) { opacity: .4; filter: grayscale(1); }

/* speedometer: a smooth red → amber → green ring and a needle */
.zgauge { display: block; width: 100%; max-width: 124px; margin: .35em auto .1em; overflow: visible; }
.zgauge.sm { max-width: 56px; margin: 0 auto; }
.zarcs path { stroke-linecap: butt; }
.zneedle-bg { stroke: rgba(0,0,0,.7); stroke-width: 4.2; stroke-linecap: round; }
.zneedle { stroke: #fff; stroke-width: 2.4; stroke-linecap: round; }
.zhub { fill: #fff; stroke: rgba(0,0,0,.7); stroke-width: 1.4; }
.hero-meter.bench { display: block; height: auto; margin: .2em .2em 0; }
.lvl-goal { margin-top: .3em; padding: .3em .5em; font-size: .66em; line-height: 1.3; text-align: left; color: #e6edf3; background: rgba(255,255,255,.07); border-radius: 6px; border-left: 3px solid var(--gold); }
.style-dial .zgauge.sm { width: 46px; }

/* ---- Chips v2 (desktop): glossy chips (public/img/chips), a pile is the chips' edges with a flattened top disc and the denomination engraved in it ---- */
.piles2 { display: inline-flex; align-items: flex-end; justify-content: center; gap: 5px; --d: 26px; }
.piles2.pot { --d: 31px; gap: 6px; }
.piles2.bet, .piles2.win { --d: 27px; }
/* a chip is a short cylinder seen from above: a flattened top face on a band whose lower edge curves like the ellipse's lower arc;
   chips of a pile stack by the band's thickness, so the edges between them show as scallops */
.pile2 { --eh: calc(var(--d) * .72); --t: calc(var(--d) * .233); /* a quarter narrower than before, a quarter thicker: the thickness grows in px while the diameter shrinks */
  position: relative; flex: none; width: var(--d); height: calc(var(--h, 1) * var(--t) + var(--eh)); }
.pile2-n { position: absolute; right: -6px; top: -7px; z-index: 2; font-size: 10px; font-weight: 800; color: #fff; background: rgba(0,0,0,.78); border-radius: 7px; padding: 0 4px; }
.pot-pile { display: flex; justify-content: center; align-items: flex-end; height: 66px; margin-top: 4px; pointer-events: none; }
.pot-pile.landing .pile2 { animation: pileLand .5s .45s ease-out backwards; }
@keyframes pileLand { from { transform: scale(1.18) translateY(-6px); } to { transform: none; } }
.pot-total { background: none; padding: 0 .1em; font-size: 1em; }
.seat-chip.v2 { display: flex; flex-direction: column; align-items: center; position: absolute; padding: 0; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
/* the amount reads under the chips, across their full width, and the ante gets its own line below it */
.seat-chip.v2 .chip-total { position: static; align-self: stretch; margin-top: 2px; text-align: center; }
.seat-chip.v2 .chip-total.ante { margin-top: 1px; }
.chip-total { font-size: 11px; font-weight: 800; color: #fff; background: rgba(8,12,10,.78); border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 0 7px; line-height: 16px; }
.chip-total.win { color: #ffe39a; border-color: rgba(224,176,76,.7); }
.chip-total.ante { font-size: 10px; opacity: .85; }
@keyframes chipCollect2 {
  from { opacity: 1; transform: translate(var(--cx, 0), var(--cy, 0)) scale(1); }
  70% { opacity: 1; }
  to { opacity: 0; transform: translate(var(--tx, 0), var(--ty, 0)) scale(.82); }
}
.seat-chip.v2.collecting { animation: chipCollect2 .55s cubic-bezier(.4, 0, .6, 1) forwards; }
@keyframes chipWinFly {
  from { transform: translate(var(--wx, 0), var(--wy, 0)) scale(.7); opacity: .2; }
  to { transform: translate(var(--cx, 0), var(--cy, 0)) scale(1); opacity: 1; }
}
.seat-chip.v2.win-fly { animation: chipWinFly .7s cubic-bezier(.22, .72, .24, 1) forwards; }
/* v2: the pot total is a small pill, not a band across the whole board (bets used to lie on its ends) */
.pot-area:has(.pot-pile) .pot-amount { display: inline-block; }

/* ---- Chips v2 animation: slower, with a pause, an arc and a landing bounce ---- */
@keyframes chipCollect2 {
  0% { opacity: 1; transform: translate(var(--cx, 0), var(--cy, 0)) scale(1); }
  22% { opacity: 1; transform: translate(var(--cx, 0), var(--cy, 0)) scale(1.06); }   /* a beat: the bets are gathered */
  55% { opacity: 1; transform: translate(calc(var(--cx, 0px) + (var(--tx, 0px) - var(--cx, 0px)) * .55), calc(var(--cy, 0px) + (var(--ty, 0px) - var(--cy, 0px)) * .55 - 26px)) scale(1.02); }
  88% { opacity: 1; transform: translate(var(--tx, 0), var(--ty, 0)) scale(.96); }
  100% { opacity: 0; transform: translate(var(--tx, 0), var(--ty, 0)) scale(.9); }
}
.seat-chip.v2.collecting { animation: chipCollect2 1.15s cubic-bezier(.45, .05, .35, 1) .12s both; }
.pot-pile.landing .pile2 { animation: pileLand .7s calc(.95s + var(--n, 0) * .08s) cubic-bezier(.3, 1.6, .5, 1) backwards; }
.pot-pile .pile2:nth-child(1) { --n: 0; } .pot-pile .pile2:nth-child(2) { --n: 1; } .pot-pile .pile2:nth-child(3) { --n: 2; } .pot-pile .pile2:nth-child(4) { --n: 3; } .pot-pile .pile2:nth-child(5) { --n: 4; }
@keyframes pileLand { 0% { transform: translateY(-34px) scale(1.15); opacity: 0; } 45% { opacity: 1; } 70% { transform: translateY(2px) scale(.98); } 100% { transform: none; opacity: 1; } }
@keyframes chipFlyToTable {
  0% { transform: translate(calc(var(--cx, 0px) + var(--fly-fx, 0px)), calc(var(--cy, 0px) + var(--fly-fy, 0px) - 18px)) scale(.55); opacity: .4; }
  70% { transform: translate(var(--cx, 0px), calc(var(--cy, 0px) - 6px)) scale(1.06); opacity: 1; }
  100% { transform: translate(var(--cx, 0px), var(--cy, 0px)) scale(1); opacity: 1; }
}
.seat-chip.chip-fly-in:not(.collecting) { animation: chipFlyToTable .85s cubic-bezier(.3, .8, .3, 1) forwards; }
@keyframes chipWinFly {
  0% { transform: translate(var(--wx, 0), var(--wy, 0)) scale(.75); opacity: 0; }
  12% { opacity: 1; }
  60% { transform: translate(calc(var(--cx, 0px) + (var(--wx, 0px) - var(--cx, 0px)) * .3), calc(var(--cy, 0px) + (var(--wy, 0px) - var(--cy, 0px)) * .3 - 30px)) scale(1.1); }
  100% { transform: translate(var(--cx, 0), var(--cy, 0)) scale(1); opacity: 1; }
}
.seat-chip.v2.win-fly { animation: chipWinFly 1.5s cubic-bezier(.35, .1, .25, 1) .6s both; }
.seat-chip.v2.win-fly .pile2 { animation: winPop .5s calc(1.75s + var(--n, 0) * .1s) ease-out backwards; }
.seat-chip.v2.win-fly .pile2:nth-child(2) { --n: 1; } .seat-chip.v2.win-fly .pile2:nth-child(3) { --n: 2; } .seat-chip.v2.win-fly .pile2:nth-child(4) { --n: 3; }
@keyframes winPop { 0% { transform: scale(1); } 40% { transform: scale(1.22) translateY(-4px); } 100% { transform: none; } }
.seat-chip.v2.win-chips { z-index: 32; } /* above the result banner (the pot area, 31): the seat holding them has no layer of its own (below) */
.table-oval > .seat:has(> .seat-chip.win-chips) { z-index: auto; } /* the seat holding the winner's chips is no layer of its own: its plaque stays under the winner's plaque (the pot area, 31) while the chips themselves (32) fly over it, into the stack. A seat layer of 32 put the plaque over the banner too */
/* ...and its spot from the table editor goes in margins, not `translate`: a translate makes the seat a layer at 0 after all, and the
   felt's gold line (the oval's ::after, also 0 but later in the page) was then drawn across the winner's plaque */
.table-oval > .seat:has(> .seat-chip.win-chips) { translate: none !important; margin: var(--lay-y, 0px) 0 0 var(--lay-x, 0px); }
.side2 { position: absolute; left: 0; pointer-events: none; filter: drop-shadow(0 1px 0 rgba(0,0,0,.35)); }
/* the rack beside a plaque (chip edges, largest first) */
.chip-stack.bankroll.piles.v2 { display: flex; flex-direction: column; justify-content: flex-start; align-items: center; gap: 3px; padding: 4px 3px; box-sizing: border-box; border-radius: 6px;
  background: linear-gradient(90deg, rgba(90,58,32,.55), rgba(28,16,8,.88)); border: 1px solid rgba(232,196,120,.7); box-shadow: inset 0 0 0 1px rgba(255,220,160,.18); }
.chip-stack.bankroll.piles.v2 .tw { position: relative; display: block; flex: none; width: 24px; height: calc(24px * .244 + (var(--h, 1) - 1) * 3px); }
.chip-stack.bankroll.piles.v2 .tw .side2 { width: 24px; height: calc(24px * .244); bottom: calc(var(--i, 0) * 3px); }
.chip-stack.bankroll.piles.v2 .tw .chip-count { right: -6px; bottom: -3px; font-size: .55em; }

/* Chips v2, our own drawn look (the old coloured discs) in the same cylinder shape; a little bigger than the pictures */
  background: radial-gradient(circle, #f7f3e9 0 52%, rgba(0,0,0,.35) 53% 56%, transparent 58%), repeating-conic-gradient(var(--chip-color) 0deg 22deg, var(--chip-edge) 22deg 44deg);
  box-shadow: 0 1px 2px rgba(0,0,0,.5); }

/* the rack in our own drawn look: the same striped chip edges as the piles on the table */
.chip-stack.bankroll.piles.v2 .tw .rb { border-radius: 3px / 50%; box-sizing: border-box; border: 1px solid rgba(0,0,0,.55); filter: none;
  background: linear-gradient(180deg, rgba(255,255,255,.28), transparent 45%, rgba(0,0,0,.25)), repeating-linear-gradient(90deg, var(--chip-color) 0 4px, var(--chip-edge) 4px 5px, var(--chip-color) 5px 11px, rgba(255,255,255,.85) 11px 14px); }

/* the rack beside a plaque, chips v2: a column of small piles in the table's own chip look */
.chip-stack.bankroll.piles.rack2 { display: flex; flex-direction: column-reverse; justify-content: flex-start; align-items: center; gap: 3px; padding: 4px 4px 3px; box-sizing: border-box; --d: calc(28px * var(--rk, 1)); border-radius: 7px;
  background: linear-gradient(90deg, rgba(90,58,32,.55), rgba(28,16,8,.88)); border: 1px solid rgba(232,196,120,.7); box-shadow: inset 0 0 0 1px rgba(255,220,160,.18); }
.chip-stack.bankroll.piles.rack2 .pile2-n { right: -9px; top: -6px; font-size: 8px; padding: 0 3px; }

/* chips v2: no hidden gap — the chips fly in as a bunch (the piles overlap on the way) and stay fully visible until the pile under the cards is there */
@keyframes chipCollect2 {
  0% { opacity: 1; transform: translate(var(--cx, 0), var(--cy, 0)) scale(1); }
  22% { opacity: 1; transform: translate(var(--cx, 0), var(--cy, 0)) scale(1.05); }
  60% { opacity: 1; transform: translate(calc(var(--cx, 0px) + (var(--tx, 0px) - var(--cx, 0px)) * .6), calc(var(--cy, 0px) + (var(--ty, 0px) - var(--cy, 0px)) * .6 - 22px)) scale(1); }
  100% { opacity: 1; transform: translate(var(--tx, 0), var(--ty, 0)) scale(1); }
}
.seat-chip.v2.collecting { animation: chipCollect2 1.1s cubic-bezier(.45, .05, .35, 1) .1s both; }
.seat-chip.v2.collecting .pile2 { animation: gatherIn 1.1s ease-in-out .1s both; }
@keyframes gatherIn { 0%, 20% { margin: 0; } 100% { margin: 0 -9px; } }



/* chips v2, pictures: every chip is one picture at one angle (face ellipse + thick edge); a pile is the same picture repeated, each shifted up by the edge */
.pile2.ang { --st: calc(var(--d) * var(--stw, .2)); width: var(--d); height: calc(var(--d) * var(--ar, .9) + (var(--h, 1) - 1) * var(--st)); }
.pile2.ang .ang2 { position: absolute; left: 0; width: 100%; bottom: calc(var(--i, 0) * var(--st)); pointer-events: none; }

/* chips v2, pictures: a soft ellipse on the felt under the bottom chip, so the pile sits on the table instead of looking stuck on it */
.pile2.ang::before { content: ''; position: absolute; left: -10%; right: -10%; bottom: calc(var(--d) * -.02); height: calc(var(--d) * .28);
  border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.52), rgba(0,0,0,.26) 58%, rgba(0,0,0,0) 100%); pointer-events: none; }

/* the felt logo lies on the table under every plaque: a child of the oval (placed by applyTableLayout
   over the board row), not of the board row itself, which paints above the seats */
.table-oval > .felt-logo { position: absolute; left: 0; top: 0; width: 46%; height: auto; z-index: 0;
  transform: translateY(-70%); pointer-events: none; transition: opacity .6s ease; }
.table-oval > .felt-logo.dim { opacity: .3; }
/* the chip legend over the table shows the real chips */
.chip-legend .legend-chip { width: 17px; height: auto; vertical-align: -4px; margin-right: 2px; }
/* the amount under a pile of chips wears the season's colour (orange at Halloween, ice blue at New Year, gold otherwise) */
.chip-total { color: var(--season-a, var(--gold)); }
/* how much is lying in the pot, under the pile, in the same hand as a bet's amount */
.pot-pile { flex-direction: column; align-items: center; justify-content: flex-end; }
.chip-total.pot-chips { margin-top: 2px; }
/* when the swept bets land they arrive as one bunch in the middle, then sort themselves out by value */
.pot-pile.landing .pile2 { animation: pileSort .44s cubic-bezier(.25, .9, .3, 1) backwards; animation-delay: calc(var(--n, 0) * .06s); }
@keyframes pileSort {
  from { transform: translate(calc(((var(--cn, 1) - 1) / 2 - var(--n, 0)) * (var(--d) + 7px)), -4px) scale(.92); }
  to { transform: none; }
}

/* the win pile's amount wears the season's colour like every other chip label (it used to be a beige of its own) */
.seat-chip.v2 .chip-total.win { color: var(--season-a, var(--gold)); border-color: color-mix(in srgb, var(--season-a, var(--gold)) 85%, transparent); box-sizing: border-box; min-height: 16px; overflow: visible; }
/* the swept bets land as one heap, hold for a beat, then shuffle out into sorted piles */
.pot-pile.landing .pile2 { animation: pileSort .5s cubic-bezier(.25, .9, .3, 1) backwards; animation-delay: calc(.28s + var(--n, 0) * .07s); }
@keyframes pileSort {
  0% { transform: translate(calc(((var(--cn, 1) - 1) / 2 - var(--n, 0)) * (var(--d) + 6px)), -2px) rotate(-5deg) scale(.94); }
  55% { transform: translate(calc(((var(--cn, 1) - 1) / 2 - var(--n, 0)) * (var(--d) + 6px) * .35), -5px) rotate(2deg) scale(1.03); }
  100% { transform: none; }
}
/* the winner's chips stand on the felt for a beat, then go into the rack beside the plaque */
@keyframes winToRack {
  0% { transform: translate(var(--cx, 0px), var(--cy, 0px)) scale(1); opacity: 1; }
  30% { transform: translate(var(--cx, 0px), calc(var(--cy, 0px) - 8px)) scale(1.04); opacity: 1; }
  100% { transform: translate(calc(var(--cx, 0px) + var(--fly-fx, 0px)), calc(var(--cy, 0px) + var(--fly-fy, 0px))) scale(.45); opacity: 0; }
}
.seat-chip.v2.win-chips.to-rack { animation: winToRack .8s cubic-bezier(.4, .05, .3, 1) forwards; }
/* the chip-style samples in «Вид и настройки» */
.chip-swatch { display: inline-flex; align-items: flex-end; justify-content: center; gap: 5px; min-height: 42px; }
.chip-swatch img { width: 30px; height: auto; }
.chip-swatch.old { align-items: center; }

/* "Показать карту": your own cards invite a click while the hand is live, a shown one is marked for everyone */
.hole .playing-card.can-show { cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.hole .playing-card.can-show:hover { transform: translateY(-5px); box-shadow: 0 6px 14px rgba(0,0,0,.5), 0 0 0 2px var(--season-a, var(--gold)); }
.hole .playing-card.card-shown { box-shadow: 0 0 0 2px var(--season-a, var(--gold)), 0 0 14px color-mix(in srgb, var(--season-a, var(--gold)) 45%, transparent); }
/* a still glow: the box-shadow pulse repainted the plaque (and the table under it) every frame for as long as the card was shown */
/* and the plain words under the hand, so the owner can see it is public and for how much longer */
.shown-note { margin-top: .25em; font-size: .72em; font-weight: 700; line-height: 1.4; text-align: center; color: var(--season-a, var(--gold));
  background: rgba(8,12,10,.86); border: 1px solid color-mix(in srgb, var(--season-a, var(--gold)) 50%, transparent); border-radius: 999px; padding: .1em .5em; }
/* it hangs off the plaque's top edge, centred, instead of making it taller: a taller plaque re-centres on its spot, and it jumped up by half
   the line the moment a card was shown (and back down when the line went). The seat is lifted over its neighbours (1) while it is up,
   under the pot (3), so a plaque next to it cannot cover the line. */
.seat .shown-note { position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); margin: 0; white-space: nowrap; z-index: 6; pointer-events: none; }
.table-oval > .seat:has(> .seat-card > .shown-note:not([hidden])) { z-index: 2; }
@media (max-width: 480px), (orientation: landscape) and (max-height: 520px) and (max-width: 1100px) {
  /* the bottom plaque (your own, or the one a watcher sees there) sits right under the board, which wins any overlap: the line goes
     under the plaque, onto the rail */
  .seat:is([data-is-me="1"], :not(.seat-top, .seat-left, .seat-right)) .shown-note { bottom: auto; top: calc(100% + 6px); }
}
.show-ask { margin-top: .3em; padding: .3em .45em; border-radius: 10px; font-size: .72em; line-height: 1.5; text-align: center;
  background: rgba(8,12,10,.9); border: 1px solid color-mix(in srgb, var(--season-a, var(--gold)) 55%, transparent); color: var(--text); }
.show-ask-btns { display: flex; gap: .3em; justify-content: center; margin-top: .25em; }
.show-ask-btns .mini { font-size: 1em; padding: .15em .5em; }

/* The «в BB» chip in the table's header and the [B] hint on the units switch are kept in the DOM and still work (a
   click, and the B key itself), but are not drawn: visually hidden, not display:none, so they stay focusable and clickable. */
.tm-units, .unit-toggle .hk {
  position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important;
  overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; border: 0 !important; white-space: nowrap !important;
}

/* «Вид и настройки» on a phone: the window's own padding, the tab bar and the tiles were all desktop-sized, so the
   tiles stood two to a row with half the line empty and the tab bar ran off the edge. */
@media (max-width: 600px), (orientation: landscape) and (max-height: 520px) and (max-width: 1100px) {
  .profile-card.look-card { padding: .9em .8em .8em; }
  .look-card h2 { font-size: 1.15em; margin: .1em 1.8em .2em; }
  .look-card > .hint { font-size: .78em; margin: 0 0 .2em; }
  .look-card .profile-close { top: .3em; right: .3em; }
  .look-tabs { top: -.9em; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin: .4em -.8em .6em; padding: .45em .8em; overflow: visible; }
  .look-tabs button { padding: .45em .3em; font-size: .78em; gap: 4px; min-width: 0; white-space: normal; line-height: 1.15; }
  .look-box { padding: .5em .55em; margin-bottom: .6em; }
  .look-box > h4 { font-size: .74em; margin-bottom: .35em; }
  /* the tiles fill the line: as many as fit, each the same width */
  .look-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: .4em; }
  .look-opt[data-key="back"], .look-opt[data-key="felt"], .look-opt[data-key="wood"], .look-opt[data-key="room"],
  .look-opt[data-key="chips"], .look-opt[data-key="deck"], .look-opt[data-key="face"] { width: auto; min-width: 0; }
  .look-opt { padding: .35em .25em; font-size: .78em; }
  .look-opt .playing-card.big { width: 40px; height: 56px; }
  .look-cards .playing-card { width: 28px; height: 40px; }
  /* Four sample cards are wider than a grid cell: each deck choice takes the whole row. */
  .look-opt[data-key="deck"], .look-opt[data-key="cards"] { grid-column: 1 / -1; }
  .look-opt[data-key="deck"] .look-cards { justify-content: center; }
  .look-note { font-size: .72em; }
  .pref-list .pref-row { padding: .5em .4em; }
}

/* Chips v2 on a phone: the sizes above were drawn for a desktop table, and next to a phone's small plaques the piles
   and their amounts looked huge and lay on the plaques. Smaller piles, a smaller amount tag. */
@media (max-width: 480px), (orientation: landscape) and (max-height: 520px) and (max-width: 1100px) {
  .piles2.pot { --d: 20px; gap: 4px; }
  .piles2.bet, .piles2.win { --d: 17px; }
  .pot-pile { height: 46px; margin-top: 2px; }
  .chip-total { font-size: 9px; line-height: 13px; padding: 0 5px; border-width: 1px; }
  .seat-chip.v2 .chip-total { margin-top: 1px; }
  .seat-chip.v2 { filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }
  .pile2.ang { filter: none; }
}

/* A phone: no column of chips beside the plaques (the stack is a number on the plaque). Hidden, not removed — the layout code still measures it. */
@media (max-width: 480px), (orientation: landscape) and (max-height: 520px) and (max-width: 1100px) {
  .seat > .seat-bankroll { visibility: hidden; pointer-events: none; }
}

/* a full table on a phone (9+ seats): the bets and their tags shrink further, there is no room for more */
@media (max-width: 480px), (orientation: landscape) and (max-height: 520px) and (max-width: 1100px) {
  .table-oval.crowd-9 .piles2.bet, .table-oval.crowd-9 .piles2.win,
  .table-oval.crowd-11 .piles2.bet, .table-oval.crowd-11 .piles2.win { --d: 13px; }
  .table-oval.crowd-9 .piles2.pot, .table-oval.crowd-11 .piles2.pot { --d: 17px; }
  .table-oval.crowd-9 .chip-total, .table-oval.crowd-11 .chip-total { font-size: 8px; line-height: 11px; padding: 0 4px; }
}

/* Telegram window (js/poker/tg.js) */
.tg-card .tg-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin-right: -1.6em; padding-right: 1.6em; scrollbar-gutter: stable; } /* the scrollbar sits at the card's edge, not inside its padding */ /* the card is a height-capped flex column: without this the end of the list hung out below the frame */
.tg-card h2 { display: flex; align-items: baseline; gap: .6em; flex-wrap: wrap; }
.tg-ok { color: #6fd39a; font-size: .6em; font-weight: 600; }
.tg-steps { display: grid; gap: .5em; margin: .8em 0; }
.tg-steps > div { display: flex; align-items: center; gap: .7em; background: var(--panel2); border: 1px solid #343944; border-radius: 10px; padding: .55em .8em; }
.tg-steps b:first-child { background: var(--gold); color: #1a1a1a; border-radius: 50%; width: 1.6em; height: 1.6em; display: grid; place-items: center; flex: none; }
.tg-actions, .tg-quiet { display: flex; gap: .5em; flex-wrap: wrap; }
.tg-row { display: flex; align-items: center; gap: .8em; background: var(--panel2); border: 1px solid #343944; border-radius: 12px; padding: .7em .9em; margin: .8em 0; cursor: pointer; }
.tg-row input { width: 1.3em; height: 1.3em; accent-color: var(--gold); flex: none; }
.tg-row span { display: flex; flex-direction: column; }
.tg-row small { color: var(--muted); }
.tg-block { margin: .9em 0; }
.tg-title { font-weight: 700; margin-bottom: .4em; }
.tg-chips { display: flex; gap: .4em; flex-wrap: wrap; margin-bottom: .5em; }
.tg-chip { display: inline-flex; align-items: center; gap: .4em; background: var(--panel2); border: 1px solid var(--gold); border-radius: 999px; padding: .2em .3em .2em .8em; }
.tg-chip button { border: 0; background: rgba(255, 255, 255, .12); color: inherit; border-radius: 50%; width: 1.7em; height: 1.7em; padding: 0; flex: none; display: grid; place-items: center; font-size: .8em; line-height: 1; cursor: pointer; }
.tg-chip button:hover { background: rgba(255, 255, 255, .24); }
.tg-add { display: flex; gap: .5em; }
.tg-add input { flex: 1; min-width: 0; }
.tg-chips { max-height: 9.5em; overflow-y: auto; }

/* «Telegram-бот» and «Что нового» at the foot of the lobby's side column: a card like the ones above them */
.lobby-side .news-link {
  margin-top: 0; background: var(--panel); border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px; padding: .8em 1em;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.lobby-side .news-link:hover, .lobby-side .news-link:focus-visible { border-color: var(--gold); background: var(--panel2); }
.tg-row.slim { margin: .35em 0; padding: .5em .8em; }

/* A phone shows no chip rack beside the plaques (the stack is on the plaque) — by the device, not only by page width. */
html.phone .seat-bankroll { display: none; }

/* The player picker (js/poker/picker.js): search, tick any number, one button */
.pk-overlay { z-index: 1200; }
.pk-card { width: min(560px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; text-align: left; }
.pk-card h2 { margin: 0 2.2em .1em 0; }
.pk-sub { margin: .2em 0 .6em; }
.pk-search { width: 100%; box-sizing: border-box; margin: .3em 0 .5em; }
.pk-filters { display: flex; gap: .4em; flex-wrap: wrap; margin-bottom: .6em; }
.pk-chip { border: 1px solid #3a3f4a; background: transparent; color: var(--muted); border-radius: 999px; padding: .25em .75em; font: inherit; font-size: .88em; cursor: pointer; }
.pk-chip small { opacity: .75; margin-left: .15em; }
.pk-chip:hover { border-color: var(--gold); color: var(--text); }
.pk-chip.on { background: var(--gold); border-color: var(--gold); color: #1a1a1a; font-weight: 700; }
.pk-list { flex: 1; min-height: 140px; max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: .35em; padding-right: 2px; }
.pk-row { display: flex; align-items: center; gap: .7em; width: 100%; text-align: left; font: inherit; color: var(--text); background: var(--panel2); border: 1px solid #343944; border-radius: 12px; padding: .5em .7em; cursor: pointer; }
.pk-row:hover:not(.off) { border-color: var(--gold); }
.pk-row.on { border-color: var(--gold); background: rgba(224, 176, 76, .12); }
.pk-row.off { opacity: .45; cursor: not-allowed; }
.pk-box { flex: none; width: 1.5em; height: 1.5em; border-radius: 7px; border: 2px solid #5a606c; display: grid; place-items: center; font-weight: 800; color: #1a1a1a; font-size: .9em; }
.pk-row.on .pk-box { background: var(--gold); border-color: var(--gold); }
.pk-ava { position: relative; flex: none; width: 2.4em; height: 2.4em; border-radius: 50%; background: #2b303b; display: grid; place-items: center; font-size: .95em; }
.pk-ava img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pk-ava b { color: var(--gold); }
.pk-on { position: absolute; right: -1px; bottom: -1px; width: .7em; height: .7em; border-radius: 50%; background: #3ecf7a; border: 2px solid var(--panel2); }
.pk-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pk-tags { display: flex; gap: .3em; flex: none; }
.pk-tags em { font-style: normal; font-size: .72em; padding: .1em .55em; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--muted); white-space: nowrap; }
.pk-tags em.g { background: rgba(62, 207, 122, .18); color: #6fe0ae; }
.pk-tags em.x { background: rgba(214, 69, 65, .16); color: #ff8f8a; }
.pk-foot { display: flex; align-items: center; justify-content: space-between; gap: .8em; flex-wrap: wrap; margin-top: .8em; padding-top: .7em; border-top: 1px solid #343944; }
.pk-foot:empty { display: none; }
.pk-count { display: flex; align-items: center; gap: .6em; flex-wrap: wrap; }
.pk-link { border: 0; background: transparent; color: var(--gold); font: inherit; font-size: .88em; cursor: pointer; padding: 0; text-decoration: underline dotted; }
.pk-go { min-width: 11em; }
.pk-go:disabled { opacity: .4; cursor: not-allowed; }
.tg-wide { width: 100%; margin-bottom: .5em; }
.pick-btn { flex: none; }

/* 🎯 «голова за наградой»: the crosshair on the target's plaque (top-left corner, the streak mark has the right one), the
   hunter's star by the name, the burst when the head is taken */
/* top-centre, over the edge: the D/SB/BB chips sit in the left corner and the streak mark in the right one */
.seat .wanted-mark { position: absolute; top: -36px; left: calc(50% - 18px); z-index: 6; width: 36px; height: 36px; pointer-events: auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.55)); animation: wantedPulse 1.8s ease-in-out infinite; }
.seat .wanted-mark img { width: 100%; height: 100%; display: block; }
/* the red scope brackets round the whole plaque, breathing */
.seat .wanted-frame { position: absolute; inset: -9px; z-index: 6; pointer-events: none; animation: wantedScope 1.6s ease-in-out infinite alternate;
  background:
    linear-gradient(#ff3b30,#ff3b30) left top / 16px 3px no-repeat, linear-gradient(#ff3b30,#ff3b30) left top / 3px 16px no-repeat,
    linear-gradient(#ff3b30,#ff3b30) right top / 16px 3px no-repeat, linear-gradient(#ff3b30,#ff3b30) right top / 3px 16px no-repeat,
    linear-gradient(#ff3b30,#ff3b30) left bottom / 16px 3px no-repeat, linear-gradient(#ff3b30,#ff3b30) left bottom / 3px 16px no-repeat,
    linear-gradient(#ff3b30,#ff3b30) right bottom / 16px 3px no-repeat, linear-gradient(#ff3b30,#ff3b30) right bottom / 3px 16px no-repeat; }
@keyframes wantedScope { to { inset: -13px; opacity: .7; } }
@keyframes wantedPulse { 0%, 100% { transform: scale(1) rotate(0deg); } 50% { transform: scale(1.12) rotate(8deg); } }
.hunter-badge { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -.2em; margin-left: .15em; }
.hunter-badge img { width: 100%; height: 100%; display: block; }
.wanted-ko { position: fixed; z-index: 9000; pointer-events: none; transform: translate(-50%, -50%); }
@media (prefers-reduced-motion: reduce) { .seat .wanted-mark, .seat .wanted-frame { animation: none; } }

/* 🎬 «Представление участников» over the empty felt at a table's first deal (showTableIntro): clicks go through it */
/* «Старые счёты»: a small plaque in the middle of the felt, centred on its own size */
.table-intro { position: fixed; z-index: 30; pointer-events: none; padding: .45em 1em .5em; border-radius: 14px; box-sizing: border-box; width: max-content; max-width: min(88vw, 420px);
  transform: translate(-50%, -50%); text-align: center; background: rgba(10, 12, 16, .72); color: #f3ead8;
  animation: tiIn .4s ease-out; transition: opacity .4s ease; }
.table-intro.pre { z-index: 20; }
.table-intro.gone { opacity: 0; }
@keyframes tiIn { from { opacity: 0; } to { opacity: 1; } }
.ti-title { font-size: .72em; color: var(--muted, #a59c8c); }
.ti-duel { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .7em; margin: .15em 0; }
.ti-side { display: flex; align-items: center; gap: .4em; min-width: 0; font-size: .86em; font-weight: 600; }
.ti-side:first-child { flex-direction: row-reverse; }
.ti-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ti-score { font-size: 1.45em; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted, #a59c8c); white-space: nowrap; }
.ti-score i { font-style: normal; color: #f3ead8; margin: 0 .12em; }
.ti-duel.lead .ti-score i:first-child, .ti-duel.behind .ti-score i:last-child { color: var(--gold, #e0b04c); }
.ti-foot { font-size: .72em; color: var(--muted, #a59c8c); }
.ti-side :is(.ti-ava-wrap, .ti-ava) { width: 26px; height: 26px; border-radius: 50%; flex: none; }
.ti-ava-wrap { position: relative; display: inline-block; }
.ti-ava { object-fit: cover; display: grid; place-items: center; background: #3a3226; font-size: .8em; font-weight: 700; }
.ti-ava-wrap img.ti-ava { position: absolute; inset: 0; }
.ti-ava-wrap img:not([hidden]) + .ti-ava.placeholder { visibility: hidden; }
@media (max-width: 600px), (max-height: 500px) { .table-intro { font-size: 12px; } .ti-side :is(.ti-ava-wrap, .ti-ava) { width: 20px; height: 20px; } }

/* 💬 the dealer's speech bubble (showDealerSay) */
.dealer-say { position: fixed; z-index: 60; max-width: min(260px, 70vw); padding: .55em .8em; border-radius: 14px; background: #fffdf6; color: #1d1a16;
  font-size: 13.5px; line-height: 1.3; font-weight: 600; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); border: 2px solid #1d1a16; cursor: pointer;
  animation: dealerSayIn .32s cubic-bezier(.2, 1.4, .4, 1); transition: opacity .35s ease, transform .35s ease; transform-origin: 0 100%; }
.dealer-say::after { content: ''; position: absolute; width: 12px; height: 12px; background: #fffdf6; border: 2px solid #1d1a16; border-top: 0; border-right: 0; }
.dealer-say.by-dealer::after { left: -8px; bottom: 12px; transform: rotate(45deg); }
/* by the dealer (a wide screen): a small «ДИЛЕР» tab on the bubble's top edge, so it is clear who is talking */
.dealer-say.by-dealer { padding-top: 1.35em; }
.dealer-say.by-dealer::before { content: 'ДИЛЕР'; position: absolute; left: 12px; top: -11px; background: #1d1a16; color: #ffd45a; font: 800 10px/1 system-ui, sans-serif; letter-spacing: .14em; padding: 4px 8px; border-radius: 999px; }
.dealer-say.on-felt { transform-origin: 50% 0; font-size: 12.5px; }
/* no dealer to point at on a phone: no tail, a hat says who is talking */
.dealer-say.on-felt::after { display: none; }
.dealer-say.on-felt::before { content: '🎩 '; }
.dealer-say.gone { opacity: 0; transform: scale(.9); }
@keyframes dealerSayIn { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: scale(1); } }

/* 🍅 the drawn things thrown from the seat menu (throwItem) */
.throw-fly { position: fixed; left: 0; top: 0; z-index: 9000; pointer-events: none; will-change: transform; filter: drop-shadow(0 4px 4px rgba(0,0,0,.4)); }
.throw-bit { position: fixed; z-index: 9000; border-radius: 50%; pointer-events: none; will-change: transform; }
.seat > .throw-hits { position: absolute; left: var(--bx, 0px); right: var(--br, 0px); top: var(--by, 0px); bottom: var(--by, 0px); border-radius: 14px; overflow: hidden; contain: paint; pointer-events: none; z-index: 4; }
.throw-hit { position: absolute; transform: translate(-50%, -50%) rotate(var(--r, 0deg)); opacity: .95; transition: opacity .45s ease; animation: throwHit .35s cubic-bezier(.2,1.4,.4,1); object-fit: contain; }
.throw-hit.fading { opacity: 0; }
@keyframes throwHit { from { transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(.25); opacity: 0; } to { transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(1); opacity: .95; } }

/* 💩 thrown at a plaque */
.heart-fly, .heart-bit { position: fixed; left: 0; top: 0; z-index: 9000; line-height: 1; pointer-events: none; will-change: transform; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); }
.heart-fly { font-size: 34px; } .heart-fly img, .heart-bit img { width: 1em; height: 1em; object-fit: contain; display: block; }
.heart-bit { opacity: 0; }
.seat .seat-card.heart-hit { animation: heartHit .8s ease; }
@keyframes heartHit { 0% { box-shadow: 0 0 0 0 rgba(255, 105, 180, 0); transform: scale(1); } 20% { box-shadow: 0 0 22px 4px rgba(255, 105, 180, .85); transform: scale(1.04); } 100% { box-shadow: 0 0 0 0 rgba(255, 105, 180, 0); transform: scale(1); } }
.poo-fly { position: fixed; left: 0; top: 0; z-index: 9000; font-size: 34px; line-height: 1; pointer-events: none; will-change: transform; filter: drop-shadow(0 4px 4px rgba(0,0,0,.4)); }
/* The stains lie on the seat itself (over the plaque AND over a webcam on the card backs, which sits between the plaque and them), cut to the plaque's own corners: --bx/--by/--br are the plaque's insets (syncBadgeInsets), it may be shrunk. */
.seat > .poo-stains { position: absolute; left: var(--bx, 0px); right: var(--br, 0px); top: var(--by, 0px); bottom: var(--by, 0px); border-radius: 14px; overflow: hidden; contain: paint; pointer-events: none; z-index: 4; }
.poo-stain { position: absolute; transform: translate(-50%, -50%) rotate(var(--r, 0deg)); opacity: .92; transition: opacity .4s ease; }
.poo-stain svg { width: 100%; height: 100%; display: block; }
.poo-stain.fresh { animation: pooSplat .35s cubic-bezier(.2,1.4,.4,1); }
.poo-stain.fading { opacity: 0; }
@keyframes pooSplat { from { transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(.2); opacity: 0; } to { transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(1); opacity: .92; } }
.seat .seat-card.poo-hit { animation: pooHit .45s ease; }
@keyframes pooHit { 0%, 100% { translate: 0 0; } 20% { translate: -4px 2px; } 40% { translate: 4px -2px; } 60% { translate: -3px 1px; } 80% { translate: 2px 0; } }
.poo-drop { position: fixed; z-index: 9000; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #8a5a2b, #4a2c14); pointer-events: none; will-change: transform; }
.poo-bug { position: absolute; width: 22px; height: 22px; left: 0; top: 0; pointer-events: none; animation: pooBug var(--dur, 4s) linear var(--delay, 0s) infinite; }
.poo-bug svg { width: 100%; height: 100%; display: block; }
.poo-bug .wing { fill: rgba(235, 242, 250, .9); stroke: rgba(0,0,0,.35); stroke-width: .5; transform-origin: 10px 9px; animation: pooWing .08s linear infinite alternate; }
@keyframes pooWing { from { opacity: .35; } to { opacity: .85; } }
@keyframes pooBug {
  0% { left: var(--x0); top: var(--y0); rotate: 0deg; }
  25% { left: var(--x1); top: var(--y1); rotate: 40deg; }
  50% { left: var(--x2); top: var(--y2); rotate: -30deg; }
  75% { left: var(--x3); top: var(--y3); rotate: 25deg; }
  100% { left: var(--x0); top: var(--y0); rotate: 0deg; }
}

/* the winner's rack swells as the chips fly in, each pile hopping a beat after the one below */
.seat:has(.rack-swell) { z-index: 12; } /* above the result banner, which sits over the hero's side */
.seat-bankroll.rack-swell .chip-stack.bankroll { transform-origin: 50% 100%; animation: rackSwell 1.1s .65s cubic-bezier(.3, 1.5, .5, 1) both; }
.seat-bankroll.rack-swell .pile2 { animation: rackHop .6s calc(.7s + var(--n, 0) * .09s) cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes rackSwell { 0% { transform: scale(1); filter: none; } 30% { transform: scale(1.22); filter: drop-shadow(0 0 10px rgba(255, 214, 102, .9)); } 65% { transform: scale(.97); } 100% { transform: scale(1); filter: none; } }
@keyframes rackHop { 0% { transform: translateY(0); } 40% { transform: translateY(-9px) scale(1.08); } 70% { transform: translateY(1px); } 100% { transform: none; } }

/* ---------- «Живой тренер» (Oct 2026): a slim hint line in the table-tools row, above the buttons ---------- */
.live-coach {
  display: flex; align-items: center; gap: .55em; width: 100%; box-sizing: border-box;
  min-height: 2.5em; padding: .3em .6em; border-radius: 10px; font-size: .86em; line-height: 1.3;
  background: var(--panel2); border: 1px solid rgba(224, 176, 76, .4); text-align: left;
}
.live-coach .lc-icon { flex: none; font-size: 1.2em; line-height: 1; }
.live-coach .lc-meta { flex: none; padding: .05em .45em; border-radius: 6px; background: rgba(255,255,255,.08); font-variant-numeric: tabular-nums; }
.live-coach .lc-head { flex: none; font-size: 1.05em; }
.live-coach .lc-text { flex: 1 1 auto; min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.live-coach .lc-wait { flex: none; font-size: .85em; color: var(--muted); opacity: .85; }
.live-coach .lc-off { flex: none; padding: .05em .4em; margin-left: auto; }
.live-coach .lc-muted { color: var(--muted); }
.live-coach.good { border-color: rgba(76, 195, 138, .6); }
.live-coach.good .lc-head { color: #4cc38a; }
.live-coach.warn { border-color: rgba(224, 176, 76, .75); }
.live-coach.warn .lc-head { color: var(--gold); }
.live-coach.bad { border-color: rgba(239, 123, 123, .6); }
.live-coach.bad .lc-head { color: #ef7b7b; }
.live-coach.mine { box-shadow: 0 0 0 1px rgba(224, 176, 76, .25); }
.live-coach.idle { opacity: .7; }
/* The compact form (phones and narrow/short windows): one line between the felt and the buttons; a tap opens the text in a bubble above. */
.live-coach.lc-phone {
  position: relative; flex: none; width: calc(100% - 16px); max-width: 520px; min-height: 26px; margin: 0 auto;
  padding: .1em .5em; gap: .4em; font-size: .72em; white-space: nowrap; overflow: visible; cursor: pointer;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.lc-phone .lc-meta { font-size: .95em; }
.lc-phone .lc-head { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lc-phone .lc-wait, .lc-phone .lc-more { flex: none; color: var(--muted); }
.lc-phone .lc-muted { overflow: hidden; text-overflow: ellipsis; }
.lc-phone .lc-pop {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 30; padding: .5em .65em; white-space: normal;
  background: var(--panel); border: 1px solid rgba(224, 176, 76, .55); border-radius: 10px; font-size: 1.12em; line-height: 1.35;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .5); text-align: left;
}
.lc-phone .lc-pop i { color: var(--muted); }
/* A short landscape phone has no height to spare: the line floats over the empty strip just above the action bar instead of
   taking a row from the table (it cost the felt 15% of its height). */
@media (orientation: landscape) and (max-height: 520px) {
  .live-coach.lc-phone {
    position: absolute; left: auto; right: 56%; transform: none; bottom: calc(52px + .45em); width: min(290px, 34%); margin: 0; z-index: 9;
  }
}

/* The live coach reads centred: a short hint no longer leaves one side of the row empty. The ✕ stays at the edge. */
/* One fixed height for the idle line, a one-line hint and a two-line one: a hint appearing must not push the table narrower */
.live-coach:not(.lc-phone) { height: 3.5em; min-height: 0; overflow: hidden; }
.live-coach:not(.lc-phone) { justify-content: center; text-align: center; position: relative; padding-right: 2em; padding-left: 2em; }
.live-coach:not(.lc-phone) .lc-text { flex: 0 1 auto; text-align: center; }
.live-coach:not(.lc-phone) .lc-off { position: absolute; right: .4em; top: 50%; transform: translateY(-50%); margin: 0; }
.live-coach.lc-phone { justify-content: center; text-align: center; }
.lc-phone .lc-head { flex: 0 1 auto; }
.lc-phone .lc-more { margin-left: .2em; }

/* ---------- «Закурить» (Oct 2026): the cigarette on a plaque and the smoke over the table ---------- */
.smoke-layer { position: fixed; z-index: 50; overflow: hidden; pointer-events: none; border-radius: 12px;
  /* feathered edges: the layer is a clipped rectangle, and its hard border showed as a line of smoke */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 22%, #000 78%, transparent), linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 22%, #000 78%, transparent), linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect; }
.smoke-haze { position: absolute; inset: 0; background: radial-gradient(ellipse at 40% 55%, rgba(206, 206, 213, .5), rgba(150, 150, 162, .3) 55%, rgba(150, 150, 162, 0) 100%); opacity: 0; }
.smoke-puff { position: absolute; left: 0; top: 0; border-radius: 50%; opacity: 0; will-change: transform, opacity;
  background: radial-gradient(circle, rgba(224, 224, 230, .9) 0%, rgba(196, 196, 205, .6) 38%, rgba(160, 160, 172, 0) 70%); }
.smoke-cig { position: fixed; z-index: 51; width: 64px; height: 12px; pointer-events: none; transform-origin: 90% 50%; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .5)); }
.smoke-cig .ember { animation: emberGlow .6s ease-in-out infinite alternate; transform-origin: 6px 6px; }
@keyframes emberGlow { from { opacity: .75; } to { opacity: 1; filter: drop-shadow(0 0 3px #ff7a2f); } }
.smoke-wisp { position: fixed; z-index: 51; border-radius: 50%; pointer-events: none; opacity: 0; background: radial-gradient(circle, rgba(235, 235, 240, .85), rgba(200, 200, 210, 0) 70%); }
.smoke-row { margin: 0; }
.smoke-btn { background: linear-gradient(#7a7e88, #43464e); color: #fff; border: 1px solid rgba(255, 255, 255, .3); border-radius: 10px; padding: .5em 1.2em; font-weight: 700; cursor: pointer; }
.smoke-btn:hover { background: linear-gradient(#8a8e98, #50535c); }


/* Dealer behind the table (desktop only). The seats leave a gap for her at the top centre (DEALER_GAP in main.js);
   the picture is cut at the waist, and its bottom edge sits on the table's top edge, so she stands behind the table. */
.table-dealer { position: absolute; left: 50%; top: -128px; width: 136px; height: 136px; transform: translateX(-50%); pointer-events: none; z-index: 1; }
.table-dealer .dealer-img, .table-dealer .dealer-hands { display: block; width: 100%; height: 100%; object-fit: contain; }
/* Her hands again over the cards she holds (dealerHands in main.js), so the fingers are on top of the card. */
.table-dealer .dealer-hands { position: absolute; left: 0; top: 0; visibility: hidden; }
.table-stage.has-dealer { padding-top: 116px; }
.table-stage.has-dealer .pot-area { top: 45%; }
/* The dealer's table: the pot is anchored by its top edge, in table units like everything the owner places (u = oval height / 843). By its centre (top: 45%)
   the plaque drifted with the window, because the board and the pile under it are a fixed size in pixels. */
.table-stage.has-frame .pot-area { top: calc(var(--pot-top, 91) * 100cqh / 843); transform: translate(-50%, 0); transform-origin: 50% 0; }
.table-stage.has-dealer .chip-legend { left: 27%; }
.look-opt[data-key="dealer"] { min-width: 116px; box-sizing: border-box; }
.dealer-swatch { display: grid; place-items: center; width: 56px; height: 56px; font-size: 28px; }
.dealer-swatch img { width: 100%; height: 100%; object-fit: contain; }
/* A card she throws (dealerThrow): the viewer's own back, flies from her hand to the seat (over everything, .dealer-fly-out).
   A board card leaves from under her fingers (below the dealer, z-index 1) and goes up once it is away from her. */
.dealer-fly { position: absolute; z-index: 0; margin: -35px 0 0 -25px; pointer-events: none; box-shadow: 0 4px 10px rgba(0,0,0,.45); }
/* A card the game puts in her hand (dealerSet): a small stack, offset a little per card. Sized by the dealer's box (a container,
   cqh), so it keeps the same proportion to her hands on every screen: a 50×70 card at --k when she is 190 px tall (DEALER_CARD_BASE in main.js). */
.table-dealer { container-type: size; }
.dealer-hold { --cu: calc(100cqh / 190); position: absolute; width: calc(50 * var(--cu)); height: calc(70 * var(--cu)); border-radius: calc(6 * var(--cu)); margin: calc(-35 * var(--cu)) 0 0 calc(-25 * var(--cu)); transform: translate(calc(var(--i) * 2 * var(--cu)), calc(var(--i) * -2 * var(--cu))) rotate(var(--rot, 0deg)) scale(var(--k)); box-shadow: 0 2px 4px rgba(0,0,0,.4); }
/* The dealer's nook: a dark recess cut into the top rail and felt under her, like a station behind the table. */
.dealer-nook {
  position: absolute; left: 50%; top: calc(-1 * var(--rim, 18px) - 3px); width: 250px; height: calc(var(--rim, 18px) + 43px); transform: translateX(-50%); z-index: 1;
  border-radius: 0 0 125px 125px / 0 0 40px 40px; /* starts above the rail's outer edge: the wood is cut out here, she stands in the gap */
  background: radial-gradient(ellipse at 50% 0, #3a2818 0%, #1f140c 55%, #120b06 100%);
  box-shadow: inset 0 -8px 14px rgba(0,0,0,.65), inset 0 6px 10px rgba(0,0,0,.5), 0 3px 8px rgba(0,0,0,.55);
  border: 2px solid rgba(214,168,74,.55); border-top: 0;
  pointer-events: none;
}
/* What lies in the nook: the chip tray on her left, the card shoe on her right (cards are dealt from it). */
.dealer-nook img { position: absolute; top: calc(var(--rim, 18px) + 7px); height: auto; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
.dealer-nook .dealer-tray { left: 6px; width: 92px; }
.dealer-nook .dealer-shoe { right: 10px; width: 56px; }

/* The drawn table with the dealer's bay (build-dealer-art.py frame), cut in five pieces so the table can be as wide as the
   stage lets it: the two rounded ends and the bay keep their shape, the straight rail between them stretches. The oval's
   padding box is the felt: the felt is masked by the same five pieces of the frame's inner edge (so the bay is cut out of it
   too), and the frame is laid over it, sticking out by the rail. u = one pixel of the picture, scaled to the table's height
   (the numbers come from build-dealer-art.py frame). The mask layers overlap by 2px, or a hairline shows at the joins. */
.table-stage.has-frame { container-type: size; padding-top: calc(min(14vh, 190px) - 24px); } /* room for the dealer above the oval: her height less the rail */
.table-stage.has-frame .table-oval { container-type: size; aspect-ratio: 2.05 / 1; --rim: 26px; width: min(1900px, 96cqw, 221cqh); max-height: 92cqh; } /* ≈ 2.4 : 1 at most: a table that is only limited by the window height got long and flat */
.table-stage.has-frame .table-oval::before {
  --o: calc(100cqh / 843); --u: calc(100cqh / 918); --s: calc((100cqw - 65 * var(--o) - 1250 * var(--u)) / 2); /* u: the frame art scaled so the whole frame is as big as the first one (its rail is thicker, the felt is smaller) */
  inset: calc(32.5 * var(--o) - 21 * var(--u)); border: 0; border-radius: 0; box-shadow: none; /* the felt (and its mask) reaches 21u under the rail all round: it used to stop at the rail's inner edge and a dark line showed where the drawn rail sits a little further in */
  /* a fine grain over the felt (felt-grain.png, tools/make-felt-grain.py): the felt pictures are 1470 px wide and this table is wider than that, so alone they look like a soft upscaled photo */
  background-color: #1d5a33; background-image: url("/img/felt-grain.png?v=2"), var(--felt-img, url("/img/felt.jpg?v=4")); background-size: 128px 128px, cover; background-position: 0 0, center; background-repeat: repeat, no-repeat;
  background-origin: padding-box; background-clip: border-box;
  -webkit-mask-image: url("/img/table/dealer-mask-capl.png?v=10"), url("/img/table/dealer-mask-strip.png?v=10"), url("/img/table/dealer-mask-bay.png?v=10"), url("/img/table/dealer-mask-strip.png?v=10"), url("/img/table/dealer-mask-capr.png?v=10");
  mask-image: url("/img/table/dealer-mask-capl.png?v=10"), url("/img/table/dealer-mask-strip.png?v=10"), url("/img/table/dealer-mask-bay.png?v=10"), url("/img/table/dealer-mask-strip.png?v=10"), url("/img/table/dealer-mask-capr.png?v=10");
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: calc(452 * var(--u) + 2px) 100%, calc(var(--s) + 4px) 100%, calc(388 * var(--u)) 100%, calc(var(--s) + 4px) 100%, calc(452 * var(--u) + 2px) 100%;
  mask-size: calc(452 * var(--u) + 2px) 100%, calc(var(--s) + 4px) 100%, calc(388 * var(--u)) 100%, calc(var(--s) + 4px) 100%, calc(452 * var(--u) + 2px) 100%;
  -webkit-mask-position: 0 0, calc(452 * var(--u) - 2px) 0, calc(452 * var(--u) + var(--s)) 0, calc(452 * var(--u) + var(--s) + 388 * var(--u) - 2px) 0, 100% 0;
  mask-position: 0 0, calc(452 * var(--u) - 2px) 0, calc(452 * var(--u) + var(--s)) 0, calc(452 * var(--u) + var(--s) + 388 * var(--u) - 2px) 0, 100% 0;
}
.table-stage.has-frame .table-oval::after {
  /* the same gold line inside the drawn frame; the dealer's bay at the top is cut out of it */
  --u: calc(100cqh / 843);
  inset: calc(40 * var(--u)) calc(44 * var(--u)) calc(40 * var(--u));
  border-radius: 999px;
  -webkit-mask-image: linear-gradient(#000, #000), linear-gradient(#000, #000);
  mask-image: linear-gradient(#000, #000), linear-gradient(#000, #000);
  -webkit-mask-size: 100% 100%, calc(520 * var(--u)) calc(120 * var(--u));
  mask-size: 100% 100%, calc(520 * var(--u)) calc(120 * var(--u));
  -webkit-mask-position: 0 0, 50% 0; mask-position: 0 0, 50% 0;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.table-frame {
  --o: calc(100cqh / 843); --u: calc(100cqh / 918); /* outer size as the first frame's (o), the art scaled by u */
  position: absolute; left: calc(-50 * var(--o)); top: calc(-46 * var(--o)); width: calc(100cqw + 99 * var(--o)); height: calc(100cqh + 97 * var(--o));
  display: grid; grid-template-columns: calc(520 * var(--u)) 1fr calc(388 * var(--u)) 1fr calc(520 * var(--u));
  pointer-events: none; user-select: none; filter: drop-shadow(0 16px 20px rgba(0,0,0,.6));
}
.table-frame i { background: center / 100% 100% no-repeat; }
.table-frame i:nth-child(1) { background-image: var(--frame-capl, url("/img/table/dealer-frame-classic-capl.webp?v=10")); }
.table-frame i:nth-child(2), .table-frame i:nth-child(4) { background-image: var(--frame-strip, url("/img/table/dealer-frame-classic-strip.webp?v=10")); }
.table-frame i:nth-child(3) { background-image: var(--frame-bay, url("/img/table/dealer-frame-classic-bay.webp?v=10")); }
.table-frame i:nth-child(5) { background-image: var(--frame-capr, url("/img/table/dealer-frame-classic-capr.webp?v=10")); }
.table-stage.has-frame .dealer-nook { background: none; border: 0; box-shadow: none; }
/* The dealer and what is in the bay scale with the table's height (the bay does): u as above. */
.table-stage.has-frame .table-dealer { --u: calc(100cqh / 843); --d: min(400 * var(--u), 14vh, 190px); width: var(--d); height: var(--d); top: calc(5px - var(--d)); }
.table-stage.has-frame .dealer-nook { --u: calc(100cqh / 843); width: calc(700 * var(--u)); }
.table-stage.has-frame .dealer-nook .dealer-tray { left: calc(30 * var(--u)); width: calc(220 * var(--u)); }
.table-stage.has-frame .dealer-nook .dealer-shoe { right: calc(40 * var(--u)); width: calc(130 * var(--u)); }

/* Hand-placed dealer pieces (?dealeredit=1, saved in localStorage poker.dealerLayout): offsets in u (the table's height / 843) and a scale, set as vars on <html>. */
.table-dealer { translate: calc(var(--ed-dealer-x, 0) * var(--u, 1px)) calc(var(--ed-dealer-y, 0) * var(--u, 1px)); scale: var(--ed-dealer-k, 1); }
.dealer-nook .dealer-tray { translate: calc(var(--ed-tray-x, 0) * var(--u, 1px)) calc(var(--ed-tray-y, 0) * var(--u, 1px)); scale: var(--ed-tray-k, 1); }
.dealer-nook .dealer-shoe { translate: calc(var(--ed-shoe-x, 0) * var(--u, 1px)) calc(var(--ed-shoe-y, 0) * var(--u, 1px)); scale: var(--ed-shoe-k, 1); }
html.dealer-edit .table-dealer, html.dealer-edit .dealer-nook img { pointer-events: auto !important; cursor: move; outline: 2px dashed #ffd23c; touch-action: none; z-index: 5; }
html.dealer-edit .dealer-nook img { z-index: 6; }
.dealer-editor { position: fixed; left: 12px; bottom: 12px; z-index: 99999; width: 300px; padding: 12px 14px; border-radius: 12px; background: rgba(15,15,20,.94); border: 1px solid #ffd23c; color: #eee; font: 13px/1.4 system-ui, sans-serif; }
.dealer-editor b { color: #ffd23c; } .dealer-editor pre { margin: 6px 0; padding: 6px; background: #000; border-radius: 6px; font-size: 12px; white-space: pre-wrap; user-select: all; }
.dealer-editor button { margin: 2px 4px 0 0; padding: 5px 10px; border-radius: 8px; border: 1px solid #666; background: #2a2a33; color: #eee; cursor: pointer; }
html.table-edit .table-oval > .seat, html.table-edit .seat > .seat-chip, html.table-edit .seat > .seat-bankroll, html.table-edit .pot-area, html.table-edit .community, html.table-edit .community-run2, html.table-edit .chip-legend, html.table-edit .pot-pile, html.table-edit .seat-cam, html.table-edit .seat .hole, html.table-edit .seat-reaction { cursor: move; outline: 1px dashed rgba(255,210,60,.7); pointer-events: auto !important; touch-action: none; }

/* Alive dealer: she breathes, leans towards whoever she deals to, and a pose change dissolves instead of cutting. */
/* .dealer-body holds her picture, the cards in her hands and the hands over them: it breathes and leans as one, so a held card moves with her. */
.table-dealer .dealer-body { position: absolute; inset: 0; transform-origin: 50% 100%; animation: dealerBreath 4.8s ease-in-out infinite; rotate: var(--lean, 0deg); translate: var(--leanx, 0px) 0; transition: rotate .3s ease-out, translate .3s ease-out; }
.table-dealer .dealer-img, .table-dealer .dealer-hands { scale: var(--flip, 1) 1; transform-origin: 50% 100%; }
.table-dealer { transform-style: flat; }
.table-dealer .dealer-prev { position: absolute; left: 0; top: 0; animation: dealerFadeOut .16s ease-out forwards; }
@keyframes dealerBreath { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-1.5px) scale(1.006, 1.014); } }
@keyframes dealerFadeOut { from { opacity: 1; } to { opacity: 0; } }
.dealer-hold.dealer-one { animation: dealerCardIn .12s ease-out; }
@keyframes dealerCardIn { from { opacity: 0; } to { opacity: 1; } }
.dealer-fly { will-change: transform; }
.dealer-fly.dealer-fly-out { z-index: 8; }

/* Table editor: the grid over the table (lines every step in table units), its centre lines and the alignment guides. */
.edit-grid { position: fixed; z-index: 99990; pointer-events: none; display: none; background-image: linear-gradient(rgba(255,255,255,.22) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.22) 1px, transparent 1px); }
.edit-grid::before, .edit-grid::after { content: ""; position: absolute; background: rgba(255,70,70,.8); }
.edit-grid::before { left: 50%; top: 0; width: 1px; height: 100%; }
.edit-grid::after { top: 50%; left: 0; height: 1px; width: 100%; }
.edit-guide { position: fixed; z-index: 99995; pointer-events: none; background: #ffd23c; box-shadow: 0 0 4px #ffd23c; }

/* The dealer's framed table: the journal and chat are a small window in the bottom-right corner over the page, so opening
   them never narrows the table (it is laid out the same with them open or folded). */
@media (min-width: 861px) {
  .table-page.float-side, .table-page.float-side.side-hidden { grid-template-columns: minmax(0, 1fr); }
  .table-page.float-side .sidebar-col {
    position: fixed; right: 10px; bottom: 10px; width: 290px; height: min(29vh, 250px); z-index: 60;
    gap: .5em; padding: .4em; border-radius: 12px; background: color-mix(in srgb, var(--panel) 92%, transparent);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .5);
  }
  .table-page.float-side .log-panel { flex: 1 1 45%; min-height: 0; font-size: .82em; overflow: auto; }
  .table-page.float-side .chat-panel { flex: 1 1 55%; min-height: 0; font-size: .82em; display: flex; flex-direction: column; }
  .table-page.float-side .chat-log { flex: 1 1 auto; min-height: 0; overflow: auto; max-height: none; }
  .table-page.float-side .chat-panel > * { flex-shrink: 0; }
  .table-page.float-side .chat-panel > .chat-log { flex-shrink: 1; }
  .table-page.float-side.side-hidden .sidebar-col { width: 42px; height: 120px; padding: 0; }
}

.playing-card.deal-hide { opacity: 0 !important; animation: none !important; }
html.dealer-dealing .action-bar button { pointer-events: none; opacity: .45; }

.seat:has(.seat-chip.win-fly, .seat-chip.collecting, .seat-chip.to-rack) { z-index: 14; } /* the pot's chips fly over the board, not under it */

/* A trainer / lab / lesson screen is only as tall as its content: no empty background below it. The map stays full height. */
.ac-window:not(.map) { align-self: flex-start; max-height: 100%; border-bottom: 1px solid rgba(224,176,76,.25); border-radius: 0 0 16px 16px; }
.ac-window:not(.map) .ac-scroll { flex: 0 1 auto; }
@media (max-width: 600px) { .ac-window:not(.map) { border-bottom: 0; } }

/* The winner's plaque lies over every seat, the viewer's own included (a seat with a swelling rack was lifted to 12, over the plaque's 10). */
.table-oval:has(.result-overlay) .pot-area { z-index: 31; } /* above every seat state that lifts a plaque (swelling rack 12, chips in flight 14 and 30), so a busted player's own plaque never covers the winner's; below the fatality layer (32), which paints over the board */

/* «Показать карту»: the confirm window */
.show-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(10, 12, 18, .6); display: grid; place-items: center; padding: 16px; }
.show-modal { background: var(--panel); border: 1px solid #3a3f4a; border-radius: 14px; padding: 1.2em 1.4em; width: min(360px, 100%); text-align: center; box-shadow: 0 8px 28px rgba(0,0,0,.5); }
.show-modal h3 { margin: 0 0 .7em; }
.show-picks { display: flex; gap: 14px; justify-content: center; margin-bottom: .7em; }
.show-pick { border-radius: 10px; padding: 6px; }
.show-pick.done { opacity: .35; }
/* The key on a button looks like a keycap: lit face, a thick bottom edge */
.show-modal-btns kbd.hk { opacity: 1; margin-left: .6em; padding: .05em .5em; min-width: 1.5em; font-size: .85em; font-weight: 700; border-width: 1px 1px 3px; border-radius: 5px; background: rgba(0, 0, 0, .3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.show-modal-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: .8em; }
.show-modal-btns button { padding: .7em 1.2em; font-size: 1em; }
.show-modal-btns button.gold { color: var(--text); font-weight: 600; }

/* The %) of the scale each side is drawn at, in a studio card's caption (see cellHtml). */
.st-size { color: #9fb0c7; font-size: .9em; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 🎛 studio hub (admin panel tab) and the bar over an open editor */
.studio-hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .6em; margin: .4em 0 .8em; }
.studio-card { display: flex; flex-direction: column; gap: .2em; padding: .7em .8em; border-radius: 12px; background: var(--panel2); border: 1px solid transparent; color: inherit; text-decoration: none; }
#studioBar { position: fixed; bottom: 10px; right: 10px; z-index: 100001; font: 13px system-ui, sans-serif; }
#studioBar .sb-list { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 92vw; padding: 6px; border-radius: 12px; background: rgba(15,15,20,.94); border: 1px solid #ffd23c; }
#studioBar .sb-list button, #studioBar .sb-list a { padding: 6px 11px; border-radius: 8px; border: 1px solid #555; background: #2a2a33; color: #bbb; text-decoration: none; white-space: nowrap; font: 600 13px system-ui; cursor: pointer; }
#studioBar .sb-list button.on { background: #ffd23c; border-color: #ffd23c; color: #111; }
.studio-card { position: relative; cursor: pointer; }
.studio-go { display: inline-block; padding: .55em 1.1em; border-radius: 10px; background: #ffd23c; color: #111; font-weight: 700; text-decoration: none; margin-right: .5em; }
.studio-go.alt { background: #2a2a33; color: #eee; border: 1px solid #555; }
/* the editor's tools: what is switched off disappears (studioHub.js keeps html.st-<tool>) */
html:not(.st-table) .table-editor:not(.ed-panel-keep) [data-sec="table"], html:not(.st-dealer) .table-editor [data-sec="dealer"] { display: none; }
html:not(.st-table):not(.st-dealer) .dealer-editor.table-editor:not(.ed-layers), html:not(.st-table) .table-editor.ed-layers, html:not(.st-table) #edDock, html:not(.st-table) .edit-grid { display: none !important; }
html:not(.st-hands) #handEdit { display: none !important; }

/* 🎛 the table editor's shell (editShell.js): the table in a frame of a player's window size, the panels around it, not over it */
html.ed-shell-page, html.ed-shell-page body { height: 100%; margin: 0; overflow: hidden; background: #0b0d12; color: #eee; font: 13px/1.4 system-ui, sans-serif; }
#edShell { display: grid; grid-template: "top top top" auto "left stage right" minmax(0, 1fr) / 270px minmax(0, 1fr) 350px; height: 100vh; }
#edTop { grid-area: top; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 6px 10px; background: #14161d; border-bottom: 1px solid #2c2f3a; }
#edLeft, #edRight { min-height: 0; overflow: auto; background: #111319; }
#edLeft { grid-area: left; border-right: 1px solid #2c2f3a; }
#edRight { grid-area: right; border-left: 1px solid #2c2f3a; }
#edStage { grid-area: stage; position: relative; min-width: 0; min-height: 0; overflow: hidden; background: repeating-conic-gradient(#15171e 0 25%, #191b23 0 50%) 0 0 / 24px 24px; }
#edFrame { position: absolute; border: 0; transform-origin: 0 0; background: #000; box-shadow: 0 0 0 1px rgba(255,210,60,.55), 0 10px 40px rgba(0,0,0,.6); }
#edStage .es-info { position: absolute; right: 8px; bottom: 5px; font-size: 11px; color: #8b93a7; pointer-events: none; }
#edScene { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; flex: 1 1 auto; }
#edTop .es-right { display: flex; align-items: center; gap: 6px; margin-left: auto; }
#edTop .es-presets { display: flex; gap: 3px; }
#edTop button, #edTop select { padding: 5px 9px; border-radius: 8px; border: 1px solid #444; background: #23252e; color: #ddd; font: 600 12px system-ui, sans-serif; cursor: pointer; }
#edTop button.on { background: #ffd23c; border-color: #ffd23c; color: #111; }
.es-group { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.es-lbl { margin-right: 3px; color: #8b93a7; font-size: 11px; }
.es-group button[data-n] { min-width: 28px; padding: 5px 0 !important; }
.es-preview { color: #ff9b3d; }
#edTools #studioBar { position: static; }
#edTools #studioBar .sb-list { flex-wrap: nowrap; max-width: none; padding: 0; border: 0; background: none; }
#edUnbare { display: none; }
html.ed-bare #edShell { grid-template: "stage" minmax(0, 1fr) / minmax(0, 1fr); }
html.ed-bare #edTop, html.ed-bare #edLeft, html.ed-bare #edRight { display: none; }
html.ed-bare #edUnbare { display: block; position: fixed; left: 8px; top: 8px; z-index: 5; padding: 5px 10px; border-radius: 8px; border: 1px solid #ffd23c; background: rgba(15,15,20,.85); color: #ffd23c; font: 600 12px system-ui, sans-serif; cursor: pointer; opacity: .55; }
html.ed-bare #edUnbare:hover { opacity: 1; }
/* in the shell the panels are columns, not windows */
#edShell .dealer-editor { position: static; width: auto; max-height: none; padding: 10px 12px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#edShell .ed-list { max-height: none; overflow: visible; }
#edShell #edHotkeys { z-index: 10; }
/* without the shell (a phone, ?noshell=1): Tab hides the editor's windows */
html.ed-bare:not(.ed-shell-page) .table-editor, html.ed-bare:not(.ed-shell-page) #edDock { display: none !important; }
/* the right panel's tabs: the picked object · the table · the dealer · the publish */
.ed-mode { margin-bottom: 6px; color: #aab; font-size: 12px; }
.ed-mode b { color: #ffd23c; }
.ed-tabs { display: flex; gap: 2px; margin: 0 0 8px; border-bottom: 1px solid #3a3a46; }
.ed-tabs button { flex: 1; margin: 0 !important; padding: 6px 4px !important; border-radius: 8px 8px 0 0 !important; border: 1px solid transparent !important; border-bottom: 0 !important; background: transparent !important; color: #aaa !important; white-space: nowrap; }
.ed-tabs button.on { background: #2a2a33 !important; border-color: #3a3a46 !important; color: #ffd23c !important; }
.ed-badge { padding: 0 5px; border-radius: 9px; background: #ff9b3d; color: #111; font: 700 11px system-ui, sans-serif; }
.ed-badge.sel { background: #3dd5f3; }
.ed-tab-body { display: flex; flex-direction: column; gap: 8px; }
.ed-sec { padding-bottom: 8px; border-bottom: 1px solid #2c2c36; }
.ed-sec:last-child { border-bottom: 0; }
.ed-sec a { color: #ffd23c; }
.ed-slider { display: grid; grid-template-columns: 1fr 120px 3.2em auto; align-items: center; gap: 4px; margin-top: 4px; font-size: 12px; }
.ed-slider input { width: 100%; }
.ed-slider button { margin: 0 !important; padding: 2px 6px !important; }
.ed-empty { padding: 14px 8px; text-align: center; color: #aab; }
.ed-keys { color: #889; }
.ed-toolrow button { min-width: 30px; }
.ed-size button[data-alln] { width: auto; padding: 0 6px; font-size: .8em; }
/* the layers' tree */
.ed-lhead small { color: #889; }
.ed-grp { display: flex; align-items: center; gap: 4px; margin-top: 4px; padding: 4px 4px 2px; border-top: 1px solid #2a2c35; color: #ffd23c; font-weight: 600; cursor: pointer; }
.ed-grp:hover { background: #1d1f27; }
.ed-grp.part { color: #8fe6f7; }
.ed-grp.on { color: #3dd5f3; }
.ed-grp-glob { cursor: default; }
.ed-grp .ed-fold { width: 1.4em; margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; color: #888 !important; }
.ed-grp .ed-side { color: #778; font-weight: 400; }
.ed-row.sub { margin-left: 18px; }
.ed-row.chg .ed-nm::after, .ed-grp.chg > .ed-nm::after { content: " ●"; color: #ff9b3d; font-size: .8em; }
/* what changed since the publish */
.ed-diff { display: flex; flex-direction: column; gap: 2px; margin: 6px 0; }
.ed-drow { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "nm btn" "was btn"; align-items: center; column-gap: 6px; padding: 4px 6px; border-radius: 6px; background: #22222b; cursor: pointer; }
.ed-drow:hover { background: #2d2d38; }
.ed-drow.on { outline: 1px solid #3dd5f3; }
.ed-drow .ed-nm { grid-area: nm; }
.ed-drow .ed-was { grid-area: was; color: #99a; }
.ed-drow .ed-was b { color: #ff9b3d; }
.ed-drow button { grid-area: btn; margin: 0 !important; }
[data-before].on { background: #ff9b3d !important; border-color: #ff9b3d !important; color: #111 !important; }
html.ed-previewing .ed-props .ed-tab-body:not(.ed-pub-body), html.ed-previewing .ed-layers .ed-list { opacity: .45; pointer-events: none; }
.studio-card:hover { border-color: #ffd23c; }
.studio-card .studio-ico { font-size: 1.6em; line-height: 1; }

/* studio: the cells stand on the table's felt (as in the finish) unless «Фон: пусто» */
.st-cell canvas[data-bg="table"] {
  background:
    linear-gradient(#0000 80%, rgba(0, 0, 0, .5)),
    linear-gradient(#2d1a0e, #5a381f 4.5%, #0000 5.4%),
    radial-gradient(ellipse at 50% 42%, #0000 50%, rgba(0, 0, 0, .55)),
    url("/img/felt-grain.png") 0 0 / 128px,
    var(--felt-img, url("/img/felt.jpg?v=4")) center / cover;
  box-shadow: inset 16px 0 18px -10px rgba(0, 0, 0, .65), inset -16px 0 18px -10px rgba(0, 0, 0, .65);
}
.st-more { margin: .4em 0; padding: .3em .5em; border: 1px dashed #3a404c; border-radius: 8px; }
.st-more > summary { cursor: pointer; color: #9aa3b2; font-size: .9em; }

/* table editor: layers panel, inspector, alignment bar */
.ed-layers { display: flex; flex-direction: column; gap: 6px; }
.ed-layers button { margin: 0; padding: 4px 8px; }
.ed-layers button:disabled { opacity: .35; cursor: default; }
.ed-layers .primary { background: #ffd23c; color: #111; border-color: #ffd23c; font-weight: 600; }
.ed-btns { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ed-sep { width: 1px; height: 18px; background: #555; margin: 0 2px; }
.ed-insp { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 8px; background: rgba(61,213,243,.08); border: 1px solid rgba(61,213,243,.4); }
.ed-size { display: flex; align-items: center; gap: 8px; }
.ed-size span { flex: 1; font-size: .85em; opacity: .85; }
.ed-size button { width: 32px; height: 32px; font-size: 1.2em; line-height: 1; }
.ed-size b { min-width: 3.2em; text-align: center; }
.ed-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ed-fields label { display: flex; flex-direction: column; font-size: 11px; color: #aaa; }
.ed-fields input { width: 100%; box-sizing: border-box; padding: 4px; border-radius: 6px; border: 1px solid #555; background: #1c1c24; color: #eee; }
.ed-filters { display: flex; gap: 4px; flex-wrap: wrap; }
.ed-filters button.on { background: #ffd23c; color: #111; border-color: #ffd23c; }
.ed-list { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow: auto; }
.ed-row { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 6px; background: #22222b; cursor: pointer; }
.ed-row:hover { background: #2d2d38; }
.ed-row.on { background: rgba(61,213,243,.25); outline: 1px solid #3dd5f3; }
.ed-row.locked .ed-nm { opacity: .6; }
.ed-nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-z { color: #ffd23c; font-variant-numeric: tabular-nums; min-width: 2em; text-align: right; }
.ed-row button { background: none; border: 0; padding: 0 2px; }
.ed-pub { padding-top: 6px; border-top: 1px solid #444; }

/* table editor on a phone: the panels become bottom sheets over a dock of big buttons; two fingers scale */
#edDock { display: none; }
html.ed-mobile #edDock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 100001; display: flex; flex-direction: column; gap: 6px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: rgba(15,15,20,.96); border-top: 1px solid #ffd23c; font: 14px system-ui, sans-serif; color: #eee; }
#edDock .dk-cap { font-size: 12px; color: #ffd23c; text-align: center; min-height: 1.3em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#edDock .dk-row { display: flex; gap: 6px; }
#edDock .dk-row.off { opacity: .35; pointer-events: none; }
#edDock button { flex: 1; min-width: 0; min-height: 44px; padding: 0 4px; border-radius: 10px; border: 1px solid #666; background: #2a2a33; color: #eee; font-size: 16px; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
#edDock button.on { background: #ffd23c; color: #111; border-color: #ffd23c; }
#edDock button:disabled { opacity: .35; }
html.ed-mobile #edLayers, html.ed-mobile .table-editor:not(.ed-layers) { display: none !important; }
html.ed-mobile.ed-layers-open #edLayers, html.ed-mobile.ed-settings-open .table-editor:not(.ed-layers) {
  display: flex !important; flex-direction: column; position: fixed !important; left: 0 !important; right: 0 !important; top: auto !important; bottom: 132px !important; width: auto !important;
  max-height: 46vh !important; border-radius: 14px 14px 0 0; z-index: 100000; overflow: auto; -webkit-overflow-scrolling: touch;
}
html.ed-mobile .table-editor button { min-height: 38px; font-size: 14px; }
html.ed-mobile .table-editor input, html.ed-mobile .table-editor select { font-size: 16px; min-height: 34px; }
html.ed-mobile .ed-row { padding: 8px; }
html.ed-mobile .ed-list { max-height: 28vh; }
html.ed-mobile #studioBar { bottom: auto; top: 6px; right: 6px; }
html.ed-mobile .ed-layers .ed-head { cursor: default; }

/* a short (landscape) phone: the dock is a column on the right and the sheets open on the left, so the table stays in the middle */
@media (max-height: 520px) {
  html.ed-mobile #edDock { left: auto; top: 0; bottom: 0; width: 148px; padding: 6px; padding-right: calc(6px + env(safe-area-inset-right)); border-top: 0; border-left: 1px solid #ffd23c; overflow-y: auto; gap: 4px; }
  html.ed-mobile #edDock .dk-cap { font-size: 11px; white-space: normal; min-height: 2.6em; }
  html.ed-mobile #edDock .dk-row { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
  html.ed-mobile #edDock button { min-height: 38px; font-size: 15px; }
  html.ed-mobile.ed-layers-open #edLayers, html.ed-mobile.ed-settings-open .table-editor:not(.ed-layers) {
    right: auto !important; top: 0 !important; bottom: 0 !important; width: min(46vw, 380px) !important; max-height: none !important; border-radius: 0 14px 14px 0;
  }
  html.ed-mobile #studioBar { right: 160px; top: 4px; }
}

/* Pre-actions (before your turn): bold, tinted per kind, an armed one is solid and glows with a ✓ */
.preact-bar { gap: .5em; flex-wrap: wrap; }
.preact-btn {
  --pa: #5b8def; flex: 1 1 5em; max-width: 9em; min-height: 2.1em; padding: .3em .7em; font-size: .86em; font-weight: 800; letter-spacing: .01em;
  /* The look of the bet menu's buttons (Фолд, Рейз, Ва-банк): flat solid fills, no border, the same corners. Chosen = brighter fill and a white inner ring (it takes no room). */
  color: #fff; background: color-mix(in srgb, var(--pa) 58%, #1d2129); border: none; border-radius: 8px;
  box-shadow: none; touch-action: manipulation; font-weight: 600;
}
.preact-btn:hover { filter: brightness(1.14); background: color-mix(in srgb, var(--pa) 58%, #1d2129); }
.preact-btn.pa-check { --pa: #39b36f; }
.preact-btn.pa-fold { --pa: #e0a93c; }
.preact-btn.pa-callcur { --pa: #2fb5c9; }
.preact-btn.pa-bb1 { --pa: #8fd14f; }
.preact-btn.pa-bb2 { --pa: #ee6fc4; }
.preact-btn.pa-bb3 { --pa: #a98bff; }
.pa-break { flex: 0 0 100%; height: 0; }
.pa-row2 { display: contents; }
/* A desktop window: the second row hangs under the first, over the empty top of the action slot, so it adds no height and the table keeps its size */
@media (min-width: 861px) and (min-height: 521px) {
  .preact-bar { position: relative; }
  .pa-break { display: none; }
  .pa-row2 { display: flex; justify-content: center; gap: .5em; position: absolute; top: calc(100% + .35em); left: 0; right: 0; }
}
.preact-btn.pa-off { visibility: hidden; pointer-events: none; } /* the row keeps its place when no bet is on: the table must not change size */
.preact-btn.pa-call { --pa: #5b8def; }
.preact-btn.active { background: var(--pa); color: #10131a; font-weight: 700; box-shadow: inset 0 0 0 2px #fff; }
.preact-btn { position: relative; white-space: nowrap; }
@media (max-width: 860px), (max-height: 520px) {
  .preact-bar { flex-direction: row; width: 100%; gap: .35em; }
  .preact-btn { padding: .3em .5em; font-size: .8em; min-height: 2.3em; }
}

/* the raise menu: «Мин», the bet's multiples (facing a bet) and the pot fractions */
.pct-group.min { flex: 1 1 0; }
.pct-group.mult { flex: 3 1 0; border-color: rgba(224, 176, 76, .55); background: rgba(224, 176, 76, .08); }
.pct-group.mult .pct-btn { color: var(--gold); }
.pct-group.pot { flex: 5 1 0; }
.action-bar .raise-pct-row { flex-wrap: wrap; }

/* «🚬 Закурить» as a badge on your own plaque: nothing (the live coach, the buttons) can cover it */
.smoke-badges { position: absolute; left: 50%; transform: translateX(-50%); top: -20px; display: flex; flex-direction: row; gap: 4px; z-index: 40; align-items: center; justify-content: center; white-space: nowrap; }
.smoke-badge .smoke-ico { display: inline-flex; width: 34px; height: 8px; margin-right: 2px; }
.smoke-badge .smoke-ico svg { width: 100%; height: 100%; }
/* the badge is the seat's, and the seat is one layer under the board and the winner's plaque (31): on a phone the badge lies on the
   board, and a tap went to a board card instead. While it is up the viewer's seat goes over them. */
.table-oval > .seat:has(> .smoke-badges) { z-index: 33; }
.smoke-badge { display: inline-flex; align-items: center; gap: .35em; margin: 0; padding: .3em .65em; border-radius: 999px; border: 2px solid #fff; background: linear-gradient(#8a8e98, #43464e); color: #fff; font-size: .8em; font-weight: 800; cursor: pointer; box-shadow: 0 3px 10px rgba(0, 0, 0, .55); animation: smokeBadgePulse 1.3s ease-in-out infinite; }
.smoke-badge span { max-width: 6em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.smoke-badge:hover { background: linear-gradient(#9a9ea8, #50535c); }
@keyframes smokeBadgePulse { 0%, 100% { box-shadow: 0 3px 10px rgba(0, 0, 0, .55), 0 0 0 0 rgba(255, 255, 255, .55); } 50% { box-shadow: 0 3px 10px rgba(0, 0, 0, .55), 0 0 0 9px rgba(255, 255, 255, 0); } }

/* /studio/fighters: the studio is the whole window; the table underneath is only drawn when it is on show */
html.st-fighters:not(.st-playing):not(.st-peek):not(.st-duel) #app { visibility: hidden; }
html.st-fighters #toasts { z-index: 100000; }
html.st-fighters:not(.st-duel) #studioBar { display: none; }
html.st-duel .studio-overlay { display: none; }
html.st-peek .studio-overlay { left: auto; width: 340px; border-left: 1px solid #3a3f4a; }
#handEdit .he-grip { cursor: move; }
/* a window folded into a strip: only its title row stays */
#handEdit.win-min { width: 280px !important; height: auto !important; min-height: 0; resize: none; overflow: hidden; }
#handEdit.win-min #he-box, #handEdit.win-min > div:last-child > :not(.he-top) { display: none !important; }
.win-resize { position: absolute; right: 0; bottom: 0; width: 20px; height: 20px; cursor: nwse-resize; z-index: 6; touch-action: none; background: linear-gradient(135deg, transparent 0 50%, #ffd23c 50% 58%, transparent 58% 70%, #ffd23c 70% 78%, transparent 78%); border-bottom-right-radius: 10px; }
#handEdit.win-min .win-resize { display: none; }
/* while a finish is played from the studio the window steps aside (and comes back by itself) */
html.st-playing .studio-overlay { opacity: 0; pointer-events: none; transition: opacity .15s; }
/* the duel sandbox as a window of the editor: beside the table panel, movable by its title, sized by the corner */
html.st-duel #duelSandbox { right: 12px; top: 64px; z-index: 99996; }
html.st-duel #duelSandbox .ds-head { cursor: move; }
#duelSandbox.ds-min .win-resize { display: none; }
.raise-amount-box { position: relative; display: inline-flex; min-width: 0; }
.raise-amount-box:has(.amount-unit) .amount { padding-right: 1.45em; appearance: textfield; }
.raise-amount-box:has(.amount-unit) .amount::-webkit-inner-spin-button { display: none; }
.action-bar .amount-unit { position: absolute; right: .35em; top: 50%; transform: translateY(-50%); font-size: .65em; font-weight: 700; color: var(--gold); pointer-events: none; }
@media (min-width: 1101px) {
  .action-row #raisePreview { flex-basis: 108px; width: 108px; }
}
@media (max-width: 480px) {
  .raise-amount-box .amount { width: 100%; min-width: 0; }
}

/* A phone on its side: the stickers stand in a vertical strip on the left of the felt that scrolls on its own, and the pre-act row sat
   after them, below the visible part of the strip (and the screen). Pin it to the bottom of what the strip shows. */
@media (orientation: landscape) and (max-height: 520px) and (max-width: 1100px) {
  .table-tools .preact-bar { position: sticky; bottom: 0; z-index: 3; padding: 3px; border-radius: 10px; background: rgba(14, 16, 22, .88); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
  .table-tools .preact-bar { width: 330px; max-width: 46vw; gap: .25em; }
  .table-tools .preact-btn { flex: 1 1 auto; min-height: 0; padding: .22em .4em; font-size: .68em; }
  .table-tools .preact-btn kbd { display: none; }
}

/* The deck in the middle of a table without the dealer, and the cards flying out of it (deckDeal in main.js) */
.deal-deck { position: absolute; z-index: 8; pointer-events: none; animation: deckShuffle .65s ease-in-out; }
.deal-deck i.playing-card { position: absolute; inset: 0; width: 100%; height: 100%; }
.deal-deck i.playing-card:nth-child(1) { transform: translate(-2px, 2px); } .deal-deck i.playing-card:nth-child(2) { transform: translate(0, 1px); }
.deal-deck i.playing-card:nth-child(3) { transform: translate(1px, -1px); } .deal-deck i.playing-card:nth-child(4) { transform: translate(2px, -2px); }
@keyframes deckShuffle { 0% { transform: scale(.2) rotate(-8deg); opacity: 0; } 25% { transform: scale(1) rotate(5deg); opacity: 1; } 50% { transform: translateX(-4px) rotate(-4deg); } 75% { transform: translateX(4px) rotate(3deg); } 100% { transform: none; } }
.deck-fly { position: absolute; z-index: 9; margin: 0; pointer-events: none; will-change: transform; box-shadow: 0 3px 6px rgba(0, 0, 0, .4); }

/* A plaque laid out low (the table editor) hangs past the stage: it is not cut off at the stage's bottom edge (the sides stay clipped),
 * and the stage lies over the emoji / sticker row under it (that row is z-index 8), not under it. */
.table-stage { z-index: 9; overflow-x: clip; overflow-y: visible; }

/* The coach's card sits at the top of the (empty) action slot and hangs down, not up over the viewer's own plaque; a phone keeps it above (little room below). */
@media (min-width: 701px) and (min-height: 501px) {
  .action-slot > .coach-card { bottom: auto; top: -1.4em; } /* a little above the slot's top: it does not sit on the screen's bottom edge */
}

/* An open emoji / sticker panel hangs up over the table: the row lies over the stage while it is open (otherwise the stage, with a low plaque, lies over the row). */
.table-tools:has(.pack-panel) { z-index: 10; }

/* The pot's piles under the board cast a longer, darker shadow onto the felt (light from the dealer's side, upper left),
   so the pot reads as standing on the table and the eye finds it. */
.table-oval .pot-pile .pile2.ang::before { left: -12%; right: -75%; bottom: calc(var(--d) * -.14); height: calc(var(--d) * .58);
  background: radial-gradient(closest-side, rgba(0,0,0,.72), rgba(0,0,0,.42) 50%, rgba(0,0,0,0) 100%); }

/* ---- The table's header, one panel (Oct 2026): a tinted plaque for what kind of table it is (practice + its bots,
   hints, a tournament + PKO), one segmented strip for the game's clock (blinds │ ante │ level │ time to the next one),
   and the header buttons drawn as the same quiet glass, at the same height. The old look was five rainbow pills next
   to big solid buttons of another height. */
.top {
  --hdr-h: 2.15rem;
  --hdr-glass: rgba(255, 255, 255, .045);
  --hdr-line: rgba(255, 255, 255, .1);
}
.table-meta { gap: .45em; font-size: .86em; }
.table-meta .tm-chip { box-shadow: none; border-radius: 10px; }
.tm-mode, .tm-strip {
  display: inline-flex; align-items: center; height: var(--hdr-h); flex-shrink: 0;
  border-radius: 10px; border: 1px solid var(--hdr-line); background: var(--hdr-glass);
}
.tm-mode {
  --tone: #3fd393;
  gap: .4em; padding: 0 .4em 0 .55em;
  color: color-mix(in srgb, var(--tone) 55%, #fff);
  background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 20%, transparent), color-mix(in srgb, var(--tone) 9%, transparent));
  border-color: color-mix(in srgb, var(--tone) 42%, transparent);
}
.tm-mode.tm-tourney { --tone: #e0b04c; }
.tm-mode .ic { width: 1.25em; height: 1.25em; }
.tm-mode-name { font-weight: 700; color: #f3f6f4; }
.tm-sub {
  display: inline-flex; align-items: center; gap: .25em;
  padding: .12em .5em; border-radius: 7px;
  font-size: .82em; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: #d6dbe3; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .1);
}
.tm-sub.tm-hard { color: #ffb27a; border-color: rgba(255, 140, 70, .45); background: rgba(120, 40, 0, .35); }
.tm-sub.tm-easy { color: #9cf0b8; border-color: rgba(90, 220, 140, .4); background: rgba(0, 70, 30, .35); }
.tm-sub.tm-pko { color: #ffb3b8; border-color: rgba(255, 110, 120, .45); background: rgba(110, 10, 25, .4); }
.tm-sub .ic { width: 1.05em; height: 1.05em; }
.tm-strip { padding: 0; overflow: hidden; }
.tm-strip .tm-seg {
  display: inline-flex; align-items: baseline; gap: .32em; height: 100%; align-items: center;
  padding: 0 .75em; margin: 0; border: 0; border-radius: 0; background: transparent;
  color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums;
}
.tm-strip .tm-seg + .tm-seg { border-left: 1px solid var(--hdr-line); }
.tm-strip .tm-seg small { font-size: .78em; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.tm-strip .tm-blinds { color: #f3cd6a; }
.tm-strip .tm-ante { color: #ffd789; }
.tm-strip button.tm-seg:hover { background: rgba(255, 255, 255, .07); filter: none; }
.tm-strip .tm-clock { color: #c5cad3; font-weight: 600; min-width: 4.6em; justify-content: center; }
.tm-strip .tm-clock:empty { display: none; }
.table-meta > .tm-rebuy, .table-meta > .tm-restart { height: var(--hdr-h); padding: 0 .7em; border-radius: 10px; }
.table-meta > .tm-rebuy { background: var(--hdr-glass); border: 1px solid var(--hdr-line); }

/* the header buttons at a table: the same glass, height and corners as the plaques */
body.ingame .top > button.mini,
body.ingame .top .hdr-menu-btn,
body.ingame .top .xray-wrap > button.mini {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  height: var(--hdr-h); padding: 0 .85em; border-radius: 10px;
  background: var(--hdr-glass); border: 1px solid var(--hdr-line);
  font-size: .9em; font-weight: 600; color: #e9ecf1; line-height: 1;
  transition: background-color .12s, border-color .12s;
}
body.ingame .top > button.mini:hover,
body.ingame .top .hdr-menu-btn:hover,
body.ingame .top .xray-wrap > button.mini:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18); }
body.ingame .top .hdr-menu-btn.open { background: rgba(255, 255, 255, .13); border-color: rgba(255, 255, 255, .22); }
body.ingame .top > button.mini.gold { background: linear-gradient(180deg, #f0c86a, #d19b2c); border-color: #ffe3a0; color: #241a05; font-weight: 700; }
body.ingame .top > button.mini .ic, body.ingame .top .hdr-menu-btn .ic { width: 1.15em; height: 1.15em; }
body.ingame .top .hdr-menu-table .hdr-menu-btn { width: var(--hdr-h); padding: 0; }
body.ingame .top .hdr-dots { font-size: 1.15em; letter-spacing: .08em; padding: 0; }
/* a thin divider between the table's info and its buttons */
body.ingame .top > .table-meta { padding-right: .5em; margin-right: .1em; border-right: 1px solid var(--hdr-line); }

/* the same tight sizes the phone/landscape header had */
@media (max-width: 860px), (orientation: landscape) and (max-height: 520px) {
  .top { --hdr-h: 1.85rem; }
  .table-meta { gap: .3em; }
  .tm-strip .tm-seg { padding: 0 .5em; }
  .tm-mode { padding: 0 .3em 0 .4em; gap: .3em; }
  body.ingame .top > button.mini, body.ingame .top .hdr-menu-btn { padding: 0 .6em; font-size: .8em; }
  body.ingame .top > .table-meta { border-right: 0; padding-right: 0; }
  .tm-strip .tm-seg small { display: none; }
  .tm-strip .tm-level::before { content: 'ур. '; font-size: .78em; font-weight: 600; color: var(--muted); }
  .super-xray-label { display: none; }
  .super-xray-label-short { display: inline; }
  .xray-state-label, .super-xray-state-label { display: none; }
  /* a phone: only the eye and the count («👁 3 ✦ 1»); the names are a tap away — even «Рентген: имя» lines covered the top plaques */
  .table-xray-status { right: .2em; max-width: 70%; gap: .2em; }
  .xr-chips { font-size: .6em; padding: .12em .15em; }
  .xr-chip { padding: 0 .25em; gap: .2em; }
  .xr-lbl, .xr-who { display: none; }
  .xr-n.xr-one { display: inline-block; }
  .xr-n { background: none; padding: 0; min-width: 0; }
  .xr-pop { font-size: .62em; max-width: 16em; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .top { --hdr-h: 1.55rem; }
  /* a phone on its side: one row, so the plaque keeps only the bot and its level, the title only the spade */
  .tm-mode .tm-mode-name, body.ingame .top .hdr-title { display: none; }
}
@media (max-width: 380px) and (orientation: portrait) { .top { --hdr-h: 1.7rem; } .tm-sub { padding: .08em .35em; } }

/* blinds │ ante │ level is one button now; «Пауза» acts on the table, so it is set apart and tinted */
.tm-strip .tm-blinds .tm-lvl { color: var(--text); }
.tm-strip .tm-blinds .tm-lvl::before { content: ''; display: inline-block; width: 1px; height: 1.1em; background: var(--hdr-line); margin-right: .45em; vertical-align: middle; }
body.ingame .top > button.mini.hdr-pause { margin-left: .5em; background: rgba(255, 170, 60, .14); border-color: rgba(255, 170, 60, .55); color: #ffcf8a; }
body.ingame .top > button.mini.hdr-pause:hover { background: rgba(255, 170, 60, .24); border-color: rgba(255, 190, 90, .8); }
@media (max-width: 860px), (orientation: landscape) and (max-height: 520px) {
  .tm-strip .tm-blinds small.tm-lvl { display: inline; }
  .tm-strip .tm-blinds small.tm-ante { display: none; }
}

/* The «Номиналы» line is not drawn (with the dealer or without); kept in the DOM, the layout code reads it and skips it when hidden. */
.chip-legend { display: none !important; }

/* Before «Начать игру» the letter in the avatar ring is sized from the ring itself, not from the plaque's font: on a crowded phone table the ring
   shrinks (and the plaque is scaled) while the letter did not, so it spilled out of its window. */
.seat.pre-game .seat-avatar-wrap { container-type: size; }
.seat.pre-game .seat-avatar.placeholder { font-size: 52cqw !important; line-height: 1; overflow: hidden; }

/* «Фигуры» tiles: the two sample cards shrink to the tile instead of spilling out of it (a phone's tile is narrower than two 58 px cards) */
.look-opt[data-key="courts"] { min-width: 0; overflow: hidden; }
.look-opt[data-key="courts"] .courts-pv { width: 100%; }
.courts-pv .playing-card { width: auto; flex: 1 1 0; min-width: 0; max-width: 58px; height: auto; aspect-ratio: 58 / 81; }
@media (min-width: 700px) { .courts-pv .playing-card { flex: none; width: 72px; max-width: none; aspect-ratio: 72 / 101; } }

/* A phone held upright: the table is the round one at every player count (it used to be round only from nine seats, oval below that). */
@media (max-width: 480px) {
  .table-oval { aspect-ratio: 1.05 / 1; }
  .table-stage:has(.table-oval) { min-height: 47svh; }
}

/* ---- the rank by hands won on a seat's plaque (rankMarkHtml): sizes in em of the plaque, so it scales with the seat on a phone and a desktop alike ---- */
.rank-mark { display: inline-flex; align-items: center; gap: .25em; line-height: 1; flex: none; max-width: 100%; }
.rank-mark .rank-ico { width: 1em; height: 1em; }
.rank-mark.rk-s .rank-ico { font-size: 1em; }
.rank-mark.rk-m .rank-ico { font-size: 1.35em; }
.rank-mark.rk-l .rank-ico { font-size: 1.8em; }
.rank-mark.rk-at-face { position: absolute; right: -.35em; bottom: -.35em; z-index: 2; background: rgba(8, 12, 10, .82); border-radius: 50%; padding: .08em; pointer-events: none; }
.rank-mark.rk-at-face.rk-s .rank-ico { font-size: .55em; }
.rank-mark.rk-at-face.rk-m .rank-ico { font-size: .75em; }
.rank-mark.rk-at-face.rk-l .rank-ico { font-size: 1em; }
.rank-preview { display: flex; justify-content: center; padding: .9em 0 1.1em; margin: .3em 0 .2em; border-radius: 12px; border: 1px solid #343944; background: radial-gradient(ellipse at 50% 40%, #1f5a3e 0%, #123a28 75%); }
.rank-preview .seat { position: static; width: 150px; }
.rank-preview .seat-card { cursor: default; }

/* «Все уровни»: on a wide screen the two ladders stand side by side (less scrolling), the panel takes the card's width */
@media (min-width: 900px) and (pointer: fine) {
  .levels-panel { width: min(860px, 100%); }
  .levels-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.4em; align-items: start; }
}
.rank-ladder { display: flex; flex-wrap: wrap; gap: .5em .8em; justify-content: center; margin: .4em 0; }
.rank-step { display: flex; flex-direction: column; align-items: center; gap: .15em; width: 4.6em; text-align: center; }
.rank-step .rank-step-ico { width: 2.4em; height: 2.4em; }
.rank-step .lvl-emoji.rank-step-ico { font-size: 1.7em; }
.rank-step small { font-size: .7em; color: var(--muted); line-height: 1.1; }
.title-progress .title-next-ico { width: 1.3em; height: 1.3em; vertical-align: middle; display: inline-block; font-size: 1em; }

.news-shots { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }
.news-shots img { display: block; width: 100%; border-radius: 8px; border: 1px solid rgba(255,255,255,.12); }

/* The rabbit button: a slot of the board where the unplayed cards would go; pressing it asks the server for them (for you only). */
.community .playing-card.rabbit-btn {
  cursor: pointer; background: url('/img/ui/back-rabbit-light.webp?v=5') center / 100% 100% no-repeat; box-shadow: 0 3px 8px rgba(0, 0, 0, .45), 0 0 0 1.5px var(--gold);
  animation: rabbit-nudge 2.4s ease-in-out infinite;
}
.community .playing-card.rabbit-btn:hover { filter: brightness(1.25); }
@keyframes rabbit-nudge { 0%, 80%, 100% { transform: none; } 88% { transform: translateY(-5%); } }
.community .playing-card.rabbit-btn.rabbit-dark { background-image: url('/img/ui/back-rabbit-dark.webp?v=5'); }
/* The winner's plaque hangs over the lower part of the board: the rabbit stays above it and clickable, the plaque lets clicks through (its buttons keep theirs). */
.result-banner { pointer-events: none; }
.result-banner button, .result-banner a, .result-banner [data-act] { pointer-events: auto; }
/* …but the table editor has to be able to grab it: a click-through plaque could not be selected on a
   phone (or with the arrows), so it never got its own spot for the one- and two-bank cases. */
html.st-table .table-oval .result-overlay { z-index: 80; pointer-events: none; }
html.st-table .table-oval .result-banner { pointer-events: auto !important; cursor: move; touch-action: none; }
.community .playing-card.rabbit-btn { z-index: 8; }

/* Mobile card artwork policy */
@media (max-width: 480px),
       (orientation: landscape) and (max-height: 520px) and (max-width: 1100px) {
  /* Hide artwork on small screens, but keep card symbols readable. */
  html[data-face] .playing-card.has-art .art {
    display: none !important;
  }

  html[data-face] .playing-card.has-art :is(.pip.mid, .cx .ctr, .cx .fc) {
    visibility: visible !important;
  }

  /* Poker/Retro court illustrations are rendered in .fc. */
  .playing-card:is(.cs-poker, .cs-retro).rk-f .cx .fc {
    display: none !important;
    background-image: none !important;
  }

  .playing-card:is(.cs-poker, .cs-retro).rk-f .cx .ctr {
    display: none !important;
  }

  /* On a phone, board cards are 50–70 px wide. Without the court picture, put the rank and suit together in the middle. */
  @container (min-width: 50px) and (max-width: 69.9px) {
    .playing-card:is(.cs-poker, .cs-retro).rk-f .cx .br {
      display: none !important;
    }

    .playing-card:is(.cs-poker, .cs-retro).rk-f .cx .tl {
      inset: 0 !important;
      width: auto !important;
      justify-content: center !important;
    }

    .playing-card:is(.cs-poker, .cs-retro).rk-f .cx .tl b {
      font-size: 50cqw !important;
    }

    .playing-card:is(.cs-poker, .cs-retro).rk-f .cx .tl .su {
      width: 34cqw !important;
      height: 34cqw !important;
      margin-top: 4.5cqw !important;
    }
  }

  /* Hide artwork settings on phones. */
  .look-box.art-box,
  .look-box.courts-box,
  .card-sheet-bar [data-cs="courts"] {
    display: none !important;
  }
}

/* Phone: no court illustrations in Poker/Retro cards */
@media (max-width: 480px),
       (orientation: landscape) and (max-height: 520px) and (max-width: 1100px) {
  .playing-card:is(.cs-poker, .cs-retro).rk-f .cx .fc {
    display: none !important;
    background: none !important;
    background-image: none !important;
    box-shadow: none !important;
    filter: none !important;
  }
}

/* ---------- admin console (Oct 2026): the menu on the left, the open section on the right, a fixed height ---------- */
.admin-overlay { padding: 2vh 2vw; }
.admin-shell {
  display: grid; grid-template-columns: 210px minmax(0, 1fr); width: min(1320px, 100%); height: min(900px, 96vh); padding: 0;
  background: var(--panel); border: 1px solid rgba(224, 176, 76, .35); border-radius: 16px; overflow: hidden; text-align: left;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .6); position: relative;
}
.adm-nav { display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; overflow-y: auto; background: linear-gradient(180deg, #1b1e26, #14161c); border-right: 1px solid #2a2e38; }
.adm-brand { padding: 2px 10px 10px; color: var(--gold); font-size: 1.15em; font-weight: 800; letter-spacing: .01em; }
.adm-nav-group { padding: 12px 10px 4px; color: #7d8494; font-size: .68em; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.adm-nav button { display: flex; align-items: center; gap: .65em; width: 100%; padding: .55em .7em; border: 0; border-radius: 9px; background: transparent; color: #c9cdd6; font-size: .93em; text-align: left; cursor: pointer; }
.adm-nav button:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.adm-nav button.active { background: rgba(224, 176, 76, .15); color: var(--gold); font-weight: 700; box-shadow: inset 3px 0 0 var(--gold); }
.adm-ni { width: 1.3em; text-align: center; }
.adm-nl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-nb { min-width: 1.7em; padding: .05em .45em; border-radius: 99px; background: #2e323d; color: #dfe3ea; font-size: .75em; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.adm-nb.bad { background: var(--danger); color: #fff; }
.adm-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.adm-head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid #2a2e38; background: rgba(255, 255, 255, .015); }
.adm-title { display: flex; flex-direction: column; min-width: 0; flex: 0 1 auto; }
.admin-card .adm-title h2 { margin: 0; padding: 0; font-size: 1.3em; text-align: left; white-space: nowrap; }
.adm-title .hint { font-size: .8em; }
.adm-head .adm-announce { flex: 1 1 320px; max-width: 520px; margin: 0 0 0 auto; flex-wrap: nowrap; }
.adm-head .adm-announce input { min-height: 2.3em; }
.adm-head .adm-corner { position: static; flex: none; }
.admin-shell .adm-body { flex: 1; min-height: 0; max-height: none; overflow-y: auto; padding: 16px 18px 28px; }
/* sections inside a tab */
.admin-shell .adm-sub, .admin-shell .adm-body h4 { margin: 1.4em 0 .55em; padding-bottom: .35em; border-bottom: 1px solid #2a2e38; font-size: .98em; }
.admin-shell .adm-body > h4:first-child, .admin-shell .adm-box > .adm-sub:first-child { margin-top: 0; }
.adm-row { transition: background .12s; }
.adm-row:hover { background: #2a2e38; }
.adm-empty { padding: 2.2em 1em; border: 1px dashed #3a3f4a; border-radius: 12px; color: var(--muted); text-align: center; line-height: 1.6; }
.adm-box { padding: .8em .9em; border: 1px solid #2a2e38; border-radius: 12px; background: rgba(255, 255, 255, .015); }
.adm-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.adm-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.adm-col > .adm-ban-form { margin: 0; }
@media (min-width: 1180px) { .adm-split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
/* «Сводка» */
.admin-shell .adm-tiles { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.admin-shell .adm-tile { padding: .8em .95em; border: 1px solid #2a2e38; border-left: 3px solid #3a3f4a; border-radius: 12px; background: linear-gradient(180deg, #232731, #1d2028); }
.admin-shell .adm-tile b { font-size: 1.45em; line-height: 1.2; }
.admin-shell .adm-tile-label { font-size: .78em; letter-spacing: .02em; }
.admin-shell .adm-tile.good { border-left-color: #2ea072; }
.admin-shell .adm-tile.bad { border-left-color: var(--danger); background: linear-gradient(180deg, #2c2226, #221c20); }
.admin-shell .adm-tile[role="button"]:hover { border-color: #4a4f5c; }
.adm-backup-row { align-items: center; margin: .2em 0 1em; }
.adm-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 12px; }
.adm-cards > .adm-season { margin: 0; padding: .8em .95em; border: 1px solid #2a2e38; border-radius: 12px; background: rgba(255, 255, 255, .015); }
.adm-cards > .adm-season h4 { margin: 0 0 .3em; padding: 0; border: 0; }
.adm-cards > .adm-season .hint { margin: 0 0 .6em; font-size: .8em; }
.admin-shell .adm-now-list .adm-row { border-left: 3px solid #3d8bfd; }
/* «Столы» */
.admin-shell .adm-table { padding: .8em .95em; margin-bottom: 12px; border: 1px solid #2a2e38; border-left-width: 4px; border-radius: 12px; }
.admin-shell .adm-table-head b { font-size: 1.1em; letter-spacing: .04em; }
.admin-shell .adm-players { gap: 2px; margin: .3em 0 .6em; }
.admin-shell .adm-player { padding: .3em .45em; border-radius: 8px; }
.admin-shell .adm-player:hover { background: rgba(255, 255, 255, .04); }
.admin-shell .adm-stack { min-width: 4.5em; text-align: right; }
.admin-shell .adm-legend { opacity: .8; }
/* «Игроки» */
.adm-pc-head b { font-size: 1.25em; }
.adm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: .6em 0 .9em; }
.adm-stat { display: flex; flex-direction: column; padding: .5em .65em; border-radius: 10px; background: rgba(0, 0, 0, .22); }
.adm-stat b { color: var(--gold); font-size: 1.15em; font-variant-numeric: tabular-nums; }
.adm-stat span { color: var(--muted); font-size: .72em; }
.adm-ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.adm-ach { display: flex; align-items: center; gap: .4em; padding: .35em .35em .35em .6em; border: 1px solid #2a2e38; border-radius: 9px; background: rgba(0, 0, 0, .15); font-size: .88em; }
.adm-ach > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.adm-ach.on { border-color: rgba(46, 160, 114, .45); background: rgba(46, 160, 114, .1); }
.adm-ach.on > span { color: var(--text); }
.adm-ach.blocked { border-color: rgba(217, 83, 79, .4); }
.adm-ach button.mini { flex: none; }
/* a phone, a narrow window: the menu becomes a strip of tabs across the top, the announcement goes under the title */
@media (max-width: 760px) {
  .admin-overlay { padding: 0; }
  .admin-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); width: 100%; height: 100%; border-radius: 0; border: 0; }
  .adm-nav { flex-direction: row; gap: 4px; padding: 8px; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid #2a2e38; scrollbar-width: none; }
  .adm-nav-group { display: none; }
  .adm-brand { display: none; }
  .adm-nav button { flex: none; width: auto; padding: .45em .7em; font-size: .85em; }
  .adm-nav button.active { box-shadow: inset 0 -2px 0 var(--gold); }
  .adm-head { flex-wrap: wrap; gap: 8px 10px; padding: 10px 12px; }
  .adm-title { flex: 1 1 0; }
  .adm-head .adm-announce { order: 3; flex: 1 1 100%; max-width: none; margin: 0; }
  .admin-shell .adm-body { padding: 12px 12px 24px; }
  .adm-cards { grid-template-columns: minmax(0, 1fr); }
}
.adm-stats { grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); }
.admin-shell .adm-adjust { grid-template-columns: 7.5em minmax(5em, 1fr) minmax(0, 1.5fr) auto; }
.adm-box .adm-row .hint { font-size: .8em; line-height: 1.35; }
.adm-box .adm-row > span:first-child { flex-basis: 100%; }
.admin-overlay { background: rgba(8, 10, 14, .78); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.admin-shell .adm-body > .adm-actions, .admin-shell .adm-body > .adm-ban-form { margin-bottom: .9em; align-items: center; }
.admin-shell .adm-body > p.hint:only-child { padding: 2.2em 1em; border: 1px dashed #3a3f4a; border-radius: 12px; text-align: center; }
@media (max-width: 760px) {
  .admin-shell .adm-tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
  .admin-shell .adm-tile { padding: .6em .7em; }
  .admin-shell .adm-tile b { font-size: 1.15em; overflow-wrap: anywhere; min-width: 0; }
  .admin-shell .adm-pname { flex: 1 1 calc(100% - 7em); } /* name and stack on the first line, the buttons under them */
  .admin-shell .adm-adjust { grid-template-columns: minmax(0, 1fr) auto; }
  .admin-shell .adm-adjust > input[name=amount] { width: 7em; }
  .admin-shell .adm-adjust > input[name=reason] { grid-column: auto; }
  .adm-ach-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- lobby «Пульс клуба» (2026-10-30) ---------- */
.lobby-online { display: flex; flex-wrap: wrap; align-items: center; gap: .5em .7em; margin-top: 1em; font-size: .9em; }
.lo-label { color: var(--muted); font-size: .85em; }
.lo-faces { display: flex; }
.lo-face { position: relative; width: 34px; height: 34px; margin-left: -8px; padding: 0; background: none; border: 0; border-radius: 50%; box-shadow: 0 0 0 2px #2c1d46; }
.lo-face:first-child { margin-left: 0; }
.lo-face::after { content: ''; position: absolute; right: 0; bottom: 0; width: 9px; height: 9px; border-radius: 50%; background: #3fd37a; box-shadow: 0 0 0 2px #2c1d46; z-index: 2; }
.lo-avatar-wrap { position: absolute; inset: 0; }
.lo-avatar { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: #1f232b; color: var(--gold); font-weight: 700; font-size: .75em; }
img.lo-avatar:not([hidden]) ~ .placeholder { display: none; }
.lo-names { color: var(--text); }
.live-empty { display: flex; align-items: center; gap: .8em; padding: .7em .9em; border: 1px dashed #4a4f5c; border-radius: 12px; color: var(--muted); }
.live-empty b { color: var(--text); }
.live-empty .mini { margin-left: auto; flex-shrink: 0; }

.hod { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1em; align-items: center; }
.hod-who { display: grid; justify-items: center; gap: .3em; min-width: 76px; text-align: center; }
.hod-avatar-wrap { position: relative; width: 52px; height: 52px; }
.hod-avatar { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--gold); display: grid; place-items: center; background: #1f232b; color: var(--gold); font-weight: 700; }
img.hod-avatar:not([hidden]) ~ .placeholder { display: none; }
.hod-title { font-size: 1.2em; font-weight: 800; margin-bottom: .35em; }
.hod-title small { font-size: .65em; color: var(--muted); font-weight: 500; margin-left: .5em; }
.hod-week { margin-top: .7em; padding-top: .6em; border-top: 1px solid rgba(255,255,255,.06); font-size: .85em; color: var(--muted); }

.feed-day { font-size: .7em; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 800; margin: .9em 0 .35em; }
.feed-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: .7em; align-items: center; width: 100%; padding: .45em .4em; border-radius: 10px; background: transparent; color: var(--text); font: inherit; text-align: left; border: 0; }
.feed-row { cursor: pointer; }
.feed-row:hover { background: rgba(255,255,255,.05); }
.feed-who, .feed-medal { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; display: block; border-radius: 50%; }
.feed-who:hover, .feed-medal:hover { filter: brightness(1.25); outline: 2px solid rgba(255,255,255,.35); outline-offset: 1px; }
.feed-row + .feed-row { border-top: 1px solid rgba(255,255,255,.05); }
.feed-avatar-wrap { position: relative; display: block; width: 34px; height: 34px; }
.feed-avatar { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: #1f232b; color: var(--gold); font-weight: 700; font-size: .8em; }
img.feed-avatar:not([hidden]) ~ .placeholder { display: none; }
.feed-what { min-width: 0; font-size: .92em; }
.feed-what small { display: block; color: var(--muted); font-size: .8em; }
.feed-side { display: flex; align-items: center; gap: .45em; }
.feed-kind { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.06); }
.feed-play { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); color: var(--muted); font-size: .7em; }
.feed-ach { width: 34px; height: 34px; display: block; }
.pf-achc.hit { outline: 2px solid var(--gold); outline-offset: 2px; animation: pf-ach-hit 1.2s ease-out 2; }
@keyframes pf-ach-hit { 50% { box-shadow: 0 0 22px rgba(255, 210, 60, .55); } }

.lobby-elo > button { display: flex; flex-direction: column; gap: .1em; text-align: left; background: var(--panel2); border-radius: 10px; padding: .5em .7em; color: var(--text); font: inherit; border: 1px solid transparent; }
.lobby-elo > button:hover { border-color: var(--gold); }
.lobby-acad { display: flex; align-items: center; gap: .7em; width: 100%; margin-top: .9em; padding: .8em 0 0; border: 0; border-top: 1px solid rgba(255,255,255,.07); background: none; color: var(--text); font: inherit; text-align: left; }
.lobby-acad .ac-img { width: 38px; height: 38px; flex-shrink: 0; }
.la-body { flex: 1; min-width: 0; display: grid; gap: .3em; }
.la-top { display: flex; justify-content: space-between; gap: .5em; font-size: .88em; }
.la-top .hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lobby-top-row.mine { background: rgba(90,162,255,.1); }
.ltr-week { font-size: .8em; min-width: 3em; text-align: right; }
.ltr-gap { text-align: center; color: var(--muted); line-height: .6; }
.ltr-foot { font-size: .75em; margin: .4em 0 0; }
.lobby-links { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .6em; }
.lobby-links .news-link { padding: .7em .8em; gap: .55em; }

/* ---------- leaderboard «Подиум и движение» ---------- */
.lb-card { width: min(800px, 100%); }
.lb-views { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 0 0 .7em; background: var(--panel2); border-radius: 12px; }
.lb-views button { flex: 1; min-width: max-content; padding: .45em .7em; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: .9em; border: 0; }
.lb-views button.active { background: var(--gold); color: #241800; font-weight: 700; }
.lb-podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: .6em; align-items: end; margin: .4em 0 1em; }
.lbp { display: grid; justify-items: center; gap: .25em; padding: .8em .5em .7em; border-radius: 14px; background: var(--panel2); border: 1px solid #353b47; color: var(--text); font: inherit; min-width: 0; }
.lbp.first { padding-top: 1.1em; background: linear-gradient(180deg, rgba(240,196,90,.2), var(--panel2) 70%); border-color: rgba(240,196,90,.5); }
.lbp.mine { outline: 2px solid rgba(90,162,255,.5); }
.lbp-medal { font-size: 1.3em; line-height: 1; }
.lbp-avatar-wrap { position: relative; width: 56px; height: 56px; }
.lbp.first .lbp-avatar-wrap { width: 72px; height: 72px; }
.lbp-avatar { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: #1f232b; color: var(--gold); font-weight: 700; }
.lbp.first .lbp-avatar { box-shadow: 0 0 0 3px #f0c45a; }
img.lbp-avatar:not([hidden]) ~ .placeholder { display: none; }
.lbp-name { font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbp-val { font-size: 1.35em; color: var(--gold); }
.lbp-sub { display: grid; justify-items: center; gap: .2em; font-size: .78em; color: var(--muted); }
.lbe { display: grid; gap: 2px; }
.lbe-row { display: grid; grid-template-columns: 1.8em 2.6em minmax(0, 1fr) 96px 3.4em 6.8em 5.2em 4.6em; gap: .5em; align-items: center; padding: .35em .4em; border-radius: 8px; }
.lbe-row.mine { background: rgba(90,162,255,.1); }
.lbe-head { white-space: nowrap; font-size: .72em; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.lbe-rank { color: var(--muted); font-weight: 800; text-align: center; }
.lbe-move { font-size: .75em; font-weight: 800; text-align: center; color: #5d6573; }
.lbe-move.up { color: #6fe0ae; } .lbe-move.down { color: #ff9a8f; }
.lbe-player { display: flex; align-items: center; gap: .55em; min-width: 0; background: none; border: 0; padding: 0; color: var(--text); font: inherit; text-align: left; }
.lbe-player > span:last-child { min-width: 0; display: grid; }
.lbe-player b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbe-player small { display: none; color: var(--muted); font-size: .75em; }
.lbe-elo { color: var(--gold); font-variant-numeric: tabular-nums; }
.lbe-week, .lbe-games { font-variant-numeric: tabular-nums; font-size: .9em; }
.lbe-form { display: inline-flex; gap: 3px; }
.lbe-form i { width: 9px; height: 9px; border-radius: 50%; background: #4a505c; display: block; }
.lbe-form i.w { background: var(--gold); } .lbe-form i.p { background: #3fd393; } .lbe-form i.m { background: #ff6b5e; }
.elo-spark { display: block; }
.elo-spark polyline { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.elo-spark.up polyline { stroke: #3fd393; } .elo-spark.up circle { fill: #3fd393; }
.elo-spark.down polyline { stroke: #ff6b5e; } .elo-spark.down circle { fill: #ff6b5e; }
.lbe-legend { font-size: .75em; }

@media (max-width: 640px) {
  .hod { grid-template-columns: auto minmax(0, 1fr); }
  .hod-watch { grid-column: 1 / -1; justify-self: start; }
  .hod .hand-cards { --hc: 32px; }
  .lobby-online { margin-top: .8em; }
  .lbe-row { grid-template-columns: 1.3em 1.9em minmax(0, 1fr) 2.8em 3.4em; gap: .35em; padding: .35em .2em; }
  .lbe-head { white-space: normal; font-size: .62em; line-height: 1.15; letter-spacing: 0; }
  .lbe-player { gap: .4em; }
  .lbe-player .lb-avatar-wrap { width: 24px; height: 24px; }
  .lbe-move { font-size: .68em; }
  .lbe-trend, .lbe-form, .lbe-form-h, .lbe-games { display: none; }
  .lbe-legend .lbe-form { display: inline-flex; }
  .lbe-player small { display: block; }
  .lb-views button { font-size: .8em; padding: .4em .5em; }
}

/* ---------- colour for the lobby and the rating (2026-10-30) ---------- */
.lobby .pos, .lb-card .pos { color: #4cc38a; }
.lobby .neg, .lb-card .neg { color: #e5616b; }
.lobby b.pos, .lobby b.neg, .lb-card b.pos, .lb-card b.neg { font-weight: 700; }
.feed-row { --k: #4a505c; border-left: 3px solid var(--k); border-top: 0 !important; margin-top: 5px; padding: .5em .6em; background: rgba(255,255,255,.03); }
.feed-row.k-w { --k: #e0b04c; background: linear-gradient(90deg, rgba(224,176,76,.12), rgba(255,255,255,.03) 55%); }
.feed-row.k-a { --k: #b992ff; background: linear-gradient(90deg, rgba(185,146,255,.13), rgba(255,255,255,.03) 55%); }
.feed-row.k-h { --k: #ff9a4a; background: linear-gradient(90deg, rgba(255,154,74,.13), rgba(255,255,255,.03) 55%); }
.feed-row.k-r { --k: #4cc38a; background: linear-gradient(90deg, rgba(76,195,138,.13), rgba(255,255,255,.03) 55%); }
.feed-row:hover { filter: brightness(1.12); }
.fchip { display: inline-block; padding: 0 7px; margin-right: .45em; border-radius: 6px; font-size: .72em; font-weight: 800; letter-spacing: .04em; vertical-align: 1px; }
.fchip.k-w { background: rgba(224,176,76,.22); color: #e0b04c; }
.fchip.k-a { background: rgba(185,146,255,.22); color: #b992ff; }
.fchip.k-h { background: rgba(255,154,74,.22); color: #ff9a4a; }
.fchip.k-r { background: rgba(76,195,138,.22); color: #4cc38a; }
.ltr-week { min-width: 3.4em; text-align: center; }
.ltr-week .pos, .ltr-week .neg, .ltr-week .muted { display: inline-block; min-width: 3em; padding: 1px 8px; border-radius: 999px; font-size: .9em; }
.ltr-week .pos { background: rgba(76,195,138,.16); }
.ltr-week .neg { background: rgba(229,97,107,.16); }
.ltr-week .muted { background: rgba(255,255,255,.07); }
.lobby-top-row:first-of-type { background: linear-gradient(90deg, rgba(224,176,76,.14), transparent); }
.lobby-elo > button.lc { border-color: rgba(224,176,76,.35); background: linear-gradient(160deg, rgba(224,176,76,.14), var(--panel2) 60%); }
.lobby-elo > button.lt { border-color: rgba(185,146,255,.3); background: linear-gradient(160deg, rgba(185,146,255,.12), var(--panel2) 60%); }
.lobby-elo > button.lt b { color: #b992ff; }
.lobby-results > button b { font-size: 1.08em; line-height: 1.25; }
.lobby-results > button.lc b.pos { color: #4cc38a; }
.lobby-results > button.lc b.neg { color: #e5616b; }
.lobby-top .ltr-name { display: grid; gap: 1px; white-space: normal; }
.lobby-top .ltr-name > span { display: flex; align-items: center; gap: .28em; min-width: 0; }
.lobby-top .ltr-name > span b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; font-weight: 700; }
.lobby-top .ltr-name > span .elo-rank-ico { width: 1.15em; height: 1.15em; flex: none; }
.lobby-top .ltr-name small { color: var(--muted); font-size: .7em; font-weight: 400; white-space: nowrap; }
.lobby-top .ltr-elo { display: grid; justify-items: end; line-height: 1.05; font-size: .88em; white-space: nowrap; }
.lobby-top .ltr-elo small { font-size: .72em; font-weight: 600; }
.lobby-top .ltr-elo.pos { color: #4cc38a; }
.lobby-top .ltr-elo.neg { color: #e5616b; }
.result-rank-list { display: grid; gap: 4px; max-height: min(62vh, 620px); overflow-y: auto; }
.result-rank-row { display: grid; grid-template-columns: 2.4em minmax(0, 1fr) auto; gap: .7em; align-items: center; padding: .55em .7em; border-radius: 10px; background: rgba(255,255,255,.035); }
.result-rank-row:first-child { background: linear-gradient(90deg, rgba(224,176,76,.15), rgba(255,255,255,.035)); }
.result-rank-row.mine { outline: 1px solid rgba(90,162,255,.6); background: rgba(90,162,255,.12); }
.result-rank-no { color: var(--muted); text-align: center; font-weight: 700; }
.result-rank-row .lbe-player .lb-avatar-wrap { width: 32px; height: 32px; }
.result-rank-value { display: grid; justify-items: end; gap: 1px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.result-rank-value b { color: var(--gold); font-size: 1.06em; }
.result-rank-value b.pos { color: #4cc38a; }
.result-rank-value b.neg { color: #e5616b; }
.result-rank-value small { color: var(--muted); font-size: .75em; }
.result-rank-note { margin: .8em .2em .1em; font-size: .78em; line-height: 1.4; }
@media (max-width: 560px) {
  .result-rank-row { grid-template-columns: 1.8em minmax(0, 1fr) auto; gap: .4em; padding: .5em .35em; }
  .result-rank-value { font-size: .85em; }
  .result-rank-row .lbe-player .lb-avatar-wrap { width: 26px; height: 26px; }
}
/* Club results: a trophy case over the felt, with the small result line. */
.lb-card { display: flex; flex-direction: column; width: min(740px, 100%); max-height: calc(100dvh - 32px); padding: 1.15em 1.15em 1em; border-color: rgba(224,176,76,.42); background:
  radial-gradient(90% 55% at 12% -8%, rgba(224,176,76,.22), transparent 46%),
  radial-gradient(70% 45% at 100% 110%, rgba(11,92,58,.42), transparent 52%),
  linear-gradient(180deg, #1b241c 0%, #171a20 46%, #14161c 100%);
  box-shadow: 0 22px 56px rgba(0,0,0,.46), inset 0 1px rgba(255,228,170,.16); }
.result-rank-header { display: flex; align-items: center; gap: .8em; margin: .1em 2.2em .85em 0; }
.result-rank-emblem { width: 3.15em; height: 3.15em; flex: none; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(160deg, rgba(255,214,120,.35), rgba(224,176,76,.08)); border: 1px solid rgba(224,176,76,.45); box-shadow: inset 0 1px rgba(255,240,200,.35), 0 8px 18px rgba(0,0,0,.22); }
.result-rank-emblem img { width: 1.7em; height: 1.7em; }
.result-rank-eyebrow { display: block; color: #e4bc6a; font-size: .64em; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.result-rank-header h2 { margin: .05em 0 0; font-size: 1.42em; line-height: 1.1; text-align: left; }
.lb-card .lb-views { gap: .25em; padding: .22em; margin-bottom: .55em; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.06); border-radius: 12px; }
.lb-card .lb-views button { padding: .5em .7em; border-radius: 9px; font-size: .9em; font-weight: 700; }
.lb-card .lb-views button.active { background: linear-gradient(180deg, #f0c56a, #c9842e); color: #241800; box-shadow: 0 2px 10px rgba(201,132,46,.28); }
.lb-card .lb-periods { justify-content: flex-end; align-items: center; gap: .25em; margin: 0 0 .45em; }
.lb-card .lb-periods > span { margin-right: auto; color: var(--muted); font-size: .76em; }
.lb-card .lb-periods .mini { padding: .28em .72em; border: 0; border-radius: 99px; background: none; color: var(--muted); white-space: nowrap; }
.lb-card .lb-periods .mini.active { background: rgba(224,176,76,.2); color: #f0d090; }
.result-hunt { display: flex; justify-content: flex-end; gap: .3em; margin: 0 0 .5em; }
.result-hunt .mini { border-radius: 99px; }
.result-hunt .mini.active { background: rgba(224,120,70,.22); color: #ffc9a4; }
.result-rank-list { display: flex; flex-direction: column; gap: .32em; min-height: 0; overflow-y: auto; padding-right: .15em; }
.result-rank-colheads, .result-rank-row { display: grid; grid-template-columns: 2em minmax(0, 1fr) 92px 6.6em; gap: .5em; align-items: center; }
.result-rank-list.with-bounty .result-rank-colheads,
.result-rank-list.with-bounty .result-rank-row { grid-template-columns: 2em minmax(0, 1fr) 78px 4.5em 5.5em; }
.result-rank-colheads { position: sticky; top: 0; z-index: 1; align-items: end; padding: .15em .7em .4em; background: linear-gradient(180deg, #171c18 70%, rgba(23,28,24,0)); color: var(--muted); font-weight: 700; }
.result-rank-colheads span { font-size: .68em; letter-spacing: .07em; text-transform: uppercase; }
.result-rank-colheads span:nth-child(3) { text-align: center; }
.result-rank-colheads span:last-child,
.result-rank-list.with-bounty .result-rank-colheads span:nth-child(4) { text-align: right; }
.result-rank-row { min-height: 5.35em; padding: .55em .65em .62em; border: 1px solid rgba(255,255,255,.06); border-radius: 13px; background: rgba(255,255,255,.035); }
.result-rank-row.place-1 { box-shadow: inset 3px 0 #e0b04c; }
.result-rank-row.place-2 { box-shadow: inset 3px 0 #d5deea; }
.result-rank-row.place-3 { box-shadow: inset 3px 0 #d08a4c; }
.result-rank-trend { display: flex; align-items: center; justify-content: center; min-width: 0; }
.result-spark { display: block; width: 92px; height: 26px; }
.result-rank-list.with-bounty .result-spark { width: 78px; height: 22px; }
.result-spark polyline { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.result-spark.up polyline { stroke: #3fd393; } .result-spark.up circle { fill: #3fd393; }
.result-spark.down polyline { stroke: #ff6b5e; } .result-spark.down circle { fill: #ff6b5e; }
.result-spark.flat polyline { stroke: #9aa3b2; } .result-spark.flat circle { fill: #9aa3b2; }
.result-spark-empty { color: var(--muted); font-size: .9em; line-height: 1; }
.result-head-bounty .narrow { display: none; }
.result-bounty { display: flex; align-items: center; justify-content: flex-end; gap: .22em; color: #f0c27a; font-variant-numeric: tabular-nums; white-space: nowrap; }
.result-bounty img { width: 1.05em; height: 1.05em; }
.result-bounty.hot b { color: #ffe1a8; font-size: 1.12em; }
.result-bounty.zero { justify-content: center; color: #6d7482; }
.result-rank-row:hover { background: rgba(255,255,255,.07); }
.result-rank-row.mine { outline: 1px solid rgba(120,176,255,.75); outline-offset: -1px; }
.result-rank-no { color: #b7c0ce; font-size: 1.05em; font-weight: 800; text-align: center; }
.result-rank-row .lbe-player { gap: .65em; width: 100%; min-width: 0; }
.result-rank-row .lbe-player .lb-avatar-wrap { width: 34px; height: 34px; }
.result-rank-row .lbe-player > span:last-child { gap: .08em; min-width: 0; flex: 1; }
.result-rank-row .lbe-player b { font-size: .97em; }
.result-rank-row .lbe-player small { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .72em; line-height: 1.2; }
.result-title-chip { display: inline-flex; align-items: center; gap: .28em; width: fit-content; margin-top: .12em; padding: .04em .42em .04em .08em; border-radius: 999px; background: rgba(224, 176, 76, .14); color: #e4bc6a; font-size: .74em; font-weight: 700; }
.result-title-chip em { font-style: normal; }
.result-title-chip .elo-rank-ico { width: 18px; height: 18px; }
.result-title-chip.dim { opacity: .65; }
.result-rank-value { min-width: 0; gap: 0; }
.result-rank-value b { color: #e0a45e; font-size: 1.14em; }
.result-rank-value b.neg { color: #e77980; }
.result-rank-value small { color: var(--muted); font-size: .72em; }
.result-rank-note { margin: .55em 0 0; padding: .5em .3em 0; border-top: 1px solid rgba(255,255,255,.07); border-radius: 0; background: none; color: var(--muted); font-size: .75em; text-align: left; }
.result-rank-note summary { color: #d8b16a; cursor: pointer; }
.result-rank-note p { margin: .5em 0 0; line-height: 1.45; }
/* My two results use the same row rhythm as the leaderboard. */
.lobby-results { display: grid; margin-top: .85em; overflow: hidden; border: 1px solid #363c47; border-radius: 10px; background: var(--panel2); }
.lobby-score-row { display: grid; grid-template-columns: 2.1em minmax(0, 1fr) auto; gap: .5em; align-items: center; width: 100%; min-height: 3.5em; padding: .45em .6em; border: 0; background: none; color: var(--text); font: inherit; text-align: left; }
.lobby-score-row + .lobby-score-row { border-top: 1px solid rgba(255,255,255,.07); }
.lobby-score-row:hover { background: rgba(255,255,255,.05); }
.lobby-score-icon { display: grid; place-items: center; width: 2em; height: 2em; border-radius: 8px; background: rgba(224,176,76,.16); color: #e0b04c; font-size: .95em; }
.lobby-score-icon.tournament { background: rgba(185,146,255,.16); color: #c5a0ed; font-size: .8em; }
.lobby-score-label { display: grid; min-width: 0; gap: .1em; }
.lobby-score-label b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88em; }
.lobby-score-label small { color: var(--muted); font-size: .7em; line-height: 1.25; }
.lobby-score-label small.lobby-score-gap { color: #e4bc6a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lobby-score-value { display: grid; justify-items: end; min-width: 4.3em; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lobby-score-value b { color: #e0b04c; font-size: 1.22em; }
.lobby-score-value b.neg { color: #e77980; }
.lobby-score-row:last-child .lobby-score-value b { color: #c5a0ed; }
.lobby-score-value small { color: var(--muted); font-size: .68em; }
.lobby-top-heading { display: flex; align-items: end; justify-content: space-between; gap: .5em; margin-bottom: .55em; }
.lobby-top-heading h2 { margin: .1em 0 0; line-height: 1.15; }
.lobby-top-heading .h2-link { flex: none; margin-bottom: .1em; font-size: .78em; }
.lobby-top-row { min-height: 3.15em; margin: .15em 0; padding: .42em .6em; border: 1px solid transparent; border-radius: 11px; }
.lobby-top-row.featured { min-height: 3.9em; border-color: rgba(224,176,76,.32); background: linear-gradient(100deg, rgba(224,176,76,.22), rgba(224,176,76,.04) 78%); }
.lobby-top-row:nth-of-type(2) { background: rgba(255,255,255,.035); }
.lobby-top-row.mine { outline: 1px solid rgba(90,162,255,.6); }
.lobby-top-row .ltr-medal { flex: none; font-size: 1.15em; }
.lobby-top-row .ltr-name { font-weight: 700; }
.lobby-top .ltr-name small { font-size: .72em; }
.lobby-top .ltr-elo { font-size: .94em; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .lb-card { padding: .9em .7em; }
  .result-rank-header { gap: .55em; margin: 0 1.8em .7em 0; }
  .result-rank-emblem { width: 2.5em; height: 2.5em; border-radius: 12px; }
  .result-rank-header h2 { font-size: 1.12em; }
  .lb-card .lb-periods > span { display: none; }
  .lb-card .lb-periods .mini { flex: 1 1 0; min-width: 0; padding: .35em .25em; font-size: .8em; }
  .result-rank-colheads span { letter-spacing: 0; overflow: hidden; }
  .result-head-bounty .wide { display: none; }
  .result-head-bounty .narrow { display: inline; }
  .result-rank-colheads, .result-rank-row { grid-template-columns: 1.5em minmax(0, 1fr) 52px 4.3em; gap: .28em; }
  .result-rank-list.with-bounty .result-rank-colheads,
  .result-rank-list.with-bounty .result-rank-row { grid-template-columns: 1.3em minmax(0, 1fr) 38px 2.2em 3.5em; }
  .result-rank-row { padding: .38em .35em; }
  .result-spark, .result-rank-list.with-bounty .result-spark { width: 100%; height: 18px; }
  .result-bounty { font-size: .82em; }
  .result-rank-row .lbe-player .lb-avatar-wrap { width: 30px; height: 30px; }
  .result-rank-row .lbe-player small { font-size: .67em; }
  .result-rank-value b { font-size: .98em; }
  .lobby-score-row { gap: .35em; padding: .4em .45em; }
  .lobby-top-heading .h2-link { white-space: nowrap; }
}
.lobby-rank { align-self: flex-start; padding: 0 8px; border-radius: 999px; background: rgba(255,255,255,.1); font-size: .75em; font-weight: 700; }
.lobby-rank.first { background: rgba(224,176,76,.2); color: #e0b04c; }

/* ---------- «Кто кого» in the profile's look (2026-10-30): two sides, split bars, table rows like the history ---------- */
.rivalry-card { --ra: #e0b04c; --rb: #b992ff; width: min(640px, 100%); padding: 1.2em 1.3em 1.3em; text-align: left; }
.rivalry-card h2 { text-align: center; margin: 0 0 .9em; }
.rv-head { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: .8em; align-items: center; margin-bottom: 1em; padding: .9em .6em; border-radius: 14px; background: var(--panel2); border: 1px solid #343944; }
.rv-side { display: grid; justify-items: center; gap: .35em; padding: .2em; background: none; border: 0; }
.rv-ava { position: relative; display: block; width: 64px; height: 64px; border-radius: 50%; padding: 3px; }
.rv-side.a .rv-ava { background: var(--ra); } .rv-side.b .rv-ava { background: var(--rb); }
.rv-ava .lobby-me-avatar-wrap { width: 100%; height: 100%; }
.rv-ava .lobby-me-avatar { border: 0; }
.rv-side.a b { color: var(--ra); } .rv-side.b b { color: var(--rb); }
.rv-side b { font-size: 1.05em; }
.rv-meta { display: grid; justify-items: center; gap: 1px; font-size: .78em; color: var(--muted); }
.rv-elo { font-weight: 700; color: var(--text); }
.rv-score { font-size: 2.3em; line-height: 1; gap: .25em; }
.rv-score b { font-variant-numeric: tabular-nums; }
.rv-score b.a { color: var(--ra); } .rv-score b.b { color: var(--rb); }
.rv-score > span { color: #5d6573; }
.rv-rows { display: grid; gap: 6px; }
.rv-row { grid-template-columns: 7em minmax(0, 1fr) 7em; row-gap: 6px; padding: .55em .7em; background: var(--panel2); border: 1px solid #30353f; border-radius: 12px; }
.rv-label { font-size: .85em; line-height: 1.2; }
.rv-val { font-size: 1.05em; color: var(--muted); }
.rv-val.lead.a { color: var(--ra); } .rv-val.lead.b { color: var(--rb); }
.rv-val.lead { font-size: 1.15em; }
.rv-bar { grid-column: 1 / -1; display: flex; gap: 3px; height: 6px; }
.rv-bar i { display: block; min-width: 4px; border-radius: 3px; }
.rv-bar i.a { background: var(--ra); } .rv-bar i.b { background: var(--rb); }
.rv-sub { margin: 1.2em 0 .5em; font-size: .72em; font-weight: 800; letter-spacing: .07em; }
.rv-recent { display: grid; gap: 5px; }
.rv-table { display: grid; grid-template-columns: minmax(0, 1fr) auto 1.4em; align-items: center; gap: .6em; width: 100%; padding: .5em .7em; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid #30353f; border-left: 3px solid #4a505c; color: var(--text); font: inherit; text-align: left; }
.rv-table.a { border-left-color: var(--ra); } .rv-table.b { border-left-color: var(--rb); }
.rv-table:not(:disabled):hover { filter: brightness(1.12); }
.rv-table:disabled { opacity: 1; cursor: default; }
.rv-when { font-size: .9em; } .rv-when small { display: block; color: var(--muted); font-size: .8em; }
.rv-duel { display: flex; align-items: center; gap: .35em; min-width: 0; font-size: .85em; }
.rv-duel small { max-width: 6.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 1em; }
.rv-duel i { color: #5d6573; font-style: normal; font-size: .8em; }
.rv-pl { min-width: 1.8em; height: 1.8em; padding: 0 .3em; border-radius: 999px; display: grid; place-items: center; font-weight: 800; background: rgba(255,255,255,.07); border: 2px solid #3d4452; line-height: 1; }
.rv-pl.p1 { border-color: #f0c45a; color: #f7d678; } .rv-pl.p2 { border-color: #c4ccd8; } .rv-pl.p3 { border-color: #cf8a52; }
.rv-go { color: var(--muted); font-size: .8em; text-align: center; }
@media (max-width: 560px) {
  .rv-row { grid-template-columns: 4.2em minmax(0, 1fr) 4.2em; font-size: .9em; }
  .rv-table { grid-template-columns: minmax(0, 1fr) 1.2em; }
  .rv-duel { grid-column: 1 / -1; grid-row: 2; }
  .rv-go { grid-row: 1; grid-column: 2; }
  .rv-ava { width: 52px; height: 52px; }
}

/* phone: profile, then the table leaders, then the tables being played */
@media (max-width: 900px) {
  .lobby-me { order: 1; }
  .lobby-top { order: 2; }
  .lobby-main, .lobby-links { order: 3; }
}

/* Phone, portrait, at a table: the top row held only the suit icons, the volume and the avatar, so a third of it was empty and the header
   took three rows. The table's chips and buttons now start on that row (the suit icons go, the volume keeps just its speaker and a
   short slider), the avatar stays at the end. The two dashed notes of a watcher are tighter too. */
@media (max-width: 560px) and (orientation: portrait) {
  body.ingame .top { padding: .25em .45em; gap: .25em; row-gap: .2em; }
  body.ingame .top > h1, body.ingame .top > .grow { display: none; }
  body.ingame .top > .table-meta { order: 1; flex: 1 1 0; min-width: 0; margin-right: 0; }
  body.ingame .top > .volume-ctl { order: 2; }
  body.ingame .top > .hdr-menu-user { order: 3; }
  body.ingame .volume-ctl .vol-track { width: 30px; }
  body.ingame .top .table-meta .mini, body.ingame .top .table-meta button { font-size: .95em; padding: .22em .5em; }
  body.ingame .spectator-banner { font-size: .74em; padding: .3em .6em; line-height: 1.25; border-radius: 8px; }
}

/* ---------- finished table: the hand list beside the table ---------- */
.hist-hands { background: var(--panel2); border: 1px solid #2c303a; border-radius: 12px; padding: .6em; margin-bottom: .6em; display: flex; flex-direction: column; gap: .5em; }
.hl-sum { display: flex; flex-direction: column; gap: .3em; }
.hl-sum-top { display: flex; justify-content: space-between; align-items: baseline; }
.hl-sum-me { font-weight: 800; font-variant-numeric: tabular-nums; }
.hl-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4em; }
.hl-stats > .hl-stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
.hl-stat { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: .55em; align-items: center; padding: .4em .6em; border-radius: 10px; background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.025)); border: 1px solid rgba(255,255,255,.06); cursor: help; line-height: 1.15; min-width: 0; }
.hl-stat i { grid-row: 1 / 3; font-style: normal; width: 1.9em; height: 1.9em; }
.hl-stat b { font-size: .98em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hl-stat small { font-size: .68em; color: var(--muted); line-height: 1.2; }
.hl-stat:hover, .hl-stat:focus { border-color: var(--gold); outline: none; }
.ts-award { cursor: help; }
.hl-sum-p { padding: .1em .55em; border-radius: 999px; background: rgba(255,255,255,.05); }
.hl-sum-p b { font-variant-numeric: tabular-nums; }
.hl-sum .pos, .hl-sum-p.pos b, .hl-net.pos { color: #5fd08a; }
.hl-sum .neg, .hl-sum-p.neg b, .hl-net.neg { color: #ef7a6e; }
.hl-sum-big { text-align: left; background: rgba(224,176,76,.1); border: 1px solid rgba(224,176,76,.35); color: var(--gold); border-radius: 8px; padding: .3em .6em; font-size: .78em; cursor: pointer; }
.hl-sum-big:hover { background: rgba(224,176,76,.18); }
.hl-tabs { display: flex; gap: 4px; }
.hl-tabs button { flex: 1; padding: .35em 0; border-radius: 8px; border: 1px solid #2c303a; background: transparent; color: var(--muted); cursor: pointer; font-size: .85em; }
.hl-tabs button:hover { color: var(--text); border-color: #3a3f4a; }
.hl-tabs button.on { color: var(--gold); border-color: var(--gold); background: rgba(224,176,76,.1); }
.hl-flts, .hl-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.hl-flt, .hl-who-chip { padding: .2em .65em; border-radius: 999px; border: 1px solid #2c303a; background: transparent; color: var(--muted); font-size: .76em; cursor: pointer; white-space: nowrap; }
.hl-flt:hover, .hl-who-chip:hover { color: var(--text); border-color: #3a3f4a; }
.hl-flt.on, .hl-who-chip.on { color: var(--gold); border-color: var(--gold); background: rgba(224,176,76,.1); }
.hl-list { max-height: min(46vh, 420px); overflow-y: auto; display: flex; flex-direction: column; gap: 3px; padding-right: 2px; scrollbar-width: thin; }
.hl-row { display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: center; border-radius: 9px; background: rgba(255,255,255,.03); border: 1px solid transparent; }
.hl-row.mine { box-shadow: inset 3px 0 0 #6b7280; }
.hl-row.mine.win { box-shadow: inset 3px 0 0 #5fd08a; }
.hl-row.mine.lose { box-shadow: inset 3px 0 0 #ef7a6e; }
.hl-row:hover { background: rgba(255,255,255,.07); }
.hl-row.sel { border-color: var(--gold); background: rgba(224,176,76,.12); }
.hl-main { display: grid; grid-template-columns: 2.6em minmax(0, 1fr) auto 3.6em; gap: .4em; align-items: center; text-align: left; background: none; border: 0; color: inherit; padding: .35em .5em; cursor: pointer; font-size: .85em; }
.hl-no { color: var(--muted); font-variant-numeric: tabular-nums; }
.hl-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.hl-who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-who small { color: var(--muted); font-size: .8em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-amt { color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; }
.hl-net { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 3.4em; }
.hl-star { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1.1em; padding: 0; }
.hl-star:hover { color: var(--gold); }
.hl-star.on { color: var(--gold); }
.hl-star:not(.on):not(.off) { opacity: .4; filter: grayscale(1); }
.hl-star:not(.on):hover { opacity: .8; }
.hist-save:not(.on) { opacity: .9; }
.hl-star.off { cursor: default; }
.hl-empty { margin: .4em 0; }
.hl-chart { width: 100%; height: auto; display: block; }
.hl-grid { stroke: #2c303a; stroke-dasharray: 3 4; }
.hl-now { stroke: rgba(224,176,76,.55); stroke-width: 1; }
.hl-line { fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linejoin: round; }
.hl-dot { fill: #9aa0ad; stroke: #14161c; stroke-width: 1.2; cursor: pointer; }
.hl-dot.pos { fill: #5fd08a; } .hl-dot.neg { fill: #ef7a6e; }
.hl-dot.cur { stroke: var(--gold); stroke-width: 2; }
.hl-dot:hover { stroke: #fff; }
.hl-axis { display: flex; justify-content: space-between; font-size: .72em; color: var(--muted); font-variant-numeric: tabular-nums; gap: .5em; }
.hist-save { color: var(--gold); border-color: rgba(224,176,76,.5); }
.hist-save.on { background: rgba(224,176,76,.18); }

/* «Итоги стола»: knockouts and who lost most to whom */
.ts-kos, .ts-nems { display: flex; flex-direction: column; gap: 4px; margin-bottom: .6em; }
.ts-ko, .ts-nem { display: flex; align-items: baseline; gap: .45em; flex-wrap: wrap; padding: .35em .6em; border-radius: 8px; background: var(--panel2); text-align: left; font: inherit; color: inherit; border: 1px solid transparent; }
button.ts-ko { cursor: pointer; }
button.ts-ko:hover { border-color: var(--gold); }
.ts-ko-arrow { color: #ef7a6e; font-size: .85em; }
.ts-nem-bb { margin-left: auto; color: #ef7a6e; font-weight: 700; font-variant-numeric: tabular-nums; }

/* profile → История: «Мои раздачи» */
.pf-mines { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; margin-bottom: .8em; }
.pf-mine { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: .55em .7em; border-radius: 10px; background: var(--panel2); border: 1px solid transparent; color: inherit; font: inherit; cursor: pointer; min-width: 0; }
.pf-mine:hover { border-color: var(--gold); }
.pf-mine.off { cursor: default; opacity: .6; }
.pf-mine-l { font-size: .78em; color: var(--muted); }
.pf-mine b { font-size: 1.15em; font-variant-numeric: tabular-nums; }
.pf-mine b.pos { color: #5fd08a; } .pf-mine b.neg { color: #ef7a6e; }
.pf-mine small { font-size: .72em; color: var(--muted); }
.pf-mine-spark { grid-column: 1 / -1; }
.pf-mine-spark svg { width: 100%; height: 54px; margin-top: 4px; }
.pf-spark { fill: none; stroke: var(--gold); stroke-width: 1.8; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.pf-spark.pos { stroke: #5fd08a; } .pf-spark.neg { stroke: #ef7a6e; }
.pf-spark-zero { stroke: #2c303a; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }

/* Рейтинг → Месяц */
.lbm { display: flex; flex-direction: column; gap: 4px; }
.lbm-row { display: grid; grid-template-columns: 2em minmax(0, 1.4fr) minmax(0, 1fr) 110px minmax(0, .7fr) minmax(0, 1fr); gap: .6em; align-items: center; padding: .4em .6em; border-radius: 10px; background: var(--panel2); }
.lbm-row.mine { outline: 1px solid var(--gold); }
.lbm-net { display: flex; flex-direction: column; line-height: 1.2; }
.lbm-net b { font-variant-numeric: tabular-nums; }
.lbm-net .pos, .lbm-net b.pos { color: #5fd08a; } .lbm-net .neg, .lbm-net b.neg { color: #ef7a6e; }
.lbm-net small { font-size: .74em; }
.lbm-fact { font-size: .82em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 700px) {
  .lbm-row { grid-template-columns: 2em minmax(0, 1fr) auto; }
  .lbm-spark, .lbm-fact { grid-column: 2 / -1; }
  .lbm-spark { display: none; }
}

/* hand replay: the review under the step line */
.rp-guide { display: flex; flex-direction: column; gap: 4px; text-align: left; margin: 0 0 .6em; max-height: 190px; overflow-y: auto; }
.rp-guide > b { font-size: .8em; color: var(--muted); }

/* История столов → Поиск раздач */
.hs-form { display: flex; flex-wrap: wrap; gap: .5em .8em; align-items: flex-end; margin: .4em 0 .8em; }
.hs-field { display: flex; flex-direction: column; gap: 2px; font-size: .82em; color: var(--muted); }
.hs-field select { min-width: 9em; }
.hs-check { display: flex; align-items: center; gap: .35em; font-size: .85em; }
.hs-list { display: flex; flex-direction: column; gap: 4px; max-height: min(60vh, 560px); overflow-y: auto; }
.hs-row { display: grid; grid-template-columns: 6.5em auto minmax(0, 1fr) auto 1.2em; gap: .6em; align-items: center; text-align: left; padding: .4em .6em; border-radius: 10px; background: var(--panel2); border: 1px solid transparent; color: inherit; font: inherit; cursor: pointer; }
.hs-row:hover { border-color: var(--gold); }
.hs-when { display: flex; flex-direction: column; font-size: .8em; }
.hs-when small, .hs-what small { color: var(--muted); font-size: .85em; }
.hs-what { display: flex; flex-direction: column; min-width: 0; }
.hs-what small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-allin { align-self: flex-start; font-size: .7em; padding: 0 .4em; border-radius: 4px; background: rgba(239,122,110,.18); color: #ef7a6e; }
@media (max-width: 560px) { .hs-row { grid-template-columns: 1fr auto; } .hs-row .hand-cards { grid-column: 1 / -1; } .hs-row .ht-play { display: none; } }

/* ---------- a played hand, one look everywhere: profile, its sidebar, search, «Рука дня» (handCardsHtml / handNameHtml / handNetHtml) ----------
   --hc is the width of a hole card; the board sits a size smaller after a thin line, a little darker, so the player's own two read first. */
.hand-cards { --hc: 30px; display: inline-flex; align-items: center; gap: calc(var(--hc) * .28); flex-shrink: 0; min-width: 0; }
.hand-cards.hc-xs { --hc: 21px; gap: 5px; }
.hand-cards.hc-m { --hc: 42px; }
.hand-cards .hist-cards, .hand-cards .hist-community { display: flex; gap: max(2px, calc(var(--hc) * .08)); }
.hand-cards .hist-cards .playing-card { width: var(--hc); height: calc(var(--hc) * 1.39); font-size: calc(var(--hc) * .32); }
.hand-cards .hist-community { opacity: 1; padding-left: calc(var(--hc) * .28); border-left: 1px solid rgba(255, 255, 255, .14); }
.hand-cards .hist-community .playing-card { width: calc(var(--hc) * .8); height: calc(var(--hc) * 1.11); font-size: calc(var(--hc) * .29); filter: brightness(.88); }
.hand-cards.hc-xs .hist-community { padding-left: 5px; }
.hc-name { display: inline-block; vertical-align: middle; padding: 0 7px; border-radius: 999px; background: rgba(245, 197, 66, .14); color: #f3d27a; font-weight: 700; font-size: 12px; line-height: 1.6; white-space: nowrap; }
.hc-name.off { background: rgba(255, 255, 255, .06); color: var(--muted); font-weight: 500; }
.hc-net { font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }
.hc-net.pos { color: #4fce72; } .hc-net.neg { color: #e07a7a; }
.hist-amount { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hist-amount > .pf-tag { font-size: 11px; padding: 0 6px; overflow: hidden; text-overflow: ellipsis; }
.hist-meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.hist-meta small { color: var(--muted); }
.pf-moment-foot > span { display: flex; }
.hs-what > span { display: flex; align-items: center; gap: 6px; }
.hod .hand-cards { margin-top: 2px; }

/* ---------- the table history moving to another hand (histFx in main.js): the cards fly off to the middle, the new ones are dealt ---------- */
.table-oval.hist-sweep .playing-card:not(.board-slot) { animation: histSweep .2s ease-in forwards; }
.table-oval.hist-deal .playing-card:not(.board-slot) { animation: histDeal .42s cubic-bezier(.2, .8, .3, 1) backwards; }
.table-oval.hist-deal .hole .playing-card:nth-child(2) { animation-delay: 70ms; }
.table-oval.hist-deal .community .playing-card:nth-child(1) { animation-delay: 160ms; }
.table-oval.hist-deal .community .playing-card:nth-child(2) { animation-delay: 210ms; }
.table-oval.hist-deal .community .playing-card:nth-child(3) { animation-delay: 260ms; }
.table-oval.hist-deal .community .playing-card:nth-child(4) { animation-delay: 310ms; }
.table-oval.hist-deal .community .playing-card:nth-child(5) { animation-delay: 360ms; }
@keyframes histSweep { to { opacity: 0; transform: translateY(-18px) scale(.6) rotate(6deg); } }
@keyframes histDeal { from { opacity: 0; transform: translateY(-28px) scale(.55) rotate(-10deg); } }

/* ---------- «Итоги»: the podium under the cup and the season's confetti (resultsPodiumHtml / celebrateResults) ---------- */
.res-hero { --g1: rgba(245, 197, 66, .30); --g2: rgba(255, 140, 60, .10); position: relative; margin: 0 -8px 4px; padding: 14px 8px 0; border-radius: 16px; overflow: hidden;
  background: radial-gradient(110% 85% at 50% 0%, var(--g1), transparent 70%), radial-gradient(60% 50% at 50% 100%, var(--g2), transparent 70%); }
.res-hero.season-halloween { --g1: rgba(255, 122, 26, .32); --g2: rgba(142, 68, 255, .22); }
.res-hero.season-newyear { --g1: rgba(159, 211, 255, .30); --g2: rgba(245, 197, 66, .14); }
.res-hero.season-feb23 { --g1: rgba(63, 143, 79, .32); --g2: rgba(200, 16, 46, .16); }
.res-hero.season-march8, .res-hero.season-spring { --g1: rgba(255, 143, 199, .30); --g2: rgba(155, 227, 123, .14); }
.res-hero.season-summer { --g1: rgba(255, 210, 63, .32); --g2: rgba(63, 193, 255, .18); }
.res-hero.season-birthday { --g1: rgba(255, 94, 168, .28); --g2: rgba(90, 169, 255, .20); }
.res-rays { position: absolute; left: 50%; top: 38%; width: 560px; height: 560px; margin: -280px 0 0 -280px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 225, 150, .11) 0 7deg, transparent 7deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 15%, transparent 62%); mask: radial-gradient(circle, #000 15%, transparent 62%);
  animation: resRays 40s linear infinite; }
@keyframes resRays { to { transform: rotate(360deg); } }
.res-podium { position: relative; display: grid; grid-template-columns: 1fr 1.25fr 1fr; align-items: end; gap: 8px; max-width: 400px; margin: 0 auto; }
.pd-step { --medal: #f5c542; display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; animation: pdRise .65s cubic-bezier(.2, .8, .3, 1.15) backwards; }
.pd-step.p1 { animation-delay: .1s; } .pd-step.p2 { --medal: #cfd6e2; animation-delay: .35s; } .pd-step.p3 { --medal: #d9935a; animation-delay: .5s; }
.pd-step > b { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-step.p1 > b { font-size: 15px; color: var(--gold); }
.pd-ava-wrap { position: relative; width: 50px; height: 50px; }
.p1 .pd-ava-wrap { width: 66px; height: 66px; }
.pd-ava { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--medal), 0 6px 18px rgba(0, 0, 0, .45); display: grid; place-items: center; background: #1f232b; color: var(--medal); font-weight: 800; font-size: 22px; }
img.pd-ava:not([hidden]) ~ .placeholder { display: none; }
.pd-block { width: 100%; height: 34px; border-radius: 10px 10px 0 0; display: grid; place-items: center; font-weight: 900; font-size: 22px; color: rgba(0, 0, 0, .42);
  background: linear-gradient(180deg, color-mix(in srgb, var(--medal) 100%, #fff 25%), color-mix(in srgb, var(--medal) 70%, #000)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35); }
.p1 .pd-block { height: 62px; font-size: 28px; } .p2 .pd-block { height: 46px; }
.pd-cup { line-height: 0; animation: trophyPop .6s ease-out .1s backwards, cupFloat 3.2s ease-in-out .8s infinite; }
.pd-cup .ic { width: 58px; height: 58px; filter: drop-shadow(0 0 14px rgba(255, 210, 90, .75)); }
@keyframes pdRise { from { opacity: 0; transform: translateY(26px); } }
@keyframes cupFloat { 50% { transform: translateY(-4px); } }
.confetti { position: fixed; inset: 0; z-index: 400; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -28px; width: 8px; height: 13px; border-radius: 2px; font-style: normal; animation: confFall var(--d) cubic-bezier(.3, .55, .5, 1) var(--dl) forwards; }
.confetti i.r { width: 9px; height: 9px; border-radius: 50%; }
.confetti i.e { width: auto; height: auto; font-size: 22px; line-height: 1; }
@keyframes confFall { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 85% { opacity: 1; } 100% { transform: translate(var(--x), 108vh) rotate(var(--r)); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .res-rays, .pd-cup { animation: none; } }

/* ---------- the phone table: the board, the pot and your own two cards read first ----------
   Bigger when the table has room for them (up to six at it); the other plaques stay as small as players asked for (see the phone
   block above). data-n is the number of chairs on the ring. */
@media (max-width: 480px) {
  .table-oval:is([data-n="2"], [data-n="3"], [data-n="4"]) .community .playing-card.big { width: 44px; height: 62px; font-size: 1.05em; }
  .table-oval:is([data-n="5"], [data-n="6"]) .community .playing-card.big { width: 38px; height: 53px; font-size: .92em; }
  .table-oval:is([data-n="2"], [data-n="3"], [data-n="4"], [data-n="5"], [data-n="6"]) .seat[data-is-me="1"] .hole .playing-card.big { width: 38px; height: 53px; font-size: .92em; flex: none; }
  .table-oval:not(.crowd-9):not(.crowd-11) .pot-amount { font-size: .86em; padding: .18em .75em; }
}
.ht-more { display: block; margin: 10px auto 2px; padding: .45em 1.4em; }

.h-ico { display: inline-block; width: 1.3em; height: 1.3em; vertical-align: -.3em; }

.highlight-card .hod + h2 { margin-top: 1em; padding-top: .8em; border-top: 1px solid rgba(255,255,255,.07); }

/* «?» after an Elo built on fewer than 15 tables */
.elo-q { font-size: .75em; font-weight: 800; color: #d6dde6; opacity: .85; margin-left: .15em; vertical-align: super; line-height: 0; cursor: help; }

/* ---- 🤪 «Безумный стол»: the create-form mode picker, the header chip and the wheel at a mode change ---- */
.crazy-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5em .8em; }
.crazy-fields select { width: 100%; box-sizing: border-box; }
.crazy-modes { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .35em; }
.crazy-mode { display: flex; align-items: center; gap: .35em; padding: .25em .4em; border-radius: 9px; cursor: pointer; font-size: .86em;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); }
.crazy-mode:has(input:not(:checked)) { opacity: .45; }
.crazy-mode input { margin: 0; flex: none; }
.crazy-mode-img { width: 26px; height: 26px; object-fit: contain; flex: none; }
.tm-crazy-img { width: 1.35em; height: 1.35em; object-fit: contain; flex: none; }
.crazy-wheel { position: fixed; z-index: 55; pointer-events: none; animation: cwIn .35s ease-out; transition: opacity .45s; }
.crazy-wheel.gone { opacity: 0; }
.cw-shade { position: absolute; inset: -14px; border-radius: 50% / 42%; background: radial-gradient(ellipse at 50% 50%, rgba(10,4,20,.72), rgba(10,4,20,.82)); box-shadow: 0 0 30px 10px rgba(10,4,20,.6); }
.cw-box { position: absolute; }
.cw-disc { position: relative; width: 100%; border-radius: 50%; will-change: transform; transition: opacity .3s;
  background: radial-gradient(circle, rgba(40, 10, 60, .95) 0 30%, rgba(90, 30, 120, .92) 31% 68%, rgba(255, 210, 90, .95) 69% 71%, rgba(60, 15, 80, .95) 72%);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .55), inset 0 0 0 3px rgba(255, 220, 120, .7); }
.cw-slot { position: absolute; left: 50%; top: 50%; width: 22%; height: 22%; margin: -11% 0 0 -11%; display: grid; place-items: center; }
.cw-slot img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.cw-pointer { position: absolute; top: -.6em; left: 50%; transform: translateX(-50%); font-size: 1.7em; color: #ffd45a; text-shadow: 0 2px 4px #000; }
/* the rules card: beside the wheel on a wide table, under it on a narrow one; it comes up when the wheel stops */
.cw-card { position: absolute; padding: 14px 16px; border-radius: 16px; text-align: center; background: rgba(20, 8, 30, .95); border: 1px solid #a67ae8; box-shadow: 0 8px 30px rgba(0, 0, 0, .6);
  color: #d8d2e6; opacity: 0; transform: scale(.92); transition: opacity .35s, transform .35s; }
.crazy-wheel.wide .cw-card { right: 4%; top: 50%; width: 38%; translate: 0 -50%; }
.crazy-wheel.tall .cw-card { left: 7%; right: 7%; bottom: 4%; padding: 8px 10px; }
.cw-card-img { width: 60px; height: 60px; object-fit: contain; margin: 0 auto 4px; display: block; }
.crazy-wheel.tall .cw-card-img { width: 38px; height: 38px; }
.cw-card b { display: block; color: #ffd45a; font-size: 1.5em; line-height: 1.15; margin-bottom: 4px; }
.crazy-wheel.tall .cw-card b { font-size: 1.15em; margin-bottom: 2px; }
.cw-card span { display: block; font-size: .95em; line-height: 1.3; }
.cw-card small { display: block; margin-top: 6px; color: #b9a8e0; }
.crazy-wheel.landed .cw-card { opacity: 1; transform: none; }
@keyframes cwIn { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .crazy-wheel { animation: none; } }
/* a phone upright: the crazy table's chip is its picture and «осталось» only — the name made the header a third row */
@media (max-width: 600px) and (orientation: portrait) { .tm-crazy .tm-mode-name { display: none; } }

/* the pop-up under the mode chip (toggleCrazyInfo) */
.tm-crazy { cursor: pointer; }
.crazy-info { position: fixed; z-index: 70; width: min(250px, calc(100vw - 16px)); padding: 10px 12px; border-radius: 12px; background: #1b1530; color: #eee; border: 1px solid #6a4aa0;
  box-shadow: 0 8px 22px rgba(0,0,0,.6); font-size: 12.5px; line-height: 1.35; }
.crazy-info::before { content: ''; position: absolute; left: var(--ci-arrow, 20px); top: -6px; width: 10px; height: 10px; margin-left: -5px; background: #1b1530; border-left: 1px solid #6a4aa0; border-top: 1px solid #6a4aa0; transform: rotate(45deg); }
.crazy-info .ci-head { display: flex; align-items: center; gap: 8px; }
.crazy-info .ci-head b { color: #ffd45a; font-size: 14px; }
.crazy-info .ci-img { width: 34px; height: 34px; object-fit: contain; }
.crazy-info p { margin: 5px 0 0; color: #d8d2e6; }
.crazy-info p.ci-left { color: #b9a8e0; }
.crazy-info .ci-all { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 8px; }
.crazy-info .ci-mini { width: 22px; height: 22px; object-fit: contain; opacity: .45; }
.crazy-info .ci-mini.on { opacity: 1; filter: drop-shadow(0 0 3px #ffd45a); }
.crazy-info em { display: block; margin-top: 7px; font-style: normal; color: #9aa0aa; font-size: 11px; }
/* «Ананас» (crazy table): the three cards to throw one away from, in the action area */
.discard-bar { display: flex; flex-direction: column; align-items: center; gap: .5em; padding: .3em; }
.discard-bar .rt-text { font-size: .92em; text-align: center; }
.discard-cards { display: flex; gap: .7em; justify-content: center; }
.discard-card { display: flex; flex-direction: column; align-items: center; gap: .3em; padding: .35em .4em .3em; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; cursor: pointer; color: var(--muted); font-size: .72em; transition: transform .12s, border-color .12s, background .12s; }
.discard-card:hover, .discard-card:focus-visible { transform: translateY(-3px); border-color: #ff6a5a; background: rgba(255,90,70,.12); color: #ffb3a8; }
@media (max-width: 480px), (orientation: landscape) and (max-height: 520px) and (max-width: 1100px) {
  .discard-card .playing-card.big { width: 52px; height: 73px; font-size: 1.1em; }
  .discard-cards { gap: .4em; }
}

/* the new-table window: two columns on a wide screen (what and how fast on the left, the special rules on the right) — less scrolling */
.create-cols { display: flex; flex-direction: column; gap: .75em; }
.create-col { display: flex; flex-direction: column; gap: .75em; min-width: 0; }
@media (min-width: 900px) {
  .create-card { width: min(1040px, 96vw); }
  .create-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 1.6em; align-items: start; }
  .create-card .create-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* «Создать стол» stays in view while the list scrolls */
.create-card .create-go { position: sticky; bottom: .5em; z-index: 3; box-shadow: 0 0 0 .5em var(--panel), 0 8px 18px rgba(0, 0, 0, .45); }

.discard-card.new { border-color: rgba(224, 176, 76, .55); color: var(--gold, #e0b04c); }
/* your own two cards hang below the plaque on the phone table; the plaque is never narrower than the pair */
@media (max-width: 480px) {
  .table-oval:is([data-n="2"], [data-n="3"], [data-n="4"], [data-n="5"], [data-n="6"]) .seat[data-is-me="1"] > .seat-card { min-width: 88px; box-sizing: border-box; }
}
.cw-card .cw-plus { margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgba(166, 122, 232, .5); font-size: .85em; }
.cw-card .cw-plus b { display: inline; font-size: 1em; margin: 0; color: #ffd45a; }
.crazy-wheel.tall .cw-card .cw-plus { font-size: .78em; margin-top: 3px; padding-top: 3px; }
.crazy-info .ci-head + p + .ci-head { margin-top: 8px; }
/* on one's own plaque the stains and thrown things lie over the hole cards (as they do over everyone else's) */
.seat[data-is-me="1"] > :is(.throw-hits, .poo-stains) { z-index: 30; }
.crazy-info .ci-tip { display: inline-block; cursor: help; }
.crazy-info .ci-tip:hover .ci-mini { opacity: 1; transform: scale(1.15); }
.crazy-info .ci-hint { min-height: 2.6em; font-size: 12px; color: #9a8cc0; }
.crazy-info .ci-hint.on { color: #ffd45a; }
.crazy-info .ci-list { display: grid; gap: 5px; margin-top: 8px; max-height: 46vh; overflow-y: auto; }
.crazy-info .ci-row { display: flex; gap: 7px; align-items: flex-start; font-size: 12px; line-height: 1.25; color: #d8d2e6; }
.crazy-info .ci-row b { color: #ffd45a; }
.crazy-info .ci-row .ci-mini { flex: none; width: 28px; height: 28px; }
.tm-crazy.tm-many { gap: .7em; }
.tm-crazy .tm-rule { display: inline-flex; align-items: center; gap: .35em; }
.tm-crazy .tm-rule + .tm-rule::before { content: '+'; opacity: .5; margin-right: .35em; }
@media (max-width: 600px) and (orientation: portrait) { .tm-crazy.tm-many { gap: .25em; } .tm-crazy .tm-rule + .tm-rule::before { display: none; } }
/* 🍺 «Угостить пивом»: the offered mug on the target's plaque, the answer buttons, the flying mug */
.beer-offer { position: fixed; z-index: 9100; transform: translate(-50%, -78%); pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: opacity .4s, transform .4s; animation: beerBob 1.2s ease-in-out infinite alternate; }
.beer-offer > img { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .5)); }
.beer-offer.gone { opacity: 0; }
.beer-offer.no { transform: translate(-50%, -60%) rotate(18deg); }
@keyframes beerBob { from { margin-top: 0; } to { margin-top: -5px; } }
.beer-ask { pointer-events: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; max-width: 190px; padding: 6px 8px; border-radius: 12px; background: #1b1530; border: 1px solid #a67ae8; color: #eee; font-size: 12px; text-align: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .6); }
.beer-ask span { flex: 1 0 100%; }
.beer-ask button { border: 0; border-radius: 8px; padding: 4px 10px; font-weight: 700; cursor: pointer; background: #ffcf3f; color: #3a2400; }
.beer-ask button[data-act="beerNo"] { background: #3a3350; color: #ddd; }
.beer-fly { position: fixed; left: 0; top: 0; z-index: 9200; width: 52px; height: 52px; object-fit: contain; pointer-events: none; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .4)); }
/* phone held sideways: the rules card is smaller so it doesn't swallow the felt (three rules at once are long) */
@media (max-height: 480px) { .crazy-wheel.wide .cw-card { font-size: 11px; padding: 8px 10px; width: 44%; } .crazy-wheel.wide .cw-card-img { width: 38px; height: 38px; } .crazy-wheel.wide .cw-card b { font-size: 1.25em; } }

/* create form, crazy table: the left column's summary and ready-made sets */
.crazy-side { margin-top: 14px; padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); }
.crazy-side .create-sec { margin: 0 0 8px; }
.crazy-sum { margin: 0 0 12px; padding-left: 1.1em; font-size: 14px; line-height: 1.45; opacity: .92; }
.crazy-sum li { margin: 4px 0; }
.crazy-presets { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crazy-presets-t { width: 100%; font-size: 12px; opacity: .65; text-transform: uppercase; letter-spacing: .06em; }
.crazy-preset { cursor: pointer; font: 700 13px/1 system-ui, sans-serif; padding: 9px 12px; border-radius: 999px; color: inherit; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.16); }
.crazy-preset:hover { background: rgba(255,212,90,.18); border-color: #ffd45a; }
.beer-sender > img { transform: scaleX(-1); }

/* several rules whose names are long: pictures only, so the top bar doesn't swell (the full names are the tooltip and the pop-up) */
.tm-crazy.tm-many.tm-short .tm-mode-name { display: none; }
.tm-crazy.tm-many.tm-short { gap: .35em; }
.tm-crazy.tm-many { max-width: 52vw; overflow: hidden; }

/* the bounty target's medallion: the face between the Entity's twitching claws (replaces the crosshair above the plaque) */
.seat .wanted-mark { top: -54px; left: calc(50% - 50px); width: 100px; height: 60px; animation: none; filter: drop-shadow(0 2px 5px rgba(0,0,0,.65)); }
.wanted-medal { position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%; overflow: hidden;
  border: 2px solid #f1d9dc; box-shadow: 0 0 0 2px #240810, 0 0 14px #9c1c34; background: #3a0f18; }
.wanted-ava-wrap { display: block; position: relative; width: 100%; height: 100%; }
.wanted-ava { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; background: #5a1424; color: #fff; font-weight: 800; font-size: 20px; }
.wanted-ava-wrap img.wanted-ava { position: absolute; inset: 0; }
.seat .wanted-mark img.wanted-claw { position: absolute; top: 0; height: 60px; width: auto; pointer-events: none; filter: hue-rotate(68deg) saturate(1.25) brightness(.82); } /* the purple art, turned burgundy */
.wanted-claw.l { left: 0; animation: clawTwitchL 2.6s infinite; }
.wanted-claw.r { right: 0; animation: clawTwitchR 2.6s infinite -1.3s; } /* the other half of the cycle: the legs take turns */
/* mostly still, then quick jerks inwards and back, like legs twitching */
@keyframes clawTwitchL { 0%, 46%, 62%, 100% { transform: none; } 50% { transform: translateX(5px) rotate(6deg); } 54% { transform: translateX(1px); } 58% { transform: translateX(4px) rotate(4deg); } 80% { transform: translateX(2px) rotate(2deg); } 84% { transform: none; } }
@keyframes clawTwitchR { 0%, 46%, 62%, 100% { transform: none; } 50% { transform: translateX(-5px) rotate(-6deg); } 54% { transform: translateX(-1px); } 58% { transform: translateX(-4px) rotate(-4deg); } 80% { transform: translateX(-2px) rotate(-2deg); } 84% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .wanted-claw { animation: none; } }

/* phone: the outs as a chip in the plaque; a tap opens the cards */
.seat .stack-line:has(.outs-chip) { flex-wrap: wrap; justify-content: center; }
.outs-chip { display: block; flex-basis: auto; margin: 1px auto 0; padding: 0 6px; border-radius: 8px; background: rgba(0,0,0,.55); color: #e07a7a; font-size: 10px; font-weight: 800; white-space: nowrap; pointer-events: auto; }
.outs-chip.none { color: #9aa; font-weight: 600; }
.outs-pop { position: fixed; left: 50%; top: 38%; transform: translateX(-50%); z-index: 9500; max-width: 92vw; padding: 8px 10px; border-radius: 12px; background: rgba(8,8,8,.92); border: 1px solid rgba(212,176,106,.4); text-align: center; }
.outs-pop .log-cards { display: flex !important; flex-direction: row !important; flex-wrap: wrap; justify-content: center; gap: 3px; margin-top: 4px; }
.outs-pop .playing-card { width: 30px; height: 42px; font-size: .75em; }
/* a crazy-table mode whose picture isn't drawn yet: an emoji in the picture's box */
.mode-emoji { display: inline-grid; place-items: center; line-height: 1; font-style: normal; }
.crazy-mode-img.mode-emoji { font-size: 20px; }
.cw-card-img.mode-emoji { font-size: 46px; }
.crazy-wheel.tall .cw-card-img.mode-emoji { font-size: 30px; }
.cw-slot { container-type: size; }
.cw-slot .mode-emoji { width: 100%; height: 100%; font-size: 62cqh; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.crazy-info .ci-mini.mode-emoji { font-size: 22px; }
.crazy-info .ci-head .mode-emoji { font-size: 22px; width: 28px; height: 28px; }
.tm-crazy .mode-emoji { font-size: 16px; }

/* «🎯 +400 за вылет / цель ещё 7:32» in the table header (huntChipHtml): two short lines, so the header stays one row high */
.tm-chip.tm-hunt { display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; line-height: 1.1; padding-top: 2px; padding-bottom: 2px; color: #ffb4a0; border-color: #ff7a5a55; white-space: nowrap; }
.tm-chip.tm-hunt .th-main { display: inline-flex; align-items: center; gap: .3em; }
.tm-chip.tm-hunt .tm-huntleft { color: var(--muted); font-size: .72em; font-weight: 600; }

/* 🔪 the thrown knife in the fatality editor («рука» / «лёжа» of a knife thrower) */
.fe-knife-ghost { position: absolute; pointer-events: auto; cursor: grab; touch-action: none; outline: 1px dashed rgba(255, 255, 255, .55); outline-offset: 2px; }
.fe-knife-ghost > img { width: 100%; height: 100%; display: block; opacity: .45; pointer-events: none; user-select: none; }
.fe-knife-ghost.sel { outline: 2px solid #ffd23c; }
.fe-knife-ghost .fe-kn-rot, .fe-knife-ghost .fe-kn-size { position: absolute; pointer-events: auto; width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 2px #0008; }
.fe-knife-ghost .fe-kn-rot { right: -9px; top: 50%; margin-top: -8px; background: #ffd23c; cursor: crosshair; }
.fe-knife-ghost .fe-kn-size { left: -9px; bottom: -9px; background: #7fe3ff; cursor: nwse-resize; }

/* the hand of the day / week on a phone: the avatar goes above the cards, the cards shrink to the width (they ran past the card's edge) */
@media (max-width: 560px) {
  .hod { grid-template-columns: minmax(0, 1fr); gap: .6em; }
  .hod-who { grid-auto-flow: column; justify-content: start; justify-items: start; align-items: center; min-width: 0; text-align: left; gap: .6em; }
  .hod-main { min-width: 0; }
  .hod .hand-cards { --hc: clamp(20px, 7.2vw, 30px); max-width: 100%; }
  .hod-watch { grid-column: auto; }
}
/* the replay window (history, hand of the day) draws the chips the player picked in «Вид стола» */
.rp-v2 { display: inline-flex; align-items: center; gap: .35em; }
.rp-v2 .piles2 { --d: 18px; gap: 3px; }
.rp-pot .rp-v2 .piles2 { --d: 22px; }
.rp-v2 .chip-amt { font-size: .75em; padding: .1em .4em; }

/* the create form's «Докупки»: one row for both kinds of table, the rule in plain words under it */
.rebuy-field { display: grid; gap: .3em; margin: .4em 0; }
.rebuy-row { display: flex; align-items: center; flex-wrap: wrap; gap: .5em .8em; }
.rebuy-row .seg { flex: 0 1 12em; }
.rebuy-field .hint { margin: 0; font-size: .8em; }

/* ---- Player plaques «Новые» (poker.seat = capsule, «Вид и настройки» → Стол). The avatar stands on top, the two cards fan out behind it, the name
   and the stack sit in a two-tier nameplate under it. Only for a seat in play (before the start the old plaque stays); a webcam is the avatar (cam.js placeInCapsule). :where() keeps the specificity low so the fire/smoke/offline rings and the folded fade still win. ---- */
@media (min-width: 481px) and (not ((orientation: landscape) and (max-height: 520px) and (max-width: 1100px))) { /* a phone keeps the old plaque: the table is too small for a 128px nameplate */
html[data-seat="capsule"] :where(.seat:not(.pre-game)) > .seat-card {
  display: flex; flex-direction: column; align-items: center;
  background: none; border: 0; box-shadow: none; padding: 0; min-height: 0 !important; border-radius: 0;
}
html[data-seat="capsule"] .seat:not(.pre-game) > .seat-card > .seat-who { display: contents; }
html[data-seat="capsule"] .seat:not(.pre-game) > .seat-card > * { order: 5; }
html[data-seat="capsule"] .seat:not(.pre-game) > .seat-card > .hole { order: 1; margin: 0 0 -22px; gap: .6em; position: relative; z-index: 1; }
html[data-seat="capsule"] .seat:not(.pre-game) .hole .playing-card:nth-child(1) { rotate: -7deg; transform-origin: 50% 100%; }
html[data-seat="capsule"] .seat:not(.pre-game) .hole .playing-card:nth-child(2) { rotate: 7deg; transform-origin: 50% 100%; }
html[data-seat="capsule"] .seat:not(.pre-game) .seat-face { order: 2; position: relative; z-index: 3; width: 56px; height: 56px; }
html[data-seat="capsule"] .seat:not(.pre-game) .seat-face :is(.seat-avatar-wrap, .seat-avatar) { width: 56px; height: 56px; }
html[data-seat="capsule"] .seat:not(.pre-game) .seat-avatar {
  border: 2px solid #d9b46a; box-shadow: 0 0 0 2px rgba(12, 10, 8, .85), 0 4px 12px rgba(0, 0, 0, .6);
}
html[data-seat="capsule"] .seat.to-act:not(.pre-game) .seat-avatar {
  border-color: #6df0a0; box-shadow: 0 0 0 2px rgba(12, 10, 8, .85), 0 0 14px 4px rgba(109, 240, 160, .75);
}
html[data-seat="capsule"] .seat:not(.pre-game) .name {
  order: 3; position: relative; z-index: 2; width: 128px; margin-top: -9px; box-sizing: border-box;
  flex-direction: row; justify-content: center; gap: .3em; padding: .45em .55em .1em;
  background: linear-gradient(180deg, #2b231a, #17120d);
  border: 1px solid rgba(217, 180, 106, .5); border-bottom: 0; border-radius: 12px 12px 0 0;
}
html[data-seat="capsule"] .seat:not(.pre-game) .name-marks { min-height: 0; flex-wrap: nowrap; flex: none; max-width: 50%; }
html[data-seat="capsule"] .seat:not(.pre-game) .name-marks:empty { display: none; }
html[data-seat="capsule"] .seat:not(.pre-game) .stack-line {
  order: 4; width: 128px; margin: 0; box-sizing: border-box; padding: .05em .5em .18em;
  background: linear-gradient(180deg, #3a2d12, #21190a);
  border: 1px solid rgba(217, 180, 106, .5); border-top-color: rgba(217, 180, 106, .18); border-radius: 0 0 12px 12px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, .45);
}
html[data-seat="capsule"] .seat:not(.pre-game) .stack { font-weight: 700; letter-spacing: .02em; }
html[data-seat="capsule"] .seat.to-act:not(.pre-game) .name { border-color: #6df0a0; }
html[data-seat="capsule"] .seat.to-act:not(.pre-game) .stack-line { border-color: #6df0a0; border-top-color: rgba(109, 240, 160, .25); }
html[data-seat="capsule"] .seat:not(.pre-game) .act-clock-bar { left: 4px; right: 4px; bottom: -7px; }
  /* «Вебки на месте карт» squares the hole and scales its cards to the camera's square (--hk, measured from the hole itself): with the cards
     fanned behind the avatar that measuring fed on its own result and the cards kept growing. Here the cards keep their own size. */
  html[data-seat="capsule"] .seat:not(.pre-game) > .seat-card > .hole { aspect-ratio: auto; }
  html[data-seat="capsule"] .seat:not(.pre-game) > .seat-card > .hole[style*="--hk"] { gap: .6em; }
  html[data-seat="capsule"] .seat:not(.pre-game) > .seat-card > .hole[style*="--hk"] .playing-card { width: 50px; height: 70px; font-size: 1.15em; border-radius: 6px; flex: none; }
  /* a webcam stands where the avatar is, a little bigger; the face box only keeps its room */
  html[data-seat="capsule"] .seat.has-cam:not(.pre-game) > .seat-card .seat-face { display: block; width: 68px; height: 68px; }
  html[data-seat="capsule"] .seat:not(.pre-game) > .seat-card > .seat-cam.in-capsule { z-index: 3; border: 2px solid #d9b46a; border-radius: 12px; box-shadow: 0 0 0 2px rgba(12, 10, 8, .85), 0 4px 12px rgba(0, 0, 0, .6); }
  html[data-seat="capsule"] .seat.to-act:not(.pre-game) > .seat-card > .seat-cam.in-capsule { border-color: #6df0a0; box-shadow: 0 0 0 2px rgba(12, 10, 8, .85), 0 0 14px 4px rgba(109, 240, 160, .75); }
  html[data-seat="capsule"] .seat.folded:not(.pre-game) > .seat-card:has(> .seat-cam.in-cards) { background: none; border-color: transparent; box-shadow: none; }
  html[data-seat="capsule"] .seat:not(.pre-game) > .seat-card:has(> .seat-cam.in-cards) > .hole:has(> .playing-card:not(.back)) { z-index: 1; } /* open cards stay behind the camera, as behind an avatar */
  /* the pile of chips beside the plaque is not shown: the number in the nameplate is the stack */
  html[data-seat="capsule"] .seat:not(.pre-game) > .seat-bankroll { display: none; }
  /* D / SB / BB stand left of the nameplate instead of on the cards' corner */
  html[data-seat="capsule"] .seat:not(.pre-game) > :is(.dealer-btn, .blind-btn) { top: auto; bottom: 10px; left: calc(50% - 82px + var(--bx, 0px)); }
}
/* the picker's little pictures */
.spv { display: inline-grid; justify-items: center; width: 74px; height: 70px; align-content: center; }
.spv i { display: block; }
.spv-old { padding: 6px; border: 1px solid rgba(212, 176, 106, .35); border-radius: 9px; background: #17120d; width: 62px; height: 54px; box-sizing: border-box; }
.spv-old .a { width: 16px; height: 16px; border-radius: 50%; background: #b99a62; margin: 0 0 3px; }
.spv-old .n { width: 38px; height: 5px; border-radius: 3px; background: #d9d2c6; margin-bottom: 3px; }
.spv-old .s { width: 24px; height: 4px; border-radius: 3px; background: #d9b46a; }
.spv-new .c { display: flex; gap: 3px; margin-bottom: -9px; }
.spv-new .c b { display: block; width: 17px; height: 23px; border-radius: 3px; background: #f3efe6; box-shadow: 0 1px 3px #0008; }
.spv-new .c b:first-child { rotate: -8deg; } .spv-new .c b:last-child { rotate: 8deg; }
.spv-new .a { width: 24px; height: 24px; border-radius: 50%; background: #b99a62; border: 2px solid #d9b46a; position: relative; z-index: 1; margin-bottom: -3px; }
.spv-new .n { width: 50px; height: 8px; border-radius: 6px 6px 0 0; background: #2b231a; border: 1px solid #d9b46a88; border-bottom: 0; position: relative; }
.spv-new .s { width: 50px; height: 7px; border-radius: 0 0 6px 6px; background: #3a2d12; border: 1px solid #d9b46a88; border-top: 0; }

/* the create form's «Глубина»: quick picks under the blind and stack fields */
.depth-row { display: flex; flex-wrap: wrap; gap: .35em; margin: .1em 0 .2em; }
.depth-btn.active { border-color: var(--gold); color: var(--gold); }
