:root {
  color-scheme: dark;
  --bg: #1a0c10;
  --panel: #2a1418;
  --panel-raised: #35181c;
  --line: #5a3030;
  --muted: #d4c4b0;
  --text: #f7efe4;
  --lime: #e6c56a;
  --lime-dark: #b9923a;
  --orange: #e85d4c;
  --teal: #e6c56a;
  --felt-dark: #0a3d28;
  --felt-mid: #145c38;
  --felt-light: #1d7a4a;
  --gold: #e6c56a;
  --evergreen: #1f5a38;
  --cranberry: #c41e3a;
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 48% -12%, #5a1a22 0, transparent 42rem),
    radial-gradient(ellipse at 100% 45%, #143322 0, transparent 32rem),
    var(--bg);
  color: var(--text);
}
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}
[hidden] { display: none !important; }

.app-shell { width: min(1240px, 100%); margin: 0 auto; padding: 0 28px; }
.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #ffffff12;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .13em;
}
.brand strong { color: var(--lime); }
.brand-divider { margin: 0 7px; color: #70818a; }
.brand-mark {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border: 1px solid #c8fb6070;
  border-radius: 11px 11px 11px 3px;
  color: var(--lime);
  background: #c8fb6010;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -.04em;
  transform: skew(-5deg);
}
.test-pill, .notice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #c8fb6030;
  border-radius: 999px;
  color: #d7f6a2;
  background: #c8fb600b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
}
.test-pill { padding: 8px 11px; white-space: nowrap; }
.test-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 9px #c8fb60a0; }
main { padding: 38px 0 54px; }
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 26px;
  border-top: 1px solid #ffffff12;
  color: #73838d;
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(135deg, #14232b 0%, #101a23 65%, #111c24 100%);
  box-shadow: 0 24px 80px #0005;
}
.join-screen {
  display: grid;
  grid-template-columns: minmax(250px, .76fr) minmax(440px, 1.24fr);
  gap: clamp(32px, 6vw, 84px);
  padding: clamp(26px, 5vw, 58px);
}
.join-copy { align-self: start; padding-top: 7px; }
.eyebrow {
  margin: 0 0 9px;
  color: var(--lime);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.join-copy h1, .table-heading h1, .session-summary h2 {
  margin: 0;
  font-family: 'Barlow Condensed', Impact, sans-serif;
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: .98;
}
.join-copy > p:not(.eyebrow) { max-width: 360px; margin: 18px 0 0; color: #b4c2c5; font-size: 14px; line-height: 1.7; }
.notice {
  align-items: flex-start;
  gap: 10px;
  max-width: 370px;
  margin-top: 28px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #c4d7bd;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.5;
}
.notice-icon { flex: 0 0 auto; color: var(--lime); font-size: 16px; line-height: 1; }
.join-form { min-width: 0; }
.form-block { min-width: 0; margin: 0 0 17px; padding: 0; border: 0; }
.form-block > label, .form-block legend {
  display: block;
  margin-bottom: 8px;
  color: #d4dddc;
  font-size: 12px;
  font-weight: 700;
}
.join-form input[type='text'], .join-form input[type='number'], .join-form select {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid #354955;
  border-radius: 9px;
  color: var(--text);
  background: #0b141c;
  outline: none;
}
.join-form input:hover, .join-form select:hover { border-color: #61757e; }
.join-form input:focus, .join-form select:focus { border-color: var(--lime); box-shadow: 0 0 0 3px #c8fb6014; }
.join-form input::placeholder { color: #71828b; }
.picker-block { margin-top: 18px; }
.avatar-picker { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 7px; }
.avatar-option {
  min-width: 0;
  padding: 7px 3px 5px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: #0d171f;
  cursor: pointer;
}
.avatar-option:hover { border-color: #60737b; }
.avatar-option.is-selected { border-color: var(--lime); background: #c8fb6012; box-shadow: 0 0 0 1px #c8fb6020 inset; }
.avatar-option-art {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin: 0 auto 4px;
  border: 1px solid var(--avatar-accent);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--avatar-color), white 24%), var(--avatar-color) 68%);
  font-size: 22px;
}
.avatar-option-name { display: block; overflow: hidden; color: #b7c4c7; font-size: 9px; text-overflow: ellipsis; }
.team-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.team-option {
  min-width: 0;
  min-height: 61px;
  display: grid;
  grid-template-columns: 33px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid #2c3e49;
  border-radius: 10px;
  background: #0c151c;
  text-align: left;
  cursor: pointer;
}
.team-option:hover { border-color: #60737b; }
.team-option.is-selected { border-color: var(--team-secondary); background: color-mix(in srgb, var(--team-primary), #101a22 82%); box-shadow: 0 0 0 1px color-mix(in srgb, var(--team-secondary), transparent 60%) inset; }
.team-option-badge {
  width: 31px;
  height: 35px;
  display: grid;
  place-items: center;
  border: 2px solid var(--team-secondary);
  border-radius: 8px 8px 12px 12px;
  background: var(--team-primary);
  color: white;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px;
  font-weight: 900;
  text-shadow: 0 1px 2px #0008;
}
.team-option-name { overflow: hidden; color: #d9e0dd; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.team-option-code { color: #93a4a7; font-size: 9px; font-weight: 700; }
.picker-note { margin: 7px 0 0; color: #82928f; font-size: 10px; line-height: 1.45; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
.form-grid .form-block { margin-bottom: 12px; }
.form-grid select { cursor: pointer; }
.field-hint { margin: -3px 0 12px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.form-error { min-height: 16px; margin: 0 0 10px; color: #ff9b83; font-size: 12px; }

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid #3b4e58;
  border-radius: 9px;
  background: #1a2a34;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease, filter .15s ease;
}
.button:hover:not(:disabled) { border-color: #829499; transform: translateY(-1px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button-primary { border-color: #c8fb60; background: var(--lime); color: #18220f; box-shadow: 0 6px 20px #c8fb6024; }
.button-primary:hover:not(:disabled) { border-color: #e2ff9c; background: #d9ff89; }
.button-soft { border-color: #75e2d177; background: #15453f; color: #b8fff1; }
.button-quiet { border-color: #344854; background: #101b23; color: #d3dcdb; }
.join-button { width: 100%; min-height: 49px; justify-content: space-between; padding: 12px 16px; font-size: 14px; }

.game-screen { min-width: 0; }
.table-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 21px; }
.table-heading h1 { font-size: clamp(30px, 4vw, 42px); }
.heading-actions { display: flex; align-items: center; gap: 10px; }
.stack-hud { padding: 11px 14px; border: 1px solid #c8fb6038; border-radius: 8px; background: #c8fb600d; color: var(--lime); font-size: 13px; font-weight: 800; letter-spacing: .045em; white-space: nowrap; }
.heading-actions .button { min-height: 38px; padding: 8px 11px; font-size: 11px; }

.table-shell {
  position: relative;
  width: 100%;
  height: clamp(540px, 56vw, 640px);
  min-height: 540px;
  isolation: isolate;
  filter: drop-shadow(0 28px 24px #0006);
  background: #1a0f0c url('../assets/table_xmas.webp') center / 100% 100% no-repeat;
}
.table-rail {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 50% / 43%;
  background: none;
  box-shadow: none;
  pointer-events: none;
}
.felt {
  position: absolute;
  inset: 13px;
  overflow: visible;
  border: 0;
  border-radius: 50% / 42%;
  background: none;
  box-shadow: none;
}
.felt::after {
  display: none;
  content: none;
}
.felt-grain {
  display: none;
}
.seat-ring { position: absolute; z-index: 2; inset: 0; }
.player-seat {
  position: absolute;
  left: var(--seat-x);
  top: var(--seat-y);
  width: clamp(110px, 13.5vw, 154px);
  min-height: 80px;
  padding: 7px 8px 8px;
  border: 1px solid #9cb4b65c;
  border-top: 2px solid var(--avatar-accent, var(--gold, #e6c56a));
  border-radius: 12px;
  background: linear-gradient(150deg, #15232beF, #0d171fea);
  box-shadow: 0 7px 18px #00130d9c, inset 0 1px #ffffff0d;
  text-align: left;
  transform: translate(-50%, -50%);
  transition: opacity .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.seat-ring.is-crowded .player-seat { width: clamp(108px, 11vw, 128px); padding: 6px; }
.player-seat.is-human { border-color: var(--avatar-accent, var(--lime)); border-top-color: var(--lime); box-shadow: 0 0 0 2px #e6c56a33, 0 8px 19px #00130da8; }
.player-seat.is-turn { border-color: var(--teal); box-shadow: 0 0 0 3px #74e2d13c, 0 0 27px #74e2d135; }
.player-seat.is-turn.is-human { border-color: var(--lime); box-shadow: 0 0 0 3px #c8fb6040, 0 0 28px #c8fb6033; }
.player-seat.is-thinking { border-color: #86b6ff; box-shadow: 0 0 0 2px #86b6ff38, 0 0 24px #86b6ff30; animation: thinking-pulse .8s ease-in-out infinite alternate; }
.player-seat.is-winner { border-color: var(--lime); box-shadow: 0 0 0 2px #c8fb6040, 0 0 25px #c8fb6040; }
.player-seat.is-folded { opacity: .48; filter: grayscale(.65); }
.player-seat.is-all-in:not(.is-winner) { border-color: #ffca70; }
.seat-flags { position: absolute; top: -13px; right: 5px; display: flex; align-items: center; gap: 4px; }
.seat-marker {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 4px;
  border: 1px solid #dfe7dd;
  border-radius: 50%;
  background: #f4f4e9;
  color: #152017;
  box-shadow: 0 2px 5px #0008;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: -.03em;
}
.blind-marker { min-width: 23px; border-color: #6bd8c4; border-radius: 999px; background: #123d38; color: #b5fff0; font-size: 8px; }
.big-blind-marker { border-color: #f1c36e; background: #5b391e; color: #ffe4a2; }
.seat-identity { display: flex; align-items: center; gap: 6px; min-width: 0; }
.avatar-art { width: 31px; height: 31px; flex: 0 0 31px; filter: drop-shadow(0 2px 3px #0008); }
.seat-labels { min-width: 0; flex: 1; }
.seat-name-line { display: flex; align-items: center; min-width: 0; gap: 4px; }
.team-badge { width: 18px; height: 20px; flex: 0 0 18px; }
.seat-name { display: block; overflow: hidden; color: #f0f5f1; font-size: 11px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.you-tag { flex: 0 0 auto; padding: 2px 4px; border-radius: 4px; background: #c8fb60; color: #17220f; font-size: 7px; font-weight: 900; letter-spacing: .05em; }
.team-name { display: block; overflow: hidden; margin-top: 1px; color: #a9b9b8; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.seat-stack { display: flex; align-items: center; gap: 5px; margin: 5px 0 0 37px; color: #d7e2dd; font-size: 13px; line-height: 1; }
.seat-stack strong { font-variant-numeric: tabular-nums; }
.stack-unit { color: #7e9995; font-size: 9px; font-weight: 800; letter-spacing: .06em; }
.mini-chip-stack { position: relative; width: 18px; height: 13px; display: inline-block; flex: 0 0 18px; }
.mini-chip-stack i { position: absolute; left: 2px; width: 13px; height: 5px; border: 1px solid #e5ffd2; border-radius: 50%; background: #98cb4b; box-shadow: 0 1px 1px #07130b; }
.mini-chip-stack i:nth-child(1) { top: 1px; }
.mini-chip-stack i:nth-child(2) { top: 4px; background: #5a993b; }
.mini-chip-stack i:nth-child(3) { top: 7px; background: #cfed76; }
.seat-status { height: 0; overflow: hidden; margin: 0; color: transparent; font-family: 'Barlow Condensed', sans-serif; font-size: 9px; font-weight: 900; letter-spacing: .1em; line-height: 10px; text-align: center; }
.seat-status.has-status { height: 10px; overflow: visible; margin-top: 4px; color: #9bb2b0; }
.seat-status.winner-status { color: var(--lime); }
.seat-status.thinking-status { color: #b5d2ff; }
.seat-cards { min-height: 28px; display: flex; align-items: center; justify-content: center; gap: 2px; margin-top: 5px; }
.seat-cards.can-pick { cursor: pointer; }
.playing-card {
  position: relative;
  width: 32px;
  height: 44px;
  flex: 0 0 auto;
  display: block;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dfe7df;
  border-radius: 4px;
  background: linear-gradient(145deg, #fffef9, #e7e8dc);
  box-shadow: 0 2px 4px #0008;
  color: #142027;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 900;
  line-height: 1;
  user-select: none;
}
button.playing-card { cursor: pointer; }
.playing-card.is-red { color: #c43a3f; }
.card-index {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  pointer-events: none;
}
.card-index-tl { top: 1px; left: 2px; }
.card-index-br { right: 2px; bottom: 1px; transform: rotate(180deg); }
.card-rank { font-size: 9px; line-height: 1; }
.card-suit { margin-top: 0; font-size: 8px; line-height: 1; }
.card-pip {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 14px;
  pointer-events: none;
}
.playing-card.is-back {
  border-color: #d4af37;
  background-color: #7a1220;
  background-image:
    url('../assets/cards/back_xmas.png'),
    repeating-linear-gradient(45deg, #7a1220 0 7px, #14532d 7px 14px);
  background-size: 100% 100%, auto;
  background-repeat: no-repeat, repeat;
  box-shadow: 0 2px 4px #0008, inset 0 0 0 3px #d4af3780;
}
.playing-card.is-selected { border-color: #ffc15d; box-shadow: 0 0 0 2px #ffbd4e8c, 0 5px 10px #0008; transform: translateY(-8px); }
.seat-cards.can-pick .playing-card:hover { transform: translateY(-4px); }
.seat-cards.can-pick .playing-card.is-selected:hover { transform: translateY(-10px); }
.seat-bet {
  position: absolute;
  z-index: 5;
  left: calc(50% + var(--bet-x));
  top: calc(50% + var(--bet-y));
  min-width: 52px;
  padding: 6px 9px;
  border: 1px solid #84e2d8;
  border-radius: 999px;
  background: #103b37;
  box-shadow: 0 3px 8px #00140eaa;
  color: #c4fff2;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}
.seat-bet:not(.has-bet) { display: none; }

.table-center {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: min(56%, 510px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.center-kicker { color: #b1d6c0; font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 800; letter-spacing: .18em; text-shadow: 0 1px 3px #002516; }
.board { min-height: 69px; display: flex; align-items: center; justify-content: center; gap: clamp(4px, .8vw, 9px); }
.board .playing-card { width: 52px; height: 74px; border-radius: 7px; }
.board .card-rank { font-size: 13px; }
.board .card-suit { font-size: 11px; }
.board .card-pip { font-size: 22px; }
.pot-total {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid #d1f98f80;
  border-radius: 999px;
  background: #0b291eE8;
  box-shadow: 0 4px 15px #001a10a8;
  color: var(--lime);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  white-space: nowrap;
}
.pot-number { color: #f3ffd5; font-size: 21px; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.pot-unit { color: #9ebb9b; font-family: 'DM Sans', sans-serif; font-size: 8px; letter-spacing: .1em; }
.side-pot-list { width: min(100%, 350px); display: grid; gap: 4px; }
.side-pot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 9px;
  border: 1px solid #ddcf8c4d;
  border-radius: 7px;
  background: #172c22e8;
  color: #fff1b8;
  text-align: left;
}
.side-pot-info { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.side-pot-info strong { font-size: 8px; letter-spacing: .1em; }
.side-pot-info small { overflow: hidden; color: #b5c5ab; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.side-pot-row > b { flex: 0 0 auto; font-size: 11px; font-variant-numeric: tabular-nums; }
.chip-layer { position: absolute; z-index: 8; inset: 0; overflow: visible; pointer-events: none; }
.flight-chip {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px dashed #edffd2;
  border-radius: 50%;
  background: #9bcb4c;
  box-shadow: 0 2px 6px #0008;
}
.flight-chip.chip-alt { border-color: #d8ffb6; background: #55a84e; }

.winner-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
  padding: 16px 19px;
  border: 1px solid #c8fb6060;
  border-radius: 13px;
  background: linear-gradient(105deg, #273c23, #172d23 66%, #162a27);
  box-shadow: 0 7px 24px #0004;
}
.winner-icon { width: 37px; height: 37px; display: grid; place-items: center; flex: 0 0 37px; border-radius: 50%; background: #c8fb60; color: #1a2812; font-size: 23px; }
.winner-banner .eyebrow { margin-bottom: 3px; font-size: 10px; }
.winner-banner h2 { margin: 0; color: #f5ffdc; font-family: 'Barlow Condensed', sans-serif; font-size: 24px; line-height: 1.1; }
.winner-banner > div > p:last-child { margin: 4px 0 0; color: #c4d6b9; font-size: 12px; font-weight: 600; }
.turn-prompt { min-height: 0; margin: 9px 0; color: #c3d2cf; font-size: 12px; text-align: center; }
.turn-prompt:empty { display: none; }
.turn-prompt.is-error { padding: 11px; border: 1px solid #ff967455; border-radius: 8px; background: #c64d2b18; color: #ffb39c; }

.player-rack { margin: 12px 0 16px; }
.hero-tray {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 10px;
  padding: 12px 16px;
  border: 1px solid #526367;
  border-radius: 15px;
  background: #111d24;
  box-shadow: 0 12px 35px #0009, inset 0 1px #ffffff13;
}
.hero-tray[hidden], .player-rack[hidden] { display: none; }
.hero-tray-meta {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 7.5rem;
}
.hero-tray-label {
  color: var(--lime);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
}
.hand-strength {
  color: #f3ffd5;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
}
.hand-strength:empty { display: none; }
.draw-hint {
  max-width: 16rem;
  color: #b7c9c3;
  font-size: 11px;
  line-height: 1.35;
}
.hero-hand { display: flex; align-items: flex-end; justify-content: flex-start; gap: 10px; flex-wrap: wrap; padding-bottom: 4px; }
.hero-hand .playing-card { width: 76px; height: 106px; border-radius: 8px; overflow: hidden; box-shadow: 0 6px 14px #0008; }
.hero-hand .card-index-tl { top: 3px; left: 4px; }
.hero-hand .card-index-br { right: 4px; bottom: 3px; }
.hero-hand .card-rank { font-size: 16px; }
.hero-hand .card-suit { font-size: 14px; margin-top: 0; }
.hero-hand .card-pip { font-size: 28px; }

.player-rack {
  position: sticky;
  z-index: 12;
  bottom: 8px;
  margin: 12px 0 16px;
}
.action-dock {
  position: relative;
  z-index: 12;
  bottom: auto;
  display: grid;
  grid-template-columns: minmax(120px, .25fr) minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  margin: 0;
  padding: 14px;
  border: 1px solid #526367;
  border-radius: 15px;
  background: #111d24;
  box-shadow: 0 12px 35px #0009, inset 0 1px #ffffff13;
}
.action-dock.is-urgent {
  border-color: #ff5d5d;
  box-shadow: 0 0 0 2px #ff5d5d55, 0 12px 35px #0009;
}
.action-copy { display: flex; flex-direction: column; gap: 5px; color: #b3c3c2; font-size: 11px; }
.action-turn { color: var(--lime); font-family: 'Barlow Condensed', sans-serif; font-size: 12px; font-weight: 900; letter-spacing: .15em; }
.timer-warning { color: #ffb3a3; font-weight: 800; letter-spacing: .04em; }
.action-controls { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 9px; }
.decision-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); align-items: stretch; gap: 8px; width: 100%; }
.decision-row .button { min-width: 0; width: 100%; min-height: 48px; padding: 10px 8px; font-size: 14px; }
.decision-row .call-sub { display: block; margin-top: 2px; color: inherit; font-size: 10px; font-weight: 700; letter-spacing: .04em; opacity: .85; }
.action-controls > .button { min-width: 100px; }
.raise-box { min-width: min(100%, 370px); display: grid; grid-template-columns: auto minmax(120px, 1fr); align-items: center; gap: 7px 12px; width: 100%; }
.raise-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; grid-column: 1 / -1; }
.raise-label { color: #b9cbc5; font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.raise-output { color: var(--lime); font-size: 16px; font-variant-numeric: tabular-nums; font-weight: 800; }
.raise-slider { width: 100%; height: 23px; margin: 0; accent-color: var(--lime); cursor: pointer; }
.quick-bets { display: flex; flex-wrap: wrap; gap: 4px; }
.quick-bet {
  min-height: 25px;
  padding: 4px 7px;
  border: 1px solid #3b5057;
  border-radius: 6px;
  background: #0c171e;
  color: #b4c7c3;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}
.quick-bet:hover, .quick-bet.is-active { border-color: var(--lime); color: var(--lime); background: #c8fb6012; }
.raise-box > .button { grid-column: 1 / -1; min-height: 38px; }
.between-hands {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 15px 0;
  padding: 13px 15px;
  border: 1px solid #2d403d;
  border-radius: 11px;
  background: #10201b;
}
.between-hands p { margin: 0; color: #c4d3c9; font-size: 12px; }
#betweenControls { display: flex; flex-wrap: wrap; gap: 8px; }

.hand-log { margin-top: 22px; border: 1px solid #2a3b43; border-radius: 11px; background: #0e171d; }
.hand-log summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; color: #dde7e2; font-size: 12px; font-weight: 800; cursor: pointer; list-style: none; }
.hand-log summary::-webkit-details-marker { display: none; }
.hand-log summary::before { width: 7px; height: 7px; margin-right: 1px; border-right: 1.5px solid var(--lime); border-bottom: 1.5px solid var(--lime); content: ''; transform: rotate(-45deg); transition: transform .15s ease; }
.hand-log[open] summary::before { transform: rotate(45deg); }
.hand-log summary span:first-of-type { flex: 1; }
.log-count { color: #80948f; font-size: 10px; font-weight: 600; }
.hand-log pre { max-height: 245px; overflow: auto; margin: 0; padding: 0 15px 15px; border-top: 1px solid #24353d; color: #a9bab5; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; line-height: 1.75; white-space: pre-wrap; }
.table-disclaimer { margin: 16px 0 0; color: #85958d; font-size: 10px; text-align: center; }

.session-summary { max-width: 760px; margin: 35px auto; padding: clamp(25px, 5vw, 54px); }
.session-summary h2 { font-size: clamp(35px, 5vw, 52px); }
.summary-main { margin: 18px 0 12px; color: #d4dfd9; font-size: 14px; line-height: 1.7; }
.summary-disclaimer { margin: 0 0 22px; color: #9cafaa; font-size: 12px; line-height: 1.6; }

.deal-in { animation: deal-in .28s cubic-bezier(.22,.78,.3,1) both; animation-delay: var(--deal-delay, 0ms); }
.draw-in { animation: deal-in .25s cubic-bezier(.22,.78,.3,1) both; }
.board-in { animation: board-in .27s cubic-bezier(.18,.82,.28,1) both; animation-delay: var(--board-delay, 0ms); }
@keyframes deal-in { from { opacity: 0; transform: translateY(-9px) scale(.68) rotate(-8deg); } to { opacity: 1; transform: translateY(0) scale(1) rotate(0); } }
@keyframes board-in { from { opacity: 0; transform: translateY(-13px) scale(.76) rotate(4deg); } to { opacity: 1; transform: translateY(0) scale(1) rotate(0); } }
@keyframes thinking-pulse { from { box-shadow: 0 0 0 1px #86b6ff20; } to { box-shadow: 0 0 0 4px #86b6ff44, 0 0 20px #86b6ff25; } }

@media (min-width: 641px) and (max-height: 950px) {
  .game-screen { padding-bottom: 220px; }
  #actionDock { position: relative; bottom: auto; }
  #tableShell { height: min(520px, max(340px, calc(100vh - 300px))); min-height: 340px; }
  .table-shell { height: min(520px, max(340px, calc(100vh - 300px))); min-height: 340px; }
  .player-rack { position: sticky; bottom: 8px; }
}

@media (max-width: 850px) {
  .join-screen { grid-template-columns: minmax(0, .75fr) minmax(360px, 1.25fr); gap: 28px; padding: 30px; }
  .avatar-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .team-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .table-shell { height: 610px; }
  .player-seat { width: clamp(112px, 15vw, 140px); }
}

@media (max-width: 640px) {
  .app-shell { padding: 0 13px; }
  .site-header { min-height: 63px; }
  .brand { gap: 8px; font-size: 11px; letter-spacing: .1em; }
  .brand-mark { width: 30px; height: 30px; font-size: 17px; }
  .brand-divider { margin: 0 4px; }
  .test-pill { gap: 6px; padding: 7px 8px; font-size: 8px; letter-spacing: .05em; }
  main { padding: 20px 0 35px; }
  .join-screen { display: block; padding: 23px 17px; border-radius: 15px; }
  .join-copy h1 { font-size: 43px; }
  .join-copy > p:not(.eyebrow) { margin-top: 11px; font-size: 12px; }
  .notice { margin: 17px 0 23px; font-size: 10px; }
  .form-block { margin-bottom: 13px; }
  .avatar-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .team-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-option { grid-template-columns: 30px minmax(0, 1fr) auto; min-height: 54px; padding: 6px; }
  .team-option-badge { width: 28px; height: 31px; font-size: 9px; }
  .team-option-name { font-size: 9px; }
  .form-grid { column-gap: 9px; }
  .form-grid .form-block { margin-bottom: 11px; }
  .table-heading { align-items: flex-start; margin-bottom: 13px; }
  .table-heading h1 { font-size: 32px; }
  .table-heading .eyebrow { font-size: 10px; }
  .heading-actions { flex-direction: column; align-items: flex-end; gap: 6px; }
  .stack-hud { padding: 7px 8px; font-size: 9px; }
  .heading-actions .button { min-height: 32px; padding: 6px 9px; font-size: 9px; }
  .table-shell { height: clamp(370px, 103vw, 445px); min-height: 370px; margin: 0 -1px; }
  .game-screen { padding-bottom: 430px; }
  .table-rail { border-radius: 50% / 42%; }
  .felt { inset: 10px; border-radius: 50% / 42%; }
  .player-seat { width: min(31vw, 120px); min-height: 67px; padding: 5px 5px 6px; border-radius: 10px; }
  .seat-ring.is-crowded .player-seat { width: min(20vw, 76px); min-height: 0; padding: 3px; border-radius: 8px; }
  .seat-ring.is-crowded .avatar-art { width: 18px; height: 18px; flex-basis: 18px; }
  .seat-ring.is-crowded .team-badge { width: 11px; height: 13px; flex-basis: 11px; }
  .seat-ring.is-crowded .seat-name { font-size: 7px; }
  .seat-ring.is-crowded .team-name { display: none; }
  .seat-ring.is-crowded .seat-stack { gap: 1px; margin: 3px 0 0 19px; font-size: 6px; }
  .seat-ring.is-crowded .stack-unit { font-size: 5px; }
  .seat-ring.is-crowded .seat-status { font-size: 6px; line-height: 8px; }
  .seat-ring.is-crowded .seat-status.has-status { height: 8px; margin-top: 2px; }
  .seat-ring.is-crowded .seat-cards { min-height: 30px; gap: 0; margin-top: 2px; }
  .seat-ring.is-crowded .playing-card { width: 20px; height: 28px; }
  .seat-ring.is-crowded .card-rank, .seat-ring.is-crowded .card-suit { font-size: 11px; }
  .seat-flags { top: -11px; right: 3px; gap: 2px; }
  .seat-marker { min-width: 17px; height: 17px; padding: 0 3px; font-size: 8px; }
  .blind-marker { min-width: 20px; font-size: 7px; }
  .seat-identity { gap: 4px; }
  .avatar-art { width: 25px; height: 25px; flex-basis: 25px; }
  .team-badge { width: 15px; height: 17px; flex-basis: 15px; }
  .seat-name { font-size: 9px; }
  .team-name { font-size: 7px; }
  .you-tag { padding: 2px 3px; font-size: 6px; }
  .seat-stack { gap: 3px; margin: 4px 0 0 29px; font-size: 8px; }
  .mini-chip-stack { transform: scale(.8); transform-origin: center left; }
  .stack-unit { font-size: 6px; }
  .seat-status { font-size: 8px; }
  .seat-cards { min-height: 30px; gap: 1px; margin-top: 4px; }
  .playing-card { width: 26px; height: 36px; border-radius: 3px; }
  .card-rank { font-size: 12px; }
  .card-suit { font-size: 12px; }
  .board { min-height: 60px; gap: 3px; }
  .board .playing-card { width: clamp(38px, 10vw, 46px); height: clamp(54px, 14.5vw, 66px); border-radius: 5px; }
  .board .card-rank { font-size: 11px; }
  .board .card-suit { font-size: 9px; }
  .board .card-pip { font-size: 16px; }
  .table-center { width: 61%; gap: 5px; }
  .center-kicker { font-size: 9px; }
  .pot-total { gap: 5px; padding: 6px 9px; font-size: 9px; }
  .pot-number { font-size: 18px; }
  .pot-unit { font-size: 7px; }
  .side-pot-row { padding: 4px 6px; }
  .side-pot-info strong, .side-pot-info small { font-size: 7px; }
  .side-pot-row > b { font-size: 9px; }
  .seat-bet { min-width: 35px; padding: 3px 4px; font-size: 7px; }
  .winner-banner { gap: 10px; margin: 13px 0; padding: 12px; }
  .winner-icon { width: 31px; height: 31px; flex-basis: 31px; font-size: 19px; }
  .winner-banner h2 { font-size: 20px; }
  .winner-banner > div > p:last-child { font-size: 10px; }
  .player-rack { position: fixed; left: max(8px, env(safe-area-inset-left)); right: max(8px, env(safe-area-inset-right)); bottom: max(8px, env(safe-area-inset-bottom)); z-index: 12; max-width: 1240px; margin: 0 auto; }
  .hero-tray { flex-direction: column; align-items: stretch; gap: 8px; margin: 0 0 8px; padding: 10px 12px; }
  .hero-tray-label { font-size: 11px; }
  .hero-hand { justify-content: center; gap: 6px; }
  .hero-hand .playing-card { width: 56px; height: 80px; border-radius: 7px; }
  .hero-hand .card-rank { font-size: 13px; }
  .hero-hand .card-suit { font-size: 11px; }
  .hero-hand .card-pip { font-size: 22px; }
  .keep-badge, .discard-badge { font-size: 7px; padding: 1px 4px; }
  .action-dock { position: relative; left: auto; right: auto; bottom: auto; display: grid; margin: 0; padding: 11px; border-radius: 13px; }
  .action-copy { flex-direction: row; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 10px; }
  .action-turn { font-size: 11px; }
  .action-controls { justify-content: stretch; gap: 7px; }
  .decision-row { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .decision-row .button { min-width: 0; min-height: 41px; padding: 8px 7px; font-size: 11px; }
  .action-controls > .button { width: 100%; }
  .raise-box { width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .raise-heading { grid-column: 1; }
  .raise-slider { height: 26px; }
  .quick-bets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .quick-bet { min-height: 31px; padding: 5px 4px; font-size: 9px; }
  .raise-box > .button { grid-column: 1; min-height: 42px; }
  .between-hands { align-items: flex-start; flex-direction: column; padding: 11px; }
  #betweenControls { width: 100%; }
  #betweenControls .button { flex: 1; }
  .hand-log { margin-top: 15px; }
  .site-footer { padding: 14px 0 20px; font-size: 9px; }
}

@media (max-width: 360px) {
  .app-shell { padding-right: 9px; padding-left: 9px; }
  .test-pill { font-size: 7px; }
  .player-seat { width: 29vw; }
  .table-center { width: 65%; }
  .board .playing-card { width: 34px; height: 50px; }
  .hero-hand .playing-card { width: 50px; height: 72px; }
  .hero-hand .card-rank { font-size: 12px; }
  .hero-hand .card-suit { font-size: 10px; }
  .hero-hand .card-pip { font-size: 18px; }
}

/* Five-Card Draw: overlap the five seat cards so they always fit inside the seat box. */
.seat-ring.is-draw .seat-cards { gap: 0; }
.seat-ring.is-draw .seat-cards > .playing-card + .playing-card { margin-left: min(2px, calc((100% - 160px) / 4)); }
@media (max-width: 640px) {
  .seat-ring.is-draw .seat-cards > .playing-card + .playing-card { margin-left: min(1px, calc((100% - 130px) / 4)); }
  .seat-ring.is-draw.is-crowded .seat-cards > .playing-card + .playing-card { margin-left: min(-6px, calc((100% - 100px) / 4)); }
}

/* Lobby: preset table tiles + segmented pickers */
.table-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.table-option {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 13px 14px 12px;
  border: 1px solid #2c3e49;
  border-radius: 14px;
  background: linear-gradient(150deg, #13232b, #0c151c 70%);
  text-align: left;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.table-option:hover { border-color: #60737b; transform: translateY(-1px); }
.table-option.is-selected { border-color: var(--lime); background: linear-gradient(150deg, #1f3a22, #0f1d18 70%); box-shadow: 0 0 0 1px #c8fb6040 inset, 0 8px 24px #c8fb6018; }
.table-option.is-selected::after { position: absolute; top: 10px; right: 11px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--lime); color: #17220f; content: '✓'; font-size: 12px; font-weight: 900; }
.table-option-top { display: flex; align-items: center; gap: 8px; padding-right: 24px; }
.table-option-icon { font-size: 20px; line-height: 1; }
.table-option-tag { overflow: hidden; color: #93a4a7; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.table-option-name { color: #f3f6f4; font-family: 'Barlow Condensed', Impact, sans-serif; font-size: 22px; font-weight: 800; line-height: 1.05; }
.table-option-stats { display: flex; gap: 16px; }
.table-option-stat { display: flex; flex-direction: column; gap: 1px; }
.table-option-stat small { color: #82928f; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.table-option-stat strong { color: var(--lime); font-size: 17px; font-variant-numeric: tabular-nums; }
.table-option-unit { color: #6f8288; font-size: 8px; font-weight: 700; letter-spacing: .1em; }
.lobby-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.seg-picker { display: flex; gap: 6px; }
.seg-option {
  flex: 1 1 0;
  min-width: 0;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 7px 6px;
  border: 1px solid #2c3e49;
  border-radius: 10px;
  background: #0c151c;
  cursor: pointer;
}
.seg-option:hover { border-color: #60737b; }
.seg-option.is-selected { border-color: var(--lime); background: #c8fb6012; box-shadow: 0 0 0 1px #c8fb6020 inset; }
.seg-option strong { color: #f0f5f1; font-size: 13px; font-weight: 900; letter-spacing: .04em; }
.seg-option.is-selected strong { color: var(--lime); }
.seg-option small { overflow: hidden; max-width: 100%; color: #82928f; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.seat-option strong { font-size: 18px; }
@media (max-width: 850px) {
  .lobby-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 640px) {
  .table-picker { gap: 8px; }
  .table-option { padding: 11px 10px 10px; gap: 5px; border-radius: 12px; }
  .table-option-name { font-size: 19px; }
  .table-option-stats { gap: 10px; }
  .table-option-stat strong { font-size: 14px; }
  .table-option-tag { font-size: 8px; }
}
@media (max-width: 360px) {
  .table-option { padding: 10px 8px 9px; }
  .table-option-name { font-size: 17px; }
  .table-option-stat strong { font-size: 13px; }
  .table-option-stats { gap: 8px; }
}

.player-seat.is-open { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 1px dashed #9cb4b680; border-top: 1px dashed #9cb4b680; background: #0d171f99; box-shadow: none; text-align: center; }
.open-seat-title { color: #c4d3c9; font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 900; letter-spacing: .14em; }
.open-seat-sub { color: #82928f; font-size: 8px; }
.queue-hud { border-color: #74e2d155; background: #74e2d10d; color: #b8fff1; }
.lobby-note { margin: 0 0 14px; padding: 11px 13px; border: 1px solid #74e2d155; border-radius: 10px; background: #74e2d10d; color: #c4fff2; font-size: 12px; line-height: 1.5; }
@media (max-width: 640px) {
  .seat-ring.is-crowded .player-seat.is-open { min-height: 50px; }
  .seat-ring.is-crowded .open-seat-title { font-size: 7px; }
  .seat-ring.is-crowded .open-seat-sub { display: none; }
}

/* Shot clock: draining bar under the acting seat + number on the action bar; red pulse in the last 5s */
.player-seat.has-clock { border-color: var(--lime); }
.player-seat.has-clock::after {
  position: absolute; z-index: 6; left: 7px; right: 7px; bottom: -7px; height: 5px;
  border-radius: 3px; content: '';
  background: linear-gradient(90deg, var(--lime) calc(var(--clock, 1) * 100%), #ffffff26 0);
  box-shadow: 0 0 8px #c8fb6060;
}
.player-seat.has-clock.is-urgent { border-color: #ff5d5d; animation: clock-pulse .5s ease-in-out infinite alternate; }
.player-seat.has-clock.is-urgent::after { background: linear-gradient(90deg, #ff5d5d calc(var(--clock, 1) * 100%), #ffffff26 0); box-shadow: 0 0 10px #ff5d5d90; }
@keyframes clock-pulse { from { box-shadow: 0 0 0 2px #ff5d5d40, 0 0 12px #ff5d5d30; } to { box-shadow: 0 0 0 4px #ff5d5d70, 0 0 24px #ff5d5d60; } }
.turn-clock { display: inline-block; min-width: 30px; margin-left: 6px; padding: 1px 6px; border-radius: 999px; background: #c8fb6020; color: var(--lime); font-variant-numeric: tabular-nums; text-align: center; }
.turn-clock:empty { display: none; }
.turn-clock.is-urgent { background: #ff5d5d; color: #fff; animation: clock-blink .5s ease-in-out infinite alternate; }
@keyframes clock-blink { from { opacity: 1; } to { opacity: .55; } }
/* leftovers: let tile taglines and the action hint wrap instead of being cut off */
.table-option-tag { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; }
#actionHint { min-width: 0; text-align: right; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Classic court and ace faces (David Bellot SVG-cards, LGPL).
   Corner rank and suit stay visible at the same size as number cards. */
.playing-card.is-court, .playing-card.is-ace {
  padding: 0;
  border: 1px solid #dfe7df;
  background-color: #fffef9;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
}
.playing-card.is-court .card-index,
.playing-card.is-ace .card-index {
  padding: 1px 2px;
  border-radius: 2px;
  background: #fffef9f0;
}
.playing-card.is-court .card-rank, .playing-card.is-court .card-suit,
.playing-card.is-ace .card-rank, .playing-card.is-ace .card-suit,
.hero-hand .playing-card.is-court .card-rank,
.hero-hand .playing-card.is-court .card-suit,
.hero-hand .playing-card.is-ace .card-rank,
.hero-hand .playing-card.is-ace .card-suit { visibility: visible; }
.playing-card.court-J.suit-s { background-image: url('../assets/cards/face_Js.png'); }
.playing-card.court-J.suit-h { background-image: url('../assets/cards/face_Jh.png'); }
.playing-card.court-J.suit-c { background-image: url('../assets/cards/face_Jc.png'); }
.playing-card.court-J.suit-d { background-image: url('../assets/cards/face_Jd.png'); }
.playing-card.court-Q.suit-s { background-image: url('../assets/cards/face_Qs.png'); }
.playing-card.court-Q.suit-h { background-image: url('../assets/cards/face_Qh.png'); }
.playing-card.court-Q.suit-c { background-image: url('../assets/cards/face_Qc.png'); }
.playing-card.court-Q.suit-d { background-image: url('../assets/cards/face_Qd.png'); }
.playing-card.court-K.suit-s { background-image: url('../assets/cards/face_Ks.png'); }
.playing-card.court-K.suit-h { background-image: url('../assets/cards/face_Kh.png'); }
.playing-card.court-K.suit-c { background-image: url('../assets/cards/face_Kc.png'); }
.playing-card.court-K.suit-d { background-image: url('../assets/cards/face_Kd.png'); }
.playing-card.ace-s { background-image: url('../assets/cards/face_As.png'); }
.playing-card.ace-h { background-image: url('../assets/cards/face_Ah.png'); }
.playing-card.ace-c { background-image: url('../assets/cards/face_Ac.png'); }
.playing-card.ace-d { background-image: url('../assets/cards/face_Ad.png'); }

/* Falling snow: a few layered dots, cheap to paint. */
.snow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  background-image:
    radial-gradient(2px 2px at 12% 18%, #fff8, transparent 60%),
    radial-gradient(2px 2px at 78% 12%, #fff6, transparent 60%),
    radial-gradient(1.5px 1.5px at 36% 64%, #fff7, transparent 60%),
    radial-gradient(2px 2px at 62% 82%, #fff5, transparent 60%),
    radial-gradient(1px 1px at 8% 88%, #fff6, transparent 60%),
    radial-gradient(2px 2px at 92% 46%, #fff4, transparent 60%),
    radial-gradient(1.5px 1.5px at 48% 28%, #fff6, transparent 60%),
    radial-gradient(2px 2px at 28% 76%, #fff5, transparent 60%);
  animation: snow-fall 22s linear infinite;
}
.snow::before, .snow::after {
  position: absolute;
  inset: 0;
  content: '';
  background-image:
    radial-gradient(2px 2px at 22% 8%, #fff7, transparent 60%),
    radial-gradient(1px 1px at 70% 36%, #fff5, transparent 60%),
    radial-gradient(2px 2px at 84% 68%, #fff6, transparent 60%),
    radial-gradient(1.5px 1.5px at 40% 92%, #fff5, transparent 60%);
  animation: snow-fall 32s linear infinite;
}
.snow::after { animation-duration: 18s; opacity: .6; }
@keyframes snow-fall {
  from { transform: translateY(-5%); }
  to { transform: translateY(5%); }
}
@media (prefers-reduced-motion: reduce) {
  .snow, .snow::before, .snow::after { animation: none; }
}


/* v7: KEEP / DISCARD badges, lobby bankroll, last-hand review, leave confirm, bot tag. */
.keep-badge, .discard-badge {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  padding: 2px 5px;
  border-radius: 4px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  pointer-events: none;
  white-space: nowrap;
}
.keep-badge { background: #c8fb60; color: #18220f; }
.discard-badge { background: #c41e3a; color: #fff; }
.playing-card.is-kept { transform: translateY(-6px); box-shadow: 0 0 0 2px #c8fb608c, 0 6px 12px #0008; }
.playing-card.is-discard {
  transform: translateY(6px);
  opacity: .78;
  filter: grayscale(.25);
  box-shadow: 0 0 0 2px #c41e3a99;
}
.bot-tag {
  flex: 0 0 auto;
  padding: 2px 4px;
  border-radius: 4px;
  background: #2a3d48;
  color: #c9d9d6;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .06em;
}
.lobby-bankroll {
  margin: 18px 0 0;
  padding: 10px 14px;
  border: 1px solid #c8fb6038;
  border-radius: 10px;
  background: #c8fb600d;
  color: var(--lime);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .03em;
  max-width: 370px;
}
.timer-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: #d4dddc;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.timer-toggle input { width: 18px; height: 18px; accent-color: var(--lime); }
.last-hand {
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 1px solid #2d403d;
  border-radius: 12px;
  background: #10201b;
}
.last-hand-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.last-hand h2 { margin: 0; color: #f5ffdc; font-family: 'Barlow Condensed', sans-serif; font-size: 22px; line-height: 1.15; }
.last-hand-cards { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 0; margin: 8px 0; }
.last-hand-gap { color: #7e9995; padding: 0 4px; }
.last-hand-cards .playing-card { width: 46px; height: 66px; border-radius: 6px; }
.last-hand-cards .card-rank { font-size: 12px; }
.last-hand-cards .card-suit { font-size: 10px; }
.last-hand-rank, .last-hand-pay { margin: 4px 0 0; color: #d4dfd9; font-size: 13px; font-weight: 700; }
.last-hand-actions { max-height: 8.5rem; overflow: auto; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid #24353d; color: #a9bab5; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; line-height: 1.65; white-space: pre-wrap; }
.last-hand-actions:empty { display: none; }
.leave-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #0b0a0cd9;
}
.leave-dialog {
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid #526367;
  border-radius: 16px;
  background: #151d22;
  box-shadow: 0 18px 50px #000a;
}
.leave-dialog h2 { margin: 0 0 8px; font-family: 'Barlow Condensed', sans-serif; font-size: 28px; }
.leave-dialog p { margin: 0 0 18px; color: #c4d3c9; font-size: 14px; line-height: 1.5; }
.leave-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 640px) {
  .lobby-bankroll { font-size: 12px; }
  .last-hand-head { flex-direction: column; align-items: stretch; }
  .hand-strength { font-size: 12px; }
  .seat-stack { font-size: 11px; }
  .bot-tag { font-size: 6px; }
}
