:root {
  color-scheme: dark;
  --black: #030201;
  --ink: #0a0704;
  --wine: #45100d;
  --red: #7d1b14;
  --red-bright: #c34227;
  --gold: #d9a63a;
  --gold-bright: #ffe097;
  --gold-deep: #7b4a0e;
  --ivory: #fff7df;
  --green: #82f12f;
  --cyan: #56f4de;
  --muted: #aaa394;
  --safe-top: max(12px, env(safe-area-inset-top));
  --safe-bottom: max(12px, env(safe-area-inset-bottom));
  --font-display: "Arial Narrow", "Roboto Condensed", "DIN Condensed", Impact, sans-serif;
  --font-body: Inter, Montserrat, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  overflow: hidden;
  background: #050302;
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  background: #050302;
  color: var(--ivory);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

button,
a {
  color: inherit;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

button {
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.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;
}

.skip-link {
  position: fixed;
  top: 7px;
  left: 7px;
  z-index: 200;
  padding: 9px 12px;
  border-radius: 5px;
  background: var(--ivory);
  color: var(--black);
  transform: translateY(-145%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.casino-hall {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(141, 31, 17, 0.25), transparent 32%),
    linear-gradient(90deg, #020201, #110906 28%, #1c0b07 50%, #110906 72%, #020201);
  pointer-events: none;
}

.casino-hall::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.82), transparent 21%, transparent 79%, rgba(0, 0, 0, 0.82)),
    radial-gradient(ellipse at center, transparent 26%, rgba(0, 0, 0, 0.48) 75%, rgba(0, 0, 0, 0.92));
  z-index: 5;
}

.casino-hall__ceiling {
  position: absolute;
  top: -8%;
  left: 50%;
  width: min(1100px, 150vw);
  height: 42%;
  background:
    repeating-linear-gradient(90deg, transparent 0 11%, rgba(255, 214, 128, 0.08) 11.2% 11.5%),
    linear-gradient(to bottom, #080402, rgba(30, 11, 6, 0.85), transparent);
  clip-path: polygon(6% 0, 94% 0, 72% 100%, 28% 100%);
  transform: translateX(-50%);
  filter: blur(1px);
}

.casino-hall__machine {
  position: absolute;
  top: 17%;
  width: clamp(100px, 18vw, 210px);
  height: 57%;
  border: 3px solid rgba(167, 106, 31, 0.35);
  border-radius: 35% 35% 8% 8%;
  background:
    radial-gradient(ellipse at 50% 11%, rgba(255, 198, 79, 0.58) 0 2%, transparent 3%),
    linear-gradient(160deg, rgba(92, 25, 15, 0.88), rgba(9, 5, 3, 0.93));
  box-shadow:
    0 0 35px rgba(214, 75, 29, 0.18),
    inset 0 0 24px rgba(255, 177, 62, 0.08);
  opacity: 0.38;
  filter: blur(3px);
}

.casino-hall__machine::before {
  content: "";
  position: absolute;
  top: 22%;
  left: 10%;
  width: 80%;
  height: 26%;
  border: 2px solid rgba(255, 196, 84, 0.45);
  border-radius: 7px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 220, 139, 0.28) 0 2px, transparent 2px 30%),
    #120b07;
}

.casino-hall__machine i,
.casino-hall__machine span,
.casino-hall__machine b {
  position: absolute;
  bottom: 13%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f3ba41;
  box-shadow: 0 0 15px #f37022;
}

.casino-hall__machine i { left: 26%; }
.casino-hall__machine span { left: 48%; background: #59e5cd; }
.casino-hall__machine b { right: 25%; }

.casino-hall__machine--left {
  left: -3%;
  transform: perspective(620px) rotateY(24deg) scale(1.04);
}

.casino-hall__machine--right {
  right: -3%;
  transform: perspective(620px) rotateY(-24deg) scale(1.04);
}

.casino-hall__bokeh {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffc85e;
  box-shadow:
    62px 42px 14px #b8321f,
    124px -16px 18px #4ee7d0,
    190px 55px 13px #e8b349,
    251px 4px 18px #a92618,
    314px 63px 16px #ecc16f;
  opacity: 0.35;
  filter: blur(5px);
}

.casino-hall__bokeh--one {
  top: 15%;
  left: 5%;
}

.casino-hall__bokeh--two {
  top: 23%;
  right: 7%;
  transform: rotate(170deg);
}

.casino-hall__smoke {
  position: absolute;
  right: -15%;
  bottom: 0;
  width: 80%;
  height: 28%;
  border-radius: 50%;
  background: rgba(233, 213, 172, 0.045);
  filter: blur(45px);
  animation: smoke-drift 13s ease-in-out infinite alternate;
}

.casino-hall__floor {
  position: absolute;
  right: -15%;
  bottom: -22%;
  left: -15%;
  height: 50%;
  background:
    linear-gradient(90deg, transparent 49.7%, rgba(240, 169, 53, 0.09) 50%, transparent 50.3%),
    repeating-linear-gradient(104deg, transparent 0 12%, rgba(231, 166, 59, 0.055) 12.2% 12.5%),
    linear-gradient(to bottom, rgba(87, 31, 17, 0.25), #030201 65%);
  transform: perspective(320px) rotateX(52deg);
  transform-origin: top;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: var(--safe-top) clamp(12px, 4vw, 34px) 6px;
  background: linear-gradient(to bottom, rgba(3, 2, 1, 0.76), transparent);
  pointer-events: none;
}

.topbar > * {
  pointer-events: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ivory);
  text-decoration: none;
}

.brand__monogram {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 1px solid rgba(255, 218, 137, 0.6);
  border-radius: 5px;
  background: linear-gradient(145deg, #7d1a13, #240705);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.4);
  color: var(--gold-bright);
  font: italic 900 16px/1 Georgia, serif;
}

.brand__name {
  font: 700 11px/1 var(--font-display);
  letter-spacing: 0.18em;
}

.sound-toggle {
  display: inline-flex;
  min-width: 42px;
  min-height: 37px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 224, 151, 0.22);
  border-radius: 6px;
  background: rgba(9, 5, 3, 0.68);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.sound-toggle__waves {
  display: flex;
  height: 15px;
  align-items: end;
  gap: 2px;
}

.sound-toggle__waves i {
  display: block;
  width: 2px;
  height: 7px;
  border-radius: 2px;
  background: #777064;
}

.sound-toggle__waves i:nth-child(2) { height: 13px; }
.sound-toggle__waves i:nth-child(3) { height: 10px; }

.sound-toggle[aria-pressed="true"] .sound-toggle__waves i {
  background: var(--cyan);
  box-shadow: 0 0 7px rgba(86, 244, 222, 0.65);
  animation: sound-bar 0.7s ease-in-out infinite alternate;
}

.sound-toggle[aria-pressed="true"] .sound-toggle__waves i:nth-child(2) { animation-delay: -0.25s; }
.sound-toggle[aria-pressed="true"] .sound-toggle__waves i:nth-child(3) { animation-delay: -0.45s; }

.sound-toggle__label {
  color: #aaa396;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.experience {
  position: relative;
  z-index: 10;
  display: grid;
  width: 100%;
  height: 100dvh;
  place-items: center;
  padding:
    calc(var(--safe-top) + 36px)
    max(3px, env(safe-area-inset-right))
    var(--safe-bottom)
    max(3px, env(safe-area-inset-left));
}

.slot-machine {
  --lever-progress: 0;
  position: relative;
  width: min(98vw, 530px);
  height: clamp(585px, 78dvh, 780px);
  isolation: isolate;
}

.slot-machine__shadow {
  position: absolute;
  right: 3%;
  bottom: -2%;
  left: 0;
  height: 8%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.9);
  filter: blur(14px);
}

.machine-body {
  position: absolute;
  inset: 0 27px 0 8px;
  display: grid;
  grid-template-rows: 16.5% 41.5% 18% 20% 4%;
  overflow: hidden;
  border: 2px solid #8f5e1c;
  border-radius: 24% 24% 10% 10% / 9% 9% 4% 4%;
  background:
    linear-gradient(90deg, rgba(255, 216, 123, 0.16), transparent 5% 94%, rgba(0, 0, 0, 0.42)),
    linear-gradient(145deg, #6f170f 0%, #310805 35%, #64130d 64%, #1b0503 100%);
  box-shadow:
    0 24px 45px rgba(0, 0, 0, 0.72),
    inset 0 0 0 5px #160502,
    inset 0 0 0 7px rgba(230, 171, 67, 0.32),
    0 0 34px rgba(191, 51, 22, 0.16);
}

.machine-body::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 20;
  border-radius: inherit;
  background:
    linear-gradient(105deg, transparent 6%, rgba(255, 239, 191, 0.08) 9%, transparent 13%),
    radial-gradient(ellipse at 45% 3%, rgba(255, 199, 89, 0.15), transparent 22%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.machine-body__edge {
  position: absolute;
  top: 14%;
  bottom: 5%;
  z-index: 22;
  width: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2c1708, #e0aa43, #4d2b0d);
  pointer-events: none;
}

.machine-body__edge--left { left: 4px; }
.machine-body__edge--right { right: 4px; transform: scaleX(-1); }

.marquee {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid #6c410e;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.08), transparent 24%),
    radial-gradient(ellipse at center, #51120c, #190403 72%);
  clip-path: polygon(6% 0, 94% 0, 100% 100%, 0 100%);
  text-align: center;
}

.marquee::before,
.marquee::after {
  content: "";
  position: absolute;
  inset: 8px 11px;
  border: 1px solid rgba(255, 203, 90, 0.52);
  border-radius: 45% 45% 9px 9px / 20% 20% 9px 9px;
  box-shadow: inset 0 0 18px rgba(248, 177, 50, 0.12);
}

.marquee::after {
  inset: 12px 15px;
  border-color: rgba(58, 21, 7, 0.84);
}

.marquee p {
  position: relative;
  z-index: 2;
  margin: 2px 0 1px;
  color: #d5a442;
  font-size: clamp(5px, 1.5vw, 8px);
  font-weight: 900;
  letter-spacing: 0.29em;
}

.marquee h1 {
  position: relative;
  z-index: 2;
  margin: 0;
  color: var(--ivory);
  font: 500 clamp(24px, 7.2vw, 39px) / 0.93 var(--font-display);
  letter-spacing: 0.025em;
  text-shadow:
    0 2px #3f1904,
    0 0 14px rgba(255, 219, 135, 0.28);
}

.marquee h1 span {
  color: var(--gold-bright);
}

.marquee__bulbs {
  position: absolute;
  inset: 5px 10px;
  z-index: 4;
  pointer-events: none;
}

.marquee__bulbs i {
  position: absolute;
  width: clamp(5px, 1.6vw, 8px);
  height: clamp(5px, 1.6vw, 8px);
  border: 1px solid #8f5413;
  border-radius: 50%;
  background: #f4c96c;
  box-shadow: 0 0 8px #f0a526;
  animation: bulb-chase 1.2s linear infinite alternate;
}

.marquee__bulbs i:nth-child(1) { top: 10%; left: 5%; }
.marquee__bulbs i:nth-child(2) { top: 44%; left: 2%; animation-delay: -0.3s; }
.marquee__bulbs i:nth-child(3) { bottom: 8%; left: 8%; animation-delay: -0.6s; }
.marquee__bulbs i:nth-child(4) { bottom: 3%; left: 34%; animation-delay: -0.9s; }
.marquee__bulbs i:nth-child(5) { bottom: 3%; right: 34%; animation-delay: -0.15s; }
.marquee__bulbs i:nth-child(6) { right: 8%; bottom: 8%; animation-delay: -0.45s; }
.marquee__bulbs i:nth-child(7) { top: 44%; right: 2%; animation-delay: -0.75s; }
.marquee__bulbs i:nth-child(8) { top: 10%; right: 5%; animation-delay: -1.05s; }

.machine-console {
  position: relative;
  z-index: 2;
  padding: 4.5% 7% 3%;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.42), transparent 11% 89%, rgba(0, 0, 0, 0.5)),
    linear-gradient(#1e0905, #370b07 36%, #190503);
}

.status-screen {
  display: flex;
  height: 27%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3px 12px;
  overflow: hidden;
  border: 1px solid #5f4319;
  border-radius: 5px;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, 0.025) 3px 4px),
    radial-gradient(ellipse at center, #182117, #050603 75%);
  box-shadow:
    inset 0 0 17px rgba(0, 0, 0, 0.94),
    0 1px rgba(255, 203, 93, 0.18);
  text-align: center;
}

.status-screen__label {
  color: var(--gold);
  font-size: clamp(5px, 1.45vw, 7px);
  font-weight: 900;
  letter-spacing: 0.2em;
}

.status-screen strong {
  max-width: 95%;
  margin-top: 2px;
  overflow: hidden;
  color: var(--green);
  font: 500 clamp(12px, 3.9vw, 20px) / 0.98 var(--font-display);
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  text-shadow: 0 0 9px rgba(130, 241, 47, 0.42);
  white-space: nowrap;
}

.status-screen small {
  max-width: 95%;
  margin-top: 2px;
  overflow: hidden;
  color: #aead9e;
  font-size: clamp(5px, 1.55vw, 8px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reel-bay {
  position: relative;
  height: 69%;
  margin-top: 3.5%;
  padding: 5px 7px;
  border: 2px solid #ad7624;
  border-radius: 8px;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.36), transparent 5% 94%, rgba(0, 0, 0, 0.46)),
    linear-gradient(#d5a749, #68400e 8%, #211306 90%, #d0a24a);
  box-shadow:
    0 5px 12px rgba(0, 0, 0, 0.6),
    inset 0 0 0 2px #2f1905;
}

.reels {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  overflow: hidden;
  grid-template-columns: repeat(3, 1fr);
  border: 2px solid #160e08;
  border-radius: 5px;
  background: #d9d0bb;
}

.reel {
  position: relative;
  display: grid;
  min-width: 0;
  place-items: center;
  overflow: hidden;
  border-right: 2px solid #5b4731;
  background:
    linear-gradient(to bottom, rgba(35, 24, 14, 0.52), transparent 19% 78%, rgba(36, 23, 13, 0.65)),
    linear-gradient(95deg, #afa58f, #fff9e9 22% 74%, #9d927e);
  box-shadow: inset 7px 0 10px rgba(255, 255, 255, 0.14);
}

.reel:last-child {
  border-right: 0;
}

.reel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), transparent 24% 73%, rgba(0, 0, 0, 0.48));
  pointer-events: none;
}

.reel__symbol {
  position: relative;
  z-index: 2;
  display: grid;
  width: 100%;
  height: 58%;
  place-items: center;
  color: #9d150e;
  font: 900 clamp(23px, 7.7vw, 40px) / 1 Georgia, serif;
  letter-spacing: -0.11em;
  text-align: center;
  text-indent: -0.06em;
  text-shadow:
    0 2px #f2c357,
    1px 0 #4c0906;
  transform: translateZ(0);
}

.reel__symbol[data-symbol="BTC"] {
  color: #bc7d16;
  font: 900 clamp(15px, 5vw, 28px) / 1 var(--font-display);
  letter-spacing: -0.03em;
  text-indent: 0;
}

.reel__ghost {
  position: absolute;
  left: 50%;
  z-index: 1;
  color: rgba(80, 42, 15, 0.44);
  font: 900 clamp(7px, 2.3vw, 12px) / 1 var(--font-display);
  transform: translateX(-50%);
}

.reel__ghost--top { top: 6%; }
.reel__ghost--bottom { bottom: 5%; }

.reel.is-spinning .reel__symbol {
  animation: reel-rattle 0.12s linear infinite;
  filter: blur(2px);
}

.reel.is-stopping .reel__symbol {
  animation: reel-stop 0.34s cubic-bezier(0.1, 0.7, 0.2, 1.3);
}

.reel.is-near-miss .reel__symbol {
  animation: near-miss 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reel-bay__payline {
  position: absolute;
  top: 50%;
  right: 1px;
  left: 1px;
  z-index: 8;
  height: 2px;
  background: linear-gradient(90deg, #8f150e, #ff4029 12% 88%, #8f150e);
  box-shadow: 0 0 5px rgba(255, 45, 31, 0.65);
  transform: translateY(-50%);
  pointer-events: none;
}

.reel-bay__glass {
  position: absolute;
  inset: 7px 9px;
  z-index: 7;
  border-radius: 4px;
  background: linear-gradient(110deg, transparent 8%, rgba(255, 255, 255, 0.18) 10%, transparent 24%);
  pointer-events: none;
}

.reel-bay__bolt {
  position: absolute;
  top: 50%;
  z-index: 10;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f1ce76;
  box-shadow: inset 0 0 0 1px #5b360a;
}

.reel-bay__bolt--one { left: 0; transform: translate(-55%, -50%); }
.reel-bay__bolt--two { right: 0; transform: translate(55%, -50%); }

.key-port {
  position: absolute;
  top: 49%;
  left: 2.3%;
  z-index: 15;
  display: flex;
  width: clamp(28px, 8vw, 39px);
  aspect-ratio: 0.72;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid #7f561b;
  border-radius: 5px;
  background: linear-gradient(145deg, #d6a447, #49300d 68%);
  box-shadow:
    inset 0 0 0 2px #251404,
    0 4px 10px rgba(0, 0, 0, 0.52);
  transform: translate(-32%, -50%);
  transition:
    filter 0.2s ease,
    box-shadow 0.2s ease;
}

.key-port span {
  width: 6px;
  height: 19px;
  border-radius: 50% 50% 3px 3px;
  background: #120b04;
  box-shadow: inset 0 2px 3px #000;
}

.key-port b {
  margin-top: 3px;
  color: #241405;
  font-size: 5px;
  letter-spacing: 0.08em;
}

.key-port.is-ready {
  filter: brightness(1.35);
  box-shadow:
    inset 0 0 0 2px #251404,
    0 0 18px rgba(86, 244, 222, 0.68);
}

.key-port.is-filled span {
  background: #f7d06e;
  box-shadow: 0 0 8px rgba(255, 218, 115, 0.7);
}

.control-deck {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 25% 1fr 16%;
  align-items: center;
  gap: 3%;
  padding: 3% 7%;
  border-top: 2px solid #8e5617;
  border-bottom: 2px solid #5a340e;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.1), transparent 15%),
    linear-gradient(#4b0d08, #250604);
  box-shadow:
    inset 0 3px 8px rgba(255, 191, 74, 0.08),
    0 5px 8px rgba(0, 0, 0, 0.35);
}

.control-deck__meter span {
  display: block;
  color: #8c7f68;
  font-size: clamp(4px, 1.15vw, 6px);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.control-deck__meter i {
  display: block;
  height: 5px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: #0b0804;
  box-shadow: inset 0 0 3px #000;
}

.control-deck__meter b {
  display: block;
  width: 20%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), #f1c64f, #ef442d);
  box-shadow: 0 0 6px rgba(130, 241, 47, 0.62);
  transition: width 0.65s ease;
}

.slot-machine[data-state="firstSpin"] .control-deck__meter b,
.slot-machine[data-state="nearMiss"] .control-deck__meter b,
.slot-machine[data-state="extraSpin"] .control-deck__meter b {
  width: 58%;
}

.slot-machine[data-state="finalSpin"] .control-deck__meter b,
.slot-machine[data-state="jackpot"] .control-deck__meter b,
.slot-machine[data-state="scratch"] .control-deck__meter b,
.slot-machine[data-state="reward"] .control-deck__meter b {
  width: 100%;
}

.interaction-panel {
  display: grid;
  min-width: 0;
  place-items: center;
}

.entry-button,
.signup-button {
  position: relative;
  width: 100%;
  min-height: clamp(38px, 6.3vh, 50px);
  overflow: hidden;
  border: 1px solid #ffdd83;
  border-radius: 6px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.38), transparent 28%),
    linear-gradient(#e6b74d, #a86912 54%, #6f3c07);
  box-shadow:
    0 4px 0 #3a1a04,
    0 8px 13px rgba(0, 0, 0, 0.38),
    inset 0 0 0 2px rgba(79, 35, 4, 0.5);
  color: #1e0d02;
  cursor: pointer;
  font: 900 clamp(10px, 3.1vw, 15px) / 1 var(--font-display);
  letter-spacing: 0.05em;
  text-shadow: 0 1px rgba(255, 240, 186, 0.55);
  transition:
    transform 0.16s ease,
    filter 0.16s ease;
}

.entry-button::after,
.signup-button::after {
  content: "";
  position: absolute;
  top: -45%;
  left: -35%;
  width: 20%;
  height: 190%;
  background: rgba(255, 255, 255, 0.52);
  filter: blur(5px);
  transform: rotate(20deg);
  animation: button-glint 3.2s ease-in-out infinite;
}

.entry-button:hover,
.signup-button:hover {
  filter: brightness(1.13);
  transform: translateY(-1px);
}

.entry-button:active,
.signup-button:active {
  box-shadow:
    0 1px 0 #3a1a04,
    0 3px 6px rgba(0, 0, 0, 0.38),
    inset 0 0 0 2px rgba(79, 35, 4, 0.5);
  transform: translateY(3px);
}

.entry-button i {
  position: absolute;
  top: 50%;
  right: 7px;
  font-size: 21px;
  font-style: normal;
  transform: translateY(-54%);
}

.key-dock {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 9px;
  animation: panel-enter 0.4s ease both;
}

.key-dock p,
.lever-prompt {
  min-width: 0;
  margin: 0;
  text-align: left;
}

.key-dock p strong,
.lever-prompt strong {
  display: block;
  color: var(--gold-bright);
  font: 500 clamp(9px, 2.7vw, 13px) / 1 var(--font-display);
  letter-spacing: 0.04em;
}

.key-dock p small,
.lever-prompt span {
  display: block;
  margin-top: 3px;
  color: #aaa190;
  font-size: clamp(5px, 1.55vw, 8px);
  white-space: nowrap;
}

.vault-key {
  --key-x: 0px;
  --key-y: 0px;
  position: relative;
  width: clamp(54px, 14vw, 72px);
  height: 38px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: grab;
  filter:
    drop-shadow(0 4px 3px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 5px rgba(243, 192, 78, 0.18));
  touch-action: none;
  transform: translate3d(var(--key-x), var(--key-y), 0) rotate(-8deg);
  transition:
    transform 0.28s cubic-bezier(0.2, 0.75, 0.25, 1),
    filter 0.2s ease,
    opacity 0.3s ease;
}

.vault-key.is-dragging {
  z-index: 50;
  cursor: grabbing;
  filter:
    drop-shadow(0 10px 7px rgba(0, 0, 0, 0.65))
    drop-shadow(0 0 10px rgba(255, 218, 116, 0.44));
  transition: filter 0.15s ease;
}

.vault-key.is-inserting {
  opacity: 0;
  transform: translate3d(var(--key-x), var(--key-y), 0) rotate(84deg) scale(0.72);
}

.vault-key__ring {
  position: absolute;
  top: 50%;
  left: 0;
  width: 31px;
  height: 31px;
  border: 6px solid #d9a33b;
  border-radius: 50%;
  background: radial-gradient(circle, transparent 0 40%, rgba(255, 229, 151, 0.4) 43% 52%, transparent 55%);
  box-shadow:
    inset 2px 2px 2px #ffe69a,
    inset -2px -2px 2px #714307;
  transform: translateY(-50%);
}

.vault-key__shaft {
  position: absolute;
  top: 50%;
  right: 4px;
  left: 27px;
  height: 8px;
  border: 1px solid #704207;
  background: linear-gradient(#ffe18a, #c28520 55%, #7a4809);
  transform: translateY(-50%);
}

.vault-key__teeth {
  position: absolute;
  right: 2px;
  bottom: 5px;
  width: 20px;
  height: 13px;
  border-right: 7px solid #b87814;
  border-bottom: 7px solid #d29a30;
  clip-path: polygon(0 0, 38% 0, 38% 48%, 70% 48%, 70% 0, 100% 0, 100% 100%, 0 100%);
}

.lever-prompt {
  width: 100%;
  animation: panel-enter 0.4s ease both;
  text-align: center;
}

.lever-prompt strong {
  color: var(--green);
  text-shadow: 0 0 7px rgba(130, 241, 47, 0.32);
}

.indicator-lights {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.indicator-lights i {
  width: clamp(6px, 1.8vw, 9px);
  height: clamp(6px, 1.8vw, 9px);
  border: 1px solid #5e3d15;
  border-radius: 50%;
  background: #26180c;
  box-shadow: inset 0 1px 2px #050301;
}

.slot-machine[data-state="key"] .indicator-lights i:first-child,
.slot-machine[data-state="firstSpin"] .indicator-lights i:nth-child(-n+2),
.slot-machine[data-state="nearMiss"] .indicator-lights i:nth-child(-n+2),
.slot-machine[data-state="extraSpin"] .indicator-lights i:nth-child(-n+2),
.slot-machine[data-state="finalSpin"] .indicator-lights i,
.slot-machine[data-state="jackpot"] .indicator-lights i,
.slot-machine[data-state="scratch"] .indicator-lights i,
.slot-machine[data-state="reward"] .indicator-lights i {
  background: var(--green);
  box-shadow: 0 0 8px rgba(130, 241, 47, 0.72);
}

.vault-tray {
  position: relative;
  z-index: 3;
  overflow: hidden;
  padding: 4% 8% 3%;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.06), transparent 15% 86%, rgba(0, 0, 0, 0.34)),
    linear-gradient(#2c0905, #120403);
}

.vault-tray__header {
  position: relative;
  z-index: 8;
  display: flex;
  height: 18%;
  align-items: start;
  justify-content: space-between;
  color: #786a57;
  font-size: clamp(4px, 1.3vw, 6px);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.vault-tray__header b {
  color: #9a341f;
}

.vault-tray__doors {
  position: absolute;
  inset: 23% 8% 8%;
  z-index: 5;
  display: flex;
  overflow: hidden;
  border: 2px solid #65400f;
  border-radius: 6px;
  background: transparent;
  box-shadow:
    inset 0 0 12px #000,
    0 3px 7px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.vault-tray__doors span {
  width: 50%;
  height: 100%;
  border-right: 1px solid #9f6f25;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 16%),
    repeating-linear-gradient(45deg, transparent 0 11px, rgba(255, 208, 105, 0.06) 12px 13px),
    linear-gradient(145deg, #8f661f, #352006 68%, #a87c2b);
  box-shadow: inset 0 0 0 4px #1e1103;
  transform: translateX(0);
  transition: transform 0.75s cubic-bezier(0.2, 0.72, 0.2, 1);
}

.vault-tray__doors span:last-child {
  border-right: 0;
}

.slot-machine[data-state="jackpot"] .vault-tray__doors span:first-child,
.slot-machine[data-state="scratch"] .vault-tray__doors span:first-child,
.slot-machine[data-state="reward"] .vault-tray__doors span:first-child {
  transform: translateX(-103%);
}

.slot-machine[data-state="jackpot"] .vault-tray__doors span:last-child,
.slot-machine[data-state="scratch"] .vault-tray__doors span:last-child,
.slot-machine[data-state="reward"] .vault-tray__doors span:last-child {
  transform: translateX(103%);
}

.slot-machine[data-state="jackpot"] .vault-tray,
.slot-machine[data-state="scratch"] .vault-tray,
.slot-machine[data-state="reward"] .vault-tray {
  position: absolute;
  right: 6%;
  bottom: 4%;
  left: 6%;
  z-index: 24;
  height: 35%;
  padding: 4% 5% 3%;
  border: 2px solid #8d5f1c;
  border-radius: 7px;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.7),
    inset 0 0 12px rgba(0, 0, 0, 0.78);
  animation: tray-rise 0.65s cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

.slot-machine[data-state="jackpot"] .vault-tray__doors,
.slot-machine[data-state="scratch"] .vault-tray__doors,
.slot-machine[data-state="reward"] .vault-tray__doors {
  inset: 17% 5% 6%;
}

.slot-machine[data-state="jackpot"] .scratch-panel,
.slot-machine[data-state="scratch"] .scratch-panel {
  inset: 17% 5% 6%;
}

.slot-machine[data-state="reward"] .reward-panel {
  inset: 14% 5% 4%;
}

.scratch-panel {
  position: absolute;
  inset: 23% 8% 8%;
  z-index: 4;
  overflow: hidden;
  border: 2px solid #b57a23;
  border-radius: 6px;
  background: #0b1208;
  box-shadow: inset 0 0 15px #000;
}

.scratch-panel__underlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(100deg, transparent, rgba(255, 229, 144, 0.08), transparent),
    radial-gradient(ellipse at center, #214816, #071005 72%);
  text-align: center;
}

.scratch-panel__underlay span {
  color: var(--green);
  font-size: clamp(5px, 1.4vw, 7px);
  font-weight: 900;
  letter-spacing: 0.17em;
}

.scratch-panel__underlay strong {
  margin-top: 1px;
  color: var(--gold-bright);
  font: 500 clamp(25px, 8vw, 42px) / 0.82 var(--font-display);
  text-shadow: 0 0 11px rgba(255, 216, 118, 0.35);
}

.scratch-panel__underlay b {
  color: var(--ivory);
  font: 500 clamp(10px, 3.2vw, 16px) / 1 var(--font-display);
  letter-spacing: 0.06em;
}

.scratch-panel__underlay small {
  margin-top: 3px;
  color: var(--gold);
  font-size: clamp(5px, 1.5vw, 7px);
  font-weight: 900;
  letter-spacing: 0.14em;
}

#scratch-canvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
  transition: opacity 0.5s ease;
}

.scratch-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #261303;
  text-shadow: 0 1px rgba(255, 245, 208, 0.45);
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: opacity 0.2s ease;
  animation: scratch-hint 1.5s ease-in-out infinite;
}

.scratch-hint.is-hidden {
  opacity: 0;
}

.scratch-hint span {
  font-size: clamp(20px, 6vw, 30px);
}

.scratch-hint b {
  font: 500 clamp(9px, 2.8vw, 14px) / 1 var(--font-display);
  letter-spacing: 0.05em;
}

.scratch-fallback {
  position: absolute;
  right: 5px;
  bottom: 5px;
  z-index: 5;
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 229, 151, 0.5);
  border-radius: 4px;
  background: rgba(6, 8, 4, 0.88);
  color: var(--gold-bright);
  cursor: pointer;
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0.07em;
}

.reward-panel {
  position: absolute;
  inset: 20% 6% 5%;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  animation: reward-enter 0.6s cubic-bezier(0.2, 0.75, 0.2, 1) both;
}

.reward-panel__eyebrow {
  color: var(--green);
  font-size: clamp(5px, 1.4vw, 7px);
  font-weight: 900;
  letter-spacing: 0.18em;
}

.reward-panel h2 {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 1px 0 0;
  color: var(--gold-bright);
  font: 500 clamp(23px, 7.4vw, 39px) / 0.9 var(--font-display);
  text-shadow: 0 0 12px rgba(236, 184, 68, 0.34);
}

.reward-panel h2 small {
  color: var(--ivory);
  font-size: 0.43em;
  letter-spacing: 0.04em;
}

.reward-panel > strong {
  margin-top: 2px;
  color: var(--gold);
  font-size: clamp(6px, 1.8vw, 9px);
  letter-spacing: 0.13em;
}

.reward-panel > p {
  max-width: 94%;
  margin: 3px 0 4px;
  color: #bbb5a8;
  font-size: clamp(5px, 1.45vw, 7px);
  line-height: 1.3;
}

.countdown {
  display: flex;
  width: 92%;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  padding: 3px 6px;
  border: 1px solid rgba(255, 224, 151, 0.18);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
}

.countdown span {
  color: #888173;
  font-size: clamp(4px, 1.25vw, 6px);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.countdown b {
  color: var(--green);
  font: 500 clamp(12px, 3.6vw, 18px) / 1 var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

.countdown b.is-expired {
  max-width: 48%;
  color: var(--gold);
  font-size: clamp(6px, 1.8vw, 9px);
}

.signup-button {
  min-height: clamp(29px, 4.2vh, 36px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), transparent 28%),
    linear-gradient(#b8ff69, #70d92f 52%, #338810);
  box-shadow:
    0 3px 0 #173d08,
    0 0 13px rgba(130, 241, 47, 0.3),
    inset 0 0 0 2px rgba(16, 74, 5, 0.42);
  color: #092503;
  font-size: clamp(8px, 2.4vw, 12px);
}

.reward-panel__support {
  margin-top: 4px;
  color: #777165;
  font-size: clamp(4px, 1.2vw, 6px);
}

.machine-footer {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8%;
  border-top: 1px solid rgba(205, 142, 40, 0.35);
  background: #120402;
  color: #66594a;
  font-size: clamp(4px, 1.1vw, 6px);
  font-weight: 800;
  letter-spacing: 0.07em;
}

.lever {
  position: absolute;
  top: 35%;
  right: 0;
  z-index: 30;
  width: 53px;
  height: 32%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: ns-resize;
  touch-action: none;
}

.lever:disabled {
  cursor: default;
  filter: grayscale(0.65) brightness(0.6);
}

.lever__track {
  position: absolute;
  top: 23%;
  right: 0;
  width: 33px;
  height: 72%;
  border: 2px solid #7d4f16;
  border-radius: 0 18px 18px 0;
  background: linear-gradient(90deg, #170a03, #4d2d0c);
  box-shadow:
    inset 0 0 7px #000,
    4px 5px 10px rgba(0, 0, 0, 0.45);
}

.lever__stem {
  position: absolute;
  top: 8%;
  right: 15px;
  width: 8px;
  height: 54%;
  border: 1px solid #735016;
  border-radius: 5px;
  background: linear-gradient(90deg, #795017, #f0c25d 47%, #76480e);
  box-shadow: 2px 3px 4px rgba(0, 0, 0, 0.6);
  transform:
    translateY(calc(var(--lever-progress) * 80%))
    rotate(calc(var(--lever-progress) * -12deg));
  transform-origin: 50% 100%;
  transition: transform 0.2s ease;
}

.lever__knob {
  position: absolute;
  top: 0;
  right: 5px;
  width: 35px;
  height: 35px;
  border: 2px solid #ffcc64;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.45), transparent 18%),
    radial-gradient(circle at 45% 40%, #d33f25, #72150e 62%, #270503);
  box-shadow:
    0 5px 8px rgba(0, 0, 0, 0.55),
    inset 0 0 0 3px rgba(93, 15, 8, 0.48);
  transform: translateY(calc(var(--lever-progress) * 350%));
  transition: transform 0.2s ease;
}

.lever:not(:disabled) .lever__knob {
  box-shadow:
    0 5px 8px rgba(0, 0, 0, 0.55),
    0 0 15px rgba(229, 58, 31, 0.52),
    inset 0 0 0 3px rgba(93, 15, 8, 0.48);
  animation: lever-ready 1.1s ease-in-out infinite alternate;
}

.lever.is-dragging .lever__stem,
.lever.is-dragging .lever__knob {
  transition: none;
}

.lever:focus-visible {
  outline: 0;
}

.lever:focus-visible .lever__knob {
  box-shadow:
    0 5px 8px rgba(0, 0, 0, 0.55),
    0 0 0 3px var(--cyan),
    0 0 17px rgba(86, 244, 222, 0.52),
    inset 0 0 0 3px rgba(93, 15, 8, 0.48);
}

.lever small {
  position: absolute;
  right: 7px;
  bottom: -12px;
  color: #876f51;
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.machine-side-light {
  position: absolute;
  top: 20%;
  z-index: -1;
  width: 10px;
  height: 48%;
  border-radius: 50%;
  background: rgba(206, 74, 29, 0.3);
  filter: blur(4px);
  opacity: 0.4;
}

.machine-side-light--left { left: 3px; }
.machine-side-light--right { right: 25px; }

.slot-machine[data-state="jackpot"] {
  animation: machine-hit 0.72s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.slot-machine[data-state="jackpot"] .machine-body,
.slot-machine[data-state="scratch"] .machine-body,
.slot-machine[data-state="reward"] .machine-body {
  box-shadow:
    0 24px 45px rgba(0, 0, 0, 0.72),
    inset 0 0 0 5px #160502,
    inset 0 0 0 7px rgba(255, 218, 126, 0.46),
    0 0 42px rgba(231, 157, 48, 0.35);
}

.slot-machine[data-state="jackpot"] .marquee__bulbs i,
.slot-machine[data-state="scratch"] .marquee__bulbs i,
.slot-machine[data-state="reward"] .marquee__bulbs i {
  background: #fff8d1;
  box-shadow:
    0 0 10px #ffd258,
    0 0 19px #f04427;
  animation-duration: 0.3s;
}

.slot-machine[data-state="jackpot"] .machine-side-light,
.slot-machine[data-state="scratch"] .machine-side-light,
.slot-machine[data-state="reward"] .machine-side-light {
  background: #f0b944;
  opacity: 0.8;
  filter: blur(7px);
}

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

.confetti {
  position: absolute;
  top: -8%;
  left: var(--left);
  width: var(--width);
  height: var(--height);
  border-radius: 1px;
  background: var(--color);
  opacity: 0;
  animation: confetti-fall var(--duration) linear var(--delay) forwards;
}

.coin {
  position: absolute;
  top: -10%;
  left: var(--left);
  display: grid;
  width: var(--size);
  height: var(--size);
  place-items: center;
  border: 2px solid #ffe29a;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffe7a2, #b27212);
  color: #4b2a03;
  font: 900 calc(var(--size) * 0.48) / 1 Georgia, serif;
  animation: coin-fall var(--duration) linear var(--delay) forwards;
}

@keyframes smoke-drift {
  to { transform: translateX(-32%) translateY(-10%); }
}

@keyframes sound-bar {
  to { height: 4px; opacity: 0.5; }
}

@keyframes bulb-chase {
  to { filter: brightness(0.35); box-shadow: 0 0 2px #f0a526; }
}

@keyframes reel-rattle {
  0% { transform: translateY(-9%) scaleY(1.08); }
  50% { transform: translateY(8%) scaleY(0.94); }
  100% { transform: translateY(-9%) scaleY(1.08); }
}

@keyframes reel-stop {
  0% { transform: translateY(-62%) scaleY(1.08); filter: blur(2px); }
  68% { transform: translateY(9%) scaleY(0.95); filter: blur(0); }
  100% { transform: translateY(0) scaleY(1); }
}

@keyframes near-miss {
  0% { transform: translateY(-18%); filter: blur(1px); }
  42% { transform: translateY(0); }
  62% { transform: translateY(0); }
  100% { transform: translateY(4%); }
}

@keyframes button-glint {
  0%, 38% { left: -35%; opacity: 0; }
  53% { opacity: 0.75; }
  72%, 100% { left: 125%; opacity: 0; }
}

@keyframes panel-enter {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes lever-ready {
  to {
    transform: translateY(calc(var(--lever-progress) * 350%)) scale(1.06);
    filter: brightness(1.15);
  }
}

@keyframes scratch-hint {
  0%, 100% { transform: translate(-60%, -55%); }
  50% { transform: translate(-38%, -42%); }
}

@keyframes reward-enter {
  from { opacity: 0; transform: scale(0.88) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes tray-rise {
  from { opacity: 0.35; transform: translateY(15%) scaleX(0.96); }
  to { opacity: 1; transform: translateY(0) scaleX(1); }
}

@keyframes machine-hit {
  0% { transform: translateX(0) scale(1); }
  22% { transform: translateX(-4px) scale(1.01); }
  44% { transform: translateX(4px) scale(1.01); }
  66% { transform: translateX(-2px); }
  100% { transform: translateX(0) scale(1); }
}

@keyframes confetti-fall {
  0% { opacity: 0; transform: translate3d(0, -8vh, 0) rotate(0deg); }
  8% { opacity: 1; }
  100% { opacity: 0.9; transform: translate3d(var(--drift), 112vh, 0) rotate(var(--rotation)); }
}

@keyframes coin-fall {
  0% { opacity: 0; transform: translate3d(0, -8vh, 0) rotateY(0deg); }
  8% { opacity: 1; }
  100% { opacity: 0.9; transform: translate3d(var(--drift), 112vh, 0) rotateY(920deg); }
}

@media (max-width: 560px) {
  .casino-hall__machine {
    top: 21%;
    width: 120px;
    height: 50%;
    opacity: 0.24;
  }

  .casino-hall__machine--left { left: -20%; }
  .casino-hall__machine--right { right: -20%; }

  .sound-toggle__label {
    display: none;
  }

  .slot-machine {
    width: min(calc(100vw - 6px), 455px);
  }

  .machine-body {
    right: 24px;
    left: 4px;
  }

  .lever {
    width: 48px;
  }

  .lever__track {
    width: 29px;
  }

  .lever__knob {
    right: 3px;
    width: 32px;
    height: 32px;
  }
}

@media (max-height: 780px) {
  .slot-machine {
    height: min(78dvh, 610px);
  }

  .experience {
    padding-top: calc(var(--safe-top) + 32px);
    padding-bottom: max(5px, env(safe-area-inset-bottom));
  }
}

@media (max-height: 680px) {
  .slot-machine {
    height: min(84dvh, 570px);
  }

  .topbar {
    padding-top: max(7px, env(safe-area-inset-top));
  }

  .brand__name,
  .sound-toggle__label {
    display: none;
  }

  .experience {
    padding-top: calc(max(7px, env(safe-area-inset-top)) + 28px);
  }
}

@media (min-width: 760px) {
  .slot-machine {
    height: min(82dvh, 780px);
  }

  .machine-body {
    right: 34px;
    left: 10px;
  }

  .machine-body::after {
    content: "";
    position: absolute;
    right: 10%;
    bottom: 3%;
    left: 10%;
    height: 4%;
    border-radius: 50%;
    background: rgba(235, 143, 36, 0.16);
    filter: blur(9px);
  }
}

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

  .reel.is-spinning .reel__symbol {
    filter: none;
  }
}
