/* Desktop poker room. The small-screen table keeps its own layout. */
:root {
  color-scheme: light;
  --ink: #283237;
  --muted: #627077;
  --paper: #edf0ef;
  --gold: #c1ae7c;
  --line: #34454d26;
  --board-card: clamp(68px, 5.4vw, 90px);
  --hero-card: clamp(62px, 4.7vw, 78px);
}
body {
  background: radial-gradient(ellipse at 50% 30%, #c0c7c7, #a1aaad 72%, #949fa3);
  background-attachment: fixed;
}
body:has(.game) { min-height: 720px; }
#app { max-width: 1880px; padding: 0 30px 10px; }
.bg-club-bar {
  min-height: 34px;
  padding: 2px 30px;
  background: #414e54;
  color: #edf0ed;
}
.topbar { height: 48px; border-bottom-color: #46565f30; }
.brand { font-size: 19px; gap: 12px; }
.brand-mark {
  display: grid; place-items: center;
  width: 30px; height: 34px; border-radius: 0;
  background: transparent; color: #813d43; font-size: 28px;
  box-shadow: none;
}
.brand small { color: #657278; font-size: 8px; letter-spacing: .2em; }
.room-code { color: #43545b; font-size: 16px; font-weight: 700; }
.topbar nav button { color: #38474e; font-size: 13px; padding: 9px 12px; }
.topbar nav button:hover { background: #fff6; }
button { color: var(--ink); background: #e5e9e8; border-color: #5a6a743b; border-radius: 4px; }
button:hover:not(:disabled) { background: #f4f6f5; border-color: #7d9099; }
input, select { background: #f7f8f6; color: #293a43; border-color: #8c9aa2; }
.primary { background: #873e46; border-color: #a06168; color: #faf6f5; }
.primary:hover:not(:disabled) { background: #9e4d56; border-color: #b16a71; }
.quiet { background: transparent; color: #5b6c72; }
.eyebrow { color: #74574e; }
.entry h1 em { color: #873e46; }
.entry-art img { box-shadow: 0 20px 50px #35464f33; }
.tabs [aria-pressed=true] { border-color: #873e46; }
.avatar { background: #586c71; color: #f0f4f3; }
.lobby-art { box-shadow: 0 20px 45px #35464f22; }

.game-heading { height: 36px; }
.game-heading h1 { font-size: 16px; }
.hand-number { color: #566970; }
.table-info { color: #657379; font-size: 12px; }
.turn-clock { width: 280px; }
.turn-clock>div:first-child { font-size: 12px; }
.turn-clock strong { color: #5d6255; font-size: 17px; }
.turn-clock.urgent strong { color: #b6382b; }
.timer-track { background: #53646d25; }
.timer-track i { background: #7d795a; }
.table-zone { width: min(100%, 1520px, calc(190svh - 620px)); min-height: 440px; margin-bottom: 4px; }
.felt {
  inset: 7% 4% 12%;
  border-radius: 999px;
  border: 12px solid #303b3e;
  outline: 1px solid #778589;
  background: radial-gradient(ellipse at 50% 38%, #315956, #244846 72%, #203f3e);
  box-shadow: inset 0 0 0 1px #8a9e973d, inset 0 0 38px #0926254d,
    0 4px 0 1px #263034, 0 18px 28px #34454d3b;
}
.felt:before { inset: 15px; border: 1px solid #b6c6c029; border-radius: 999px; }
.table-center { top: 44%; width: 76%; color: #eef3f0; }
.table-caption { position: absolute; bottom: calc(100% + 18px); font-size: 15px; color: #cedbd633; letter-spacing: .26em; margin: 0; }
.table-caption span { color: #cbd8ce77; }
.pot-label { font-size: 13px; color: #d3dfda; margin-bottom: 13px; }
.pot-label strong { color: #eee5ce; font-size: 30px; font-weight: 600; margin-left: 9px; }
.community { gap: 9px; }
.card {
  width: var(--board-card); height: calc(var(--board-card) * 1.4);
  border-radius: 4px; background: #f8f9f5; color: #223035;
  border: 1px solid #e4e9e5;
  box-shadow: 0 1px 0 #cad1cd, 0 3px 7px #102b3040;
}
.card>b { top: 7px; left: 8px; font-size: calc(var(--board-card) * .44); font-weight: 700; }
.card b small { font-size: calc(var(--board-card) * .23); margin-top: 4px; }
.card>i { font-size: calc(var(--board-card) * .57); right: 7px; bottom: 5px; }
.card>b.corner { display: none; }
.card.red { color: #a13340; }
.card.back {
  border: 2px solid #e0e5e0;
  background: repeating-linear-gradient(45deg, #4c6168 0 1px, #42575d 1px 4px);
  box-shadow: inset 0 0 0 1px #87999d, 0 3px 7px #152c3155;
}
.card.back i { font-size: 26px; color: #dce6e4; }
.card.slot { border: 1px solid #d8e3df29; background: #17373533; color: #b5c9c366; box-shadow: none; }
.card.slot small { font-size: 10px; letter-spacing: .12em; }
.street-track { display: none; }
.street-track .active { color: #ffe7a5; }

.seat { width: 148px; color: #eef1ec; }
.seat-avatar {
  width: 44px; height: 44px; font-size: 18px; margin-bottom: 22px;
  border: 1px solid #81958f;
  background: #384d52;
  box-shadow: 0 3px 8px #24363d33;
}
.acting .seat-avatar { outline: 2px solid #d4c8a7; outline-offset: 4px; }
.seat-heading { gap: 5px; }
.seat-heading>b { font-size: 14px; font-weight: 650; max-width: 105px; text-shadow: 0 1px 3px #233b2c, 0 0 5px #233b2c; }
.position i { width: 19px; height: 19px; font-size: 9px; background: #e9eeea; }
.position i[title="庄家"] {
  position: absolute; left: calc(100% - 2px); top: 65px;
  width: 44px; height: 44px; border: 2px solid #657578;
  outline: 1px solid #ecf0e9; outline-offset: 2px;
  background: #f4f5ef; color: #27363d; font-size: 24px; font-weight: 700;
  box-shadow: 0 3px 7px #142b3244; z-index: 3;
}
.position i[title="庄家"]:after {
  content: "庄家"; position: absolute; top: calc(100% + 6px);
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  color: #fff7dc; text-shadow: 0 1px 3px #303c2b, 0 0 4px #303c2b;
}
.seat-right .position i[title="庄家"] { left: auto; right: calc(100% - 2px); }
.seat.mine .position i[title="庄家"] { left: calc(50% - 150px); right: auto; top: 44px; }
.stack { font-size: 22px; font-weight: 600; color: #f1eee3; margin-top: 4px; text-shadow: 0 1px 3px #243b2d, 0 0 5px #243b2d; }
.seat-status { font-size: 11px; color: #d9e2dd; margin-top: 4px; text-shadow: 0 1px 3px #254631, 0 0 5px #254631; }
.acting .seat-status { color: #e4d7b6; }
.mini-hand { left: calc(50% + 26px); top: 0; gap: 3px; }
.seat-right .mini-hand { right: calc(50% + 26px); }
.card.small { width: 44px; height: 62px; border-radius: 5px; }
.card.small>b { font-size: 20px; top: 4px; left: 4px; }
.card.small b small { font-size: 12px; margin-top: 3px; }
.card.small>i { font-size: 24px; right: 4px; bottom: 4px; }
.card.small.back i { font-size: 21px; }
.seat.mine { top: auto; bottom: 3px; transform: translateX(-50%); width: 232px; }
.seat.mine .mini-hand { gap: 7px; margin-bottom: 9px; }
.seat.mine .card { width: var(--hero-card); height: calc(var(--hero-card) * 1.4); }
.seat.mine .card>b { font-size: calc(var(--hero-card) * .43); }
.seat.mine .card b small { font-size: calc(var(--hero-card) * .23); }
.seat.mine .card>i { font-size: calc(var(--hero-card) * .57); }
.seat.mine .seat-heading { display: inline-flex; margin-right: 8px; }
.seat.mine .seat-heading>b { color: #2d3e45; max-width: 150px; text-shadow: none; }
.seat.mine .stack { display: inline-block; color: #35484e; font-size: 21px; text-shadow: none; }
.seat.mine .seat-status { color: #4d6068; text-shadow: none; }
.seat.mine>.shown-note { color: #865b2d; }
.seat.mine.acting .card { box-shadow: 0 0 0 1px #c6b793, 0 5px 14px #203b4266; }
.seat-clock { width: 104px; height: 4px; margin-top: 6px; background: #425b6235; }
.seat-clock i { background: #c4b383; }
.mine .seat-clock i { background: #807450; }
.bet-chip { font-size: 12px; padding: 4px 10px 4px 24px; background: #243e40eb; border: 1px solid #b3c6c155; color: #e9e6d7; }
.bet-chip:before { width: 13px; height: 13px; left: 5px; top: 5px; border-color: #ffedc3; }
.seat.mine .bet-chip { left: calc(50% + 113px); top: 55px; }
.win-badge { font-size: 13px; top: -27px; color: #e9dfc1; text-shadow: 0 1px 3px #30442e; }
.mine .win-badge { color: #e9dfc1; text-shadow: 0 1px 3px #20343a; }

.action-dock {
  position: relative; width: min(100%, 1320px); flex: 0 0 174px;
  display: flex; flex-direction: column; justify-content: center;
  padding: 12px 22px; border: 1px solid #62716f;
  border-radius: 6px; background: #2c393f; color: #edf1ed;
  box-shadow: 0 3px 12px #35495120;
}
.hand-strength { position: absolute; left: 50%; top: 17px; transform: translateX(-50%); color: #bbc9c5; font-size: 11px; margin: 0; }
.action-panel { gap: 9px 20px; }
.action-title { font-size: 13px; gap: 14px; }
.action-title>span { color: #bcc8c9; font-size: 12px; }
.time-card { padding: 6px 12px; background: #424c4d; color: #d5ceb8; border-color: #7b7a66; font-size: 12px; }
.action-buttons { gap: 10px; }
.action-buttons>button { min-height: 50px; font-size: 15px; font-weight: 600; border-radius: 4px; }
.fold-button { background: #45535a; color: #e3e9e7; border-color: #66767c; }
.all-in { background: #365d58; border-color: #62817a; color: #eef3eb; }
.all-in:hover:not(:disabled) { background: #436f68; border-color: #78958d; }
.raise-preset { background: #38464c; border-color: #5b6c73; border-radius: 4px; min-height: 50px; padding: 6px; gap: 4px; }
.raise-preset>span { color: #b6c5c7; font-size: 11px; }
.raise-preset strong { color: #edf0e9; font-size: 13px; }
.custom-raise { grid-column: 1/-1; font-size: 12px; border-top: 1px solid #75857f42; padding-top: 9px; }
.custom-raise #raise button { background: #873e46; color: #faf6f5; }
.default-action { grid-column: 1/-1; grid-row: auto; text-align: left; color: #aebcbd; }
.waiting-action { min-height: 68px; font-size: 15px; color: #dbe4e1; }
.waiting-action>small { font-size: 12px; color: #adbdbe; }
.status-dot { background: #b1a47f; width: 7px; height: 7px; }
.logs { padding-top: 7px; font-size: 11px; color: #4f646d; }
.logs ol { background: #eff2ef; border-color: #8a9c9f; box-shadow: 0 6px 25px #354b5640; }

.result {
  top: 43%; width: min(580px, 62%); padding: 24px 28px;
  background: #eef1ed;
  border: 1px solid #8e9f9d; border-radius: 6px;
  box-shadow: 0 12px 30px #21383f40;
}
.result .eyebrow { color: #687367; font-size: 11px; }
.result h2 { font-size: 26px; color: #2b4248; }
.payouts { font-size: 14px; color: #50636a; }
.payouts strong { font-size: 28px; color: #75613e; }
.payouts small { color: #738079; font-size: 11px; }
.auto-next { color: #6b7978; font-size: 13px; }
.auto-next strong { color: #3a5556; font-size: 28px; }
.result-actions button { font-size: 13px; padding: 10px 16px; }
.result-actions .quiet { color: #6b7879; font-size: 11px; }
.show-hand { background: #365d58; color: #f1f4ee; border-color: #547970; }
.show-hand:hover:not(:disabled) { background: #436f68; color: #f7f8f3; }
.result .shown-note { color: #527267; }
.result-details { color: #667879; font-size: 11px; }
.result-detail-scroll { max-height: 170px; }
.pot-result { font-size: 12px; }
.run-voters { font-size: 12px; color: #50636a; gap: 9px 16px; }
.run-voters b { color: #786e4c; font-size: 11px; }
.run-vote .muted { color: #697b77; font-size: 12px; margin: 12px 0; }
.run-awards { color: #617673; font-size: 12px; border-color: #b7c4be; }
.run-awards b { color: #7c704e; }
.board-label { font-size: 12px; color: #c0d2cd; right: calc(100% + 14px); }
.board-row.running .board-label { color: #e1d6b8; }
.runout-progress { color: #e4dbc3; font-size: 13px; margin-top: 11px; }
.runout-progress>span { color: #c1d1cd; font-size: 11px; }
.two-runs .table-center { top: 40%; }
.two-runs .table-caption { display: none; }
.two-runs .community-boards { gap: 11px; }
.two-runs .community .card { width: calc(var(--board-card) * .85); height: calc(var(--board-card) * 1.19); }
.two-runs .community .card>b { font-size: calc(var(--board-card) * .37); }
.two-runs .community .card>i { font-size: calc(var(--board-card) * .48); }

/* Settlement has its own row before the felt and seats. */
.game:has(>.result)>.action-dock { display:none; }
.result {
  position: relative; grid-row: 1; grid-column: 1;
  top: auto; left: auto; transform: none; width: 100%; max-height: none;
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  gap: 6px 24px; padding: 14px 22px; text-align: left; overflow: visible;
  border-radius: 5px; box-shadow: 0 3px 12px #35495124;
}
.result .eyebrow { display: none; }
.result h2 { grid-column: 1; margin: 0; font-size: 20px; }
.result .payouts { grid-column: 1; justify-content: flex-start; max-height: none; gap: 6px 18px; }
.result .payouts strong { font-size: 24px; }
.result .payouts small { display: inline; margin-left: 8px; }
.result .auto-next { grid-column: 2; grid-row: 1; margin: 0; text-align: right; }
.result .auto-next strong { font-size: 24px; }
.result .result-actions { grid-column: 2; grid-row: 2; justify-content: flex-end; }
.result .result-actions button { padding: 7px 12px; }
.result .run-awards { grid-column: 1; display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 0; margin: 0; border: 0; }
.result .run-awards p { margin: 0; }
.result .result-details { grid-column: 1/-1; margin: 0; }
.result .result-details summary { width: fit-content; font-size: 11px; padding-top: 3px; }
.result .result-detail-scroll { max-height: 210px; padding: 12px 0 4px; }
.result .showdown { grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); }
dialog { border-color: #8c9e9f; box-shadow: 0 24px 90px #273a4555; }
dialog::backdrop { background: #31454f5f; backdrop-filter: blur(4px); }

@media (max-width: 1150px) {
  #app { padding-left: 20px; padding-right: 20px; }
  .seat { width: 130px; }
  .seat-avatar { width: 38px; height: 38px; font-size: 16px; margin-bottom: 20px; }
  .seat:not(.mine) .stack { font-size: 19px; }
  .mini-hand { left: calc(50% + 22px); }
  .seat-right .mini-hand { right: calc(50% + 22px); }
  .card.small { width: 39px; height: 55px; }
  .seat-heading>b { font-size: 13px; }
  .seat-status { font-size: 10px; }
  .action-dock { padding-left: 16px; padding-right: 16px; }
  .action-panel { gap: 8px 16px; }
  .default-action { font-size: 9px; }
}
@media (max-height: 800px) {
  .felt { bottom:16%; }
  .two-runs .table-center { top: 36%; }
  .table-caption { display: none; }
}

/* Restrained desktop surfaces, without altering the mobile theme. */
.entry-art { transform: none; }
.seat .mini-hand>.card:first-child { transform: rotate(-3deg); }
.seat .mini-hand>.card:nth-child(2) { transform: rotate(3deg); }
.seat .mini-hand>.card-motion:first-child { rotate: -3deg; }
.seat .mini-hand>.card-motion:nth-child(2) { rotate: 3deg; }
.action-dock button:hover:not(:disabled) { background: #51656b; color: #fff; }
.action-dock .primary:hover:not(:disabled) { background: #9e4d56; }
.action-dock .all-in:hover:not(:disabled) { background: #436f68; }
.leave-controls > div { background: #edf1ee; color: #2d4249; border-color: #829696; border-radius: 5px; }
.waiting-entrants { flex: none; color: #384e56; background: #d8e0dd80; }
.cashouts { flex: none; color: #455d67; }
.winner .seat-avatar { outline: 1px solid #c1b28a; outline-offset: 3px; box-shadow: 0 3px 8px #24363d33; }

/* Live table hierarchy: chips and cards lead, portraits stay secondary. */
.seat-heading>b { font-weight: 500; letter-spacing: .02em; }
.seat-seconds { display:inline-flex; gap:2px; align-items:baseline; margin-left:4px; color:#efe0b8; font-size:10px; }
.seat-seconds b { font-size:15px; font-weight:650; font-variant-numeric:tabular-nums; }
.mine .seat-seconds { color:#625632; }
.seat:has(.seat-clock.urgent) .seat-seconds { color:#ffb3a4; }
.seat.mine:has(.seat-clock.urgent) .seat-seconds { color:#9d313b; }
.seat-clock { height:3px; margin-top:5px; }
.seat.folded:not(.shown):not(.winner) { opacity:1; }
.seat.folded:not(.shown):not(.winner) .mini-hand { opacity:.3; }
.seat.folded:not(.shown):not(.winner) .seat-avatar { opacity:.45; }
.seat.folded:not(.shown):not(.winner) .seat-status { color:#a6bdb6; }
.seat.mine.folded:not(.shown):not(.winner) .seat-status { color:#566a6c; }
.card { font-family:Georgia,'Times New Roman',serif; }
.pot-label { display:flex; align-items:baseline; gap:10px; letter-spacing:.06em; }
.pot-label strong { margin:0; font-size:32px; letter-spacing:-.025em; }
.table-caption { font-size:12px; font-weight:500; letter-spacing:.35em; }
.action-title>strong { font-size:14px; font-weight:600; }
.action-buttons>button { min-height:46px; }
.raise-preset { min-height:46px; border-color:#71817c66; }
.raise-preset strong { font-size:14px; font-weight:600; }
.hand-strength { top:19px; }
.custom-raise #raise { grid-template-columns:128px minmax(180px,1fr) 112px 134px; }
.custom-raise #raise input[type=number] { font-size:17px; font-weight:600; text-align:right; color:#edf1eb; background:#1e3036; border-color:#6e827e; }
.custom-raise #raise label { color:#e3e9e3; font-size:12px; }
.custom-raise #raise label small { color:#aebfba; font-size:10px; }
.custom-raise #raise button { min-height:38px; }
#raise-hint { margin-left:140px; }
.action-panel:has(#raise) .default-action { display:none; }
.action-dock:not(:has(.action-panel)) { flex-basis:64px; background:transparent; border-color:transparent; box-shadow:none; }
.action-dock:not(:has(.action-panel)) .waiting-action { color:#364f53; min-height:50px; flex-direction:column; gap:8px; }
.action-dock:not(:has(.action-panel)) .waiting-action>small { color:#5a6e70; }
.action-dock:not(:has(.action-panel)) .status-dot { display:none; }
.action-dock:not(:has(.action-panel)) .hand-strength { color:#536a63; }
.run-vote .muted { grid-column:1; grid-row:2; margin:0; }
.run-vote .run-voters { grid-column:1; grid-row:3; justify-content:flex-start; gap:6px 18px; }
.run-vote .auto-next { grid-row:1; }
.run-vote .result-actions { grid-row:2/4; }
.run-vote .run-voters>span { padding:3px 0; }
.seat:not(.mine) .bet-chip { top:78px; left:calc(100% + 14px); }
.seat.seat-right:not(.mine) .bet-chip { left:-14px; }
.seat:not(.mine):has(.position i[title="庄家"]) .bet-chip { top:calc(100% + 5px); left:50%; }
.action-dock:not(:has(.action-panel)) .hand-strength { position:static; transform:none; margin-bottom:5px; }
#raise #raise-slider:focus-visible { outline:none; }
#raise-slider:focus-visible::-webkit-slider-thumb { outline:2px solid #e6d6a5; outline-offset:3px; }
#raise-slider:focus-visible::-moz-range-thumb { outline:2px solid #e6d6a5; outline-offset:3px; }
@media(max-width:1150px) {
  .custom-raise #raise { grid-template-columns:116px minmax(160px,1fr) 95px 120px; gap:9px; }
  #raise-hint { margin-left:125px; }
  .hand-strength { left:55%; font-size:10px; }
}
.game>.result { width:min(100%,1520px,calc(190svh - 620px)); }
.game:has(>.result)>.table-zone { flex:1 0 500px; }
.topup-controls { margin-bottom:4px; }
.game:has(>.result)>.table-zone .seat:not(.mine) { top:max(72px,var(--y)); }

.result .winning-hands { grid-column:1/-1; border-top:1px solid var(--line); padding-top:12px; margin:6px 0; }
.result .winning-hand-title { color:#2d4249; }
.result .winning-five .card { width:40px; height:56px; }
.result .winning-five .card>b { font-size:19px; }
.result .winning-five .card b small { font-size:11px; }
.result .winning-five .card>i { font-size:23px; }
