.arcade-board {
  position: relative;
}
.arcade-page .playing-card {
  display: block;
  position: relative;
  perspective: 800px;
  width: clamp(76px, 9vw, 112px);
  aspect-ratio: 5 / 7;
  flex-shrink: 0;
}
.arcade-page .card-inner {
  display: block;
}
.arcade-page .badugi-hand {
  width: min(100%, 480px);
}
.arcade-page .hand-card {
  flex: 1;
  min-width: 0;
}
.arcade-page .hand-card .playing-card {
  width: 100%;
}
.arcade-page .playing-card.small {
  width: clamp(52px, 6vw, 72px);
}
.arcade-page .active-playing-card .playing-card {
  width: clamp(112px, 13vw, 152px);
}
.arcade-page .card-corner {
  font-size: clamp(18px, 2vw, 25px);
}
.arcade-page .card-corner small {
  font-size: 15px;
}
.arcade-page .card-suit {
  font-size: clamp(36px, 4vw, 52px);
}
.arcade-page .small .card-corner {
  font-size: 15px;
  left: 5px;
  top: 4px;
}
.arcade-page .small .card-corner.bottom {
  inset: auto 5px 4px auto;
}
.arcade-page .small .card-corner small {
  font-size: 10px;
}
.arcade-page .small .card-suit {
  font-size: 30px;
}
.hwatu-flight {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 12;
  pointer-events: none;
  perspective: 600px;
}
.hwatu-flight .hwatu {
  width: 100%;
  height: 100%;
}
.hwatu-flip {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}
.hwatu-reverse,
.hwatu-obverse {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
}
.hwatu-obverse {
  transform: rotateY(180deg);
}
.arcade-page {
  --dice-face: #f5efdf;
  --dice-edge: #c0b28e;
  --dice-pip: #273b30;
  --coin-face: #e8c478;
  --coin-edge: #9b7637;
  --coin-ink: #684819;
  --ruby: #ef7c74;
  --sapphire: #7eaff5;
  --emerald: #8be0b5;
  --draw-shadow: #06160c70;
}
.round-dice-scene,
.round-coin-scene {
  position: relative;
  min-height: 290px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(65px, 12vw, 120px);
  perspective: 900px;
}
.dice-felt-ring {
  position: absolute;
  inset: 18% 8% 10%;
  border: 1px solid var(--round-outline);
  border-radius: 50%;
  transform: rotateX(58deg);
}
.round-die-space {
  position: relative;
  width: 82px;
  height: 82px;
  perspective: 600px;
}
.round-die-shadow {
  position: absolute;
  width: 105px;
  height: 35px;
  left: -12px;
  bottom: -55px;
  background: var(--draw-shadow);
  border-radius: 50%;
  filter: blur(8px);
}
.round-die {
  position: relative;
  width: 82px;
  height: 82px;
  transform-style: preserve-3d;
  transform: rotateX(-20deg) rotateY(-24deg);
}
.round-die-face {
  position: absolute;
  inset: 0;
  border-radius: 15px;
  background: var(--dice-face);
  border: 1px solid var(--dice-edge);
  backface-visibility: hidden;
  box-shadow: inset 0 -4px 8px var(--draw-shadow);
}
.round-die-face svg {
  width: 100%;
  height: 100%;
  fill: var(--dice-pip);
}
.round-die .face-0 {
  transform: translateZ(41px);
}
.round-die .face-1 {
  transform: rotateY(180deg) translateZ(41px);
}
.round-die .face-2 {
  transform: rotateY(90deg) translateZ(41px);
}
.round-die .face-3 {
  transform: rotateY(-90deg) translateZ(41px);
}
.round-die .face-4 {
  transform: rotateX(90deg) translateZ(41px);
}
.round-die .face-5 {
  transform: rotateX(-90deg) translateZ(41px);
}
.round-scene-caption {
  min-height: 72px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 18px;
  color: var(--round-muted);
}
.round-scene-caption > strong {
  font-size: 34px;
  color: var(--round-ink);
  font-weight: 600;
}
.round-coin {
  width: 126px;
  height: 126px;
  position: relative;
  transform-style: preserve-3d;
}
.round-coin-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  border-radius: 50%;
  background: var(--coin-face);
  border: 7px double var(--coin-edge);
  color: var(--coin-ink);
  backface-visibility: hidden;
  box-shadow:
    inset 0 0 0 4px var(--coin-face),
    inset 0 0 0 5px var(--coin-edge);
}
.round-coin-face > span {
  font-size: 62px;
  line-height: 1.05;
}
.round-coin-face > small {
  font-size: 13px;
  font-weight: 700;
}
.coin-front {
  transform: translateZ(5px);
}
.coin-back {
  transform: rotateY(180deg) translateZ(5px);
}
.coin-ground {
  position: absolute;
  width: 130px;
  height: 22px;
  top: 78%;
  border-radius: 50%;
  background: var(--draw-shadow);
  filter: blur(7px);
}
.color-drop-machine {
  position: relative;
  height: 320px;
  width: min(100%, 480px);
  margin: auto;
  isolation: isolate;
}
.drop-aperture {
  position: absolute;
  top: 12px;
  left: calc(50% - 30px);
  width: 60px;
  height: 14px;
  border: 2px solid var(--arcade-gold);
  border-radius: 50%;
  background: var(--draw-shadow);
}
.drop-orbit {
  position: absolute;
  top: 20%;
  left: 18%;
  width: 64%;
  height: 36%;
  border: 1px solid var(--round-outline);
  border-radius: 50%;
  transform: rotate(-24deg);
}
.drop-orbit.orbit-two {
  transform: rotate(24deg);
}
.drop-ball {
  position: absolute;
  left: calc(50% - 22px);
  top: 72px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 28% 25%, var(--round-ink), var(--arcade-gold) 65%, var(--coin-edge));
  box-shadow: 0 12px 20px var(--draw-shadow);
  z-index: 2;
}
.drop-ball[data-color="0"] {
  background: var(--ruby);
}
.drop-ball[data-color="1"] {
  background: var(--sapphire);
}
.drop-ball[data-color="2"] {
  background: var(--emerald);
}
.drop-cups {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.drop-cup {
  display: grid;
  justify-items: center;
  align-content: end;
  gap: 14px;
  min-width: 0;
  height: 110px;
  border-bottom: 3px solid currentColor;
  border-radius: 50% 50% 16px 16px;
  color: var(--ruby);
  padding-bottom: 14px;
  transition: background-color 180ms;
}
.drop-cup.cup-1 {
  color: var(--sapphire);
}
.drop-cup.cup-2 {
  color: var(--emerald);
}
.cup-gem {
  width: 28px;
  height: 28px;
  transform: rotate(45deg);
  border: 2px solid currentColor;
  border-radius: 5px;
}
.drop-cup strong {
  font-size: 13px;
  white-space: nowrap;
}
.drop-cup.is-winner {
  background: color-mix(in srgb, currentColor 17%, transparent);
}
.hundred-machine {
  width: min(100%, 640px);
  margin: auto;
}
.hundred-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 34px 0 42px;
  font-variant-numeric: tabular-nums;
}
.hundred-digit {
  position: relative;
  display: block;
  flex: 0 1 100px;
  overflow: hidden;
  background: var(--round-surface);
  border-radius: 12px;
  border: 1px solid var(--round-outline);
  box-shadow: inset 0 8px 18px var(--draw-shadow);
}
.hundred-digit::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--round-outline);
  opacity: 0.55;
}
.hundred-digit b {
  display: block;
  text-align: center;
  font-size: clamp(44px, 8vw, 104px);
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.hundred-decimal {
  font-size: clamp(36px, 5vw, 64px);
  align-self: end;
  line-height: 1.8;
  color: var(--arcade-gold);
}
.hundred-scale {
  container-type: inline-size;
  position: relative;
  height: 14px;
  margin-inline: 10px;
  background: var(--round-surface);
  border-radius: 7px;
}
.hundred-safe {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--emerald);
  opacity: 0.5;
  transform-origin: left;
  border-radius: 7px;
}
.hundred-needle {
  position: absolute;
  left: -2px;
  top: -9px;
  width: 4px;
  height: 32px;
  background: var(--arcade-gold);
  border-radius: 2px;
}
.hundred-labels,
.hundred-odds {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--round-muted);
  font-size: 13px;
  margin-top: 15px;
}
.hundred-labels strong {
  color: var(--round-ink);
}
.hundred-odds {
  border-top: 1px solid var(--round-outline);
  padding-top: 20px;
  margin-top: 32px;
}
.hundred-odds b {
  color: var(--arcade-gold);
  margin-left: 5px;
  font-size: 18px;
}
.arcade-page .ladder-select,
.arcade-page .ladder-goals {
  position: relative;
  display: block;
  padding: 0;
  height: 44px;
}
.arcade-page .ladder-start,
.arcade-page .ladder-goals > span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
}
.arcade-page .ladder-board {
  max-height: none;
  display: block;
}
.arcade-page .ladder-trace {
  animation: none;
}
.arcade-page .race-lane:disabled,
.arcade-page .ladder-start:disabled {
  opacity: 1;
}
.arcade-page .ladder-goals {
  margin-top: -8px;
}
.arcade-stage {
  position: relative;
}
.arcade-page .outcome-layer {
  position: absolute;
  inset: 70px 0 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 15;
  padding: 20px;
  isolation: isolate;
}
.arcade-page .outcome-layer > strong {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 36px;
  background: var(--round-surface);
  border-radius: 18px;
  box-shadow: 0 18px 50px var(--draw-shadow);
  line-height: 1.3;
  max-width: 100%;
  text-align: center;
}
.outcome-label {
  font-size: 17px;
  letter-spacing: 0.16em;
  color: var(--arcade-gold);
}
.outcome-label:empty {
  display: none;
}
.outcome-amount {
  font-size: clamp(32px, 6vw, 62px);
  font-weight: 650;
  white-space: nowrap;
  color: var(--round-ink);
  margin-block: 5px;
}
.outcome-amount small {
  font-size: 14px;
  font-weight: 500;
  margin-left: 7px;
}
.outcome-detail {
  font-size: 13px;
  color: var(--round-muted);
}
[data-outcome="win"] .outcome-amount {
  color: var(--arcade-gold);
}
[data-outcome="loss"] .outcome-amount {
  font-size: clamp(30px, 4vw, 44px);
}
.outcome-spark {
  position: absolute;
  top: 46%;
  left: 50%;
  width: 6px;
  height: 11px;
  border-radius: 2px;
  z-index: -1;
}
.arcade-board[data-game="dice"],
.arcade-board[data-game="under-over"],
.arcade-board[data-game="coin"],
.arcade-board[data-game="colors"],
.arcade-board[data-game="dice-range"] {
  min-height: 400px;
}
@media (max-width: 600px) {
  .round-dice-scene,
  .round-coin-scene {
    min-height: 240px;
  }
  .round-dice-scene {
    gap: 60px;
  }
  .round-die-space {
    scale: 0.85;
  }
  .round-scene-caption {
    min-height: 52px;
  }
  .round-scene-caption > strong {
    font-size: 28px;
  }
  .color-drop-machine {
    height: 290px;
  }
  .hundred-display {
    padding: 22px 0 34px;
    gap: 4px;
  }
  .hundred-digit b {
    font-size: clamp(40px, 13vw, 64px);
  }
  .hundred-odds {
    font-size: 11px;
    gap: 5px;
  }
  .hundred-odds b {
    font-size: 16px;
  }
  .round-wager,
  .round-cancel {
    grid-column: 1 / -1;
  }
  .arcade-board[data-game="dice"],
  .arcade-board[data-game="under-over"],
  .arcade-board[data-game="coin"],
  .arcade-board[data-game="colors"],
  .arcade-board[data-game="dice-range"] {
    min-height: 310px;
  }
  .arcade-page .badugi-hand {
    gap: 6px;
  }
  .arcade-page .hand-card .playing-card {
    width: 100%;
  }
  .arcade-page .hand-card {
    min-width: 0;
    flex: 1;
  }
  .arcade-page .card-trail .playing-card {
    width: 42px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hwatu-flight {
    display: none;
  }
  .arcade-page .playing-card {
    transition: opacity 100ms;
  }
}
