/* Play surface. Room controls and lobby keep the Sanjoong brand. */
body[data-screen="game"] { background:#1c1d1c; }
body[data-screen="game"]::before { background:radial-gradient(ellipse at 48% 35%,#343432 0%,#232423 58%,#1b1c1b 100%); filter:none; }
body[data-screen="game"]::after { background:none; }
body[data-screen="game"] .site-header { background:#232423; }
.game {
  --card-width:clamp(54px,min(9vw,16svh),152px);
  --felt-seat:clamp(118px,16vw,246px);
  --felt-pocket:min(clamp(28px,9svh,86px),calc(var(--felt-seat)*.266));
  --back-red:#cf6e6e;
  --rank-red:#dc2b2b;
  --layout-top:clamp(56px,9svh,100px);
}
.game .table[data-phase] {
  --rail:clamp(9px,1.32vw,24px); --curve:50%; --board-y:46%;
  width:min(78vw,1910px); height:clamp(340px,63svh,760px);
  border:1px solid #171817;
  background:linear-gradient(180deg,#242624,#2c2e2a 48%,#171a17);
  box-shadow:inset 0 1px #ffffff0d,0 11px 20px #08080885;
}
.game .table[data-phase]::before {
  inset:var(--rail);
  border:1px solid #15532f;
  background:var(--felt-grain) center / 115px 115px, radial-gradient(ellipse at 49% 43%,#299657,#218249 63%,#155f37 100%);
  background-blend-mode:soft-light,normal;
  box-shadow:inset 0 1px 8px #102b1ac9,inset 0 0 0 4px #e5ffee0a;
}
.game .table[data-phase]:has(.table-outcome) { --board-y:48%; }
.game .table[data-phase] .board { max-width:92%; z-index:1; }
.game .table[data-phase]:not([data-phase="lobby"]) .board-label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.game .table[data-phase] .board-cards { gap:clamp(5px,.8vw,14px); }
.game .table[data-phase] .board-cards .card.empty { visibility:hidden; }
.game .table[data-phase] .pot {
  position:relative; align-self:center; min-width:0;
  width:clamp(96px,15vw,265px); min-height:clamp(30px,4vw,67px);
  margin:0 0 clamp(12px,2.3vw,38px); padding:4px 14px;
  color:#fff; background:#113e2540; border:1px solid #b8e6c02b; border-radius:999px; box-shadow:inset 0 1px 4px #15472c4d;
}
.game .table[data-phase] .pot-center { color:white; font:800 clamp(20px,2.5vw,42px)/1 var(--sans); letter-spacing:-.035em; white-space:nowrap; }
.game .pot-total { position:absolute; top:0; left:calc(100% - 11px); transform:translateY(-50%); background:#163b27bf; color:white; border-radius:999px; padding:3px 7px; font:750 clamp(10px,1.15vw,18px)/1 var(--sans); white-space:nowrap; }
.game .pot-total small { font-size:.7em; font-weight:600; color:#d7e8db; }
.game .table[data-phase] .card:not(.back,.empty) {
  padding:0; aspect-ratio:.817; border:0; border-radius:calc(var(--w) * .074);
  background:#fdfdfd; color:#292929; box-shadow:0 2px 6px #111b1750;
}
.game .table[data-phase] .card.red { color:var(--rank-red); }
.game .table[data-phase] .card .card-corner { position:absolute; inset:16% auto auto 16%; display:block; }
.game .table[data-phase] .card .rank { font:900 calc(var(--w) * .48)/.94 Georgia,'Times New Roman',serif; letter-spacing:-.045em; }
.game .table[data-phase] .card .rank-ten { font-size:calc(var(--w) * .4); }
.game .table[data-phase] .card .card-mark { position:absolute; width:47%; height:39%; inset:auto 17% 10% auto; display:block; }
.game .table[data-phase] .card.back,.game .table[data-phase] .card:is(.motion-board-on,.motion-show-on,.motion-hole-on:not(.back))::after {
  border:clamp(2px,calc(var(--w)*.055),6px) solid #fff; border-radius:calc(var(--w) * .077); box-sizing:border-box;
  background:repeating-linear-gradient(135deg,#ffffff12 0 4px,transparent 4px 8px),linear-gradient(135deg,#d77977,var(--back-red) 68%,#b95b60);
}
.game .table[data-phase] .card.back { padding:0; aspect-ratio:.817; display:grid; place-items:center; box-shadow:0 2px 6px #0d100f66; }
.game .back-stamp { color:#ffece578; font:800 calc(var(--w)*.128)/1 var(--sans); white-space:nowrap; }
.game .table[data-phase] .seat[data-seat] {
  --plaque-height:clamp(52px,5.7vw,108px);
  width:var(--felt-seat); min-width:0; min-height:var(--plaque-height);
  grid-template-columns:var(--pocket-space,53%) minmax(0,1fr); grid-template-rows:auto;
  gap:0; align-items:center; isolation:isolate; color:#f4f4f4; text-align:left;
}
.game .table[data-phase] .seat[data-seat]::before {
  content:''; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background:#303130ed; border-radius:clamp(5px,.55vw,11px);
  box-shadow:0 3px 12px #17181765;
}
.game .table[data-phase] .seat[data-seat].acting { color:#151515; z-index:5; }
.game .table[data-phase] .seat[data-seat].acting::before { background:#fdfdfd; box-shadow:0 0 clamp(14px,3vw,55px) #fff8; }
.game .table[data-phase] .seat[data-seat] .seat-identity {
  position:static; min-height:0; min-width:0; width:100%; max-width:none; grid-area:1 / 2;
  z-index:auto; justify-self:stretch; justify-items:start; align-content:center;
  gap:2px; padding:6px 6px 6px 7px; border:0; border-radius:0; background:none; color:inherit; box-shadow:none; text-shadow:none; text-align:left;
}
.game .table[data-phase] .seat[data-seat] .player-name {
  display:block; grid-area:1 / 1; min-height:0; min-width:0; overflow:visible; overflow-wrap:anywhere; white-space:normal;
  justify-self:start; text-align:left; color:#d8d8d8; font:750 clamp(12px,1.2vw,21px)/1.1 var(--sans); letter-spacing:-.025em;
}
.game .table[data-phase] .seat[data-seat].acting .player-name { color:#39431b; text-decoration:underline dotted #54603144; text-underline-offset:3px; }
.game .table[data-phase] .seat[data-seat] .seat-money { grid-area:2 / 1; min-width:0; max-width:100%; display:flex; flex-wrap:wrap; column-gap:6px; row-gap:2px; align-items:baseline; justify-content:start; }
.game .table[data-phase] .seat[data-seat] .stack { color:inherit; max-width:100%; width:auto; font:800 clamp(13px,1.32vw,23px)/1 var(--sans); overflow-wrap:anywhere; white-space:normal; }
.game .table[data-phase] .seat[data-seat] .seat-status { font:650 clamp(8px,.74vw,12px)/1.1 var(--sans); color:#c3c5c0; }
.game .table[data-phase] .seat[data-seat].acting .seat-status { color:#4c5c3b; }
.game .table[data-phase] .seat[data-seat] .pocket {
  position:relative; inset:auto; transform:none; grid-area:1 / 1; align-self:center; justify-self:center;
  display:flex; justify-content:center; width:max-content; max-width:none; margin:0; opacity:1; pointer-events:none;
}
.game .table[data-phase] .seat[data-seat] .pocket .card { --w:var(--felt-pocket); width:var(--w); aspect-ratio:.817; outline:none; }
.game .table[data-phase] .seat[data-seat] .pocket .card:nth-child(1) { rotate:-7deg; transform:none; }
.game .table[data-phase] .seat[data-seat] .pocket .card:nth-child(2) { rotate:7deg; transform:none; margin-left:calc(var(--felt-pocket)*-.18); }
.game .table[data-phase] .seat[data-seat].own .pocket .card { --w:var(--felt-pocket); }
.game .table[data-phase] .seat[data-seat] .pocket:empty { display:none; }
.game .table[data-phase] .seat[data-seat].folded .pocket .card { opacity:.3; }
.game .table[data-phase] .seat[data-seat].acting .pocket .card { box-shadow:0 2px 9px #13191166; }
.game .seat-placeholder { display:grid; place-items:center; gap:0; color:#a2a2a1; letter-spacing:0; }
.game .seat-placeholder b { font:850 clamp(17px,3.7vw,44px)/.92 var(--sans); }
.game .seat-placeholder small { font-size:clamp(8px,.72vw,12px); }
.game .table[data-phase] .seat[data-seat] .turn-track {
  position:absolute; inset:auto 0 0; width:auto; height:clamp(3px,.55vw,8px); margin:0;
  background:#eceeeb; border-radius:0 0 5px 5px; overflow:hidden;
}
.game .table[data-phase] .turn-track i { background:#318957; transition:width .24s linear; }
.game .table[data-phase] .turn-track.urgent i { background:#c23a38; }
.game .table[data-phase] .seat[data-seat] .dealer-mark { position:absolute; inset:auto 3px -9px auto; width:clamp(16px,1.6vw,26px); color:#456dca; background:#fafafa; border:0; font-size:clamp(9px,1vw,14px); }
.game .table .seat.vacant { width:var(--felt-seat); min-height:clamp(38px,5.4vw,90px); opacity:.65; color:#b5b7b3; border:1px dashed #686c6857; background:#262726a6; }
.game .table .pos0 { --seat-x:50%; --seat-y:99%; --wager-x:50%; --wager-y:80%; }
.game .table .pos1 { --seat-x:19%; --seat-y:88%; --wager-x:25%; --wager-y:75%; }
.game .table .pos2 { --seat-x:3%; --seat-y:65%; --wager-x:16%; --wager-y:62%; }
.game .table .pos3 { --seat-x:3%; --seat-y:38%; --wager-x:16%; --wager-y:39%; }
.game .table .pos4 { --seat-x:19%; --seat-y:14%; --wager-x:25%; --wager-y:28%; }
.game .table .pos5 { --seat-x:50%; --seat-y:4%; --wager-x:50%; --wager-y:18%; }
.game .table .pos6 { --seat-x:81%; --seat-y:14%; --wager-x:75%; --wager-y:28%; }
.game .table .pos7 { --seat-x:97%; --seat-y:38%; --wager-x:84%; --wager-y:39%; }
.game .table .pos8 { --seat-x:97%; --seat-y:65%; --wager-x:84%; --wager-y:62%; }
.game .table .pos9 { --seat-x:81%; --seat-y:88%; --wager-x:75%; --wager-y:75%; }
.game .seat-wager {
  position:absolute; left:var(--wager-x); top:var(--wager-y); transform:translate(-50%,-50%); z-index:3;
  display:grid; place-items:center; width:max-content; min-width:clamp(27px,3.8vw,61px); min-height:clamp(27px,3.65vw,59px); padding:2px 6px;
  border-radius:999px; background:#e9ff79; color:#171b0a;
  box-shadow:0 2px 5px #142e1d63,inset 0 1px 5px #f9ffb6a6;
  font:830 clamp(12px,1.55vw,25px)/1 var(--sans); white-space:nowrap;
}
.game .deal-origin { position:absolute; top:42%; left:50%; pointer-events:none; }
.game .my-hand-summary { min-width:0; overflow-wrap:anywhere; }
.game .my-hand-summary .hu-hand { color:#d9dfd6; font:620 clamp(10px,1vw,13px)/1.15 var(--sans); }
.game .my-hand-summary .hu-hand-detail { color:#c0c6bd; }
.game .controls { margin-top:clamp(35px,5.3vw,76px); min-width:0; }
.game .controls .decision-heading { flex-wrap:wrap; row-gap:3px; color:#e7e8e5; }
.game .controls.controls-active .decision-heading { color:#f5ffcc; }
.game .controls .btn { background:#343634; border-color:#686c66; border-bottom-color:#222522; color:#f3f3f2; }
.game .controls .btn.primary,.game .controls .btn[data-action="toggleRaise"]:not(:disabled) { background:#519d65; border-color:#5da973; border-bottom-color:#316641; color:#fff; }
@media (min-width:901px) {
  .game .controls { justify-self:end; justify-items:end; margin-right:var(--game-gutter); }
  .game .decision-heading,.game .action-row { justify-content:flex-end; }
}
@media (max-width:900px) {
  .game { --card-width:clamp(31px,10.2vw,84px); --felt-seat:clamp(81px,22vw,143px); --felt-pocket:clamp(18px,5.7vw,43px); --layout-top:66px; }
  .game .table[data-phase] { width:calc(100% - 16px); height:clamp(485px,calc(100svh - 233px),725px); }
  .game .table[data-phase] .seat[data-seat] { min-height:0; grid-template-columns:minmax(0,1fr); grid-template-rows:auto; }
  .game .table[data-phase] .seat[data-seat]::before { inset:0; }
  .game .table[data-phase] .seat[data-seat] .seat-identity { grid-area:1 / 1; justify-items:center; padding:5px 3px; text-align:center; }
  .game .table[data-phase] .seat[data-seat] .player-name { min-height:2.15em; align-content:center; width:100%; text-align:center; }
  .game .table[data-phase] .seat[data-seat] .seat-money { justify-content:center; }
  .game .table[data-phase] .seat[data-seat] .pocket { position:absolute; inset:auto auto calc(100% - 3px) 50%; transform:translateX(-50%); }
  .game .table[data-phase] .seat[data-seat] .pocket:has(.seat-placeholder) { display:none; }
  .game .table[data-phase] .seat[data-seat] .dealer-mark { right:-4px; bottom:-6px; }
  .game .table[data-phase] .seat[data-seat].own { --felt-pocket:clamp(33px,9.5vw,63px); width:clamp(98px,29vw,160px); }
  .game .table[data-phase] .pot { margin-bottom:12px; }
  .game .table[data-phase] .table-outcome { width:min(100%,47vw); margin-inline:auto; overflow-wrap:anywhere; }
  .game .table .pos0 { --seat-y:93%; --wager-y:75%; }
  .game .table .pos1 { --seat-x:15%; --seat-y:82%; --wager-x:30%; --wager-y:76%; }
  .game .table .pos2 { --seat-x:15%; --seat-y:65%; --wager-x:32%; --wager-y:62%; }
  .game .table .pos3 { --seat-x:15%; --seat-y:31%; --wager-x:30%; --wager-y:34%; }
  .game .table .pos4 { --seat-x:18%; --seat-y:16%; --wager-x:33%; --wager-y:22%; }
  .game .table .pos5 { --seat-y:6%; --wager-y:15%; }
  .game .table .pos6 { --seat-x:82%; --seat-y:16%; --wager-x:67%; --wager-y:22%; }
  .game .table .pos7 { --seat-x:85%; --seat-y:31%; --wager-x:70%; --wager-y:34%; }
  .game .table .pos8 { --seat-x:85%; --seat-y:65%; --wager-x:68%; --wager-y:62%; }
  .game .table .pos9 { --seat-x:85%; --seat-y:82%; --wager-x:70%; --wager-y:76%; }
  .game .controls { margin-top:8px; }
}
@media (max-width:360px) {
  .game .table[data-phase] { --board-y:46%; }
  .game .table .pos1 { --wager-x:34%; --wager-y:74%; }
  .game .table :is(.pos2,.pos3) { --wager-x:35%; }
  .game .table :is(.pos7,.pos8) { --wager-x:65%; }
  .game .table :is(.pos3,.pos7) { --wager-y:31.7%; }
  .game .table .pos9 { --wager-x:66%; --wager-y:74%; }
  .game .pot-total { left:auto; right:0; }
  .game .table[data-phase] .table-outcome { width:min(100%,52vw); }
}
.game .table[data-phase] .card.motion-hole-on { animation:felt-deal 180ms cubic-bezier(.18,.74,.35,1) var(--hole-delay,0ms) both; }
.game .table[data-phase] .card.motion-board-on { animation-duration:180ms; }
.game .table[data-phase] .seat.acting.motion-turn-on::before { animation:felt-turn-surface 270ms ease-out var(--turn-delay,0ms) both; }
.game .table[data-phase] .seat.acting.motion-turn-on .seat-identity { animation:felt-turn-ink 150ms ease-out var(--turn-delay,0ms) both; }
.game .table[data-phase] .seat.acting.motion-turn-on .player-name { animation:felt-turn-name 150ms ease-out var(--turn-delay,0ms) both; }
.game .table[data-phase] .seat.acting.motion-turn-on .turn-track { animation:felt-turn-track 150ms ease-out var(--turn-delay,0ms) both; }
.game .seat-wager.motion-action-on { animation:felt-wager-in 230ms ease-out var(--action-delay,0ms) both; }
.game .seat-wager.sweep-wager { opacity:0; font-style:normal; pointer-events:none; }
.game .seat-wager.sweep-running { animation:felt-sweep 205ms cubic-bezier(.36,.02,.72,1) var(--sweep-delay,0ms) both; }
@keyframes felt-deal { 0%{opacity:0;translate:var(--deal-x,0) var(--deal-y,-20px);scale:.46;} 8%{opacity:1;} 100%{opacity:1;translate:0 0;scale:1;} }
@keyframes felt-turn-surface { 0%{background:#303130ed;box-shadow:0 3px 12px #17181765;} 100%{background:#fdfdfd;} }
@keyframes felt-turn-ink { 0%{color:#ddd;} 100%{color:#151515;} }
@keyframes felt-turn-name { 0%{color:#ddd;text-decoration:none;} 100%{color:#39431b;} }
@keyframes felt-turn-track { 0%{opacity:0;} 100%{opacity:1;} }
@keyframes felt-wager-in { 0%{opacity:.66;scale:.78;} 100%{opacity:1;scale:1;} }
@keyframes felt-sweep { 0%{opacity:1;translate:0 0;scale:1;} 100%{opacity:0;translate:var(--sweep-x) var(--sweep-y);scale:.55;} }
@media (prefers-reduced-motion:reduce) { .game .table[data-phase] :is(.motion-hole-on,.motion-board-on,.motion-action-on),.game .table[data-phase] .seat.acting.motion-turn-on :is(.seat-identity,.turn-track),.game .table[data-phase] .seat.acting.motion-turn-on::before { animation:none; } }
