/* TABLESTAKE — premium felt card table PWA */
:root {
  --felt: #0d5c3a;
  --felt-deep: #08452b;
  --felt-light: #127a4d;
  --rail: #5c3317;
  --rail-light: #8b5a2b;
  --rail-dark: #3d1f0d;
  --gold: #c9a227;
  --gold-dim: #a68420;
  --cream: #f5f0e6;
  --ink: #1a1510;
  --panel: #1c1410ee;
  --danger: #c41e3a;
  --safe: #2ecc71;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: Georgia, "Times New Roman", serif;
  --card-w: clamp(52px, 12vw, 72px);
  --card-h: clamp(74px, 17vw, 102px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #0a0a0c;
  color: var(--cream);
  font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 50% 0%, #2a1810 0%, transparent 55%),
    radial-gradient(ellipse at 80% 100%, #1a1008 0%, transparent 40%),
    #0c0a08;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  color: inherit;
}

.hidden {
  display: none !important;
}

/* Top HUD */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  background: linear-gradient(180deg, #2a1c14, #1a100c);
  border-bottom: 2px solid var(--gold-dim);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  z-index: 20;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--felt-light), var(--felt-deep));
  border: 2px solid var(--gold);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  color: var(--gold);
  font-size: 0.85rem;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.4);
}

.brand h1 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  font-family: var(--display);
  color: var(--gold);
  font-weight: 700;
}

.brand small {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: #bba88a;
  font-family: var(--font);
  font-weight: 400;
}

.meters {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.meter {
  background: #0d0a08;
  border: 1px solid #5a4030;
  border-radius: 8px;
  padding: 0.25rem 0.55rem;
  min-width: 4.5rem;
  text-align: center;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.meter label {
  display: block;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a8870;
}

.meter strong {
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  color: #f0e6c8;
}

.meter.bank strong {
  color: #7dffa0;
  font-size: 1.05rem;
}

.meter.stars strong {
  color: var(--gold);
}

.top-actions {
  display: flex;
  gap: 0.35rem;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(180deg, #3a2818, #22150e);
  border: 1px solid var(--gold-dim);
  font-size: 1.1rem;
  display: grid;
  place-items: center;
}

.icon-btn:active {
  transform: scale(0.96);
}

/* Disclaimer */
.disclaimer {
  text-align: center;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a7a60;
  padding: 0.25rem 0.5rem;
  background: #120e0a;
  border-bottom: 1px solid #2a2018;
}

/* Table stage */
.stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  position: relative;
}

.table-wrap {
  position: relative;
  width: min(920px, 100%);
  aspect-ratio: 16 / 11;
  max-height: min(72dvh, 620px);
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.65));
}

@media (max-width: 640px) {
  .table-wrap {
    aspect-ratio: 3 / 4;
    max-height: none;
    height: auto;
    min-height: 520px;
  }
}

.rail {
  position: absolute;
  inset: 0;
  border-radius: 48% 48% 42% 42% / 40% 40% 38% 38%;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 220, 160, 0.12), transparent 40%),
    linear-gradient(160deg, var(--rail-light), var(--rail) 40%, var(--rail-dark));
  box-shadow:
    inset 0 2px 4px rgba(255, 220, 180, 0.25),
    inset 0 -8px 20px rgba(0, 0, 0, 0.5),
    0 8px 0 #2a1508,
    var(--shadow);
}

@media (max-width: 640px) {
  .rail {
    border-radius: 28px;
  }
}

.felt {
  position: absolute;
  inset: 4.5% 5.5% 5% 5.5%;
  border-radius: 46% 46% 40% 40% / 38% 38% 36% 36%;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(255, 255, 255, 0.07), transparent 45%),
    radial-gradient(ellipse at 50% 100%, rgba(0, 0, 0, 0.35), transparent 50%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.03) 2px,
      rgba(0, 0, 0, 0.03) 3px
    ),
    linear-gradient(165deg, var(--felt-light), var(--felt) 45%, var(--felt-deep));
  box-shadow:
    inset 0 0 60px rgba(0, 0, 0, 0.45),
    inset 0 0 0 3px rgba(201, 162, 39, 0.25);
  overflow: hidden;
}

@media (max-width: 640px) {
  .felt {
    border-radius: 18px;
    inset: 3.5%;
  }
}

.felt::before {
  content: "TABLESTAKE";
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  font-family: var(--display);
  font-size: clamp(1.2rem, 4vw, 2rem);
  letter-spacing: 0.35em;
  color: rgba(201, 162, 39, 0.18);
  pointer-events: none;
  white-space: nowrap;
}

.felt-arc {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 28%;
  height: 42%;
  border: 2px solid rgba(201, 162, 39, 0.28);
  border-radius: 50%;
  border-bottom: none;
  pointer-events: none;
}

/* Shoe */
.shoe {
  position: absolute;
  right: 6%;
  top: 8%;
  width: clamp(54px, 10vw, 78px);
  height: clamp(70px, 13vw, 100px);
  background: linear-gradient(145deg, #2a1810, #120c08);
  border-radius: 6px 10px 8px 6px;
  border: 2px solid #5a4030;
  box-shadow: 4px 6px 12px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 6px;
  z-index: 5;
}

.shoe::before {
  content: "";
  position: absolute;
  inset: 6px 8px 28px;
  background: linear-gradient(180deg, #1e3a5f, #0d2137);
  border-radius: 3px;
  border: 1px solid #c9a22755;
}

.shoe.dealing::before {
  transform: translateX(-6px) rotate(-4deg);
  transition: transform 0.08s;
}

.shoe-label {
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  z-index: 1;
}

.shoe-count {
  font-size: 0.7rem;
  color: #ccc;
  z-index: 1;
}

/* Chip tray */
.chip-tray-wrap {
  position: absolute;
  left: 50%;
  bottom: 3%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  background: linear-gradient(180deg, #3a2414, #1a1008);
  border-radius: 999px;
  border: 2px solid #6a4a28;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 6;
}

/* Hands */
.dealer-zone {
  position: absolute;
  left: 50%;
  top: 10%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 4;
  width: 90%;
}

.player-zone {
  position: absolute;
  left: 50%;
  bottom: 18%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 4;
  width: 94%;
}

@media (max-width: 640px) {
  .player-zone {
    bottom: 22%;
  }
}

.zone-label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(245, 240, 230, 0.55);
  margin-bottom: 0.25rem;
}

.hand-total,
#dealerTotal {
  display: inline-block;
  min-height: 1.2em;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.8rem;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

.card-row,
#dealerHand {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: var(--card-h);
}

#dealerHand .playing-card,
.card-row .playing-card {
  margin-left: calc(var(--card-w) * -0.28);
  transition: transform 0.2s ease;
}

#dealerHand .playing-card:first-child,
.card-row .playing-card:first-child {
  margin-left: 0;
}

#playerHands {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.hand-wrap {
  position: relative;
  padding: 0.25rem;
  border-radius: 12px;
  transition: box-shadow 0.2s;
}

.hand-wrap.active {
  box-shadow: 0 0 0 2px var(--gold), 0 0 20px rgba(201, 162, 39, 0.35);
}

.hand-bet {
  font-size: 0.7rem;
  color: #dfffe8;
  margin-top: 0.25rem;
}

.playing-card {
  width: var(--card-w);
  height: var(--card-h);
  border-radius: 6px;
  filter: drop-shadow(2px 3px 4px rgba(0, 0, 0, 0.45));
  transform-origin: top center;
  position: relative;
}

.playing-card svg {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 5px;
}

.playing-card.deal-in {
  animation: dealSlide 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes dealSlide {
  from {
    opacity: 0;
    transform: translate(120px, -80px) rotate(18deg) scale(0.85);
  }
  to {
    opacity: 1;
    transform: translate(0, 0) rotate(calc(var(--i, 0) * 2deg)) scale(1);
  }
}

/* Bet spot */
.bet-spot {
  position: absolute;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  min-width: 88px;
  min-height: 64px;
  border: 2px dashed rgba(201, 162, 39, 0.45);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 5;
  background: rgba(0, 0, 0, 0.12);
}

.bet-label {
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 700;
  margin-top: 0.15rem;
}

.bet-label.ghost {
  color: rgba(245, 240, 230, 0.4);
  font-weight: 500;
}

.chip-stack {
  position: relative;
  width: 36px;
  height: 28px;
}

.chip-stack .chip {
  position: absolute;
  left: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  bottom: calc(var(--stack) * 3px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Chips */
.chip-btn,
.chip {
  border-radius: 50%;
  position: relative;
}

.chip-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 3px dashed rgba(255, 255, 255, 0.55);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35), inset 0 0 0 3px rgba(0, 0, 0, 0.15);
  transition: transform 0.1s;
}

.chip-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.chip-btn:not(:disabled):active {
  transform: translateY(2px);
}

.chip-face {
  font-size: 0.62rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}

.chip-5,
.chip-btn.chip-5 {
  background: radial-gradient(circle at 35% 30%, #7ec8ff, #1e5a9a);
}
.chip-10,
.chip-btn.chip-10 {
  background: radial-gradient(circle at 35% 30%, #ff9a9a, #a01818);
}
.chip-25,
.chip-btn.chip-25 {
  background: radial-gradient(circle at 35% 30%, #9dffb0, #1a7a38);
}
.chip-50,
.chip-btn.chip-50 {
  background: radial-gradient(circle at 35% 30%, #d4b0ff, #5a1a9a);
}
.chip-100,
.chip-btn.chip-100 {
  background: radial-gradient(circle at 35% 30%, #333, #111);
  border-color: #c9a227 !important;
}
.chip-500,
.chip-btn.chip-500 {
  background: radial-gradient(circle at 35% 30%, #ffe08a, #a07810);
  color: #1a1008;
}
.chip-btn.chip-500 .chip-face {
  color: #1a1008;
  text-shadow: none;
}

.chip.chip-5 {
  background: #1e5a9a;
  border: 2px dashed #fff8;
}
.chip.chip-10 {
  background: #a01818;
  border: 2px dashed #fff8;
}
.chip.chip-25 {
  background: #1a7a38;
  border: 2px dashed #fff8;
}
.chip.chip-50 {
  background: #5a1a9a;
  border: 2px dashed #fff8;
}
.chip.chip-100 {
  background: #1a1a1a;
  border: 2px dashed var(--gold);
}
.chip.chip-500 {
  background: #a07810;
  border: 2px dashed #fff8;
}

/* Table message */
.table-message {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  z-index: 7;
  background: rgba(10, 8, 6, 0.72);
  border: 1px solid rgba(201, 162, 39, 0.4);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: clamp(0.75rem, 2.5vw, 0.95rem);
  letter-spacing: 0.04em;
  text-align: center;
  max-width: 90%;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.table-message.pulse {
  animation: msgPulse 0.45s ease;
}

@keyframes msgPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0.5;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

/* Action bar */
.controls {
  padding: 0.5rem 0.75rem 0.85rem;
  background: linear-gradient(180deg, #1a120c, #0e0a08);
  border-top: 2px solid #3a2a1a;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  z-index: 20;
}

.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.action-bar.dim {
  opacity: 0.35;
  pointer-events: none;
}

.btn {
  appearance: none;
  background: linear-gradient(180deg, #4a3424, #2a1a10);
  border: 1px solid var(--gold-dim);
  color: var(--cream);
  padding: 0.65rem 1rem;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.75rem;
  min-width: 4.5rem;
  box-shadow: 0 3px 0 #1a1008, inset 0 1px 0 rgba(255, 220, 160, 0.15);
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn:not(:disabled):active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #1a1008;
}

.btn.primary {
  background: linear-gradient(180deg, #1a8a4a, #0d5c3a);
  border-color: #3dca7a;
  min-width: 6rem;
  font-size: 0.85rem;
}

.btn.danger {
  background: linear-gradient(180deg, #8a2030, #5a1018);
  border-color: #c45;
}

.btn.tiny {
  padding: 0.35rem 0.55rem;
  min-width: 0;
  font-size: 0.7rem;
  border-radius: 8px;
}

.insurance-bar {
  display: none;
  justify-content: center;
  gap: 0.5rem;
  align-items: center;
  padding: 0.35rem;
  background: rgba(201, 162, 39, 0.12);
  border-radius: 12px;
  border: 1px solid rgba(201, 162, 39, 0.35);
}

.insurance-bar.visible {
  display: flex;
  flex-wrap: wrap;
}

.insurance-bar span {
  font-size: 0.8rem;
  color: var(--gold);
}

/* Result banner */
.result-banner {
  position: fixed;
  left: 50%;
  top: 28%;
  transform: translate(-50%, -20px) scale(0.9);
  z-index: 50;
  padding: 0.75rem 1.5rem;
  border-radius: 14px;
  font-family: var(--display);
  font-size: clamp(1.2rem, 5vw, 1.8rem);
  letter-spacing: 0.12em;
  opacity: 0;
  pointer-events: none;
  transition: 0.35s ease;
  border: 2px solid var(--gold);
  background: rgba(12, 8, 6, 0.92);
  text-align: center;
}

.result-banner.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.result-banner.blackjack,
.result-banner.win {
  color: #7dffa0;
  box-shadow: 0 0 40px rgba(45, 200, 100, 0.35);
}

.result-banner.lose {
  color: #ff8a8a;
}

.result-banner.push {
  color: var(--gold);
}

/* Overlay + panels */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.panel {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -46%) scale(0.96);
  width: min(420px, 94vw);
  max-height: min(80dvh, 640px);
  overflow: auto;
  background: var(--panel);
  border: 2px solid var(--gold-dim);
  border-radius: 16px;
  z-index: 90;
  padding: 1rem 1.1rem 1.25rem;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: 0.22s ease;
  backdrop-filter: blur(10px);
}

.panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid #4a3828;
  padding-bottom: 0.5rem;
}

.panel h2 {
  margin: 0;
  font-family: var(--display);
  color: var(--gold);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
}

.panel-close {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #2a1c14;
  border: 1px solid #5a4030;
  font-size: 1.1rem;
}

.panel p,
.panel li {
  font-size: 0.85rem;
  line-height: 1.45;
  color: #d4c8b0;
}

.boost-card {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #120e0a;
  border: 1px solid #3a2a1c;
  border-radius: 12px;
  margin-bottom: 0.55rem;
}

.boost-icon {
  font-size: 1.6rem;
  width: 2.2rem;
  text-align: center;
}

.boost-body h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  color: var(--cream);
}

.boost-body p {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
}

.boost-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.boost-meta .have {
  font-size: 0.7rem;
  color: #9a8870;
  margin-right: auto;
}

.rank-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.rank-tab {
  flex: 1;
  padding: 0.45rem;
  border-radius: 8px;
  background: #1a120c;
  border: 1px solid #3a2a1c;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.rank-tab.on {
  border-color: var(--gold);
  color: var(--gold);
  background: #2a1c10;
}

.rank-table {
  display: none;
}

.rank-table.on {
  display: block;
}

.rank-table ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rank-table li {
  display: grid;
  grid-template-columns: 2.2rem 1fr auto;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid #2a2018;
  align-items: center;
}

.rank-table li.you {
  background: rgba(201, 162, 39, 0.15);
  border-radius: 8px;
  border: 1px solid rgba(201, 162, 39, 0.35);
}

.rank-table .place {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.8rem;
}

.rank-table .name {
  font-size: 0.85rem;
}

.rank-table .score {
  font-variant-numeric: tabular-nums;
  color: #b8f0c8;
  font-size: 0.85rem;
}

#peekModal {
  position: fixed;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 100;
  background: rgba(12, 8, 6, 0.95);
  border: 2px solid var(--gold);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
}

#peekModal.open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

#peekModal h3 {
  margin: 0 0 0.5rem;
  color: var(--gold);
  font-family: var(--display);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

#peekCard {
  display: flex;
  justify-content: center;
}

.help-list {
  padding-left: 1.1rem;
  margin: 0.5rem 0;
}

.kbd {
  display: inline-block;
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  background: #2a1c14;
  border: 1px solid #5a4030;
  font-size: 0.7rem;
}

footer.site-foot {
  text-align: center;
  font-size: 0.6rem;
  color: #6a5a48;
  padding: 0.35rem;
  letter-spacing: 0.04em;
}

/* ===== Lobby ===== */
.view[hidden] {
  display: none !important;
}

.lobby {
  flex: 1;
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1rem 2rem;
  gap: 1.25rem;
}

.lobby.on {
  display: flex;
}

.lobby-hero {
  width: min(920px, 100%);
}

.lobby-felt {
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, 0.08), transparent 50%),
    linear-gradient(165deg, var(--felt-light), var(--felt) 45%, var(--felt-deep));
  border: 3px solid rgba(201, 162, 39, 0.35);
  border-radius: 20px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  box-shadow:
    inset 0 0 40px rgba(0, 0, 0, 0.35),
    0 12px 32px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}

.lobby-felt::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(201, 162, 39, 0.25);
  border-radius: 14px;
  pointer-events: none;
}

.lobby-kicker {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 240, 230, 0.65);
}

.lobby-felt h2 {
  margin: 0.35rem 0;
  font-family: var(--display);
  color: var(--gold);
  letter-spacing: 0.12em;
  font-size: clamp(1.4rem, 4vw, 2rem);
}

.lobby-blurb {
  margin: 0;
  color: #d4c8b0;
  font-size: 0.9rem;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  width: min(920px, 100%);
}

.game-tile {
  text-align: left;
  padding: 1.15rem 1.1rem 1.2rem;
  border-radius: 16px;
  background:
    linear-gradient(160deg, #2a1c14, #140e0a 60%),
    var(--felt-deep);
  border: 2px solid var(--gold-dim);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 220, 160, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 180px;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.game-tile:hover,
.game-tile:focus-visible {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(201, 162, 39, 0.35);
  outline: none;
}

.game-tile:active {
  transform: translateY(0);
}

.tile-icon {
  font-size: 1.8rem;
  color: var(--gold);
  line-height: 1;
}

.tile-title {
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  color: var(--cream);
  font-weight: 700;
}

.tile-blurb {
  font-size: 0.8rem;
  color: #bba88a;
  line-height: 1.4;
  flex: 1;
}

.tile-cta {
  margin-top: 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7dffa0;
  font-weight: 700;
}

/* ===== Baccarat ===== */
.bac-hands {
  position: absolute;
  left: 50%;
  top: 8%;
  transform: translateX(-50%);
  display: flex;
  gap: clamp(1rem, 6vw, 3.5rem);
  width: 92%;
  justify-content: center;
  z-index: 4;
}

.bac-hand-zone {
  text-align: center;
  padding: 0.35rem 0.5rem;
  border-radius: 12px;
  min-width: 40%;
  transition: box-shadow 0.25s, background 0.25s;
}

.bac-hand-zone.winner {
  background: rgba(45, 200, 100, 0.12);
  box-shadow: 0 0 0 2px rgba(125, 255, 160, 0.45), 0 0 24px rgba(45, 200, 100, 0.25);
}

.bac-spots {
  position: absolute;
  left: 50%;
  bottom: 16%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.55rem;
  z-index: 6;
  width: 94%;
  justify-content: center;
  flex-wrap: wrap;
}

.bac-spot {
  flex: 1;
  min-width: 96px;
  max-width: 160px;
  min-height: 88px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 2px dashed rgba(201, 162, 39, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.45rem;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.bac-spot.active {
  border-style: solid;
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.12);
  box-shadow: 0 0 16px rgba(201, 162, 39, 0.25);
}

.bac-spot.has-bet {
  border-color: #7dffa0;
}

.bac-spot.tie {
  max-width: 120px;
}

.bac-spot .spot-name {
  font-family: var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--cream);
  font-weight: 700;
}

.bac-spot .spot-pay {
  font-size: 0.6rem;
  color: #bba88a;
  letter-spacing: 0.04em;
}

.bac-spot .spot-chips {
  min-height: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bac-table .table-message {
  top: 48%;
}

.bac-table .chip-tray-wrap {
  bottom: 3%;
}

/* ===== Hold'em ===== */
.holdem-house {
  position: absolute;
  left: 50%;
  top: 7%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 4;
  width: 90%;
}

.holdem-board-wrap {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 5;
  width: 94%;
}

.holdem-hero {
  position: absolute;
  left: 50%;
  bottom: 14%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 4;
  width: 90%;
}

.pot-display {
  display: inline-block;
  margin-bottom: 0.45rem;
  padding: 0.25rem 0.85rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(201, 162, 39, 0.45);
  color: #7dffa0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.board-row {
  min-height: var(--card-h);
  margin-bottom: 0.5rem;
}

.holdem-table .table-message {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  display: inline-block;
  margin-top: 0.25rem;
}

.he-bet-tag {
  min-height: 1.1em;
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 700;
  margin-top: 0.2rem;
}

.hand-name {
  font-size: 0.75rem;
  color: #d4c8b0;
  margin-top: 0.2rem;
  min-height: 1.1em;
}

.boost-tag {
  display: inline-block;
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: #3a2010;
  color: #c9a227;
  vertical-align: middle;
  margin-left: 0.25rem;
  font-family: var(--font);
  font-weight: 600;
}

.boost-tag.all {
  background: #0d3a24;
  color: #7dffa0;
}

.boost-card.dimmed {
  opacity: 0.55;
}

@media (max-width: 640px) {
  .bac-hands {
    top: 5%;
    gap: 0.5rem;
  }
  .bac-spots {
    bottom: 18%;
  }
  .holdem-hero {
    bottom: 16%;
  }
  .holdem-board-wrap {
    top: 40%;
  }
}
