.lobby .poker-cover::before {
  background: #193627 url("night-table.webp") right bottom / 235% auto;
}

.poker-room {
  --poker-brass: #edcc8c;
  --poker-muted: #b7c8bf;
  --poker-line: #b0d7b92b;
  --poker-card-width: clamp(38px, 12vw, 65px);
  max-width: 760px;
  margin: 0 auto;
}

.poker-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px 18px;
  margin: 3px 0 17px;
}
.poker-heading h2 {
  margin: 0;
  font: 700 clamp(29px, 6vw, 51px)/1.07 "Playfair Display", Georgia, serif;
  letter-spacing: -.042em;
}
.poker-heading h2 i { color: var(--poker-brass); }
.poker-heading p { margin: 7px 0 0; color: var(--poker-muted); font-size: 13px; }
.poker-blinds { padding: 6px 10px; border: 1px solid #edcc8c48; border-radius: 999px; color: var(--poker-brass); font-size: 12px; }

.poker-streets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin: 0 0 8px;
  padding: 4px;
  list-style: none;
  text-align: center;
  color: #a4b7ae;
  background: #101c1b;
  border: 1px solid var(--poker-line);
  border-radius: 10px;
  font-size: clamp(11px, 2.8vw, 13px);
}
.poker-streets li { padding: 5px 2px; border-radius: 6px; }
.poker-streets .poker-street-past { color: #d0e7d8; background: #9bd0b311; }
.poker-streets [aria-current] { color: #192016; background: var(--poker-brass); font-weight: 800; }

.poker-table {
  --poker-rail: clamp(7px, 1.8vw, 14px);
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  align-items: center;
  gap: clamp(15px, 3vw, 26px);
  overflow: hidden;
  padding: clamp(21px, 4.3vw, 36px) clamp(14px, 4.5vw, 40px);
  border: 1px solid #806145;
  border-radius: clamp(40px, 13vw, 124px);
  background:
    repeating-linear-gradient(105deg, #f8caaa10 0 1px, transparent 2px 6px, #13090630 8px 11px),
    linear-gradient(170deg, #674533, #2a1d1b 65%, #50312b);
  box-shadow: inset 0 2px 0 #f4d0a456, inset 0 -3px 4px #0e0908, 0 14px 0 -8px #170e10, 0 25px 48px #020508a8;
}
.poker-table::before, .poker-table::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  pointer-events: none;
}
.poker-table::before {
  inset: var(--poker-rail);
  z-index: -2;
  border: 1px solid #d4ad6870;
  background:
    repeating-linear-gradient(45deg, #051a1314 0 1px, transparent 1px 3px),
    repeating-linear-gradient(-45deg, #ade7b807 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at 50% 37%, #2a674f, #154634 48%, #09271f 84%);
  box-shadow: inset 0 0 0 3px #102f28, inset 0 6px 50px #010c08b3, 0 0 0 2px #1a120f;
}
.poker-table::after {
  inset: calc(var(--poker-rail) + 10px);
  z-index: -1;
  border: 1px solid #d1dca938;
  box-shadow: inset 0 0 20px #02181060;
  transition: border-color .25s, box-shadow .25s;
}
.poker-table-showdown::after {
  border-color: #eec2758a;
  box-shadow: inset 0 0 26px #e6b4612e;
}
.poker-seat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(4px, 2vw, 15px);
  width: min(100%, 560px);
}
.poker-seat-info {
  justify-self: end;
  display: grid;
  justify-items: start;
  gap: 2px;
  padding: 6px 8px;
  border: 1px solid #d1dca92b;
  border-radius: 9px;
  background: #071e18d6;
  box-shadow: 0 3px 8px #0004, inset 0 1px 0 #c6e7c01a;
  transition: border-color .2s, box-shadow .2s;
}
.poker-seat-info strong { font-size: clamp(11px, 2.9vw, 15px); }
.poker-seat-turn .poker-seat-info { border-color: #edcc8cc7; box-shadow: 0 0 14px #f4ce7338; }
.poker-seat-winner .poker-seat-info { border-color: #f9d382; box-shadow: 0 0 20px #eabb535e; }
.poker-position {
  padding: 1px 4px;
  border-radius: 3px;
  background: #0a2019b8;
  color: var(--poker-brass);
  font-size: 10px;
  font-weight: 800;
}
.poker-stack { color: #bed6ca; font-size: clamp(10px, 2.7vw, 13px); font-variant-numeric: tabular-nums; white-space: nowrap; }
.poker-stack:empty { display: none; }
.poker-hand {
  font-size: clamp(11px, 2.8vw, 14px);
  line-height: 1.15;
  font-weight: 700;
  color: #f0dfb8;
  overflow-wrap: anywhere;
}

.poker-center { position: relative; display: grid; justify-items: center; gap: 12px; width: min(100%, 560px); }
.poker-bank {
  display: flex;
  gap: 9px;
  align-items: center;
  min-width: 103px;
  padding: 5px 13px 5px 9px;
  border: 1px solid #d1ac6c82;
  border-radius: 999px;
  background: linear-gradient(155deg, #214437, #0b201a);
  box-shadow: 0 4px 8px #041e18ac, inset 0 1px 0 #edd6a735;
}
.poker-bank-total { display: grid; line-height: 1; text-align: left; }
.poker-bank-total > span { color: #d3ddc2; font-size: 10px; }
.poker-bank strong { margin-top: 2px; color: var(--poker-brass); font-size: clamp(17px, 3.8vw, 22px); font-variant-numeric: tabular-nums; }
.poker-bank-won { border-color: var(--poker-brass); box-shadow: 0 0 22px #efbb6370; }
.poker-bank-chips { position: relative; width: 23px; height: 23px; transform: rotateX(31deg) rotateZ(-14deg); }
.poker-chip {
  --chip-ink: #bd8644;
  --chip-center: #64402c;
  --chip-brass: #ffe2a8;
  position: absolute;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: repeating-conic-gradient(var(--chip-brass) 0deg 17deg, var(--chip-ink) 18deg 59deg, var(--chip-brass) 60deg);
  border: 1px solid #ffe4ae7d;
  box-shadow: 0 2px 0 #553521, 0 4px 5px #0008;
}
.poker-chip::after {
  content: "◆";
  display: grid;
  place-items: center;
  width: 68%;
  height: 68%;
  border-radius: inherit;
  border: 1px solid #ffe4a884;
  background: var(--chip-center);
  color: var(--chip-brass);
  font: 9px/1 Georgia, serif;
}
.poker-chip[data-color="jade"] { --chip-ink: #398262; --chip-center: #154135; }
.poker-chip[data-color="wine"] { --chip-ink: #a64c55; --chip-center: #4a222b; }
.poker-bank-chips .poker-chip:nth-child(1) { top: 4px; left: 0; }
.poker-bank-chips .poker-chip:nth-child(2) { top: 1px; left: 1px; }
.poker-bank-chips .poker-chip:nth-child(3) { top: -2px; left: 2px; }
.poker-effects { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.poker-effects .poker-chip { opacity: 0; }

.poker-cards { display: flex; justify-content: center; gap: clamp(5px, 1.3vw, 10px); }
.poker-card {
  position: relative;
  width: var(--poker-card-width);
  aspect-ratio: 5 / 7;
  border-radius: 7px;
  color: #182b25;
  perspective: 350px;
}
.poker-card-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.poker-card-front, .poker-card-back {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 1px solid #fff0c8;
  border-radius: inherit;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.poker-card-inner { border-radius: inherit; }
.poker-card-front {
  background:
    radial-gradient(circle at 30% 14%, #fffef1, transparent 70%),
    linear-gradient(145deg, #f7eacb, #d6bd8b);
  box-shadow: 0 3px 0 #111b14, 0 5px 8px #0006;
}
.poker-card-red { color: #92222a; }
.poker-card-corner { position: absolute; top: 6%; left: 10%; font: 700 clamp(13px, 3.5vw, 22px)/1 Georgia, serif; }
.poker-card-corner.reverse { inset: auto 10% 6% auto; transform: rotate(180deg); }
.poker-card-pip { font: 700 clamp(25px, 7vw, 44px)/1 Georgia, serif; }
.poker-card[data-card="empty"] {
  background: #092d237a;
  border: 1px dashed #d1dca967;
  box-shadow: inset 0 1px 6px #0004;
}
.poker-card-back {
  transform: rotateY(180deg);
  background:
    repeating-linear-gradient(45deg, #eac87c37 0 1px, transparent 1px 5px),
    repeating-linear-gradient(-45deg, #eac87c28 0 1px, transparent 1px 5px),
    radial-gradient(ellipse at center, #45604d, #132722 80%);
  border-color: #e7c686bf;
  box-shadow: inset 0 0 0 3px #122c28, inset 0 0 0 4px #edcc8c81, 0 3px 0 #101b16, 0 5px 8px #0006;
  color: var(--poker-brass);
  font: 700 clamp(18px, 5vw, 30px)/1 Georgia, serif;
}
.poker-card[data-card="back"] .poker-card-inner { transform: rotateY(180deg); }
.poker-card-best { outline: 2px solid #ffda8b; outline-offset: 1px; box-shadow: 0 0 18px #f5bb64be; }
.poker-shoe {
  position: absolute;
  top: 2px;
  right: clamp(2px, 8%, 38px);
  width: clamp(22px, 6vw, 33px);
  aspect-ratio: 5 / 7;
  border-radius: 4px;
  transform: rotate(17deg);
  box-shadow: 2px 2px 0 #a48960, 3px 4px 0 #18322a, 4px 5px 0 #9c8052, 6px 8px 8px #0007;
}
.poker-shoe .poker-card-back {
  transform: none;
  border-radius: inherit;
  font-size: 13px;
  box-shadow: inset 0 0 0 2px #122c28, inset 0 0 0 3px #edcc8c61;
}

.poker-controls {
  margin-top: 13px;
  padding: 12px;
  border: 1px solid var(--poker-line);
  border-radius: 14px;
  background: #101c1b;
}
.poker-readout { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; margin-bottom: 10px; }
.poker-readout p { margin: 0; font-size: 14px; font-weight: 800; }
.poker-readout span { color: var(--poker-muted); font-size: 12px; }
.poker-readout [data-outcome="win"] { color: #b2f3bf; }
.poker-readout [data-outcome="loss"] { color: #ffafad; }
.poker-readout [data-outcome="tie"] { color: var(--poker-brass); }
.poker-controls .stake-row { margin: 0 0 9px; }
.poker-controls .stake.active { border-color: var(--poker-brass); background: var(--poker-brass); }
.poker-actions { display: grid; grid-template-columns: .8fr 1fr 1.25fr; gap: 6px; }
.poker-controls button { min-height: 44px; }
.poker-actions button { padding: 8px 3px; font-size: clamp(11px, 3.25vw, 14px); }
.poker-controls .poker-primary {
  width: 100%;
  background: linear-gradient(135deg, #f8dfa3, #d2a762);
  color: #241a0d;
  box-shadow: none;
}
.poker-controls button:focus-visible { outline: 2px solid #fff4d8; outline-offset: 2px; }
.poker-controls button:disabled { opacity: .44; cursor: default; }
.poker-room .poker-odds { background: #101c1b; border-color: var(--poker-line); }

@media (max-width: 420px) {
  .poker-heading { align-items: start; gap: 7px; margin-bottom: 12px; }
  .poker-heading p { margin-top: 5px; }
  .poker-seat-info { padding-inline: 5px; }
  .poker-table { padding-inline: 12px; }
}
@media (max-width: 360px) {
  .poker-table { gap: 12px; padding-block: 18px; }
}
@media (min-width: 760px) and (max-height: 950px) {
  .poker-room { --poker-card-width: 57px; }
  .poker-table { gap: 20px; padding-block: 27px; }
}
@media (prefers-reduced-motion: reduce) {
  .poker-table::after, .poker-seat-info { transition: none; }
}
