:root {
  --felt-deep: #0c3d2e;
  --felt-mid: #145c45;
  --felt-light: #1a7a5c;
  --rail: #1a1512;
  --gold: #c9a227;
  --gold-soft: #e6c65c;
  --cream: #f4efe4;
  --ink: #14110f;
  --danger: #a33b3b;
  --panel: rgba(20, 17, 15, 0.72);
  --text: #f4efe4;
  --muted: #b9b0a2;
  --red: #b4232e;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  font-family: "Source Sans 3", system-ui, sans-serif;
  color: var(--text);
  background: var(--rail);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(ellipse at top, rgba(201, 162, 39, 0.12), transparent 45%),
    linear-gradient(160deg, #120f0d 0%, #1c1714 40%, #0d1f18 100%);
}

#app {
  min-height: 100vh;
}

h1,
h2,
.brand {
  font-family: "Cinzel", "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

button {
  font: inherit;
  cursor: pointer;
  border: 1px solid rgba(201, 162, 39, 0.45);
  background: linear-gradient(180deg, #2a241f, #1a1512);
  color: var(--cream);
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

button:hover:not(:disabled) {
  border-color: var(--gold-soft);
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

button.primary {
  background: linear-gradient(180deg, #d4b44a, #9a7a1c);
  color: var(--ink);
  border-color: var(--gold-soft);
  font-weight: 700;
}

button.danger {
  border-color: rgba(163, 59, 59, 0.7);
}

.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.entry {
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 3rem;
  text-align: center;
  gap: 1.25rem;
}

.entry .brand {
  font-size: clamp(3rem, 10vw, 5.5rem);
  margin: 0;
  color: var(--cream);
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.55);
}

.entry .tagline {
  max-width: 28rem;
  color: var(--muted);
  margin: 0;
  font-size: 1.05rem;
}

.entry-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.85rem;
}

.entry-card label {
  text-align: left;
  font-size: 0.9rem;
  color: var(--muted);
}

.entry-card input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(244, 239, 228, 0.15);
  background: rgba(0, 0, 0, 0.35);
  color: var(--cream);
  font: inherit;
}

.hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

.discord-stub {
  opacity: 0.7;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  min-height: 3.25rem;
  border-bottom: 1px solid rgba(201, 162, 39, 0.18);
  background: rgba(0, 0, 0, 0.28);
}

.topbar .brand {
  font-size: 1.45rem;
  margin: 0;
  line-height: 1.15;
}

.player-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.7rem 0.3rem 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, 0.4);
  background: rgba(12, 10, 8, 0.55);
  color: var(--cream, #f4efe4);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  max-width: min(220px, 46vw);
}

.player-menu-btn img {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.player-menu-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-menu-btn:hover,
.player-menu-btn.open {
  border-color: #e6c65c;
  background: rgba(201, 162, 39, 0.12);
}

.player-menu-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e6c65c;
  box-shadow: 0 0 0 2px rgba(12, 10, 8, 0.9);
}

.player-prefs {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
}

.player-prefs.open {
  display: block;
}

.player-prefs-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.player-prefs-panel {
  position: absolute;
  top: 3.6rem;
  right: 1rem;
  width: min(340px, calc(100vw - 1.5rem));
  max-height: min(78vh, 640px);
  overflow: auto;
  background: linear-gradient(165deg, #1a1612 0%, #0e0c0a 100%);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 0.85rem;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  z-index: 1;
}

.player-prefs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid rgba(201, 162, 39, 0.2);
}

.player-prefs-head h2 {
  margin: 0;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-soft, #e6c65c);
}

.player-prefs-close {
  padding: 0.2rem 0.55rem;
  min-width: 0;
  line-height: 1.2;
}

.player-prefs-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.9rem;
  text-align: left;
}

.player-prefs-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  width: 100%;
  margin-top: 0.35rem;
}

.player-prefs-actions .primary,
.player-prefs-actions .ghost-btn {
  width: 100%;
}

.account-name {
  font-weight: 700;
  color: var(--cream, #f4efe4);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.chip-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.15);
  border: 1px solid rgba(201, 162, 39, 0.35);
  font-weight: 600;
}

.chip-badge img {
  width: 22px;
  height: 22px;
}

.guest-flag {
  color: #e0b56a;
  font-size: 0.8rem;
  font-weight: 600;
}

.prestige-title {
  color: #e9c46a;
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82em;
  margin-right: 0.2rem;
}

.player-menu-btn.prestiged {
  border-color: rgba(233, 196, 106, 0.55);
  box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.2);
}

.prestige-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.2rem;
  padding: 0 0.3rem;
  border-radius: 0.3rem;
  background: rgba(201, 162, 39, 0.22);
  border: 1px solid rgba(233, 196, 106, 0.55);
  color: #f0d878;
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.account-grant {
  color: rgba(233, 196, 106, 0.85);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.account-stats {
  color: #b9c6bd;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.prestige-btn {
  border-color: #e9c46a;
  color: #e9c46a;
}

.prestige-btn:hover {
  background: rgba(233, 196, 106, 0.12);
}

.back-picker {
  margin-top: 0.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  width: 100%;
}

.back-picker-label {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #b9c6bd;
  font-family: 'Cinzel', Georgia, serif;
}

.back-picker-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  width: 100%;
}

.back-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.2rem 0.4rem;
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 0.45rem;
  background: rgba(12, 10, 8, 0.55);
  cursor: pointer;
  color: var(--cream, #f4efe4);
  font: inherit;
}

.back-pick img {
  width: 36px;
  height: 50px;
  object-fit: cover;
  display: block;
  border-radius: 0.25rem;
}

.back-pick-name {
  font-size: 0.62rem;
  letter-spacing: 0.02em;
  color: #b9c6bd;
}

.back-pick:hover {
  border-color: rgba(230, 198, 92, 0.7);
}

.back-pick.selected {
  border-color: #e6c65c;
  box-shadow: 0 0 0 1px rgba(230, 198, 92, 0.45);
}

.back-pick.selected .back-pick-name {
  color: #e6c65c;
}

.dealer-puck {
  width: 1.15rem;
  height: 1.15rem;
  vertical-align: -0.2rem;
  margin-right: 0.25rem;
}

.blind-marker {
  display: inline-block;
  margin-right: 0.28rem;
  padding: 0.05rem 0.28rem;
  border-radius: 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-cream, #f4efe4);
  background: rgba(201, 162, 39, 0.28);
  border: 1px solid rgba(201, 162, 39, 0.45);
  vertical-align: 0.1rem;
}

.lobby {
  padding: 1.25rem;
  display: grid;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.game-tile {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  padding: 1.25rem;
  min-height: 140px;
  border: 1px solid rgba(201, 162, 39, 0.22);
  background:
    linear-gradient(145deg, rgba(20, 92, 69, 0.55), rgba(12, 61, 46, 0.9)),
    var(--felt-deep);
  text-align: left;
  color: inherit;
}

.game-tile.selected {
  outline: 2px solid var(--gold-soft);
  box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.2);
}

.game-tile.disabled {
  filter: grayscale(0.4);
  opacity: 0.65;
}

.card-pick {
  border: none;
  background: transparent;
  padding: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  flex: 1 1 0;
  min-width: 0;
  max-width: 100px;
}

.card-pick:disabled {
  cursor: default;
  opacity: 0.95;
}

.card-pick.selected {
  transform: translateY(-12px);
  box-shadow: 0 0 0 3px var(--gold-soft);
  z-index: 2;
  position: relative;
}

.card-pick.must-include:not(.selected) {
  box-shadow: 0 0 0 2px rgba(235, 204, 122, 0.85);
  z-index: 1;
  position: relative;
}

.your-hand {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.your-hand-cards.selectable {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: visible;
  padding: 1.35rem 0.35rem 0.55rem;
  box-sizing: border-box;
  gap: clamp(2px, 0.4vw, 8px);
}

.your-hand-cards.tl-hand .card.hero {
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 7;
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
  display: block;
}

.your-hand-cards.tl-hand .card-pick.selected {
  transform: translateY(-12px);
}

.bj-felt .bj-layout {
  position: absolute;
  /* Sit under pays line / above insurance arc so status never paints over chrome. */
  inset: 34% 12% 30%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  z-index: 2;
  pointer-events: none;
}

.bj-side {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  min-height: 0;
}

.bj-live-tag {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream, #f4efe4);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(201, 162, 39, 0.35);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

/* Cream-on-charcoal — must not use gold-soft (same hue as felt lettering). */
.bj-status {
  margin: 0;
  max-width: min(26rem, 92%);
  padding: 0.45rem 0.9rem;
  border-radius: 0.65rem;
  text-align: center;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: #f4efe4;
  background: rgba(8, 7, 6, 0.92);
  border: 1px solid rgba(201, 162, 39, 0.4);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.game-tile h2 {
  margin: 0 0 0.4rem;
  font-size: 1.7rem;
}

.game-tile p {
  margin: 0;
  color: var(--muted);
}

.table-list {
  display: grid;
  gap: 0.75rem;
}

.table-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border-radius: 0.9rem;
  background: var(--panel);
  border: 1px solid rgba(244, 239, 228, 0.08);
}

.table-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.table-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(201, 162, 39, 0.08), transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(0, 0, 0, 0.55), transparent 55%),
    linear-gradient(180deg, #100d0b 0%, #0a0908 100%);
}

.felt-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0.35rem 1rem 0.2rem;
  display: grid;
  place-items: center;
}

.felt {
  width: min(1100px, 96%);
  aspect-ratio: 16 / 9;
  max-height: 100%;
  min-height: min(48vh, 480px);
  position: relative;
  border-radius: 50% / 42%;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(255, 255, 255, 0.06), transparent 42%),
    url("/assets/felt/table.svg") center / cover no-repeat;
  box-shadow:
    0 36px 70px rgba(0, 0, 0, 0.72),
    0 0 0 3px rgba(201, 162, 39, 0.22),
    0 0 0 10px rgba(26, 18, 12, 0.95),
    0 0 0 12px rgba(201, 162, 39, 0.12),
    inset 0 0 120px rgba(0, 0, 0, 0.28);
  isolation: isolate;
}

.felt::before {
  content: "";
  position: absolute;
  inset: 7% 9%;
  border-radius: 50% / 45%;
  border: 1px solid rgba(230, 198, 92, 0.12);
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 0;
}

.felt::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse at 50% 30%, rgba(42, 154, 110, 0.12), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.center-board {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  display: grid;
  gap: 0.55rem;
  justify-items: center;
  text-align: center;
  z-index: 2;
}

.pot {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--gold-soft);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
  padding: 0.2rem 0.85rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(201, 162, 39, 0.25);
}

.message {
  max-width: 28rem;
  font-size: 0.95rem;
  color: var(--cream);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.community {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  flex-wrap: nowrap;
  align-items: center;
  max-width: 100%;
}

.board-placeholder {
  color: rgba(244, 239, 228, 0.4);
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
}

.seat {
  position: absolute;
  width: 150px;
  text-align: center;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.seat.you {
  width: 170px;
}

.seat .seat-plaque {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  border-radius: 0.65rem;
  background: rgba(12, 10, 8, 0.72);
  border: 1px solid rgba(201, 162, 39, 0.28);
  backdrop-filter: blur(4px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.seat.empty {
  opacity: 0.35;
}

.seat.empty .seat-plaque {
  background: rgba(12, 10, 8, 0.35);
  border-color: rgba(244, 239, 228, 0.1);
}

.seat .name {
  font-weight: 700;
  font-size: 0.92rem;
}

.seat .stack {
  font-size: 0.85rem;
  color: var(--gold-soft);
}

.seat .bet {
  font-size: 0.8rem;
  color: var(--cream);
  margin-top: 0.15rem;
}

.seat.turn .seat-plaque {
  border-color: var(--gold-soft);
  box-shadow: 0 0 18px rgba(201, 162, 39, 0.35);
}

.seat.turn .name {
  color: var(--gold-soft);
}

.seat.folded {
  opacity: 0.45;
}

.seat.showing .seat-plaque {
  border-color: rgba(230, 198, 92, 0.55);
}

.card.seat-card.reveal {
  animation: deal-in 0.4s ease both;
  box-shadow: 0 0 10px rgba(230, 198, 92, 0.35);
}

.showdown-banner {
  position: absolute;
  top: 6%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(201, 162, 39, 0.5);
  max-width: min(90%, 34rem);
  text-align: center;
  pointer-events: none;
}

.showdown-banner.chopped {
  border-color: rgba(168, 196, 214, 0.7);
}

.showdown-banner.chopped .showdown-label {
  color: #c5d8ea;
}

.pot.chopped {
  color: #c5d8ea;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.showdown-label {
  font-family: Cinzel, "Palatino Linotype", Palatino, serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--gold-soft);
}

.showdown-msg {
  font-size: 0.78rem;
  color: rgba(244, 239, 228, 0.88);
  line-height: 1.3;
}

.seat-hand-label {
  font-size: 0.68rem;
  color: var(--gold-soft);
  letter-spacing: 0.04em;
  margin-top: 0.15rem;
}

.seat.winner .seat-plaque {
  border-color: rgba(230, 198, 92, 0.85);
  box-shadow: 0 0 14px rgba(230, 198, 92, 0.25);
}

.seat.winner.chopped .seat-plaque {
  border-color: rgba(168, 196, 214, 0.8);
  box-shadow: 0 0 12px rgba(140, 180, 210, 0.28);
}

.hole {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 0.35rem;
}

.you-marker {
  font-size: 0.75rem;
  color: var(--gold-soft);
  margin-top: 0.2rem;
}

.card {
  width: 56px;
  height: 78px;
  border-radius: 6px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
  background: var(--cream);
  object-fit: cover;
}

.card.seat-card {
  width: 42px;
  height: 58px;
}

.card.board {
  width: clamp(52px, 6.2vw, 86px);
  height: clamp(72px, 8.7vw, 120px);
  flex: 0 0 auto;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.card.hero {
  width: clamp(100px, 13vw, 148px);
  height: clamp(140px, 18.2vw, 208px);
  border-radius: 10px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.55);
}

.hand-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem 1.1rem;
  /* Match chat panel width on both sides so hand + actions stay viewport-centered */
  padding-left: max(1rem, min(380px, 30vw));
  padding-right: max(1rem, min(380px, 30vw));
  background:
    linear-gradient(180deg, rgba(20, 16, 12, 0.92), rgba(8, 7, 6, 0.96));
  border-top: 1px solid rgba(201, 162, 39, 0.28);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
  width: 100%;
  box-sizing: border-box;
}

.your-hand {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.your-hand.folded {
  opacity: 0.5;
}

.your-hand-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.your-hand-cards {
  display: flex;
  gap: 0.65rem;
  align-items: flex-end;
  justify-content: center;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  align-items: center;
  align-self: center;
  margin-inline: auto;
  width: auto;
  max-width: min(640px, 100%);
}

.table-view:has(.slots-felt) .actions {
  /* Lines + stake chips + spin again need more room than card games. */
  max-width: min(920px, 100%);
}

.actions button {
  min-width: 6.5rem;
}

.version {
  position: fixed;
  right: 0.75rem;
  bottom: 0.5rem;
  font-size: 0.75rem;
  color: rgba(244, 239, 228, 0.35);
}

/* Top of viewport — never cover hand-bar chip rails / action buttons. */
.error-toast {
  position: fixed;
  left: 50%;
  top: 4.25rem;
  bottom: auto;
  transform: translateX(-50%);
  max-width: min(28rem, calc(100vw - 2rem));
  background: rgba(80, 20, 20, 0.94);
  border: 1px solid rgba(255, 120, 120, 0.45);
  color: #f4efe4;
  padding: 0.7rem 1.1rem;
  border-radius: 0.75rem;
  z-index: 50;
  pointer-events: none;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

/* Benign wait states (e.g. waiting on other seats to bet) — calmer than a real error. */
.error-toast.hint-toast {
  background: rgba(26, 21, 18, 0.94);
  border-color: rgba(201, 162, 39, 0.45);
  color: #e8dcc0;
}

@media (max-width: 900px) {
  .felt {
    width: 100%;
    min-height: 48vh;
  }
}

@media (max-width: 720px) {
  .felt-wrap {
    min-height: 48vh;
    margin: 0.35rem 0.5rem;
  }

  .felt {
    border-radius: 42% / 36%;
    min-height: 44vh;
  }

  .seat {
    width: 110px;
  }

  .card.seat-card {
    width: 34px;
    height: 48px;
  }

  .card.board {
    width: 48px;
    height: 68px;
  }

  .card.hero {
    width: 92px;
    height: 128px;
  }

  .hand-bar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    gap: 0.7rem;
    padding: 0.75rem 0.75rem 1rem;
  }

  .actions button {
    min-width: 5.5rem;
    padding: 0.65rem 1rem;
  }
}

.discord-btn {
  width: 100%;
  margin-top: 0.5rem;
  background: #5865f2;
  color: #fff;
  border: none;
}

.discord-btn:disabled {
  opacity: 0.45;
}

.discord-flag {
  color: #8ea1ff !important;
}

.ghost-btn {
  background: transparent;
  border: 1px solid rgba(201, 162, 39, 0.35);
  color: var(--cream);
  padding: 0.45rem 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font: inherit;
}

.table-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.spectate-banner {
  text-align: center;
  padding: 0.45rem 1rem;
  background: rgba(88, 101, 242, 0.18);
  border-bottom: 1px solid rgba(88, 101, 242, 0.35);
  color: var(--cream);
  font-size: 0.9rem;
}

.turn-timer {
  flex: 0 0 auto;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.75rem;
  line-height: 1.2;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(201, 162, 39, 0.15);
}

.turn-timer.yours {
  color: var(--gold-soft);
  font-weight: 700;
  background: rgba(201, 162, 39, 0.12);
}

.turn-timer.showdown {
  color: var(--gold-soft);
  background: rgba(201, 162, 39, 0.1);
}

.table-view > .topbar,
.table-view > .spectate-banner,
.table-view > .hand-bar {
  flex: 0 0 auto;
}

.chat-panel {
  position: fixed;
  right: 0.75rem;
  bottom: 3.25rem;
  width: min(380px, calc(100vw - 1.5rem));
  max-height: 62vh;
  display: flex;
  flex-direction: column;
  background: rgba(12, 10, 8, 0.92);
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: 0.75rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  z-index: 12;
  overflow: hidden;
}

.chat-title {
  padding: 0.5rem 0.8rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-soft);
  border-bottom: 1px solid rgba(201, 162, 39, 0.2);
}

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 0.55rem 0.8rem;
  font-size: 0.88rem;
  min-height: 10rem;
  max-height: 48vh;
}

.chat-line {
  margin-bottom: 0.4rem;
  line-height: 1.4;
  word-break: break-word;
}

.chat-line strong {
  color: var(--gold-soft);
  margin-right: 0.35rem;
}

.chat-line.chat-action {
  color: var(--muted);
  font-style: italic;
  font-size: 0.88em;
}

.chat-line.chat-result {
  color: var(--gold-soft);
  font-style: normal;
  font-weight: 600;
}

.chat-line.chat-street {
  color: rgba(244, 239, 228, 0.55);
  font-style: normal;
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.45rem;
}

.chat-form {
  display: flex;
  gap: 0.35rem;
  padding: 0.45rem;
  border-top: 1px solid rgba(201, 162, 39, 0.2);
}

.chat-form input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 0.4rem;
  color: var(--cream);
  padding: 0.4rem 0.55rem;
  font: inherit;
}

.chat-form button {
  padding: 0.4rem 0.7rem;
}

@media (max-width: 720px) {
  .chat-panel {
    right: 0.5rem;
    left: 0.5rem;
    width: auto;
    bottom: 0.5rem;
    max-height: 28vh;
  }

  .hand-bar {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: calc(0.75rem + 28vh);
  }
}

.bj-felt {
  background:
    radial-gradient(ellipse at 50% 38%, rgba(255, 255, 255, 0.06), transparent 42%),
    url("/assets/felt/blackjack.svg") center / cover no-repeat !important;
}

.bj-hands .bj-hand {
  margin-top: 0.45rem;
}

.bj-hand-active .your-hand-label {
  color: var(--gold, #d4af37);
  letter-spacing: 0.04em;
}

@media (max-width: 720px) {
  .bj-felt .bj-layout {
    inset: 32% 8% 28%;
  }

  .error-toast {
    top: 3.5rem;
  }
}

.tl-felt {
  background:
    radial-gradient(ellipse at 50% 38%, rgba(255, 255, 255, 0.06), transparent 42%),
    url("/assets/felt/tienlen.svg") center / cover no-repeat !important;
}

.tc-felt {
  background:
    radial-gradient(ellipse at 50% 38%, rgba(255, 255, 255, 0.06), transparent 42%),
    url("/assets/felt/threecard.svg") center / cover no-repeat !important;
}

.uth-felt {
  background:
    radial-gradient(ellipse at 50% 38%, rgba(255, 255, 255, 0.06), transparent 42%),
    url("/assets/felt/uth.svg") center / cover no-repeat !important;
}

.pg-felt {
  background:
    radial-gradient(ellipse at 50% 38%, rgba(255, 255, 255, 0.06), transparent 42%),
    url("/assets/felt/paigow.svg") center / cover no-repeat !important;
}

.pg-layout {
  position: absolute;
  inset: 4% 5% 5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  z-index: 2;
  min-height: 0;
}

.pg-status {
  margin: 0;
  max-width: min(34rem, 92%);
  padding: 0.4rem 0.95rem;
  border-radius: 0.55rem;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #f4efe4;
  background: rgba(8, 7, 6, 0.82);
  border: 1px solid rgba(201, 162, 39, 0.4);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  flex: 0 0 auto;
}

.pg-dealer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.85rem 0.7rem;
  border-radius: 0.75rem;
  background: rgba(8, 7, 6, 0.55);
  border: 1px solid rgba(201, 162, 39, 0.28);
  flex: 0 0 auto;
}

.pg-zone-title {
  font-family: Cinzel, "Palatino Linotype", Palatino, serif;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e6c65c;
}

.pg-set {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
}

.pg-row {
  display: grid;
  grid-template-columns: 3.2rem auto minmax(4rem, 1fr);
  align-items: center;
  gap: 0.45rem 0.65rem;
}

.pg-row-tag {
  font-family: Cinzel, "Palatino Linotype", Palatino, serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244, 239, 228, 0.72);
  text-align: right;
}

.pg-row-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f4efe4;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.pg-low,
.pg-high,
.pg-backs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.28rem;
  justify-content: center;
}

.pg-low .card,
.pg-high .card,
.pg-backs .card {
  flex: 0 0 auto;
  width: clamp(2.6rem, 4.2vw, 3.4rem);
  min-width: 2.6rem;
  height: auto;
  object-fit: contain;
}

.pg-pick-hand .card,
.you-set .pg-low .card.hero,
.you-set .pg-high .card.hero {
  flex: 0 0 auto;
  min-width: 2.8rem;
  object-fit: contain;
}

.pg-result-banner {
  flex: 0 0 auto;
  margin: 0.1rem 0;
  padding: 0.4rem 1.35rem;
  border-radius: 999px;
  font-family: Cinzel, "Palatino Linotype", Palatino, serif;
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f4efe4;
  background: rgba(8, 7, 6, 0.88);
  border: 1px solid rgba(201, 162, 39, 0.55);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.pg-result-banner.is-win {
  color: #9eecc0;
  border-color: rgba(125, 223, 154, 0.55);
}

.pg-result-banner.is-lose {
  color: #f0a39c;
  border-color: rgba(226, 118, 111, 0.5);
}

.pg-result-banner.is-push {
  color: #e6c65c;
}

.pg-seats {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  width: 100%;
  max-width: 52rem;
}

.pg-seat {
  min-width: 5.5rem;
  max-width: 7.5rem;
  padding: 0.4rem 0.55rem;
  border-radius: 0.55rem;
  background: rgba(8, 7, 6, 0.82);
  border: 1px solid rgba(201, 162, 39, 0.28);
  color: #f4efe4;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  text-align: center;
}

.pg-seat strong {
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: #f4efe4;
}

.pg-seat-stack {
  color: rgba(244, 239, 228, 0.78);
  font-variant-numeric: tabular-nums;
}

.pg-seat-state,
.pg-seat-outcome {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pg-seat-state.is-turn,
.pg-seat.is-turn .pg-seat-state {
  color: #e6c65c;
}

.pg-push {
  color: #e6c65c;
  font-weight: 700;
}

.pg-seat.empty {
  opacity: 0.4;
  min-height: 2.4rem;
  justify-content: center;
}

.pg-seat.you {
  border-color: rgba(230, 198, 92, 0.75);
  box-shadow: 0 0 0 1px rgba(230, 198, 92, 0.25);
}

.pg-seat.is-turn {
  border-color: rgba(230, 198, 92, 0.85);
  box-shadow: 0 0 0 1px rgba(230, 198, 92, 0.35);
}

.pg-seat-set {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  margin-top: 0.15rem;
}

.pg-mini-low,
.pg-mini-high {
  display: flex;
  gap: 0.1rem;
  justify-content: center;
}

.pg-seat .seat-card {
  width: 1.55rem;
  height: auto;
  aspect-ratio: 5 / 7;
  border-radius: 3px;
}

.pg-pick-hand {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: center;
}

.pg-card-pick {
  appearance: none;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 0.35rem;
  padding: 0.1rem;
  cursor: pointer;
}

.pg-card-pick.selected {
  border-color: #e6c65c;
  box-shadow: 0 0 0 1px rgba(230, 198, 92, 0.45);
}

.hand-bar .you-set .pg-row {
  grid-template-columns: 3.2rem auto minmax(3rem, auto);
}

.house-seat.is-turn {
  outline: 1px solid rgba(230, 198, 92, 0.55);
}

@media (max-width: 720px) {
  .pg-layout {
    inset: 3% 3% 4%;
    gap: 0.4rem;
  }

  .pg-row {
    grid-template-columns: 2.6rem auto;
    grid-template-rows: auto auto;
  }

  .pg-row-label {
    grid-column: 2;
    font-size: 0.78rem;
    white-space: normal;
  }

  .pg-low .card,
  .pg-high .card,
  .pg-backs .card {
    width: clamp(2.2rem, 9vw, 2.8rem);
    min-width: 2.2rem;
  }

  .pg-status {
    font-size: 0.85rem;
  }

  .pg-result-banner {
    font-size: 1rem;
    letter-spacing: 0.1em;
  }
}

.baccarat-felt {
  background:
    radial-gradient(ellipse at 50% 38%, rgba(255, 255, 255, 0.06), transparent 42%),
    url("/assets/felt/baccarat.svg") center / cover no-repeat !important;
  border-radius: 42% / 38% !important;
}

.bc-road-wrap {
  position: absolute;
  left: 6%;
  /* Leave the top-right for .payout-card so Bead Road and Pays never overlap. */
  right: 30%;
  top: 2%;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  pointer-events: none;
}

.baccarat-felt .payout-card {
  right: 2.5%;
  top: 2%;
  z-index: 5;
  /* Expanded size/scroll shared with all tables via .payout-card[open] */
}

.bc-road-label {
  font-family: Cinzel, "Palatino Linotype", Palatino, serif;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(230, 198, 92, 0.72);
  padding-left: 0.15rem;
}

.bc-road {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.28rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.35rem 0.45rem;
  border-radius: 0.55rem;
  background: rgba(244, 239, 228, 0.08);
  border: 1px solid rgba(230, 198, 92, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 2px 8px rgba(0, 0, 0, 0.22);
  scrollbar-width: thin;
  scrollbar-color: rgba(230, 198, 92, 0.35) transparent;
}

.bc-road-empty {
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 0.72rem;
  color: rgba(244, 239, 228, 0.45);
  letter-spacing: 0.08em;
}

.bc-bead {
  position: relative;
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: Cinzel, "Palatino Linotype", Palatino, serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  color: #f4efe4;
  background: rgba(6, 18, 14, 0.55);
  border: 1.5px solid rgba(230, 198, 92, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.bc-bead-player {
  border-color: rgba(120, 168, 220, 0.75);
  background: rgba(28, 58, 92, 0.72);
}

.bc-bead-banker {
  border-color: rgba(210, 92, 92, 0.75);
  background: rgba(92, 28, 32, 0.72);
}

.bc-bead-tie {
  border-color: rgba(108, 168, 108, 0.75);
  background: rgba(24, 58, 32, 0.72);
}

.bc-pair-dot {
  position: absolute;
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 50%;
  border: 1px solid rgba(244, 239, 228, 0.85);
  background: rgba(230, 198, 92, 0.9);
}

.bc-pair-player {
  top: -0.12rem;
  left: -0.12rem;
}

.bc-pair-banker {
  bottom: -0.12rem;
  right: -0.12rem;
}

.bc-table {
  position: absolute;
  inset: 8% 8% 20%;
  display: grid;
  grid-template-columns: 1.15fr 0.7fr 1.15fr;
  grid-template-areas: "player tie banker";
  gap: 0.75rem 1rem;
  z-index: 2;
  align-items: end;
}

.bc-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.bc-col-player { grid-area: player; }
.bc-col-banker { grid-area: banker; }
.bc-col-tie {
  grid-area: tie;
  align-self: end;
  padding-bottom: 0.35rem;
}

.bc-cards {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0.35rem;
  min-height: 5.5rem;
  width: 100%;
  pointer-events: none;
  /* Don't let the grid column crush the card art into thin strips */
  overflow: visible;
}

.bc-cards .card.board {
  flex: 0 0 auto;
  width: 3.6rem;
  min-width: 3.6rem;
  height: 5rem;
  min-height: 5rem;
  max-width: none;
  object-fit: contain;
  object-position: center;
  background: #f4efe4;
  border-radius: 0.35rem;
}

/* Deal-in only on newly revealed cards — never remount-animate the whole hand. */
.card.deal-new {
  animation: deal-in 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.bc-cards .board-placeholder {
  opacity: 0.35;
  font-size: 0.85rem;
}

.bc-total {
  font-family: Cinzel, "Palatino Linotype", Palatino, serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 239, 228, 0.75);
}

.bc-zone {
  appearance: none;
  width: 100%;
  max-width: 12rem;
  border: 1.5px solid rgba(230, 198, 92, 0.45);
  border-radius: 1rem;
  background: rgba(6, 18, 14, 0.62);
  color: var(--gold-soft);
  font-family: Cinzel, "Palatino Linotype", Palatino, serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.7rem 0.55rem 0.8rem;
  min-height: 4.8rem;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.bc-col-tie .bc-zone {
  max-width: 9.5rem;
  min-height: 3.8rem;
  padding: 0.55rem 0.4rem;
}

.bc-zone:hover:not(:disabled) {
  border-color: rgba(230, 198, 92, 0.9);
  background: rgba(10, 36, 28, 0.8);
  transform: translateY(-2px);
}

.bc-zone:disabled {
  opacity: 0.72;
  cursor: default;
}

.bc-zone.has-bet {
  border-color: rgba(230, 198, 92, 0.85);
  background: rgba(12, 40, 30, 0.82);
}

.bc-zone.won {
  border-color: #e6c65c;
  box-shadow: 0 0 18px rgba(230, 198, 92, 0.35);
}

.bc-zone-label {
  font-size: 0.95rem;
  color: #f4efe4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.bc-zone-sub {
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.03em;
  text-transform: none;
  color: rgba(244, 239, 228, 0.62);
}

.bc-zone-hint {
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(230, 198, 92, 0.5);
}

.bc-zone-chips {
  margin-top: 0.15rem;
}

.bc-status {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 11%;
  z-index: 3;
  margin: 0;
  text-align: center;
  font-size: 0.82rem;
  color: #f4efe4;
  pointer-events: none;
  padding: 0.28rem 0.65rem;
  border-radius: 0.45rem;
  background: rgba(8, 7, 6, 0.55);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 0 10px rgba(0, 0, 0, 0.45);
}

.bc-rules-hint {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(92%, 34rem);
  bottom: 18%;
  z-index: 2;
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #f4efe4;
  pointer-events: none;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  background: rgba(8, 7, 6, 0.72);
  border: 1px solid rgba(201, 162, 39, 0.35);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.holdem-chip-rail,
.holdem-presets {
  width: 100%;
  justify-content: center;
}

.holdem-wager-readout {
  width: 100%;
  text-align: center;
  font-size: 0.85rem;
  color: var(--gold-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.holdem-presets button {
  font-size: 0.75rem;
}

@keyframes deal-in {
  from {
    opacity: 0;
    transform: translateY(-22px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.roulette-felt {
  background:
    radial-gradient(ellipse at 50% 38%, rgba(255, 255, 255, 0.05), transparent 42%),
    url("/assets/felt/roulette.svg") center / cover no-repeat !important;
  border-radius: 1.5rem !important;
  aspect-ratio: 16 / 10 !important;
}

.roulette-layout {
  position: absolute;
  inset: 12% 10%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 1rem;
  z-index: 2;
}

.result-banner {
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-family: Cinzel, serif;
  letter-spacing: 0.14em;
  font-size: 1.4rem;
  padding: 0.35rem 1.2rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(201, 162, 39, 0.45);
  color: var(--gold-soft);
}

.house-seats {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 6%;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  z-index: 2;
}

.house-seat {
  min-width: 90px;
  padding: 0.3rem 0.5rem;
  border-radius: 0.5rem;
  background: rgba(12, 10, 8, 0.72);
  border: 1px solid rgba(201, 162, 39, 0.25);
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.house-seat.empty {
  opacity: 0.72;
  background: rgba(18, 14, 10, 0.55);
  border-color: rgba(201, 162, 39, 0.18);
  color: rgba(244, 239, 228, 0.72);
}

.house-seat.empty strong {
  color: rgba(244, 239, 228, 0.78);
  font-weight: 500;
}

.house-seat.you {
  border-color: var(--gold-soft);
}

.house-seat.acting {
  border-color: var(--gold, #d4af37);
  box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.45);
}

.house-seat.sitting-out {
  opacity: 0.72;
}

.bj-house-seats .bj-seat-cards {
  display: flex;
  gap: 0.15rem;
  flex-wrap: wrap;
}

.bj-house-seats .bj-seat-cards .seat-card {
  width: 1.65rem;
  height: auto;
  aspect-ratio: 5 / 7;
  border-radius: 3px;
}

.bet-chip {
  color: var(--gold-soft);
}

.bet-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-right: 0.5rem;
}

.bet-group > span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* Chip rails referenced by baccarat / tien len action bars. */
.bc-chip-rail,
.tl-stake-rail,
.tc-chip-rail {
  padding: 0.15rem 0.35rem;
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
}

.roulette-wheel {
  width: min(220px, 28vw);
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.5));
  will-change: transform;
  transform-origin: 50% 50%;
}

.roulette-wheel-wrap {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.roulette-pointer {
  position: absolute;
  top: 4px;
  left: 50%;
  z-index: 2;
  width: 0;
  height: 0;
  margin-left: -8px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 16px solid var(--gold-soft);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  pointer-events: none;
}

/* Ball marker sits in the pocket ring under the pointer (the wheel rotates beneath it). */
.roulette-ball {
  position: absolute;
  top: 11%;
  left: 50%;
  z-index: 2;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #cfd2d6 60%, #8b8f94);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.roulette-ball.visible {
  opacity: 1;
}

.roulette-result-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.roulette-result-text {
  font-family: Cinzel, serif;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.roulette-result-text.red {
  color: #e05561;
}

.roulette-result-text.black {
  color: #d8d2c6;
}

.roulette-result-text.green {
  color: #4fbf7f;
}

.roulette-board {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  max-width: 480px;
}

.roulette-result {
  font-family: Cinzel, serif;
  font-size: 2rem;
  font-weight: 700;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--gold-soft);
}

.roulette-result.red {
  background: #b4232e;
  color: #fff;
}

.roulette-result.black {
  background: #14110f;
  color: #fff;
}

.roulette-result.green {
  background: #0f6b3c;
  color: #fff;
}

.roulette-grid {
  display: grid;
  grid-template-columns: 36px repeat(12, minmax(22px, 1fr));
  grid-template-rows: repeat(3, minmax(2.1rem, 1fr));
  gap: 2px;
  width: 100%;
  position: relative;
  /* Room for street / six-line edge hits under the bottom number row. */
  padding-bottom: 0.45rem;
  margin-bottom: 0.15rem;
}

.rg-zero-wrap,
.rg-num-wrap {
  position: relative;
  min-width: 0;
}

.rg-zero-wrap {
  grid-column: 1;
  grid-row: 1 / span 3;
}

.rg-zero,
.rg-num {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  overflow: visible;
  width: 100%;
  height: 100%;
}

.rg-zero {
  background: #0f6b3c !important;
  color: #fff !important;
  border-radius: 0.35rem;
  padding: 0.25rem;
  min-height: 100%;
}

.rg-num {
  padding: 0.35rem 0.15rem 0.45rem;
  font-size: 0.7rem;
  border-radius: 0.25rem;
  min-height: 2.1rem;
}

.rg-hit {
  position: absolute;
  z-index: 4;
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.rg-hit:disabled {
  cursor: default;
  pointer-events: none;
}

.rg-split {
  min-width: 0;
  min-height: 0;
}

.rg-split-top {
  top: -3px;
  left: 15%;
  right: 15%;
  height: 8px;
}

.rg-split-bottom {
  bottom: -3px;
  left: 15%;
  right: 15%;
  height: 8px;
}

.rg-split-left {
  left: -3px;
  top: 20%;
  bottom: 20%;
  width: 8px;
}

.rg-split-right {
  right: -3px;
  top: 20%;
  bottom: 20%;
  width: 8px;
}

.rg-split-zero {
  right: -4px;
  width: 8px;
  height: 24%;
}

.rg-split-zero-1 {
  bottom: 8%;
}

.rg-split-zero-2 {
  bottom: 38%;
}

.rg-split-zero-3 {
  bottom: 68%;
}

.rg-corner {
  right: -4px;
  bottom: -4px;
  width: 10px;
  height: 10px;
}

.rg-hit.has-bet {
  box-shadow: 0 0 0 1px rgba(230, 198, 92, 0.55);
}

.rg-hit .rg-chip {
  transform: translateX(-50%) scale(0.62);
}

/* Street / six-line: thin hit strips on the bottom edge of the number grid. */
.rg-street-edge {
  left: 12%;
  right: 12%;
  bottom: -5px;
  height: 10px;
  border-radius: 999px;
}

.rg-sixline-edge {
  right: -7px;
  bottom: -6px;
  width: 14px;
  height: 12px;
  border-radius: 999px;
  z-index: 5;
}

.rg-street-edge:hover:not(:disabled),
.rg-sixline-edge:hover:not(:disabled) {
  background: rgba(230, 198, 92, 0.35);
}

.rg-street-edge.has-bet,
.rg-sixline-edge.has-bet {
  background: rgba(230, 198, 92, 0.2);
}

.rg-num.red {
  background: #b4232e !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.rg-num.black {
  background: #14110f !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.rg-zero.has-bet,
.rg-num.has-bet,
.rg-out.has-bet {
  box-shadow: 0 0 0 2px rgba(230, 198, 92, 0.65);
}

.rg-chip {
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%) scale(0.72);
  transform-origin: center bottom;
  pointer-events: none;
  z-index: 2;
}

.rg-chip .chip-amt {
  font-size: 0.55rem;
  color: #f4efe4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.roulette-outside,
.roulette-dozens,
.roulette-columns {
  display: grid;
  gap: 0.3rem;
  width: 100%;
}

.roulette-dozens,
.roulette-columns {
  grid-template-columns: repeat(3, 1fr);
}

.roulette-outside {
  grid-template-columns: repeat(3, 1fr);
}

.rg-out {
  position: relative;
  appearance: none;
  border: 1px solid rgba(230, 198, 92, 0.35);
  border-radius: 0.4rem;
  background: rgba(8, 14, 12, 0.72);
  color: #f4efe4;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.55rem 0.35rem 0.85rem;
  min-height: 2.4rem;
  cursor: pointer;
}

.rg-out:disabled {
  opacity: 0.7;
  cursor: default;
}

.rg-out.rg-red {
  background: #8e1c24;
}

.rg-out.rg-black {
  background: #14110f;
}

.roulette-wheel-wrap.is-spinning .roulette-wheel {
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.5)) saturate(1.05);
}

.roulette-result.spinning {
  background: rgba(0, 0, 0, 0.55);
  color: var(--gold-soft);
  animation: deal-in 0.6s ease infinite alternate;
}

.chip-select.primary,
.chip-pick.primary {
  background: linear-gradient(180deg, #d4b44a, #9a7a1c);
  color: var(--ink);
}

.chip-stack {
  display: inline-flex;
  align-items: flex-end;
  gap: 0;
  position: relative;
  min-height: 28px;
  padding-left: 2px;
  vertical-align: middle;
}

.chip-stack .chip-token {
  width: 28px;
  height: 28px;
  margin-left: -10px;
  position: relative;
  z-index: calc(1 + var(--i, 0));
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

.chip-stack .chip-token:first-child {
  margin-left: 0;
}

.chip-stack .chip-amt {
  margin-left: 0.35rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--gold-soft);
  align-self: center;
}

.chip-pick {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.55rem !important;
}

.chip-pick img,
.chip-btn-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.chip-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.bet-on-table {
  display: flex;
  justify-content: center;
  margin-top: 0.35rem;
}

.bet-sides {
  font-size: 0.7rem;
  opacity: 0.85;
  margin-left: 0.25rem;
}

.seat .bet .chip-stack {
  justify-content: center;
}

.pot .chip-stack {
  display: flex;
  justify-content: center;
  margin-top: 0.25rem;
}

.slots-felt {
  /* Fluid reel sizing — cells grow with the felt playfield. */
  --slot-gap: clamp(0.35rem, 1vw, 0.7rem);
  --slot-pad: clamp(0.55rem, 1.3vw, 1rem);
  background:
    radial-gradient(ellipse at 50% 32%, rgba(255, 255, 255, 0.06), transparent 46%),
    url("/assets/felt/slots.svg") center / cover no-repeat !important;
  border-radius: 1.5rem !important;
  /* Match slots.svg viewBox 1600×1000 (rect felt, not oval). */
  aspect-ratio: 16 / 10 !important;
  width: min(1200px, 96%);
  min-height: min(64vh, 680px);
  /* Drop card-table oval rail overlays — slots art is a rounded rect. */
  box-shadow:
    0 36px 70px rgba(0, 0, 0, 0.72),
    0 0 0 3px rgba(201, 162, 39, 0.28),
    0 0 0 8px rgba(26, 18, 12, 0.95);
}

.slots-felt::before,
.slots-felt::after {
  display: none;
}

.slots-machine {
  /* Align to the gold frame; leave the bottom for the infinity motif (~70%). */
  position: absolute;
  inset: 5% 6% 20%;
  z-index: 2;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-items: stretch;
  justify-items: stretch;
  gap: clamp(0.25rem, 1vh, 0.45rem);
  overflow: visible;
}

.slots-machine.is-free .slots-window {
  border-color: #e0c35a;
  box-shadow:
    inset 0 0 0 2px #1a1a1a,
    0 0 0 1px rgba(201, 162, 39, 0.55),
    0 0 28px rgba(201, 162, 39, 0.28);
  animation: slots-free-rim 1.8s ease-in-out infinite;
}

.slots-machine.is-big-win .slots-meter-grand strong {
  animation: slots-jackpot-flash 0.7s ease-in-out 2;
}

.slots-meters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.25rem, 0.8vw, 0.45rem);
  width: 100%;
  justify-self: center;
  min-height: 2.4rem;
}

.slots-meter {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.35rem;
  border-radius: 0.5rem;
  background: linear-gradient(180deg, #2a2416, #14110b);
  border: 1px solid #c9a227;
  color: #f3e6c8;
  min-width: 0;
}

.slots-meter span {
  font-family: Cinzel, serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: clamp(0.55rem, 1vw, 0.68rem);
  opacity: 0.85;
}

.slots-meter strong {
  font-family: Cinzel, serif;
  font-size: clamp(0.95rem, 1.8vw, 1.25rem);
  color: #c9a227;
  line-height: 1.1;
}

.slots-meter-grand {
  border-width: 2px;
}

.slots-meter-grand strong {
  color: #e0c35a;
}

.slots-meter.is-hit {
  border-color: #e0c35a;
  box-shadow: 0 0 14px rgba(224, 195, 90, 0.55);
  animation: slots-win-pulse 0.7s ease-in-out 3;
}

.slots-free-rail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.3rem;
  padding: 0.2rem 0.75rem 0.2rem 0.3rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #1a2018, #0f1610);
  border: 1px solid rgba(201, 162, 39, 0.35);
  color: #f3e6c8;
  opacity: 0.55;
  justify-self: center;
}

.slots-free-rail.is-on {
  opacity: 1;
  border-color: #c9a227;
}

.slots-free-badge {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  object-fit: contain;
}

.slots-free-meter-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  min-width: 4.5rem;
}

.slots-free-meter-text span {
  font-family: Cinzel, serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.6rem;
  opacity: 0.85;
}

.slots-free-meter-text strong {
  font-family: Cinzel, serif;
  font-size: 1.15rem;
  color: #e0c35a;
}

.slots-free-mult {
  font-family: Cinzel, serif;
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: #0a1813;
  background: #c9a227;
  border-radius: 999px;
  padding: 0.18rem 0.45rem;
}

.slots-stage {
  /* Sized playfield for the reels — largest 5×3 window that fits. */
  min-height: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  container-type: size;
  container-name: slots-stage;
}

.slots-window {
  position: relative;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--slot-gap);
  padding: var(--slot-pad);
  /* Fit aspect into the stage (whichever dim binds). */
  width: min(100%, calc(100cqh * 5 / 3.2));
  height: min(100%, calc(100cqw * 3.2 / 5));
  aspect-ratio: 5 / 3.2;
  max-width: 100%;
  max-height: 100%;
  border-radius: 0.9rem;
  background: #0a1813;
  border: 3px solid #c9a227;
  box-shadow: inset 0 0 0 2px #1a1a1a;
  overflow: hidden;
}

.slots-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
  width: min(100%, 36rem);
  min-height: 2rem;
  justify-self: center;
}

.slots-status:has(.slots-status-tag.is-empty) {
  grid-template-columns: minmax(0, 1fr);
}

.slots-status-tag {
  font-family: Cinzel, serif;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0a1813;
  background: #e0c35a;
  border-radius: 999px;
  padding: 0.18rem 0.45rem;
  flex: 0 0 auto;
  min-width: 4.5rem;
  text-align: center;
}

.slots-status-tag.is-empty {
  display: none;
}

.slots-player-chip {
  position: absolute;
  left: 7%;
  bottom: 6%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  padding: 0.35rem 0.7rem;
  border-radius: 0.5rem;
  background: rgba(10, 18, 14, 0.82);
  border: 1px solid rgba(201, 162, 39, 0.45);
  color: #f3e6c8;
  min-width: 6.5rem;
}

.slots-player-chip strong {
  font-family: Cinzel, serif;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.slots-player-chip span {
  font-size: 0.85rem;
  color: #e0c35a;
}

.slots-winlines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}

.slots-winline {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.slots-winline-path {
  stroke-width: 1.6;
  opacity: 0.45;
  filter: drop-shadow(0 0 2px rgba(201, 162, 39, 0.4));
}

.slots-winline-pay {
  /* Thin + butt caps — round caps were painting large discs over symbols. */
  stroke-linecap: butt;
  stroke-width: 1.8;
  opacity: 0.95;
  stroke-dasharray: 140;
  stroke-dashoffset: 140;
  animation: slots-winline-draw 0.55s ease-out forwards;
  filter: drop-shadow(0 0 3px rgba(224, 195, 90, 0.55));
}

.slots-winline-dot {
  opacity: 0.95;
  stroke: #14110b;
  stroke-width: 0.35;
  /* Soft ring, not a filled disc covering the tile. */
  fill-opacity: 0.85;
}

.slots-winline-group.is-dim .slots-winline-path,
.slots-winline-group.is-dim .slots-winline-pay,
.slots-winline-group.is-dim .slots-winline-dot {
  opacity: 0.2;
  filter: none;
}

.slots-winline-group.is-active .slots-winline-path {
  opacity: 0.65;
}

.slots-winline-group.is-active .slots-winline-pay {
  opacity: 1;
  stroke-width: 2.2;
  filter: drop-shadow(0 0 4px rgba(224, 195, 90, 0.7));
}

.slots-winline-group.is-active .slots-winline-dot {
  opacity: 1;
  fill-opacity: 1;
}

.slot-cell.is-line-lit {
  box-shadow: 0 0 0 2px #e0c35a, 0 0 18px rgba(224, 195, 90, 0.75);
  transform: scale(1.05);
  z-index: 2;
}

.slots-line-callout {
  font-family: Cinzel, serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: clamp(0.62rem, 1.1vw, 0.72rem);
  color: #e0c35a;
  background: rgba(10, 24, 19, 0.88);
  border: 1px solid rgba(201, 162, 39, 0.55);
  border-radius: 0.4rem;
  padding: 0.3rem 0.65rem;
  min-height: 1.85rem;
  width: 100%;
  min-width: 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.slots-fx {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: visible;
}

@keyframes slots-winline-draw {
  to {
    stroke-dashoffset: 0;
  }
}

.slot-reel {
  /* Idle: equal 3-row grid so a cell can't collapse to a blank hole. */
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: var(--slot-gap);
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  container-type: size;
  container-name: slot-reel;
}

.slot-reel:has(.slot-strip) {
  display: block;
}

.slot-strip {
  display: flex;
  flex-direction: column;
  gap: var(--slot-gap);
  width: 100%;
}

.slot-cell {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border-radius: 0.45rem;
  overflow: hidden;
  background: #f4ead4;
  border: 1px solid rgba(201, 162, 39, 0.55);
  box-sizing: border-box;
}

/* Spinning strip cells — height from reel container, not strip length. */
.slot-strip .slot-cell {
  flex: 0 0 calc((100cqh - 2 * var(--slot-gap)) / 3);
  height: calc((100cqh - 2 * var(--slot-gap)) / 3);
}

.slot-symbol {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  min-width: 0;
  max-width: none;
  background: #f4ead4;
}

/* If an asset 404s, keep a readable tile instead of a black hole. */
.slot-cell[data-symbol]::after {
  content: attr(data-symbol);
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(0.7rem, 2.2cqw, 1.1rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f4efe4;
  background: #0d3b2e;
  border: 2px solid #c9a227;
  border-radius: 0.35rem;
  pointer-events: none;
}

.slot-cell.is-broken[data-symbol]::after {
  display: flex;
}

.slots-window.is-spinning .slot-strip {
  animation: slot-reel-roll 0.28s linear infinite;
  animation-delay: var(--reel-delay, 0s);
  filter: blur(0.8px);
}

.slots-window.is-free-spin .slot-strip {
  animation-duration: 0.22s;
  filter: blur(1.2px);
}

.slots-window.is-win {
  box-shadow: 0 0 0 2px #c9a227, 0 0 24px rgba(201, 162, 39, 0.45);
}

.slot-cell.is-win-cell {
  box-shadow: 0 0 0 2px #c9a227, 0 0 12px rgba(201, 162, 39, 0.55);
  animation: slots-win-pulse 0.85s ease-in-out infinite;
  z-index: 1;
}

.slot-cell.is-scatter-win {
  box-shadow: 0 0 0 2px #e0c35a, 0 0 16px rgba(224, 195, 90, 0.7);
  animation-duration: 0.65s;
}

.slots-coin {
  position: absolute;
  width: 1.55rem;
  height: 1.55rem;
  margin: -0.75rem 0 0 -0.75rem;
  object-fit: contain;
  animation: slots-coin-fountain 0.95s ease-out forwards;
  z-index: 5;
}

.slots-feature-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: rgba(8, 14, 11, 0.72);
  border-radius: 1rem;
  animation: slots-feature-in 0.35s ease-out;
  pointer-events: none;
}

.slots-feature-overlay.is-done {
  animation: slots-feature-out 0.4s ease-in forwards;
}

.slots-feature-burst {
  width: min(46%, 11rem);
  height: auto;
  animation: slots-burst-pop 0.55s ease-out;
}

.slots-feature-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #f3e6c8;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.slots-feature-copy span {
  font-family: Cinzel, serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.slots-feature-copy strong {
  font-family: Cinzel, serif;
  font-size: 2.4rem;
  color: #e0c35a;
  letter-spacing: 0.06em;
}

@keyframes slot-reel-roll {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-50%);
  }
}

@keyframes slots-free-rim {
  0%,
  100% {
    box-shadow:
      inset 0 0 0 2px #1a1a1a,
      0 0 0 1px rgba(201, 162, 39, 0.45),
      0 0 20px rgba(201, 162, 39, 0.2);
  }
  50% {
    box-shadow:
      inset 0 0 0 2px #1a1a1a,
      0 0 0 2px rgba(224, 195, 90, 0.75),
      0 0 34px rgba(201, 162, 39, 0.4);
  }
}

@keyframes slots-win-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}

@keyframes slots-coin-fountain {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(0.85);
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--coin-dx, 0), var(--coin-dy, -80px)) rotate(var(--coin-rot, 40deg))
      scale(1.05);
  }
}

@keyframes slots-feature-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slots-feature-out {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes slots-burst-pop {
  0% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  70% {
    transform: scale(1.06);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

@keyframes slots-jackpot-flash {
  0%,
  100% {
    color: #c9a227;
  }
  50% {
    color: #fff1c2;
  }
}

/* legacy selectors kept for ui-contracts */
.slots-jackpot {
  display: none;
}

.slots-payline-hint,
.slots-win-banner {
  display: none;
}

.slot-line-btn {
  min-width: 2.4rem;
}

button.slot-spin-again {
  min-width: 10rem;
  font-family: Cinzel, serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.95rem;
  padding: 0.55rem 1.1rem;
}

.house-seat .bet-chip em {
  font-style: normal;
  margin-left: 0.25rem;
  opacity: 0.85;
  font-size: 0.72rem;
}

.house-seat .bet-chip.is-free {
  border-color: #c9a227;
}

/* ---- Video Poker (Jacks or Better machine) ---- */

.vp-felt {
  background:
    radial-gradient(ellipse at 50% 32%, rgba(255, 255, 255, 0.05), transparent 48%),
    url("/assets/felt/videopoker.svg") center / 100% 100% no-repeat !important;
  border-radius: 1.35rem !important;
  aspect-ratio: 16 / 10 !important;
  overflow: hidden;
}

/* No oval poker inset — it fights the rectangular machine bezel. */
.vp-felt::before {
  display: none !important;
}

.vp-layout {
  position: absolute;
  inset: 8% 5% 7%;
  display: flex;
  gap: 1.4rem;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-sizing: border-box;
}

.vp-paytable {
  border-collapse: collapse;
  background: rgba(12, 10, 8, 0.72);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: 0.5rem;
  overflow: hidden;
  font-size: 0.72rem;
  flex: 0 0 auto;
}

.vp-paytable td {
  padding: 0.14rem 0.6rem;
  border-bottom: 1px solid rgba(201, 162, 39, 0.08);
}

.vp-paytable td:last-child {
  text-align: right;
  color: var(--gold-soft);
}

.vp-paytable tr.hit td {
  color: var(--gold-soft);
  font-weight: 700;
  background: rgba(230, 198, 92, 0.12);
}

.vp-machine {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-width: 0;
  max-width: 42rem;
}

.vp-status {
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(244, 239, 228, 0.78);
  max-width: 36rem;
}

.vp-cards {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: nowrap;
}

.vp-machine .bet-on-table {
  margin-top: 0.15rem;
}

.vp-card {
  appearance: none;
  background: none;
  border: 2px solid transparent;
  border-radius: 0.6rem;
  padding: 0.25rem 0.25rem 1.2rem;
  position: relative;
  cursor: pointer;
  flex: 0 0 auto;
}

.vp-card:disabled {
  cursor: default;
}

.vp-card.held {
  border-color: var(--gold-soft);
  background: rgba(230, 198, 92, 0.08);
}

/* Machine cards must not shrink or crop (same anti-squash contract as baccarat). */
.vp-card .card.hero {
  width: clamp(56px, 7vw, 92px);
  min-width: 48px;
  max-width: none;
  height: auto;
  object-fit: contain;
  flex: 0 0 auto;
}

.vp-hold-tag {
  position: absolute;
  left: 50%;
  bottom: 0.15rem;
  transform: translateX(-50%);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: rgba(244, 239, 228, 0.45);
}

.vp-card.held .vp-hold-tag {
  color: var(--gold-soft);
  font-weight: 700;
}

/* ---- Three Card Poker / Ultimate Texas Hold'em (house poker) ---- */

.tc-dealer {
  position: absolute;
  left: 50%;
  top: 13%;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  z-index: 2;
}

.uth-felt .tc-dealer {
  top: 10%;
}

.uth-felt .center-board {
  top: 50%;
}

.tc-seat-cards {
  display: flex;
  gap: 0.15rem;
  justify-content: center;
}

.tc-win {
  color: #7ddf9a;
  font-weight: 700;
}

.tc-lose {
  color: #e2766f;
  font-weight: 700;
}

.house-seat.folded {
  opacity: 0.55;
}

@media (max-width: 720px) {
  .vp-layout {
    flex-direction: column;
    inset: 4% 4% 6%;
    gap: 0.5rem;
    overflow-y: auto;
  }

  .vp-card .card.hero {
    width: clamp(44px, 15vw, 64px);
  }
}

/* ---- Craps ---- */
.craps-felt {
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, 0.04), transparent 48%),
    url("/assets/felt/craps.svg") center / 100% 100% no-repeat !important;
  /* Rectangular table — matches the SVG rail (not the oval poker felt). */
  border-radius: 1.35rem !important;
  aspect-ratio: 16 / 10 !important;
  overflow: hidden;
}

/* Kill the oval poker inset highlight — it reads as a ghost box on craps. */
.craps-felt::before {
  display: none !important;
}

.craps-felt::after {
  border-radius: inherit;
}

.craps-layout {
  position: absolute;
  /* Symmetric inset; bottom band reserved for seat row. */
  inset: 4% 5% 16%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0.45rem;
  z-index: 2;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.craps-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 0 0 auto;
  margin-bottom: 0.15rem;
}

.craps-board {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 0 1 auto;
  min-height: 0;
  width: min(100%, 920px);
  max-width: 100%;
  margin: 0 auto;
}

.craps-point {
  font-family: Cinzel, Georgia, serif;
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  color: var(--gold-soft, #e8d08a);
  padding: 0.25rem 0.75rem;
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
}

.craps-point.on {
  border-color: rgba(201, 162, 39, 0.75);
  color: #f3e6b0;
}

.craps-point strong {
  font-size: 1.1rem;
  margin-left: 0.25rem;
}

.craps-status {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(244, 239, 228, 0.85);
  text-align: center;
  max-width: 28rem;
}

.craps-dice {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.craps-dice.idle .craps-die {
  opacity: 0.35;
}

.craps-die {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.35rem;
  background: linear-gradient(145deg, #f4efe4, #d8d0c0);
  border: 1px solid rgba(40, 30, 20, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 2px 4px rgba(0, 0, 0, 0.35);
  position: relative;
  display: inline-block;
}

.craps-die::after {
  content: attr(data-face);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: Cinzel, Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: #1a120d;
}

.craps-dice.is-rolling .craps-die {
  animation: craps-tumble 0.12s linear infinite;
}

.craps-dice.is-rolling .craps-die:nth-child(2) {
  animation-delay: 0.05s;
}

.craps-dice.is-settled .craps-die {
  animation: craps-land 0.35s ease-out both;
}

@keyframes craps-tumble {
  0% {
    transform: rotate(-18deg) translateY(-3px) scale(1.02);
  }
  50% {
    transform: rotate(16deg) translateY(2px) scale(0.98);
  }
  100% {
    transform: rotate(-12deg) translateY(-2px) scale(1.02);
  }
}

@keyframes craps-land {
  from {
    transform: scale(1.12) rotate(-8deg);
  }
  to {
    transform: scale(1) rotate(0);
  }
}

.craps-dice-total {
  font-family: Cinzel, Georgia, serif;
  font-size: 1.25rem;
  color: var(--gold-soft, #e8d08a);
  margin-left: 0.25rem;
  min-width: 1.5rem;
}

.craps-place-row,
.craps-hard-col,
.craps-come-col,
.craps-lines,
.craps-mid,
.craps-odds-row {
  display: flex;
  gap: 0.35rem;
  flex-wrap: nowrap;
  justify-content: center;
  min-width: 0;
  width: 100%;
}

.craps-place-row,
.craps-lines,
.craps-odds-row {
  flex: 0 0 auto;
}

.craps-mid {
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 4.5rem;
}

.craps-come-col,
.craps-hard-col {
  flex-direction: column;
  flex: 0 1 18%;
  min-width: 4.5rem;
  max-width: 7rem;
}

.craps-mid > .craps-zone {
  flex: 1 1 auto;
  min-width: 0;
}

.craps-lines {
  flex: 0 0 auto;
}

.craps-odds-row {
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.craps-zone {
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.6rem;
  padding: 0.28rem 0.35rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(201, 162, 39, 0.4);
  background: rgba(8, 28, 22, 0.55);
  color: #f4efe4;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
  font: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.craps-zone:hover:not(:disabled) {
  border-color: rgba(232, 208, 138, 0.85);
  background: rgba(12, 40, 32, 0.72);
}

.craps-zone:disabled {
  cursor: default;
  opacity: 0.72;
}

.craps-zone.has-bet {
  border-color: rgba(232, 208, 138, 0.9);
  box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.25);
}

.craps-zone-label {
  font-family: Cinzel, Georgia, serif;
  letter-spacing: 0.06em;
  font-size: clamp(0.58rem, 1.1vw, 0.72rem);
  text-transform: uppercase;
  text-align: center;
  line-height: 1.15;
}

.craps-zone-sub {
  font-size: clamp(0.55rem, 0.95vw, 0.65rem);
  opacity: 0.7;
}

.craps-zone-hint {
  font-size: 0.65rem;
  opacity: 0.45;
}

.craps-zone-chips {
  margin-top: 0.15rem;
}

.craps-lines .craps-zone {
  min-height: 3.1rem;
  flex: 1 1 0;
}

.craps-mid > .craps-zone.craps-field {
  min-height: 3.6rem;
}

.craps-odds-row {
  margin-top: 0.15rem;
}

.craps-odds-btn {
  font-family: Cinzel, Georgia, serif;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, 0.5);
  background: rgba(0, 0, 0, 0.4);
  color: var(--gold-soft, #e8d08a);
  cursor: pointer;
}

.craps-odds-btn:hover {
  border-color: rgba(232, 208, 138, 0.9);
}

.craps-felt .craps-seats {
  left: 5%;
  right: 5%;
  bottom: 3.5%;
  justify-content: center;
}

@media (max-width: 720px) {
  .craps-layout {
    inset: 3.5% 3.5% 18%;
    gap: 0.28rem;
  }

  .craps-board {
    width: 100%;
    gap: 0.28rem;
  }

  .craps-place-row .craps-zone {
    min-height: 2.3rem;
    padding: 0.2rem 0.15rem;
  }

  .craps-come-col,
  .craps-hard-col {
    min-width: 3.6rem;
  }

  .craps-die {
    width: 2rem;
    height: 2rem;
  }
}

/* ---- Felt chip spots (stage-then-deal) + payout cards ---- */

.felt-bet-row {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0.55rem;
  z-index: 3;
  pointer-events: auto;
}

.tc-felt .felt-bet-row {
  top: 42%;
  width: min(92%, 520px);
}

.uth-felt .felt-bet-row {
  top: 36%;
  width: min(94%, 560px);
}

.bj-felt .felt-bet-row,
.bj-felt .bj-bet-spot.felt-spot,
.bj-felt > .felt-spot[data-bj-spot] {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  z-index: 5;
  /* Sibling of .bj-layout (pointer-events:none) — must receive Ante taps. */
  pointer-events: auto;
}

.pg-felt .felt-bet-row {
  top: 48%;
  width: min(40%, 200px);
}

.felt-spot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-width: 4.6rem;
  min-height: 4.6rem;
  padding: 0.35rem 0.45rem 0.4rem;
  border-radius: 50%;
  border: 1.5px solid rgba(212, 180, 74, 0.45);
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, 0.06), transparent 55%),
    rgba(8, 40, 28, 0.55);
  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(26, 18, 12, 0.5);
  color: #f4efe4;
  font: inherit;
  cursor: default;
}

button.felt-spot.is-interactive {
  cursor: pointer;
  /* No transform transition — hover must not override centering translate(-50%, -50%). */
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

button.felt-spot.is-interactive:hover {
  border-color: rgba(230, 198, 92, 0.85);
  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(201, 162, 39, 0.35),
    0 4px 14px rgba(0, 0, 0, 0.35);
}

.felt-spot.has-staged {
  border-color: rgba(243, 230, 176, 0.9);
}

.felt-spot.is-display {
  opacity: 0.85;
}

.felt-spot-label {
  font-family: Cinzel, Georgia, serif;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(230, 198, 92, 0.9);
  line-height: 1.1;
}

.felt-spot-sub {
  font-size: 0.58rem;
  color: rgba(244, 239, 228, 0.45);
  letter-spacing: 0.04em;
}

.felt-spot-hint {
  font-size: 0.62rem;
  color: rgba(244, 239, 228, 0.35);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.felt-spot-chips {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  margin-top: 0.1rem;
}

.felt-spot-chips .chip-stack {
  transform: scale(0.92);
  transform-origin: center bottom;
}

.felt-spot-staged-tag {
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(243, 230, 176, 0.85);
}

.payout-card {
  position: absolute;
  right: 2.5%;
  top: 8%;
  z-index: 4;
  width: min(12.5rem, 38%);
  /* Scroll lives on the body — overflow on this inert shell made the scrollbar unclickable. */
  overflow: visible;
  max-height: none;
  border-radius: 0.55rem;
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: rgba(12, 10, 8, 0.88);
  color: #f4efe4;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  font-size: 0.72rem;
  /* Shell stays inert so empty chrome does not steal felt taps. */
  pointer-events: none;
}

/* Shared expanded size for every table game. */
.payout-card[open] {
  width: min(17rem, 48%);
  z-index: 6;
}

.payout-card > summary {
  pointer-events: auto;
}

/* Bet circles sit above closed Pays; open Pays (z-index 6) owns its own box for scroll. */
.tc-felt .felt-bet-row,
.uth-felt .felt-bet-row,
.bj-felt .felt-bet-row,
.bj-felt .bj-bet-spot.felt-spot,
.bj-felt > .felt-spot[data-bj-spot],
.pg-felt .felt-bet-row {
  z-index: 5;
}

.payout-card-summary {
  cursor: pointer;
  list-style: none;
  padding: 0.45rem 0.65rem;
  font-family: Cinzel, Georgia, serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-soft);
  font-size: 0.72rem;
}

.payout-card-summary::-webkit-details-marker {
  display: none;
}

.payout-card-body {
  padding: 0 0.65rem 0.55rem;
  display: grid;
  gap: 0.5rem;
}

.payout-card[open] .payout-card-body {
  pointer-events: auto;
  max-height: min(22rem, 58vh);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 162, 39, 0.55) rgba(0, 0, 0, 0.35);
}

.payout-card[open] .payout-card-body::-webkit-scrollbar {
  width: 0.55rem;
}

.payout-card[open] .payout-card-body::-webkit-scrollbar-thumb {
  background: rgba(201, 162, 39, 0.5);
  border-radius: 999px;
}

.payout-card[open] .payout-card-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
}

.payout-section-title {
  font-family: Cinzel, Georgia, serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(230, 198, 92, 0.75);
  font-size: 0.62rem;
  margin-bottom: 0.15rem;
}

.payout-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.08rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: rgba(244, 239, 228, 0.82);
}

.payout-row span:last-child {
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.payout-note {
  margin-top: 0.2rem;
  color: rgba(244, 239, 228, 0.4);
  font-size: 0.58rem;
  line-height: 1.3;
}

/* Dock below progressive meters / machine chrome — never cover Grand. */
.slots-felt .payout-card {
  right: 7%;
  top: auto;
  bottom: 3.5%;
  z-index: 5;
}

.slots-felt .payout-card[open] {
  /* Expand upward from the dock; shared width/body scroll from base rules. */
  max-height: none;
}

/* Zone games: keep chips centered inside bet boxes */
.bc-zone-chips,
.craps-zone-chips {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 1.6rem;
  pointer-events: none;
}

.bc-zone-chips .chip-stack,
.craps-zone-chips .chip-stack,
.rg-chip .chip-stack {
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
}

.rg-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

@media (max-width: 720px) {
  .felt-spot {
    min-width: 3.8rem;
    min-height: 3.8rem;
    padding: 0.25rem 0.3rem;
  }

  .payout-card {
    width: min(11rem, 46%);
    font-size: 0.66rem;
  }

  .payout-card[open] {
    width: min(15.5rem, 72%);
  }

  .payout-card[open] .payout-card-body {
    max-height: min(18rem, 50vh);
  }

  .tc-felt .felt-bet-row,
  .uth-felt .felt-bet-row {
    gap: 0.35rem;
  }
}
