:root {
  color-scheme: dark;
  --felt: #0f5f3f;
  --felt-dark: #093523;
  --red: #b9232e;
  --black: #101115;
  --gold: #d8ad4c;
  --ivory: #f6f0df;
  --ink: #151515;
  --muted: #bfc7bb;
  --line: rgba(246, 240, 223, 0.18);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ivory);
  background:
    radial-gradient(circle at 18% 12%, rgba(216, 173, 76, 0.24), transparent 24rem),
    linear-gradient(145deg, #062016 0%, #114c34 48%, #180d12 100%);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  right: -10vw;
  bottom: -24vh;
  left: -10vw;
  z-index: -1;
  height: 58vh;
  content: "";
  background:
    linear-gradient(180deg, rgba(216, 173, 76, 0.2), transparent 18%),
    repeating-linear-gradient(90deg, rgba(246, 240, 223, 0.12) 0 1px, transparent 1px 86px),
    repeating-linear-gradient(0deg, rgba(246, 240, 223, 0.1) 0 1px, transparent 1px 70px),
    linear-gradient(180deg, rgba(7, 37, 25, 0.7), rgba(2, 11, 8, 0.95));
  transform: perspective(820px) rotateX(64deg);
  transform-origin: bottom center;
  pointer-events: none;
}

button,
input {
  font: inherit;
}

button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ivory);
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

button:hover,
.file-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(216, 173, 76, 0.72);
  background: rgba(216, 173, 76, 0.14);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ivory);
  background: rgba(0, 0, 0, 0.24);
  outline: none;
}

input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(216, 173, 76, 0.18);
}

.app-shell {
  width: min(1440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(16px, 2vw, 28px);
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 980px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4.4vw, 4.75rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.bank-panel {
  min-width: 170px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  box-shadow: var(--shadow);
}

.bank-panel span,
.result-panel span,
.slip-head span,
.dealer-fields > label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bank-panel strong {
  display: block;
  margin-top: 4px;
  color: var(--gold);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1;
}

.casino-floor {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(260px, 360px);
  gap: 18px;
  align-items: stretch;
  perspective: 1600px;
}

.wheel-stage,
.dealer-panel,
.bet-builder,
.bet-board,
.slip-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 18, 12, 0.5);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.wheel-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(180px, 240px);
  gap: clamp(16px, 3vw, 28px);
  align-items: center;
  padding: clamp(16px, 3vw, 30px);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(246, 240, 223, 0.08), transparent 32%),
    linear-gradient(135deg, rgba(216, 173, 76, 0.12), transparent 42%),
    rgba(4, 18, 12, 0.58);
  box-shadow:
    0 38px 86px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(246, 240, 223, 0.16),
    inset 0 -24px 38px rgba(0, 0, 0, 0.26);
  transform-style: preserve-3d;
}

.wheel-stage::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 24px;
  content: "";
  background: linear-gradient(180deg, rgba(216, 173, 76, 0.2), rgba(8, 5, 3, 0.48));
  border-top: 1px solid rgba(216, 173, 76, 0.24);
  pointer-events: none;
}

.wheel-wrap {
  position: relative;
  width: min(100%, 620px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  transform: perspective(1000px) rotateX(8deg) translateZ(18px);
  transform-style: preserve-3d;
}

#wheelCanvas {
  display: block;
  width: 100%;
  height: 100%;
  filter:
    drop-shadow(0 34px 34px rgba(0, 0, 0, 0.48))
    drop-shadow(0 4px 0 rgba(216, 173, 76, 0.2));
  transform: rotate(0deg);
  transform-origin: 50% 50%;
}

.pointer {
  position: absolute;
  z-index: 4;
  top: -2px;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-right: 17px solid transparent;
  border-left: 17px solid transparent;
  border-top: 42px solid var(--gold);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.55));
}

.ball {
  position: absolute;
  z-index: 5;
  top: 9%;
  left: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ivory);
  box-shadow:
    inset -3px -4px 5px rgba(0, 0, 0, 0.24),
    0 4px 14px rgba(0, 0, 0, 0.42);
  transform: translateX(-50%);
}

.wheel-center {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 28%;
  aspect-ratio: 1;
  border: 5px solid rgba(216, 173, 76, 0.78);
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(246, 240, 223, 0.1), transparent),
    #151515;
  transform: translate(-50%, -50%);
  box-shadow: inset 0 0 26px rgba(0, 0, 0, 0.72);
}

.wheel-center span {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--gold);
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 800;
  line-height: 0.8;
}

.wheel-center small {
  color: var(--muted);
  font-size: clamp(0.58rem, 1vw, 0.78rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spin-panel {
  display: grid;
  gap: 14px;
  align-content: center;
}

.primary-btn {
  min-height: 72px;
  border-color: rgba(216, 173, 76, 0.85);
  color: #221505;
  background: linear-gradient(180deg, #ffe08a, #c88c25);
  font-size: 1.2rem;
  font-weight: 900;
  text-transform: uppercase;
}

.result-panel {
  min-height: 120px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(185, 35, 46, 0.18), transparent 50%),
    rgba(0, 0, 0, 0.28);
}

.result-panel strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.25rem, 2.4vw, 2rem);
  line-height: 1.05;
}

.dealer-panel {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 14px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(246, 240, 223, 0.07), transparent 28%),
    rgba(4, 18, 12, 0.62);
  box-shadow:
    0 38px 86px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(246, 240, 223, 0.14);
}

.dealer-photo {
  position: relative;
  min-height: 432px;
  overflow: hidden;
  border: 1px solid rgba(216, 173, 76, 0.4);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(216, 173, 76, 0.18), transparent 22%),
    repeating-linear-gradient(90deg, rgba(216, 173, 76, 0.1) 0 1px, transparent 1px 48px),
    linear-gradient(155deg, #07140f 0%, #102f22 48%, #070606 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 -32px 48px rgba(0, 0, 0, 0.58);
  isolation: isolate;
  perspective: 900px;
}

.dealer-photo::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  background:
    linear-gradient(110deg, transparent 0 42%, rgba(246, 240, 223, 0.08) 43% 44%, transparent 45%),
    linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

.dealer-photo img {
  position: absolute;
  right: -12%;
  bottom: -5%;
  z-index: 3;
  display: none;
  width: 126%;
  height: 110%;
  min-height: 0;
  object-fit: contain;
  object-position: bottom center;
  filter:
    drop-shadow(24px 20px 28px rgba(0, 0, 0, 0.5))
    drop-shadow(-1px 0 0 rgba(216, 173, 76, 0.24));
  transform: translateZ(48px);
}

.dealer-photo.uploaded-image img {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
  transform: none;
}

.dealer-photo.has-image img {
  display: block;
}

.dealer-photo.has-image .dealer-placeholder {
  display: none;
}

.dealer-sign {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 4;
  padding: 7px 13px;
  border: 1px solid rgba(216, 173, 76, 0.52);
  border-radius: 999px;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.42);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translateX(-50%) translateZ(80px);
}

.dealer-backlight {
  position: absolute;
  top: 56px;
  left: 50%;
  z-index: 1;
  width: 62%;
  aspect-ratio: 1;
  border: 1px solid rgba(216, 173, 76, 0.24);
  border-radius: 50%;
  background:
    conic-gradient(from 180deg, rgba(216, 173, 76, 0.1), transparent 22%, rgba(246, 240, 223, 0.08), transparent 62%, rgba(216, 173, 76, 0.12)),
    rgba(0, 0, 0, 0.18);
  box-shadow:
    inset 0 0 42px rgba(216, 173, 76, 0.12),
    0 18px 60px rgba(0, 0, 0, 0.32);
  transform: translateX(-50%) rotateX(14deg);
}

.dealer-counter {
  position: absolute;
  right: -8%;
  bottom: -9px;
  left: -8%;
  z-index: 5;
  height: 116px;
  border: 1px solid rgba(216, 173, 76, 0.5);
  border-radius: 50% 50% 8px 8px / 34% 34% 8px 8px;
  background:
    linear-gradient(180deg, rgba(246, 240, 223, 0.14), transparent 18%),
    radial-gradient(ellipse at 50% 0%, rgba(21, 100, 66, 0.95), rgba(5, 37, 25, 0.98) 56%, rgba(2, 12, 9, 1) 100%);
  box-shadow:
    0 -8px 18px rgba(216, 173, 76, 0.12),
    0 22px 32px rgba(0, 0, 0, 0.52),
    inset 0 7px 0 rgba(216, 173, 76, 0.24);
  transform: perspective(620px) rotateX(52deg);
  transform-origin: bottom center;
}

.dealer-chips {
  position: absolute;
  right: 18px;
  bottom: 26px;
  z-index: 7;
  display: flex;
  align-items: center;
}

.dealer-chips span {
  width: 32px;
  height: 32px;
  margin-left: -9px;
  border: 3px dashed rgba(246, 240, 223, 0.82);
  border-radius: 50%;
  background: linear-gradient(145deg, #d92f3d, #6d111c);
  box-shadow:
    0 8px 12px rgba(0, 0, 0, 0.35),
    inset 0 0 0 4px rgba(0, 0, 0, 0.24);
}

.dealer-chips span:nth-child(2) {
  background: linear-gradient(145deg, #d8ad4c, #7f5619);
}

.dealer-chips span:nth-child(3) {
  background: linear-gradient(145deg, #20242a, #07080a);
}

.dealer-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 320px;
}

.dealer-placeholder span {
  display: grid;
  place-items: center;
  width: 106px;
  height: 106px;
  border: 2px solid rgba(216, 173, 76, 0.72);
  border-radius: 50%;
  color: var(--gold);
  font-size: 2rem;
  font-weight: 900;
}

.dealer-fields {
  display: grid;
  gap: 9px;
}

.dealer-fields input {
  min-height: 44px;
  padding: 0 12px;
}

.dealer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.file-btn {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background 150ms ease;
}

#photoUpload {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dealer-badge {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
}

.dealer-badge span {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--gold);
  font-size: 1.35rem;
  font-weight: 800;
}

.dealer-badge strong {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.86rem;
}

.control-floor {
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(420px, 1fr) minmax(260px, 340px);
  gap: 18px;
  margin-top: 18px;
}

.bet-builder,
.slip-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
}

.builder-row {
  display: grid;
  gap: 8px;
}

.builder-row label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.money-input {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.money-input span {
  padding-left: 12px;
  color: var(--gold);
  font-weight: 900;
}

.money-input input {
  min-height: 44px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.money-input input:focus {
  box-shadow: none;
}

.chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.chips button {
  border-color: rgba(216, 173, 76, 0.35);
  color: var(--gold);
  font-weight: 900;
}

.bet-board {
  display: grid;
  grid-template-columns: 64px 1fr;
  grid-template-rows: auto auto;
  gap: 8px;
  padding: 16px;
  box-shadow:
    0 26px 56px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(246, 240, 223, 0.14),
    inset 0 -16px 30px rgba(0, 0, 0, 0.22);
  transform: perspective(1200px) rotateX(2deg);
  transform-origin: top center;
}

.zero-tile {
  grid-row: 1 / span 2;
  min-height: 100%;
  background: linear-gradient(180deg, #0c7c51, #075237);
  font-size: 1.45rem;
  font-weight: 900;
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(34px, 1fr));
  gap: 6px;
}

.number-grid button {
  aspect-ratio: 1.12;
  min-height: 38px;
  padding: 0;
  font-weight: 900;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -4px 0 rgba(0, 0, 0, 0.24),
    0 8px 12px rgba(0, 0, 0, 0.18);
}

.number-grid button.red,
.outside-bets button[data-bet-value="red"] {
  background: linear-gradient(180deg, #ce3340, #861925);
}

.number-grid button.black,
.outside-bets button[data-bet-value="black"] {
  background: linear-gradient(180deg, #2a2d31, #08090b);
}

.number-grid button.selected,
.outside-bets button.selected,
.zero-tile.selected {
  border-color: var(--gold);
  box-shadow:
    inset 0 0 0 2px rgba(216, 173, 76, 0.85),
    0 0 0 3px rgba(216, 173, 76, 0.16);
}

.outside-bets {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.outside-bets button {
  min-height: 42px;
  padding: 0 8px;
  font-size: clamp(0.76rem, 1.2vw, 0.95rem);
  font-weight: 850;
}

.outside-bets button:nth-last-child(-n + 3) {
  grid-column: span 2;
}

.slip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.slip-head strong {
  display: block;
  margin-top: 3px;
  color: var(--gold);
  font-size: 1.8rem;
  line-height: 1;
}

.slip-head button {
  min-width: 82px;
}

.bets-list {
  display: grid;
  gap: 8px;
  max-height: 338px;
  overflow: auto;
  padding-right: 2px;
}

.empty-state {
  margin: 0;
  padding: 18px;
  border: 1px dashed rgba(246, 240, 223, 0.24);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.bet-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.bet-item strong {
  display: block;
  font-size: 1rem;
}

.bet-item span {
  color: var(--muted);
  font-size: 0.86rem;
}

.bet-item button {
  width: 34px;
  min-height: 34px;
  padding: 0;
}

.win-flash {
  animation: flashWin 850ms ease both;
}

.loss-flash {
  animation: flashLoss 850ms ease both;
}

@keyframes flashWin {
  0%,
  100% {
    box-shadow: var(--shadow);
  }

  45% {
    box-shadow:
      var(--shadow),
      0 0 0 5px rgba(216, 173, 76, 0.3);
  }
}

@keyframes flashLoss {
  0%,
  100% {
    box-shadow: var(--shadow);
  }

  45% {
    box-shadow:
      var(--shadow),
      0 0 0 5px rgba(185, 35, 46, 0.32);
  }
}

@media (max-width: 1100px) {
  .casino-floor,
  .control-floor {
    grid-template-columns: 1fr;
  }

  .dealer-panel {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .dealer-photo {
    grid-row: auto;
    min-height: 430px;
  }

  .dealer-placeholder {
    min-height: 430px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 12px;
  }

  .top-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .bank-panel {
    min-width: 0;
  }

  .wheel-stage {
    grid-template-columns: 1fr;
  }

  .wheel-wrap,
  .bet-board {
    transform: none;
  }

  .spin-panel {
    grid-template-columns: 1fr;
  }

  .dealer-panel {
    grid-template-columns: 1fr;
  }

  .dealer-photo {
    grid-row: auto;
    min-height: 420px;
  }

  body::before {
    display: none;
  }

  .bet-board {
    grid-template-columns: 1fr;
  }

  .zero-tile {
    grid-row: auto;
    min-height: 54px;
  }

  .number-grid {
    grid-template-columns: repeat(6, minmax(38px, 1fr));
  }

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

  .outside-bets button:nth-last-child(-n + 3) {
    grid-column: span 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Scene pass: keep this feeling like a wheel gag, not a site/dashboard. */
.app-shell {
  width: min(1320px, 100%);
  padding: clamp(12px, 1.6vw, 22px);
}

.top-bar {
  position: relative;
  z-index: 5;
  margin-bottom: 10px;
}

.eyebrow {
  font-size: 0.68rem;
}

h1 {
  max-width: 850px;
  font-size: clamp(1.65rem, 3.5vw, 3.75rem);
  line-height: 0.96;
}

.bank-panel {
  min-width: 145px;
  padding: 11px 14px;
  background: rgba(2, 15, 10, 0.68);
}

.casino-floor {
  display: block;
  perspective: none;
}

.wheel-stage {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  min-height: clamp(560px, 66vh, 760px);
  padding: clamp(18px, 2.5vw, 34px);
  border-color: rgba(216, 173, 76, 0.24);
  background:
    radial-gradient(circle at 54% 12%, rgba(216, 173, 76, 0.28), transparent 15rem),
    radial-gradient(circle at 50% 68%, rgba(4, 69, 44, 0.88), transparent 29rem),
    linear-gradient(180deg, rgba(2, 14, 10, 0.08), rgba(2, 14, 10, 0.58)),
    #082f21;
}

.wheel-stage::after {
  height: 16px;
  background: linear-gradient(180deg, rgba(216, 173, 76, 0.16), rgba(8, 5, 3, 0.44));
}

.pit-boss {
  position: absolute;
  top: clamp(-86px, -5vw, -42px);
  left: 50%;
  z-index: 1;
  width: min(34vw, 440px);
  max-width: 46%;
  height: auto;
  max-height: 72%;
  object-fit: contain;
  opacity: 0.88;
  filter:
    drop-shadow(22px 22px 26px rgba(0, 0, 0, 0.52))
    saturate(0.9);
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
}

.wheel-wrap {
  z-index: 2;
  width: min(66vh, 670px, 72vw);
  transform: perspective(1000px) rotateX(7deg);
}

.spin-panel {
  position: absolute;
  right: clamp(20px, 3vw, 44px);
  bottom: clamp(24px, 3.4vw, 52px);
  z-index: 4;
  width: min(250px, 26vw);
}

.primary-btn {
  min-height: 66px;
}

.result-panel {
  min-height: 92px;
  background: rgba(2, 16, 11, 0.7);
}

.dealer-mood {
  display: block;
  margin-top: -4px;
  color: rgba(246, 240, 223, 0.58);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
}

.control-floor {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(460px, 1fr) minmax(190px, 240px);
  gap: 10px;
  margin-top: 10px;
}

.bet-builder,
.bet-board,
.slip-panel {
  border-color: rgba(246, 240, 223, 0.12);
  background: rgba(2, 17, 12, 0.58);
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(246, 240, 223, 0.08);
}

.bet-builder,
.slip-panel {
  gap: 10px;
  padding: 12px;
}

.bet-board {
  padding: 12px;
  transform: none;
}

.number-grid {
  gap: 5px;
}

.outside-bets {
  gap: 5px;
}

.bets-list {
  max-height: 120px;
}

@media (max-width: 980px) {
  .top-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .wheel-stage {
    min-height: 620px;
  }

  .pit-boss {
    top: -34px;
    left: 52%;
    width: min(58vw, 380px);
    max-width: 64%;
  }

  .wheel-wrap {
    width: min(86vw, 610px);
  }

  .spin-panel {
    right: 18px;
    bottom: 20px;
    width: min(260px, 42vw);
  }

  .control-floor {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .wheel-stage {
    min-height: 500px;
    padding: 14px;
  }

  .pit-boss {
    top: -42px;
    left: 53%;
    width: min(70vw, 320px);
    max-width: 78%;
    opacity: 0.76;
  }

  .wheel-wrap {
    width: min(92vw, 390px);
  }

  .spin-panel {
    position: static;
    width: min(100%, 320px);
    margin-top: 14px;
  }

  .primary-btn {
    min-height: 58px;
  }
}

/* Final scene correction: table perspective with the pit boss standing behind it. */
.wheel-stage {
  min-height: clamp(650px, 73vh, 820px);
  align-items: end;
  padding-top: clamp(92px, 8vw, 132px);
  padding-bottom: clamp(18px, 2vw, 28px);
}

.pit-boss {
  top: clamp(28px, 4vw, 54px);
  left: 50%;
  width: min(42vw, 520px);
  max-width: 54%;
  max-height: 72%;
  opacity: 0.94;
}

.wheel-wrap {
  width: min(82vw, 780px);
  transform: perspective(920px) rotateX(55deg) translateY(96px) scale(1.04);
  transform-origin: 50% 58%;
}

.spin-panel {
  right: clamp(18px, 2.5vw, 34px);
  bottom: clamp(18px, 2vw, 28px);
}

@media (max-width: 980px) {
  .wheel-stage {
    min-height: 650px;
    padding-top: 98px;
  }

  .pit-boss {
    top: 42px;
    left: 50%;
    width: min(70vw, 440px);
    max-width: 72%;
  }

  .wheel-wrap {
    width: min(96vw, 690px);
    transform: perspective(850px) rotateX(52deg) translateY(82px) scale(1.04);
  }
}

@media (max-width: 640px) {
  .wheel-stage {
    min-height: 550px;
    padding-top: 74px;
  }

  .pit-boss {
    top: 42px;
    left: 50%;
    width: min(86vw, 340px);
    max-width: 88%;
    opacity: 0.9;
  }

  .wheel-wrap {
    width: min(110vw, 470px);
    transform: perspective(720px) rotateX(50deg) translateY(64px) scale(1.02);
  }
}
