:root {
  color-scheme: dark;
  --gold: #ffd687;
  --rose: #d93b62;
  --wine: #48101b;
  --felt: #0d6a4a;
  --felt-dark: #063927;
  --ink: #fff2dc;
  --muted: #d8bd91;
  --line: rgba(255, 223, 166, 0.22);
  --chip-size: 48px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: var(--app-height, 100vh);
  overflow-x: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0, rgba(255, 214, 135, 0.28), transparent 32%),
    radial-gradient(circle at 18% 18%, rgba(217, 59, 98, 0.22), transparent 30%),
    linear-gradient(135deg, #12080b 0%, #1e1710 42%, #071711 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.app {
  min-height: var(--app-height, 100vh);
}

.join-screen {
  min-height: var(--app-height, 100vh);
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 214, 135, 0.16), transparent 32%),
    linear-gradient(135deg, #12080b, #25110f 45%, #071711);
}

.third-party-loading {
  min-height: var(--app-height, 100vh);
  display: none;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 214, 135, 0.2), transparent 30%),
    radial-gradient(circle at 72% 28%, rgba(217, 59, 98, 0.18), transparent 28%),
    linear-gradient(135deg, #12080b, #25110f 46%, #071711);
}

.third-party-entry-pending .third-party-loading {
  display: grid;
}

.third-party-entry-pending .join-screen {
  display: none;
}

.loading-panel {
  width: min(460px, 100%);
  display: grid;
  gap: 16px;
  padding: 30px 28px;
  border: 1px solid rgba(255, 214, 135, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(19, 13, 10, 0.88), rgba(9, 12, 10, 0.78)),
    rgba(9, 12, 10, 0.76);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.54);
}

.loading-dots {
  display: flex;
  gap: 8px;
  min-height: 14px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 16px rgba(255, 214, 135, 0.56);
  animation: loadingPulse 900ms ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 150ms;
}

.loading-dots span:nth-child(3) {
  animation-delay: 300ms;
}

.loading-status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.loading-progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 214, 135, 0.3);
  border-radius: 999px;
  background: rgba(8, 11, 11, 0.76);
}

.loading-progress-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffe0a0, #d93b62, #ffd687);
  box-shadow: 0 0 18px rgba(255, 214, 135, 0.45);
  transition: width 260ms ease;
}

.loading-progress-text {
  color: var(--gold);
  font-size: 13px;
  font-weight: 950;
}

.join-panel {
  width: min(460px, 100%);
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid rgba(255, 214, 135, 0.34);
  border-radius: 8px;
  background: rgba(9, 12, 10, 0.76);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.54);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(26px, 4vw, 48px);
  line-height: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.join-form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  font-size: 16px;
  color: var(--ink);
  background: #080b0b;
}

.primary {
  min-height: 44px;
  border: 1px solid rgba(255, 214, 135, 0.52);
  border-radius: 7px;
  color: #211006;
  background: linear-gradient(135deg, #ffe0a0, #c7862b);
  font-weight: 950;
}

.join-error {
  min-height: 18px;
  margin: 0;
  color: #ff9fb5;
}

.game-root[hidden],
.join-screen[hidden],
.third-party-loading[hidden],
.stake-limit-notice[hidden],
.result-overlay[hidden] {
  display: none;
}

@keyframes loadingPulse {
  0%, 100% {
    opacity: 0.36;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

.vip-room {
  position: relative;
  min-height: var(--app-height, 100vh);
  display: grid;
  grid-template-columns: minmax(760px, 1fr) 340px;
  grid-template-rows: auto 1fr;
  gap: 14px;
  padding: 12px;
  overflow: hidden;
}

.room-light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 214, 135, 0.22), transparent 28%),
    radial-gradient(circle at 78% 22%, rgba(217, 59, 98, 0.2), transparent 26%),
    linear-gradient(90deg, transparent 0 9%, rgba(255, 229, 160, 0.1) 9.3% 9.8%, transparent 10.2% 28%, rgba(255, 229, 160, 0.08) 28.3% 28.8%, transparent 29.2%);
}

.topbar,
.stage,
.control-rail,
.result-overlay,
.celebration-layer {
  position: relative;
  z-index: 1;
}

.topbar {
  grid-column: 1 / -1;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 42vw);
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.wallet {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  align-items: center;
  justify-self: end;
  width: min(100%, 560px);
  min-width: 0;
  gap: 10px;
  color: var(--gold);
  font-weight: 900;
}

.player-summary {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 214, 135, 0.24);
  border-radius: 7px;
  background: rgba(5, 10, 9, 0.36);
}

.player-name,
.wallet-balance {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-name {
  color: #ffe8ad;
  font-size: 13px;
}

.wallet-balance {
  justify-self: end;
  width: 100%;
  color: var(--gold);
  font-size: 13px;
  text-align: right;
}

.topbar-actions {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.exit-game {
  min-height: 32px;
  min-width: 88px;
  border: 1px solid rgba(255, 214, 135, 0.42);
  border-radius: 7px;
  padding: 0 12px;
  color: #ffe8ad;
  background:
    linear-gradient(180deg, rgba(139, 29, 43, 0.72), rgba(45, 10, 16, 0.82)),
    rgba(255, 255, 255, 0.05);
  font-size: 12px;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 8px 18px rgba(0, 0, 0, 0.26);
}

.sound-toggle {
  min-height: 32px;
  min-width: 82px;
  border: 1px solid rgba(255, 214, 135, 0.42);
  border-radius: 7px;
  padding: 0 10px;
  color: #ffe8ad;
  background:
    linear-gradient(180deg, rgba(255, 214, 135, 0.18), rgba(66, 24, 20, 0.38)),
    rgba(255, 255, 255, 0.06);
  font-size: 12px;
  font-weight: 950;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 18px rgba(0, 0, 0, 0.28);
}

.sound-toggle[aria-pressed="true"] {
  color: #2b1308;
  background: linear-gradient(180deg, #ffe6a7, #c88936);
  border-color: rgba(255, 235, 170, 0.86);
  text-shadow: 0 1px 0 rgba(255, 245, 214, 0.6);
}

.switch-user,
.dealer-switch {
  min-height: 34px;
  border: 1px solid rgba(255, 214, 135, 0.36);
  border-radius: 7px;
  padding: 0 11px;
  color: #ffe8ad;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  font-weight: 900;
}

.dealer-side-switch {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: calc(50% + min(215px, 22vw) + 14px);
  transform: translateY(-50%);
  width: 152px;
  min-height: 44px;
  padding: 0 12px;
  color: #3b160a;
  text-shadow: 0 1px 0 rgba(255, 244, 199, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 244, 198, 0.96), rgba(231, 157, 83, 0.96) 52%, rgba(166, 74, 45, 0.98)),
    linear-gradient(135deg, rgba(255, 255, 255, 0.45), transparent 42%);
  border-color: rgba(255, 236, 172, 0.86);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.62),
    inset 0 -5px 0 rgba(91, 31, 21, 0.38),
    0 14px 0 rgba(82, 28, 20, 0.34),
    0 22px 34px rgba(0, 0, 0, 0.42);
}

.dealer-side-switch:hover {
  filter: brightness(1.05) saturate(1.06);
}

.dealer-side-switch:active {
  transform: translateY(calc(-50% + 4px));
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.44),
    inset 0 -2px 0 rgba(91, 31, 21, 0.42),
    0 7px 0 rgba(82, 28, 20, 0.34),
    0 14px 22px rgba(0, 0, 0, 0.38);
}

.dealer-side-switch[hidden] {
  display: none;
}

.stage {
  min-height: calc(var(--app-height, 100vh) - 92px);
  display: grid;
  grid-template-rows: clamp(300px, 43vh, 470px) auto minmax(300px, 1fr);
  border: 1px solid rgba(255, 214, 135, 0.22);
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(255, 214, 135, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 32%),
    rgba(2, 14, 11, 0.66);
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.58), 0 28px 90px rgba(0, 0, 0, 0.42);
}

.dealer-area {
  position: relative;
  min-height: 0;
  display: grid;
  justify-items: center;
  overflow: hidden;
}

.dealer-glow {
  position: absolute;
  width: 680px;
  height: 320px;
  top: 8px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 214, 135, 0.3), transparent 66%);
  filter: blur(12px);
}

.dealer-image {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: min(430px, 42vw);
  height: min(100%, 470px);
  transform: translateX(-50%);
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 28px 48px rgba(0, 0, 0, 0.58)) saturate(1.06);
  transition: transform 420ms ease, filter 420ms ease;
}

.dealer-image.photo-dealer {
  border-radius: 22px;
  opacity: 0.96;
  filter:
    drop-shadow(0 28px 48px rgba(0, 0, 0, 0.62))
    drop-shadow(0 0 34px rgba(255, 214, 135, 0.12))
    saturate(1.02)
    contrast(0.96);
  -webkit-mask-image:
    radial-gradient(ellipse at center, #000 0 58%, rgba(0, 0, 0, 0.86) 70%, rgba(0, 0, 0, 0.32) 84%, transparent 100%);
  mask-image:
    radial-gradient(ellipse at center, #000 0 58%, rgba(0, 0, 0, 0.86) 70%, rgba(0, 0, 0, 0.32) 84%, transparent 100%);
}

.dealer-image.dealer-entering {
  animation: dealerPopIn 920ms cubic-bezier(0.2, 0.86, 0.22, 1.08) both;
}

.dealer-entrance-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.dealer-entrance-halo {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(520px, 82vw);
  height: min(360px, 42vh);
  border-radius: 50%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 54%, rgba(255, 247, 194, 0.56), rgba(255, 196, 98, 0.22) 34%, rgba(255, 118, 155, 0.14) 58%, transparent 72%);
  filter: blur(4px);
  animation: dealerHaloBloom 1450ms ease-out forwards;
}

.dealer-entrance-spotlight {
  position: absolute;
  left: 50%;
  bottom: -8%;
  width: min(430px, 72vw);
  height: 112%;
  transform: translateX(-50%) rotate(-8deg);
  background:
    linear-gradient(16deg, transparent 0 23%, rgba(255, 240, 184, 0.3) 36%, rgba(255, 255, 255, 0.2) 48%, transparent 68%);
  mix-blend-mode: screen;
  opacity: 0;
  animation: dealerSpotlightSweep 1280ms ease-out forwards;
}

.dealer-petal {
  position: absolute;
  left: var(--petal-left, 50%);
  top: var(--petal-top, 30%);
  width: var(--petal-size, 14px);
  height: calc(var(--petal-size, 14px) * 0.72);
  border-radius: 90% 12% 90% 18%;
  background:
    radial-gradient(circle at 25% 18%, rgba(255, 255, 255, 0.86), transparent 0 22%, transparent 24%),
    linear-gradient(135deg, #fff0f5, #ff7fad 52%, #d33c76);
  box-shadow: 0 0 13px rgba(255, 128, 178, 0.46);
  opacity: 0;
  transform-origin: center;
  animation: dealerPetalFly var(--petal-duration, 1500ms) ease-out forwards;
  animation-delay: var(--petal-delay, 0ms);
}

.dealer-spark {
  position: absolute;
  left: var(--spark-left, 50%);
  top: var(--spark-top, 35%);
  width: var(--spark-size, 6px);
  height: var(--spark-size, 6px);
  border-radius: 50%;
  background: #fff7c9;
  box-shadow: 0 0 16px rgba(255, 226, 128, 0.92), 0 0 34px rgba(255, 166, 92, 0.42);
  opacity: 0;
  animation: dealerSparkFlash var(--spark-duration, 980ms) ease-out forwards;
  animation-delay: var(--spark-delay, 0ms);
}

.phase-board {
  position: relative;
  z-index: 3;
  align-self: center;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(560px, calc(100% - 48px));
  justify-content: center;
  margin: 8px 24px 12px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 214, 135, 0.36);
  border-radius: 8px;
  background: rgba(10, 8, 8, 0.78);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.42);
}

.phase-board strong {
  color: #ffe9b3;
  font-size: clamp(18px, 2.2vw, 30px);
  text-transform: uppercase;
}

.phase-board span {
  color: var(--gold);
  font-size: clamp(18px, 1.8vw, 26px);
  font-weight: 950;
}

.table {
  position: relative;
  margin: 0 24px 12px;
  border: 10px solid #4c2a1d;
  border-radius: 46% 46% 12px 12px / 24% 24% 12px 12px;
  background:
    radial-gradient(ellipse at 50% 15%, rgba(255, 255, 255, 0.12), transparent 32%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0 2px, transparent 2px 10px),
    linear-gradient(180deg, var(--felt), var(--felt-dark));
  box-shadow: inset 0 0 0 2px rgba(255, 224, 156, 0.32), inset 0 0 84px rgba(0, 0, 0, 0.46), 0 28px 62px rgba(0, 0, 0, 0.62);
  padding: 60px 22px 14px;
}

.hands {
  position: absolute;
  top: 14px;
  left: 16px;
  right: 40px;
  display: grid;
  grid-template-columns: 1fr 150px 1fr;
  gap: 18px;
  align-items: center;
}

.hand {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.hand h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #ffe8af;
  font-size: 18px;
}

.hand-emblem {
  width: 48px;
  height: 36px;
}

.cards {
  min-height: 96px;
  display: flex;
  gap: 10px;
  justify-content: center;
  perspective: 900px;
}

.card {
  position: relative;
  width: 66px;
  height: 92px;
  flex: 0 0 auto;
  border: 1px solid rgba(44, 35, 27, 0.5);
  border-radius: 8px;
  color: #151515;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.9), transparent 0 12%, transparent 13%),
    repeating-linear-gradient(45deg, rgba(136, 112, 74, 0.055) 0 1px, transparent 1px 6px),
    linear-gradient(135deg, #fffdf6 0%, #f7ead4 100%);
  font-weight: 950;
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.82),
    inset 0 0 0 5px rgba(173, 133, 72, 0.1),
    inset 0 -10px 16px rgba(130, 90, 45, 0.11),
    0 14px 24px rgba(0, 0, 0, 0.42);
  transform-style: preserve-3d;
}

.card.red {
  color: #b50f2d;
}

.card.black {
  color: #17110e;
}

.card-flight {
  opacity: 0;
  animation-duration: 820ms;
  animation-timing-function: cubic-bezier(0.2, 0.72, 0.2, 1);
  animation-fill-mode: both;
}

.card-flight[data-seat="player"] {
  animation-name: cardDealPlayer;
}

.card-flight[data-seat="banker"] {
  animation-name: cardDealBanker;
}

.card-inner-border {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(117, 82, 42, 0.23);
  border-radius: 5px;
  pointer-events: none;
}

.card-corner {
  position: absolute;
  display: grid;
  justify-items: center;
  gap: 0;
  line-height: 1;
  font-size: 11px;
  z-index: 2;
}

.card-corner b,
.card-corner i {
  display: block;
  font-style: normal;
}

.card-corner.top-left {
  top: 6px;
  left: 7px;
}

.card-corner.top-right {
  top: 6px;
  right: 7px;
}

.card-corner.bottom-left {
  left: 7px;
  bottom: 6px;
  transform: rotate(180deg);
}

.card-corner.bottom-right {
  right: 7px;
  bottom: 6px;
  transform: rotate(180deg);
}

.card-face {
  position: absolute;
  inset: 20px 13px;
  background:
    linear-gradient(135deg, transparent 45%, rgba(117, 82, 42, 0.12) 45% 55%, transparent 55%),
    linear-gradient(45deg, transparent 45%, rgba(117, 82, 42, 0.08) 45% 55%, transparent 55%);
  border-radius: 4px;
  opacity: 0.35;
  pointer-events: none;
}

.total-reveal {
  opacity: 0;
  animation: totalReveal 420ms ease forwards;
  animation-delay: var(--total-delay, 900ms);
}

.card-shoe {
  position: relative;
  width: 154px;
  height: 92px;
  justify-self: center;
  align-self: center;
  transform: rotateZ(-2deg);
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.48));
}

.card-shoe::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 14px;
  width: 116px;
  height: 58px;
  border: 1px solid rgba(211, 238, 255, 0.28);
  border-radius: 8px 18px 20px 8px;
  background:
    linear-gradient(110deg, rgba(199, 235, 255, 0.18), rgba(199, 235, 255, 0.04) 42%, rgba(4, 5, 6, 0.74)),
    linear-gradient(160deg, rgba(21, 24, 25, 0.86), rgba(5, 5, 5, 0.94));
  transform: skewX(-12deg);
  box-shadow:
    inset 0 8px 12px rgba(255, 255, 255, 0.16),
    inset 0 -14px 18px rgba(0, 0, 0, 0.62);
}

.shoe-window {
  position: absolute;
  left: 18px;
  top: 18px;
  width: 88px;
  height: 46px;
  border-radius: 6px 10px 10px 6px;
  background:
    linear-gradient(90deg, rgba(174, 223, 255, 0.22), rgba(174, 223, 255, 0.06)),
    rgba(0, 0, 0, 0.2);
  transform: skewX(-12deg);
  z-index: 2;
}

.shoe-stack {
  position: absolute;
  left: 23px;
  top: 16px;
  width: 84px;
  height: 48px;
  border: 1px solid rgba(83, 59, 35, 0.22);
  border-radius: 4px;
  background:
    repeating-linear-gradient(90deg, #fff9ed 0 3px, #d9c5a5 3px 4px),
    repeating-linear-gradient(180deg, rgba(111, 82, 48, 0.18) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, #fffaf0, #d1b98c);
  transform: skewX(-12deg);
  box-shadow: 12px 10px 0 rgba(0, 0, 0, 0.26);
  z-index: 1;
}

.shoe-rails {
  position: absolute;
  left: 16px;
  right: 24px;
  bottom: 12px;
  height: 13px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 18% 76%, rgba(255, 255, 255, 0.1)),
    #050505;
  box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.16), inset 0 -4px 6px rgba(0, 0, 0, 0.8);
  z-index: 3;
}

.shoe-lip {
  position: absolute;
  right: 8px;
  bottom: 18px;
  width: 58px;
  height: 27px;
  border-radius: 4px 16px 14px 4px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(8, 8, 8, 0.94));
  box-shadow: inset 0 0 0 1px rgba(211, 238, 255, 0.16);
  z-index: 4;
}

.shoe-mouth {
  position: absolute;
  right: 0;
  bottom: 24px;
  width: 35px;
  height: 16px;
  border-radius: 3px 999px 999px 3px;
  background: #030303;
  box-shadow: 0 0 0 1px rgba(211, 238, 255, 0.18), inset 0 3px 8px rgba(0, 0, 0, 0.94);
  z-index: 5;
}

.draw-slot {
  position: absolute;
  right: 25px;
  bottom: 27px;
  width: 44px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 247, 226, 0.92), rgba(230, 206, 164, 0.64));
  transform: skewX(-14deg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  z-index: 6;
}

.shoe-exit-card {
  position: absolute;
  right: 8px;
  bottom: 27px;
  width: 44px;
  height: 18px;
  border: 1px solid rgba(87, 63, 36, 0.28);
  border-radius: 3px;
  background:
    repeating-linear-gradient(90deg, #fff9ed 0 5px, #ddc59f 5px 6px),
    linear-gradient(180deg, #fffdf6, #ead8b8);
  transform: skewX(-16deg);
  box-shadow: 0 4px 9px rgba(0, 0, 0, 0.42);
  z-index: 7;
}

.bet-grid {
  display: grid;
  grid-template-columns: 1fr 0.72fr 1fr;
  gap: 10px;
  margin-top: 82px;
}

.bet-zone,
.side-bets button {
  position: relative;
  min-height: 98px;
  display: grid;
  grid-template-areas:
    "odds amount"
    "title title";
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 239, 196, 0.4);
  border-radius: 8px;
  padding: 9px 10px;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.26);
  overflow: hidden;
}

.bet-title {
  grid-area: title;
  justify-self: center;
  align-self: center;
  min-width: 0;
  line-height: 0.9;
  text-align: center;
}

.bet-title:has(.emblem-label) {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.bet-zone .bet-title {
  font-size: clamp(24px, 3.2vw, 42px);
  text-transform: uppercase;
}

.hand-emblem {
  position: relative;
  display: inline-grid;
  place-items: center;
  isolation: isolate;
  filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.42));
}

.emblem-label {
  position: relative;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  min-width: 118px;
  min-height: 42px;
  padding: 0 13px;
  border-radius: 8px;
  border: 1px solid rgba(255, 243, 190, 0.62);
  font-size: clamp(22px, 2.6vw, 36px);
  font-weight: 1000;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #fff8d7;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.74),
    0 0 10px rgba(255, 241, 181, 0.34);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.24),
    inset 0 -5px 0 rgba(0, 0, 0, 0.32),
    0 10px 0 rgba(0, 0, 0, 0.22),
    0 18px 30px rgba(0, 0, 0, 0.32);
}

.player-label {
  background:
    linear-gradient(180deg, rgba(123, 202, 255, 0.42), rgba(25, 94, 209, 0.88)),
    linear-gradient(135deg, #4aa7ff, #083e9a);
}

.banker-label {
  background:
    linear-gradient(180deg, rgba(255, 221, 137, 0.42), rgba(177, 29, 48, 0.88)),
    linear-gradient(135deg, #ffb45f, #9d1328);
}

.hand-emblem::before {
  content: "";
  position: absolute;
  inset: 10% 0 4%;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, var(--emblem-glow), transparent 68%);
  filter: blur(7px);
  opacity: 0.84;
  z-index: -1;
}

.emblem-card {
  position: absolute;
  width: 45%;
  height: 72%;
  border-radius: 7px;
  border: 1px solid rgba(255, 245, 204, 0.78);
  background:
    radial-gradient(circle at 26% 18%, rgba(255, 255, 255, 0.92), transparent 0 13%, transparent 14%),
    linear-gradient(145deg, var(--emblem-light), var(--emblem-main) 56%, var(--emblem-dark));
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.54),
    inset 0 -7px 0 rgba(24, 10, 8, 0.32),
    0 10px 0 rgba(0, 0, 0, 0.26),
    0 18px 32px rgba(0, 0, 0, 0.38);
}

.emblem-card.card-back {
  left: 23%;
  transform: translateY(3px) rotate(-16deg);
  opacity: 0.9;
}

.emblem-card.card-front {
  right: 23%;
  transform: translateY(-2px) rotate(14deg);
}

.emblem-card::after {
  content: "";
  position: absolute;
  inset: 24% 28%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 26%, rgba(255, 255, 255, 0.76), transparent 0 18%, transparent 20%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.05));
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}

.player-emblem {
  --emblem-light: #8fd0ff;
  --emblem-main: #2378ee;
  --emblem-dark: #0a2f7d;
  --emblem-glow: rgba(77, 178, 255, 0.74);
}

.banker-emblem {
  --emblem-light: #ffcf87;
  --emblem-main: #d9344f;
  --emblem-dark: #691121;
  --emblem-glow: rgba(255, 81, 113, 0.72);
}

.player-emblem::after,
.banker-emblem::after {
  content: "";
  position: absolute;
  width: 30%;
  height: 30%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -48%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.94), transparent 0 22%, transparent 24%),
    linear-gradient(145deg, #fff0b8, #b76b16);
  box-shadow:
    inset 0 -3px 0 rgba(87, 38, 6, 0.42),
    0 0 0 2px rgba(255, 240, 184, 0.32),
    0 8px 18px rgba(0, 0, 0, 0.3);
}

.banker-emblem::after {
  width: 34%;
  height: 34%;
  border-radius: 8px;
  transform: translate(-50%, -48%) rotate(45deg);
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.94), transparent 0 20%, transparent 22%),
    linear-gradient(145deg, #ffe7a3, #d68a21 62%, #8a3f0c);
}

.side-bets .bet-title {
  font-size: clamp(15px, 1.7vw, 20px);
}

.bet-odds {
  grid-area: odds;
  justify-self: start;
  align-self: start;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.bet-amount {
  grid-area: amount;
  justify-self: end;
  align-self: start;
  min-width: 30px;
  min-height: 24px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 22%, rgba(255, 255, 255, 0.38), transparent 0 28%, transparent 30%),
    rgba(255, 214, 135, 0.2);
  color: #ffe8b1;
  font-style: normal;
  font-weight: 950;
  box-shadow: inset 0 -3px 0 rgba(75, 41, 7, 0.42), 0 4px 9px rgba(0, 0, 0, 0.28);
}

.bet-zone.player {
  border-color: rgba(93, 184, 255, 0.72);
}

.bet-zone.tie {
  border-color: rgba(255, 225, 90, 0.76);
}

.bet-zone.banker {
  border-color: rgba(255, 74, 110, 0.74);
}

.side-bets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.side-bets button {
  min-height: 58px;
  font-weight: 950;
}

.bet-zone:disabled,
.side-bets button:disabled {
  opacity: 0.45;
  filter: grayscale(0.35);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.42);
}

.control-rail {
  display: grid;
  gap: 12px;
  align-content: start;
}

.panel {
  border: 1px solid rgba(255, 214, 135, 0.18);
  border-radius: 8px;
  padding: 11px;
  background: rgba(6, 14, 13, 0.74);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.3);
}

.panel h2 {
  margin-bottom: 8px;
  color: #ffe2a0;
  font-size: 18px;
}

.stake-row {
  margin-bottom: 10px;
}

.chips {
  display: grid;
  grid-template-columns: repeat(5, var(--chip-size));
  gap: 7px;
  justify-content: start;
}

.chip {
  position: relative;
  width: var(--chip-size);
  height: var(--chip-size);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border: 2px solid #ffe4a2;
  border-radius: 50%;
  padding: 0;
  color: #fff8dd;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.82), transparent 0 13%, transparent 14%),
    radial-gradient(circle at center, var(--chip-core, #a3162b) 0 36%, transparent 37%),
    repeating-conic-gradient(from 8deg, #fff4c6 0 10deg, var(--chip-main, #bf2543) 10deg 23deg, var(--chip-dark, #6e0f22) 23deg 31deg, #fff4c6 31deg 40deg),
    linear-gradient(145deg, var(--chip-light, #e94368), var(--chip-shadow, #5b0c1c));
  font-weight: 950;
  font-size: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.76);
  box-shadow:
    inset 0 5px 9px rgba(255, 255, 255, 0.24),
    inset 0 -5px 0 rgba(56, 5, 13, 0.62),
    0 5px 0 rgba(35, 4, 10, 0.84),
    0 10px 16px rgba(0, 0, 0, 0.42);
}

.chip span {
  position: relative;
  z-index: 1;
  width: calc(var(--chip-size) - 16px);
  height: calc(var(--chip-size) - 16px);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.46);
  color: #fffdf0;
  font-size: 14px;
  font-weight: 1000;
  line-height: 1;
  text-shadow:
    0 1px 0 #000,
    0 0 5px rgba(0, 0, 0, 0.95),
    0 0 10px rgba(255, 245, 205, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -2px 0 rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(255, 238, 180, 0.22);
}

.chip-5k {
  --chip-core: #1463c8;
  --chip-main: #2378ee;
  --chip-dark: #0c3478;
  --chip-light: #5fa9ff;
  --chip-shadow: #071c4e;
}

.chip-10k {
  --chip-core: #b07315;
  --chip-main: #dc9a28;
  --chip-dark: #70400a;
  --chip-light: #ffc35f;
  --chip-shadow: #4a2a06;
}

.chip-50k {
  --chip-core: #168647;
  --chip-main: #22a95d;
  --chip-dark: #07502d;
  --chip-light: #5fe08b;
  --chip-shadow: #07351f;
}

.chip-100k {
  --chip-core: #a3162b;
  --chip-main: #bf2543;
  --chip-dark: #6e0f22;
  --chip-light: #e94368;
  --chip-shadow: #5b0c1c;
}

.chip-500k {
  --chip-core: #5b258f;
  --chip-main: #8246c7;
  --chip-dark: #35145f;
  --chip-light: #b77dff;
  --chip-shadow: #24103f;
}

.chip.active {
  outline: 2px solid #fff5cc;
  outline-offset: 2px;
}

.ticket-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ticket-stats div {
  padding: 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
}

.ticket-stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.ticket-stats strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.orders,
.results {
  display: grid;
  gap: 7px;
  max-height: 180px;
  overflow: auto;
  margin-top: 10px;
}

.result-road {
  min-height: 96px;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 7px;
  align-content: start;
  padding: 10px;
  border: 1px solid rgba(255, 214, 135, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    rgba(0, 0, 0, 0.16);
  background-size: 28px 28px;
}

.road-dot {
  width: 24px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  justify-self: center;
  border-radius: 50%;
  color: #fff9e8;
  font-size: 12px;
  font-weight: 950;
  box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.24), inset 0 -4px 0 rgba(0, 0, 0, 0.24), 0 6px 12px rgba(0, 0, 0, 0.32);
}

.road-dot.player {
  background: linear-gradient(145deg, #75c7ff, #176cae);
}

.road-dot.banker {
  background: linear-gradient(145deg, #ff7892, #b51836);
}

.road-dot.tie {
  background: linear-gradient(145deg, #ffe684, #aa7c0a);
}

.order,
.result-pill {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.result-pill.player {
  border-left: 4px solid #5db8ff;
}

.result-pill.banker {
  border-left: 4px solid #ff4a6e;
}

.result-pill.tie {
  border-left: 4px solid #ffe15a;
}

.result-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.16);
}

.result-overlay > div {
  min-width: min(560px, 92vw);
  padding: 28px;
  border: 1px solid rgba(255, 214, 135, 0.6);
  border-radius: 8px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 214, 135, 0.32), transparent 58%),
    rgba(11, 9, 9, 0.92);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}

.result-overlay p {
  margin: 0 0 10px;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 900;
}

.result-overlay strong {
  display: block;
  font-size: clamp(36px, 7vw, 82px);
  line-height: 1;
}

.result-overlay span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 800;
}

.result-overlay.win > div {
  background:
    radial-gradient(circle at 50% 0, rgba(255, 226, 119, 0.46), transparent 58%),
    rgba(46, 25, 6, 0.94);
}

.result-overlay.lose > div {
  border-color: rgba(255, 111, 142, 0.52);
}

.stake-limit-notice {
  position: fixed;
  inset: 0;
  z-index: 24;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 214, 135, 0.22), transparent 30%),
    rgba(4, 6, 7, 0.58);
  backdrop-filter: blur(6px);
}

.stake-limit-card {
  width: min(390px, 92vw);
  display: grid;
  justify-items: center;
  gap: 11px;
  padding: 26px 24px 22px;
  border: 1px solid rgba(255, 226, 157, 0.66);
  border-radius: 8px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 230, 167, 0.34), transparent 46%),
    linear-gradient(180deg, rgba(34, 20, 12, 0.97), rgba(8, 15, 13, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 28px 80px rgba(0, 0, 0, 0.58);
}

.stake-limit-chip {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 5px solid #ffe7a8;
  border-radius: 50%;
  color: #fff8de;
  background:
    radial-gradient(circle, rgba(0, 0, 0, 0.18) 0 34%, transparent 35%),
    repeating-conic-gradient(#1d6fd6 0 16deg, #fff5d3 16deg 28deg, #1d6fd6 28deg 46deg),
    #2378ee;
  font-size: 14px;
  font-weight: 1000;
  text-shadow: 0 1px 0 #000, 0 0 8px rgba(0, 0, 0, 0.86);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.5),
    inset 0 -5px 0 rgba(0, 0, 0, 0.22),
    0 12px 22px rgba(0, 0, 0, 0.34);
}

.stake-limit-card strong {
  color: #fff6d1;
  font-size: 27px;
  line-height: 1;
}

.stake-limit-card > span:not(.stake-limit-chip) {
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.stake-limit-card button {
  min-width: 150px;
  min-height: 40px;
  margin-top: 4px;
  border: 1px solid rgba(255, 235, 170, 0.86);
  border-radius: 7px;
  color: #2b1308;
  background: linear-gradient(180deg, #ffe6a7, #c88936);
  font-size: 14px;
  font-weight: 950;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.46),
    0 12px 26px rgba(0, 0, 0, 0.34);
}

.stake-limit-card button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.82);
  outline-offset: 3px;
}

.celebration-layer {
  position: fixed;
  inset: 0;
  z-index: 21;
  pointer-events: none;
  overflow: hidden;
}

.asteroid {
  position: absolute;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 32%, #fff7c9 0 18%, #ffd36e 19% 48%, #a85d10 49% 100%);
  box-shadow:
    0 0 18px rgba(255, 214, 105, 0.8),
    -16px 8px 24px rgba(255, 171, 67, 0.34);
  animation: asteroidFly 1180ms ease-out forwards;
}

.asteroid::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 5px;
  width: 36px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 216, 118, 0.7));
}

.win-chip {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 3px solid #fff0ba;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #761124 0 35%, transparent 36%),
    repeating-conic-gradient(#fff3c9 0 10deg, #bf2543 10deg 22deg, #6e0f22 22deg 31deg, #fff3c9 31deg 40deg);
  box-shadow:
    inset 0 4px 6px rgba(255, 255, 255, 0.28),
    inset 0 -5px 0 rgba(66, 5, 14, 0.64),
    0 8px 16px rgba(0, 0, 0, 0.44);
  animation: winChipBurst 960ms cubic-bezier(0.17, 0.8, 0.2, 1) forwards;
}

.bet-chip-fall {
  animation: chipDrop 280ms ease-out both;
}

@keyframes cardFlip {
  from { transform: rotateY(80deg) translateY(10px); opacity: 0; }
  to { transform: rotateY(0deg) translateY(0); opacity: 1; }
}

@keyframes cardDealPlayer {
  0% { opacity: 0; transform: translate(115px, -10px) rotateZ(7deg) rotateY(78deg) scale(0.74); }
  68% { opacity: 1; transform: translate(-6px, 3px) rotateZ(-2deg) rotateY(12deg) scale(1.04); }
  100% { opacity: 1; transform: translate(0, 0) rotateZ(0) rotateY(0) scale(1); }
}

@keyframes cardDealBanker {
  0% { opacity: 0; transform: translate(-115px, -10px) rotateZ(-7deg) rotateY(-78deg) scale(0.74); }
  68% { opacity: 1; transform: translate(6px, 3px) rotateZ(2deg) rotateY(-12deg) scale(1.04); }
  100% { opacity: 1; transform: translate(0, 0) rotateZ(0) rotateY(0) scale(1); }
}

@keyframes totalReveal {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes chipDrop {
  from { transform: translateY(-18px) scale(0.9); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes asteroidFly {
  from { transform: translate(0, 0) scale(0.72) rotate(0deg); opacity: 0; }
  18% { opacity: 1; }
  to { transform: translate(var(--drift-x, 80px), -145px) scale(0.14) rotate(260deg); opacity: 0; }
}

@keyframes winChipBurst {
  0% { transform: translate(0, 0) rotate(0deg) scale(0.72); opacity: 0; }
  20% { opacity: 1; }
  72% { transform: translate(var(--chip-x, 0), -82px) rotate(390deg) scale(1); opacity: 1; }
  100% { transform: translate(var(--chip-x, 0), -42px) rotate(540deg) scale(0.86); opacity: 0; }
}

@keyframes dealerHaloBloom {
  0% { transform: translateX(-50%) scale(0.34); opacity: 0; }
  24% { opacity: 1; }
  72% { transform: translateX(-50%) scale(1.08); opacity: 0.82; }
  100% { transform: translateX(-50%) scale(1.34); opacity: 0; }
}

@keyframes dealerSpotlightSweep {
  0% { opacity: 0; transform: translateX(-58%) rotate(-16deg) scaleX(0.6); }
  24% { opacity: 0.9; }
  70% { opacity: 0.54; transform: translateX(-44%) rotate(10deg) scaleX(1); }
  100% { opacity: 0; transform: translateX(-50%) rotate(16deg) scaleX(1.16); }
}

@keyframes dealerPetalFly {
  0% {
    opacity: 0;
    transform: translate(0, 24px) rotate(0deg) scale(0.62);
  }
  16% { opacity: 1; }
  76% { opacity: 0.95; }
  100% {
    opacity: 0;
    transform: translate(var(--petal-x, 0), var(--petal-y, -190px)) rotate(var(--petal-rotate, 360deg)) scale(0.92);
  }
}

@keyframes dealerSparkFlash {
  0% { opacity: 0; transform: scale(0.2); }
  20% { opacity: 1; transform: scale(1.25); }
  100% { opacity: 0; transform: translate(var(--spark-x, 0), -92px) scale(0.32); }
}

@keyframes dealerPopIn {
  0% { opacity: 0.6; transform: translateX(-50%) translateY(26px) scale(0.9); filter: drop-shadow(0 36px 58px rgba(0, 0, 0, 0.62)) saturate(1.22) brightness(1.12); }
  58% { opacity: 1; transform: translateX(-50%) translateY(-8px) scale(1.05); filter: drop-shadow(0 30px 54px rgba(0, 0, 0, 0.62)) saturate(1.28) brightness(1.18); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); filter: drop-shadow(0 28px 48px rgba(0, 0, 0, 0.58)) saturate(1.06); }
}

@media (max-width: 980px) {
  :root {
    --chip-size: 42px;
  }

  .vip-room {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 8px;
  }

  .topbar {
    min-height: 48px;
    grid-template-columns: minmax(118px, 0.78fr) minmax(190px, 1.22fr);
    gap: 10px;
  }

  h1 {
    font-size: 24px;
  }

  .wallet {
    grid-template-columns: 1fr;
    justify-self: stretch;
    width: 100%;
    gap: 6px;
    font-size: 12px;
  }

  .player-summary {
    grid-template-columns: minmax(0, 0.68fr) minmax(0, 1.32fr);
    gap: 6px;
    padding: 5px 7px;
  }

  .player-name,
  .wallet-balance {
    font-size: 11px;
  }

  .topbar-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
  }

  .exit-game {
    min-height: 30px;
    min-width: 0;
    padding: 0 8px;
    font-size: 11px;
  }

  .sound-toggle {
    min-height: 30px;
    min-width: 0;
    padding: 0 8px;
    font-size: 11px;
  }

  input {
    font-size: 16px;
  }

  .stage {
    min-height: 540px;
    grid-template-rows: 185px auto 1fr;
  }

  .dealer-image {
    width: min(285px, 74vw);
    height: min(100%, 255px);
    bottom: 0;
  }

  .dealer-side-switch {
    top: 50%;
    right: 10px;
    left: auto;
    transform: none;
    width: 118px;
    min-height: 34px;
    font-size: 11px;
    box-shadow:
      inset 0 2px 0 rgba(255, 255, 255, 0.62),
      inset 0 -4px 0 rgba(91, 31, 21, 0.38),
      0 9px 0 rgba(82, 28, 20, 0.34),
      0 16px 24px rgba(0, 0, 0, 0.38);
  }

  .dealer-side-switch:active {
    transform: translateY(3px);
  }

  .phase-board {
    width: calc(100% - 24px);
    margin: 4px 12px 7px;
    padding: 6px 9px;
  }

  .phase-board strong {
    font-size: 16px;
  }

  .phase-board span {
    font-size: 16px;
  }

  .table {
    margin: 0 8px 10px;
    padding: 100px 8px 10px;
  }

  .hands {
    grid-template-columns: 1fr 1fr;
    top: 10px;
    left: 10px;
    right: 18px;
    gap: 7px;
    min-height: 94px;
  }

  .hand h2 {
    font-size: 16px;
    gap: 6px;
  }

  .hand-emblem {
    width: 32px;
    height: 24px;
  }

  .hand .emblem-label {
    min-width: 70px;
    min-height: 28px;
    padding: 0 7px;
    font-size: 16px;
  }

  .cards {
    min-height: 68px;
    gap: 4px;
  }

  .card {
    width: 42px;
    height: 60px;
    border-radius: 5px;
  }

  .card-inner-border {
    inset: 4px;
    border-radius: 4px;
  }

  .card-corner {
    font-size: 7px;
  }

  .card-corner.top-left {
    top: 4px;
    left: 5px;
  }

  .card-corner.top-right {
    top: 4px;
    right: 5px;
  }

  .card-corner.bottom-left {
    left: 5px;
    bottom: 4px;
  }

  .card-corner.bottom-right {
    right: 5px;
    bottom: 4px;
  }

  .card-face {
    inset: 14px 9px;
  }

  .card-shoe {
    position: absolute;
    left: 50%;
    top: 20px;
    width: 154px;
    height: 92px;
    transform: translateX(-50%) scale(0.62) rotateZ(-2deg);
    transform-origin: top center;
    z-index: 2;
  }

  .player-hand {
    padding-right: 36px;
  }

  .banker-hand {
    grid-column: 2;
    padding-left: 24px;
    padding-right: 8px;
  }

  .bet-grid {
    grid-template-columns: 1fr 0.78fr 1fr;
    gap: 7px;
    margin-top: 64px;
  }

  .bet-zone {
    min-height: 52px;
    padding: 6px;
  }

  .bet-zone .bet-title {
    font-size: clamp(18px, 6vw, 24px);
  }

  .bet-title:has(.emblem-label) {
    gap: 7px;
  }

  .bet-title .emblem-label {
    min-width: 74px;
    min-height: 30px;
    padding: 0 8px;
    font-size: clamp(15px, 4.2vw, 18px);
  }

  .bet-odds {
    font-size: 10px;
  }

  .bet-amount {
    min-width: 24px;
    min-height: 20px;
    padding: 0 5px;
    font-size: 11px;
  }

  .side-bets {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-top: 7px;
  }

  .side-bets button {
    min-height: 40px;
    padding: 6px;
  }

  .side-bets .bet-title {
    font-size: clamp(13px, 4vw, 16px);
  }

  .control-rail {
    gap: 9px;
  }

  .panel {
    padding: 9px;
  }

  .panel h2 {
    margin-bottom: 7px;
    font-size: 16px;
  }

  .chips {
    gap: 7px;
  }

  .chip {
    border-width: 2px;
  }

  .chip span {
    width: calc(var(--chip-size) - 14px);
    height: calc(var(--chip-size) - 14px);
    font-size: 13px;
  }
}
