:root {
  --bg: #0b1020;
  --card: #121a33;
  --muted: #9aa6c2;
  --text: #e8edff;
  --border: #223055;
  --accent: #4c8bf5;
  --danger: #ff6b6b;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
  background: var(--bg);
  color: var(--text);
}
.wrap {
  max-width: 1600px;
  margin: 0 auto;
  padding: 16px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.brand {
  font-weight: 700;
  letter-spacing: .4px;
}
.pill {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
}
.pill.ok {
  border-color: rgba(76,139,245,.6);
  color: var(--text);
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}
@media (max-width:860px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
.row {
  margin: 10px 0;
}
label {
  display: block;
  color: var(--muted);
  font-size: 13px;
}
input {
  width: 100%;
  margin-top: 6px;
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0e1530;
  color: var(--text);
  outline: none;
}
input:focus {
  border-color: rgba(76,139,245,.8);
}
.btn {
  border: 1px solid var(--border);
  background: #0e1530;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.btn.primary {
  background: var(--accent);
  border-color: rgba(76,139,245,.9);
}
.btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}
.error {
  color: var(--danger);
  min-height: 20px;
  margin-top: 8px;
}
.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}
.table-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}
.muted {
  color: var(--muted);
}
.seats {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 10px;
  margin-top: 10px;
}
.seat {
  border: 1px dashed rgba(154,166,194,.35);
  border-radius: 12px;
  padding: 10px;
  min-height: 82px;
  position: relative;
}
.seatno {
  color: var(--muted);
  font-size: 12px;
}
.pname {
  margin-top: 6px;
  font-weight: 600;
}
.pstack {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}
.you {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  border: 1px solid rgba(76,139,245,.7);
  padding: 2px 8px;
  border-radius: 999px;
}
.log {
  max-height: 330px;
  overflow: auto;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  margin-top: 10px;
}
.logline {
  border: 1px solid rgba(34,48,85,.7);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 13px;
}
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.select {
  width: 100%;
  margin-top: 6px;
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0e1530;
  color: var(--text);
}
.section-title {
  margin: 10px 0 6px;
  font-size: 13px;
  color: var(--muted);
}
.divider {
  height: 1px;
  background: rgba(34,48,85,.8);
  margin: 14px 0;
  border-radius: 1px;
}
.row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.check input {
  width: auto;
  margin: 0;
}
.divider {
  height: 1px;
  background: rgba(34,48,85,.7);
  margin: 14px 0;
  border-radius: 1px;
}
.row.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.check {
  display: flex;
  gap: 10px;
  align-items: center;
}
.check input {
  width: auto;
  margin: 0;
}
.pcards {
  margin-top: 6px;
  font-family: monospace;
  font-size: 12px;
  opacity: .9;
}
.pbet {
  margin-top: 4px;
  font-size: 12px;
  opacity: .85;
}
.pfold {
  margin-top: 4px;
  font-weight: 700;
  color: #ffb4b4;
}
.adminbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-self: end;
}
.badge {
  display: inline-flex;
  padding: 2px 8px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text);
}
.boardrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(34,48,85,.45);
  border-radius: 12px;
}
.cards {
  display: flex;
  gap: 6px;
  align-items: center;
}
.cards.board {
  justify-content: flex-start;
  min-height: 96px;
}
.cardmini {
  width: 54px;
  height: 96px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.18);
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  display: block;
}
.cardmini:not(.back) {
  background-size: 102% 102%;
  background-position: 49% 50%;
}
.cardmini.hole:not(.back) {
  background-size: 106% 106%;
  background-position: 54% 50%;
}
.cardmini .r,.cardmini .s {
  display: none;
}
.cardmini.red {
  color: #b5172b;
}
.cardmini.back {
  background-color: transparent;
  padding: 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.cardmini.back .backfill {
  display: none;
}
.seatbtn {
  margin-top: 8px;
  padding: 6px 10px;
  font-size: 12px;
}
.table-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.table-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.table-stage {
  position: relative;
  height: 620px;
  border-radius: 18px;
  overflow: hidden;
}
.table-oval {
  position: absolute;
  inset: 36px 90px;
  border-radius: 999px;
  border: 1px solid rgba(232,237,255,.12);
}
.table-oval:before {
  content: "";
  position: absolute;
  inset: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(232,237,255,.08);
}
.center {
  position: absolute;
  left: 50%;
  /*
    Board + pot must sit visually in the middle of the felt.
    The background table artwork is slightly lower than the stage midpoint,
    so we nudge the whole center group down a bit.
  */
  top: 64%;
  transform: translate(-50%,-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 420px;
}

.potwrap {
  display: flex;
  align-items: center;
  justify-content: center;
}
.potbadge {
  border: 1px solid rgba(232,237,255,.18);
  background: rgba(14,21,48,.7);
  padding: 10px 16px;
  border-radius: 14px;
  font-weight: 800;
  letter-spacing: .6px;
}
.potbadge span {
  margin-left: 10px;
  font-weight: 900;
}
.seats-oval {
  position: absolute;
  inset: 0;
}
.seat.oval {
  position: absolute;
  min-width: 220px;
  max-width: 240px;
  border: 1px solid rgba(232,237,255,.14);
  border-radius: 14px;
  background: rgba(18,26,51,.78);
  padding: 10px 10px 12px;
  backdrop-filter: blur(6px);
}
.seat.oval.empty {
  border-style: dashed;
  opacity: .85;
}
.seat.oval.turn {
  box-shadow: 0 0 0 2px rgba(76,139,245,.85), 0 0 18px rgba(76,139,245,.25);
}
.seat.oval.folded {
  opacity: .55;
}
.seathead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.seatname {
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.seatstack {
  margin-top: 8px;
  text-align: center;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: .4px;
}
.seataction {
  margin-top: 6px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.posbadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 12px;
  color: #0b1020;
  background: #e8edff;
}
.posbadge.dealer {
  width: 30px;
  height: 30px;
  border-radius: 999px;
}
.posbadge.blind {
  padding: 6px 10px;
  border-radius: 10px;
  min-width: 44px;
}
.turntag {
  position: absolute;
  left: 50%;
  top: -12px;
  transform: translateX(-50%);
  background: #ff9f43;
  color: #0b1020;
  font-weight: 900;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.25);
}
.cards.hole {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
}
.cardmini.hole {
  width: 64px;
  height: 114px;
  border-radius: 10px;
}
.chipline {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}
.chip {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,.35);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.18);
}
.chip.d50 {
  background: #7db7ff;
}
.chip.d100 {
  background: #111317;
}
.chip.d500 {
  background: #7a3cff;
}
.chip.d1000 {
  background: #ffd84d;
}
.chip.d2500 {
  background: #44c26a;
}
.chip.d5000 {
  background: #ff4c4c;
}
.chip.d10000 {
  background: #215dff;
}
.chipmore {
  color: var(--muted);
  font-size: 12px;
  margin-left: 2px;
}
.betamt {
  margin-left: 8px;
  background: rgba(255,216,77,.95);
  color: #0b1020;
  font-weight: 900;
  border-radius: 10px;
  padding: 4px 8px;
  border: 1px solid rgba(0,0,0,.25);
}
.seat.pos-1 {
  left: 50%;
  top: 52px;
  transform: translateX(-50%);
}
.seat.pos-2 {
  right: 70px;
  top: 170px;
}
.seat.pos-3 {
  right: 70px;
  bottom: 170px;
}
.seat.pos-4 {
  left: 50%;
  bottom: 52px;
  transform: translateX(-50%);
}
.seat.pos-5 {
  left: 70px;
  bottom: 170px;
}
.seat.pos-6 {
  left: 70px;
  top: 170px;
}
.seat.pos-1 .chipline {
  bottom: -30px;
}
.seat.pos-2 .chipline {
  left: 40%;
  bottom: -30px;
}
.seat.pos-3 .chipline {
  left: 40%;
  top: -30px;
}
.seat.pos-4 .chipline {
  top: -30px;
}
.seat.pos-5 .chipline {
  left: 60%;
  top: -30px;
}
.seat.pos-6 .chipline {
  left: 60%;
  bottom: -30px;
}
.actionsbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid rgba(34,48,85,.55);
  border-radius: 14px;
  background: rgba(18,26,51,.6);
}
.raise {
  width: 120px;
}
.panel {
  position: absolute;
  bottom: 18px;
  width: 320px;
  background: rgba(18,26,51,.86);
  border: 1px solid rgba(34,48,85,.7);
  border-radius: 14px;
  padding: 10px;
  backdrop-filter: blur(6px);
}
.panel.feed {
  left: 18px;
}
.panel.chat {
  right: 18px;
}
.panelhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

/* Collapsible panels (Event log / Chat) */
.panel.collapsed {
  padding-bottom: 6px;
}
.panel.collapsed .log,
.panel.collapsed .chatbox,
.panel.collapsed .chatinput {
  display: none;
}
.panel.collapsed .panelhead {
  margin-bottom: 0;
}
.btn.tiny {
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
}
.tinytext {
  font-size: 12px;
}
.log.mini {
  max-height: 140px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.panel.feed.expanded .log.mini {
  max-height: 320px;
}
.logline {
  border: 1px solid rgba(34,48,85,.7);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 13px;
}
.chatbox {
  height: 140px;
  border: 1px solid rgba(34,48,85,.55);
  border-radius: 12px;
  background: rgba(14,21,48,.55);
  padding: 8px;
  overflow: auto;
  color: var(--muted);
  font-size: 13px;
}
.chatinput {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.chatinput input {
  margin-top: 0;
}
.admin-panel {
  margin-top: 4px;
}
.admin-spacer {
  height: 360px;
}
@media (min-height:900px) {
  .admin-spacer {
    height: 520px;
  }
}
@media (max-width:1060px) {
  .table-stage {
    height: 680px;
  }
  .seat.oval {
    min-width: 200px;
    max-width: 220px;
  }
  .panel {
    width: 290px;
  }
}
.table-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.table-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.table-stage {
  position: relative;
  height: min(72vh,780px);
  min-height: 620px;
  border-radius: 18px;
  overflow: hidden;
}
.table-oval {
  position: absolute;
  inset: 30px 60px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 0 0 2px rgba(76,139,245,.10);
}
.table-oval::before {
  content: "";
  position: absolute;
  inset: 14px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
}
.center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.potwrap {
  display: flex;
  align-items: center;
  justify-content: center;
}
.potbadge {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(14,21,48,.75);
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 800;
  letter-spacing: .8px;
}
.potlabel {
  opacity: .95;
}
.potchips {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-left: 4px;
}
.potchips .chip {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(0,0,0,.35);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.16);
}
.seats-oval {
  position: absolute;
  inset: 0;
}
.seat.oval {
  position: absolute;
  width: 260px;
  min-height: 150px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(18,26,51,.9);
  border-radius: 14px;
}
.seat.oval.empty {
  border-style: dashed;
  opacity: .85;
}
.seat.oval.turn {
  box-shadow: 0 0 0 2px rgba(50,235,255,.55), 0 0 24px rgba(50,235,255,.15);
  border-color: rgba(50,235,255,.55);
}
.seat.oval.folded {
  opacity: .55;
}
.pos-1 {
  left: 50%;
  top: 6%;
  transform: translateX(-50%);
}
.pos-2 {
  right: 5%;
  top: 18%;
}
.pos-3 {
  right: 5%;
  bottom: 18%;
}
.pos-4 {
  left: 50%;
  bottom: 6%;
  transform: translateX(-50%);
}
.pos-5 {
  left: 5%;
  bottom: 18%;
}
.pos-6 {
  left: 5%;
  top: 18%;
}
.stackline,.betline {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  margin-top: 8px;
}
.betline {
  margin-top: 10px;
}
.chipcount {
  font-weight: 800;
  font-size: 12px;
  color: rgba(235,245,255,.9);
}
.chipcount.sum {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
}
.table-page {
  padding-bottom: 140px;
}
.actionsbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  width: min(1100px, calc(100% - 48px));
  z-index: 50;
  backdrop-filter: blur(10px);
}
.bottom-row {
  margin-bottom: 140px;
}
.seathead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.seatname {
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
  font-size: 14px;
}
.seatstack {
  font-weight: 900;
  font-size: 22px;
  text-align: center;
  margin-top: 6px;
}
.seatstack small {
  font-weight: 700;
  color: var(--muted);
  font-size: 12px;
  margin-left: 6px;
}
.seathole {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}
.posbadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(14,21,48,.75);
  color: var(--text);
  font-weight: 900;
}
.posbadge.dealer {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  letter-spacing: .4px;
}
.posbadge.blind {
  padding: 6px 10px;
  border-radius: 12px;
  min-width: 44px;
  letter-spacing: .4px;
}
.turntag {
  position: absolute;
  left: 50%;
  top: -12px;
  transform: translateX(-50%);
  background: #f59e0b;
  color: #111827;
  border-radius: 8px;
  padding: 5px 10px;
  font-weight: 900;
  letter-spacing: .6px;
  font-size: 12px;
  border: 1px solid rgba(0,0,0,.18);
}
.chipsline {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  align-items: flex-end;
}
.chip {
  width: 30px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.35);
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.chip.d50 {
  background: #7dd3fc;
}
.chip.d100 {
  background: #0b0b0f;
}
.chip.d500 {
  background: #8b5cf6;
}
.chip.d1000 {
  background: #facc15;
}
.chip.d2500 {
  background: #22c55e;
}
.chip.d5000 {
  background: #ef4444;
}
.chip.d10000 {
  background: #1d4ed8;
}
.chipcount {
  margin-left: 6px;
  background: rgba(14,21,48,.85);
  border: 1px solid rgba(255,255,255,.14);
  padding: 4px 8px;
  border-radius: 10px;
  font-weight: 900;
}
.bottom-row {
  display: flex;
  gap: 14px;
  align-items: stretch;
  justify-content: space-between;
}
.panel {
  position: static;
  flex: 1 1 320px;
  max-width: 420px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(18,26,51,.92);
  border-radius: 14px;
  padding: 12px;
}
.panelhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: 800;
}
.btn.tiny {
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
}
.tinytext {
  font-size: 12px;
}
.log.mini {
  max-height: 150px;
  flex-direction: column;
  gap: 6px;
  margin-top: 0;
}
.panel.feed.expanded .log.mini {
  max-height: 340px;
}
.chatbox {
  height: 150px;
  border: 1px solid rgba(34,48,85,.7);
  border-radius: 12px;
  background: #0e1530;
  opacity: .65;
}
.chatinput {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.chatinput input {
  margin-top: 0;
}
.actionsbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid rgba(34,48,85,.55);
  border-radius: 14px;
  background: rgba(18,26,51,.6);
}
.actionsbar .btn {
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 800;
}
.raisegrp {
  display: flex;
  gap: 10px;
  align-items: center;
}
.raise {
  width: 120px;
  max-width: 160px;
  text-align: center;
}
.admin-panel {
  margin-top: 10px;
}
@media (max-width:1100px) {
  .bottom-row {
    flex-direction: column;
  }
  .panel {
    max-width: none;
  }
}
.cardmini.hole {
  width: 64px;
  height: 114px;
  border-radius: 10px;
}
body.in-table {
  overflow: hidden;
}
body.in-table.is-admin {
  overflow: auto;
}
body.in-table .wrap {
  max-width: none;
  padding: 0;
}
body.in-table .topbar {
  display: none;
}
body.in-table .table-top {
  display: none;
}
.stage-scale {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #000;
}
.stage-1920 {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1920px;
  height: 1080px;
  transform: translate(-50%,-50%) scale(var(--uiScale, 1));
  transform-origin: center;
}
body.in-table .table-page {
  position: relative;
  width: 100%;
  height: 100%;
  background: url("/assets/bg.png") center/cover no-repeat;
}
body.in-table .table-stage {
  position: absolute;
  inset: 0;
  height: auto;
  border-radius: 0;
  overflow: visible;
}
body.in-table .table-oval {
  display: none;
}
body.in-table .center {
  position: absolute;
  left: 50%;
  /* Match the visual center of the felt (bg artwork sits a bit lower). */
  top: 64%;
  transform: translate(-50%,-50%);
  gap: 10px;
  min-width: 520px;
}

body.in-table .potbadge {
  background: rgba(10,12,18,.55);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  padding: 10px 16px;
}
body.in-table .potlabel {
  opacity: .9;
}
body.in-table .seats-oval {
  position: absolute;
  inset: 0;
}
body.in-table .seat.oval {
  position: absolute;
  width: 320px;
  min-height: 110px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15,18,28,.70), rgba(10,12,18,.55));
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(6px);
}
body.in-table .seat .seatname {
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,.14);
}
body.in-table .seat.oval.empty {
  border-style: dashed;
  opacity: .85;
}
body.in-table .seat.pos-1 {
  left: 50%;
  top: 240px;
  transform: translateX(-50%);
}
body.in-table .seat.pos-2 {
  right: 420px;
  top: 320px;
}
body.in-table .seat.pos-3 {
  right: 260px;
  top: 730px;
}
body.in-table .seat.pos-4 {
  left: 50%;
  top: auto;
  bottom: 88px;
  transform: translateX(-50%);
}
body.in-table .seat.pos-5 {
  left: 260px;
  top: 730px;
}
body.in-table .seat.pos-6 {
  left: 420px;
  top: 320px;
}
body.in-table .seat.pos-4 {
  width: 860px !important;
  max-width: calc(100% - 48px) !important;
  min-height: 96px;
  padding: 10px 16px;
  overflow: visible;
  display: grid;
  grid-template-columns: 170px 1fr 170px;
  grid-template-rows: 52px 32px;
  grid-template-areas: "head cards stack"
    "chips chips chips";
  align-items: center;
}
body.in-table .seat.pos-4 .seathead {
  grid-area: head;
  align-self: center;
}
body.in-table .seat.pos-4 .seatstack {
  grid-area: stack;
  justify-self: end;
  align-self: center;
  color: rgba(255,255,255,.95);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0;
}
body.in-table .seat.pos-4 .seathole {
  grid-area: cards;
  margin: 0;
  min-height: 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: center;
  position: relative;
}
body.in-table .seat.pos-4 .seathole .cardmini {
  /* Lift cards a bit so they don't collide with the chip line below. */
  margin-top: -26px;
}
body.in-table .seat.pos-4 .stackline {
  grid-area: chips;
  justify-self: center;
  align-self: center;
  margin: 0;
  max-width: 860px;
  overflow: hidden;
  white-space: nowrap;
}
body.in-table .seat.pos-4 .betline {
  display: none;
}
body.in-table .seat.pos-4 .cardmini.hole {
  width: 72px;
  height: 128px;
  transform: translateY(-26px);
}
body.in-table .seathole {
  min-height: 100px;
}
body.in-table .bottom-row {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  display: block;
  margin: 0;
}
body.in-table .panel {
  position: absolute;
  bottom: 0;
  width: 460px;
  max-width: 460px;
  padding: 12px;
  background: rgba(10,12,18,.62);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  backdrop-filter: blur(8px);
}
body.in-table .panel.feed {
  left: 16px;
}
body.in-table .panel.chat {
  right: 16px;
}
body.in-table .log.mini {
  max-height: 150px;
}
body.in-table .panel.feed.expanded .log.mini {
  max-height: 320px;
}
body.in-table .actionsbar {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: 760px;
  max-width: 760px;
  justify-content: center;
  background: rgba(10,12,18,.55);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  backdrop-filter: blur(10px);
}
body.in-table .admin-spacer {
  height: 140px;
  display: block;
}
body.in-table .admin-panel {
  max-width: 1100px;
  margin: 0 auto 40px;
  display: block;
}
.chip {
  display: inline-block;
  width: 22px;
  height: 22px;
  background: none !important;
  background-color: transparent !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
.potchips .chip {
  width: 20px;
  height: 20px;
}
.chip.d10 {
  background: url("/assets/chip_10.png") center/contain no-repeat !important;
}
.chip.d50 {
  background: url("/assets/chip_50.png") center/contain no-repeat !important;
}
.chip.d100 {
  background: url("/assets/chip_100.png") center/contain no-repeat !important;
}
.chip.d500 {
  background: url("/assets/chip_500.png") center/contain no-repeat !important;
}
.chip.d1000 {
  background: url("/assets/chip_1000.png") center/contain no-repeat !important;
}
.chip.d2500 {
  background: url("/assets/chip_2500.png") center/contain no-repeat !important;
}
.chip.d5000 {
  background: url("/assets/chip_5000.png") center/contain no-repeat !important;
}
.chip.d10000 {
  background: url("/assets/chip_10000.png") center/contain no-repeat !important;
}

.chatline{padding:4px 6px;border-bottom:1px solid rgba(255,255,255,.08);font-size:12px;}


/* Traffic table */
.traffic-table { overflow:auto; max-height: 360px; }
.traffic { width:100%; border-collapse: collapse; font-size: 14px; }
.traffic th, .traffic td { border-bottom: 1px solid rgba(255,255,255,0.08); padding: 8px 10px; text-align:left; }
.traffic th { position: sticky; top: 0; background: rgba(0,0,0,0.25); }
.traffic tr:hover td { background: rgba(255,255,255,0.04); }


/* --- Sound controls --- */
.rightbar{
  display:flex;
  align-items:center;
  gap:12px;
}
.soundctl{
  display:flex;
  align-items:center;
  gap:8px;
}
.soundctl input[type="range"]{
  width:120px;
}
@media (max-width: 680px){
  .soundctl input[type="range"]{ width:90px; }
}

/* --- Bigger board cards --- */
:root{ --boardCardScale: 1.15; }
#board-cards .cardmini{
  width: calc(54px * var(--boardCardScale));
  height: calc(96px * var(--boardCardScale));
}
