* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* v0.8.3 theme: warm wood room (radial lamplight vignette) instead of
   dark-green-on-dark-green, a brighter lit felt, and classic
   red-and-white card backs — same casino feel, one notch lighter.
   v0.8.4: the room surfaces and text became CSS custom properties
   with a dark/light room toggle in the header.
   v0.8.5: the toggle is now a brightness DIMMER. Every room property
   has paired endpoints (--X-dark / --X-light: the v0.8.4 palettes
   verbatim) and a computed value that blends them with color-mix at
   --bright percent: 0 is exactly the dark room (walnut rail), 100 is
   exactly the light room (gold rail). --bright is set inline on
   <html> by the header slider and persisted (kinpoker_brightness).
   The gradients blend per stop; the rgba seat-box endpoints blend
   their alpha too. The felt, card faces and red backs are
   deliberately NOT variables: identical at every brightness.
   Browsers without color-mix use the @supports fallback below: the
   two fixed rooms, switched by the .light class, which the head
   script and the slider wiring set whenever brightness >= 50.
   v0.8.6: the dark-room endpoints adopt the reference scheme Jaxson
   picked — deep green room (#0c5d3c family), gold headings
   (#f3d456) — and the buttons in BOTH rooms become the reference
   style: indigo #362dac pills with bold white lettering (gold is
   now a text/accent color only). The felt, cards and backs are
   still not variables. Also fixes the v0.8.5 mid-range contrast
   flaw: foreground/text properties now blend on a SECOND variable,
   --brightText, which the scripts derive from the slider with a
   piecewise-linear remap (text holds its dark-room value until the
   slider passes 35 and reaches its light value by 40) while the
   surfaces keep blending on --bright across the whole range. The
   35->40 window was chosen by a computed WCAG sweep (5% steps):
   text-vs-panel bottoms at 3.07:1 and input text at 4.20:1; the
   two small-text pairs (muted, seat subtext) bottom at 2.05:1 and
   1.92:1 — their mathematical caps under any shared window, set
   by their own mid-tone light endpoints — up from ~1.1:1 in
   v0.8.5, where every pair collapsed at mid-slider.
   v0.8.7: red joins the scheme — the card-back red #c0272d, kept
   CONSTANT at every brightness (red is red in both rooms): a 3px
   pinstripe ring on the felt between the green and the rail, a
   header band, the status badge (red with white text — both badge
   endpoint pairs are now the same red/white), and the result
   banner's border. The dark (green) room's rail trades walnut for
   a deep-red casino-leather gradient (#8e1f24 -> #6e141c ->
   #4d0d13); the light room keeps its gold rail, so the dimmer
   blends red-to-gold through the middle of its sweep.
   v0.28.1 (Jaxson, 2026-12-01): the dark room goes FLAT. Jaxson
   liked the Kin Hold 'Em lobby's look; sampling it showed its
   background is exactly our base #0c5d3c, solid top to bottom.
   So every dark-room surface endpoint (room gradient stops,
   header, panels, inputs, banner) is now #0c5d3c — the gradient
   still exists but all its dark stops are the same color, so at
   brightness 0 the room is one flat green. Borders/hairlines keep
   their lighter green so panels and fields stay defined; the
   felt, cards, rail and the light-room endpoints are untouched,
   so raising the brightness dimmer still blends toward the light
   room as before. */
:root {
  --bright: 0;
  --brightText: 0;

  --room-base-dark: #0c5d3c;
  --room-base-light: #efe4cd;
  --room-base: color-mix(in srgb, var(--room-base-light) calc(var(--bright) * 1%), var(--room-base-dark));

  --room-grad-0-dark: #0c5d3c;
  --room-grad-0-light: #f7efe0;
  --room-grad-0: color-mix(in srgb, var(--room-grad-0-light) calc(var(--bright) * 1%), var(--room-grad-0-dark));
  --room-grad-1-dark: #0c5d3c;
  --room-grad-1-light: #f1e5cc;
  --room-grad-1: color-mix(in srgb, var(--room-grad-1-light) calc(var(--bright) * 1%), var(--room-grad-1-dark));
  --room-grad-2-dark: #0c5d3c;
  --room-grad-2-light: #e9dcc3;
  --room-grad-2: color-mix(in srgb, var(--room-grad-2-light) calc(var(--bright) * 1%), var(--room-grad-2-dark));
  --room-grad: radial-gradient(1200px 820px at 50% 26%, var(--room-grad-0) 0%, var(--room-grad-1) 46%, var(--room-grad-2) 100%);

  --header-bg-dark: #0c5d3c;
  --header-bg-light: #f3ead6;
  --header-bg: color-mix(in srgb, var(--header-bg-light) calc(var(--bright) * 1%), var(--header-bg-dark));

  --text-dark: #f7faf7;
  --text-light: #2b2118;
  --text: color-mix(in srgb, var(--text-light) calc(var(--brightText) * 1%), var(--text-dark));

  --muted-dark: #c2d6c8;
  --muted-light: #6f6151;
  --muted: color-mix(in srgb, var(--muted-light) calc(var(--brightText) * 1%), var(--muted-dark));

  --accent-dark: #f3d456;
  --accent-light: #8a6414;
  --accent: color-mix(in srgb, var(--accent-light) calc(var(--brightText) * 1%), var(--accent-dark));

  --error-dark: #ff9c9c;
  --error-light: #b3261e;
  --error: color-mix(in srgb, var(--error-light) calc(var(--brightText) * 1%), var(--error-dark));

  --panel-bg-dark: #0c5d3c;
  --panel-bg-light: #fbf6ea;
  --panel-bg: color-mix(in srgb, var(--panel-bg-light) calc(var(--bright) * 1%), var(--panel-bg-dark));

  --panel-border-dark: #1e7d52;
  --panel-border-light: #c9b18a;
  --panel-border: color-mix(in srgb, var(--panel-border-light) calc(var(--bright) * 1%), var(--panel-border-dark));

  --input-bg-dark: #0c5d3c;
  --input-bg-light: #fffdf7;
  --input-bg: color-mix(in srgb, var(--input-bg-light) calc(var(--bright) * 1%), var(--input-bg-dark));

  --input-border-dark: #2e7d5b;
  --input-border-light: #b8a888;
  --input-border: color-mix(in srgb, var(--input-border-light) calc(var(--bright) * 1%), var(--input-border-dark));

  --input-text-dark: #fff;
  --input-text-light: #2b2118;
  --input-text: color-mix(in srgb, var(--input-text-light) calc(var(--brightText) * 1%), var(--input-text-dark));

  --button-bg-dark: #362dac;
  --button-bg-light: #362dac;
  --button-bg: color-mix(in srgb, var(--button-bg-light) calc(var(--bright) * 1%), var(--button-bg-dark));

  --button-border-dark: #4a42c4;
  --button-border-light: #4a42c4;
  --button-border: color-mix(in srgb, var(--button-border-light) calc(var(--bright) * 1%), var(--button-border-dark));

  --button-text-dark: #fff;
  --button-text-light: #fff;
  --button-text: color-mix(in srgb, var(--button-text-light) calc(var(--bright) * 1%), var(--button-text-dark));

  --badge-bg-dark: #c0272d;
  --badge-bg-light: #c0272d;
  --badge-bg: color-mix(in srgb, var(--badge-bg-light) calc(var(--bright) * 1%), var(--badge-bg-dark));

  --badge-text-dark: #ffffff;
  --badge-text-light: #ffffff;
  --badge-text: color-mix(in srgb, var(--badge-text-light) calc(var(--bright) * 1%), var(--badge-text-dark));

  --seat-box-bg-dark: rgba(4, 40, 26, .88);
  --seat-box-bg-light: rgba(255, 251, 240, .94);
  --seat-box-bg: color-mix(in srgb, var(--seat-box-bg-light) calc(var(--bright) * 1%), var(--seat-box-bg-dark));

  --seat-border-dark: #2e8b62;
  --seat-border-light: #a07d4f;
  --seat-border: color-mix(in srgb, var(--seat-border-light) calc(var(--bright) * 1%), var(--seat-border-dark));

  --seat-subtext-dark: #c2d6c8;
  --seat-subtext-light: #5d4c33;
  --seat-subtext: color-mix(in srgb, var(--seat-subtext-light) calc(var(--brightText) * 1%), var(--seat-subtext-dark));

  --rail-0-dark: #8e1f24;
  --rail-0-light: #dec25e;
  --rail-0: color-mix(in srgb, var(--rail-0-light) calc(var(--bright) * 1%), var(--rail-0-dark));
  --rail-1-dark: #6e141c;
  --rail-1-light: #c9a227;
  --rail-1: color-mix(in srgb, var(--rail-1-light) calc(var(--bright) * 1%), var(--rail-1-dark));
  --rail-2-dark: #4d0d13;
  --rail-2-light: #a8841c;
  --rail-2: color-mix(in srgb, var(--rail-2-light) calc(var(--bright) * 1%), var(--rail-2-dark));
  --rail: linear-gradient(160deg, var(--rail-0) 0%, var(--rail-1) 55%, var(--rail-2) 100%);

  --hairline-dark: #1e7d5233;
  --hairline-light: #b8a88833;
  --hairline: color-mix(in srgb, var(--hairline-light) calc(var(--bright) * 1%), var(--hairline-dark));

  --hairline-soft-dark: #1e7d5255;
  --hairline-soft-light: #b8a88855;
  --hairline-soft: color-mix(in srgb, var(--hairline-soft-light) calc(var(--bright) * 1%), var(--hairline-soft-dark));

  --banner-bg-dark: #0c5d3c;
  --banner-bg-light: #fbf6ea;
  --banner-bg: color-mix(in srgb, var(--banner-bg-light) calc(var(--bright) * 1%), var(--banner-bg-dark));

  --banner-text-dark: #f3d456;
  --banner-text-light: #5d430d;
  --banner-text: color-mix(in srgb, var(--banner-text-light) calc(var(--brightText) * 1%), var(--banner-text-dark));
}
/* No-color-mix fallback: pin every blended property to an endpoint —
   the dark room by default, the light room under .light (set when
   brightness >= 50). --room-grad and --rail need no override here:
   they only assemble the stop variables pinned below. */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  :root {
    --room-base: var(--room-base-dark);
    --room-grad-0: var(--room-grad-0-dark);
    --room-grad-1: var(--room-grad-1-dark);
    --room-grad-2: var(--room-grad-2-dark);
    --header-bg: var(--header-bg-dark);
    --text: var(--text-dark);
    --muted: var(--muted-dark);
    --accent: var(--accent-dark);
    --error: var(--error-dark);
    --panel-bg: var(--panel-bg-dark);
    --panel-border: var(--panel-border-dark);
    --input-bg: var(--input-bg-dark);
    --input-border: var(--input-border-dark);
    --input-text: var(--input-text-dark);
    --button-bg: var(--button-bg-dark);
    --button-border: var(--button-border-dark);
    --button-text: var(--button-text-dark);
    --badge-bg: var(--badge-bg-dark);
    --badge-text: var(--badge-text-dark);
    --seat-box-bg: var(--seat-box-bg-dark);
    --seat-border: var(--seat-border-dark);
    --seat-subtext: var(--seat-subtext-dark);
    --rail-0: var(--rail-0-dark);
    --rail-1: var(--rail-1-dark);
    --rail-2: var(--rail-2-dark);
    --hairline: var(--hairline-dark);
    --hairline-soft: var(--hairline-soft-dark);
    --banner-bg: var(--banner-bg-dark);
    --banner-text: var(--banner-text-dark);
  }
  :root.light {
    --room-base: var(--room-base-light);
    --room-grad-0: var(--room-grad-0-light);
    --room-grad-1: var(--room-grad-1-light);
    --room-grad-2: var(--room-grad-2-light);
    --header-bg: var(--header-bg-light);
    --text: var(--text-light);
    --muted: var(--muted-light);
    --accent: var(--accent-light);
    --error: var(--error-light);
    --panel-bg: var(--panel-bg-light);
    --panel-border: var(--panel-border-light);
    --input-bg: var(--input-bg-light);
    --input-border: var(--input-border-light);
    --input-text: var(--input-text-light);
    --button-bg: var(--button-bg-light);
    --button-border: var(--button-border-light);
    --button-text: var(--button-text-light);
    --badge-bg: var(--badge-bg-light);
    --badge-text: var(--badge-text-light);
    --seat-box-bg: var(--seat-box-bg-light);
    --seat-border: var(--seat-border-light);
    --seat-subtext: var(--seat-subtext-light);
    --rail-0: var(--rail-0-light);
    --rail-1: var(--rail-1-light);
    --rail-2: var(--rail-2-light);
    --hairline: var(--hairline-light);
    --hairline-soft: var(--hairline-soft-light);
    --banner-bg: var(--banner-bg-light);
    --banner-text: var(--banner-text-light);
  }
}
body { margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; color: var(--text);
  /* Readability pass (v0.26.1, Jaxson's friend's squint report,
     2026-11-25): base text a step up, and the explanatory sizes
     below (.small, .list, .msg) lifted with it. In-game glance
     labels (seat names/stacks/bets, card faces) deliberately
     untouched — they are numbers in a tight layout, not prose. */
  font-size: 17px; line-height: 1.45;
  background-color: var(--room-base);
  background-image: var(--room-grad);
  background-repeat: no-repeat; background-attachment: fixed; }
header { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: var(--header-bg);
  border-bottom: 3px solid #c0272d; }
.brand { font-size: 20px; font-weight: 700; color: var(--accent); }
.headerRight { display: flex; gap: 8px; align-items: center; }
.dimmer { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
#brightSlider { width: 84px; accent-color: var(--accent); cursor: pointer; }
@media (max-width: 560px) { #brightSlider { width: 58px; } }
.badge { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--badge-bg); color: var(--badge-text); }
/* v0.21.5: links take the room's white text color — the browser's
   default blue small print (deposit link, history tx links, the
   Operator / Privacy / Terms footer) was barely readable against
   the green (Jaxson, 2026-11-03). The underline keeps them
   identifiable as links. --text is white in the dark room and
   dark in the light room, so they stay readable on the dimmer. */
a { color: var(--text); text-decoration: underline; }
.panel { background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: 12px; margin: 14px; padding: 16px; }
/* Coming soon block (v0.27.1): Champion Review + my-Virtual, announced
   on the join panel (visitors) and in the lobby (players). */
.comingSoon { border: 1px solid var(--panel-border); border-radius: 10px; padding: 10px 12px; margin-top: 12px; }
.comingSoon h4 { margin: 2px 0 6px; }
.comingSoon p { margin: 4px 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.error { color: var(--error); min-height: 1em; }
.msg { color: var(--accent); min-height: 1em; font-size: 16px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
input[type=text], input[type=number], input[type=password] { flex: 1; min-width: 140px; padding: 12px; border-radius: 8px; border: 1px solid var(--input-border); background: var(--input-bg); color: var(--input-text); font-size: 16px; }
select { flex: 1; min-width: 140px; padding: 12px; border-radius: 8px; border: 1px solid var(--input-border); background: var(--input-bg); color: var(--input-text); font-size: 16px; }
/* v0.13.0: deposit feedback sits directly under the Deposit button,
   in a visible slot the player is already looking at. */
.depMsg { font-size: 15px; font-weight: 600; margin: 8px 0 2px; }
#depRecover { border: 1px dashed var(--input-border); border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
/* v0.8.6: buttons take the reference style in both rooms — indigo
   #362dac pills with bold white lettering (--button-* endpoints are
   identical dark/light). */
button { cursor: pointer; border: 1px solid var(--button-border); background: var(--button-bg); color: var(--button-text); border-radius: 999px; padding: 10px 14px; font-size: 15px; font-weight: 700; touch-action: manipulation; }
button:active { transform: scale(0.97); filter: brightness(1.25); }
button.primary { background: var(--button-bg); border-color: var(--button-border); color: #fff; font-weight: 700; }
button.big { min-height: 52px; padding: 12px 22px; }
button:disabled { opacity: 0.4; cursor: default; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; align-items: baseline; }
.kv code { font-size: 11px; word-break: break-all; text-align: right; }
.list { list-style: none; margin: 6px 0; padding: 0; font-size: 15px; }
.list li { padding: 5px 0; border-bottom: 1px solid var(--hairline); display: flex; justify-content: space-between; gap: 8px; }

/* --- table --- */
#tableWrap { padding: 12px; }
/* The rail is the 14px rim: the felt gradient paints the padding box
   and var(--rail) (deep red at brightness 0, gold at 100, blended
   between) paints the border box behind a transparent border. The
   red pinstripe is the first inset shadow: a crisp 3px ring just
   inside the padding-box edge, sitting between the felt and the
   rail, following the oval's radius. */
#felt { position: relative; margin: 0 auto; max-width: 720px; height: 500px; border-radius: 200px;
  background: radial-gradient(ellipse at center, #17a06b 0%, #0e8a5c 55%, #0a7a52 100%) padding-box, var(--rail) border-box;
  border: 14px solid transparent; box-shadow: inset 0 0 0 3px #c0272d, inset 0 0 60px rgba(0,0,0,.45), 0 8px 24px rgba(0,0,0,.4); }
#boardArea { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; width: 90%; z-index: 5; }
/* v0.21.4: the seats live in their own layer BELOW the board area,
   so a seat box can never paint over a community card — the board
   always wins. Seat geometry is unchanged: #seats spans exactly
   the felt's padding box the seats used to resolve against. */
#seats { position: absolute; inset: 0; z-index: 1; }
#board { display: flex; gap: 6px; justify-content: center; min-height: 92px; }
#potLine { margin-top: 8px; font-weight: 700; color: #ffd76a; font-size: 18px; text-shadow: 0 1px 3px rgba(0,0,0,.45); }
/* The street line sits on the bright felt center, where the muted tone
   would wash out — give it its own near-white with a soft shadow. */
#streetLine { color: #eaf7ee; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
/* Cards sized for readability first (v0.8.0, enlarged again v0.8.3):
   board cards 64x90; the viewer's own hole cards match the board;
   opponents' hole cards are 56x79. Heavier glyphs and maximum-contrast
   pips (near-black on white, strong red). */
.card { width: 60px; height: 85px; background: #fdfdf8; color: #0b1510; border-radius: 8px; display: flex;
  flex-direction: column; align-items: center; justify-content: center; font-weight: 800; font-size: 23px;
  box-shadow: 0 2px 5px rgba(0,0,0,.35); line-height: 1.05; }
.card.red { color: #b81f1f; }
/* Mini card chip for card names inside buttons/messages (v0.25.5,
   Jaxson): the rank+suit sit on card-white in real card colors —
   red for hearts/diamonds, black for spades/clubs — so the symbol
   never renders in the surrounding text color (white on buttons). */
.cardchip { background: #fdfdf8; color: #0b1510; border-radius: 4px; padding: 0 5px; font-weight: 800; white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,.35); }
.cardchip.red { color: #b81f1f; }
/* Classic Bicycle-style back (v0.8.3, pure CSS): bright red field with
   a fine white diamond lattice, a clean white card edge (border), and
   an inner red/white double frame from the inset shadows. The lattice
   is clipped to the padding box so it never bleeds under the edge. */
.card.back { color: transparent; border: 3px solid #fdfdf8; background-color: #c0272d;
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,.8) 0, rgba(255,255,255,.8) 1.5px, rgba(255,255,255,0) 1.5px, rgba(255,255,255,0) 6px),
    repeating-linear-gradient(-45deg, rgba(255,255,255,.8) 0, rgba(255,255,255,.8) 1.5px, rgba(255,255,255,0) 1.5px, rgba(255,255,255,0) 6px),
    linear-gradient(155deg, #d2343d 0%, #c0272d 55%, #a51e27 100%);
  background-clip: padding-box;
  box-shadow: inset 0 0 0 3px #9c1c24, inset 0 0 0 4.5px rgba(253,253,248,.92), 0 2px 5px rgba(0,0,0,.35); }
.card.win { outline: 4px solid #ffd76a; box-shadow: 0 0 14px #ffd76a99; }
.seat { position: absolute; width: 148px; text-align: center; transform: translate(-50%, -50%); }
.seat .box { background: var(--seat-box-bg); border: 2px solid var(--seat-border); border-radius: 12px; padding: 6px 8px; }
.seat.actor .box { border-color: #ffd76a; box-shadow: 0 0 14px #ffd76a88; }
.seat.folded { opacity: .45; }
.seat .name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat .stack, .seat .bet { font-size: 12px; color: var(--seat-subtext); }
.seat .bet { color: var(--accent); min-height: 1em; }
.seat .cards { display: flex; gap: 4px; justify-content: center; margin-bottom: 4px; }
.seat .cards .card { width: 60px; height: 85px; font-size: 23px; border-radius: 8px; }
.seat.you .cards .card { width: 60px; height: 85px; font-size: 23px; }
/* Narrow screens: shrink the cards back down so the 6-seat oval still
   fits (desktop readability above takes priority at full width). */
@media (max-width: 560px) {
  #felt { height: 460px; }
  #board { min-height: 76px; }
  .card { width: 54px; height: 77px; font-size: 21px; }
  .seat .cards .card { width: 54px; height: 77px; font-size: 21px; }
  .seat.you .cards .card { width: 54px; height: 77px; font-size: 21px; }
  .seat { width: 118px; }
  .seat.you { width: 132px; }
}
.seat .dealerBtn { display: inline-block; background: #fdfdf8; color: #15251d; border-radius: 50%; width: 18px; height: 18px; font-size: 11px; font-weight: 800; line-height: 18px; margin-left: 4px; }
/* 6-max oval, pos0 is always the viewer's own seat. v0.21.5:
   Jaxson asked to play from the 2 o'clock position instead of
   bottom center — the ring rotated two spots so pos0 sits top
   right, the center-bottom info (pot / street / result) is no
   longer behind his own seat, and the AI take the bottom spots:
   "AI players don't have to read the banners to be updated." */
.seat.pos0 { left: 91%; top: 24%; }
.seat.pos1 { left: 91%; top: 76%; }
.seat.pos2 { left: 50%; top: 93%; }
.seat.pos3 { left: 9%; top: 76%; }
.seat.pos4 { left: 9%; top: 24%; }
.seat.pos5 { left: 50%; top: 7%; }

/* --- lobby --- */
#tableBar { max-width: 720px; margin: 12px auto 0; padding: 0 12px; justify-content: space-between; }
#tableNameLabel { font-weight: 700; color: var(--accent); }
.lobbyRow { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 4px; border-bottom: 1px solid var(--hairline-soft); line-height: 1.5; }
.lobbyRow:last-child { border-bottom: none; }
.aiPick { margin-left: auto; padding: 7px 8px; border-radius: 8px; font-size: 14px;
  background: var(--panel-bg, #fff); color: inherit; border: 1px solid var(--hairline-soft); }
#resultBanner { max-width: 720px; margin: 10px auto 0; background: var(--banner-bg); border: 1px solid #c0272d; color: var(--banner-text);
  border-radius: 10px; padding: 10px 14px; text-align: center; font-size: 15px; }

/* --- action bar --- */
/* v0.17.0: the action bar sticks to the bottom of the viewport
   while it is shown, so the bet/raise slider and amount are never
   below the fold on the player's turn (Jaxson's playtest note). */
#actionBar { max-width: 720px; margin: 4px auto 0; padding: 10px 12px;
  position: sticky; bottom: 0; z-index: 30;
  background: var(--panel-bg); border: 1px solid var(--panel-border);
  border-bottom: none; border-radius: 12px 12px 0 0;
  box-shadow: 0 -6px 18px rgba(0,0,0,.35); }
.actions { justify-content: center; }
button.action { flex: 1; min-height: 58px; font-size: 17px; font-weight: 700; border-radius: 999px; }
/* Fold (v0.17.0): Jaxson found the old muted slate washed out, so
   Fold now takes the house gold with dark text — bold and legible
   in both rooms, and distinct from the indigo actions and the
   red All-In. */
button.action.danger { background: #f3d456; border-color: #c9a227; color: #241a02; }
button.action.allin { background: #b02020; border-color: #e04545; color: #fff; }
/* v0.23.1: the v0.21.10 phone rule goes all-widths — a disabled
   action button hides outright on laptop/desktop too, instead of
   sitting greyed in the row. Check and Call are never both live
   (the server's legal actions make them mutually exclusive), so
   facing a bet the row reads Fold · Call · Raise · All In with no
   dead Check, and a free check shows no dead Call. Jaxson's
   2026-11-08 laptop screenshot showed the greyed Check beside a
   live Call 500. */
#actionBar button.action:disabled { display: none; }
#raiseControls { padding: 8px 2px; }
#raiseSlider { width: 100%; height: 36px; }
.presets { justify-content: center; }
.preset { min-height: 44px; flex: 1; }
h3, h4 { margin: 6px 0 10px; }

/* --- v0.17.0 layout pass: side boards + decluttered panels ---
   Default (narrow) layout stays one column: the side boards are
   hidden by the markup's .hidden class until the client shows them
   while seated, and CSS below only displays them on wide screens;
   on narrow screens the compact session strip above the felt
   carries the running burn count instead. */
#tableLayout { display: grid; grid-template-columns: minmax(0, 1fr); }
#tableCenter { min-width: 0; }
.sideBoard { display: none; background: var(--panel-bg); border: 1px solid var(--panel-border);
  border-radius: 12px; margin-top: 12px; padding: 16px; }
.sideBoard h3 { color: var(--accent); font-size: 18px; }
.bigBurnLabel { display: block; font-size: 14px; font-weight: 700; color: var(--muted); }
.bigBurn b, .bigPot b { display: block; font-size: 36px; line-height: 1.15;
  color: var(--accent); font-weight: 800; }
.bigBurn { padding: 6px 0 10px; border-bottom: 1px solid var(--hairline-soft); margin-bottom: 8px; }
.bigPot { padding: 6px 0 4px; }
.sideBoard .kv b { font-size: 16px; }
.boardStreet { font-size: 17px; font-weight: 600; margin: 4px 0 12px; }
.boardResultLabel { font-size: 14px; font-weight: 700; color: var(--muted); }
.boardResult { font-size: 18px; line-height: 1.5; margin: 4px 0 0; }
#sessionStrip { max-width: 720px; margin: 0 auto 10px; text-align: center;
  font-size: 20px; font-weight: 700; color: var(--accent);
  background: var(--panel-bg); border: 1px solid var(--panel-border);
  border-radius: 10px; padding: 8px 10px; }
@media (min-width: 1180px) {
  #tableLayout { grid-template-columns: 300px minmax(0, 760px) 300px;
    justify-content: center; gap: 14px; padding: 0 14px; align-items: start; }
  /* v0.23.1: pin each column explicitly. Grid auto-placement puts
     the visible items into the tracks in order, so when a board is
     display:none the center slides into that board's track — at
     the free table the session board is always hidden, which put
     #tableCenter in the 300px left track and the Table board in
     the wide center track: the felt squeezed into a narrow pill
     on the left of Jaxson's laptop (2026-11-08 screenshot, hand
     #1366) with the action bar wrapped under it. */
  #sessionBoard { grid-column: 1; }
  #tableCenter { grid-column: 2; }
  #tableBoard { grid-column: 3; }
  /* At the free table the session board never renders, so drop
     its track entirely: the felt gets its full center column and
     the Table board rides on its right, two columns centered. */
  body.atFreeTable #tableLayout { grid-template-columns: minmax(0, 760px) 300px; }
  body.atFreeTable #tableCenter { grid-column: 1; }
  body.atFreeTable #tableBoard { grid-column: 2; }
  /* The markup hides the boards until the player is seated; this
     rule only governs how they lay out once shown. */
  .sideBoard { display: block; position: sticky; top: 12px; }
  #sessionStrip { display: none; }
  #belowPanels { display: grid; grid-template-columns: 1fr 1fr;
    gap: 0 14px; padding: 0 14px; align-items: start; }
  #belowPanels .panel { margin: 14px 0 0; }
  #belowPanels > p { grid-column: 1 / -1; }
}

/* Waterline (v0.18.0): the Your Line progress bar toward the line. */
.wlBar { height: 10px; background: rgba(255,255,255,.08); border-radius: 5px; overflow: hidden; margin: 4px 0 8px; }
.wlBar #wlBarFill { height: 100%; width: 0%; background: var(--gold, #f3d456); transition: width .4s ease; }
#wlPanel .small { max-width: 72ch; }
#wlPanel h4 { margin: 14px 0 6px; color: var(--accent); }

/* --- v0.20.0 mobile-clean pass (free app test build) ---
   Phone portrait: the felt is the screen. Below ~760px the chrome
   slims down, the felt takes the viewport, seat chips compact, the
   pot and street lines promote, and the hero's own cards stay big —
   the distilled play-only layout from the 2026-11-01 sketch.
   Panels stack below the table, as they already do in one column. */
@media (max-width: 760px) {
  .panel { margin: 8px; padding: 12px; }
  #tableWrap { padding: 6px; }
  #felt { height: 62vh; min-height: 430px; border-radius: 120px; }
  #potLine { font-size: 22px; }
  #streetLine { font-size: 17px; }
  #sessionStrip { font-size: 16px; margin-bottom: 6px; }
  .seat { width: 104px; }
  .seat .box { padding: 4px 6px; }
  .seat .name { font-size: 12px; }
  .seat .cards .card { width: 50px; height: 71px; font-size: 19px; }
  .seat.you { width: 150px; }
  .card { width: 50px; height: 71px; font-size: 19px; }
  .seat.you .cards .card { width: 50px; height: 71px; font-size: 19px; }
  #board .card { width: 50px; height: 71px; font-size: 19px; }
  button.action { min-height: 52px; font-size: 16px; }
  #tableBar { padding: 0 6px; }
  .brand { font-size: 17px; }
  #freeBanner { max-width: 720px; margin: 8px auto 0; text-align: center; font-weight: 600; }
}

/* --- v0.20.1 free-table cleanup (Jaxson's first playtest) ---
   At the free table the cash machinery steps aside: no Your Line
   panel, no burn session strip, no session board — chips aren't
   holdings and none of those numbers apply. The felt also loses
   its rail/outline here: this is the stripped-down version, and
   everybody knows what a poker table is. */
body.atFreeTable #wlPanel,
body.atFreeTable #sessionStrip,
body.atFreeTable #sessionBoard { display: none; }
body.atFreeTable #felt { background: radial-gradient(ellipse at center, #17a06b 0%, #0e8a5c 55%, #0a7a52 100%) padding-box;
  box-shadow: inset 0 0 60px rgba(0,0,0,.45); min-height: 400px; }
/* Jaxson, 2026-11-02 playtest: nobody sits at the top-center of
   the free table, so the felt can run shorter and the banners
   stay on screen without scrolling. Since v0.21.5 the seat at
   the top right (2 o'clock) is the hero's own. */
body.atFreeTable .seat.pos0 { left: 91%; top: 15%; }
/* And the corner seats ride higher while the board sits lower, so
   a corner seat's box can never cover a board card. v0.21.3's pass
   (top 20% / board 57%) still let Dex's box cover the first board
   card when his bet line wrapped to three lines (ALL-IN, 'bet
   6,328', 'chipkin') — v0.21.4 widens the gap (15% / 60%), drops
   the unit from the seat bet line so it wraps less, and layers
   the board above the seats outright. v0.21.5 rotates the free
   ring with the cash ring: the hero (pos0) plays from 2 o'clock
   (top right, above), pos1 takes bottom center, pos2 bottom
   left, pos3 top left. */
body.atFreeTable .seat.pos3 { left: 9%; top: 15%; }
/* v0.21.6: the board area rides higher at the free table (60% ->
   54%) — with the hero gone from bottom center, the AI seat there
   (pos1) has its cards right where the street line lands, and the
   line was wrapping onto them (Jaxson's 2026-11-04 screenshot).
   v0.21.7: higher still, to the center of the table (48%), at
   Jaxson's word after seeing v0.21.6 — the pot line and the
   street line beneath it sit up where the eye already is. */
body.atFreeTable #boardArea { top: 48%; }
/* v0.21.8: Nova (pos1) takes the far lower right corner, mirroring
   Dex — bottom center is empty now, so nothing sits under the
   board or the result text at all. */
body.atFreeTable .seat.pos1 { left: 91%; top: 82%; }
/* Dex (pos2) at the free table: v0.21.6 moved him north (80% ->
   68%) at Jaxson's word, but with the board area raised to the
   center (v0.21.7) his cards landed right under the pot/street
   lines. v0.21.8 settles the feng shui (Jaxson, 2026-11-04): the
   two left corners take the two left seats — Mara upper left
   (pos3, top 15%), Dex lower left here at 82% — and the middle
   of the left side stays empty, clear of the center text. */
body.atFreeTable .seat.pos2 { left: 9%; top: 82%; }
#freeBanner { max-width: 720px; margin: 8px auto 0; padding: 0 12px; text-align: center; font-weight: 600; font-size: 1.06rem; color: #ffffff; }
@media (max-width: 760px) {
  body { overflow-x: hidden; }
  .seat { width: 96px; }
  .seat.pos3 { left: 13%; }
  .seat.pos4 { left: 13%; }
  /* v0.21.6: the right-side seats pull in — at 87% the hero's wider
     box (150px) ran off the right edge of the phone screen and was
     clipped (Jaxson's 2026-11-04 screenshot). */
  .seat.pos0 { left: 80%; }
  .seat.pos1 { left: 85%; }
  #resultBanner { margin-top: 30px; }
  body.atFreeTable .seat.pos0 { left: 80%; }
  /* v0.21.9: Nova's far-lower-right corner (left 91% in the base
     rule) would clip her box/cards at the phone's right edge —
     the same clip the hero hit in v0.21.6. Pull her in to 85%
     on phones only; desktop keeps the 91% corner. */
  body.atFreeTable .seat.pos1 { left: 85%; }
  body.atFreeTable .seat.pos2 { left: 13%; }
  body.atFreeTable .seat.pos3 { left: 13%; }
  body.atFreeTable #felt { height: 56vh; min-height: 380px; }
  /* v0.21.10 (Jaxson, 2026-11-04): the action bar on phones was
     two rows tall — five flex buttons wrapped, All In landing on
     its own full-width row, and the dead button (Check when
     facing a bet, Call when it's free) sat there greyed. The bar
     itself already only exists on the hero's turn (the server
     sends legal actions only to the actor); now when it pops up
     it is ONE slim row: no wrapping, and a disabled action button
     hides outright instead of taking space — Check and Call are
     never both live, so the row reads as the combined Check/Call
     button other apps show. Raise controls still expand in place
     above the row when Raise is tapped. Desktop is untouched. */
  #actionBar { padding: 8px; }
  #actionBar .actions { flex-wrap: nowrap; gap: 6px; }
  #actionBar button.action { min-height: 50px; font-size: 15px; padding: 0 4px; white-space: nowrap; }
  #actionBar button.action:disabled { display: none; }
}

/* v0.22.0 — free-only mode (the /free client): the cash economy is
   absent from the free app. The wallet (deposit/withdraw), the fiat
   ATM/cashier panel, the burn/seat-time purchase panel and the
   operator link never render; the House panel stays hidden too (it
   is operator-only anyway). This is the display half of the mode —
   the server enforces the same restriction on free-app sessions
   (lobby filtered, cash-table joins refused). */
body.free-only #walletPanel,
body.free-only #fiatPanel,
body.free-only #burnPanel,
body.free-only #operatorRow,
body.free-only #housePanel { display: none !important; }

/* Tonk result banner + winner highlight (v0.25.1) */
.tonk-banner { text-align: center; font-size: 30px; font-weight: 800; letter-spacing: .5px; background: #f5c542; color: #1a1a1a; border-radius: 12px; padding: 16px 12px; margin: 10px 0; line-height: 1.25; }
.tonk-banner .sub { display: block; font-size: 16px; font-weight: 600; margin-top: 6px; }
/* Slim hand-result banner (v0.27.2): one compact line, auto-dismissing. */
.tonk-banner.slim { font-size: 15px; font-weight: 700; letter-spacing: 0; padding: 7px 10px; margin: 6px 0; border-radius: 8px; line-height: 1.3; cursor: pointer; }
.tonk-banner.slim .sub { display: inline; font-size: 14px; font-weight: 500; margin: 0 0 0 6px; }
.tonk-win { outline: 3px solid #f5c542; outline-offset: 3px; border-radius: 8px; }
/* Blackjack (v0.28.0): the three dealer boxes reuse the Tonk
   opponent box; outcomes and the sweep callout are its own. */
.bj-dealer-cards { display: flex; gap: 4px; justify-content: center; margin-top: 4px; min-height: 62px; align-items: flex-start; }
.bj-outcome { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.bj-outcome.win, .bj-outcome.blackjack { background: #f5c542; color: #1a1a1a; }
.bj-outcome.charlie { background: #f5c542; color: #1a1a1a; border: 2px solid #fff3b0; box-shadow: 0 0 8px #f5c542; }
.bj-dealer-now { outline: 2px solid #f5c542; border-radius: 10px; }
.bj-outcome.push { background: #5b6b60; color: #fff; }
.bj-outcome.lose { background: #8e1f24; color: #fff; }
.bj-sweep { text-align: center; font-size: 20px; font-weight: 800; letter-spacing: .5px; background: #f5c542; color: #1a1a1a; border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
/* Tonk fans + play animations (v0.25.3): Champions hold fanned
   hands side by side across the table; played cards fly. */
#tonkOpponents { display: flex; gap: 10px; justify-content: space-between; }
.tonk-opp { flex: 1 1 0; min-width: 100px; text-align: center; font-size: 14px; }
.tonk-fan { position: relative; height: 62px; margin-top: 4px; perspective: 600px; }
/* Tonk draw piles (v0.27.0): the deck and discard are the draw controls —
   tap to draw on your draw turn, or drag the discard down to your hand. */
.tonk-pile { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 8px; border-radius: 10px; border: 1px solid transparent; touch-action: none; user-select: none; -webkit-user-select: none; }
.tonk-pile-cards { min-height: 62px; display: flex; align-items: center; }
#tonkDeckCards .card { box-shadow: 2px 2px 0 #31503f, 4px 4px 0 #243d2f; }
.tonk-pile-live { cursor: pointer; border-color: #ffd76a; box-shadow: 0 0 0 1px #ffd76a inset, 0 0 10px rgba(255, 215, 106, .35); }
.tonk-drag-ghost { position: fixed; z-index: 999; pointer-events: none; opacity: .92; transform: translate(-50%, -50%) scale(1.06); }
#tonkMyHand.tonk-drop-hint { outline: 2px dashed #ffd76a; outline-offset: 4px; border-radius: 8px; }
.tonk-fan .card { position: absolute; left: 50%; top: 2px; width: 34px; height: 48px; margin-left: -17px; font-size: 13px; border-radius: 5px; transform-origin: 50% 150%; }
.tonk-fan .card.back { border-width: 2px; }
.tonk-flip { animation: tonkFanFlip .55s ease; }
@keyframes tonkFanFlip { from { transform: rotateY(72deg); opacity: .25; } to { transform: rotateY(0deg); opacity: 1; } }
.tonk-arrive { animation: tonkArrive .6s ease; border-radius: 8px; }
@keyframes tonkArrive { from { background: rgba(245, 197, 66, .28); } to { background: transparent; } }
.tonk-fly { position: fixed; width: 34px; height: 48px; font-size: 13px; border-radius: 5px; z-index: 80; pointer-events: none; }
