/* Shuffle House brand colours: Lucky Red, Felt Green, Jackpot Gold, Chip Silver, Jet Black, Card Cream */
:root {
  --bg: #121317;        /* Jet Black */
  --panel: #22242a;
  --panel-2: #2c2f36;
  --line: #3a3d45;
  --input: #0b0c0f;
  --text: #fff8ec;      /* Card Cream */
  --muted: #aeb4be;     /* Chip Silver, toned for text */
  --silver: #c9ced6;
  --accent: #f5c542;    /* Jackpot Gold */
  --red: #d7263d;       /* Lucky Red */
  --danger: #e0303f;
  --ok: #1e9e5a;        /* Felt Green */
  --felt-1: #1e8a50;
  --felt-2: #0b4a2a;
  --rail: #7a0c1a;      /* deep red table rail */
}

/* Table looks (from the phone concept): each player picks one for their own phone */
html[data-look="midnight"] { --felt-1: #3f74b8; --felt-2: #12305c; --rail: #2b2f38; }
html[data-look="burgundy"] { --felt-1: #a8404f; --felt-2: #5a1823; --rail: #5d4126; }

/* Brand wordmark: "Shuffle House", the last word in Jackpot Gold */
.wordmark { font-weight: 900; letter-spacing: -0.5px; color: var(--text); }
.wordmark .house { color: var(--accent); }
.credit { color: var(--silver); font-size: 0.8em; font-weight: 700; letter-spacing: 1px; opacity: 0.8; }
.brand-logo { display: block; border-radius: 22%; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); }
.brand-glow {
  background:
    radial-gradient(ellipse 120% 60% at 50% 0%, rgba(215, 38, 61, 0.35), transparent 70%),
    var(--bg);
}
button.red { background: linear-gradient(180deg, #e8323f, #b81d30); color: #fff; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
}

.hidden { display: none !important; }

button {
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: 12px;
  padding: 14px 18px;
  cursor: pointer;
  background: var(--accent);
  color: #2a1e00;
  touch-action: manipulation;
}
button:disabled { opacity: 0.4; cursor: default; }
button.secondary { background: var(--line); color: var(--text); }
button.danger { background: var(--danger); color: #fff; }
button.ok { background: var(--ok); color: #fff; }

input {
  font: inherit;
  font-size: 20px;
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--input);
  color: var(--text);
}
input:focus { outline: none; border-color: var(--accent); }

/* ---------- Every button: a clear "pressed" look ---------- */
button { transition: transform 0.08s ease, filter 0.08s ease; }
button:active:not(:disabled) { transform: scale(0.96); filter: brightness(0.85); }

/* ---------- ⋯ game menu (phones) ---------- */
.legacy-controls { display: none !important; }
.header-right { display: flex; align-items: center; gap: 10px; }
.menu-btn {
  width: 42px; height: 42px; padding: 0; border-radius: 50%; font-size: 22px; line-height: 1;
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
}
.menu-scrim { position: fixed; inset: 0; z-index: 64; background: rgba(0, 0, 0, 0.45); }
.game-menu {
  position: fixed; top: 64px; right: 12px; z-index: 65; width: min(290px, calc(100vw - 24px));
  max-height: calc(100vh - 76px); max-height: calc(100dvh - 76px); overflow-y: auto; overscroll-behavior: contain;
  background: var(--input); border: 1px solid var(--line); border-radius: 16px; padding: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6); animation: dialog-pop 0.12s ease-out;
}
.game-menu .mi {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; color: var(--text);
  padding: 12px; border-radius: 10px; font-size: 16px; font-weight: 700;
}
.game-menu .mi:hover, .game-menu .mi:active { background: rgba(255, 255, 255, 0.06); }
.game-menu .mi .ic { width: 24px; text-align: center; font-size: 18px; }
.game-menu .mi .lbl { flex: 1; }
.game-menu .mi small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 1px; }
.game-menu .mi.danger { color: #ef8a86; }
/* "Leave the session": kept apart at the very bottom, in red, so it isn't hit by mistake */
.game-menu .mi.leave { margin-top: 10px; color: #ff9c97; background: rgba(224, 48, 63, 0.14); border: 1px solid rgba(224, 48, 63, 0.45); }
.game-menu .mi.leave small { color: #e8a5a1; }
.leave-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; margin-top: 14px; padding: 12px;
  background: rgba(224, 48, 63, 0.14); color: #ff9c97; border: 1px solid rgba(224, 48, 63, 0.45); border-radius: 12px;
  font-size: 16px; font-weight: 800;
}
.leave-btn small { color: #e8a5a1; font-size: 12px; font-weight: 600; }
.big-button.rejoin { background: #2b7a4b; color: #fff; }
.game-menu .mi { padding: 9px 12px; }
.game-menu .mi .chev { color: var(--muted); font-size: 20px; font-weight: 800; }
.game-menu .mi.back { color: var(--accent); font-size: 15px; padding: 8px 12px; }
.game-menu .mi-note { color: var(--muted); font-size: 13px; font-weight: 600; padding: 6px 12px; line-height: 1.35; }
.game-menu .mi-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px 4px 6px; }
.game-menu .mi-pair button { padding: 11px 6px; border-radius: 10px; font-size: 15px; font-weight: 800; background: var(--panel); color: var(--text); border: 1px solid var(--line); }
.game-menu .mi-pair button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.game-menu .mi-choice { padding: 8px 12px; font-weight: 700; }
.game-menu .mi-choice > div { display: flex; gap: 6px; margin-top: 6px; }
.game-menu .mi-choice button { flex: 1; padding: 8px 4px; border-radius: 8px; font-size: 13px; font-weight: 800; background: var(--panel); color: var(--text); border: 1px solid var(--line); min-height: 0; }
.game-menu .mi-choice button.on { background: var(--accent); color: #2a1e00; border-color: var(--accent); }
.rules-chart { width: 100%; margin-bottom: 8px; }
.game-menu hr { border: 0; border-top: 1px solid rgba(255, 255, 255, 0.08); margin: 4px 8px; }
.game-menu .section { color: var(--muted); font-size: 11px; font-weight: 800; padding: 6px 12px 2px; text-transform: uppercase; letter-spacing: 1px; }
.game-menu .sw { width: 44px; height: 26px; border-radius: 13px; background: var(--line); position: relative; flex-shrink: 0; transition: background 0.2s; }
.game-menu .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.2s; }
.game-menu .sw.on { background: var(--ok); }
.game-menu .sw.on.away { background: var(--danger); }
.game-menu .sw.on::after { transform: translateX(18px); }

/* ---------- Pop-up dialogs ---------- */
.dialog-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(8, 8, 10, 0.78);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: dialog-fade 0.15s ease-out;
}
.dialog-box {
  background: var(--panel); border: 2px solid var(--accent); border-radius: 18px;
  padding: 22px 20px 18px; width: 100%; max-width: 380px; text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6); animation: dialog-pop 0.18s ease-out;
}
.dialog-title { font-size: 22px; font-weight: 900; color: var(--accent); }
.dialog-message { color: var(--text); opacity: 0.85; font-weight: 600; margin-top: 8px; line-height: 1.4; }
.dialog-buttons { display: flex; gap: 10px; margin-top: 18px; }
.dialog-buttons button { flex: 1; padding: 14px 8px; font-size: 16px; }
.dialog-box { max-height: calc(100dvh - 40px); overflow-y: auto; }
.dialog-choices { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.dialog-choices button { padding: 13px 10px; font-size: 17px; }
@keyframes dialog-fade { from { opacity: 0; } }
@keyframes dialog-pop { from { transform: scale(0.92); opacity: 0; } }

/* ---------- Timeouts ---------- */
.timeout-btn { padding: 10px; font-size: 15px; width: 100%; }
.closing-banner {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 24px);
  background: var(--danger); color: #fff; font-weight: 800; border-radius: 999px;
  padding: 6px 6px 6px 16px; font-size: clamp(14px, 1.6vw, 28px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5); white-space: nowrap;
}
.closing-banner button { background: #fff; color: var(--danger); border: 0; border-radius: 999px; padding: 6px 12px; font-weight: 900; font-size: 14px; min-height: 0; }
.closing-banner.hidden, .closing-banner button.hidden { display: none; }
.timeout-notice {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 40;
  background: var(--accent); color: #2a1e00; font-weight: 800; border-radius: 999px;
  padding: 8px 18px; font-size: clamp(14px, 1.6vw, 28px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

/* ---------- Paused: a bar along the bottom (the rest of the screen still works) ---------- */
.pause-overlay {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(20, 20, 24, 0.96); border-top: 3px solid var(--accent); box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.5);
}
.pause-box { display: flex; align-items: center; gap: 12px; max-width: 900px; margin: 0 auto; }
.pause-title { font-size: clamp(18px, 1.8vw, 34px); font-weight: 900; color: var(--accent); white-space: nowrap; }
.pause-sub { color: var(--muted); font-weight: 700; font-size: clamp(12px, 1.1vw, 20px); flex: 1; }
.pause-box .big-button { width: auto; font-size: 17px; padding: 12px 16px; white-space: nowrap; }
body.is-paused:not(.pause-float) .screen { padding-bottom: 84px !important; }
body.is-paused.host-wait:not(.pause-float) .screen, body.is-paused.host-wait:not(.pause-float) #play.screen { padding-bottom: 104px !important; }
/* pause-float (Blackjack for now; the plan is every game): the bar floats over the bottom of the screen, see-through,
   and nothing moves. Taps go through it to the buttons underneath, except on its own Resume button. */
body.pause-float .pause-overlay { background: rgba(14, 15, 18, 0.62); border-top-color: rgba(245, 197, 66, 0.85); box-shadow: none; pointer-events: none; }
body.pause-float .pause-overlay button { pointer-events: auto; }
@media (max-width: 600px) { .pause-sub { display: none; } .pause-box { justify-content: space-between; } }
/* waiting for the host: the countdown and who takes over always show */
@media (max-width: 600px) { .pause-overlay.host-wait .pause-sub { display: block; font-size: 13px; } .pause-overlay.host-wait .pause-box { flex-direction: column; align-items: flex-start; gap: 2px; } }
body.is-paused:not(.pause-float) .bj-actions-bar { bottom: 70px; }
.host-links { display: flex; justify-content: center; gap: 18px; margin-bottom: 6px; }

/* Small buttons along the top of the phone screen during a game */
.toolbar { display: flex; gap: 6px; flex-wrap: wrap; }
.toolbar .tool {
  flex: 1 1 auto; padding: 7px 8px; font-size: 13px; border-radius: 999px;
  background: var(--panel-2); color: var(--text); white-space: nowrap;
}
.toolbar .tool:active { background: var(--line); }

/* ---------- Small text-style buttons (End game, Leave, Chart) ---------- */
.link-btn { background: none; color: var(--accent); text-decoration: underline; padding: 6px; font-size: 15px; font-weight: 700; }

/* ---------- Final standings ---------- */
.standings { display: flex; flex-direction: column; gap: 8px; }
.standings .row { display: flex; justify-content: space-between; gap: 16px; font-weight: 700; background: var(--panel); padding: 10px 16px; border-radius: 12px; }
.standings .row:first-child { color: var(--accent); }

/* ---------- Settings menu ---------- */
.settings-list { display: flex; flex-direction: column; gap: 10px; }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 700; }
.setting select {
  font: inherit; font-weight: 700; padding: 8px 10px; border-radius: 10px;
  background: var(--input); color: var(--text); border: 2px solid var(--line); min-width: 45%;
}
.setting select:disabled { opacity: 0.8; appearance: none; border-color: transparent; text-align: right; }

/* ---------- Turn timer bar ---------- */
.timer-bar { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.15); overflow: hidden; }
.timer-bar > div { height: 100%; background: var(--ok); transition: width 0.1s linear, background 0.3s; }

/* ---------- Playing cards ---------- */
.card {
  --w: 60px;
  width: var(--w);
  height: calc(var(--w) * 1.4);
  border-radius: calc(var(--w) * 0.1);
  background: #fff;
  color: #1a1a1a;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
  font-weight: 800;
  flex-shrink: 0;
  -webkit-touch-callout: none; /* no "save image" menu on long press */
  -webkit-user-select: none;
  user-select: none;
}
.card.red { color: #d7263d; }
.card .rank { font-size: calc(var(--w) * 0.45); }
.card .suit { font-size: calc(var(--w) * 0.45); }
.card.back {
  background:
    repeating-linear-gradient(45deg, #d7263d 0 6px, #a81b2e 6px 12px);
  border: calc(var(--w) * 0.06) solid #fff;
}
.card.empty {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  border: 2px dashed rgba(255, 255, 255, 0.2);
}
.card.win { outline: 4px solid var(--accent); outline-offset: 2px; }
.card.dim { opacity: 0.35; }

@keyframes deal {
  from { transform: translateY(-30px) rotate(-8deg); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.card.new { animation: deal 0.35s ease-out; }
/* the shared TV deal (TVDeal in common.js): a card waits hidden until its flying copy lands */
.card.undealt { visibility: hidden; }
.tv-deal-fly { position: fixed; z-index: 60; pointer-events: none; transform: translate(-50%, -50%) rotate(-25deg);
  transition: left 0.3s cubic-bezier(.2,.7,.3,1), top 0.3s cubic-bezier(.2,.7,.3,1), transform 0.3s; }
.tv-deal-fly .card { box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45); }
/* a card turned face up */
@keyframes card-turn { from { transform: rotateY(90deg); } to { transform: none; } }
.card.turn-up { animation: card-turn 0.25s ease-out backwards; }
.reduce-motion .card.turn-up { animation: none !important; }

/* Casino chips (Blackjack and Craps betting) */
.chip-tray { display: flex; justify-content: center; gap: 14px; padding: 4px 0 10px; }
.casino-chip {
  width: 62px; height: 62px; border-radius: 50%; padding: 0; position: relative; flex-shrink: 0;
  background: repeating-conic-gradient(var(--edge) 0 12deg, var(--c) 12deg 45deg);
  border: 2px solid rgba(0, 0, 0, 0.45); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.45); transition: transform 0.12s;
}
.casino-chip span {
  position: absolute; inset: 9px; border-radius: 50%; background: var(--c); color: var(--ink);
  border: 2px dashed var(--edge); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 17px;
}
.casino-chip:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45); }
.casino-chip.sel { transform: translateY(-6px); box-shadow: 0 0 0 3px var(--accent), 0 8px 0 rgba(0, 0, 0, 0.35); }
.casino-chip:disabled { opacity: 0.3; }

/* ---------- Timeout: a small round bubble off to the right, level with the status line ---------- */
.timeout-btn {
  position: fixed; right: 10px; top: 62px; z-index: 30; width: 46px !important; height: 46px; padding: 0 !important;
  border-radius: 50%; font-size: 20px; line-height: 1; background: var(--panel-2); color: var(--text);
  border: 2px solid var(--accent); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.timeout-btn b {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; border-radius: 10px; padding: 0 5px;
  background: var(--accent); color: #2a1e00; font-size: 12px; display: flex; align-items: center; justify-content: center;
}

/* ---------- Craps: the roll's total flies from the landed dice to the history row (item 47) ---------- */
.chipfx-result-fly { position: fixed; z-index: 45; pointer-events: none; transform: translate(-50%, -50%) scale(1.2);
  transition: transform 0.85s cubic-bezier(0.5, 0, 0.3, 1); font-weight: 900; font-size: 30px; color: #fff;
  background: rgba(10, 10, 12, 0.8); border: 2px solid var(--accent); border-radius: 999px; padding: 2px 14px;
  box-shadow: 0 0 14px rgba(245, 197, 66, 0.7); animation: cr-fly-in 0.3s ease-out; }
.chipfx-result-fly .big { font-size: 2.6vw; }
.fly-wait { visibility: hidden; }
.fly-land { animation: fly-land 0.4s ease-out; }
@keyframes fly-land { 0% { transform: scale(1.5); } 100% { transform: scale(1); } }

/* ---------- First paint while the page starts (item 9) ---------- */
.boot-screen { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 24px; text-align: center; background: var(--bg, #121317); color: var(--text, #fff8ec); }
.boot-screen b { font-size: 26px; color: var(--accent, #f5c542); }
.boot-screen small { font-size: 15px; color: var(--muted, #aeb4be); max-width: 300px; line-height: 1.4; }
.boot-screen button { margin-top: 8px; min-width: 160px; }
.boot-screen button.hidden { display: none; }

/* ---------- Big announcements (results, rolls, Blackjack): glow in, hold, fade out ---------- */
.announce {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 0 4vw;
  animation: announce-in-out 2600ms ease-in-out forwards;
  background: radial-gradient(ellipse 60% 40% at 50% 50%, rgba(0, 0, 0, 0.55), transparent 75%);
}
.announce .a-title {
  font-size: clamp(36px, 6.2vw, 130px); font-weight: 900; letter-spacing: 0.04em; line-height: 1; color: #fff;
  text-shadow: 0 0 0.12em #fff, 0 0 0.35em rgba(255, 255, 255, 0.6), 0 6px 24px rgba(0, 0, 0, 0.9);
}
.announce .a-sub { margin-top: 1vh; font-size: clamp(15px, 1.8vw, 34px); font-weight: 800; color: #fff; text-shadow: 0 3px 12px #000; max-width: 80vw; }
.announce.green .a-title { color: #8dffb5; text-shadow: 0 0 0.12em #36e07a, 0 0 0.45em #1e9e5a, 0 6px 24px rgba(0, 0, 0, 0.9); }
.announce.red .a-title { color: #ff8f99; text-shadow: 0 0 0.12em #ff3b4e, 0 0 0.45em #d7263d, 0 6px 24px rgba(0, 0, 0, 0.9); }
.announce.gold .a-title { color: #ffe08a; text-shadow: 0 0 0.12em #f5c542, 0 0 0.45em #c99a1c, 0 6px 24px rgba(0, 0, 0, 0.9); }
/* "top": up in the free space above the cards; "small": a quieter size (Blackjack round results) */
.announce.top { justify-content: flex-start; padding-top: 27vh; background: none; }
.announce.top .a-sub { max-width: 50vw; }
.announce.top .a-title, .announce.top .a-sub { background: rgba(10, 10, 12, 0.55); border-radius: 0.3em; padding: 0 0.35em; }
.announce.small .a-title { font-size: clamp(26px, 3.4vw, 70px); }
.announce.small .a-sub { font-size: clamp(13px, 1.3vw, 26px); }
.announce.mid { justify-content: flex-start; padding-top: 41vh; background: none; }
.announce.mid .a-title, .announce.mid .a-sub { background: rgba(10, 10, 12, 0.6); border-radius: 0.3em; padding: 0 0.35em; }
/* "on-felt": centered over the felt of a table with a side column on the right, not over the whole screen */
.announce.on-felt { padding-right: 27vw; }
.announce.on-felt .a-sub { max-width: 60vw; }
/* "low": in the open felt under the cards (Baccarat), clear of the cards and the scoreboard */
.announce.low { justify-content: flex-start; padding-top: 55vh; background: none; }
.announce.low .a-title, .announce.low .a-sub { background: rgba(10, 10, 12, 0.6); border-radius: 0.3em; padding: 0 0.35em; }
@keyframes announce-in-out {
  0% { opacity: 0; transform: scale(0.82); }
  14% { opacity: 1; transform: scale(1.04); }
  22% { transform: scale(1); }
  78% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.06); }
}

/* ---------- Move pop-up over a player ("Raise to 40"), lingers then fades ---------- */
.move-pop {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -70%); z-index: 6; pointer-events: none; white-space: nowrap;
  background: #fff8ec; color: #1b1b1b; font-weight: 900; border-radius: 999px; padding: 0.25em 0.8em;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55); animation: move-pop 2500ms ease-out forwards;
}
.move-pop.bet { background: var(--accent); color: #2a1e00; }
.move-pop.fold { background: #5b5f69; color: #fff; }
@keyframes move-pop {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(0.7); }
  6% { opacity: 1; transform: translate(-50%, -85%) scale(1.08); }
  12% { transform: translate(-50%, -75%) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -75%); }
}

/* ---------- Remove-a-bet button: a clean red circle with a centred bar ---------- */
.rm-btn {
  position: absolute; top: -9px; right: -9px; width: 26px; height: 26px; border-radius: 50%; padding: 0; z-index: 3;
  background: var(--danger); border: 2px solid var(--bg); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); cursor: pointer;
}
.rm-btn::before {
  content: ''; position: absolute; left: 50%; top: 50%; width: 11px; height: 3px; border-radius: 2px; background: #fff;
  transform: translate(-50%, -50%);
}

.announce.blue .a-title { color: #9cc8ff; text-shadow: 0 0 0.12em #4a8fe0, 0 0 0.45em #2a63b8, 0 6px 24px rgba(0, 0, 0, 0.9); }

/* the status line never runs under the small timeout bubble on the right */
.screen .bj-status { padding: 0 46px; }

.error.info { color: #9fd8b0; }

/* ---------- Total bet: the same small box in every casino game's header, left of your chips ---------- */
.total-bet {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; flex-shrink: 0;
  min-width: 58px; padding: 3px 8px 4px; border-radius: 10px; background: rgba(245, 197, 66, 0.14); border: 1px solid rgba(245, 197, 66, 0.55);
}
.total-bet small { font-size: 9px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; color: rgba(255, 255, 255, 0.75); }
.total-bet b { font-size: 16px; font-weight: 900; color: var(--accent); margin-top: 2px; }
.total-bet.zero { background: transparent; border-color: var(--line); }
.total-bet.zero b { color: var(--muted); }
.header:has(.total-bet) { gap: 8px; }
.header:has(.total-bet) > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header:has(.total-bet) .chips { font-size: 19px; white-space: nowrap; }
.header:has(.total-bet) .header-right { gap: 8px; }

/* ⋯ menu: Bots − n + */
.game-menu .mi-step { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-weight: 700; }
.game-menu .mi-step .lbl { flex: 1; display: flex; flex-direction: column; }
.game-menu .mi-step .lbl small { font-weight: 600; opacity: 0.7; font-size: 12px; }
.game-menu .mi-step button { width: 40px; height: 34px; padding: 0; min-height: 0; font-size: 22px; font-weight: 900; border-radius: 10px;
  background: var(--panel); color: var(--text); border: 1px solid var(--line); }
.game-menu .mi-step button:disabled { opacity: 0.35; }
.game-menu .mi-step b { min-width: 22px; text-align: center; font-size: 18px; color: var(--accent); }
/* short phones: the ⋯ menu drops the small grey explanations so the whole top level fits without scrolling */
@media (max-height: 700px) {
  .game-menu .mi small, .game-menu .mi-step .lbl small { display: none; }
  .game-menu .mi-step { padding-top: 2px; padding-bottom: 2px; }
}
/* Phase 4: the status line under the top bar is always one line (more room for the game) */
#crStatus, #rlStatus, #bacStatus, #uthStatus { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Phase 4: press and hold to lock a bet */
.hold-ring { position: fixed; z-index: 90; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(var(--accent) 0deg, transparent 0deg); -webkit-mask: radial-gradient(circle, transparent 24px, #000 25px);
  mask: radial-gradient(circle, transparent 24px, #000 25px); animation: holdFill linear forwards; }
@property --hold { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.hold-ring { background: conic-gradient(var(--accent) var(--hold), rgba(255, 255, 255, 0.15) var(--hold)); }
@keyframes holdFill { to { --hold: 360deg; } }
.lock-mark { font-style: normal; font-size: 0.8em; margin-left: 2px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.6)); }
/* Phase 9 hotfix: a lock never changes a chip's size (it used to stretch round chips into ovals). On a chip, the 🔒 is a small
   badge over its top-right edge; on a plain bet number (Blackjack's circle and hand line) it's raised beside the number. */
.rl-mychip .lock-mark, .cr-tile .mine .lock-mark, .side-chip .lock-mark {
  position: absolute; top: -7px; right: -7px; margin: 0; font-size: 10px; line-height: 1; pointer-events: none; z-index: 3;
}
.cr-tile .mine, .side-chip { position: relative; }
.bj-circle-amt .lock-mark, .hand-bet .lock-mark { position: relative; top: -0.55em; margin-left: 1px; font-size: 0.5em; line-height: 0; }
.cr-tile, .rl-cell, .bac-spot, .uth-spot, .bj-circle { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.lock-skip { color: #ffd27a; }
/* Phase 10: Ready locked (hold Ready). The 🔒 sits inside the button at its left edge, in a gold circle, so the
   bet bar's clipping (overflow: hidden) never cuts it off; the button never changes size. */
[data-act="ready"] { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
[data-act="ready"].ready-locked, [data-act="unready"].ready-locked { position: relative; box-shadow: inset 0 0 0 2px var(--accent); }
.screen [data-act="ready"].ready-locked, .screen [data-act="unready"].ready-locked { padding-left: 30px; padding-right: 4px; }
[data-act="ready"].ready-locked::after, [data-act="unready"].ready-locked::after {
  content: '🔒'; position: absolute; top: 50%; left: 6px; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 12px; line-height: 1; pointer-events: none;
  background: var(--accent); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
/* ---------- Phase 4: Leaderboard ---------- */
.lb-title { font-weight: 900; color: var(--accent); text-align: center; }
.lb-rows { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.lb-row { display: grid; grid-template-columns: 2.2em minmax(0, 1fr) auto 5.5em; align-items: center; gap: 8px; background: var(--panel); border-radius: 12px; padding: 8px 12px; font-weight: 800; }
.lb-row.first { border: 2px solid var(--accent); box-shadow: 0 0 16px rgba(245, 197, 66, 0.35); }
.lb-row.me { background: rgba(245, 197, 66, 0.12); }
.lb-rank { font-size: 1.2em; text-align: center; }
.lb-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-name small { color: var(--muted); font-weight: 700; }
.lb-main { color: var(--accent); white-space: nowrap; }
.lb-net { text-align: right; white-space: nowrap; color: var(--muted); }
.lb-net.up { color: #6be39a; } .lb-net.down { color: #ff8a80; }
.lb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; width: 100%; margin-top: 10px; }
.lb-stat { background: rgba(255, 255, 255, 0.06); border-radius: 10px; padding: 6px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lb-stat span { font-size: 0.8em; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.lb-stat b { font-weight: 900; overflow-wrap: anywhere; }
/* item 49: the chip graph (fixed height, a line per player) */
.chip-graph { width: 100%; margin-top: 10px; background: rgba(255, 255, 255, 0.04); border-radius: 12px; padding: 8px 10px; }
.chip-graph .cg-title { font-weight: 900; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.chip-graph .cg-title small { text-transform: none; letter-spacing: 0; font-weight: 700; margin-left: 6px; }
.chip-graph svg { display: block; width: 100%; height: 84px; margin: 4px 0 2px; overflow: visible; }
.chip-graph path { fill: none; stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; opacity: 0.9; }
.chip-graph path.me { stroke-width: 3.6; opacity: 1; }
.chip-graph .axis { stroke: rgba(255, 255, 255, 0.18); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chip-graph .cg-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); font-weight: 700; }
.chip-graph .cg-key { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 12px; font-weight: 800; margin-top: 2px; }
.chip-graph .cg-key i { display: inline-block; width: 10px; height: 4px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
#gameover .chip-graph { padding: 1vh 1.2vw; }
#gameover .chip-graph .cg-title, #gameover .chip-graph .cg-key { font-size: 0.7em; }
#gameover .chip-graph svg { height: 13vh; }
#gameover .chip-graph .cg-scale { font-size: 0.55em; }
.tv-standings .chip-graph { margin-top: 1vh; }
.tv-standings .chip-graph svg { height: 8vh; }
/* phone: the leaderboard may scroll inside itself, the Back button stays put */
#over { display: flex; flex-direction: column; gap: 10px; }
#over .lb-scroll { flex: 1 1 0; min-height: 0; overflow-y: auto; }
/* TV */
#gameover .lb-wrap { width: min(70vw, 1100px); font-size: 1.6vw; }
#gameover .lb-row { padding: 1vh 1.2vw; border-radius: 1vw; }
#gameover .lb-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#gameover .lb-stat span { font-size: 0.7em; }

/* ---------- Phase 5: steady layouts. Card and felt sizes stay put between phases; where one really has to
   change (a split, a hand added) it eases over 250 ms instead of snapping. ---------- */
.card { transition: width 0.25s ease, height 0.25s ease, margin 0.25s ease; }
.bac-felt, .rl-felt, .cr-felt-phone, #uthFelt, .gesture-felt, .felt, .table-felt { transition: width 0.25s ease, height 0.25s ease; }

/* ---------- Phase 5: waking-up screen (online server starting) ---------- */
.waking { position: fixed; inset: 0; z-index: 9999; background: rgba(8, 12, 10, 0.92); display: flex; align-items: center; justify-content: center; padding: 16px; }
.waking-box { width: min(340px, 100%); text-align: center; display: flex; flex-direction: column; gap: 10px; color: var(--text); }
.waking-box b { font-size: 22px; color: var(--accent); }
.waking-box small { color: var(--muted); font-size: 14px; }
.waking-cards { font-size: 44px; letter-spacing: -8px; animation: waking-shuffle 1.1s ease-in-out infinite alternate; }
@keyframes waking-shuffle { from { transform: translateX(-10px) rotate(-6deg); } to { transform: translateX(10px) rotate(6deg); } }
.waking-bar { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.waking-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 6px; }
/* the message line under each game never changes height (a 2-line message floats over the felt for a moment) */
#crError, #rlError, #bacError, #uthError, #bjError { height: 20px; min-height: 20px; overflow: visible; position: relative; z-index: 6; font-size: 13px; line-height: 18px; }
#crError:not(:empty), #rlError:not(:empty), #bacError:not(:empty), #uthError:not(:empty), #bjError:not(:empty) { background: rgba(10, 14, 12, 0.88); border-radius: 8px; padding: 1px 8px; height: auto; max-height: 20px; }

/* ---------- Phase 5: dropped players (phone lost its connection) ---------- */
.dropped { filter: grayscale(1); opacity: 0.5; position: relative; }
.dropped::after { content: '📶'; position: absolute; top: -6px; right: -6px; font-size: 18px; line-height: 1; filter: none;
  background: #c62828; border-radius: 50%; padding: 3px; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.4); z-index: 5; }

.kick-x { font-style: normal; margin-left: 6px; display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(198, 40, 40, 0.85); color: #fff; font-size: 12px; cursor: pointer; }
.kick-btn { margin-left: 6px; padding: 2px 8px; font-size: 12px; min-height: 0; background: rgba(198, 40, 40, 0.85); color: #fff; border-radius: 8px; }
.dropped-name { opacity: 0.55; }
.drop-ico { font-style: normal; }

/* ---------- Phase 5: between-games standings on the TV lobby ---------- */
.tv-standings { margin: 1vh 0 1.4vh; display: flex; flex-direction: column; gap: 0.5vh; }
.tv-stand-row { display: grid; grid-template-columns: 2.4vw 1fr auto 7vw; gap: 1vw; align-items: center; font-size: 1.5vw;
  background: rgba(0, 0, 0, 0.3); border-radius: 10px; padding: 0.5vh 1vw; }
.tv-stand-row .rk { color: var(--accent); font-weight: 900; }
.tv-stand-row b { color: var(--accent); }
.tv-stand-row .up { color: #6fdc8c; font-weight: 800; text-align: right; }
.tv-stand-row .down { color: #ff8a80; font-weight: 800; text-align: right; }

/* ---------- Phase 5: table moments (chipfx.js) ---------- */
.chipfx-fly, .chipfx-lose { position: fixed; z-index: 9000; pointer-events: none; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 4px;
  font-weight: 900; font-size: 18px; color: #fff; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8); white-space: nowrap; }
.chipfx-fly { color: var(--c, var(--accent)); transition: transform 1.3s cubic-bezier(0.5, 0, 0.3, 1), opacity 1.3s ease-in; animation: chipfx-in 0.4s ease-out; }
.chipfx-fly.still { animation: chipfx-still 1.4s ease forwards; }
.chipfx-lose { color: #ff8a80; transition: transform 1.1s ease-in, opacity 1.1s ease-in; }
.chipfx-chip { width: 20px; height: 20px; border-radius: 50%; background: var(--c, var(--accent)); border: 3px dashed rgba(255, 255, 255, 0.85); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.5); }
.chipfx-lose .chipfx-chip { background: #7a2b2b; }
@keyframes chipfx-in { from { transform: translate(-50%, -50%) scale(0.3); opacity: 0; } }
@keyframes chipfx-still { 0% { opacity: 0; } 15%, 75% { opacity: 1; } 100% { opacity: 0; } }
.chipfx-bump { animation: chipfx-bump 0.45s ease; }
@keyframes chipfx-bump { 40% { transform: scale(1.15); } }
.chipfx-dice { position: absolute; inset: 0; pointer-events: none; z-index: 30; transition: opacity 0.5s; }
.chipfx-dice.fade { opacity: 0; }
.chipfx-die { position: absolute; width: 0; height: 0; }
.chipfx-die .die { position: absolute; width: 38px; height: 38px; transform: translate(-50%, -50%); box-shadow: 0 6px 10px rgba(0, 0, 0, 0.5); }
.tv-felt-dice .chipfx-die .die { width: 3.2vw; height: 3.2vw; }
.chipfx-banner { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); z-index: 40; pointer-events: none; text-align: center;
  background: rgba(8, 12, 10, 0.86); border: 2px solid var(--accent); border-radius: 16px; padding: 10px 18px; animation: chipfx-pop 0.35s ease-out;
  transition: opacity 0.45s, transform 0.45s; min-width: 60%; }
.chipfx-banner b { display: block; font-size: 28px; color: var(--accent); white-space: nowrap; }
.chipfx-banner small { display: block; font-size: 16px; font-weight: 800; color: #fff; }
.chipfx-banner.win small { color: #6fdc8c; }
.chipfx-banner.lose small { color: #ff8a80; }
.chipfx-banner.out { opacity: 0; transform: translate(-50%, -60%); }
.chipfx-banner.still { animation: none; transition: none; }
@keyframes chipfx-pop { from { transform: translate(-50%, -50%) scale(0.6); opacity: 0; } }
.float-layer { position: fixed; left: 16px; right: 16px; top: 96px; z-index: 8000; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.float-line { background: rgba(8, 12, 10, 0.82); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; animation: float-up 3s ease-out forwards; }
.float-line i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.float-line b { color: var(--accent); }
.float-line.still { animation: float-still 3s linear forwards; }
@keyframes float-up { 0% { transform: translateY(14px); opacity: 0; } 12% { transform: none; opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(-18px); opacity: 0; } }
@keyframes float-still { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }
/* Reduce motion (Preferences, off by default): fewer flashes and pulsing glows */
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-iteration-count: 1 !important; }
.reduce-motion .deal-fly, .reduce-motion .card.dealt { animation: none !important; transition: none !important; }

/* ---------- Phase 5: party feel ---------- */
.screen > .header { box-shadow: inset 0 3px 0 var(--me-color, transparent); }
.pc-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.react-btn { width: 34px; height: 34px; min-height: 0; padding: 0; border-radius: 50%; font-size: 18px; background: rgba(255, 255, 255, 0.08); margin-right: 4px; flex-shrink: 0; }
/* item 44: on game screens the emote is a bubble on the left, the twin of the ⏱ timeout bubble on the right */
.react-btn.react-side {
  position: fixed; left: 10px; top: 62px; z-index: 30; width: 46px; height: 46px; margin: 0; font-size: 22px;
  background: var(--panel-2); border: 2px solid var(--line); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.react-row { position: fixed; z-index: 9500; display: flex; gap: 6px; padding: 6px; border-radius: 14px; background: rgba(12, 16, 14, 0.95); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6); }
.react-row button { width: 46px; height: 46px; min-height: 0; padding: 0; font-size: 26px; border-radius: 12px; background: rgba(255, 255, 255, 0.08); }
/* after sending, the bubble lights back up clockwise (--lit goes 0 → 360deg); the window's emojis stay greyed till then */
.react-btn { position: relative; }
.react-btn.react-side { position: fixed; }
.react-btn.cooling::after {
  content: ''; position: absolute; inset: -2px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(transparent 0deg var(--lit, 0deg), rgba(8, 10, 10, 0.72) var(--lit, 0deg) 360deg);
}
.react-row.cooling button { opacity: 0.35; filter: grayscale(1); }
/* the emoji window on every game screen: most used on top, all emojis scroll underneath */
.react-row.react-window { flex-direction: column; gap: 4px; width: min(300px, calc(100vw - 20px)); padding: 8px; border: 1px solid var(--line); }
.react-window .rw-label { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted, #aaa); padding: 0 2px; }
.react-window .rw-top, .react-window .rw-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.react-window .rw-top { padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.react-window button { width: 100%; height: 40px; font-size: 24px; border-radius: 10px; }
.react-window .rw-scroll { max-height: min(230px, 38vh); overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 4px; }
.float-line .float-emote { font-size: 18px; }
.react-pop { position: fixed; z-index: 9000; pointer-events: none; font-size: 4.5vw; transform: translate(-50%, -60%); animation: react-pop 2s ease-out forwards; }
.react-pop.still { animation: float-still 2s linear forwards; }
@keyframes react-pop { 0% { transform: translate(-50%, -20%) scale(0.3); opacity: 0; } 15% { transform: translate(-50%, -70%) scale(1.2); opacity: 1; } 80% { opacity: 1; } 100% { transform: translate(-50%, -140%) scale(1); opacity: 0; } }
.bigwin { position: fixed; inset: 0; z-index: 9800; background: rgba(0, 0, 0, 0.62); display: flex; align-items: center; justify-content: center; pointer-events: none; transition: opacity 0.5s; animation: bigwin-in 0.4s ease-out; }
.bigwin.out { opacity: 0; }
.bigwin.still { animation: none; }
@keyframes bigwin-in { from { opacity: 0; } }
.bigwin-box { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.6vh; animation: chipfx-pop 0.5s ease-out; }
.bigwin.still .bigwin-box { animation: none; }
.bigwin-box small { font-size: 2vw; letter-spacing: 0.4em; color: var(--accent); font-weight: 900; }
.bigwin-box b { font-size: 5vw; color: #fff; }
.bigwin-box span { font-size: 6.5vw; font-weight: 900; color: #ffe08a; text-shadow: 0 0 2vw rgba(245, 197, 66, 0.9); }
.bigwin-box em { font-style: normal; font-size: 1.8vw; color: #fff; opacity: 0.85; }
.bigwin-chip { position: absolute; left: 50%; top: 50%; width: 2.6vw; height: 2.6vw; margin: -1.3vw; border-radius: 50%; background: var(--c); border: 0.35vw dashed rgba(255, 255, 255, 0.85);
  animation: bigwin-burst 1.6s cubic-bezier(0.1, 0.7, 0.3, 1) forwards; }
@keyframes bigwin-burst { from { transform: rotate(var(--a)) translateY(0) scale(0.4); opacity: 1; } to { transform: rotate(var(--a)) translateY(calc(-42vh * var(--d))) scale(1); opacity: 0; } }
/* Four-colour deck: ♦ blue, ♣ green */
.four-color .card.s-d, .four-color .mc.s-d { color: #2f6fe0 !important; }
.four-color .card.s-d .rank, .four-color .card.s-d .suit { color: #2f6fe0 !important; }
.four-color .card.s-c, .four-color .mc.s-c { color: #1f9a4c !important; }
.four-color .card.s-c .rank, .four-color .card.s-c .suit { color: #1f9a4c !important; }
/* the emoji choice wraps onto two lines inside the menu */
.mi-choice.mi-emoji { flex-wrap: wrap; }
.mi-choice.mi-emoji > div { flex-wrap: wrap; justify-content: flex-start; gap: 4px; width: 100%; }
.mi-choice.mi-emoji > div button { min-width: 38px; padding: 4px 6px; font-size: 18px; }

.total-bet .tb-locks { font-style: normal; color: var(--accent); margin-left: 2px; }
/* Reduce motion: cards appear in place, no deal flight; pulsing glows and flashes stop */
.reduce-motion .card.new, .reduce-motion .war-battle .card.new { animation: none !important; }
.reduce-motion .rl-mult.climbing .v, .reduce-motion #crFx .cr-grab, .reduce-motion .cr-tile, .reduce-motion .crb-pop { animation-duration: 0.01s !important; }
/* Reduce motion calms the key moments, it never skips them (Phase 8 item 10): a result banner still shows for its full
   time, just fading in and out without the zoom; the wheel still turns (roulette-wheel.js: one short turn, not five) */
.reduce-motion .announce { animation-name: announce-calm !important; }
.reduce-motion .announce * { animation: none !important; }
@keyframes announce-calm { 0% { opacity: 0; } 10% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
/* ---------- First-time tips (once per game per phone) ---------- */
.ftips { position: fixed; inset: 0; z-index: 9700; background: rgba(0, 0, 0, 0.72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ftips-box { width: min(340px, 100%); background: var(--panel); border: 2px solid var(--accent); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.ftips-box h3 { margin: 0; color: var(--accent); font-size: 20px; }
.ftips-box ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 16px; font-weight: 700; }
.ftips-box button { margin-top: 6px; }
/* ---------- Last hand ---------- */
.last-hand-body { display: flex; flex-direction: column; gap: 8px; }
.last-hand-body .lh-cards { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.last-hand-body .lh-cards .card { --w: 40px; }
.last-hand-body .lh-row { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.last-hand-body .lh-net { font-size: 20px; font-weight: 900; text-align: center; }
.last-hand-body .lh-net.up { color: #6fdc8c; }
.last-hand-body .lh-net.down { color: #ff8a80; }
.dialog-message.lh-box { max-height: 62vh; overflow-y: auto; text-align: left; }

/* ---------- Phase 5: spectators ---------- */
.spec-eye { font-style: normal; margin-right: 4px; }
.spec-toggle { margin: 6px auto 0; padding: 6px 14px; font-size: 14px; min-height: 0; display: block; }
.spec-screen { display: flex; flex-direction: column; gap: 10px; }
.spec-frame { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; flex-shrink: 0; }
.spec-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.spec-screen .bj-actions-bar { margin-top: auto; }
.spec-chip { color: var(--accent); border: 1px dashed rgba(245, 197, 66, 0.6); }
/* 8 players plus spectators: the lobby list scrolls inside itself, the page never does */
#lobbyPlayers { max-height: 32vh; overflow-y: auto; }

.moved-app { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--bg, #111); }
.moved-box { text-align: center; display: flex; flex-direction: column; gap: 10px; }
.moved-box b { font-size: 22px; color: var(--accent, #f5c542); }
.moved-box small { font-size: 15px; color: #bbb; }

/* Lock notes (every game): middle of the screen, then they fade by themselves. Taps go straight through to the
   table under them, so they never get in the way of the next bet. */
.lock-tip {
  position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%); z-index: 60;
  width: min(300px, calc(100vw - 32px)); padding: 14px 16px; border-radius: 14px;
  background: rgba(18, 19, 23, 0.94); border: 1px solid var(--accent); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  color: var(--text); text-align: center; display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.35;
  animation: lock-tip 4.2s ease-out forwards; pointer-events: none;
}
.lock-tip b { color: var(--accent); font-size: 16px; }
@keyframes lock-tip { 0% { opacity: 0; transform: translate(-50%, -50%) scale(0.92); } 7%, 80% { opacity: 1; transform: translate(-50%, -50%); } 100% { opacity: 0; } }

/* "Check for updates" (main menu settings, in the app): a small dot when a newer build is out.
   Put <span class="update-dot"></span> beside the setting (and on the button that opens those settings). */
.update-dot { display: none; width: 9px; height: 9px; border-radius: 50%; background: #e5484d; margin-left: 6px; vertical-align: middle; box-shadow: 0 0 0 2px var(--panel); }
html.has-update .update-dot { display: inline-block; }

/* Bet-bar buttons (Baccarat, Roulette, Sic Bo...): one fixed height, never wrapping, so swapping "↺ 1,000" for Undo
   never changes the bar and the felt above it never moves (tester notes #8, #10) */
.screen .bj-actions-bar .row3 button { height: 46px; padding-top: 0; padding-bottom: 0; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* "Next round in 3, 2, 1" (Phase 8 item 9): see-through, taps pass through, fixed so nothing under it moves */
.next-round-pill { position: fixed; left: 50%; top: 30vh; transform: translateX(-50%); z-index: 40; pointer-events: none;
  background: rgba(10, 14, 12, 0.62); color: #fff; border: 1px solid rgba(245, 197, 66, 0.55); border-radius: 999px;
  padding: 6px 14px; font-size: 15px; font-weight: 800; white-space: nowrap; }
.next-round-pill b { color: var(--accent); font-size: 18px; }
.next-round-pill.hidden { display: none; }
