:root {
  --game-gold: #f0b92d;
  --game-gold-light: #ffe687;
  --game-ink: #141b27;
  --game-green: #086347;
  --game-red: #c82f49;
  --game-blue: #1d64bc;
  --game-ease: cubic-bezier(.22, .82, .22, 1);
}

/* Shared game-stage polish */
.game-view {
  --game-accent: var(--game-gold);
  isolation: isolate;
}

.game-view.active .machine {
  animation: gameMachineIn 420ms var(--game-ease) both;
}

.game-stage .game-layout {
  align-items: start;
}

.game-stage .machine {
  min-height: 620px;
  border-color: color-mix(in srgb, var(--game-accent) 36%, var(--line));
  box-shadow:
    0 24px 60px rgba(18, 28, 43, .1),
    0 2px 9px rgba(18, 28, 43, .06);
}

.game-stage .machine::after {
  position: absolute;
  inset: 5px 5px auto;
  height: 1px;
  content: "";
  background: rgba(255, 255, 255, .55);
  pointer-events: none;
}

.game-view .machine-head {
  position: relative;
  z-index: 8;
  min-height: 56px;
}

.game-view .machine-head h2 {
  font-size: 28px;
}

.game-view .eyebrow {
  margin-bottom: 5px;
  letter-spacing: 0;
}

.game-focus-button {
  position: absolute;
  z-index: 30;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(28, 37, 52, .18);
  border-radius: 7px;
  background: rgba(255, 255, 255, .88);
  color: #18202e;
  box-shadow: 0 8px 22px rgba(17, 26, 40, .12);
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.game-focus-button::before,
.game-focus-button::after {
  position: absolute;
  width: 9px;
  height: 9px;
  content: "";
}

.game-focus-button::before {
  inset: 10px auto auto 10px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  box-shadow: 11px 0 0 -1px transparent;
}

.game-focus-button::after {
  right: 10px;
  bottom: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.game-focus-button:hover {
  transform: translateY(-1px);
  border-color: var(--game-accent);
}

.game-view:not(.roulette-experience) .machine-head {
  padding-right: 50px;
}

.game-view.focus-mode {
  position: fixed;
  z-index: 110;
  inset: 0;
  display: block;
  overflow: auto;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background: #eef2f5;
}

.game-view.focus-mode .game-layout {
  grid-template-columns: minmax(0, 1fr) minmax(250px, 310px);
  width: min(1600px, 100%);
  min-height: calc(100dvh - 28px);
  margin: 0 auto;
  padding: 0;
}

.game-view.focus-mode .machine {
  min-height: calc(100dvh - 28px);
}

.game-view.focus-mode .game-focus-button {
  position: fixed;
  top: max(17px, env(safe-area-inset-top));
  right: max(17px, env(safe-area-inset-right));
}

.game-view.focus-mode .game-focus-button::before {
  transform: translate(3px, 3px) rotate(180deg);
}

.game-view.focus-mode .game-focus-button::after {
  transform: translate(-3px, -3px) rotate(180deg);
}

body.game-focus-open {
  overflow: hidden;
}

.round-flash {
  position: absolute;
  z-index: 16;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  font-size: 42px;
  font-weight: 950;
  opacity: 0;
  pointer-events: none;
}

.round-flash::before {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(8, 17, 28, .7);
  backdrop-filter: blur(4px);
}

.round-flash strong {
  position: relative;
  padding: 12px 24px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.round-flash.show {
  animation: roundFlash 1250ms var(--game-ease) both;
}

.machine.round-win {
  animation: machineWin 820ms var(--game-ease);
}

.machine.round-loss {
  animation: machineLoss 430ms ease;
}

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

@keyframes roundFlash {
  0%, 100% { opacity: 0; }
  12%, 62% { opacity: 1; }
}

@keyframes machineWin {
  0%, 100% { box-shadow: 0 24px 60px rgba(18, 28, 43, .1); }
  38% { box-shadow: 0 0 0 5px rgba(240, 185, 45, .34), 0 22px 72px rgba(240, 185, 45, .42); }
}

@keyframes machineLoss {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-4px); }
  65% { transform: translateX(4px); }
}

/* Scratch ticket */
#game-scratch {
  --game-accent: #0d9c70;
}

.scratch-machine {
  overflow: visible;
  background:
    linear-gradient(90deg, rgba(7, 125, 89, .045) 1px, transparent 1px),
    linear-gradient(rgba(7, 125, 89, .045) 1px, transparent 1px),
    #f9fbfc;
  background-size: 28px 28px;
}

.scratch-board {
  width: min(100%, 650px);
  aspect-ratio: 1.66;
  overflow: visible;
  border: 8px solid #fff;
  border-radius: 7px;
  background:
    radial-gradient(circle at 85% 18%, rgba(255, 255, 255, .9) 0 2px, transparent 3px),
    linear-gradient(128deg, #ffde6f 0 34%, #f1bc31 34% 46%, #17a87a 46% 100%);
  box-shadow:
    0 2px 0 #d0d7df,
    0 28px 50px rgba(19, 31, 44, .19);
  transform: rotate(-.4deg);
}

.scratch-board::before,
.scratch-board::after {
  position: absolute;
  z-index: 4;
  top: 12px;
  color: rgba(26, 36, 48, .64);
  font-size: 10px;
  font-weight: 950;
  pointer-events: none;
}

.scratch-board::before {
  left: 15px;
  content: "YA INSTANT";
}

.scratch-board::after {
  right: 15px;
  content: attr(data-ticket-id);
}

.scratch-board canvas {
  z-index: 2;
  border-radius: 2px;
  filter: drop-shadow(0 2px 1px rgba(26, 35, 46, .2));
}

.prize-layer {
  z-index: 1;
  inset: 30px;
  border: 2px dashed rgba(8, 94, 67, .45);
  background: rgba(255, 255, 255, .92);
}

.prize-layer span {
  color: #132034;
  text-shadow: 0 2px #fff;
}

.scratch-progress {
  position: absolute;
  z-index: 5;
  right: 10px;
  bottom: -31px;
  left: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
  height: 18px;
  color: #405064;
  font-size: 10px;
}

.scratch-progress::before {
  grid-column: 1;
  grid-row: 1;
  height: 6px;
  border-radius: 4px;
  background: #dbe2e8;
  content: "";
}

.scratch-progress span {
  grid-column: 1;
  grid-row: 1;
  width: 0;
  height: 6px;
  border-radius: 4px;
  background: #0b9f70;
  box-shadow: 0 0 14px rgba(11, 159, 112, .4);
  transition: width 100ms linear;
}

.scratch-progress b {
  grid-column: 2;
  grid-row: 1;
}

.scratch-machine .action-row {
  justify-content: center;
  margin-top: 42px;
}

.scratch-shaving {
  position: fixed;
  z-index: 120;
  width: 4px;
  height: 2px;
  border-radius: 50%;
  background: #aeb7c1;
  pointer-events: none;
  animation: shavingFall 500ms ease-out forwards;
}

@keyframes shavingFall {
  to { transform: translate(var(--sx), var(--sy)) rotate(250deg); opacity: 0; }
}

/* Blackjack */
#game-twentyone {
  --game-accent: #e7b63b;
}

.felt-machine {
  background:
    radial-gradient(circle at 50% 45%, rgba(47, 162, 118, .18), transparent 48%),
    #075840;
}

.blackjack-table {
  min-height: 470px;
  padding: 32px 24px 24px;
  border-width: 7px;
  border-color: #c69832;
  border-bottom-color: #825c18;
  background:
    radial-gradient(circle at 50% 34%, rgba(32, 151, 105, .55), transparent 48%),
    #064b38;
  box-shadow:
    inset 0 0 0 2px rgba(255, 241, 178, .52),
    inset 0 0 70px rgba(0, 0, 0, .2),
    0 20px 30px rgba(0, 22, 15, .2);
}

.blackjack-table::before {
  position: absolute;
  inset: 54px 12% 58px;
  border: 2px solid rgba(242, 217, 147, .29);
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
  content: "";
}

.table-shoe {
  position: absolute;
  z-index: 4;
  top: 19px;
  right: 24px;
  display: grid;
  width: 62px;
  height: 76px;
  place-items: end center;
  padding-bottom: 7px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: #142031;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .25);
  transform: skewY(-4deg);
}

.table-shoe i {
  position: absolute;
  top: 7px;
  width: 44px;
  height: 48px;
  border: 2px solid #fff;
  background: repeating-linear-gradient(45deg, #243a5a 0 5px, #dcb039 5px 7px);
}

.table-shoe i:nth-child(2) { transform: translateY(-3px); }
.table-shoe i:nth-child(3) { transform: translateY(-6px); }

.table-shoe span {
  position: relative;
  color: #fff;
  font-size: 8px;
  font-style: normal;
  font-weight: 900;
}

.blackjack-table .casino-hand {
  position: relative;
  z-index: 3;
  min-height: 126px;
}

.blackjack-table .casino-card {
  width: 82px;
  transform-origin: 50% 130%;
  animation-delay: calc(var(--deal-index, 0) * 45ms);
}

.blackjack-table .casino-card:nth-child(2) { transform: rotate(2deg); }
.blackjack-table .casino-card:nth-child(3) { transform: rotate(4deg); }
.blackjack-table .casino-card:nth-child(4) { transform: rotate(6deg); }
.blackjack-table .casino-card:nth-child(5) { transform: rotate(8deg); }

.blackjack-table .table-score {
  z-index: 3;
}

.blackjack-table .table-score strong {
  min-width: 56px;
  background: rgba(0, 0, 0, .18);
  box-shadow: 0 0 18px rgba(243, 203, 94, .12);
}

.table-chip-stack {
  position: absolute;
  right: 24px;
  bottom: 20px;
  width: 54px;
  height: 45px;
}

.table-chip-stack i {
  position: absolute;
  right: 0;
  bottom: var(--chip-y);
  width: 46px;
  height: 13px;
  border: 3px dashed #fff;
  border-radius: 50%;
  background: var(--chip-color);
  box-shadow: 0 2px 2px rgba(0, 0, 0, .25);
}

/* Baccarat */
#game-baccarat {
  --game-accent: #46a3e6;
}

.baccarat-machine {
  background:
    radial-gradient(circle at 20% 45%, rgba(56, 137, 213, .2), transparent 34%),
    radial-gradient(circle at 80% 45%, rgba(212, 48, 72, .2), transparent 34%),
    #07543e;
}

.baccarat-table {
  position: relative;
  min-height: 380px;
  border-width: 5px;
  border-color: #c79b36;
  background:
    linear-gradient(90deg, rgba(35, 121, 206, .15) 0 49.8%, rgba(255, 255, 255, .15) 49.8% 50.2%, rgba(206, 45, 70, .15) 50.2%),
    #064936;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, .22), 0 18px 30px rgba(0, 24, 17, .18);
}

.baccarat-side::before {
  color: rgba(255, 255, 255, .08);
  font-size: 60px;
  font-weight: 950;
  pointer-events: none;
}

.baccarat-side.player-side::before { content: "P"; }
.baccarat-side.banker-side::before { content: "B"; }

.baccarat-center {
  position: relative;
  z-index: 3;
  width: 108px;
  min-height: 108px;
  border: 2px solid #e1ba5c;
  background: rgba(0, 0, 0, .15);
  box-shadow: 0 0 24px rgba(225, 186, 92, .2);
}

.baccarat-road {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, 18px);
  grid-auto-columns: 18px;
  gap: 4px;
  min-height: 46px;
  margin: 10px 0;
  overflow: hidden;
  padding: 3px 6px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .08);
}

.baccarat-road span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 7px;
  font-weight: 950;
}

.baccarat-road:empty::before {
  grid-row: 1 / span 2;
  align-self: center;
  color: rgba(255, 255, 255, .58);
  content: "BIG ROAD · 結果をここへ記録";
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.baccarat-road .player { color: #7dc3ff; }
.baccarat-road .banker { color: #ff8798; }
.baccarat-road .tie { color: #80dfad; }

/* Sic Bo */
#game-sicbo {
  --game-accent: #ce344d;
}

.sicbo-machine {
  background:
    linear-gradient(90deg, rgba(200, 47, 73, .035) 1px, transparent 1px),
    #fcfdfe;
  background-size: 26px 26px;
}

.dice-dome {
  position: relative;
  isolation: isolate;
  min-height: 280px;
  padding: 96px 26px 54px;
  overflow: hidden;
  border: 0;
  border-radius: 160px 160px 14px 14px;
  background:
    radial-gradient(ellipse at 50% 75%, rgba(255, 255, 255, .98) 0 28%, rgba(194, 206, 218, .7) 70%, rgba(98, 113, 130, .6)),
    #e2e9ee;
  box-shadow:
    inset 0 18px 30px rgba(255, 255, 255, .9),
    inset 0 -18px 35px rgba(48, 61, 76, .18),
    0 16px 28px rgba(25, 35, 47, .14);
  perspective: 800px;
}

.dome-glass {
  position: absolute;
  z-index: -1;
  inset: 6px 5% 22px;
  border: 2px solid rgba(255, 255, 255, .75);
  border-bottom-color: rgba(113, 132, 151, .32);
  border-radius: 50% 50% 18px 18px;
  background: linear-gradient(115deg, rgba(255, 255, 255, .58), transparent 28% 70%, rgba(255, 255, 255, .3));
  box-shadow: inset 20px 0 30px rgba(255, 255, 255, .3);
}

.dice-floor-ring {
  position: absolute;
  z-index: -1;
  right: 8%;
  bottom: 22px;
  left: 8%;
  height: 82px;
  border: 8px solid #d2a22c;
  border-radius: 50%;
  background: #143a31;
  box-shadow: inset 0 12px 20px rgba(0, 0, 0, .35);
  transform: rotateX(62deg);
}

.dice-dome .die {
  position: relative;
  z-index: 2;
  width: 90px;
  height: 90px;
  border-radius: 17px;
  box-shadow:
    inset -10px -12px 18px rgba(39, 48, 61, .12),
    inset 6px 7px 10px #fff,
    0 22px 22px rgba(17, 28, 39, .28);
  transform: rotateX(14deg) rotateY(-10deg);
}

.dice-dome .die:nth-of-type(4) { transform: rotateX(16deg) rotateY(12deg) rotateZ(5deg); }
.dice-dome .die:nth-of-type(5) { transform: rotateX(10deg) rotateY(-18deg) rotateZ(-7deg); }

.dice-dome.shaking {
  animation: domeShake 640ms ease-in-out;
}

.dice-dome .die.rolling {
  animation: proDiceRoll 720ms var(--game-ease);
}

@keyframes domeShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

@keyframes proDiceRoll {
  0% { transform: translate3d(0, 0, 0) rotateX(0) rotateY(0); }
  38% { transform: translate3d(18px, -58px, 20px) rotateX(380deg) rotateY(240deg); }
  72% { transform: translate3d(-7px, 4px, 0) rotateX(620deg) rotateY(520deg); }
  100% { transform: translate3d(0, 0, 0) rotateX(720deg) rotateY(720deg); }
}

/* Video poker cabinet */
#game-videopoker {
  --game-accent: #e7b63b;
}

.video-poker-machine {
  border: 9px solid #273249;
  background:
    linear-gradient(rgba(255, 255, 255, .025) 50%, transparent 50%),
    #101827;
  background-size: 100% 4px;
  box-shadow:
    inset 0 0 0 2px #e3b43d,
    inset 0 0 70px rgba(18, 105, 187, .15),
    0 25px 55px rgba(14, 22, 35, .22);
}

.video-poker-machine .machine-head {
  padding: 12px 66px 12px 12px;
  border: 1px solid rgba(95, 181, 255, .25);
  background: rgba(8, 19, 34, .72);
}

.poker-credit-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 34px;
  margin: -6px 0 12px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  color: #6dd4ff;
  font-size: 10px;
  font-weight: 900;
}

.poker-credit-strip strong {
  color: #ffe38b;
  text-align: center;
}

.poker-status {
  color: #ffe179;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 16px;
  text-shadow: 0 0 12px rgba(255, 218, 93, .38);
}

.poker-hand {
  padding: 16px;
  border: 1px solid rgba(96, 184, 255, .22);
  background: rgba(5, 12, 23, .6);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, .45);
}

.poker-card {
  transition: transform 180ms var(--game-ease), filter 180ms;
}

.poker-card:not(:disabled):hover {
  transform: translateY(-6px);
}

.poker-card.held {
  transform: translateY(-9px);
  box-shadow: 0 0 0 2px #e6b739, 0 0 24px rgba(230, 183, 57, .34);
}

.paytable div.paytable-hit {
  background: #fff0b3;
  color: #463300;
  animation: paytableHit 720ms ease both;
}

@keyframes paytableHit {
  50% { box-shadow: inset 0 0 0 2px #d59d00, 0 0 20px rgba(213, 157, 0, .25); }
}

/* Normal slot cabinet */
#game-slots,
#game-skillslots {
  --game-accent: #f4c33f;
}

.slot-machine,
.skill-slot-machine {
  border: 8px solid #6c1f32;
  background:
    linear-gradient(90deg, transparent 49%, rgba(255, 255, 255, .04) 50%, transparent 51%),
    #711f35;
  box-shadow:
    inset 0 0 0 2px #e5b63b,
    inset 0 0 70px rgba(39, 0, 10, .35),
    0 24px 48px rgba(49, 10, 20, .22);
}

.slot-window,
.skill-slot-window {
  overflow: hidden;
  border-width: 8px;
  border-color: #d39e22;
  border-radius: 7px;
  background: #fff4bf;
  box-shadow:
    inset 0 0 0 3px #67410a,
    inset 0 18px 24px rgba(79, 43, 0, .14),
    0 18px 34px rgba(39, 0, 10, .34);
}

.slot-window::before,
.slot-window::after,
.skill-slot-window::before,
.skill-slot-window::after {
  position: absolute;
  z-index: 4;
  right: 0;
  left: 0;
  height: 36px;
  content: "";
  pointer-events: none;
}

.slot-window::before,
.skill-slot-window::before {
  top: 0;
  background: linear-gradient(#4f350eaa, transparent);
}

.slot-window::after,
.skill-slot-window::after {
  bottom: 0;
  background: linear-gradient(transparent, #4f350eaa);
}

.slot-reel {
  position: relative;
  background: #fff;
  box-shadow: inset 8px 0 14px rgba(21, 26, 34, .08), inset -8px 0 14px rgba(21, 26, 34, .08);
}

.slot-cell,
.skill-cell {
  text-shadow: 0 2px 0 #fff, 0 5px 8px rgba(35, 26, 10, .18);
}

.slot-cell[data-symbol="YA"],
.skill-cell[data-symbol="YA"] { color: #116b52; }
.slot-cell[data-symbol="7"],
.skill-cell[data-symbol="7"] { color: #c72f49; }
.slot-cell[data-symbol="★"],
.skill-cell[data-symbol="★"] { color: #d69d0e; }
.slot-cell[data-symbol="吉"],
.skill-cell[data-symbol="吉"] { color: #185cac; }
.slot-cell[data-symbol="◆"],
.skill-cell[data-symbol="◆"] { color: #913eb1; }
.slot-cell[data-symbol="●"],
.skill-cell[data-symbol="●"] { color: #1c2635; }

.slot-reel.spinning {
  filter: saturate(.85);
}

.slot-reel.spinning .slot-cell {
  animation: proReelBlur 90ms linear infinite;
}

.slot-reel.reel-stopped {
  animation: reelStopBounce 300ms var(--game-ease);
}

.slot-window.win .payline:not(.active) {
  opacity: 0;
}

.slot-window.win .payline.active {
  height: 4px;
  opacity: 1;
  box-shadow: 0 0 15px rgba(216, 48, 77, .85);
}

.reel-stop-lamps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: min(100%, 650px);
  margin: -5px auto 10px;
  padding: 0 22px;
}

.reel-stop-lamps span {
  height: 5px;
  border-radius: 4px;
  background: #492432;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5);
}

.reel-stop-lamps span.on {
  background: #ffe574;
  box-shadow: 0 0 15px rgba(255, 229, 116, .7);
}

@keyframes proReelBlur {
  50% { transform: translateY(16px) scaleY(1.08); filter: blur(2.5px); }
}

@keyframes reelStopBounce {
  0% { transform: translateY(-12px); }
  55% { transform: translateY(7px); }
  100% { transform: translateY(0); }
}

/* Skill stop slot */
.skill-slot-machine {
  color: #fff;
  background:
    radial-gradient(circle at 50% 0, rgba(54, 185, 238, .2), transparent 42%),
    #151d31;
  border-color: #202c47;
}

.skill-slot-machine::before {
  background: linear-gradient(90deg, #55cfff, #f1bf39, #ed5573);
}

.skill-slot-machine .eyebrow {
  color: #78dcff;
}

.skill-slot-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 auto 10px;
  color: rgba(255, 255, 255, .65);
  font-size: 11px;
  font-weight: 900;
}

.skill-slot-topline strong {
  color: #ffe27b;
}

.skill-slot-window {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 650px;
  margin: 0 auto 14px;
  padding: 14px;
}

.skill-reel {
  display: grid;
  grid-template-rows: repeat(3, 88px);
  overflow: hidden;
  border: 1px solid #c6b46b;
  background: #fff;
  box-shadow: inset 8px 0 15px rgba(18, 26, 39, .12), inset -8px 0 15px rgba(18, 26, 39, .12);
}

.skill-cell {
  display: grid;
  place-items: center;
  border-bottom: 1px solid #dfd9bf;
  color: #18202d;
  font-size: 36px;
  font-weight: 950;
}

.skill-reel.running .skill-cell {
  animation: skillReelRun 72ms linear infinite;
}

.skill-reel.stopping {
  animation: skillStop 360ms var(--game-ease);
}

.skill-payline {
  position: absolute;
  z-index: 7;
  top: 50%;
  right: 7px;
  left: 7px;
  height: 3px;
  background: #ef425f;
  box-shadow: 0 0 12px rgba(239, 66, 95, .75);
  transform: translateY(-50%);
  pointer-events: none;
}

.skill-stop-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  max-width: 650px;
  margin: 0 auto 12px;
}

.skill-stop-controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 58px;
  border: 2px solid #bd344e;
  border-bottom-width: 7px;
  border-radius: 7px;
  background: #f6506d;
  color: #fff;
  cursor: pointer;
}

.skill-stop-controls button span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 50%;
  font-size: 10px;
}

.skill-stop-controls button:active:not(:disabled) {
  transform: translateY(4px);
  border-bottom-width: 3px;
}

.skill-stop-controls button:disabled {
  border-color: #3a465b;
  background: #2b3548;
  color: #718097;
}

.skill-lever {
  position: relative;
  max-width: 650px;
  min-height: 58px;
  margin: 0 auto;
  overflow: visible;
}

.lever-knob {
  position: absolute;
  top: 50%;
  left: 24px;
  width: 20px;
  height: 20px;
  border: 5px solid #9c1f35;
  border-radius: 50%;
  background: #ec425e;
  box-shadow: 0 -20px 0 -7px #c1c8d0;
  transform: translateY(-50%);
}

.skill-slot-machine.running .lever-knob {
  animation: leverPull 420ms var(--game-ease);
}

.skill-slot-window.win {
  animation: skillWindowWin 900ms var(--game-ease);
}

@keyframes skillReelRun {
  50% { transform: translateY(22px); filter: blur(2px); }
}

@keyframes skillStop {
  0% { transform: translateY(-18px); }
  60% { transform: translateY(9px); }
  100% { transform: translateY(0); }
}

@keyframes leverPull {
  45% { transform: translateY(6px) rotate(15deg); }
}

@keyframes skillWindowWin {
  45% { box-shadow: inset 0 0 0 3px #67410a, 0 0 32px rgba(255, 224, 96, .75); }
}

/* Coin */
#game-coin {
  --game-accent: #d8a51f;
}

#coinMachine {
  background:
    radial-gradient(circle at 32% 45%, rgba(241, 194, 64, .16), transparent 35%),
    #f9fbfd;
}

.coin-stage {
  min-height: 380px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, .75), rgba(255, 255, 255, .35)),
    repeating-linear-gradient(0deg, #dfe6ec 0 1px, transparent 1px 25px),
    #e9eef2;
  perspective: 1000px;
}

.coin-flight {
  position: relative;
  display: grid;
  min-height: 250px;
  place-items: center;
  transform-style: preserve-3d;
}

.coin {
  position: relative;
  z-index: 2;
  border: 0;
  background: transparent;
  box-shadow: none;
  transform-style: preserve-3d;
}

.coin-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 13px solid #c88f18;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, #fff2ac, #f0bd39 44%, #c78915 76%, #7d5108);
  box-shadow:
    inset 0 0 0 6px #ffe78a,
    inset 0 0 25px rgba(84, 48, 0, .3),
    0 22px 32px rgba(21, 29, 40, .23);
  backface-visibility: hidden;
}

.coin-face::before {
  position: absolute;
  inset: 16px;
  border: 2px dashed rgba(91, 54, 0, .42);
  border-radius: 50%;
  content: "";
}

.coin-back {
  transform: rotateY(180deg);
}

.coin-shadow {
  position: absolute;
  z-index: 1;
  bottom: 14px;
  width: 160px;
  height: 24px;
  border-radius: 50%;
  background: rgba(23, 31, 42, .22);
  filter: blur(8px);
}

.coin.flip {
  animation: proCoinFlip 920ms cubic-bezier(.16, .74, .21, 1);
}

.coin.result-heads {
  transform: rotateY(0);
}

.coin.result-tails {
  transform: rotateY(180deg);
}

.coin-flight.flipping .coin-shadow {
  animation: coinShadow 920ms ease;
}

.coin-ladder {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 5px;
  margin: 10px 0 14px;
}

.coin-ladder span {
  display: grid;
  min-width: 0;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  color: #738093;
  font-size: 11px;
  font-weight: 950;
}

.coin-ladder span.active {
  border-color: #d39c11;
  background: #fff0b3;
  color: #5e4300;
  box-shadow: 0 0 15px rgba(211, 156, 17, .3);
}

@keyframes proCoinFlip {
  0% { transform: translateY(0) rotateY(0) rotateX(10deg); }
  46% { transform: translateY(-120px) rotateY(1260deg) rotateX(24deg); }
  78% { transform: translateY(-22px) rotateY(1980deg) rotateX(8deg); }
  100% { transform: translateY(0) rotateY(2160deg) rotateX(0); }
}

@keyframes coinShadow {
  45% { transform: scale(.42); opacity: .3; filter: blur(14px); }
}

/* High-low */
#game-highlow {
  --game-accent: #246dc7;
}

.highlow-machine {
  background:
    linear-gradient(90deg, rgba(37, 105, 188, .045) 1px, transparent 1px),
    #f9fbfd;
  background-size: 30px 30px;
}

.highlow-table {
  min-height: 420px;
  border: 6px solid #bc8d2d;
  background:
    radial-gradient(circle at 50% 45%, rgba(26, 143, 101, .36), transparent 55%),
    #07553f;
  box-shadow: inset 0 0 0 2px #f2d17b, inset 0 0 55px rgba(0, 0, 0, .2);
}

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

.deck-zone small {
  color: rgba(255, 255, 255, .6);
  font-size: 8px;
  font-weight: 900;
}

.highlow-table .casino-card {
  width: 160px;
  box-shadow: 0 18px 32px rgba(0, 0, 0, .3);
}

.highlow-arrow {
  display: grid;
  gap: 2px;
  color: rgba(255, 255, 255, .7);
  text-align: center;
}

.highlow-arrow span {
  font-size: 9px;
  font-weight: 900;
}

.highlow-arrow b {
  color: #f1c54c;
  font-size: 35px;
}

.highlow-run {
  display: flex;
  gap: 6px;
  min-height: 52px;
  margin: 10px 0;
  overflow: hidden;
  padding: 6px;
  border: 1px solid var(--line);
  background: #eef2f5;
}

.highlow-run span {
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid #cad2dc;
  background: #fff;
  font-size: 13px;
  font-weight: 950;
  animation: cardHistoryIn 240ms var(--game-ease);
}

.highlow-run span.red { color: #c82f49; }

@keyframes cardHistoryIn {
  from { transform: translateX(24px); opacity: 0; }
}

/* Lotto */
#game-lotto {
  --game-accent: #1d6fb8;
}

.lotto-machine {
  background:
    radial-gradient(circle at 70% 18%, rgba(44, 126, 195, .12), transparent 30%),
    #fbfcfe;
}

.lotto-draw {
  position: relative;
  isolation: isolate;
  min-height: 210px;
  overflow: hidden;
  padding-top: 102px;
  border: 1px solid #cbd6e0;
  background:
    linear-gradient(rgba(255, 255, 255, .72), rgba(224, 235, 243, .85)),
    #e7eff5;
  box-shadow: inset 0 -18px 28px rgba(50, 72, 92, .1);
}

.lotto-chamber {
  position: absolute;
  z-index: -1;
  top: 12px;
  left: 50%;
  width: 180px;
  height: 125px;
  border: 4px solid rgba(135, 158, 180, .52);
  border-radius: 50% 50% 45% 45%;
  background: rgba(255, 255, 255, .45);
  box-shadow: inset 0 0 28px rgba(80, 112, 140, .16);
  transform: translateX(-50%);
}

.lotto-chamber::after {
  position: absolute;
  right: 51px;
  bottom: -35px;
  width: 70px;
  height: 38px;
  border: 4px solid rgba(135, 158, 180, .52);
  border-top: 0;
  content: "";
}

.lotto-chamber span {
  position: absolute;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--ball-color, #efc442);
  box-shadow: inset -5px -7px 8px rgba(54, 37, 0, .16), 0 4px 8px rgba(33, 49, 64, .16);
}

.lotto-chamber span:nth-child(1) { --ball-color: #e84d67; left: 25px; bottom: 17px; }
.lotto-chamber span:nth-child(2) { --ball-color: #58b985; left: 55px; bottom: 11px; }
.lotto-chamber span:nth-child(3) { --ball-color: #4c9bd5; left: 88px; bottom: 19px; }
.lotto-chamber span:nth-child(4) { --ball-color: #efc442; left: 116px; bottom: 10px; }
.lotto-chamber span:nth-child(5) { --ball-color: #9c6bd0; left: 42px; bottom: 42px; }
.lotto-chamber span:nth-child(6) { --ball-color: #eb8050; left: 102px; bottom: 42px; }

.lotto-draw.drawing .lotto-chamber span {
  animation: lottoTumble 650ms linear infinite alternate;
  animation-delay: calc(var(--i, 0) * -90ms);
}

.lotto-draw .draw-ball {
  position: relative;
  z-index: 2;
  box-shadow:
    inset -8px -10px 12px rgba(34, 45, 58, .16),
    inset 5px 6px 8px rgba(255, 255, 255, .7),
    0 10px 18px rgba(31, 47, 63, .14);
}

.lotto-draw .draw-ball.revealed {
  animation: lottoBallOut 520ms var(--game-ease) both;
}

@keyframes lottoTumble {
  to { transform: translate(24px, -40px) rotate(180deg); }
}

@keyframes lottoBallOut {
  from { transform: translateY(-80px) scale(.4) rotate(-160deg); opacity: 0; }
}

/* Desktop game selector stays a readable cabinet rail. */
@media (min-width: 981px) {
  .game-picker {
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }

  .game-chip {
    min-width: 0;
    min-height: 64px;
  }

  .game-chip.active {
    transform: translateY(-3px);
    box-shadow: 0 9px 18px rgba(21, 31, 44, .12);
  }

  .game-view.focus-mode .blackjack-table,
  .game-view.focus-mode .baccarat-table,
  .game-view.focus-mode .highlow-table {
    min-height: 620px;
  }

  .game-view.focus-mode .dice-dome {
    min-height: 440px;
  }

  .game-view.focus-mode .slot-window,
  .game-view.focus-mode .skill-slot-window {
    max-width: 860px;
  }

  .game-view.focus-mode .slot-reel,
  .game-view.focus-mode .skill-reel {
    grid-template-rows: repeat(3, 125px);
  }
}

@media (max-width: 980px) {
  .game-view.focus-mode .game-layout {
    grid-template-columns: 1fr;
  }

  .game-view.focus-mode .side-panel {
    display: block;
  }

  .game-view.focus-mode .machine {
    min-height: auto;
  }
}

@media (max-width: 900px) {
  .casino-shell.experience-view.active {
    display: block !important;
  }
}

@media (max-width: 700px) {
  .game-stage .machine {
    min-height: 0;
    padding: 14px;
  }

  .game-view .machine-head {
    min-height: 48px;
    padding-right: 44px;
  }

  .game-view:not(.roulette-experience) .machine-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .game-view:not(.roulette-experience) .machine-head > :not(:first-child) {
    justify-self: end;
  }

  .game-view .machine-head h2 {
    font-size: 21px;
    white-space: nowrap;
  }

  .game-focus-button {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
  }

  .scratch-board {
    border-width: 5px;
    transform: none;
  }

  .prize-layer {
    inset: 20px;
  }

  .prize-layer span {
    font-size: 48px;
  }

  .blackjack-table {
    min-height: 410px;
    padding-right: 8px;
    padding-left: 8px;
    border-width: 5px;
    border-radius: 100px 100px 7px 7px;
  }

  .blackjack-table .casino-card {
    width: 68px;
  }

  .table-shoe {
    width: 48px;
    height: 62px;
    right: 10px;
  }

  .table-shoe i {
    width: 32px;
    height: 37px;
  }

  .baccarat-table {
    min-height: 390px;
    padding: 28px 4px;
    border-radius: 90px 90px 7px 7px;
  }

  .baccarat-center {
    width: 62px;
    min-height: 62px;
    font-size: 8px;
  }

  .baccarat-table .compact-hand .casino-card {
    width: 52px;
  }

  .dice-dome {
    min-height: 220px;
    gap: 9px;
    padding: 75px 13px 42px;
  }

  .dice-dome .die {
    width: 67px;
    height: 67px;
    padding: 9px;
    border-radius: 13px;
  }

  .dice-dome .pip {
    width: 9px;
    height: 9px;
  }

  .poker-hand {
    gap: 5px;
    margin-right: -8px;
    margin-left: -8px;
    padding: 7px;
  }

  .poker-card .casino-card {
    min-height: 112px;
  }

  .slot-window,
  .skill-slot-window {
    gap: 4px;
    padding: 8px;
    border-width: 5px;
  }

  .slot-reel,
  .skill-reel {
    grid-template-rows: repeat(3, 70px);
  }

  .slot-cell,
  .skill-cell {
    font-size: 27px;
  }

  .skill-stop-controls button {
    min-height: 52px;
  }

  .coin-stage {
    grid-template-columns: 1fr;
    gap: 4px;
    min-height: 430px;
  }

  .coin-flight {
    min-height: 240px;
  }

  .coin-status {
    justify-items: center;
  }

  .coin-status strong {
    font-size: 42px;
  }

  .coin-ladder {
    grid-template-columns: repeat(4, 1fr);
  }

  .highlow-table {
    grid-template-columns: 80px 44px minmax(100px, 140px);
    gap: 9px;
    min-height: 330px;
    padding: 18px 8px;
    border-width: 5px;
  }

  .highlow-table .deck {
    width: 76px;
  }

  .highlow-table .casino-card {
    width: 118px;
  }

  .lotto-draw {
    min-height: 190px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-view.active .machine,
  .machine.round-win,
  .machine.round-loss,
  .dice-dome.shaking,
  .dice-dome .die.rolling,
  .coin.flip,
  .coin-flight.flipping .coin-shadow,
  .skill-slot-machine.running .lever-knob,
  .lotto-draw.drawing .lotto-chamber span {
    animation: none !important;
  }
}
