/* ── Type: Commissioner (SIL OFL, fonts/Commissioner-OFL.txt), the same family
   as the club's cash desk. Text is set plain; numbers and headings use its
   flared cut (the FLAR axis), like the figures engraved on chips. ── */
@font-face { font-family: 'Commissioner'; src: url('../fonts/commissioner-cyrillic.woff2') format('woff2'); font-weight: 100 900; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Commissioner'; src: url('../fonts/commissioner-latin-ext.woff2') format('woff2'); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+1E00-1E9F; }
@font-face { font-family: 'Commissioner'; src: url('../fonts/commissioner-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215; }

/* ── Colour. The screen is the felt. What lies on it is paper: lists, windows,
   cards. Amber is the one signal: the main button and whose turn it is. ── */
:root {
  --felt: #0C3F2E;
  --felt-deep: #072B1F;
  --paper: #F2F1EA;
  --white: #FFFFFF;
  --ink: #10231B;
  --ink-soft: #55655D;
  --amber: #FFBC57;
  --amber-press: #F2A93A;
  --red: #C9342C;
  --red-light: #F3968C;
  --green: #1B7A55;
  --jade: #93DFBD;

  /* What sits on the current surface. Felt by default, see .paper below. */
  --surface: var(--felt);
  --fg: var(--paper);
  --fg-soft: rgba(242, 241, 234, .7);
  --line: rgba(242, 241, 234, .14);
  --line-strong: rgba(242, 241, 234, .36);
  --well: rgba(0, 0, 0, .24);
  --focus: var(--amber);
  --danger: var(--red-light);

  --pad: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
  --top-h: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --r: 10px;
  --r-lg: 14px;
  color-scheme: dark;
}
.paper, .modal {
  --surface: var(--paper);
  --fg: var(--ink);
  --fg-soft: var(--ink-soft);
  --line: rgba(16, 35, 27, .12);
  --line-strong: rgba(16, 35, 27, .32);
  --well: var(--white);
  --focus: var(--ink);
  --danger: var(--red);
  background: var(--paper);
  color: var(--ink);
  color-scheme: light;
}
@media (min-width: 700px) { :root { --pad: max(24px, env(safe-area-inset-left), env(safe-area-inset-right)); } }

* { box-sizing: border-box; font-variation-settings: 'FLAR' var(--flar, 0), 'VOLM' var(--volm, 0); }
html, body { margin: 0; min-height: 100%; }
html { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
body {
  background: var(--felt);
  color: var(--fg);
  font: 400 16px/1.4 'Commissioner', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-appearance: none; appearance: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .num { --flar: 100; }
.num { font-variant-numeric: tabular-nums lining-nums; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ico { flex: none; display: block; }
/* The support chat lives in frames with a light page inside. Our page is dark,
   and a frame whose colour scheme differs from its host gets a solid white
   backdrop, the white square behind the round button. Same scheme, no backdrop. */
#smartsupp-widget-container, #smartsupp-widget-container iframe, #chat-application-iframe { color-scheme: light; }
/* Measures the phone's bottom inset for the support chat button. */
.safe-probe { position: fixed; bottom: 0; left: 0; height: 0; padding-bottom: env(safe-area-inset-bottom, 0px); visibility: hidden; pointer-events: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.boot { min-height: 100dvh; }
.fatal, .noscript { padding: 40px var(--pad); text-align: center; color: var(--red-light); }
.wrap { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: var(--pad); }
.lead { margin: 0 0 16px; color: var(--fg-soft); }
.hint { font-size: 13px; line-height: 1.4; color: var(--fg-soft); }

/* ── Buttons. Corners like a card's; only chips are round. ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: var(--r);
  border: 1.5px solid transparent; background: none; color: var(--fg);
  font-size: 16px; font-weight: 600; line-height: 1.1; white-space: nowrap; cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:active { background: var(--amber-press); }
.btn-quiet { border-color: var(--line-strong); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger-quiet { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn-small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-big { min-height: 52px; font-size: 17px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.busy { opacity: .7; cursor: progress; }
.link { background: none; border: 0; padding: 0; color: inherit; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; cursor: pointer; }
.icon-btn { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--r); background: none; color: var(--fg-soft); cursor: pointer; }
@media (hover: hover) {
  .btn-primary:hover { background: var(--amber-press); }
  .btn-quiet:hover { border-color: var(--fg); }
  .icon-btn:hover { color: var(--fg); }
}

/* ── Forms. 16px in every field: iPhones zoom the page on anything smaller. ── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .field > .label { font-size: 14px; font-weight: 600; }
input:not([type=range]), select {
  width: 100%; height: 48px; padding: 0 14px;
  border-radius: var(--r); border: 1.5px solid var(--line-strong); background: var(--well); color: var(--fg);
  font-size: 16px;
}
input:not([type=range]):focus, select:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); }
input::placeholder { color: var(--fg-soft); opacity: .75; }
select {
  -webkit-appearance: none; appearance: none; padding-right: 40px; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5L7 7l5.5-5.5' fill='none' stroke='%2310231B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
input[type=range] { width: 100%; height: 28px; margin: 0; accent-color: var(--focus); }
.code-input { --flar: 100; letter-spacing: .12em; font-weight: 600; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.form-error { margin: 0 0 12px; color: var(--danger); font-size: 14px; font-weight: 600; }
.form-error:empty { display: none; }

.segmented { display: flex; gap: 2px; padding: 3px; border-radius: var(--r); background: color-mix(in srgb, var(--fg) 9%, transparent); }
.segmented button {
  flex: 1 1 0; min-width: 0; min-height: 38px; padding: 0 6px; border: 0; border-radius: 8px; background: none;
  color: var(--fg-soft); font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.segmented button.on { background: var(--fg); color: var(--surface); }

/* ── Cards ── */
.card {
  --cw: 52px;
  position: relative; flex: none;
  width: var(--cw); height: calc(var(--cw) * 1.4);
  border-radius: calc(var(--cw) * .1);
  background: var(--white); color: var(--ink);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .28), 0 4px 10px -4px rgba(0, 0, 0, .55);
  user-select: none;
}
.card-sm { --cw: 34px; }
.card-md { --cw: 52px; }
.card-lg { --cw: 118px; }
.card.red { color: var(--red); }
.card .idx { position: absolute; left: 8%; top: 5%; display: flex; flex-direction: column; align-items: center; width: calc(var(--cw) * .36); }
.card .idx b { --flar: 100; --volm: 100; font-size: calc(var(--cw) * .36); font-weight: 700; line-height: 1; letter-spacing: -.06em; }
.card .idx .suit { width: calc(var(--cw) * .26); height: calc(var(--cw) * .26); margin-top: 2%; }
.card .pip { position: absolute; right: 9%; bottom: 7%; }
.card .pip .suit { display: block; width: calc(var(--cw) * .5); height: calc(var(--cw) * .5); }
.card.face-down {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .2) 0 1.5px, transparent 1.5px 6px),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .2) 0 1.5px, transparent 1.5px 6px),
    #A42B25;
  box-shadow: inset 0 0 0 calc(var(--cw) * .07) var(--white), 0 1px 0 rgba(0, 0, 0, .28), 0 4px 10px -4px rgba(0, 0, 0, .55);
}
.card.dim { filter: brightness(.55) saturate(.6); }
.card.deal { animation: deal .3s cubic-bezier(.2, .8, .3, 1) both; }
.board .card.deal:nth-child(2) { animation-delay: .06s; }
.board .card.deal:nth-child(3) { animation-delay: .12s; }
@keyframes deal { from { opacity: 0; transform: translateY(-14px) rotate(-4deg); } }
.ct { --flar: 100; display: inline-flex; align-items: center; font-weight: 700; white-space: nowrap; }
.ct .suit { width: .85em; height: .85em; margin-left: 1px; }
.ct.red { color: var(--red); }

/* ── Header: who you are on the left, the balance on the right ── */
.top { position: sticky; top: 0; z-index: 20; padding-top: var(--safe-top); background: var(--felt-deep); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--top-h); }
.top-left, .top-right { display: flex; align-items: center; min-width: 0; }
.top-left { flex: 1 1 auto; gap: 4px; }
.top-right { flex: none; gap: 20px; }

.me-btn { display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; height: 44px; padding: 0; border: 0; background: none; color: var(--fg); cursor: pointer; }
.me-name { min-width: 0; font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-btn .ico { color: var(--fg-soft); }

.wallet { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0; border: 0; background: none; color: var(--fg); cursor: pointer; }
.bal-amt { font-size: 18px; font-weight: 650; white-space: nowrap; }
.wallet-plus { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r); background: var(--amber); color: var(--ink); }
.wallet:active .wallet-plus { background: var(--amber-press); }

.conn:empty { display: none; }
.conn { position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); padding: 6px 12px; border-radius: 8px; background: var(--red); color: var(--white); font-size: 14px; font-weight: 600; white-space: nowrap; }

.back-btn { position: relative; flex: none; display: flex; align-items: center; border: 0; background: none; cursor: pointer; }


/* ── Sign-in: a sheet of paper on the felt, two cards tucked under its edge ── */
.auth { min-height: 100dvh; display: flex; flex-direction: column; padding: calc(var(--safe-top) + 8px) var(--pad) 0; }
.auth-top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.auth-brand { --flar: 100; font-size: 18px; font-weight: 650; }
.lang-switch { display: flex; gap: 2px; margin-right: -8px; }
.lang-switch button { min-width: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--fg-soft); font-size: 14px; font-weight: 600; cursor: pointer; }
.lang-switch button.on { color: var(--fg); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.auth-stack { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; width: min(420px, 100% + 2 * var(--pad)); margin-inline: calc(-1 * var(--pad)); align-self: center; }
.auth-hand { position: relative; flex: none; height: clamp(72px, 17dvh, 132px); }
.auth-card { position: absolute; bottom: -34px; left: 50%; }
.auth-card .card { --cw: clamp(88px, 27vw, 112px); }
.auth-card.c1 { transform: translateX(-88%) rotate(-9deg); }
.auth-card.c2 { transform: translateX(-12%) rotate(7deg); }
.auth-sheet { position: relative; z-index: 1; flex: none; padding: 24px var(--pad) calc(28px + var(--safe-bottom)); border-radius: 18px 18px 0 0; box-shadow: 0 -8px 30px -12px rgba(0, 0, 0, .6); }
.auth-h { margin-bottom: 18px; font-size: 30px; font-weight: 650; line-height: 1.1; letter-spacing: -.01em; }
.auth-tabs:not(:empty) { margin-bottom: 18px; }
.switch { margin: 16px 0 0; text-align: center; color: var(--fg-soft); font-size: 15px; }
.switch .link { color: var(--fg); }
.or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--fg-soft); font-size: 14px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line-strong); }
@media (min-width: 700px) {
  .auth { padding-bottom: 48px; }
  .auth-stack { justify-content: center; width: 420px; margin-inline: auto; }
  .auth-hand { height: 120px; }
  .auth-card .card { --cw: 112px; }
  .auth-sheet { padding: 32px 32px 32px; border-radius: 18px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7); }
}

/* ── Lobby ── */
.lobby-bar { position: sticky; top: calc(var(--top-h) + var(--safe-top)); z-index: 15; background: var(--felt-deep); }
.lobby-bar-in { display: flex; align-items: center; gap: 16px; padding-bottom: 12px; }
.filters { flex: 1; display: flex; align-items: center; gap: 16px; min-width: 0; }
.filters .segmented { flex: 1; }
.sizes { display: none; gap: 6px; }
.size { min-height: 44px; padding: 0 12px; border: 1.5px solid var(--line-strong); border-radius: var(--r); background: none; color: var(--fg-soft); font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.size.on { border-color: var(--fg); background: var(--fg); color: var(--surface); }
.lobby-actions { display: none; flex: none; gap: 8px; }

.lobby { padding-top: 16px; padding-bottom: calc(96px + var(--safe-bottom)); }
.lobby-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.tgroup + .tgroup { margin-top: 24px; }
.tgroup-title { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--fg-soft); }

/* The list is one sheet of paper; rows share one grid, so every column lines up. */
.tlist { list-style: none; margin: 0; padding: 0; overflow: hidden; border-radius: var(--r-lg); box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 14px 26px -18px rgba(0, 0, 0, .7); }
.tlist > li + li { border-top: 1px solid var(--line); }
.trow {
  display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; column-gap: 12px;
  width: 100%; min-height: 66px; padding: 10px 16px;
  border: 0; background: none; color: inherit; text-align: left; cursor: pointer;
}
.trow > * { pointer-events: none; }   /* the tap always lands on the row itself */
.trow:active, .trow.sel { background: rgba(16, 35, 27, .06); }
.trow:focus-visible { outline-offset: -3px; }
.t-stakes { font-size: 15px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; }
.t-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.t-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.t-top .ico { color: var(--fg-soft); }
.t-name { min-width: 0; font-size: 16px; font-weight: 600; line-height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-sub { font-size: 13px; line-height: 18px; color: var(--fg-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow.here .t-sub { color: var(--green); font-weight: 600; }
.t-status { display: none; font-size: 14px; color: var(--fg-soft); white-space: nowrap; }
.t-count { display: inline-flex; align-items: center; justify-content: flex-end; gap: 7px; min-width: 40px; font-size: 16px; font-weight: 600; white-space: nowrap; }
.t-count.live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
@media (hover: hover) { .trow:hover { background: rgba(16, 35, 27, .04); } }

.skeleton > li { height: 66px; }
.skeleton > li span { display: block; height: 100%; background: linear-gradient(90deg, transparent 20%, rgba(16, 35, 27, .06) 50%, transparent 80%) 0 0 / 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { padding: 40px 0; text-align: center; }
.empty p { margin: 0 0 16px; color: var(--fg-soft); }

.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; display: flex; gap: 10px; padding: 12px var(--pad) calc(12px + var(--safe-bottom)); background: var(--felt-deep); }
.bottom-bar .btn { flex: 1 1 0; min-width: 0; min-height: 50px; padding: 0 8px; }

.preview { display: none; padding: 20px; border-radius: var(--r-lg); box-shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 14px 26px -18px rgba(0, 0, 0, .7); }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -8px -10px 0 0; }
.preview-title { min-width: 0; font-size: 22px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-code { margin: 0 0 16px; color: var(--fg-soft); }
.preview-code strong { color: var(--fg); letter-spacing: .08em; }
.preview .hint { margin-top: 12px; }
.mini { position: relative; aspect-ratio: 1.45; margin: 14px 0 18px; }
.mini-felt { position: absolute; inset: 16% 11%; border-radius: 999px; background: var(--felt); }
.mini-seat { position: absolute; transform: translate(-50%, -50%); min-width: 58px; max-width: 86px; padding: 3px 8px 4px; border-radius: 8px; background: var(--ink); color: var(--paper); font-size: 12px; line-height: 1.25; text-align: center; }
.mini-seat b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-seat .num { color: var(--amber); }
.mini-seat:not(.taken) { min-width: 0; width: 14px; height: 14px; padding: 0; border-radius: 50%; border: 1.5px dashed var(--line-strong); background: var(--paper); }

@media (min-width: 700px) {
  .filters .segmented { flex: none; width: 340px; }
  .sizes { display: flex; }
  .trow { grid-template-columns: 96px minmax(0, 1fr) 130px 56px; padding-inline: 20px; }
  .t-status { display: block; }
}
@media (min-width: 960px) {
  .lobby-actions { display: flex; }
  .bottom-bar { display: none; }
  .lobby { padding-top: 20px; padding-bottom: 48px; }
  /* The preview takes its column only while a table is chosen. */
  .lobby-grid.has-preview { grid-template-columns: minmax(0, 1fr) 340px; }
  .has-preview > .preview { display: block; position: sticky; top: calc(var(--top-h) + var(--safe-top) + 78px); }
}

/* ── Game table ──
   The table of the PokerTH web client (public/pokerth-client.html, AGPL-3.0):
   its felt, deck, pucks and button artwork, its seat boxes, status strip and
   action bar, with the same class names. Sizes and colours are the ones its
   default style computes; the seat geometry comes from js/pokerth-layout.js.
   It is set in Inter, as the original is. */
@font-face { font-family: 'Inter'; src: url('../fonts/inter-qml-cyrillic.woff2') format('woff2'); font-weight: 100 900; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-qml-latin-ext.woff2') format('woff2'); font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-qml-latin.woff2') format('woff2'); font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+2215; }

.top-table, .pth { --flar: 0; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.top-table *, .pth * { --flar: 0; }

/* Header: leave on the left, the table's name in the middle, the balance on the right. */
.top-table { background: rgba(20, 25, 33, .96); border-bottom: 1px solid rgba(160, 172, 196, .16); }
.top-table .top-in { position: relative; height: 39px; gap: 4px; padding-inline: max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-right)); }
.top-table .back-btn { justify-content: center; width: 34px; min-width: 34px; height: 30px; margin: 0; padding: 0; border-radius: 2px; color: #eff1f5; }
.top-table .back-btn::before { content: ''; position: absolute; left: 0; top: 0; width: 48px; height: 39px; }
.header-brand { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; gap: 5px; max-width: calc(100% - 188px); color: #eff1f5; font-size: 12.5px; letter-spacing: .6px; white-space: nowrap; }
.g-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.g-lock { flex: none; display: flex; color: #e3c800; }
.top-table .top-right { gap: 12px; }
.top-table .me-btn { height: 30px; }
.top-table .me-name { font-size: 13px; font-weight: 600; }
.top-table .wallet { height: 30px; gap: 7px; }
.top-table .bal-amt { color: #e3c800; font-size: 13px; font-weight: 700; }
.top-table .wallet-plus { width: 26px; height: 26px; border-radius: 5px; border: 1px solid #4caf50; background: #1b5e20; color: #fff; }

.pth {
  position: fixed; inset: calc(40px + var(--safe-top)) 0 0 0; display: flex; flex-direction: column; overflow: hidden;
  color: #a0acc4;
  background: linear-gradient(rgba(0, 0, 0, .14), rgba(0, 0, 0, .14)), url('../table/felt.webp') center bottom / cover no-repeat #1b4d24;
}

/* Status strip. */
#pot-strip { flex: none; position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 40px; padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); background: rgba(0, 0, 0, .78); overflow: hidden; }
.gsb-col { display: flex; flex-direction: column; justify-content: center; white-space: nowrap; }
.gsb-right { align-items: flex-end; text-align: right; }
.gsb-row { display: flex; align-items: baseline; gap: 5px; line-height: 1.3; }
.gsb-lbl { color: #9e9e9e; font-size: 13px; }
.gsb-left .gsb-row + .gsb-row .gsb-lbl, .gsb-gh .gsb-lbl { font-size: 11px; }
.gsb-total { color: #99d500; font-size: 13px; font-weight: 700; }
.gsb-bets { color: #7aa800; font-size: 11px; font-weight: 600; }
.gsb-mid { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 6px; }
.blinds-next { display: flex; align-items: center; height: 18px; padding: 0 8px; border-radius: 999px; border: 1px solid #e3c800; background: rgba(227, 200, 0, .22); color: #e3c800; font-size: 10px; font-weight: 700; letter-spacing: .4px; white-space: nowrap; }
.gsb-phase { color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .5px; line-height: 1.3; }
.gsb-val { color: #9e9e9e; font-size: 11px; }

/* Felt. The space under it is kept for the action bar, so nothing jumps when the bar comes and goes. */
.game-area { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; padding-bottom: calc(125px + var(--safe-bottom)); }
.table-zone { flex: 1; min-height: 0; position: relative; overflow: hidden; }
.g-seats { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.g-felt-corner { position: absolute; top: 8px; z-index: 30; display: flex; gap: 6px; }
.g-felt-tl { left: max(8px, env(safe-area-inset-left)); }
.g-felt-tr { right: max(8px, env(safe-area-inset-right)); }
.g-felt-btn { position: relative; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .18); background: rgba(20, 28, 24, .72); color: #e8e8e8; font-size: 16.8px; line-height: 1; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); cursor: pointer; }
.g-felt-btn::before { content: ''; position: absolute; inset: -5px -3px; }   /* a finger-sized target */
.g-felt-btn:active { transform: scale(.94); }
.g-felt-btn.active { background: #e3c800; border-color: #e3c800; color: #1a1205; }
.g-felt-btn.unread::after { content: ''; position: absolute; top: -1px; right: -1px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #14201a; background: #ef5350; }

/* Cards: one picture per card. */
.pk {
  position: relative; flex: none; display: block; width: 46px; height: 64px;
  border: 1px solid rgba(0, 0, 0, .15); border-radius: 5px;
  background: var(--cf) center / 100% 100% no-repeat, #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 -1px 0 rgba(0, 0, 0, .1), 2px 4px 8px rgba(0, 0, 0, .45), 4px 8px 20px rgba(0, 0, 0, .25), 0 0 0 1px rgba(0, 0, 0, .08);
}
.pk.back { background: url('../cards/flipside.svg') center / 100% 100% no-repeat, #16301a; }
.pk.deal { animation: pkDeal .28s cubic-bezier(.2, .8, .3, 1) both; }
.comm-row .pk.deal:nth-child(2) { animation-delay: .06s; }
.comm-row .pk.deal:nth-child(3) { animation-delay: .12s; }
@keyframes pkDeal { from { opacity: 0; transform: translateY(-12px) scale(.9); } }

/* Board, pot and the winning hand, centred on one point between the seats. */
.felt-oval { position: absolute; left: 50%; top: 50%; z-index: 2; width: 0; height: 0; --cw: 37px; pointer-events: none; }
.comm-row { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; gap: calc(var(--cw) * .065); }
.comm-row .pk { width: var(--cw); height: calc(var(--cw) * 1.391); border-radius: calc(var(--cw) * .109); }
.pk.comm-slot { border: 1px solid rgba(255, 255, 255, .38); background: rgba(0, 0, 0, .3); box-shadow: none; }
.pot-badge { position: absolute; left: 0; top: calc(var(--cw) * -.6955 - 6px); transform: translate(-50%, -100%); z-index: 6; display: none; align-items: center; gap: 6px; padding: 2.5px 8px; border-radius: 999px; border: 1.5px solid #e3c800; background: rgba(0, 0, 0, .5); color: #e3c800; font-size: 11px; font-weight: 700; letter-spacing: .5px; line-height: 1.3; white-space: nowrap; box-shadow: 0 2px 9px rgba(0, 0, 0, .42); }
.pot-badge.has-pot { display: flex; }
.pot-badge::before, .seat-bet::before { content: ''; flex: none; width: 12px; height: 12px; background: url('../table/chipStack.svg') center / contain no-repeat; }
.win-hand-badge { position: absolute; left: 0; top: calc(var(--cw) * .6955 + 7px); transform: translateX(-50%); z-index: 6; max-width: 92vw; padding: 3px 10px; border-radius: 9px; border: 1px solid #ffd700; background: rgba(0, 0, 0, .62); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.35; text-align: center; white-space: nowrap; }
.win-hand-badge strong { color: #ffd54a; font-weight: 700; }
.win-hand-badge.waiting { border-color: rgba(255, 255, 255, .28); color: #eff1f5; font-weight: 500; }

/* Seats. A box is drawn at its natural size and scaled as a whole (--sscale). */
.seat { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 2px; padding-bottom: 20px; pointer-events: auto; transition: opacity .25s ease-out; }
.seat.socle-open { padding-bottom: 0; }
.seat-plate {
  position: relative; box-sizing: border-box; display: grid; grid-template-columns: auto auto; align-items: center; justify-content: center; gap: 2px;
  padding: 3px 5px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .06);
  background: linear-gradient(rgb(67, 76, 95), rgb(29, 34, 43)); box-shadow: 0 3px 10px rgba(0, 0, 0, .42);
  opacity: .9; transition: transform .18s ease-out;
}
.seat:not(.me) .seat-plate { width: 121px; }
.seat-avatar { grid-area: 1 / 1; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 2px; border: 1px solid rgba(205, 211, 224, .9); background: rgba(29, 34, 43, .9); color: #eff1f5; }
.seat-initial { font-size: 17px; font-weight: 600; line-height: 1; }
.seat-holecards { grid-area: 1 / 2; position: relative; display: flex; gap: 4px; min-width: 54px; height: 34px; }
.seat-holecards .pk { width: 25px; height: 34px; border-radius: 3px; }
.seat-info { grid-area: 2 / 1 / auto / -1; display: flex; flex-direction: column; min-width: 0; }
.seat-name { min-width: 0; max-width: 106px; color: #eff1f5; font-size: 15px; font-weight: 600; letter-spacing: .3px; line-height: 16.5px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-money { color: #e3c800; font-size: 15px; font-weight: 700; line-height: 16.5px; text-align: right; white-space: nowrap; }
.seat-narrow .seat-info { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 6px; }
.seat-narrow .seat-name { max-width: 62px; font-size: 12px; line-height: 13px; }
.seat-narrow .seat-money { flex: none; font-size: 12px; line-height: 13px; }
.seat.me .seat-avatar { width: 52px; height: 52px; }
.seat.me .seat-initial { font-size: 24px; }
.seat.me .seat-holecards { min-width: 78px; height: 52px; }
.seat.me .seat-holecards .pk { width: 37px; height: 52px; }

.seat.active .seat-plate { transform: scale(1.04); opacity: 1; }
.seat.me.active .seat-plate { transform: scale(1.03); }
.seat.active .seat-plate::after, .seat.winner .seat-plate::after { content: ''; position: absolute; inset: -2px; z-index: 10; border-radius: inherit; pointer-events: none; }
.seat.active .seat-plate::after { border: 1px solid #ffd54a; box-shadow: 0 0 14px 2px rgba(255, 213, 74, .55); animation: turnGlowPulse 1.5s ease-in-out infinite; }
.seat.me.active .seat-plate::after { border-width: 2px; }
.seat.winner .seat-plate { opacity: 1; }
.seat.winner .seat-plate::after { border: 3px solid #ffd700; box-shadow: 0 0 16px 2px rgba(255, 215, 0, .6); animation: none; }
@keyframes turnGlowPulse { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
.seat.folded { opacity: .72; }
.seat.me.folded { opacity: .78; }
.seat.folded .seat-holecards .pk { opacity: .3; }

/* Last action or state, over the hole cards. */
.seat-action-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 18; display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 9px; border: 1px solid rgba(160, 172, 196, .5); background: #2a3242; color: #eaf1ff; font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap; }
.seat-action-badge.act-c1 { background: #5a1010; border-color: #e87070; }
.seat-action-badge.act-c3 { background: #122a55; border-color: #6aa0e8; }
.seat-action-badge.act-c5 { background: #123f0b; border-color: #7ad06a; }
.seat-action-badge.act-c6 { background: #3c0a0a; border-color: #ef5350; }
.seat.active .seat-action-badge, .seat.winner .seat-action-badge { display: none; }
.seat-self-strip { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 26; display: flex; align-items: center; justify-content: flex-end; height: 18px; pointer-events: none; }
.seat-self-strip .seat-action-badge { position: static; transform: none; }

/* Time to act. */
.seat-timeout-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 18; box-sizing: border-box; width: 44px; height: 9px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, .55); background: #0e1a30; box-shadow: 0 1px 3px rgba(0, 0, 0, .6); overflow: hidden; pointer-events: none; }
.seat-timeout-bar.me { top: -10px; width: 56px; height: 7px; }
.stb-fill { display: block; height: 100%; border-radius: 4px; background: #4070d0; transform-origin: left center; animation: stbRun linear forwards; }
.seat-timeout-bar.me .stb-fill { background: #6e9cec; }
@keyframes stbRun { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* The bet sits in a base let into the bottom of the box. */
.seat-bet-socle { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; height: 20px; margin: 0 -4px -2px; border-radius: 0 0 5px 5px; background: rgba(0, 0, 0, .26); overflow: hidden; }
.seat-bet { display: flex; align-items: center; gap: 2px; color: #eff1f5; font-size: 13px; font-weight: 700; line-height: 1; white-space: nowrap; }
.seat-bet::before { width: 15px; height: 15px; }
.seat-bet-socle.won .seat-bet { color: #99d500; }
.seat-bet-socle.won .seat-bet::before { display: none; }
.seat-hand { position: absolute; left: 50%; top: calc(100% + 3px); transform: translateX(-50%); z-index: 12; padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, .66); color: #fff; font-size: 11px; font-weight: 600; line-height: 1.35; white-space: nowrap; }

/* Dealer and blind pucks, on the side that faces the middle of the table. */
.seat-pucks { position: absolute; z-index: 6; display: flex; align-items: center; gap: 2px; pointer-events: none; }
.seat-pucks img { display: block; width: 32px; height: 32px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)); }
.seat.betside-r .seat-pucks { left: calc(100% + 8px); top: 50%; transform: translateY(-50%); }
.seat.betside-l .seat-pucks { right: calc(100% + 8px); top: 50%; transform: translateY(-50%); }
.seat.betside-b .seat-pucks { top: calc(100% - 19px); right: 6px; }
.seat.betside-b.socle-open .seat-pucks { top: calc(100% + 1px); }
.seat.me .seat-pucks, .seat.betside-s .seat-pucks { left: calc(100% + 6px); right: auto; top: 0; transform: none; }

/* A free seat. */
.seat.open { padding-bottom: 20px; }
.seat-take, .seat-vacant { display: flex; width: 121px; height: 57px; }
.seat-take { border: 1.5px dashed rgba(255, 255, 255, .6); background: rgba(20, 28, 24, .6); box-shadow: none; opacity: 1; color: #eff1f5; font-family: inherit; font-size: 15px; font-weight: 700; letter-spacing: .3px; cursor: pointer; }
.seat-take:active { border-style: solid; border-color: #ffd54a; color: #ffd54a; }
.seat-vacant { border: 1.5px dashed rgba(255, 255, 255, .16); background: none; box-shadow: none; }

/* Action bar. */
.my-zone { position: absolute; left: 0; right: 0; bottom: 0; z-index: 29; display: flex; justify-content: center; pointer-events: none; }
.action-bar { width: 100%; pointer-events: auto; }
.action-bar:empty { display: none; }
.action-grid { display: flex; flex-direction: column; gap: 3px; padding: 4px max(8px, env(safe-area-inset-right)) calc(2px + var(--safe-bottom)) max(8px, env(safe-area-inset-left)); border-radius: 12px 12px 0 0; background: rgba(20, 25, 33, .94); box-shadow: 0 0 0 2px #eff1f5, 0 0 16px 2px rgba(239, 241, 245, .42); }
.action-grid.actions-preview { box-shadow: 0 0 0 1px rgba(160, 172, 196, .3); }
.bet-row { display: flex; align-items: center; gap: 6px; height: 30px; }
.pth input.raise-amt-field { flex: none; width: 78px; height: 26px; padding: 1px 6px; border: 2px solid #4caf50; border-radius: 7px; background: #161c25; color: #4caf50; font-size: 16px; font-weight: 700; text-align: center; box-shadow: none; }
.pth input.raise-slider { flex: 1 1 auto; min-width: 40px; height: 26px; margin: 0; accent-color: #4caf50; touch-action: none; cursor: pointer; }
.mid-row { display: flex; align-items: center; gap: 5px; min-height: 26px; }
.pct-row { display: flex; gap: 4px; }
.btn-pct { flex: 0 0 38px; display: flex; align-items: center; justify-content: center; width: 38px; height: 26px; padding: 0 2px; border-radius: 5px; border: 1px solid #4caf50; background: #1b5e20; color: #fff; font-family: inherit; font-weight: 700; cursor: pointer; }
.pct-p { font-size: 11.8px; white-space: nowrap; }
.btn-action { border: 9px solid transparent; padding: 1px 9px; background: transparent; color: #f0f3f8; font-family: inherit; font-size: 15.2px; font-weight: 700; letter-spacing: .5px; line-height: 1.1; text-align: center; white-space: nowrap; cursor: pointer; }
.btn-action b { display: block; font-weight: 900; line-height: 1.05; }
.btn-action:active { transform: scale(.96); }
.btn-fold { border-image: url('../table/actionFold.svg') 9 fill / 9px / 0 stretch; }
.btn-call { border-image: url('../table/actionCall.svg') 9 fill / 9px / 0 stretch; }
.btn-raise { border-image: url('../table/actionRaise.svg') 9 fill / 9px / 0 stretch; }
.mid-row .btn-allin { flex: none; min-width: 52px; height: 26px; padding: 0 7px; border: 0; border-radius: 6px; background: url('../table/actionAllIn.svg') center / 100% 100% no-repeat; color: #fff; font-size: 12px; letter-spacing: .5px; }
.act-buttons-row { display: flex; gap: 8px; margin: 2px 0 6px; }
.act-buttons-row .btn-action { flex: 1 1 0; min-width: 0; min-height: 52px; }
.btn-action:disabled, .btn-pct:disabled { filter: saturate(.5); opacity: .55; cursor: default; }
.mode-sel-wrap { position: relative; flex: 0 1 150px; min-width: 0; height: 26px; margin-left: auto; }
.pth .mode-sel-wrap select { width: 100%; height: 100%; padding: 0 22px 0 8px; border: 1px solid rgba(160, 172, 196, .16); border-radius: 2px; background: #161c25; color: #eff1f5; font-size: 16px; line-height: 1.1; box-shadow: none; }
.sel-arr { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); color: #eff1f5; font-size: 11px; pointer-events: none; }

/* Chat and hand history: a panel over the felt. */
.side { position: absolute; z-index: 40; left: max(8px, env(safe-area-inset-left)); top: 50px; display: none; flex-direction: column; width: 360px; height: min(62%, 520px); border-radius: 8px; border: 1px solid rgba(160, 172, 196, .22); background: #141921; color: #eff1f5; box-shadow: 0 18px 50px rgba(0, 0, 0, .6); --fg: #eff1f5; --fg-soft: #a0acc4; --line: rgba(160, 172, 196, .16); --line-strong: rgba(160, 172, 196, .4); --well: #0e131a; --focus: #e3c800; }
.side.open { display: flex; }
.side-tabs { flex: none; display: flex; align-items: center; gap: 4px; padding: 2px 2px 0 10px; border-bottom: 1px solid var(--line); }
.side-tabs [role=tab] { position: relative; min-height: 44px; padding: 0 10px; border: 0; background: none; color: var(--fg-soft); font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.side-tabs [role=tab].on { color: var(--fg); box-shadow: inset 0 -2px 0 #e3c800; }
.side-tabs [role=tab].unread::after { content: ''; position: absolute; top: 11px; right: 1px; width: 7px; height: 7px; border-radius: 50%; background: #ef5350; }
.side-close { margin-left: auto; }
.side-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.log, .chat { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 10px 14px 14px; list-style: none; font-size: 14px; line-height: 1.5; }
.log li { padding: 1px 0; color: #d6dceb; }
.log .l-hand { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); color: #e3c800; font-weight: 700; }
.log .l-hand:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.log .l-street { color: #fff; font-weight: 600; }
.log .l-win { color: #99d500; font-weight: 600; }
.log .l-info { color: var(--fg-soft); }
.side .ct.red { color: #ff8a80; }
.chat li { padding: 2px 0; overflow-wrap: anywhere; color: #d6dceb; }
.chat b { color: #e3c800; font-weight: 700; }
.chat b.spect { color: var(--fg-soft); }
.chat-input { flex: none; padding: 8px 10px; border-top: 1px solid var(--line); }
.chat-input input { height: 42px; }
.menu-list { display: grid; gap: 8px; }
.menu-note { margin: 6px 2px 0; text-align: center; }

/* Wide screens: the bar floats in the middle, like on the desktop original. */
@media (min-width: 741px) {
  .my-zone { bottom: 12px; }
  .action-bar { width: 440px; }
  .action-grid { padding: 6px 10px 4px; border-radius: 12px; }
  .top-table .top-in { padding-inline: 12px; }
}
@media (max-width: 740px) {
  .top-table .top-right .me-btn { display: none; }
    .side { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 62%; border-radius: 12px 12px 0 0; border-width: 1px 0 0; padding-bottom: var(--safe-bottom); }
}
@media (max-height: 520px) and (orientation: landscape) {
  .game-area { padding-bottom: 0; }
  .my-zone { left: auto; right: 8px; bottom: 6px; }
  .action-bar { width: 330px; }
  .act-buttons-row .btn-action { min-height: 40px; }
}

/* ── Windows: a card on wide screens, a sheet from the bottom on phones ── */
.backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(3, 20, 13, .66); animation: fade .15s ease-out; }
.modal { display: flex; flex-direction: column; width: min(420px, 100%); max-height: calc(100dvh - 32px); overflow: hidden; border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7); animation: pop .18s ease-out; }
.modal:focus { outline: none; }
.modal-wide { width: min(600px, 100%); }
.modal-head { flex: none; position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 8px 8px 0 20px; }
.modal-head h2 { min-width: 0; font-size: 22px; font-weight: 650; line-height: 1.15; }
.modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px 20px 20px; }
.modal-actions { flex: none; display: flex; justify-content: flex-end; gap: 10px; padding: 4px 20px 20px; }
.modal-actions .btn-block { flex: 1; }
/* The main button of a window that scrolls stays at the bottom. */
.sheet-cta { position: sticky; bottom: -20px; z-index: 1; margin: 16px -20px -20px; padding: 12px 20px 20px; background: var(--paper); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
@keyframes sheet { from { transform: translateY(100%); } }
@media (max-width: 600px) {
  .backdrop { place-items: end stretch; padding: 0; }
  .modal, .modal-wide { width: 100%; max-height: calc(100dvh - var(--safe-top) - 24px); border-radius: 18px 18px 0 0; animation: sheet .24s cubic-bezier(.2, .8, .2, 1); }
  .modal-head { padding-left: var(--pad); padding-right: calc(var(--pad) - 10px); }
  .modal-body { padding: 10px var(--pad) calc(20px + var(--safe-bottom)); }
  .modal-actions { padding: 4px var(--pad) calc(16px + var(--safe-bottom)); }
  .modal-actions .btn { flex: 1 1 0; min-width: 0; padding: 0 8px; }
  .modal-body:has(+ .modal-actions) { padding-bottom: 16px; }
  .sheet-cta { bottom: calc(-20px - var(--safe-bottom)); margin: 16px calc(-1 * var(--pad)) calc(-20px - var(--safe-bottom)); padding: 12px var(--pad) calc(16px + var(--safe-bottom)); }
}

/* A value to copy: an ID, an access code, a table code. */
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding: 10px 10px 10px 16px; border-radius: var(--r); background: var(--white); border: 1.5px dashed var(--line-strong); }
.code-box > div { min-width: 0; }
.code-box-label { font-size: 13px; color: var(--fg-soft); }
.code-box-num { display: block; font-size: 22px; font-weight: 650; line-height: 1.2; letter-spacing: .05em; white-space: nowrap; }
@media (max-width: 360px) { .code-box-num { font-size: 19px; letter-spacing: .03em; } }

/* Amount picked with the slider or typed into the big number. */
.big-num-wrap { --flar: 100; display: flex; align-items: baseline; justify-content: center; gap: 2px; margin: 0 0 6px; }
.big-num-cur { font-size: 30px; font-weight: 650; }
.big-num-wrap input.big-num { width: 4.4ch; max-width: 8ch; height: auto; padding: 0 0 2px; border: 0; border-bottom: 2px dashed var(--line-strong); border-radius: 0; background: none; font-size: 40px; font-weight: 650; text-align: center; }
.big-num-wrap input.big-num:focus { border-color: var(--fg); box-shadow: none; }
.range-ends { display: flex; justify-content: space-between; margin-top: 6px; font-size: 14px; }

/* ── Cashier ── */
.wallet-tabs { margin-bottom: 16px; }
.preset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.preset { min-width: 0; min-height: 52px; padding: 0 4px; border: 1.5px solid var(--line-strong); border-radius: var(--r); background: var(--white); color: var(--ink); font-size: 17px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.preset.on { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.wallet-note { margin: 10px 0 0; }
.wallet-body > .lead:last-child { margin-bottom: 0; }

.ticket-head { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; margin: -6px 0 12px -12px; }
.ticket-title { text-align: center; font-size: 18px; font-weight: 650; white-space: nowrap; }
/* The slip shown to the cashier, with a tear-off line between the QR and the code. */
.ticket { width: min(264px, 100%); margin: 0 auto 14px; padding: 14px 14px 12px; border-radius: var(--r-lg); background: var(--white); text-align: center; box-shadow: 0 1px 0 rgba(16, 35, 27, .16), 0 12px 24px -16px rgba(16, 35, 27, .5); }
.qr { display: block; width: 100%; height: auto; }
.ticket-tear { position: relative; height: 0; margin: 12px -14px; border-top: 2px dashed var(--line-strong); }
.ticket-tear::before, .ticket-tear::after { content: ''; position: absolute; top: -9px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); }
.ticket-tear::before { left: -8px; }
.ticket-tear::after { right: -8px; }
.qr-code { font-size: 22px; font-weight: 650; letter-spacing: .08em; white-space: nowrap; }
.ticket-meta { margin-top: 2px; font-size: 13px; color: var(--fg-soft); }
.ticket-text { margin: 0 0 6px; text-align: center; }
.ticket-wait { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 10px 0 0; font-size: 14px; font-weight: 600; color: var(--fg-soft); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--amber-press); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.ticket-done { display: grid; place-items: center; width: 64px; height: 64px; margin: 4px auto 12px; border-radius: 50%; background: var(--green); color: var(--white); }

.ops { list-style: none; margin: 0; padding: 0; }
.op { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; text-align: left; cursor: pointer; }
.ops li:last-child .op { border-bottom: 0; }
.op:disabled { cursor: default; }
.op > * { pointer-events: none; }
.op-main { display: flex; flex-direction: column; min-width: 0; }
.op-title { font-weight: 600; }
.op-date { font-size: 13px; color: var(--fg-soft); }
.op-status { flex: none; font-size: 14px; font-weight: 600; color: var(--fg-soft); }
.op-status.wait { color: #9A6200; }
.op-status.ok { color: var(--green); }

/* ── Profile ── */
.prof-sec { padding: 14px 0 4px; }
.prof-sec + .prof-sec { margin-top: 10px; border-top: 1px solid var(--line); }
.prof-sec h3 { margin: 0 0 2px; font-size: 14px; font-weight: 600; color: var(--fg-soft); --flar: 0; }
.prof-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 6px 0; }
.prof-row-text { min-width: 0; }
.prof-row-title { font-weight: 600; }
.prof-row-text .hint { overflow-wrap: anywhere; }
.prof-row .segmented { flex: none; width: 196px; }
.prof-row .btn { flex: none; }
.prof-pass-title { margin: 10px 0 12px; }
.prof-pass-actions { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 8px; }
.inline-form { display: flex; align-items: flex-end; gap: 8px; }
.inline-form .field { flex: 1; min-width: 0; margin: 0; }
.inline-form .btn { min-height: 48px; }

/* ── Toasts ── */
#toasts { position: fixed; left: 50%; bottom: calc(84px + var(--safe-bottom)); transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { padding: 11px 16px; border-radius: var(--r); background: var(--ink); color: var(--paper); font-size: 15px; font-weight: 600; text-align: center; box-shadow: 0 0 0 1px rgba(242, 241, 234, .18), 0 12px 30px -10px rgba(0, 0, 0, .7); animation: pop .2s ease-out; transition: opacity .3s; }
.toast-error { background: var(--red); color: var(--white); box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .7); }
.toast.out { opacity: 0; }

@media (max-width: 360px) {
  .trow { grid-template-columns: 78px minmax(0, 1fr) auto; column-gap: 8px; padding-inline: 12px; }
  .t-stakes { font-size: 14px; }
  .prof-row .segmented { width: 168px; }
}

@media (prefers-reduced-motion: reduce) {
  .card.deal, .pk.deal, .modal, .modal-wide, .backdrop, .toast, .skeleton > li span, .pulse { animation: none; }
  .btn:active, .btn-action:active, .g-felt-btn:active { transform: none; }
  .seat.active .seat-plate::after { animation: none; }
}
