:root {
  --ink: #120814;
  --mag: #ff2d7d;
  --gold: #ffe14a;
  --cyan: #46f0ff;
  --lime: #d6ff3f;
  --paper: #fff6ea;
  --display: "Luckiest Guy", "Bangers", Impact, sans-serif;
  --body: Outfit, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; }
body {
  color: #fff8ee;
  font-family: var(--body);
  background:
    radial-gradient(700px 420px at 10% -10%, rgba(255, 45, 125, 0.45), transparent 60%),
    radial-gradient(600px 380px at 110% 8%, rgba(70, 240, 255, 0.28), transparent 55%),
    radial-gradient(500px 300px at 50% 110%, rgba(214, 255, 63, 0.16), transparent 50%),
    #09060e;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}
button, input, a { font: inherit; color: inherit; }
button { touch-action: manipulation; }
.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.08;
  background-image: radial-gradient(#fff 0.6px, transparent 0.6px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
  z-index: 1;
}
.stickers { pointer-events: none; position: fixed; inset: 0; z-index: 0; }
.stickers span {
  position: absolute;
  font-size: 42px;
  filter: drop-shadow(0 8px 0 rgba(0,0,0,0.35));
  animation: floaty 4.5s ease-in-out infinite;
}
.s1 { top: 8%; left: 4%; }
.s2 { top: 18%; right: 6%; animation-delay: -1s; }
.s3 { bottom: 16%; left: 6%; animation-delay: -2s; }
.s4 { top: 46%; left: 2%; font-size: 28px; animation-delay: -0.6s; }
.s5 { bottom: 28%; right: 4%; animation-delay: -2.4s; }
.s6 { top: 6%; right: 22%; font-size: 26px; animation-delay: -1.6s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-14px) rotate(8deg); }
}
.room {
  position: relative;
  z-index: 2;
  width: min(920px, calc(100% - 16px));
  margin: 12px auto 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cabinet {
  background:
    linear-gradient(180deg, #5a1840 0%, #2a1024 22%, #140812 100%);
  border: 3px solid var(--gold);
  border-radius: 28px 28px 18px 18px;
  box-shadow: 0 18px 0 #3a1028, 0 28px 40px rgba(0,0,0,0.45), inset 0 0 0 6px #140816;
  padding: 12px 12px 16px;
  animation: breathe 3.2s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { box-shadow: 0 18px 0 #3a1028, 0 28px 40px rgba(0,0,0,0.45), inset 0 0 0 6px #140816; }
  50% { box-shadow: 0 18px 0 #3a1028, 0 0 28px rgba(255, 45, 125, 0.35), inset 0 0 0 6px #140816; }
}
body.shake .cabinet { animation: shake 0.42s linear; }
body.aura .cabinet { animation: aura 0.6s ease; }
body.cooked .cabinet { animation: cooked 0.45s linear; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px) rotate(-0.6deg); }
  40% { transform: translateX(7px) rotate(0.6deg); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
@keyframes aura {
  0% { filter: saturate(1); }
  40% { filter: saturate(1.8) brightness(1.25); }
  100% { filter: saturate(1); }
}
@keyframes cooked {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-1.2deg); }
  75% { transform: rotate(1.2deg); }
}
.bulbs {
  height: 16px;
  margin: 2px 8px 6px;
  background: radial-gradient(circle at 10px 8px, #fff 0 3px, var(--gold) 3px 5px, transparent 6px) 0 0 / 26px 16px repeat-x;
  filter: drop-shadow(0 0 6px var(--mag));
  animation: blink 0.7s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0.35; filter: drop-shadow(0 0 8px var(--cyan)); } }
.marquee { text-align: center; padding: 2px 6px 8px; }
.insert {
  margin: 0;
  letter-spacing: 0.46em;
  color: var(--lime);
  font-family: var(--display);
  font-size: 14px;
  animation: pulse 1.1s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.45; letter-spacing: 0.52em; } }
.marquee h1 {
  position: relative;
  margin: 2px 0 6px;
  font-family: var(--display);
  font-size: clamp(72px, 18vw, 120px);
  line-height: 0.82;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 4px 0 0 #ff2d7d, -4px 0 0 #46f0ff, 0 6px 0 #140816;
  animation: jitter 0.35s steps(2) infinite;
}
.marquee h1::before,
.marquee h1::after {
  content: "CLAW";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.marquee h1::before { color: #46f0ff; transform: translate(-3px, 0); opacity: 0.55; mix-blend-mode: screen; animation: rgb 1.4s steps(2) infinite; }
.marquee h1::after { color: #ff2d7d; transform: translate(3px, 1px); opacity: 0.5; mix-blend-mode: screen; animation: rgb 1.4s steps(2) infinite reverse; }
@keyframes jitter {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(1px, -1px); }
}
@keyframes rgb {
  50% { transform: translate(4px, -1px); }
}
.ticker {
  overflow: hidden;
  max-width: 100%;
  border-top: 2px solid rgba(214, 255, 63, 0.7);
  border-bottom: 2px solid rgba(255, 45, 125, 0.7);
  color: var(--cyan);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.ticker span { display: inline-block; white-space: nowrap; padding-left: 100%; animation: crawl 11s linear infinite; }
@keyframes crawl { to { transform: translateX(-100%); } }
.glass-frame {
  position: relative;
  margin: 10px 4px 0;
  border-radius: 16px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 80%, #3a1230, #07040c 70%);
  border: 8px solid #0d0710;
  box-shadow: inset 0 0 0 2px rgba(70, 240, 255, 0.45), 0 0 24px rgba(255, 45, 125, 0.25);
}
.glass-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0,0,0,0.12) 3px 4px);
}
#claw-canvas { display: block; width: 100%; height: clamp(300px, 58vw, 520px); cursor: grab; touch-action: none; }
.leds {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  pointer-events: none;
  z-index: 2;
}
.leds div {
  background: rgba(4, 8, 10, 0.78);
  border: 1px solid rgba(70, 240, 255, 0.45);
  border-radius: 8px;
  padding: 5px 6px;
  min-width: 0;
}
.leds span { display: block; color: #8ea0b4; font-size: 10px; letter-spacing: 0.12em; font-weight: 800; }
.leds strong {
  display: block;
  color: var(--cyan);
  font-size: 13px;
  text-shadow: 0 0 8px #46f0ff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stage-tag {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  margin: 0;
  z-index: 2;
  color: #f4fbff;
  font-size: 13px;
  font-weight: 800;
  text-shadow: 0 2px 0 #000;
  pointer-events: none;
}
.controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 132px;
  grid-template-areas: "pad slot yeet";
  gap: 10px;
  align-items: end;
  padding: 12px 4px 0;
}
.pad { grid-area: pad; }
.slot { grid-area: slot; }
.plunger { grid-area: yeet; }
.pad {
  display: grid;
  grid-template-columns: 52px 52px;
  gap: 6px;
}
.pad button {
  width: 52px;
  height: 52px;
  border: 2px solid var(--cyan);
  border-radius: 14px;
  background: #071018;
  color: var(--cyan);
  cursor: pointer;
  font-size: 20px;
  box-shadow: 0 4px 0 #08343a;
}
.pad button:nth-child(1) { grid-column: 1 / -1; justify-self: center; }
.pad button:active { transform: translateY(3px); box-shadow: 0 1px 0 #08343a; }
.slot label {
  display: block;
  color: var(--lime);
  font-family: var(--display);
  letter-spacing: 0.12em;
  font-size: 16px;
  margin-bottom: 6px;
}
.slot-row { display: flex; gap: 8px; }
#wallet {
  flex: 1;
  min-width: 0;
  width: 100%;
  background: #09060c;
  color: var(--cyan);
  border: 2px solid var(--gold);
  border-radius: 999px;
  padding: 14px 16px;
  font-size: 16px;
}
#scan-form button {
  flex: 0 0 88px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: var(--lime);
  color: #142000;
  font-family: var(--display);
  letter-spacing: 0.04em;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 0 #6a8a10;
}
#scan-form button:active { transform: translateY(3px); box-shadow: 0 1px 0 #6a8a10; }
.plunger {
  height: 100%;
  min-height: 108px;
  border: 0;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 28%, #ff8ab8, #ff1468 48%, #7a0030);
  color: #fff;
  font-family: var(--display);
  font-size: 32px;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 8px 0 #5a0024, 0 0 18px rgba(255, 45, 125, 0.45);
  animation: yeet 1.15s ease-in-out infinite;
}
.plunger:active { transform: translateY(5px); box-shadow: 0 3px 0 #5a0024; animation: none; }
@keyframes yeet {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.03); }
}
.readout {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  padding: 12px 4px 0;
}
#hint { margin: 0; color: #ffe7f2; flex: 1; min-width: 160px; font-weight: 700; }
.ca {
  background: transparent;
  border: 2px dashed var(--gold);
  color: var(--gold);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 800;
}
.links { margin: 0; display: flex; gap: 12px; align-items: center; color: #d7b8c6; font-weight: 700; }
.links a { color: var(--cyan); }
.verdict {
  margin: 12px 4px 0;
  padding: 12px;
  border-radius: 16px;
  background: #09060c;
  border: 2px solid rgba(255, 225, 74, 0.55);
  display: grid;
  gap: 10px;
  animation: popin 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes popin { from { transform: scale(0.92) rotate(-1deg); opacity: 0; } }
.verdict[hidden] { display: none; }
.verdict h2 { margin: 0; font-family: var(--display); font-size: clamp(36px, 8vw, 52px); letter-spacing: 0.03em; line-height: 0.9; }
.verdict.win h2 { color: var(--gold); }
.verdict.practice h2 { color: var(--cyan); }
.verdict.miss h2 { color: var(--mag); }
.verdict p { margin: 4px 0 0; font-weight: 700; }
.verdict dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.verdict dt { color: #cbb0be; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; }
.verdict dd { margin: 2px 0 0; color: #fff; font-weight: 800; overflow-wrap: anywhere; }
#share {
  justify-self: start;
  background: var(--gold);
  color: #241204;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font-family: var(--display);
  font-size: 16px;
}
.below {
  display: grid;
  gap: 12px;
}
.plate, .tape {
  background: var(--paper);
  color: #241018;
  border-radius: 18px;
  padding: 14px 14px 16px;
  box-shadow: 6px 8px 0 rgba(0,0,0,0.35);
  animation: rise 0.55s ease both;
}
.prize { animation-delay: 0.08s; }
.tape { animation-delay: 0.16s; }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
.plate h2, .tape h2, .tape h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: 0.03em;
}
.rules ol { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.rules li { line-height: 1.35; font-weight: 650; }
.split { font-size: 15px; line-height: 1.5; font-weight: 700; }
.split b { font-family: var(--display); font-size: 28px; margin-right: 4px; color: #9a1848; }
.vault { margin: 4px 0; font-weight: 700; }
.tape header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tape ol, .tape ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tape li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px dashed #cbb8a4;
  padding-bottom: 4px;
  font-size: 14px;
  font-weight: 700;
}
.tape li.empty { color: #7a6570; }
.tape h3 { margin-top: 14px; }
.tag { color: #9a1848; }
.tag.win { color: #8a5a00; }
.tag.practice { color: #0b6e78; }
.fx-pop {
  position: fixed;
  left: 50%;
  top: 38%;
  z-index: 5;
  margin: 0;
  transform: translate(-50%, -40%);
  font-family: var(--display);
  font-size: clamp(42px, 12vw, 84px);
  color: var(--lime);
  text-shadow: 4px 4px 0 #140816, 0 0 18px #d6ff3f;
  pointer-events: none;
  opacity: 0;
}
.fx-pop.show { animation: fly 0.8s ease forwards; }
@keyframes fly {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(0.6) rotate(-6deg); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -70px) scale(1.15) rotate(4deg); }
}
.mute {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--mag);
  color: #fff;
  font-family: var(--display);
  letter-spacing: 0.04em;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 0 #6a0030;
}
.mute[aria-pressed="true"] { background: #2a2430; box-shadow: 0 5px 0 #000; }
@media (min-width: 800px) {
  .below { grid-template-columns: 1fr 1fr; }
  .rules { grid-column: 1 / -1; }
  .verdict dl { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .stickers span { font-size: 28px; }
  .s4, .s6 { display: none; }
  .controls {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "slot slot"
      "pad yeet";
  }
  .plunger { min-height: 118px; width: 100%; font-size: 34px; }
  .leds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .leds strong { font-size: 12px; }
  #claw-canvas { height: 340px; }
  .slot-row { flex-direction: column; }
  #scan-form button { width: 100%; flex-basis: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
