/* =============== Big 6 (the money wheel): shared (TV and phone) =============== */
.b6-wheel { width: 100%; height: 100%; display: block; overflow: visible; }
.b6-rot { will-change: transform; }
.b6-clapper.flick { animation: b6-flick 0.09s ease-out; }
@keyframes b6-flick { 50% { transform: rotate(-14deg); } }
.b6-pill {
  display: inline-flex; align-items: center; justify-content: center; min-width: 2.2em; height: 1.6em; padding: 0 0.35em;
  border-radius: 999px; font-weight: 900; color: #fff; background: var(--c); border: 2px solid rgba(255, 255, 255, 0.35);
  white-space: nowrap; flex-shrink: 0;
}
.b6-pill[style*="#e8c76a"] { color: #2a1e00; }

/* =============== Phone =============== */
#b6.screen { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; gap: 5px; padding: 10px 16px 8px; position: relative; }
#b6 .bj-status { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the last spins sit centred between the emote and ⏱ bubbles (they're 46px wide at each side) */
.b6-hist { display: flex; gap: 4px; align-items: center; justify-content: center; font-size: 12px; flex-wrap: nowrap; overflow: hidden;
  height: 24px; min-height: 24px; flex-shrink: 0; padding: 0 50px; }
.b6-hist .muted { margin-right: 4px; font-weight: 700; white-space: nowrap; }
.b6-hist .b6-pill:nth-child(2) { outline: 2px solid var(--accent); }
/* the wheel keeps its own box (it isn't redrawn), so its spin carries on while the rest of the screen updates */
.b6-wheelbox { position: relative; flex: 1 1 0; min-height: 120px; display: flex; justify-content: center; }
.b6-wheel-art { height: 100%; aspect-ratio: 208 / 214; max-width: 100%; }
.b6-wheelbox.mine .b6-wheel { animation: b6-ready 1.2s ease-in-out infinite; }
@keyframes b6-ready { 50% { filter: drop-shadow(0 0 12px rgba(245, 197, 66, 0.95)); } }
/* My turn to spin: the wheel comes up big in the middle of the screen over a dimmed table. Only the drawing moves out
   (the box keeps its place), so nothing else on the screen shifts. */
/* Under it, in the same layer: a line of text (hints, "Too slow!", the result) and the Spin button (until it's spun). */
.b6-big-back, .b6-big-say, .b6-big-spin { display: none; }
.b6-wheelbox.big .b6-big-back { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(4, 10, 8, 0.78); }
/* the wheel sits a little above the middle; its bottom edge is at 50% + about 0.41 of its width */
.b6-wheelbox.big .b6-wheel-art {
  position: fixed; z-index: 41; left: 50%; top: 50%; height: auto; width: min(94vw, 62vh); transform: translate(-50%, -60%);
  touch-action: none; cursor: grab; animation: b6-grow 0.35s ease-out;
}
@keyframes b6-grow { from { scale: 0.55; opacity: 0.4; } }
.b6-wheelbox.big .b6-big-say {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; position: fixed; z-index: 42;
  left: 0; right: 0; height: 48px; top: calc(50% + min(38.5vw, 25.4vh) + 4px);
  text-align: center; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9); pointer-events: none;
}
/* The Spin button sits where the bottom bar is (big6-phone.js lines it up with the bar's box), in the wheel's layer so it
   isn't dimmed: the same place and size as the bottom bar's other buttons over the phases. */
.b6-wheelbox.big.can-spin .b6-big-spin {
  position: fixed; z-index: 42; margin: 0; left: 16px; right: 16px; bottom: 8px; height: 120px; width: auto;
  padding: 0; display: flex; align-items: center; justify-content: center; gap: 10px; line-height: 1; font-size: 26px;
}
.b6-big-say b { font-size: 22px; font-weight: 900; color: var(--accent); }
.b6-big-say small { font-size: 14px; font-weight: 700; opacity: 0.85; }
.b6-big-say.pop { animation: b6-pop 0.3s ease-out; }
/* the status line and the turn timer stay readable above the dimmed table */
#b6:has(.b6-wheelbox.big) #b6Status, #b6:has(.b6-wheelbox.big) #b6Timer { position: relative; z-index: 43; }
@keyframes b6-pop { from { transform: scale(0.7); opacity: 0; } }
.b6-body { display: flex; flex-direction: column; flex: 0 0 auto; gap: 5px; }
.b6-felt {
  display: flex; flex-direction: column; gap: 5px; padding: 6px; height: clamp(118px, 22vh, 170px);
  background: radial-gradient(ellipse at 50% 30%, var(--felt-1), var(--felt-2) 90%); border: 5px solid var(--rail);
  border-radius: 14px; box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.5);
}
.b6-row { flex: 1 1 0; min-height: 0; display: flex; gap: 5px; }
.b6-spot {
  position: relative; flex: 1 1 0; min-width: 0; padding: 0 2px; border-radius: 8px; color: #fff; background: var(--c);
  border: 2px solid rgba(255, 255, 255, 0.55); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  line-height: 1; touch-action: manipulation; font-weight: 900; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25);
}
.b6-spot[data-spot="1"] { color: #2a1e00; }
.b6-spot[data-spot="joker"], .b6-spot[data-spot="logo"] { border-color: var(--accent); }
.b6-spot.has { touch-action: none; }
.b6-spot b { font-size: clamp(13px, 2.6vh, 18px); white-space: nowrap; }
.b6-spot[data-spot="joker"] b, .b6-spot[data-spot="logo"] b { font-size: clamp(11px, 2.1vh, 15px); color: #f5c542; }
.b6-spot small { font-size: clamp(9px, 1.5vh, 11px); opacity: 0.9; }
/* your chip sits under the pay, in its own space (kept even when empty, so the number never moves) */
.b6-spot .rl-mychip { position: relative; left: auto; top: auto; transform: none; margin-top: 1px; height: 20px; min-width: 20px; flex-shrink: 0; }
.b6-spot .rl-mychip.none { visibility: hidden; }
.b6-spot.drop { outline: 3px solid var(--accent); }
.b6-spot.win { box-shadow: 0 0 0 3px var(--accent), 0 0 18px rgba(245, 197, 66, 0.9); z-index: 1; }
.b6-felt.frozen .b6-spot { pointer-events: none; }
.b6-felt.frozen .b6-spot:not(.win):not(.has) { filter: saturate(0.6) brightness(0.8); }
#b6 .bj-actions-bar { position: static; padding: 2px 0 0; flex-shrink: 0; }
#b6 .bj-actions-bar.cr-bar-alt { position: relative; }
#b6 .chip-tray { padding: 2px 0 6px; }
#b6 .row3 { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 8px; }
#b6 .row3 button { height: 46px; padding: 0 6px; font-size: 17px; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
#b6 .cr-bar-over .big-button { width: 100%; height: 100%; margin: 0; }
@media (max-height: 700px) {
  #b6 .casino-chip { width: 52px; height: 52px; }
  #b6 .casino-chip span { inset: 7px; font-size: 15px; }
}

/* =============== TV: the house frame (tv-frame.js) ===============
   The felt: the big wheel on its left (full height), the game's name printed top right and the bet layout along the
   bottom right (the banner sits between them). The side panel: status, players, last spins, Scan to join. */
.b6-tv { display: flex; flex-direction: column; overflow: hidden; }
.b6-felt-tv { position: relative; min-height: 0; box-sizing: border-box; padding: 1.2vw; border-radius: 2vw; border: 1vw solid var(--rail);
  background: radial-gradient(ellipse at 30% 45%, var(--felt-1), var(--felt-2) 85%); box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5); }
.b6-stage { position: absolute; left: 1.2vw; top: 1.5vh; bottom: 1.5vh; width: 44%; display: flex; align-items: center; justify-content: center; z-index: 1; }
.b6-stage .b6-wheel-art { height: 100%; max-height: 100%; aspect-ratio: 208 / 214; max-width: 100%; }
.b6-stage.lit .b6-wheel { filter: drop-shadow(0 0 1.2vw rgba(245, 197, 66, 0.55)); }
.b6-tv .hf-felt-name { top: 8%; left: 46%; right: 0; --hf-name: 3.8vw; }
.b6-tvboard { position: absolute; left: 47%; right: 1.4vw; bottom: 1.6vw; height: 48%; display: flex; flex-direction: column; gap: 0.7vw; z-index: 1; }
.b6-tvrow { display: flex; gap: 0.7vw; flex: 1 1 0; min-height: 0; }
.b6-tvspot {
  position: relative; flex: 1 1 0; min-width: 0; border-radius: 0.8vw; background: var(--c); border: 0.2vw solid rgba(255, 255, 255, 0.55);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3vh; color: #fff; font-weight: 900;
  box-shadow: inset 0 -0.4vw 0 rgba(0, 0, 0, 0.25); padding: 0.4vw 0.3vw;
}
.b6-tvspot[data-spot="1"] { color: #2a1e00; }
.b6-tvspot b { font-size: 2.4vw; line-height: 1; }
.b6-tvspot[data-spot="joker"] b, .b6-tvspot[data-spot="logo"] b { font-size: 1.7vw; color: #f5c542; }
.b6-tvspot small { font-size: 0.95vw; opacity: 0.9; }
.b6-tvspot.win { box-shadow: 0 0 0 0.25vw var(--accent), 0 0 2vw rgba(245, 197, 66, 0.85); border-color: var(--accent); z-index: 1; }
/* chips in fixed slots under the number, one per seat (empty slots keep their room, so nothing moves) */
.b6-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.15vw; pointer-events: none; margin-top: 0.6vh; max-width: 100%; }
.b6-dot {
  width: 1.45vw; height: 1.45vw; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 0.75vw; font-weight: 900; color: #111; background: var(--c, #ddd);
  border: 0.12vw dashed rgba(0, 0, 0, 0.5); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); line-height: 1; letter-spacing: -0.03vw;
}
.b6-dot.long { font-size: 0.6vw; }
.b6-dot.empty { visibility: hidden; }
/* the slot it stopped on, next to its name in the status box */
.b6-tv .hf-status .t { display: flex; align-items: center; justify-content: center; gap: 0.8vw; }
.b6-tv .hf-status .b6-pill { font-size: 1.3vw; }
/* the last spins, in the side panel's extra */
.b6-tv .hf-extra .b6-history { display: flex; flex-wrap: wrap; gap: 0.35vw; font-size: 0.95vw; overflow: hidden; max-height: 5.4vw; padding: 3px; }
.b6-tv .hf-extra .b6-history .b6-pill:first-child { outline: 3px solid var(--accent); }
