.table-shell { container-type: inline-size; container-name: poker-table; min-width: 0; background: #171e26; border: 1px solid #333d49; border-radius: 12px; overflow: clip; box-shadow: 0 10px 35px #0002; }
.table-toolbar { min-height: var(--heading-height); padding: 20px var(--panel-inset); display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 1px solid #303a45; background: #1c242e; }
.table-heading { display: flex; flex-direction: column; gap: 6px; }
.table-heading h2 { line-height: 24px; }
.blinds { color: var(--muted); font-size: 14px; white-space: nowrap; }
.blinds strong { color: #e2e6eb; margin-left: 5px; font-variant-numeric: tabular-nums; font-weight: 600; }
.view-tools { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.view-label { color: var(--muted); font-size: 14px; }
.view-tools select { font-size: 14px; background: #19212b; }
.reveal-options { position: relative; font-size: 14px; z-index: 12; }
.reveal-options summary { min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border: 1px solid #4b5665; border-radius: 6px; list-style: none; font-weight: 600; }
.reveal-options summary:after { content: "⌄"; color: var(--accent); }
.reveal-popover { position: absolute; right: 0; top: 52px; width: 292px; max-width: calc(100vw - 32px); padding: 18px; border: 1px solid #546171; border-radius: 8px; background: #202a36; box-shadow: 0 14px 40px #0008; }
.reveal-popover p { color: #b3beca; font-size: 13px; margin: 8px 0; line-height: 1.45; }
.reveal-actions { display: flex; gap: 12px; margin: 5px 0; }
.reveal-actions button { min-height: 44px; border: 0; color: var(--accent); background: none; font-size: 14px; padding: 0; }
#reveal-list label { display: flex; align-items: center; min-height: 44px; gap: 9px; border-top: 1px solid #ffffff0b; }
#reveal-list input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; flex: none; }
#reveal-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#reveal-list small { margin-left: auto; color: var(--muted); white-space: nowrap; font-size: 12px; }
.table-stage { position: relative; height: 780px; background: radial-gradient(ellipse at center, #29374466, #131a23aa 76%); }
.table-stage.nine-handed { height: 960px; }
.table-stage[data-seat-count="2"] { height: 780px; }
.table-meta { position: absolute; top: 18px; left: var(--panel-inset); right: var(--panel-inset); display: flex; justify-content: space-between; color: #b4c0cb; font-size: 13px; font-weight: 650; letter-spacing: .5px; }
.table-meta span:last-child { color: #8f9ead; }
.table-surface { position: absolute; inset: 120px 8% 115px; border: 15px solid #3a4148; border-radius: 48% / 48%; background: radial-gradient(ellipse at 50% 42%, #345866, #23424e 72%); box-shadow: 0 0 0 1px #68747d, 0 5px 0 3px #10151b, 0 18px 30px #0008, inset 0 0 34px #0c252e99; }
.table-surface:after { content: ""; position: absolute; inset: -8px; border: 1px dashed #87959c66; border-radius: inherit; pointer-events: none; }
.table-inner-line { position: absolute; inset: 16px; border: 1px solid #a8bbc033; border-radius: inherit; }
.felt-wordmark { position: absolute; top: 78%; left: 50%; transform: translate(-50%, -50%); color: #d5e0df24; letter-spacing: 4px; font-size: 17px; font-weight: 700; white-space: nowrap; text-align: center; }
.felt-wordmark span { display: block; font-size: 9px; letter-spacing: 3px; margin-top: 5px; }
.table-center { position: absolute; left: 50%; top: 51%; transform: translate(-50%, -50%); width: 330px; text-align: center; pointer-events: none; }
.nine-handed .table-center { top: 49%; }
.pot-label { color: #d5e1e4; font-size: 13px; letter-spacing: 1.3px; font-weight: 650; }
.pot-label .pot-unit { display: none; }
.pot-value { font-size: 42px; line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; margin: 5px 0 15px; color: #fff; text-shadow: 0 2px 3px #0004; }
.board { display: flex; justify-content: center; gap: 6px; }
.card { position: relative; background: #faf6ed; border: 1px solid #fff9f0; border-radius: 5px; color: #172430; flex: none; overflow: hidden; box-shadow: 0 3px 4px #0005; }
.board .card { width: 51px; height: 72px; }
.card-corner { position: absolute; left: 5px; top: 4px; display: flex; flex-direction: column; align-items: center; font-size: 22px; font-weight: 750; line-height: 1; letter-spacing: -.8px; }
.card-corner svg { width: 10px; height: 11px; fill: currentColor; margin-top: 3px; }
.card-suit { position: absolute; right: 6px; bottom: 7px; width: 25px; height: 25px; fill: currentColor; }
.card.red { color: #b3283b; }
.card-back { border: 3px solid #b7c4cc; background: repeating-linear-gradient(45deg, #395469 0, #395469 1px, #243f53 1px, #243f53 5px); }
.card-back:after { content: ""; position: absolute; inset: 3px; border: 1px solid #b7c4cc66; border-radius: 2px; }
.card-blank { background: #132e3944; border: 1px dashed #9db9c055; box-shadow: none; }
.card-enter { animation: deal-in .22s ease-out; }
.street-label { color: #d5e1e4; font-size: 14px; font-weight: 650; letter-spacing: 1.4px; margin-top: 13px; }
.pot-details { color: #d5e1e4; font-size: 13px; margin-top: 5px; line-height: 1.35; }
.seats { position: absolute; inset: 150px 0 100px; pointer-events: none; }
.seat { position: absolute; width: 150px; height: 104px; transform: translate(-50%, -50%); pointer-events: auto; }
.seat-body { position: relative; height: 104px; padding: 9px 10px 0 46px; border: 1px solid #566471; border-radius: 9px; background: linear-gradient(120deg, #293440, #1b242f); box-shadow: 0 5px 13px #0005; }
.seat-body:before { content: ""; position: absolute; left: 15px; right: 15px; bottom: -9px; height: 14px; border-radius: 0 0 10px 10px; border: 1px solid #53616e; background: #222e3b; z-index: -1; }
.seat-avatar { position: absolute; left: 9px; top: 11px; width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; color: #17212b; background: var(--seat-color); font-size: 12px; font-weight: 750; }
.seat-name { color: #f4f5f7; font-size: 17px; line-height: 22px; font-weight: 700; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.seat-stack { font-size: 23px; line-height: 25px; min-height: 48px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: normal; letter-spacing: -.3px; margin-left: -36px; text-align: center; }
.seat-meta { display: flex; justify-content: space-between; align-items: center; position: absolute; bottom: 0; left: 0; right: 0; padding: 3px 10px; border-top: 1px solid #ffffff13; font-size: 13px; font-weight: 600; color: #afbdca; }
.seat-position { color: #e4e9ee; font-size: 14px; }
.seat-cards { display: flex; justify-content: center; gap: 5px; position: absolute; bottom: calc(100% + 5px); left: 14px; }
.seat-cards .card { width: 39px; height: 53px; }
.seat-cards .card-corner { font-size: 20px; left: 4px; top: 3px; }
.seat-cards .card-corner svg { width: 8px; height: 9px; margin-top: 2px; }
.seat-cards .card-suit { width: 19px; height: 19px; bottom: 5px; right: 4px; }
.seat-badges { position: absolute; right: 8px; bottom: calc(100% + 6px); display: flex; flex-direction: column; gap: 4px; align-items: center; }
.seat-badge { height: 30px; min-width: 30px; padding: 0 4px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; line-height: 1; font-weight: 800; background: #f0e9d8; color: #262319; border: 2px solid #fff9ec; box-shadow: 0 3px 6px #0005; }
.seat-badge.blind { background: #385e75; color: #f4f8fa; border-color: #89aabd; font-size: 14px; border-radius: 6px; }
.seat-status { position: absolute; top: calc(100% + 11px); left: -5px; right: -5px; color: #afbdca; font-size: 14px; line-height: 19px; font-weight: 650; text-align: center; white-space: normal; overflow-wrap: anywhere; }
.seat.actor .seat-body { border: 2px solid var(--accent); padding: 8px 9px 0 45px; box-shadow: 0 0 0 4px #e2be8010, 0 4px 24px #0006; }
.seat.actor .seat-status { color: #f2cd8b; }
.seat.actor .seat-meta { background: #e2be800b; }
.seat.folded .seat-body { background: #1a232d; border-color: #3a4652; }
.seat.folded .seat-avatar { filter: saturate(.15); opacity: .7; }
.seat.folded .seat-status { color: #a8b3bf; }
.seat.all-in .seat-status { color: #fac1b7; }
.seat.winner .seat-body { border-color: #b3d7ab; animation: payout .6s ease-out; }
.seat.winner .seat-status { color: #b5e0ad; }
.seat.selected .seat-name { color: #f2cd8b; }
.seat-bet { position: absolute; top: 147px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; color: white; background: #142a34db; border: 1px solid #779aa040; border-radius: 12px; padding: 3px 8px; font-size: 16px; line-height: 20px; font-variant-numeric: tabular-nums; white-space: normal; width: max-content; max-width: 124px; }
.seat[data-layout-seat="0"] .seat-bet, .seat[data-layout-seat="1"] .seat-bet, .seat[data-layout-seat="8"] .seat-bet { top: auto; bottom: calc(100% + 75px); }
.seat[data-layout-seat="1"] .seat-bet { left: 112px; }
.seat[data-layout-seat="3"] .seat-bet { left: 99px; }
.seat[data-layout-seat="6"] .seat-bet { left: 36px; }
.seat[data-layout-seat="8"] .seat-bet { left: 24px; }
.chip { width: 17px; height: 17px; display: inline-block; flex: none; background: #ba8e4e; border: 3px dashed #f4deb4; border-radius: 50%; box-shadow: 0 2px 0 #795724, 0 4px 0 #c4a778; }
.bet-enter { animation: bet-in .18s ease-out; }
.empty-seat { position: relative; margin: 6px auto 0; width: 110px; height: 67px; border: 1px solid #56647366; border-radius: 14px 14px 8px 8px; background: #1f2b3766; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #b5c0ca; font-size: 13px; }
.empty-seat:after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -8px; height: 8px; border: 1px solid #56647366; border-top: 0; border-radius: 0 0 5px 5px; }
.empty-seat strong { color: #93a4b3; letter-spacing: 1.5px; font-size: 11px; }
.chair-outline { position: absolute; inset: 5px 5px auto; height: 12px; border: 1px solid #56647377; border-bottom: none; border-radius: 9px 9px 0 0; }
.empty-table { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; flex-direction: column; text-align: center; padding: 24px; z-index: 3; background: radial-gradient(ellipse, #162c37f5, transparent 80%); }
.empty-table-mark svg { width: 36px; height: 40px; fill: var(--accent); margin-bottom: 18px; }
.empty-table h2 { font-size: 28px; }
.empty-table p { font-size: 16px; color: #c0cdd4; margin: 12px 0 24px; }
.table-stage.is-empty .table-center, .table-stage.is-empty .felt-wordmark, .table-stage.is-empty .seats { visibility: hidden; }
.table-caption { display: flex; justify-content: space-between; gap: 16px; padding: 8px var(--panel-inset) 20px; color: #b3beca; font-size: 13px; line-height: 1.5; }
.table-caption span:last-child { white-space: nowrap; color: #92a1b1; }
.result-banner { margin: 0 var(--panel-inset) 20px; padding: var(--panel-inset); background: #24372f; border: 1px solid #678172; color: #e1eee5; border-radius: 9px; font-size: 15px; text-align: left; }
.table-settlement-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
.table-settlement-heading .eyebrow { color: #bdd8bb; font-size: 12px; }
.table-settlement-heading h2 { margin: 5px 0 0; font-size: 23px; font-weight: 700; }
.table-settlement-heading>strong { font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-settlement-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px; }
.table-pot-list, .table-net, .table-payout>div { min-width: 0; }
.table-pot + .table-pot { margin-top: 18px; }
.table-pot h3, .table-refunds p, .table-net>div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.table-pot h3 { padding-bottom: 9px; border-bottom: 1px solid #a8c3ae33; margin: 0; font-size: 15px; }
.table-pot h3 strong { font-size: 18px; }
.table-payout { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 10px 0 0; }
.table-payout>div { display: flex; flex-direction: column; gap: 4px; }
.table-payout strong, .table-refunds p span, .table-net>div span { overflow-wrap: anywhere; }
.table-payout span { color: #bdd0c3; font-size: 14px; }
.table-payout b { font-size: 18px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-refunds { margin-top: 20px; padding-top: 16px; border-top: 1px solid #a8c3ae33; color: #c3d0cb; }
.table-refunds h3, .table-net h3 { margin: 0 0 10px; font-size: 14px; }
.table-refunds p { margin: 8px 0 0; font-size: 14px; }
.table-refunds strong, .table-net strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-net { border-left: 1px solid #67817266; padding-left: 20px; }
.table-net>div { padding: 8px 0; border-bottom: 1px solid #a8c3ae1c; }
.table-net>p { color: #b9cabf; font-size: 14px; line-height: 1.5; margin-top: 14px; }
@keyframes deal-in { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bet-in { from { opacity: 0; margin-top: 6px; } to { opacity: 1; margin-top: 0; } }
@keyframes payout { 40% { box-shadow: 0 0 25px #b3d7ab55; } }
@media (max-width: 1190px) {
  .table-stage { height: 780px; }
}
@media (max-width: 780px) {
  .table-toolbar { padding: 20px var(--panel-inset); }
  .table-stage { height: 780px; }
  .seats { inset: 150px 0 100px; }
  .seat { width: 132px; }
  .seat-body { padding-left: 40px; }
  .seat-avatar { left: 7px; width: 26px; height: 26px; font-size: 11px; }
  .seat.actor .seat-body { padding-left: 39px; }
  .seat-name { font-size: 16px; }
  .seat-stack { font-size: 21px; }
  .seat-badges { right: -5px; }
  .seat-bet { font-size: 14px; }
  .table-center { width: 280px; }
  .board .card { width: 45px; height: 65px; }
}
@container poker-table (max-width: 740px) {
  .table-toolbar { padding: 20px var(--panel-inset); align-items: flex-start; flex-wrap: wrap; gap: 10px; }
  .table-heading { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
  .table-heading h2 { font-size: 16px; }
  .blinds { font-size: 13px; }
  .view-tools { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .view-label { display: none; }
  .view-tools select { width: 100%; max-width: none; font-size: 14px; min-height: 44px; }
  #seat-select { max-width: none; }
  .reveal-options { margin-left: 0; }
  .reveal-options summary { min-height: 44px; font-size: 14px; padding: 0 9px; }
  .table-stage { height: 800px; }
  .table-stage.nine-handed { height: 1160px; }
  .table-stage[data-seat-count="2"] { height: 720px; }
  .table-meta { left: var(--panel-inset); right: var(--panel-inset); top: 15px; font-size: 11px; letter-spacing: .4px; }
  .table-surface { inset: 108px 12% 80px; border-width: 10px; border-radius: 44% / 24%; }
  .table-inner-line { inset: 9px; }
  .felt-wordmark { top: 84%; font-size: 11px; letter-spacing: 2px; }
  .felt-wordmark span { font-size: 7px; letter-spacing: 1px; }
  .seats { inset: 125px 0 100px; }
  .seat { left: var(--mobile-x)!important; top: var(--mobile-y)!important; width: min(104px, 30cqw); height: 88px; }
  .seat-body, .seat.actor .seat-body { height: 88px; padding: 5px 5px 0; }
  .seat.actor .seat-body { padding: 4px 4px 0; }
  .seat-avatar { display: none; }
  .seat-name { font-size: 14px; line-height: 18px; text-align: center; }
  .seat-stack { font-size: 18px; line-height: 21px; min-height: 42px; text-align: center; letter-spacing: -.3px; margin-left: 0; }
  .seat-meta { font-size: 12px; padding: 2px 6px; }
  .seat-position { font-size: 14px; }
  .seat-status { font-size: 14px; line-height: 19px; top: calc(100% + 10px); }
  .seat-cards { gap: 3px; bottom: calc(100% + 4px); left: 0; }
  .seat-cards .card { width: 30px; height: 40px; border-radius: 3px; }
  .seat-cards .card-corner { font-size: 16px; left: 2px; top: 2px; }
  .seat-cards .card-corner svg { width: 7px; height: 8px; margin-top: 2px; }
  .seat-cards .card-suit { width: 12px; height: 12px; right: 2px; bottom: 3px; }
  .seat-badges { bottom: calc(100% + 4px); right: 0; gap: 2px; }
  .seat-badge { min-width: 25px; height: 25px; font-size: 14px; border-width: 1px; }
  .seat-badge.blind { font-size: 14px; min-width: 26px; border-radius: 4px; }
  .seat-bet { top: 123px; font-size: 14px; line-height: 17px; max-width: 74px; gap: 4px; padding: 2px 4px; }
  .chip { width: 13px; height: 13px; border-width: 2px; }
  .seat[data-layout-seat="0"] .seat-bet, .seat[data-layout-seat="1"] .seat-bet, .seat[data-layout-seat="8"] .seat-bet { top: auto; bottom: calc(100% + 65px); }
  .seat[data-layout-seat="1"] .seat-bet, .seat[data-layout-seat="2"] .seat-bet, .seat[data-layout-seat="3"] .seat-bet { left: 37px; }
  .seat[data-layout-seat="2"] .seat-bet { top: 123px; }
  .seat[data-layout-seat="6"] .seat-bet, .seat[data-layout-seat="7"] .seat-bet, .seat[data-layout-seat="8"] .seat-bet { left: calc(100% - 37px); }
  .seat[data-layout-seat="7"] .seat-bet { top: auto; bottom: calc(100% + 65px); }
  .seat[data-layout-seat="0"] .seat-bet { left: 50%; }
  .table-center { width: 182px; top: 50%; }
  .nine-handed .table-center { top: 54%; }
  .pot-label { font-size: 11px; letter-spacing: .7px; }
  .pot-label .pot-unit { display: none; }
  .pot-value { font-size: 32px; margin: 5px 0 10px; }
  .board { gap: 3px; }
  .board .card { width: 28px; height: 44px; border-radius: 3px; }
  .board .card-corner { font-size: 18px; left: 2px; top: 2px; }
  .board .card-corner svg { width: 7px; height: 8px; margin-top: 2px; }
  .board .card-suit { width: 14px; height: 14px; right: 2px; bottom: 3px; }
  .street-label { font-size: 14px; letter-spacing: .4px; margin-top: 10px; }
  .pot-details { font-size: 14px; }
  .empty-seat { width: 86px; height: 55px; font-size: 12px; }
  .empty-table h2 { font-size: 23px; }
  .empty-table p { font-size: 14px; }
  .table-caption { padding: 8px var(--panel-inset) 16px; font-size: 12px; gap: 8px; }
  .table-caption span:last-child { display: none; }
  .result-banner { margin: 0 var(--panel-inset) 16px; padding: var(--panel-inset); font-size: 14px; }
  .table-settlement-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .table-settlement-heading h2 { font-size: 20px; }
  .table-settlement-grid { grid-template-columns: 1fr; }
  .table-net { border-left: 0; padding-left: 0; border-top: 1px solid #67817266; padding-top: 16px; }
}

/* Keep the unscaled 152px board clear of side bets on narrow phones. */
@container poker-table (max-width: 340px) {
  .table-center { width: 160px; }
}
