:root {
  color-scheme: dark;
  font: 16px/1.45 system-ui, sans-serif;
  color: #f4eddf;
  background: #101914;
  --panel: #19251d;
  --line: #455449;
  --gold: #edbb70;
  --muted: #bcc8be;
}
* { box-sizing: border-box; }
body { margin: 0; }
header {
  min-height: 64px;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding: .65rem clamp(.75rem, 4vw, 3rem);
  background: #17211b;
  border-bottom: 1px solid var(--line);
}
.brand {
  margin-left: .16em; white-space: nowrap; letter-spacing: -.033em;
  font: 700 clamp(1.35rem, 3.4vw, 1.625rem)/1 Georgia, serif;
}
.brand-card {
  display: inline-block; position: relative; isolation: isolate; width: .8em; margin-right: .035em; text-align: center;
}
.brand-card svg {
  position: absolute; z-index: -1; left: -.19em; bottom: -.19em; width: 1.06em; height: 1.38em; transform: rotate(-10deg);
}
.brand-card span { display: inline-block; transform: translate(.01em, .04em); }
.brand-hold { color: #efc481; }
.brand-hold svg { width: .79em; height: .71em; vertical-align: -.018em; margin-inline: .045em .025em; }
#account:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; }
.nick { font-weight: 700; }
main { width: min(100% - 1.5rem, 1440px); margin: 1rem auto 2rem; }
h1, h2, h3, p { margin: 0; }
h1 { font: 700 clamp(2rem, 5vw, 3rem) Georgia, serif; }
h2 { font: 700 1.25rem Georgia, serif; }
h3 { font-size: 1rem; }
.muted { color: var(--muted); font-size: .9rem; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
button, input {
  font: inherit;
  min-height: 44px;
  border: 1px solid #65786a;
  border-radius: 7px;
  padding: .45rem .72rem;
  color: inherit;
  background: #202e25;
}
button { cursor: pointer; font-weight: 650; }
button:hover:not(:disabled) { filter: brightness(1.2); }
button:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
button:disabled { cursor: default; opacity: .5; }
.primary { color: #241810; background: var(--gold); border-color: var(--gold); }
.quiet { background: transparent; }
.login { margin: 8vh auto; width: min(100%, 420px); padding: 1.5rem; display: grid; gap: .9rem; }
.login label { display: grid; gap: .35rem; }
.error { color: #f9a99f; }
.error:empty, #notice:empty { display: none; }
:root[data-game-background] body {
  min-height: 100dvh;
  background: radial-gradient(ellipse at 45% 12%, var(--lobby-wash), var(--lobby-shadow)),
    var(--lobby-felt) center / cover fixed var(--lobby-felt-color);
}
.section-head, .room, .game-head, .toolbar, .actions {
  display: flex; align-items: center; gap: .55rem; flex-wrap: wrap;
}
.section-head, .room { justify-content: space-between; }
.table-list { display: grid; gap: .5rem; margin-top: 1rem; }
.table-list:empty { display: none; }
.room, .invite { padding: .7rem .85rem; }
.invite { display: grid; gap: .5rem; margin-top: .6rem; }
.toolbar { margin-bottom: .7rem; }
.mobile-lobby { display: none; }
.toolbar:not(:has(> :not(.mobile-lobby))) { margin-bottom: 0; }
.surface { display: grid; gap: .75rem; }
.surface:not(.split) { max-width: 950px; margin-inline: auto; }
.surface.split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.game { min-width: 0; padding: .65rem; }
.game-head { justify-content: space-between; margin-bottom: .6rem; }
.felt {
  position: relative;
  min-height: 350px;
  height: clamp(350px, 53vh, 520px);
  margin: 0 auto;
  border: clamp(6px, 1.2vw, 15px) solid #292e29;
  border-radius: 44%;
  background: radial-gradient(ellipse at center, #20543d, #133e2b 75%);
  box-shadow: inset 0 0 0 1px #6a7158, 0 8px 24px #0005;
}
.seat {
  width: min(26%, 108px);
  position: absolute;
  transform: translate(-50%, -50%);
  text-align: center;
  background: #13221a;
  border: 1px solid #698072;
  border-radius: 9px;
  padding: 4px;
  font-size: .83rem;
  z-index: 1;
}
.seat.turn { border: 2px solid var(--gold); }
.seat-0 { left: 50%; top: 87%; }
.seat-1 { left: 13%; top: 56%; }
.seat-2 { left: 28%; top: 15%; }
.seat-3 { left: 72%; top: 15%; }
.seat-4 { left: 87%; top: 56%; }
.seat strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portrait {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  margin: auto; color: #192019; font-weight: 800; background: #b9cab2;
}
.stack { color: #f1ca88; font-variant-numeric: tabular-nums; }
.empty { width: 100%; min-height: 44px; padding: 3px; font-size: .75rem; border-style: dashed; }
.bet {
  position: absolute; top: 0; right: 0; color: #20180d; background: #efd6a1;
  padding: 2px 4px; border-radius: 6px; font-size: .7rem;
}
.bet { top: auto; bottom: 0; }
.center {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%,-50%);
  width: 55%; text-align: center;
}
.board, .pair { display: flex; justify-content: center; gap: 3px; }
.board { margin: .35rem 0; }
.card {
  display: inline-grid; place-items: center; flex: 0 1 45px; min-width: 0; height: 55px;
  border-radius: 5px; color: #1c241e; background: #fff1d7;
  font-size: clamp(.75rem, 1.9vw, 1.12rem); font-weight: 850;
}
.pair .card { flex-basis: 26px; height: 29px; font-size: .72rem; }
.card.red { color: #99253b; }
.card.back { background: #533861; color: #f0d598; border: 1px solid #bd9b63; }
.pot, .result { font-size: .82rem; overflow-wrap: anywhere; }
.result { color: #f1ca88; }
.game-controls { display: flex; flex-wrap: wrap; align-items: center; min-height: 56px; gap: .5rem; padding-top: .55rem; }
.poker-actions, .bet-editor { display: grid; width: 100%; gap: .4rem; }
.poker-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bet-editor { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.bet-editor input { width: 100%; min-width: 0; accent-color: var(--gold); }
.fold-action { background: #3e2929; border-color: #875553; }
.felt {
  border-color: #262824;
  box-shadow: inset 0 0 0 1px #b18a4e, inset 0 0 42px #071b10a0, 0 8px 24px #0007, 0 0 0 1px #595344;
  background: radial-gradient(ellipse at 50% 38%, #20523a, #123623 82%);
}
.seat.winner { border-color: var(--gold); box-shadow: 0 0 14px #edbb7050; }
.pot {
  display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
  min-width: 5.5rem; padding: .18rem .55rem; border-radius: 999px; background: #142f22;
}
.flying-chip {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 3px dashed #fff0c9;
  border-radius: 50%;
  background: #a36427;
  box-shadow: 0 3px 0 #543017;
  z-index: 3;
  pointer-events: none;
}
.game.panel { background: #141715; border-color: #353834; }
.game-head { padding: .2rem .4rem .55rem; border-bottom: 1px solid #343832; }
.game-head h2 { color: #f6ead0; overflow-wrap: anywhere; }
.felt {
  border: 13px solid #292a27;
  background: radial-gradient(ellipse at 50% 35%, #245039, #123724 78%);
  box-shadow: inset 0 0 0 1px #9e7c49, inset 0 0 38px #071b10a0,
    0 0 0 2px #373832, 0 9px 18px #0008;
}
.seat { background: transparent; border: 0; padding: 0; }
.seat strong, .seat .stack { text-shadow: 0 2px 3px #08150e; }
.seat strong { color: #f6ecd7; }
.seat .portrait {
  width: 38px;
  height: 38px;
  margin-bottom: .14rem;
  border: 2px solid #d6b982;
  background: radial-gradient(circle at 34% 28%, #eddbb6, #aa8053);
  color: #332316;
}
.seat.turn, .seat.winner { border: 0; box-shadow: none; }
.seat.turn .portrait, .seat.winner .portrait {
  border-color: #f5bf65;
  box-shadow: 0 0 0 2px #a8722f, 0 0 13px #ffc16d88;
}
.seat-0 { top: 85%; }
.center { top: 45%; }
.board { gap: .3rem; }
.board .card {
  flex-basis: 64px;
  height: 82px;
  background: linear-gradient(145deg, #fff7e4, #ead9b8);
  border: 1px solid #bfac87;
  box-shadow: 0 3px 7px #0005;
}
.own-seat .pair .card { flex-basis: 29px; height: 33px; }
.pot { border: 1px solid #ad8953; color: #f6ead0; }
.game-controls { border-top: 1px solid #343832; margin-top: .6rem; }
.poker-actions button:nth-child(2) { background: #244432; border-color: #5f8369; }
.poker-actions .primary { background: #e8b56b; }
.actions input { width: 5.5rem; }
.turn-label { color: var(--gold); }
.countdown { font-variant-numeric: tabular-nums; }
.account-avatar {
  display: grid; place-items: center; width: 33px; height: 33px;
  border: 1px solid #d4ac70; border-radius: 50%; background: #3b3023; color: #f3c889;
}
.account-profile {
  display: flex; align-items: center; gap: .55rem; text-align: left;
  padding: .3rem .55rem; border-radius: 999px; border-color: #776342;
}
.account-balance {
  display: flex; align-items: center; padding: .28rem .5rem; border: 1px solid #9f825580;
  border-radius: 999px; background: linear-gradient(#242921, #161c17); font-size: .8rem;
}
.chip-balance { display: inline-flex; align-items: center; gap: .25rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wallet-chip {
  box-sizing: border-box; display: inline-grid; place-items: center; flex: none;
  width: .85rem; height: .85rem; border-radius: 50%;
  border: 2px dashed var(--chip-edge); background: var(--chip-color);
  box-shadow: 0 0 0 1px var(--chip-color), 0 1px 3px #0008;
}
.wallet-chip::after { content: ''; width: 60%; aspect-ratio: 1; border: 1px solid var(--chip-edge); border-radius: 50%; }
.wallet-chip-cash { --chip-color: #286cab; --chip-edge: #c4e5ff; }
.wallet-chip-tickets { --chip-color: #7748a8; --chip-edge: #eed5ff; }
.profile-balance { display: flex; flex-wrap: wrap; column-gap: .75rem; row-gap: .25rem; }
.account-chevron {
  display: block; flex: none; width: .46rem; height: .46rem; margin-inline: .12rem .18rem;
  border: solid #d8b375; border-width: 0 1.5px 1.5px 0; transform: translateY(-.13rem) rotate(45deg);
}
.account-profile:hover .account-chevron { border-color: #ffdfa6; }
.profile-heading { display: flex; align-items: center; gap: .65rem; }
.profile-heading .account-avatar { width: 44px; height: 44px; flex: none; font-weight: 700; }
.profile-heading form { margin-inline-start: auto; }
.profile-heading p { margin: 0; color: #edca8f; }
.profile-heading h2 { overflow-wrap: anywhere; }
.profile-footer { display: grid; gap: .35rem; }
#profile-logout { color: #f2c4b8; background: #352321; border-color: #86564d; }
.password-form, .password-form label { display: grid; gap: .4rem; }
.password-form { gap: .7rem; }
.password-form small { color: var(--muted); margin-top: -.4rem; }
.password-form p.error { margin: 0; }
.password-form p.error:empty { display: none; }
.profile-edit { width: 100%; margin-top: .9rem; }
.profile-photo { display: block; width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; border-radius: inherit; }
#collection-dialog { width: min(100% - 1.5rem, 38rem); }
.collection-tabs {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; margin-block: .9rem;
  padding: .3rem; border: 1px solid var(--line); border-radius: 10px; background: #111d16;
}
.collection-tabs button { min-width: 0; padding-inline: .35rem; font-size: clamp(.8rem, 2.8vw, 1rem); }
.collection-tabs [aria-selected="true"] {
  color: #ffe2a7; border-color: #bf9455; background: linear-gradient(#314a36, #1b3023);
}
#collection-panel { display: grid; align-content: start; gap: .85rem; min-block-size: clamp(12rem, 35dvh, 21rem); }
#collection-panel fieldset { min-inline-size: 0; margin: 0; border: 1px solid var(--line); border-radius: 10px; padding: .5rem; }
#collection-panel legend { padding-inline: .35rem; color: var(--gold); }
#collection-panel > p { margin: .25rem 0 0; }
.collection-items { margin: 0; padding: 0; list-style: none; display: grid; gap: .5rem; }
.collection-item {
  display: grid; grid-template-columns: minmax(0, 6.8rem) minmax(0, 1fr) auto;
  align-items: center; gap: .65rem; padding: .5rem; border: 1px solid var(--line);
  border-radius: 8px; background: #111d16;
}
.collection-item:has([aria-pressed="true"]) { border-color: var(--gold); }
.collection-item-label { display: grid; gap: .15rem; min-width: 0; overflow-wrap: anywhere; }
.collection-art {
  display: grid; place-items: center; width: 100%; min-width: 0; height: 4.65rem;
  border-radius: 6px; background: #19251d;
}
.collection-preview { display: block; width: 100%; height: 4.25rem; object-fit: contain; }
.collection-art .table-thumbnail {
  width: 100%; height: 100%; border: 0; border-radius: 0; box-shadow: none;
  background: var(--lobby-table-art) center / contain no-repeat;
}
.collection-art .card {
  width: 2.5rem; height: 3.5rem; grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  container-type: inline-size; overflow: hidden;
}
.collection-item button[aria-pressed="true"] { color: var(--gold); cursor: default; }
@media (max-width: 460px) {
  .collection-item { grid-template-columns: 4.4rem minmax(0, 1fr) auto; gap: .4rem; }
  .collection-item button { padding-inline: .45rem; }
}
#collection-dialog :is(.error, .collection-status) { margin: .6rem 0 0; }
#collection-dialog :is(.error, .collection-status):empty { display: none; }
.collection-status { color: var(--gold); }
.photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.2rem, 1vw, .55rem); }
.photo-grid button { padding: 2px; min-height: 0; border-radius: 8px; }
.photo-grid .profile-photo { height: auto; border-radius: 5px; }
.photo-grid button[aria-pressed="true"] { outline: 2px solid var(--gold); outline-offset: -2px; }
.lobby-layout {
  max-width: 1160px; margin-inline: auto; padding: clamp(.75rem, 2.4vw, 1.65rem);
  border-radius: 12px; background: radial-gradient(ellipse at 48% 5%, #1b3929, #102319 75%);
}
.lobby-heading { padding-bottom: 1rem; border-bottom: 1px solid #6f6752; }
.lobby-content h1 { color: var(--lobby-heading-color, #f3e4c8); }
.lobby-content .table-list h2 { color: #ecd5a8; margin: .2rem 0; }
.lobby-room-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 274px), 1fr)); gap: .7rem; }
.lobby-content .room {
  display: grid; justify-content: stretch; gap: .65rem;
  border-color: #6f6752; background: linear-gradient(105deg, #222822, #171e19);
}
.room-info, .room-footer { display: flex; align-items: center; gap: .7rem; }
.room-footer { justify-content: space-between; }
.room-seats { display: flex; gap: .25rem; }
.room-seats i { width: .65rem; height: .65rem; border-radius: 50%; border: 1px solid #9a9b86; }
.room-seats .occupied { background: #edbb70; border-color: #edbb70; }
.room-link {
  display: inline-grid; place-items: center; min-height: 44px; padding: .45rem .72rem;
  border: 1px solid; border-radius: 7px; text-decoration: none; font-weight: 650;
}
.room-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.room-link:hover { filter: brightness(1.12); }
.focused-table {
  width: min(calc(100% - 1.5rem), 1050px);
  min-height: calc(100dvh - 105px);
  display: flex;
  flex-direction: column;
}
.focused-table .surface { width: 100%; max-width: none; margin-block: auto; }
.focused-table .felt { width: 100%; height: clamp(300px, 47dvh, 475px); }
.game-status {
  display: flex; align-items: center; gap: .45rem;
  min-height: 36px; width: 100%; font-size: .9rem;
}
.game-status .quiet { margin-inline-start: auto; min-height: 36px; font-size: .82rem; padding: .15rem .5rem; }
.game-controls { width: min(100%, 580px); margin-inline: auto; }
.bet-slot { min-height: 44px; width: 100%; }
.surface.split .felt { height: clamp(300px, 45dvh, 440px); }
.table-thumbnail {
  display: grid; place-items: center; width: 62px; height: 34px; border: 4px solid #5e4630;
  border-radius: 50%; background: #27543a; color: #d5b478;
  box-shadow: inset 0 0 0 1px #ae8d58, 0 3px 2px #0006;
}
.room-open { background: #e5d1ac; color: #2c2117; border-color: #e5d1ac; }
dialog {
  width: min(calc(100% - 1.25rem), 420px);
  padding: 1.25rem;
  color: #f5ead6;
  background: linear-gradient(155deg, #223529, #131e17 75%);
  border: 1px solid #8c7049;
  border-radius: 16px;
  box-shadow: 0 18px 64px #0009;
}
dialog::backdrop { background: #080d0abd; }
dialog h2 { font-size: 1.55rem; }
dialog p { margin: .45rem 0 .95rem; color: #d4dbd2; }
.dialog-mark {
  display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: .7rem;
  border-radius: 50%; border: 1px solid #9a794a; color: var(--gold); background: #16261d;
}
.dialog-summary { margin: 0 0 1rem; padding: .6rem .75rem; border-radius: 8px; background: #101b15; }
.dialog-summary div { display: flex; justify-content: space-between; gap: .55rem; }
.dialog-summary div + div { margin-top: .35rem; }
.dialog-summary dt { color: #c9d3cb; }
.dialog-summary dd { margin: 0; text-align: right; color: #f2cf8d; font-weight: 700; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1.55fr; gap: .5rem; }
.dialog-actions button { min-height: 46px; }
@media (max-width: 720px) {
  dialog { margin: auto auto max(.65rem, env(safe-area-inset-bottom)); }
}
.lobby-layout {
  display: grid;
  grid-template-columns: minmax(132px, .65fr) minmax(0, 3.6fr) minmax(190px, 1.3fr);
  gap: clamp(.8rem, 2vw, 1.65rem);
  align-items: start;
  max-width: 1380px;
  background: radial-gradient(ellipse at 44% 12%, #173d29, #0d2419 74%, #101b15);
  border: 1px solid #514a35;
}
.lobby-navigation {
  display: grid; gap: .55rem; padding: .5rem;
  border: 1px solid #3c4339; border-radius: 10px; background: #161e19;
}
.lobby-navigation a {
  display: flex; align-items: center; gap: .45rem; min-height: 44px; padding: .45rem .5rem;
  color: #f3e2c0; text-decoration: none; font-weight: 650;
  border: 1px solid #594d3a; border-radius: 8px; background: #25241e;
}
.lobby-tab-icon {
  display: block; flex: none; width: 1.45rem; height: 1.45rem; color: #e9dbbd;
}
.lobby-tables-icon { background: var(--lobby-tables-icon) center / contain no-repeat; }
.lobby-tab-icon, .tournament-calendar {
  fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
}
.lobby-navigation a:hover { border-color: #aa8b59; background: #353127; }
.lobby-navigation .lobby-current {
  border-color: #ca9e5b; background: linear-gradient(#2d4b36, #1b3024);
  color: #ffe3ad; box-shadow: inset 0 -2px #be9858;
}
.lobby-heading { border-color: #a6834e; }
.lobby-room-grid { grid-template-columns: minmax(0, 1fr); }
.lobby-content .room {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: .55rem .8rem;
  border-color: #897556;
}
.room-info { min-width: 0; }
.room-info h3 { font: 700 clamp(1rem, 2.3vw, 1.43rem) Georgia, serif; color: #f3e2c0; }
.room-footer { justify-content: end; flex-wrap: wrap; }
.lobby-content .table-thumbnail {
  display: block; width: clamp(74px, 10vw, 143px); height: auto; aspect-ratio: 3 / 2;
  flex: none; border: 0; border-radius: 0; box-shadow: none;
  background: var(--lobby-table-art) center / contain no-repeat;
}
.lobby-content, .lobby-room-grid, .lobby-content .room { min-width: 0; }
.room-info .room-seats { margin-top: .35rem; }
.lobby-heading h1 { font-size: clamp(2.35rem, 5.1vw, 4rem); line-height: 1.05; }
.lobby-content .table-list h2 {
  width: max-content; max-width: 100%; padding: .2rem .65rem;
  border: 1px solid #aa844d; border-radius: 999px; background: #1b281e;
}
.lobby-content .room-link { font-family: Georgia, serif; min-width: 7.8rem; }
.lobby-tournament {
  padding: .95rem .75rem; text-align: center;
  border: 1px solid #ad8650; border-radius: 12px;
  background: radial-gradient(ellipse at 50% 20%, #4b324a, #271e2b 72%);
}
.lobby-tournament h2 { color: #f6dfb3; }
.lobby-layout { background: radial-gradient(ellipse at 42% 15%, var(--lobby-wash), var(--lobby-shadow)), var(--lobby-felt) center top / cover var(--lobby-felt-color); }
.lobby-navigation {
  background: linear-gradient(135deg, #25201dd2, #191817d9), var(--lobby-felt) center / 40rem #241f1b;
  border-color: #6d5a3d;
}
.lobby-navigation a, .lobby-navigation a:hover {
  background: linear-gradient(135deg, #292521bc, #1a201bc7), var(--lobby-felt) center / 19rem #201f1a;
}
.lobby-navigation .lobby-current, .lobby-navigation .lobby-current:hover {
  background: linear-gradient(160deg, var(--lobby-tab-glow), var(--lobby-tab-shadow)), var(--lobby-felt) center / 18rem #1c3825;
  border-color: var(--lobby-frame-gold);
}
.lobby-heading { position: relative; }
.lobby-heading::after {
  position: absolute; bottom: -7px; left: 0; color: #e2b56f;
  content: '◆'; font-size: .65rem; line-height: 1;
}
.lobby-content .room {
  border-color: #9d8962;
  background: linear-gradient(110deg, #202720bf, #141917e6), var(--lobby-felt) center / 36rem #17221a;
  box-shadow: inset 0 0 12px #06080755, 0 3px 9px #080c0860;
}
.lobby-tournament {
  border: 3px double var(--lobby-frame-gold);
  background: radial-gradient(ellipse at 50% 15%, var(--lobby-tournament-glow), var(--lobby-tournament-shadow) 80%), var(--lobby-felt) center / 30rem var(--lobby-tournament-color);
  box-shadow: inset 0 0 0 3px #8e613127, 0 6px 16px #06080766;
}
.lobby-tournament h2 {
  padding: .35rem .4rem; border: 1px solid #937443; border-radius: 999px;
  background: linear-gradient(#593c34, #33242c); color: #f8dfb5;
}
.lobby-tournament p { margin: .9rem .35rem .35rem; }
.lobby-tournament .room-link { margin-top: .7rem; }
.lobby-tournament.tournament-empty p { padding-block: .55rem .35rem; color: #efdbbf; }
.lobby-pagination {
  display: flex; align-items: center; justify-content: safe center; gap: .45rem; overflow-x: auto;
}
.lobby-pagination button {
  flex: none; min-width: 40px; min-height: 44px; padding: .25rem;
  border-color: #98764b93; background: #10190fa0; color: #e6cda5;
  font: 700 1rem Georgia, serif;
}
.lobby-pagination button:hover { border-color: #d8ac6b; }
.lobby-pagination button[aria-current='page'] { color: #292015; border-color: #e1b97c; background: linear-gradient(#edc88e, #c99248); }
.lobby-room-grid { align-content: start; }
.lobby-room-grid .room[hidden] { display: none; }
body:has(.lobby-layout) .account-avatar {
  flex: none; width: 51px; height: 51px;
  background: radial-gradient(#315940 10%, #132b21 74%);
  box-shadow: 0 0 0 2px #815d2940, inset 0 0 0 2px #101d17;
  font: 700 1.1rem Georgia, serif;
}
body:has(.lobby-layout) .profile-heading .account-avatar { width: 44px; height: 44px; }
body:has(.lobby-layout) .account-profile { background: linear-gradient(115deg, #27251e, #17261d); }
body:has(.lobby-layout) .account-profile .nick { color: #f5e3c5; font: 700 1.03rem Georgia, serif; overflow-wrap: anywhere; }
body:has(.lobby-layout) .account-balance { color: #f1dab3; }
.lobby-desktop-only { display: none; }
.tournament-preview-art {
  display: block; width: 100%; aspect-ratio: 1.32;
  background: var(--lobby-tournament-art) center / cover no-repeat;
  mask-image: radial-gradient(ellipse at center, #000 50%, #000d 65%, transparent 82%);
}
.lobby-content .room { border-radius: 10px; }
.lobby-content .room[data-mode="qualifier"], .game.panel[data-mode="qualifier"] { border-color: #9974bc; }
.lobby-content .room[data-mode="recovery"], .game.panel[data-mode="recovery"] { border-color: #649fb6; }
.lobby-content .room[data-mode="qualifier"] .room-info > div { border-inline-start-color: #9974bc; }
.lobby-content .room[data-mode="recovery"] .room-info > div { border-inline-start-color: #649fb6; }
.lobby-content .room-info { gap: .85rem; }
.lobby-content .room-info > div { border-inline-start: 1px solid #9b7c4a; padding-inline-start: .85rem; }
.lobby-content .room-link.primary, .lobby-tournament .room-link.primary {
  background: linear-gradient(#f1c985, #d09850);
  border-color: #e8ba72;
}
@media (min-width: 769px) {
  body:has(.lobby-layout) { --lobby-rail: max(135px, 15vw); }
  body:has(.lobby-layout) > header {
    position: absolute; inset: 0 0 auto; z-index: 1; min-height: 0;
    background: transparent; border: 0; padding: 1.15rem clamp(1rem, 2.1vw, 2rem);
    pointer-events: none;
  }
  body:has(.lobby-layout) #account { pointer-events: auto; }
  body:has(.lobby-layout) .account-profile {
    gap: .7rem; padding: 0; border-color: transparent; background: none;
  }
  body:has(.lobby-layout) .account-profile:hover { border-color: #937247; }
  body:has(.lobby-layout) .account-profile .account-avatar { width: 67px; height: 67px; }
  body:has(.lobby-layout) .account-balance {
    padding: .45rem .8rem; box-shadow: inset 0 1px #eac9942d;
    font: 700 clamp(.95rem, 1.35vw, 1.2rem) Georgia, serif;
  }
  body:has(.lobby-layout) .account-balance .chip-balance { gap: .55rem; }
  body:has(.lobby-layout) .account-balance .wallet-chip { width: 1.2rem; height: 1.2rem; }
  body:has(.lobby-layout) > header .brand {
    display: grid; place-items: center; width: calc(var(--lobby-rail) - 2 * clamp(1rem, 2.1vw, 2rem)); margin: 0;
    gap: .25rem; color: #f3e4c8;
    font-size: clamp(1.08rem, 2.05vw, 1.65rem);
  }
  body:has(.lobby-layout) > header .brand::before {
    content: ''; width: min(100%, 170px); aspect-ratio: 2.2;
    background: var(--lobby-emblem) center / 100% auto no-repeat;
    mask-image: radial-gradient(ellipse 70% 77% at center, #000 62%, transparent 100%);
  }
  main:has(.lobby-layout) { width: 100%; margin: 0; }
  .lobby-layout {
    grid-template-columns: var(--lobby-rail) minmax(0, 1fr) minmax(190px, 28%);
    position: relative; isolation: isolate;
    max-width: none; min-height: 100vh; gap: 0 clamp(1.2rem, 2.1vw, 2rem);
    padding: 0 clamp(.9rem, 1.3vw, 1.65rem) 0 0; border: 0; border-radius: 0;
  }
  .lobby-layout::after {
    content: ''; position: fixed; inset: auto -.6rem -2.1rem auto; width: min(39vw, 510px); aspect-ratio: 3 / 2;
    background: var(--lobby-corner-ornament) center / contain no-repeat; pointer-events: none;
  }
  .lobby-navigation {
    align-self: stretch; align-content: start; padding: 8.55rem .55rem 1rem;
    border: 0; border-inline-end: 1px solid #574934; border-radius: 0;
    background: linear-gradient(90deg, #10100e0c, #15131033), var(--lobby-sidebar-art) center top / 320px auto #292420;
  }
  .lobby-navigation a:not(.lobby-current) { background: linear-gradient(135deg, #29251e48, #17181278), var(--lobby-sidebar-art) center / 280px auto #25201c; }
  .lobby-navigation a { font: 700 1.18rem/1.3 Georgia, serif; padding-inline: .85rem; }
  .lobby-content { position: relative; z-index: 1; padding-block: 2rem; }
  .lobby-heading { padding-bottom: 1rem; border: 0; }
  .lobby-layout::before {
    content: ''; position: absolute; inset: 0 auto auto 47%;
    width: clamp(8rem, 14vw, 12rem); aspect-ratio: 177 / 58;
    background: var(--lobby-top-ornament) center top / 100% auto no-repeat;
    mix-blend-mode: lighten; pointer-events: none;
  }
  .lobby-heading::after {
    bottom: 0; width: 13rem; text-align: center; color: #efba69;
    background: linear-gradient(90deg, transparent, #ac884e 44%, transparent 44% 56%, #ac884e 56%, transparent) center / 100% 1px no-repeat;
  }
  .lobby-content .table-list { margin-top: clamp(1rem, 3vh, 2rem); gap: .65rem; }
  .lobby-content .lobby-section-title { display: flex; align-items: center; gap: .8rem; }
  .lobby-section-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, #c59c5b, #c59c5b19); }
  .lobby-content .lobby-section-title h2 { font-size: 1.55rem; line-height: 1.1; padding: .38rem 1rem; border-radius: 14px; }
  .lobby-content .room { min-height: 84px; padding: .36rem 1rem; }
  .lobby-content .room-info h3 { font-size: clamp(1.28rem, 2.1vw, 1.91rem); overflow-wrap: anywhere; }
  .lobby-content .table-thumbnail { width: clamp(84px, 13vw, 171px); aspect-ratio: 2.2; transform: scale(1.36); }
  .lobby-content .room-info > div { position: relative; padding-inline-start: 1.08rem; }
  .lobby-layout .room-seats, .lobby-mobile-price { display: none; }
  .lobby-desktop-only { display: block; }
  .room-occupancy { color: #e0d5c3; font-size: 1rem; }
  .room-buy-in { color: #ecd9b6; border-inline-start: 1px solid #8a744f; padding-inline: clamp(.45rem, 1.5vw, 1.55rem); min-width: 6rem; }
  .room-buy-in > span { display: block; font-size: .83rem; }
  .room-buy-in strong { font: 700 1.2rem Georgia, serif; }
  .room-price { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .55rem; }
  .room-buy-in .wallet-chip-cash { filter: hue-rotate(138deg) saturate(1.2); }
  .lobby-content .room-open { box-shadow: inset 0 1px #fff5d5, 0 3px 7px #0005; background: linear-gradient(#f2dfbf, #d8bb93); }
  :is(.tournament-preview, .tournament-list) {
    position: relative; display: flex; flex-direction: column; align-items: center;
    margin-top: 8.5rem; min-height: 27rem; padding: .75rem 1rem 1.15rem;
    border: 1px solid var(--lobby-frame-gold); border-radius: 13px;
    background: radial-gradient(ellipse at 50% 37%, var(--lobby-tournament-glow), var(--lobby-tournament-shadow) 76%), var(--lobby-felt) center / 30rem var(--lobby-tournament-color);
    box-shadow: inset 0 0 0 2px #3b2029, inset 0 0 0 3px #b5803939, inset 0 0 22px #0c070979, 0 6px 14px #08060858;
  }
  .tournament-flourish {
    position: absolute; width: 2.45rem; height: 2.45rem;
    background: var(--lobby-tournament-corner) center / contain no-repeat; pointer-events: none;
  }
  .tournament-flourish.top-left { top: .28rem; left: .29rem; }
  .tournament-flourish.top-right { top: .28rem; right: .29rem; transform: scaleX(-1); }
  .tournament-flourish.bottom-left { bottom: .28rem; left: .29rem; transform: scaleY(-1); }
  .tournament-flourish.bottom-right { bottom: .28rem; right: .29rem; transform: scale(-1); }
  .tournament-preview.tournament-empty p { font: 700 1.22rem Georgia, serif; padding-block: .35rem .1rem; }
  :is(.tournament-preview, .tournament-list) h2 {
    position: relative; isolation: isolate; width: 78%; padding: .35rem 1.1rem;
    border: 0; border-radius: 0; background: none; font-size: clamp(1.12rem, 1.75vw, 1.5rem);
  }
  :is(.tournament-preview, .tournament-list) h2::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: var(--lobby-tournament-plaque) center / 100% 100% no-repeat;
  }
  .tournament-preview h3 { color: #f8dfb5; font: 700 clamp(1.35rem, 2.45vw, 2rem) Georgia, serif; }
  .tournament-preview .tournament-preview-date {
    position: relative; display: flex; align-items: center; justify-content: center; gap: .45rem;
    margin: .62rem auto; padding-top: .6rem; color: #efdabc; font: 1.25rem Georgia, serif;
    background: linear-gradient(90deg, transparent, #c89952 46%, transparent 46% 54%, #c89952 54%, transparent) top / 100% 1px no-repeat;
  }
  .tournament-preview-date::before {
    content: ''; position: absolute; top: 0; left: 50%; width: .37rem; height: .37rem;
    background: #d7a359; transform: translate(-50%, -50%) rotate(45deg);
  }
  .tournament-calendar { width: 1.1rem; height: 1.1rem; color: #d7a359; }
  .tournament-preview .room-link {
    min-width: 66%; margin-block: auto 0; font: 700 1.18rem Georgia, serif;
    background: linear-gradient(#efc27e, #cf8736); box-shadow: 0 3px 8px #0905097a, inset 0 1px #ffdea580;
  }
}
.tournament-list article + article { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #866746; }
.tournament-list article { width: 100%; overflow-wrap: anywhere; }
@media (min-width: 769px) {
  .tournament-list { min-height: 0; z-index: 1; }
  .tournament-list.tournament-empty { min-height: 11rem; justify-content: center; }
}

@media (min-width: 769px) and (max-height: 760px) {
  .lobby-content { padding-bottom: .65rem; }
  .lobby-content .table-list { margin-top: 1.05rem; }
  .lobby-content .room { min-height: 80px; }
  .lobby-content .table-thumbnail { aspect-ratio: 2.45; transform: scale(1.48); }
}
@media (min-width: 769px) and (max-width: 1120px) {
  .lobby-navigation { min-width: 0; }
  .lobby-navigation a { padding-inline: .45rem; font-size: 1rem; }
  .lobby-content .room { padding-inline: .55rem; }
  .lobby-content .table-thumbnail { width: clamp(58px, 8vw, 95px); }
  .lobby-content .room-info, .lobby-content .room-footer { gap: .4rem; }
  .lobby-content .room-info > div { padding-inline-start: .5rem; }
  .lobby-content .room-info h3 { font-size: clamp(1.03rem, 1.68vw, 1.35rem); }
  .room-occupancy { font-size: .82rem; }
  .lobby-content .room-link { min-width: 0; padding-inline: .5rem; font-size: .88rem; }
  .room-buy-in { min-width: auto; padding-inline: .4rem .1rem; }
  .room-buy-in strong { font-size: .98rem; }
  .tournament-preview { min-height: 21rem; padding-inline: .55rem; }
  :is(.tournament-preview, .tournament-list) h2 { width: 79%; padding-inline: .65rem; font-size: clamp(1rem, 1.65vw, 1.25rem); }
  .tournament-flourish { width: 1.8rem; height: 1.8rem; }
  .tournaments-page .room-buy-in { display: none; }
  .tournaments-page .lobby-mobile-price { display: block; }
}
@media (max-width: 768px) {
  .lobby-layout { grid-template-columns: minmax(0, 1fr); }
  .lobby-navigation { grid-column: 1 / -1; display: flex; padding: .35rem; }
  .tournament-preview { display: none; }
}
@media (max-width: 740px) {
  .lobby-layout { grid-template-columns: minmax(0, 1fr); gap: .7rem; padding: .6rem; }
  .lobby-navigation { grid-column: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem; }
  .lobby-navigation a { justify-content: center; }
  body:has(.lobby-layout) > header { gap: .45rem; padding-inline: .6rem; }
  body:has(.lobby-layout) #account:not([hidden]) { column-gap: .35rem; }
  body:has(.lobby-layout) .account-profile { padding: .22rem .42rem; gap: .42rem; }
  body:has(.lobby-layout) .account-profile .account-avatar { width: clamp(38px, 12vw, 48px); height: clamp(38px, 12vw, 48px); }
  .lobby-heading { padding-bottom: .6rem; }
  .lobby-heading h1 { font-size: 2.2rem; }
  .lobby-content .room { min-height: 67px; padding: .45rem .48rem; gap: .35rem; }
  .room-info { gap: .4rem; }
  .lobby-content .room-info { gap: .42rem; }
  .lobby-content .room-info > div { padding-inline-start: .42rem; }
  .room-info h3 { overflow-wrap: anywhere; }
  .room-footer { min-width: 0; }
  .lobby-content .table-thumbnail { flex: none; width: clamp(53px, 16vw, 78px); transform: scale(1.2); }
  .lobby-content .room-link { display: grid; place-items: center; min-width: 0; min-height: 44px; padding-inline: .45rem; font-size: .86rem; text-align: center; }
  .tournaments-page .lobby-section-title { display: block; }
  .lobby-content .room-link:disabled { max-width: 6.65rem; }
  .room-seats { gap: .2rem; }
  .room-seats i { width: .52rem; height: .52rem; }
}
#notice { position: fixed; z-index: 4; bottom: 1rem; right: 1rem; left: auto; max-width: min(90vw, 420px); padding: .7rem; background: #36291d; border: 1px solid var(--gold); border-radius: 8px; }
:root[data-game-themed] body:not(:has(.lobby-layout)) > header {
  background: var(--game-surface); border-color: var(--line);
}
:root[data-game-themed] :is(dialog, .login) {
  background: var(--panel); border-color: var(--line);
}
:root[data-game-themed] :is(.login, dialog) :is(input:not([type='range']), button:not(.primary)) {
  background: var(--game-input); border-color: var(--line);
}
:root[data-game-themed] .game.panel { background: var(--game-surface); }
:root[data-game-themed] .game-head { border-color: var(--line); }
:root[data-game-themed] .game-head h2 { color: var(--lobby-heading-color); }
:root[data-game-themed] .table-stage > .game-controls { background: var(--game-controls); border-color: var(--line); }
:root[data-game-themed] .seat-identity { background: var(--game-controls); }
:root[data-game-themed] .pot { background: var(--game-surface); }
:root[data-game-themed] .account-profile { background: var(--game-input); }
:root[data-game-palette] body { color: var(--pack-text); }
:root[data-game-palette] .lobby-navigation {
  background: linear-gradient(color-mix(in srgb, var(--pack-sidebar) 26%, transparent), transparent),
    var(--lobby-sidebar-art) center top / 320px auto var(--pack-sidebar);
}
:root[data-game-palette] :is(.lobby-content, .lobby-tournament, .game-head) :is(h1, h2, h3) { color: var(--pack-text); }
:root[data-game-palette] .lobby-content .room:not([data-mode]) { border-color: var(--pack-frame); }
:root[data-game-palette] :is(.lobby-content, .lobby-tournament) .room-link.primary {
  background: linear-gradient(color-mix(in srgb, var(--pack-accent) 85%, white), var(--pack-accent));
  border-color: var(--pack-frame);
}
@media (max-width: 720px) {
  body:has(.focused-table) > header, body:has(.surface.split) > header { display: none; }
  .toolbar .mobile-lobby { display: inline-block; }
  .lobby-room-grid { grid-template-columns: minmax(0, 1fr); }
  .table-thumbnail { width: 38px; height: 26px; }
  .focused-table { width: min(calc(100% - .7rem), 480px); min-height: 0; margin-bottom: .5rem; }
  .focused-table .surface { margin-block: 0; }
  .focused-table .felt, .surface.split .felt {
    width: 100%; min-height: 248px; height: clamp(248px, calc(100dvh - 225px), 435px);
  }
  .game-head { margin-bottom: .4rem; padding-block: .1rem .35rem; }
  .game-head button { min-height: 34px; padding: .25rem .45rem; font-size: .82rem; }
  .surface.split { grid-template-columns: minmax(0, 1fr); }
  .surface.split .game + .game { display: none; }
  .toolbar .split-toggle { display: none; }
  header { min-height: 46px; padding: .25rem .6rem; }
  #account:not([hidden]) { font-size: .8rem; }
  #account button { min-height: 36px; padding: .25rem .4rem; }
  main { width: calc(100% - .7rem); margin-top: .5rem; }
  .toolbar { margin-bottom: .4rem; }
  .game { padding: .4rem; }
  .felt { border-radius: 47% / 31%; }
  .seat { width: min(24%, 78px); padding: 3px; font-size: .74rem; }
  .seat-0 { left: 50%; top: 87%; }
  .seat-1 { left: 16%; top: 35%; }
  .seat-2 { left: 31%; top: 12%; }
  .seat-3 { left: 69%; top: 12%; }
  .seat-4 { left: 84%; top: 35%; }
  .center { top: 60%; width: 84%; }
  .portrait { width: 17px; height: 17px; }
  .bet { font-size: .6rem; padding: 1px 3px; }
  .board .card { height: 41px; }
  .pair .card { height: 19px; }
  .own-seat .pair .card { flex-basis: 28px; height: 28px; font-size: .85rem; }
  .game-controls { gap: .3rem; }
  .poker-actions button { padding-inline: .25rem; }
  .felt { border-width: 9px; }
  .seat { width: min(23%, 75px); padding: 0; }
  .seat .portrait { width: 27px; height: 27px; }
  .seat-0 { top: 85%; }
  .center { top: 59%; width: 82%; }
  .board .card { flex-basis: 44px; height: 55px; }
  .own-seat .pair .card { flex-basis: 26px; height: 28px; }
  .actions { gap: .3rem; }
  .actions button { padding: .35rem .45rem; font-size: .85rem; }
  .actions input { width: 3.6rem; padding: .3rem; }
}
@media (max-width: 720px) and (max-height: 620px) {
  .board .card { height: 43px; }
  .seat .portrait { width: 23px; height: 23px; }
  .center { top: 55%; }
  .seat-0 { top: 86%; }
}
.seat { width: min(25%, 150px); }
.seat-1 { left: 13%; top: 55%; }
.seat-2 { left: 30%; top: 13%; }
.seat-3 { left: 70%; top: 13%; }
.seat-4 { left: 87%; top: 55%; }
.seat-identity {
  display: flex; align-items: center; gap: .4rem; min-width: 0;
  border: 1px solid #73674e; border-radius: 10px;
  padding: .24rem .46rem .24rem .26rem; background: #171e19;
  box-shadow: 0 3px 8px #0006;
}
.seat .seat-identity .portrait { flex: none; margin: 0; }
.seat-details { flex: 1; min-width: 0; text-align: left; line-height: 1.25; }
.seat-details .stack { display: block; color: #eacb94; }
.remove-bot {
  position: absolute; top: -.5rem; left: -.5rem;
  width: 30px; min-height: 30px; padding: 0; border-radius: 50%;
  color: #ffdfd1; background: #482e2a; border-color: #ab7565;
  font-size: 1.15rem; line-height: 1; z-index: 2;
}
.seat.turn .seat-identity, .seat.winner .seat-identity { border-color: var(--gold); }
.seat .pair { margin-top: .18rem; }
.seat-roles {
  position: absolute; inset: auto .2rem calc(100% - 3px) auto; display: flex; gap: .2rem; z-index: 2;
}
.seat-role {
  display: grid; place-items: center; min-inline-size: 1.65rem; block-size: 1.4rem;
  padding-inline: .25rem; border: 1px solid; border-radius: 999px;
  background: #f8dfac; color: #33220e; border-color: #fff0cf;
  box-shadow: 0 0 0 1px #101713, 0 2px 3px #0008;
  font: 800 .72rem/1 system-ui, sans-serif;
}
.seat-role-d { min-inline-size: 1.4rem; }
.seat-role-sb { background: #1a4261; color: #e8f7ff; border-color: #77b8ed; }
.seat-role-bb { background: #542f69; color: #faedff; border-color: #c690e6; }
@media (max-width: 720px) {
  .seat-role { min-inline-size: 1.45rem; block-size: 1.25rem; font-size: .68rem; }
  .seat-role-d { min-inline-size: 1.25rem; }
}
.seat .bet { right: -.22rem; bottom: -.35rem; }
@media (max-width: 720px) {
  .seat { width: min(26%, 103px); }
  .seat-1 { left: 15%; top: 34%; }
  .seat-2 { left: 29%; top: 12%; }
  .seat-3 { left: 71%; top: 12%; }
  .seat-4 { left: 85%; top: 34%; }
  .seat-identity { gap: .22rem; padding: .17rem .23rem; }
  .seat .seat-identity .portrait { width: 22px; height: 22px; font-size: .68rem; }
}
.game-controls {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: .32rem;
  width: min(100%, 780px); padding-top: .32rem; margin-top: .38rem;
}
.game-status { grid-column: 1 / -1; min-height: 30px; }
.game-status .quiet { min-height: 30px; }
.bet-slot { display: none; min-height: 0; }
.editing-bet .bet-slot { display: block; }
.bet-editor { display: grid; grid-template-columns: minmax(0, 1fr); gap: .22rem; }
.bet-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .2rem; }
.bet-presets button {
  min-height: 30px; padding: .12rem .22rem; font-size: .76rem;
  background: #302a23; border-color: #6c5940; color: #f3d49e;
}
.bet-adjustment { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .32rem; align-items: center; }
.bet-adjustment input { min-height: 30px; margin: 0; padding: 0; }
.bet-adjustment button { min-height: 34px; padding: .18rem .45rem; font-size: .8rem; }
.poker-actions button {
  min-height: 44px; padding: .23rem .35rem; border-radius: 8px; line-height: 1.08;
  box-shadow: inset 0 1px #ffffff24, 0 2px 3px #0005;
}
.poker-actions .fold-action { background: linear-gradient(#693b3b, #46282b); border-color: #996060; }
.poker-actions button:nth-child(2) { background: linear-gradient(#38604b, #213d30); border-color: #668e74; }
.poker-actions .primary { background: linear-gradient(#f3ce87, #ce9850); border-color: #e9bf78; }
.action-amount { display: block; font-size: .76rem; margin-top: .12rem; }
@media (min-width: 721px) {
  .focused-table .editing-bet { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: end; }
  .focused-table .editing-bet .bet-slot { grid-column: 2; grid-row: 2; }
  .focused-table .editing-bet .poker-actions { grid-column: 1; grid-row: 2; }
}
@media (max-width: 720px) {
  .focused-table .game:has(.editing-bet) .felt { height: clamp(248px, calc(100dvh - 270px), 435px); }
}
.poker-actions button {
  border-radius: 7px;
  border-bottom-width: 3px;
  font-size: .88rem;
}
@media (min-width: 721px) {
  .focused-table .game-controls {
    grid-template-columns: max-content minmax(0, 350px);
    justify-content: center;
    column-gap: .55rem;
    width: 100%;
  }
  .focused-table .game-controls .poker-actions {
    grid-column: 1; grid-row: 2;
    grid-template-columns: repeat(3, 84px);
  }
  .focused-table .can-adjust-bet .bet-slot {
    display: block; grid-column: 2; grid-row: 2;
  }
  .focused-table .game-controls:not(.can-adjust-bet) .poker-actions {
    grid-column: 1 / -1; justify-content: center;
  }
  .focused-table .game-controls .bet-adjustment button { min-width: 100px; }
}
@media (max-width: 720px) {
  .poker-actions { width: min(100%, 345px); justify-self: center; }
}
.table-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-inline: auto;
  width: 100%;
}
.table-stage > .felt {
  --table-material:
    radial-gradient(ellipse at 49% 38%,
      color-mix(in srgb, var(--game-felt-center, #22553c) 58%, transparent),
      color-mix(in srgb, var(--game-felt-edge, #0c2c1d) 84%, transparent) 84%) padding-box,
    var(--table-skin, var(--lobby-felt)) center / var(--table-skin-size, 590px auto) padding-box,
    linear-gradient(164deg, #edb88050, transparent 36%, #1b0b097d 84%),
    linear-gradient(color-mix(in srgb, var(--game-rail, #5b2d1b) 35%, transparent), transparent),
    var(--game-table-wood) center / cover #48261a;
  --table-rail-shadow: inset 0 0 0 1px #d5a362, inset 0 0 0 3px #694421,
    inset 0 0 34px #08130e8f, 0 0 0 1px #825131, 0 4px 0 1px #2f180e, 0 12px 22px #0009;
  grid-area: 1 / 1;
  border-color: transparent;
  background: var(--table-material);
  box-shadow: var(--table-rail-shadow);
}
.table-stage > .felt::before {
  content: '♠'; position: absolute; top: 48%; left: 50%; transform: translate(-50%, -50%);
  color: #d7af64; opacity: .12; font: 700 clamp(4rem, 9vw, 7.5rem)/1 Georgia, serif;
  pointer-events: none;
}
.table-stage > .full-table-art { background: none; box-shadow: none; }
.table-stage > .full-table-art::before {
  content: ''; inset: 0; transform: none; opacity: 1;
  background: var(--table-surface) center / 100% 100% no-repeat;
  filter: drop-shadow(0 9px 10px #060a08a0);
}
.table-stage > .game-controls {
  grid-area: 1 / 1;
  align-self: end;
  z-index: 4;
  width: fit-content;
  max-width: 100%;
  min-height: 0;
  padding: .3rem .45rem .4rem;
  margin: 0 auto;
  border: 1px solid #6e614b;
  border-radius: 10px;
  background: #161d18;
  box-shadow: 0 4px 10px #0007;
}
.focused-table .table-stage > .felt {
  height: clamp(335px, calc(100dvh - 155px), 550px);
}
.table-stage .seat-0 { top: auto; bottom: 97px; transform: translateX(-50%); }
.table-stage .center { top: 42%; }
.table-stage .game-status { min-height: 25px; }
.table-stage .game-status .quiet { min-height: 26px; }
.focused-table .table-stage > .game-controls { width: min(100%, 620px); }
.table-stage .game-controls .poker-actions { min-width: 0; }
.focused-table .table-stage > .game-controls { width: min(96%, 780px); }
.table-stage .poker-actions button { min-height: 48px; font-size: .94rem; }
.table-stage .card {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  height: auto;
  aspect-ratio: 5 / 7;
  container-type: inline-size;
}
.table-stage .board .card { flex: 0 1 72px; }
.table-stage .pair .card { flex: 0 1 31px; }
.table-stage .own-seat .pair .card { flex: 0 1 44px; }
.card-face {
  background: linear-gradient(145deg, #fff9ea, #f0e0bf);
  border: 1px solid #c7b38b;
  box-shadow: 0 3px 6px #0005;
}
.card-index {
  position: absolute;
  display: grid;
  justify-items: center;
  font: 800 27cqi/.85 Georgia, serif;
  letter-spacing: -.07em;
  z-index: 1;
}
.card-index span { font-size: .68em; line-height: 1; }
.card-index-top { top: 8%; left: 8%; }
.card-index-bottom { bottom: 8%; right: 8%; transform: rotate(180deg); }
.card-motif { font: 700 56cqi/1 Georgia, serif; }
.card-skin-back { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.card-skin-face { position: absolute; inset: 0; z-index: 2; border-radius: inherit; background-size: 1300% 400%; background-repeat: no-repeat; }
.card-skin-motif { width: 54%; height: 60%; object-fit: contain; }
.table-stage .dealt-card { animation: board-deal 440ms cubic-bezier(.22, .7, .28, 1) both; }
@keyframes board-deal {
  0% { opacity: 0; transform: translate(var(--deal-x), var(--deal-y)) rotate(-9deg) scale(.64); }
  20% { opacity: 1; }
  100% { opacity: 1; transform: translate(0, 0) rotate(0) scale(1); }
}
.table-stage .card-face.dealt-card {
  animation-name: face-deal;
}
@keyframes face-deal {
  0% { opacity: 0; transform: translate(var(--deal-x), var(--deal-y)) rotate(-9deg) scale(.64); }
  20% { opacity: 1; }
  67% { transform: translate(0, 0) rotateY(88deg) scale(.95); }
  100% { opacity: 1; transform: translate(0, 0) rotateY(0) scale(1); }
}
.card-face.dealt-card::after {
  content: '♠';
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  background: repeating-linear-gradient(45deg, #3b2e44 0 3px, #4d3a58 3px 6px);
  color: #e7cd99;
  animation: deal-reveal 440ms steps(1, end) var(--deal-delay) both;
}
@keyframes deal-reveal {
  0% { opacity: 1; }
  67%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .table-stage .dealt-card { animation: none; }
  .card-face.dealt-card::after { content: none; }
}
.court-card .card-motif {
  width: 60%;
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  border: 1px solid #ad8e55;
  border-radius: 42% 42% 25% 25%;
  background: #d9b67226;
  font-size: 44cqi;
}
.table-stage .card.back {
  border-color: #c0a576;
  background: repeating-linear-gradient(45deg, #3b2e44 0 3px, #4d3a58 3px 6px);
}
.back-mark {
  display: grid; place-items: center; width: 64%; aspect-ratio: 1;
  border: 1px solid #c0a576; border-radius: 50%;
  background: #34283d; color: #e7cd99; font: 700 36cqi/1 Georgia, serif;
}
@media (min-width: 721px) {
  .focused-table .game-controls { grid-template-columns: minmax(0, 330px) minmax(0, 390px); }
  .focused-table .game-controls .poker-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .focused-table .game-controls:not(.can-adjust-bet) .poker-actions { width: min(100%, 530px); justify-self: center; }
}
@media (max-width: 720px) {
  .focused-table .table-stage > .game-controls, .table-stage > .game-controls { width: 100%; }
  .table-stage .poker-actions { width: 100%; }
}
.table-stage .board, .table-stage .pair { align-items: flex-start; }
.table-stage .board .card {
  flex: 0 0 auto;
  width: min(18.3%, 72px);
  height: auto;
}
.table-stage .pair .card {
  flex: 0 0 auto;
  width: 39px;
  height: 55px;
}
.table-stage .own-seat .pair { gap: 5px; }
.table-stage .own-seat .pair .card {
  flex: 0 0 auto;
  width: 58px;
  height: 81px;
}
.table-stage .own-seat .pair { margin-top: .3rem; }
@media (max-width: 720px) {
  .table-stage .pair .card { width: 30px; height: 42px; }
  .table-stage .own-seat .pair .card { width: 53px; height: 74px; }
}
.bet-presets button[aria-pressed="true"] { background: #d3a766; border-color: #ffe4ae; color: #21170c; }
.bet-presets button { touch-action: manipulation; }
.bet-adjustment { grid-template-columns: auto minmax(0, 1fr) auto; }
.bet-total {
  min-width: 2.5em; padding: .2rem .3rem; text-align: center; color: #f3d49e;
  font-weight: 700; font-variant-numeric: tabular-nums;
}
.table-stage .seat .bet {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  bottom: auto;
  top: calc(100% + 3px);
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  padding: 2px 6px;
  border: 1px solid #ae8b55;
  border-radius: 999px;
  background: #18251b;
  color: #f3d597;
  box-shadow: 0 2px 5px #0007;
  white-space: nowrap;
  font: 700 .78rem/1.2 system-ui, sans-serif;
  z-index: 2;
}
.table-stage .seat-0 .bet { top: auto; bottom: calc(100% + 6px); }
@media (min-width: 721px) {
  .table-stage .seat-0 .bet { top: .4rem; bottom: auto; left: calc(100% + .45rem); transform: none; }
}
.table-stage .own-seat .bet { background: #efc77e; color: #2e2011; border-color: #ffe3a7; }
.bet-chip {
  flex: none;
  width: 14px;
  height: 14px;
  border: 2px dashed #ffe6ab;
  border-radius: 50%;
  background: #96602e;
  box-shadow: inset 0 0 0 1px #623b21;
}
.mobile-bot-management { display: none; }
@media (max-width: 720px) {
  .table-stage {
    max-width: 560px;
    row-gap: .95rem;
  }
  .focused-table .table-stage > .felt,
  .focused-table .table-stage:has(.editing-bet) > .felt,
  .surface.split .table-stage > .felt {
    height: clamp(370px, 97vw, 420px);
    min-height: 0;
  }
  .table-stage > .felt {
    border-width: 0;
    background: none;
    box-shadow: none;
  }
  .table-stage > .felt::before {
    inset: 8% 0 14%;
    transform: none;
    opacity: 1;
  }
  .table-stage > .felt:not(.full-table-art)::before {
    display: grid;
    place-items: center;
    border: clamp(8px, 2.5vw, 13px) solid transparent;
    border-radius: 44% / 33%;
    background: var(--table-material);
    box-shadow: var(--table-rail-shadow);
    color: #d7af6424;
  }
  .table-stage .seat:not(.seat-0) { transform: translateX(-50%); }
  .table-stage :is(.seat-2, .seat-3) { top: 9%; }
  .table-stage .seat-2 { left: 32%; }
  .table-stage .seat-3 { left: 68%; }
  .table-stage :is(.seat-1, .seat-4) { top: 57%; }
  .table-stage .seat-1 { left: 13%; }
  .table-stage .seat-4 { left: 87%; }
  .table-stage .seat-1 .seat-roles { right: auto; left: .2rem; }
  .table-stage :is(.seat-1, .seat-4) .pair .card { width: 27px; height: 38px; }
  .table-stage .remove-bot { display: none; }
  .mobile-bot-management {
    display: block;
    max-width: 560px;
    margin: .2rem auto 0;
    color: var(--muted);
    font-size: .85rem;
  }
  .mobile-bot-management summary { padding: .5rem .6rem; cursor: pointer; }
  .mobile-bot-management > div { display: flex; flex-wrap: wrap; gap: .3rem; }
  .table-stage .seat-0 { bottom: 5px; }
  .table-stage .center {
    top: 34%;
    width: 88%;
    transform: translateX(-50%);
  }
  .table-stage .board .card { width: clamp(29px, 10vw, 46px); }
  .table-stage .seat-0 .bet {
    top: 1.3rem;
    bottom: auto;
    left: calc(100% + .35rem);
    transform: none;
  }
  .table-stage > .game-controls {
    grid-area: 2 / 1;
    align-self: start;
    gap: .38rem;
    padding: .42rem .52rem .5rem;
    margin-bottom: max(.2rem, env(safe-area-inset-bottom));
  }
  .table-stage .bet-slot { display: block; }
  .table-stage .bet-presets button { min-height: 44px; font-size: .85rem; }
  .table-stage .bet-adjustment button, .table-stage .bet-adjustment input { min-height: 40px; }
  .table-stage .bet-adjustment button { font-size: .85rem; }
  .table-stage .poker-actions button { min-height: 53px; }
}
@media (min-width: 721px) {
  body:has(> main.focused-table) { display: flex; flex-direction: column; min-height: 100dvh; }
  main.focused-table {
    flex: 1 0 auto;
    width: min(calc(100% - 2rem), 1740px);
    min-height: 0; margin-block: .65rem 1rem;
  }
  .focused-table > .surface { flex: 1 0 auto; margin-block: 0; }
  .focused-table .game { display: flex; flex-direction: column; }
  .focused-table .table-stage { flex: 1; grid-template-rows: minmax(345px, 1fr); }
  .focused-table .table-stage > .felt { height: auto; min-height: 0; align-self: stretch; }
  .focused-table .table-stage .seat-0 { bottom: 100px; }
}

.lobby-heading-with-training { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.training-link { color: #f4d59f; }
.lobby-heading .training-link { border-color: #967548; background: #1c2b22; font-size: .9rem; }
.login .training-link { justify-self: center; }
.poker-training { width: min(calc(100% - 1.5rem), 1050px); }
.training-head { padding: .45rem 0 .85rem; background: transparent; margin-bottom: 1rem; }
.training-head .room-link { color: #e9c88f; border-color: #91744b; }
.training-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(18rem, 1fr); align-items: start; gap: 1rem; }
.training-stage > .felt { width: 100%; height: 410px; min-height: 0; border-radius: 43% / 34%; }
.training-stage > .felt::before { border-radius: inherit; }
.training-stage .seat { left: 50%; width: min(38%, 128px); transform: translateX(-50%); }
.training-opponent { top: 24px; }
.training-player { bottom: 15px; }
.training-stage .seat-roles { inset: .35rem auto auto calc(100% + .35rem); }
.training-stage .seat .bet { inset: .35rem calc(100% + .35rem) auto auto; transform: none; }
.training-stage .center { top: 32%; width: 88%; transform: translateX(-50%); }
.training-stage .board { min-height: 68px; }
.training-stage .board .card { width: min(18%, 51px); }
.training-stage .own-seat .pair .card { width: 44px; height: 62px; }
.training-stage .card.training-best-card { box-shadow: 0 0 0 2px #edbb70, 0 0 11px #edbb7066; }
.training-lesson { padding: clamp(.85rem, 3vw, 1.4rem); display: grid; gap: .65rem; }
.training-lesson h2 { font-size: 1.5rem; }
.training-step { font-size: .82rem; color: #e8c993; }
.training-feedback { padding: .55rem .65rem; border-inline-start: 2px solid var(--gold); background: #202e24; }
.training-actions { grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); }
.training-actions button.primary { background: linear-gradient(#f3ce87, #ce9850); border-color: #e9bf78; }
.training-detail summary { color: #f4d59f; cursor: pointer; }
.training-detail p { margin-top: .35rem; }
.training-reference { margin-top: 1rem; padding: .75rem 1rem; }
.training-reference summary { color: #f4d59f; cursor: pointer; }
.training-reference ol { padding-inline-start: 1.5rem; }
.training-reference li + li { margin-top: .35rem; }
@media (max-width: 720px) {
  body:has(.poker-training) > header { display: none; }
  main.poker-training { margin-block: .35rem 1rem; }
  .training-head { min-height: 0; flex-wrap: nowrap; padding: .2rem 0 .45rem; margin-bottom: .45rem; }
  .training-head h1 { font-size: clamp(1.45rem, 6vw, 2rem); }
  .training-head .room-link { font-size: .85rem; }
  .training-layout { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .training-stage > .felt { height: clamp(245px, calc(100dvh - 320px), 310px); }
  .training-stage .felt::before { inset: 3% 0 4%; }
  .training-opponent { top: 12px; }
  .training-stage .training-opponent .card { width: 22px; height: 31px; }
  .training-stage .training-player {
    display: flex; align-items: center; justify-content: center; gap: .35rem;
    bottom: 16px; width: min(66%, 212px);
  }
  .training-player .seat-identity { flex: 1; }
  .training-stage .training-player .pair { margin-top: 0; }
  .training-stage .own-seat .pair .card { width: 33px; height: 46px; }
  .training-stage .center { top: 34%; }
  .training-stage .board { min-height: 47px; margin-block: .25rem; }
  .training-stage .board .card { width: min(17.5%, 36px); }
  .training-lesson { gap: .4rem; font-size: .875rem; }
  .training-lesson h2 { font-size: 1.25rem; }
  .training-feedback { padding: .35rem .5rem; }
  .training-reference { margin-top: .55rem; }
}
