:root{color-scheme:dark;--bg:#11161a;--panel:#1b2328;--line:#37434a;--gold:#f5c880;--muted:#aebbbf;--text:#f5f3ed;font:16px system-ui,sans-serif}
*{box-sizing:border-box} body{margin:0;background:radial-gradient(ellipse at 50% 0,#233238,var(--bg) 65%);color:var(--text);min-height:100vh} [hidden]{display:none!important}
header, main,footer{max-width:1120px;margin:auto;padding-inline:24px} header{height:76px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}
.brand{font:700 1.55rem Georgia,serif;color:var(--text);text-decoration:none}.brand span,.emblem{color:var(--gold)}
.format,.eyebrow{font-size:.875rem;letter-spacing:.13em;font-weight:700;color:var(--gold)}
#lobby{min-height:65vh;display:grid;grid-template-columns:1.2fr 1fr;align-items:center;gap:64px;padding-block:54px}
h1,h2,p{margin:0}h1,h2{font-family:Georgia,serif}.intro h1{font-size:clamp(3.6rem,8vw,7rem);line-height:.94;letter-spacing:-.06em;margin:18px 0 22px}.intro p{font-size:1.12rem;line-height:1.65;max-width:360px;color:var(--muted)}
.emblem{font-size:3rem;line-height:1;display:inline-grid;place-items:center;width:72px;height:72px;border:1px solid #6a5739;border-radius:50%;background:#2b2820}
form,.tray{background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:24px}
form{display:grid;gap:14px}h2{font-size:2rem;margin-bottom:6px}label{display:grid;gap:7px;font-weight:650}
input,button{font:inherit;border-radius:8px;min-height:44px;padding:9px 14px}input{background:#11191d;color:var(--text);border:1px solid #58666c;min-width:0}
button{background:#253038;color:var(--text);border:1px solid #56666d;font-weight:700;cursor:pointer}button:hover{filter:brightness(1.18)}button:disabled{opacity:.5;cursor:wait}button.primary{background:var(--gold);color:#241909;border-color:var(--gold)}:focus-visible{outline:3px solid #7edbc5;outline-offset:3px}
hr{width:100%;border:0;border-top:1px solid var(--line);margin:5px 0}
.table-header,.tray{display:flex;align-items:center;justify-content:space-between;gap:14px}.table-header{padding:24px 0}.table-header h1{font-size:clamp(2rem,5vw,3.5rem);margin-top:4px}
.felt{min-height:450px;padding:24px;display:grid;gap:20px;border:10px solid #302922;border-radius:74px;background:radial-gradient(ellipse,#175b49,#10392f);box-shadow:inset 0 0 0 2px #538475,0 14px 30px #0005;text-align:center}
#seats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;align-items:start}
.seat{background:#112f29;border:1px solid #5b7c70;border-radius:12px;padding:7px;min-width:0;min-height:67px}.seat strong,.seat span{display:block;overflow-wrap:anywhere}.seat span{font-size:.875rem;color:#d0e0d9}.seat .cards{margin-top:6px}.seat.current{border:2px solid var(--gold);box-shadow:0 0 0 3px #f5c88025}.seat.folded{opacity:.65}.seat.empty{border-style:dashed;color:#b4ccc3;display:grid;place-items:center}
#your-seat{justify-self:center;min-width:140px}.community{align-self:center}.cards{display:flex;gap:6px;justify-content:center}.community .cards{margin:10px 0}
.card{display:grid;place-items:center;width:clamp(38px,8vw,62px);aspect-ratio:2/3;background:#f7f2e7;border:1px solid #fff;color:#181f25;border-radius:7px;font:700 clamp(1rem,3vw,1.55rem) Georgia,serif;white-space:nowrap}.seat .card{width:clamp(23px,5vw,38px);font-size:1rem}.card.red{color:#a12a40}.card.back{background:repeating-linear-gradient(135deg,#386c60 0 3px,#234f45 3px 6px);border-color:#82a79e}.card.slot{background:#112f2960;border:1px dashed #77a99a;color:#b4ccc3}.pot{color:#e3e9e3}.pot strong{color:var(--gold)}
.tray{margin-top:16px;min-height:98px}.tray p{margin-top:5px}#controls,#controls form{display:flex;flex-wrap:wrap;gap:8px;align-items:center}#controls form{padding:0;border:0}#controls input{width:100px}
#error{margin-top:16px;color:#ffd0d0;padding:12px;border:1px solid #824953;border-radius:8px;background:#44272f}
footer{padding-block:22px;color:var(--muted);font-size:.875rem}footer span{padding:0 6px}
@media(max-width:680px){header,main,footer{padding-inline:14px}header{height:60px}.format{font-size:.7rem;letter-spacing:.05em}#lobby{grid-template-columns:1fr;gap:24px;padding-block:26px}.intro h1{font-size:3.7rem}.felt{border-width:5px;border-radius:28px;padding:12px 8px;min-height:390px}.tray{align-items:flex-start;flex-direction:column;padding:14px}#seats{grid-template-columns:repeat(3,minmax(0,1fr))}.seat{padding:4px}.table-header button{max-width:110px}}

/* The rail, seat positions and playing surface share the same table footprint. */
#game { padding-bottom: 12px; }
.table-header { padding-bottom: 16px; }
.felt {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: auto minmax(180px, 1fr) auto;
  align-items: center;
  justify-items: center;
  gap: 12px 8px;
  min-height: 470px;
  width: calc(100% - 44px);
  margin: 28px auto 36px;
  padding: 10px 12px;
  border: 15px solid #37241c;
  border-radius: 46% / 43%;
  background: radial-gradient(ellipse at 50% 35%, #247355 0%, #14543e 62%, #103225 100%);
  box-shadow: inset 0 0 0 2px #b88b53, inset 0 0 38px #061e14bb,
    0 0 0 2px #a67345, 0 0 0 5px #211813, 0 19px 0 5px #0b0908, 0 28px 42px #0009;
}
.felt::before {
  content: "";
  position: absolute;
  inset: 11%;
  border: 1px solid #e3c6976b;
  border-radius: 46% / 43%;
  pointer-events: none;
}
.felt::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: repeating-linear-gradient(45deg, #fff0 0 2px, #ffffff0b 2px 3px),
    repeating-linear-gradient(-45deg, #0000 0 2px, #00000012 2px 3px);
  pointer-events: none;
  z-index: -1;
}
#seats { display: contents; }
#seats .seat, #your-seat {
  width: 100%;
  max-width: 154px;
  min-width: 0;
  z-index: 1;
}
#seats .seat:nth-child(1) { grid-area: 2 / 1; }
#seats .seat:nth-child(2) { grid-area: 1 / 2; }
#seats .seat:nth-child(3) { grid-area: 1 / 3; }
#seats .seat:nth-child(4) { grid-area: 1 / 4; }
#seats .seat:nth-child(5) { grid-area: 2 / 5; }
#your-seat { grid-area: 3 / 3; }
.seat {
  min-height: 58px;
  border-color: #8c7658;
  background: linear-gradient(#25251f, #151b17);
  box-shadow: 0 5px 12px #081a1266;
}
.seat.empty { background: #0d342bdd; border-color: #81a690; box-shadow: none; }
.seat .cards:empty { display: none; }
#your-seat .seat .card { width: 44px; font-size: 1.1rem; }
.community {
  grid-area: 2 / 2 / 3 / 5;
  display: grid;
  justify-items: center;
  gap: 5px;
}
.community .cards { margin: 3px 0; }
.community .card { width: clamp(34px, 7vw, 62px); box-shadow: 0 3px 7px #06251a55; }
.community .card.slot { border-radius: 6px; box-shadow: none; }
.pot {
  background: #092c22;
  border: 1px solid #79967c;
  border-radius: 999px;
  padding: 5px 14px;
}
.pot::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px dashed #f5c880;
  border-radius: 50%;
  background: #a37841;
  box-shadow: inset 0 0 0 2px #704d2a;
}
@media (max-width: 680px) {
  .felt {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto minmax(150px, 1fr) auto;
    width: calc(100% - 6px);
    min-height: 410px;
    border-width: 8px;
    border-radius: 35% / 22%;
    padding: 14px 5px;
    gap: 12px 5px;
  }
  .felt::before { inset: 8%; border-radius: inherit; }
  #seats .seat, #your-seat { max-width: 125px; }
  #seats .seat:nth-child(1) { grid-area: 1 / 1; }
  #seats .seat:nth-child(2) { grid-area: 1 / 2; }
  #seats .seat:nth-child(3) { grid-area: 1 / 3; }
  #seats .seat:nth-child(4) { grid-area: 3 / 1; }
  #seats .seat:nth-child(5) { grid-area: 3 / 3; }
  #your-seat { grid-area: 3 / 2; }
  .community { grid-area: 2 / 1 / 3 / 4; }
  .community .card { width: clamp(34px, 10vw, 50px); }
  #your-seat .seat .card { width: clamp(28px, 9vw, 40px); }
}
/* Chip denominations are distinguished by both their color and their number. */
.chip-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
}
.chip-stack:empty { display: none; }
.chip-pile { position: relative; }
.chip {
  --chip-color: #dedcd0;
  display: grid;
  place-items: center;
  width: 31px;
  aspect-ratio: 1;
  border: 2px dashed #fff9;
  border-radius: 50%;
  background: var(--chip-color);
  color: #171711;
  box-shadow: inset 0 0 0 2px #0005, 0 2px 0 #101610, 0 3px 3px #0008;
  font: 800 8px/1 system-ui, sans-serif;
  white-space: nowrap;
}
.chip-4 { --chip-color: #ec7979; }
.chip-20 { --chip-color: #71cfa3; }
.chip-100 { --chip-color: #8ea0bc; }
.chip-400 { --chip-color: #c7a1ec; }
.chip-2000 { --chip-color: #efb36b; }
.chip-4000 { --chip-color: #f5d985; }
.chip-10000 { --chip-color: #7ad5e5; }
.chip-count {
  position: absolute;
  top: -5px;
  right: -4px;
  padding: 1px 3px;
  border-radius: 5px;
  background: #152620;
  color: #fff;
  font: 700 9px/1.05 system-ui, sans-serif;
}
.seat .chip-stack { margin-top: 7px; }
.seat .chip { display: grid; color: #171711; font-size: 7px; width: 24px; }
#pot-chips { width: min(250px, 100%); margin: 4px 0; }
#pot-chips:not(:empty) + .pot::before { display: none; }
.table-settings {
  flex-basis: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.table-settings summary { cursor: pointer; padding: 10px 14px; font-weight: 700; }
#controls .settings-fields { padding: 0 12px 12px; align-items: end; }
#controls .settings-fields input { width: 105px; }
#blinds { font-weight: inherit; }

#ledger-panel { margin-top: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
#ledger-panel summary { padding: 14px 18px; cursor: pointer; font-weight: 700; }
.ledger-scroll { overflow-x: auto; padding: 0 18px 12px; }
#ledger-panel table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
#ledger-panel th, #ledger-panel td { padding: 9px; text-align: right; border-top: 1px solid var(--line); }
#ledger-panel th:first-child { text-align: left; }
#ledger-panel thead { color: var(--muted); }
#ledger-panel .gain { color: #9ce5b5; }
#ledger-panel .loss { color: #ffc4bc; }
#ledger-note { padding: 0 18px 14px; color: var(--muted); }

.run-summary { flex-basis: 100%; font-weight: 700; color: var(--gold); }


.table-links { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; }

.seat-heading { display: grid; justify-items: center; gap: 4px; }
.position-markers {
  display: flex;
  justify-content: center;
  gap: 3px;
}
.seat { position: relative; }
.seat .position-marker {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 2px solid #231b16;
  border-radius: 50%;
  box-shadow: 0 2px 4px #0008;
  color: #201a15;
  font: 800 10px/1 system-ui, sans-serif;
}
.position-d { background: #f4f0e6; }
.position-sb { background: #86cbb1; }
.position-bb { background: #efb86e; }



.felt-logo {
  display: block;
  width: min(220px, 100%);
  height: 78px;
  object-fit: contain;
  opacity: .92;
}
@media (max-width: 680px) {
  .felt-logo { width: min(180px, 100%); height: 65px; }
  .brand { font-size: clamp(1rem, 3.7vw, 1.55rem); }
}

.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand-icon { width: 38px; height: 38px; border-radius: 8px; flex: none; }
@media (max-width: 680px) {
  .brand-icon { width: 30px; height: 30px; }
}
