.play-screen {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.play-screen main {
  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: 12px;
}

.play-fit {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 12px;
  min-width: 0;
}

.stage,
.console {
  min-width: 0;
  max-width: 100%;
  background: rgba(7, 17, 31, 0.92);
  border: 1px solid var(--line);
  padding: 12px;
}

.stage-head { display: flex; gap: 12px; align-items: center; }
.stage-head img { width: 72px; height: 54px; object-fit: cover; border: 1px solid var(--line); }
.stage-head h1 { font-size: clamp(1.35rem, 3vw, 2.1rem); margin: 0; }
.stage-head .kicker { margin-bottom: 4px; }

.result,
.feature {
  min-height: 44px;
  margin: 10px 0 0;
  padding: 10px 12px;
  background: rgba(62, 230, 218, 0.08);
  border-left: 3px solid var(--magenta-400);
  font-variant-numeric: tabular-nums;
}

.feature { min-height: 0; color: var(--aqua-300); }

.console {
  position: relative;
  z-index: var(--z-console);
  display: grid;
  gap: 8px;
  background: #07111f;
}

.amount-label { margin: 0; font-weight: 700; }

.amount-row,
.action-row,
.tool-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.amount-row output {
  min-width: 88px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-variant-numeric: tabular-nums;
  color: var(--aqua-300);
}

.console .button.primary { width: 100%; }
.action-row .button { flex: 1 1 42%; }
.console-note { margin: 0; color: var(--text-soft); font-size: 16px; }
.console details { color: var(--text-soft); }
.console summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.rules { margin: 0; padding-left: 18px; }
.rules li { margin: 4px 0; }

.reel-well,
.bowl,
.cloth,
.table { width: 100%; max-width: 100%; min-width: 0; }

.reel-well canvas,
.bowl canvas { width: 100%; height: auto; display: block; }

.bowl {
  width: min(100%, 620px);
  margin: 8px auto 4px;
  perspective: 980px;
}

.bowl-tilt {
  transform: rotateX(48deg);
  transform-origin: center 62%;
}

.cloth { display: grid; gap: 6px; margin-top: 8px; }

.wheel-table {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 3px;
  align-items: stretch;
}

.numbers {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: minmax(34px, auto);
  gap: 3px;
}

.bet-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
}

.outs { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.spot {
  position: relative;
  min-width: 0;
  min-height: 36px;
  padding: 4px 2px;
  border: 1px solid rgba(62, 230, 218, 0.4);
  background: #10233c;
  color: #f4fbff;
  font: 700 clamp(10px, 2.2vw, 14px) / 1.1 var(--font-body);
  cursor: pointer;
  touch-action: manipulation;
}

.spot-red { background: #9d1838; }
.spot-black { background: #101820; }
.spot-green { background: #0c8f62; }
.wheel-table .spot-green { min-height: 100%; }

.spot [data-disc]:empty { display: none; }

.spot [data-disc] {
  position: absolute;
  right: 1px;
  top: 1px;
  min-width: 16px;
  height: 16px;
  padding: 0 2px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, #ffffff, #3ee6da 46%, #0b6e68);
  color: #041018;
  font-size: 9px;
  line-height: 16px;
  text-align: center;
}

.pips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pip {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 800;
  font-size: 13px;
}

.pip-red { background: #c4234a; }
.pip-black { background: #101820; border: 1px solid var(--aqua-400); }
.pip-green { background: #0c8f62; }

.table {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 14px 12px 16px;
  border: 1px solid rgba(255, 61, 154, 0.5);
  border-radius: 18px;
  background:
    radial-gradient(480px 200px at 50% 0%, rgba(62, 230, 218, 0.18), transparent 70%),
    linear-gradient(180deg, #0e4a48, #072428);
  box-shadow: inset 0 0 0 7px rgba(5, 12, 22, 0.28);
}

.shoe {
  width: 78px;
  height: 48px;
  margin-left: auto;
  border: 1px solid #3ee6da;
  border-radius: 6px 12px 4px 4px;
  background: linear-gradient(160deg, #1a3d5c, #07111f);
  box-shadow: 8px 12px 0 #041018;
  position: relative;
}

.shoe::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 14px;
  top: 8px;
  height: 20px;
  background: repeating-linear-gradient(#f7f4ee, #f7f4ee 2px, #d5deea 3px);
}

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 108px;
  perspective: 900px;
}

.playing-card {
  width: 74px;
  height: 106px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.playing-card.is-down { transform: rotateY(180deg); }

.playing-card.is-dealt { animation: deal-in 420ms cubic-bezier(0.2, 0.8, 0.2, 1); }

.playing-card.is-down.is-dealt { animation-name: deal-down; }

.face,
.back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 8px;
  box-shadow: 0 12px 18px rgba(0, 0, 0, 0.35);
}

.back {
  transform: rotateY(180deg);
  background:
    repeating-linear-gradient(135deg, rgba(62, 230, 218, 0.4) 0 6px, transparent 6px 12px),
    linear-gradient(160deg, #10233c, #3a1244);
  border: 2px solid #9cf6ef;
}

.face {
  display: flex;
  flex-direction: column;
  padding: 6px;
  background: #f6f3ea;
  color: #161616;
}

.face.red { color: #c4173a; }
.rank { font-weight: 800; font-size: 18px; line-height: 1; }
.suit { margin: auto; font-size: 32px; line-height: 1; }

.hand-block {
  min-width: 0;
  padding: 8px;
  border: 1px solid transparent;
}

.hand-block.is-active { border-color: var(--aqua-400); }
.hand-block h3 { margin: 0 0 4px; font-size: 1rem; }
.hand-total { margin: 0 0 6px; color: var(--aqua-300); font-variant-numeric: tabular-nums; }

@keyframes deal-in {
  from { transform: translate(84px, -96px) rotate(-10deg) scale(0.84); opacity: 0.2; }
}

@keyframes deal-down {
  from { transform: translate(84px, -70px) rotateY(180deg) scale(0.84); }
  to { transform: rotateY(180deg); }
}

@media (min-width: 720px) {
  .outs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .playing-card { width: 84px; height: 120px; }
}

@media (min-width: 1024px) {
  .play-fit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }
  .console { position: static; align-content: start; }
  .stage { display: flex; flex-direction: column; }
}

@media (min-width: 1280px) {
  .play-fit { grid-template-columns: minmax(0, 1fr) 340px; }
}

@media (max-width: 420px) {
  .stage, .console { padding: 8px; }
  .playing-card { width: 60px; height: 86px; }
  .suit { font-size: 24px; }
  .rank { font-size: 15px; }
  .wheel-table { grid-template-columns: 28px minmax(0, 1fr); }
  .numbers { gap: 2px; }
  .spot { min-height: 32px; }
}
