/* The table room is intentionally independent of the close-up betting layout. */
#loungeScreen {
  --room-cream: #f8efd8;
  --room-gold: #ecc36c;
  --room-muted: #a7b7ad;
  color: var(--room-cream);
  animation: room-enter .45s ease both;
}
.shell:has(#loungeScreen:not([hidden])) > .score { display: none; }

.lounge-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 4px 12px;
}
.lounge-kicker, .lounge-top .kicker, .round-eyebrow {
  color: var(--room-gold);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.lounge-top h2 {
  margin: 3px 0 2px;
  font: 400 clamp(24px, 2.6vw, 35px)/1.12 Georgia, serif;
  letter-spacing: -.025em;
}
.lounge-top p { margin: 5px 0 0; color: var(--room-muted); font-size: 11px; }
.lounge-round-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
  text-align: right;
}
.lounge-round-status strong { font-size: 14px; font-weight: 650; }
.lounge-round-status small { color: var(--room-muted); font-size: 10px; }
.round-countdown { color: var(--room-gold); font-variant-numeric: tabular-nums; }
.round-countdown b { font-size: 23px; font-weight: 650; }

.lounge-scene {
  position: relative;
  isolation: isolate;
  height: clamp(405px, calc(100dvh - 315px), 650px);
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d8b87f1c;
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 50% 45%, #3653442b, transparent 58%),
    radial-gradient(ellipse at 50% -15%, #bc906e12, transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 3px, #ffffff01 4px 5px),
    #0c1715;
  box-shadow: inset 0 0 100px #0008, 0 20px 45px #0003;
}
.lounge-scene::before {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: -1;
  border: 1px solid #d5c08c0a;
  border-radius: 16px;
  pointer-events: none;
}
.lounge-scene::after {
  content: "";
  position: absolute;
  left: 14%; right: 14%; top: 21%; bottom: 14%;
  z-index: -1;
  border-radius: 50%;
  background: #000;
  filter: blur(32px);
  opacity: .75;
  pointer-events: none;
}
.lounge-table {
  position: absolute;
  left: 50%; top: 50%;
  width: 80%;
  height: 70%;
  transform: translate(-50%, -50%);
  padding: 15px;
  border: 15px solid #493026;
  border-radius: 145px;
  background: linear-gradient(120deg, #182422, #090e0d 40%, #192320 75%, #090e0d);
  box-shadow:
    0 0 0 1px #ba886647,
    0 5px 0 1px #261912,
    0 9px 0 1px #1c120e,
    0 15px 25px #000b,
    inset 0 1px 2px #ffffff1c,
    inset 0 0 0 1px #000b;
  transition: filter .7s, box-shadow .7s;
}
.lounge-table::before {
  content: "";
  position: absolute;
  inset: -11px;
  border: 1px solid #d0a3782c;
  border-radius: inherit;
  pointer-events: none;
}
.lounge-table::after {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid #ddc9954d;
  border-radius: 112px;
  box-shadow: inset 0 0 28px #00150f88;
  pointer-events: none;
}
.lounge-table > img {
  position: absolute;
  inset: 15px;
  display: block;
  width: calc(100% - 30px); height: calc(100% - 30px);
  border-radius: 100px;
  object-fit: fill;
  opacity: .9;
  filter: saturate(.88) brightness(.93);
}
.lounge-table-label {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  color: #e3d9b966;
  text-align: center;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: .2em;
  pointer-events: none;
}
.lounge-table-label strong { display: block; font: italic 22px/1.15 Georgia, serif; letter-spacing: -.02em; text-transform: none; }
.lounge-table-label small { display: block; margin-top: 7px; font-size: 7px; letter-spacing: .19em; }
.lounge-puck {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 31px; height: 31px;
  left: 47%; top: 12%;
  transform: translate(-50%, -50%);
  border: 2px solid #e2dac6;
  border-radius: 50%;
  background: linear-gradient(145deg, #f6f3db, #d8d0b6);
  box-shadow: 0 3px 0 #8d8774, 0 5px 7px #0009;
  color: #1b3328;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .02em;
  transition: left .4s ease, top .4s ease;
}
.lounge-puck.is-off, .lounge-puck.point-off, .lounge-puck[data-state="off"] {
  background: linear-gradient(145deg, #303631, #101714);
  border-color: #acb3a2;
  color: #f1eddc;
  box-shadow: 0 3px 0 #060b08, 0 5px 7px #0009;
}
.lounge-chips { position: absolute; inset: 15px; z-index: 5; pointer-events: none; }
.table-token {
  --player-color: #ddba60;
  position: absolute;
  width: 23px; height: 23px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid #fff5da;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--player-color) 0 55%, transparent 57%),
    repeating-conic-gradient(#fff4d4 0 14deg, var(--player-color) 14deg 45deg);
  box-shadow: 0 2px 0 #0008, 0 4px 0 var(--player-color), 0 5px 0 #0009, 0 6px 6px #0008;
  color: #fff;
  text-shadow: 0 1px 3px #000c, 0 0 3px #000;
  font-size: 8px;
  font-weight: 850;
  line-height: 1;
  animation: chip-arrive .28s cubic-bezier(.2, .8, .2, 1.2) both;
  transition: left .4s ease, top .4s ease;
}
.table-token::after { content: ""; position: absolute; inset: 4px; border: 1px solid #fff5; border-radius: 50%; }
.table-token.is-winning { outline: 2px solid #f4df92; outline-offset: 2px; box-shadow: 0 0 16px #f7d76d99, 0 5px 0 #0008; }
.table-token.is-paid { animation: chip-pay .85s cubic-bezier(.25,.7,.25,1) both; }
.table-token.is-lost { animation: chip-lose .5s ease both; }

.lounge-seats { position: absolute; inset: 0; z-index: 8; pointer-events: none; }
.lounge-seat {
  --player-color: #d9be80;
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 170px;
  min-height: 62px;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}
.seat-pos-0 { left: 50%; top: 91.6%; }
.seat-pos-1 { left: 27%; top: 88.7%; }
.seat-pos-2 { left: 5.6%; top: 50%; }
.seat-pos-3 { left: 27%; top: 11.3%; }
.seat-pos-4 { left: 50%; top: 8.4%; }
.seat-pos-5 { left: 73%; top: 11.3%; }
.seat-pos-6 { left: 94.4%; top: 50%; }
.seat-pos-7 { left: 73%; top: 88.7%; }
.seat-pos-2, .seat-pos-6 { width: 112px; flex-direction: column; gap: 8px; text-align: center; }
.portrait-wrap {
  position: relative;
  flex-shrink: 0;
  width: 62px; height: 62px;
  border: 2px solid var(--player-color);
  border-radius: 50%;
  background: #101c18;
  padding: 4px;
  box-shadow: 0 4px 16px #0007, 0 0 0 3px #030b0780;
  transition: box-shadow .3s, transform .3s;
}
.portrait {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%; height: 100%;
  overflow: hidden;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 20%, color-mix(in srgb, var(--player-color) 60%, #253c37), color-mix(in srgb, var(--player-color) 20%, #13251c));
  color: #fff1d3;
  font: 600 19px/1 Georgia, serif;
  text-shadow: 0 1px 3px #0006;
}
.portrait img, img.portrait { display: block; width: 100%; height: 100%; object-fit: cover; }
.bet-clock {
  position: absolute;
  inset: 4px;
  z-index: 3;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent calc((1 - var(--remaining, 1)) * 1turn), color-mix(in srgb, var(--player-color) 62%, transparent) 0);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--player-color) 24%, transparent);
  pointer-events: none;
}
.bet-clock.is-urgent { background: conic-gradient(from 0deg, transparent calc((1 - var(--remaining, 1)) * 1turn), color-mix(in srgb, var(--player-color) 76%, transparent) 0); }
.seat-copy { min-width: 0; text-shadow: 0 2px 5px #000; }
.player-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; line-height: 1.35; }
.player-money { display: block; margin-top: 2px; color: #f6e7c6; font-size: 15px; font-weight: 650; line-height: 1.25; font-variant-numeric: tabular-nums; transition: color .3s; }
.player-status { display: block; margin-top: 4px; color: #a0b1a4; font-size: 9px; line-height: 1.3; }
.seat-stats { display: flex; gap: 8px; margin-top: 4px; color: #c2c9b4; font-size: 8px; white-space: nowrap; }
.seat-stats b { color: #ecd594; }
.seat-pos-2 .seat-stats, .seat-pos-6 .seat-stats { justify-content: center; }
.shooter-badge {
  position: absolute;
  z-index: 6;
  left: 50%; bottom: -7px;
  transform: translateX(-50%);
  padding: 3px 7px;
  border: 1px solid #f8dc8c;
  border-radius: 5px;
  background: linear-gradient(#f1cd78, #c89c4b);
  box-shadow: 0 2px 5px #0007;
  color: #342717;
  font-size: 7px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.is-shooter .portrait-wrap { box-shadow: 0 0 0 3px #ecc36c27, 0 0 23px #e5b65333, 0 4px 16px #0007; }
.is-shooter .player-name { color: #ffdda0; }
.ready-tick {
  position: absolute;
  z-index: 7;
  top: -2px; right: -2px;
  display: grid;
  place-items: center;
  width: 18px; height: 18px;
  border: 2px solid #10231a;
  border-radius: 50%;
  background: #acc991;
  color: #112a1b;
  font-size: 11px;
  font-weight: 900;
}
.ready-tick:empty, .lounge-seat:not(.is-ready) .ready-tick { display: none; }
.is-ready .player-status { color: #b5d3a0; }
.is-ready .bet-clock { opacity: 0; }
.is-ghost .portrait { font-style: italic; }
.is-empty { opacity: .52; }
.is-empty .portrait-wrap { border: 1px dashed #6b7b6c; box-shadow: none; padding: 5px; }
.is-empty .portrait { background: #1a2821; color: #94a58e; font-family: system-ui, sans-serif; font-size: 23px; font-weight: 300; }
.is-empty .player-name { color: #bec7ba; font-size: 11px; font-weight: 500; }
.is-empty .player-money { display: none; }
.is-empty .player-status { color: #9ba799; font-size: 8px; }
.is-empty .bet-clock { display: none; }
.seat-result {
  position: absolute;
  z-index: 12;
  left: 30px; top: -24px;
  transform: translateX(-50%);
  padding: 4px 8px;
  border: 1px solid #e5ce8e80;
  border-radius: 20px;
  background: #173629f0;
  box-shadow: 0 3px 15px #0009;
  color: #f3d789;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  animation: payout-arrive .6s ease both;
}
.seat-pos-2 .seat-result, .seat-pos-6 .seat-result { left: 50%; }
.seat-result.is-loss { border-color: #bb76654d; color: #dda895; background: #38251df0; }
.lounge-seat.is-paying .portrait-wrap { animation: paid-glow 1.25s ease 2; }
.lounge-seat.is-paying .player-money { color: #f5d887; }

/* The original 3D dice renderer now lives directly over the hangout felt. */
.lounge-table-entry { position: absolute; inset: 14px; z-index: 5; border: 0; border-radius: 110px; background: transparent; cursor: pointer; }
.lounge-table-entry:not(:disabled):hover { background: #fff5be08; box-shadow: inset 0 0 0 2px #e5c97966; }
.lounge-table-entry:focus-visible { outline: 3px solid #e5c979; outline-offset: -3px; }
.lounge-table-entry:disabled { cursor: default; }
#loungeDice { --stage-die-size: clamp(28px, 3.1vw, 42px); position: absolute; inset: 22px; z-index: 6; display: block; transform: none; perspective: 1000px; pointer-events: none; }
#loungeDice .dice-pair { transform-style: preserve-3d; }
#loungeDice .die { transform: rotateX(-18deg) rotateY(16deg) rotateX(var(--land-x,0deg)) rotateY(var(--land-y,0deg)) rotateZ(var(--land-z,0deg)); }
.lounge-scene.is-rolling .lounge-table { box-shadow: 0 0 0 1px #dfb06f70, 0 9px 0 1px #1c120e, 0 15px 35px #000b, 0 0 65px #bb9b4425; }
.lounge-scene.is-rolling .is-shooter .portrait-wrap { animation: shooter-pulse .9s ease infinite; }
.lounge-scene.is-paying .lounge-table { box-shadow: 0 0 0 1px #dfb06f70, 0 9px 0 1px #1c120e, 0 15px 35px #000b, 0 0 45px #d2b56224; }

.roll-reveal {
  position: absolute;
  z-index: 7;
  left: 50%; top: 50%;
  width: min(430px, 47%);
  padding: 16px 22px 18px;
  transform: translate(-50%, -50%);
  border: 1px solid #e2c67d4d;
  border-radius: 14px;
  background: linear-gradient(160deg, #11291ef5, #0b1c16f5);
  box-shadow: 0 15px 55px #0009, 0 0 50px #e1c87715, inset 0 1px 0 #fff1;
  text-align: center;
  pointer-events: none;
  animation: reveal-enter .5s cubic-bezier(.18,.85,.3,1.1) both;
}
.roll-reveal .reveal-kicker, .roll-reveal > small { display: block; color: #d6bf84; font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.roll-reveal .reveal-title, .roll-reveal h3 { margin: 4px 0 0; color: #fbefd0; font: 400 28px/1.15 Georgia, serif; letter-spacing: -.02em; }
.roll-reveal .reveal-total, .roll-reveal > strong { display: block; margin: 1px 0 0; color: #f1d58b; font: 400 clamp(50px,6vw,82px)/1 Georgia, serif; text-shadow: 0 0 40px #d1a94c33; }
.roll-reveal .reveal-detail, .roll-reveal p { margin: 8px auto 0; max-width: 32em; color: #bdcbb8; font-size: 10px; line-height: 1.5; }
.roll-reveal .reveal-detail { display: block; }
.roll-reveal.is-seven-out { border-color: #d5907070; background: linear-gradient(160deg, #30241ff7, #171a14f7); }
.roll-reveal.is-seven-out .reveal-total { color: #eaa58a; }
.roll-reveal.is-point-hit { border-color: #f0d88eb0; box-shadow: 0 15px 55px #0009, 0 0 70px #e1c87740; }

.lounge-footer { margin: 10px 0 0; padding: 0 4px; color: #819581; font-size: 9px; text-align: center; line-height: 1.4; }
.lounge-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 14px; }
.lounge-footer .lounge-actions { margin-top: 0; }
#loungeHint { flex: 0 0 100%; color: #a1b29c; font-size: 10px; text-align: center; line-height: 1.4; }
.lounge-actions button {
  min-height: 44px;
  min-width: 170px;
  padding: 11px 23px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 750;
  transition: filter .15s, background .15s;
}
.lounge-actions button:hover:not(:disabled) { filter: brightness(1.1); }
.lounge-actions button:active:not(:disabled) { filter: brightness(.95); }
.lounge-actions button:disabled { opacity: .4; }
.lounge-actions .primary-action {
  border: 1px solid #f1d58e;
  background: linear-gradient(160deg, #f0d794, #cfaa5c);
  box-shadow: 0 3px 0 #715733, 0 6px 18px #0003;
  color: #2a291d;
}
.lounge-actions .secondary-action { border: 1px solid #71846a7a; background: #203b2c; color: #e5e8cf; }
.lounge-actions .quiet-action { border: 1px solid #6274644a; background: #15271e; color: #b6c3af; min-width: 100px; }
.lounge-action-hint { margin: 9px 0 0; color: #91a58f; font-size: 10px; text-align: center; }
.lounge-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 4px 0;
  border-top: 1px solid #9fbd9e1a;
  color: #91a18f;
  font-size: 10px;
}
.lounge-meta > div { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.lounge-meta button, .lounge-meta select {
  padding: 5px 9px;
  min-height: 28px;
  border: 1px solid #71846a40;
  border-radius: 5px;
  background: #15261d;
  color: #c0cbb4;
  font-size: 10px;
}
.lounge-meta button:hover:not(:disabled) { border-color: #d4bf7890; color: #f0daa1; }
.lounge-meta button:disabled { opacity: .35; }
.lounge-meta strong { color: #d5d9be; font-weight: 600; }
.lounge-meta label { display: inline-flex; align-items: center; gap: 6px; }
.lounge-meta input[type="checkbox"] { accent-color: #d7bc77; }
.round-recap {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  color: #bdc9b7;
  font-size: 10px;
}
.round-recap li { display: flex; align-items: center; gap: 5px; }
.round-recap li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--player-color, #ceb471); }
.round-recap b, .round-recap strong { color: #edd58b; font-variant-numeric: tabular-nums; }
.round-recap .loss { color: #d19e8a; }
.round-recap .recap-title { color: #bdc9b7; font-weight: 600; }
.recap-player { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; }
.recap-player::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--player-color, #ceb471); box-shadow: 0 0 5px color-mix(in srgb, var(--player-color) 25%, transparent); }
.payout-flights { position: absolute; inset: 0; z-index: 15; pointer-events: none; overflow: hidden; }
.payout-token {
  position: absolute;
  left: 50%; top: 50%;
  display: grid;
  place-items: center;
  min-width: 45px; height: 45px;
  padding: 4px;
  transform: translate(-50%, -50%);
  border: 2px solid #fff4d3;
  border-radius: 50%;
  background: radial-gradient(circle, var(--player-color) 0 57%, transparent 59%), repeating-conic-gradient(#fff4d4 0 14deg, var(--player-color) 14deg 45deg);
  box-shadow: 0 3px 0 #0007, 0 5px 0 var(--player-color), 0 9px 13px #0008, 0 0 20px color-mix(in srgb, var(--player-color) 55%, transparent);
  color: #fffbea;
  text-shadow: 0 1px 3px #000d, 0 0 4px #0009;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}
.other-player-chips { position: absolute; z-index: 6; left: 7px; bottom: 7px; display: flex; flex-wrap: wrap; justify-content: flex-start; max-width: 74%; gap: 4px; pointer-events: none; }
.other-player-chip {
  --player-color: #71c9c2;
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 23px;
  width: 23px; height: 23px;
  border: 1px solid #fff4d2;
  border-radius: 50%;
  background: radial-gradient(circle, var(--player-color) 0 55%, transparent 57%), repeating-conic-gradient(#fff4d4 0 14deg, var(--player-color) 14deg 45deg);
  box-shadow: 0 2px 0 #0008, 0 3px 0 var(--player-color), 0 5px 5px #0008;
  color: #fffbe5;
  text-shadow: 0 1px 3px #000d, 0 0 3px #000a;
  font-size: 7px;
  font-weight: 850;
  line-height: 1;
  animation: other-chip-arrive .28s cubic-bezier(.2,.8,.2,1.2) both;
}
#bettingScreen .table-chip-group[data-player="you"] .table-chip-value { --denom: var(--your-chip-color); color: #1e2a21; text-shadow: none; }
#bettingScreen .table-chip-group[data-player="you"] .table-chip { --denom: var(--your-chip-color); }

@keyframes room-enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes chip-arrive { from { opacity: 0; transform: translate(-50%, -90%) scale(.55); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes other-chip-arrive { from { opacity: 0; transform: translateY(-8px) scale(.55); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes chip-pay { 0% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 30% { opacity: 1; transform: translate(-50%, -75%) scale(1.2); } 100% { opacity: 0; transform: translate(calc(-50% + var(--to-x, 0px)), calc(-50% + var(--to-y, 110px))) scale(.75); } }
@keyframes chip-lose { to { opacity: 0; transform: translate(-50%, -50%) scale(.25); } }
@keyframes payout-arrive { from { opacity: 0; margin-top: 12px; } to { opacity: 1; margin-top: 0; } }
@keyframes paid-glow { 0%, 100% { box-shadow: 0 0 0 3px #edcf7520, 0 3px 15px #0007; } 45% { box-shadow: 0 0 0 4px #edcf7580, 0 0 35px #ecd17070; } }
@keyframes shooter-pulse { 50% { box-shadow: 0 0 0 4px #ecc36c50, 0 0 30px #e5b65355; } }
@keyframes dice-travel { 0% { left: 38%; top: 74%; transform: translate(-50%, -50%) scale(.8); } 25% { left: 46%; top: 43%; transform: translate(-50%, -50%) scale(1.22); } 55% { left: 57%; top: 35%; transform: translate(-50%, -50%) scale(.92); } 78% { left: 52%; top: 50%; transform: translate(-50%, -50%) scale(1.08); } 100% { left: 50%; top: 52%; transform: translate(-50%, -50%) scale(1); } }
@keyframes dice-tumble { from { transform: rotate(-20deg) rotateX(0deg) rotateY(0deg); } 50% { transform: rotate(160deg) rotateX(140deg) rotateY(90deg); } to { transform: rotate(340deg) rotateX(360deg) rotateY(180deg); } }
@keyframes reveal-enter { from { opacity: 0; transform: translate(-50%, -45%) scale(.87); filter: blur(5px); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: blur(0); } }

@media (min-width: 1450px) and (min-height: 850px) {
  .lounge-scene { height: min(650px, calc(100dvh - 315px)); }
  .portrait-wrap { width: 72px; height: 72px; }
  .portrait { font-size: 22px; }
  .lounge-seat { width: 185px; gap: 12px; }
  .seat-pos-2, .seat-pos-6 { width: 115px; gap: 8px; }
  .player-name { font-size: 13px; }
  .player-money { font-size: 17px; }
  .player-status { font-size: 10px; }
  .table-token { width: 26px; height: 26px; font-size: 9px; }
  .lounge-die { width: 49px; height: 49px; padding: 9px; }
}
@media (max-width: 1100px) {
  .lounge-seat { width: 148px; gap: 8px; }
  .portrait-wrap { width: 54px; height: 54px; }
  .portrait { font-size: 17px; }
  .seat-pos-2, .seat-pos-6 { width: 95px; }
  .player-name { font-size: 11px; }
  .player-money { font-size: 14px; }
  .player-status { font-size: 8px; }
  .seat-stats { gap: 5px; font-size: 7px; }
  .lounge-table { width: 80%; border-width: 12px; padding: 12px; }
  .lounge-table > img { inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); }
  .lounge-table::after { inset: 10px; }
  .lounge-chips { inset: 12px; }
  .table-token { width: 20px; height: 20px; font-size: 7px; }
  .lounge-puck { width: 27px; height: 27px; font-size: 8px; }
  .lounge-die { width: 36px; height: 36px; padding: 6px; gap: 3px; }
  .lounge-dice { gap: 12px; }
}
@media (max-height: 780px) and (min-width: 900px) {
  .lounge-scene { height: max(370px, calc(100dvh - 315px)); }
  .lounge-top { padding-bottom: 9px; }
  .lounge-top h2 { font-size: 26px; }
  .lounge-top p { font-size: 10px; margin-top: 3px; }
  .lounge-table { width: 78%; height: 70%; }
  .portrait-wrap { width: 54px; height: 54px; }
  .lounge-seat { gap: 8px; }
  .lounge-actions { margin-top: 10px; }
  .lounge-actions button { min-height: 40px; padding: 9px 20px; }
  .lounge-meta { margin-top: 10px; padding-top: 8px; }
  .roll-reveal { padding: 12px 18px; }
  .roll-reveal .reveal-title, .roll-reveal h3 { font-size: 24px; }
  .roll-reveal .reveal-total, .roll-reveal > strong { font-size: 57px; }
}
@media (max-width: 760px) {
  .lounge-top { gap: 12px; }
  .lounge-top h2 { font-size: 25px; }
  .lounge-top p { font-size: 9px; max-width: 260px; }
  .lounge-round-status strong { font-size: 12px; }
  .lounge-round-status small { font-size: 9px; }
  .lounge-scene { height: 430px; border-radius: 16px; }
  .lounge-table { width: 83%; height: 52%; border-width: 9px; padding: 10px; border-radius: 100px; }
  .lounge-table > img { inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); border-radius: 80px; }
  .lounge-table::before { inset: -6px; }
  .lounge-table::after { inset: 8px; border-radius: 80px; }
  .lounge-chips { inset: 10px; }
  .lounge-seat { width: 112px; gap: 5px; flex-direction: column; text-align: center; }
  .portrait-wrap { width: 47px; height: 47px; padding: 3px; }
  .portrait { font-size: 16px; }
  .bet-clock { inset: 3px; }
  .seat-pos-0 { top: 89%; }
  .seat-pos-1 { left: 23%; top: 86.5%; }
  .seat-pos-2 { left: 6%; top: 50%; width: 75px; }
  .seat-pos-3 { left: 23%; top: 13.5%; }
  .seat-pos-4 { top: 11%; }
  .seat-pos-5 { left: 77%; top: 13.5%; }
  .seat-pos-6 { left: 94%; top: 50%; width: 75px; }
  .seat-pos-7 { left: 77%; top: 86.5%; }
  .player-name { max-width: 95px; font-size: 10px; }
  .player-money { font-size: 12px; margin-top: 1px; }
  .player-status { font-size: 7px; margin-top: 2px; }
  .seat-stats { justify-content: center; font-size: 6px; margin-top: 2px; }
  .shooter-badge { padding: 2px 4px; bottom: -6px; font-size: 6px; }
  .seat-result { left: 50%; top: -22px; padding: 3px 6px; font-size: 10px; }
  .table-token { width: 17px; height: 17px; font-size: 6px; }
  .table-token::after { inset: 3px; }
  .lounge-puck { width: 23px; height: 23px; font-size: 7px; }
  .lounge-die { width: 30px; height: 30px; padding: 5px; gap: 2px; border-radius: 6px; }
  .lounge-dice { gap: 10px; }
  .roll-reveal { width: 52%; padding: 12px; }
  .roll-reveal .reveal-title, .roll-reveal h3 { font-size: 20px; }
  .roll-reveal .reveal-total, .roll-reveal > strong { font-size: 45px; }
  .roll-reveal .reveal-detail, .roll-reveal p { font-size: 8px; }
  .roll-reveal .reveal-kicker, .roll-reveal > small { font-size: 7px; letter-spacing: .12em; }
  .lounge-actions { gap: 7px; flex-wrap: wrap; }
  .lounge-actions button { min-width: 130px; min-height: 40px; padding: 9px 14px; font-size: 11px; }
  .lounge-meta { flex-direction: column; gap: 8px; font-size: 9px; }
  .lounge-meta > div { justify-content: center; }
  .lounge-action-hint { font-size: 9px; }
  .other-player-chips { left: 4px; bottom: 4px; gap: 3px; }
  .other-player-chip { flex-basis: 18px; width: 18px; height: 18px; font-size: 6px; }
  #loungeHint { font-size: 9px; }
}
@media (max-width: 450px) {
  .lounge-scene { height: 460px; }
  .lounge-table { width: 88%; height: 53%; }
  .lounge-table > img { object-fit: fill; }
  .seat-pos-2 { left: 8%; }
  .seat-pos-6 { left: 92%; }
  .seat-pos-1, .seat-pos-3 { left: 20%; }
  .seat-pos-5, .seat-pos-7 { left: 80%; }
  .seat-pos-2 .seat-copy, .seat-pos-6 .seat-copy { background: #0b1c17d9; padding: 3px 5px; border-radius: 4px; }
  .lounge-top h2 { font-size: 22px; }
  .lounge-top p { max-width: 200px; }
  .lounge-round-status { max-width: 120px; }
  .lounge-round-status strong { font-size: 10px; }
  .lounge-round-status small { font-size: 8px; }
  .lounge-actions button { min-width: 0; flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  #loungeScreen, #loungeScreen *, #loungeScreen *::before, #loungeScreen *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .payout-flights { display: none; }
}

/* Each seat owns a unique color, supplied by the local or shared table. */
:root { --your-chip-color: #f4d35e; }
.your-bets-panel { margin: 0 0 12px; padding: 12px 15px; border: 1px solid #f4d35e70; border-radius: 10px; background: #293624; }
.your-bets-heading { display: flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: .06em; color: #ffe9a0; }
.your-bets-heading strong { margin-left: auto; font-size: 12px; letter-spacing: 0; }
.your-color-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--your-chip-color); border: 2px solid #fff2b5; }
#yourBetsList { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 9px 0 0; list-style: none; }
#yourBetsList li { padding: 5px 8px; border-radius: 5px; background: #101f18; color: #fff1c0; font-size: 11px; }
#bettingScreen .has-your-bet { box-shadow: inset 0 0 0 2px var(--your-chip-color), inset 0 0 24px #f4d35e25; }
.your-bet-marker { position: absolute; top: 3px; left: 3px; z-index: 7; padding: 3px 5px; border-radius: 4px; background: var(--your-chip-color); color: #16241c; font: 850 9px/1 system-ui; box-shadow: 0 1px 4px #0007; pointer-events: none; }
#bettingScreen .has-your-bet > .mark { display: none; }
#bettingScreen .table-chip-group[data-player="you"] { z-index: 6; filter: drop-shadow(0 0 3px #f4d35e90); }
#bettingScreen .other-player-chip { opacity: .8; width: 21px; height: 21px; font-size: 7px; }
.table-token.is-own { width: 27px; height: 27px; outline: 2px solid #fff5c8; outline-offset: 1px; color: #18291d; text-shadow: none; z-index: 2; }
.table-token.is-own::after { content: 'YOU'; position: absolute; top: calc(100% + 5px); padding: 1px 3px; background: #14271e; color: #ffe9a0; border-radius: 3px; font: 800 6px/1.3 system-ui; }
.bet-time-setting { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; }
.bet-time-setting select { border: 1px solid #52664b; border-radius: 5px; color: #ede9d4; background: #172c21; padding: 5px; font: inherit; }
.bet-time-setting select:disabled { opacity: .6; }
@media(max-width:700px) { .your-bet-marker { font-size: 7px; padding: 2px 3px; } .lounge-meta > div { flex-wrap: wrap; justify-content: center; } }

.collection-summary { margin: 8px 0; text-align: center; font-size: 11px; color: #e2d4a6; }

/* Fit the Activity frame without shrinking the felt into implicit grid tracks. */
.brand h1 { font-size: clamp(25px, 3.4vw, 40px); }
.brand-mark { font-size: 38px; }
.table-bank { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 0 14px; }
.table-bank > span { grid-column: 1 / -1; font-size: 10px; letter-spacing: .12em; color: #b9cbb4; }
.table-bank > strong { font: 650 clamp(29px, 4vw, 44px)/1.15 Georgia,serif; color: #f1d99b; }
.table-bank > small { font-size: 12px; color: #b9cbb4; }
#bettingScreen .board { width: 100%; aspect-ratio: auto; height: clamp(290px, 33vw, 410px); grid-template-columns: minmax(0,22fr) repeat(6,minmax(0,10fr)) minmax(0,12fr) minmax(0,6fr); }
#bettingScreen .come-row { display: contents; }
#bettingScreen .come-cell { min-width: 0; }
#bettingScreen .dontcome .zt { font-size: clamp(10px,1.4vw,18px); }
#bettingScreen .dontcome-odds { min-height: 30px; }
#bettingScreen .number { padding-top: 12%; }
#bettingScreen .number .zt { font-size: clamp(24px,3.4vw,42px); }
#bettingScreen .number .word-number { font-size: clamp(14px,2.2vw,28px); }
.betting-nav { position: sticky; top: 0; z-index: 30; background: #0c251cfa; padding: 8px 0; margin-bottom: 8px; }
.betting-nav > strong { font-size: 18px; }
.your-bets-panel { padding: 8px 12px; margin-bottom: 6px; }
#yourBetsList { margin: 6px 0 0; max-height: 65px; overflow-y: auto; }
.move-odds-offer { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 12px; margin-bottom: 8px; border: 1px solid #cdb774; border-radius: 7px; background: #253d2b; }
.move-odds-offer span { flex: 1; font-size: 12px; }
.move-odds-offer button { border: 1px solid #9ca477; border-radius: 5px; background: #d5dbb6; color: #223823; padding: 8px 12px; font-size: 11px; }
#keepPlaceButton { background: transparent; color: #e5e8d0; }
.table-chip-group { pointer-events: auto; }
.table-token { pointer-events: auto; }
.lounge-chips { z-index: 7; }
.activity-panel { padding: 6px 10px; }
.activity-panel.is-connected #activityDetail, .activity-panel.is-connected #activityParticipants { display: none; }
.activity-heading > b { font-size: 10px; }
#bettingScreen .control-top { flex-wrap: wrap; gap: 8px; }
#bettingScreen .dock-layout { flex-wrap: wrap; gap: 12px; }
#bettingScreen .dock-actions { margin-left: auto; }
#bettingScreen .controls { padding: 10px 12px; }
@media(max-height:650px) and (min-width:601px) {
  .shell { padding-top: 8px; }
  .brand h1 { font-size: 28px; }
  .brand-mark { font-size: 28px; }
  #bettingScreen .board { height: 290px; }
  .table-bank > strong { font-size: 30px; }
  .lounge-scene { height: 360px; }
}
@media(max-width:600px) {
  .brand h1 { font-size: 27px; }
  .brand-mark, .header-actions .pill { display: none; }
  #bettingScreen .board { height: 450px; grid-template-columns: repeat(6,minmax(0,1fr)); grid-template-rows: 82px 78px 70px 36px 54px 30px 100px; }
  .table-bank { gap: 2px 8px; }
  .table-bank > small { font-size: 10px; }
  .betting-nav > div { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  #bettingScreen .chip { width: 44px; height: 44px; }
  #bettingScreen .chip-face { width: 37px; }
  #bettingScreen .dice-console { display: none; }
  #bettingScreen .dock-actions { flex: 1 1 100%; }
}

@media(max-height:650px) and (min-width:601px) {
  header { margin-bottom: 5px; }
  .score { margin-bottom: 4px; }
  .score article { padding: 5px 9px; }
  .betting-nav { padding: 4px 0; margin: 4px 0; }
  .betting-nav button { padding: 7px 12px; min-height: 32px; font-size: 12px; }
  .your-bets-panel { padding: 5px 10px; }
  #yourBetsList { flex-wrap: nowrap; overflow-x: auto; margin-top: 4px; max-height: 26px; }
  #yourBetsList li { padding: 3px 6px; white-space: nowrap; font-size: 10px; }
  .move-odds-offer { padding: 5px 8px; }
}
