@font-face {
  font-family: "Shrikhand";
  src: url("assets/fonts/shrikhand.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("assets/fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

@property --accent {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff8fc7;
}
@property --pull {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

:root {
  --velvet: #2a0a12;
  --velvet-raised: #3d0f1c;
  --cherry: #e3173e;
  --cherry-deep: #8e0c25;
  --bubblegum: #ff8fc7;
  --blush: #ffe3ec;
  --butter: #ffd36e;
  --ink: #3a0b18;
  --muted: #e9b3c5;
  --paper: #fff8f0;
  --chrome: linear-gradient(90deg, #8d8597, #f4f1f7 28%, #c9c3d1 52%, #ffffff 68%, #8d8597);
  --chrome-v: linear-gradient(180deg, #ffffff, #c9c3d1 45%, #8d8597 60%, #e9e5ee);
  --display: "Shrikhand", Georgia, serif;
  --body: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cell: 76px;
  --mw: 138px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--blush);
  background:
    radial-gradient(ellipse 90% 45% at 50% 0%, rgba(227, 23, 62, 0.28), transparent 70%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0) 0 14px, rgba(0, 0, 0, 0.18) 30px, rgba(0, 0, 0, 0) 46px),
    var(--velvet);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.05;
  margin: 0;
}
h2 {
  font-size: clamp(2rem, 7vw, 2.6rem);
  color: var(--bubblegum);
  margin-bottom: 1.1rem;
}
h3 {
  font-size: 1.35rem;
  color: var(--bubblegum);
  margin-bottom: 0.75rem;
}
p { margin: 0; }
a { color: var(--bubblegum); }

:focus-visible {
  outline: 3px solid var(--butter);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* buttons */
.btn {
  display: inline-block;
  font: 700 1rem/1 var(--body);
  text-decoration: none;
  color: #fff;
  background: var(--cherry);
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.4rem;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--cherry-deep);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--cherry-deep); }
.btn-light { background: var(--blush); color: var(--ink); box-shadow: 0 4px 0 #b77f92; }
.btn-light:active { box-shadow: 0 1px 0 #b77f92; }

/* loader */
.loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.5rem;
  background: var(--velvet);
  color: var(--muted);
  transition: opacity 0.5s ease, visibility 0.5s;
}
.loader-heart {
  font-size: 3.5rem;
  line-height: 1;
  color: var(--bubblegum);
  animation: beat 0.9s ease-in-out infinite;
}
.loader.is-done { opacity: 0; visibility: hidden; }
@keyframes beat {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.18); }
  60% { transform: scale(0.96); }
}

/* hero */
.hero {
  position: relative;
  max-width: 40rem;
  margin: 0 auto;
  padding: 3.25rem 1.25rem 2.5rem;
  text-align: center;
}
.age-badge {
  position: absolute;
  top: 1.1rem;
  right: 1.25rem;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--muted);
  border: 2px solid currentColor;
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
}
.hero-photo {
  width: 8.5rem;
  aspect-ratio: 1;
  margin: 0 auto 1.25rem;
  padding: 5px;
  border-radius: 50%;
  background: conic-gradient(from 200deg, var(--butter), var(--bubblegum), var(--cherry), var(--butter));
}
.hero-photo img { object-position: 58% 35%; }
.hero-photo img,
.hero-initial {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--velvet-raised);
}
.hero-initial[hidden], .hero-photo img[hidden] { display: none; }
.hero-initial {
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 3.6rem;
  color: var(--bubblegum);
}
.hero-name {
  font-size: clamp(3.4rem, 16vw, 6rem);
  color: var(--blush);
  text-shadow: 0 0.05em 0 var(--cherry), 0 0.1em 0 var(--ink);
}
.hero-tagline {
  margin-top: 0.9rem;
  font-family: var(--display);
  font-size: 1.3rem;
  color: var(--butter);
}
.hero-intro {
  max-width: 32ch;
  margin: 0.6rem auto 0;
  color: var(--muted);
}

/* layout */
main {
  display: flex;
  flex-direction: column;
  gap: 4.5rem;
  padding: 0 1.25rem 4rem;
}
main > section,
.game-panel > section {
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
}

/* game tabs */
.games {
  display: flex;
  gap: 0.35rem;
  width: fit-content;
  max-width: 100%;
  margin: -0.5rem auto -1.5rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 227, 236, 0.12);
}
.games[hidden] { display: none; }
.game-tab {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.05rem 0.6rem 0.75rem;
  font-family: var(--display);
  font-size: 1.08rem;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.tab-icon { display: grid; }
.tab-icon svg { width: 1.45rem; height: 1.45rem; }
.game-tab[aria-selected="true"] {
  color: #fff;
  background: var(--cherry);
  box-shadow: 0 3px 0 var(--cherry-deep);
}
.game-panel {
  display: flex;
  flex-direction: column;
  gap: 4.5rem;
}
.game-panel[hidden] { display: none; }

/* coin drop */
.coin-head { text-align: center; margin-bottom: 1.4rem; }
.coin-head h2 { margin-bottom: 0.3rem; }
.coin-sub { color: var(--muted); }
.coin-stats {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 0.15rem 1rem;
  padding: 1rem 1.1rem 1.1rem;
  border-radius: 20px;
  background: var(--velvet-raised);
  box-shadow: inset 0 0 0 1px rgba(255, 227, 236, 0.1);
}
.stat-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}
.stat-num {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.8rem, 8vw, 2.5rem);
  line-height: 1.15;
  color: var(--blush);
  font-variant-numeric: tabular-nums;
}
.stat-taken { text-align: right; }
.stat-taken .stat-num {
  color: #ff3d63;
  text-shadow: 0 0 16px rgba(227, 23, 62, 0.55);
}
.stat-num.is-bump { animation: bump 0.4s ease-out; }
@keyframes bump { 35% { transform: scale(1.08); } }
.stat-meta {
  grid-column: 1 / -1;
  min-height: 1.4em;
  font-size: 0.85rem;
  color: var(--muted);
}
.coin-controls {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.6rem;
  margin-top: 0.8rem;
}
.drop-btn { font-size: 1.05rem; }
.btn-ghost {
  color: var(--blush);
  background: transparent;
  box-shadow: inset 0 0 0 2px rgba(255, 227, 236, 0.35);
}
.btn-ghost:active { box-shadow: inset 0 0 0 2px rgba(255, 227, 236, 0.35); }
.btn-soft {
  color: var(--ink);
  background: #f3cfdb;
  box-shadow: 0 4px 0 #c98fa3;
}
.btn-soft:active { box-shadow: 0 1px 0 #c98fa3; }
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.board-wrap {
  --coin-mascot-width: clamp(84px, 27vw, 132px);
  position: relative;
  margin-top: 1rem;
}
body:not(.no-mascot) .board-wrap {
  margin-top: calc(var(--coin-mascot-width) * 0.72 + 1.4rem);
}
.board {
  position: relative;
  padding-bottom: 0.9rem;
  overflow: hidden;
  border: 6px solid transparent;
  border-radius: 24px;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, #5a1428, var(--ink) 72%) padding-box,
    var(--chrome) border-box;
  box-shadow: 0 30px 60px -18px rgba(0, 0, 0, 0.75);
}
.board-stage { position: relative; }
.board canvas { display: block; width: 100%; }
.cd-pegs { position: relative; z-index: 0; }
.buckets { position: relative; z-index: 1; }
.cd-coins {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  pointer-events: none;
}
.board .lock { z-index: 6; }
.board-banner { z-index: 5; }

/* chibi mascot + speech bubble */
.mascot {
  --anchor-x: 50%;
  --anchor-y: 79%;
  position: absolute;
  z-index: 4;
  top: 5px;
  left: 50%;
  transform: translate(calc(-1 * var(--anchor-x)), calc(-1 * var(--anchor-y)));
  pointer-events: none;
}
.mascot[hidden], .no-mascot .mascot { display: none; }
.mascot-slots {
  width: var(--mw);
  --bubble-max: min(14rem, 44vw);
}
.mascot-coin {
  left: 21%;
  width: var(--coin-mascot-width);
  z-index: 7;
  --bubble-max: min(14rem, 55vw);
}
.mascot.has-scene {
  --anchor-x: 44%;
  --anchor-y: 55%;
}
.m-imgs { position: relative; }
.m-imgs picture { display: block; }
.has-scene .m-imgs {
  aspect-ratio: 244 / 320;
  transform-origin: var(--anchor-x) var(--anchor-y);
}
.m-img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45));
}
.m-talk {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}
.mascot.is-talking.has-talk-image .m-talk { opacity: 1; }
.mascot.is-talking.has-talk-image .m-idle { opacity: 0; }
.mascot.is-talking .m-imgs { animation: m-hop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes m-hop {
  35% { transform: translateY(-7px) rotate(-2deg); }
}
.bubble {
  position: absolute;
  left: 62%;
  bottom: 60%;
  min-width: 39%;
  min-height: 36%;
  width: max-content;
  max-width: var(--bubble-max, 14rem);
  display: grid;
  place-items: center;
  padding: 0.55rem 0.85rem 0.65rem;
  text-align: center;
  text-wrap: balance;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
  background: #fff;
  border: 3px solid #1a0a10;
  border-radius: 24px 28px 26px 20px / 22px 20px 28px 24px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  transform-origin: 0% 100%;
  transform: scale(0.3);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.3, 1.6, 0.5, 1), opacity 0.15s ease;
}
.bubble.is-show { transform: scale(1); opacity: 1; }
.has-scene .bubble {
  left: 57%;
  bottom: 78%;
  min-width: 0;
  min-height: 0;
}
.bubble::before,
.bubble::after {
  content: "";
  position: absolute;
  border-style: solid;
  border-color: transparent;
}
.bubble::before {
  left: 8px;
  bottom: -16px;
  border-width: 16px 15px 0 0;
  border-top-color: #1a0a10;
}
.bubble::after {
  left: 11px;
  bottom: -9px;
  border-width: 10px 9px 0 0;
  border-top-color: #fff;
}
.burst {
  position: absolute;
  width: 26px;
  height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 22'%3E%3Cg stroke='%231a0a10' stroke-width='1.6' stroke-linejoin='round' fill='%23ffc928'%3E%3Cpath d='M2 15l9 2-1 3-9-2z'/%3E%3Cpath d='M6 5l7 8-2.5 2-7-8z'/%3E%3Cpath d='M15 1l2 10h-3l-2-10z'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
}
.burst-a { top: -20px; left: -16px; }
.burst-b { bottom: -14px; right: -18px; transform: rotate(180deg); }
.mascot-coin .bubble { font-size: 0.86rem; }
.board-banner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 0.4rem 0.75rem 0.45rem;
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--butter);
  transform: translateY(-105%);
  transition: transform 0.25s ease;
}
.board-banner.is-show { transform: translateY(0); }
.board-banner.is-all { background: var(--cherry); color: #fff; }
.buckets {
  display: grid;
  gap: 4px;
}
.bucket {
  display: grid;
  place-items: center;
  height: 2.3rem;
  border-radius: 8px;
  font-weight: 800;
  font-size: clamp(0.62rem, 2.7vw, 0.86rem);
  color: var(--bt, var(--ink));
  background: var(--bc);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  white-space: nowrap;
}
.bucket.is-hit { animation: bucket-hit 0.55s ease-out; }
@keyframes bucket-hit {
  25% { transform: translateY(5px); filter: brightness(1.35); box-shadow: 0 0 14px 3px var(--bc); }
}
.board-lock { border-radius: 18px; }

.cd-intro {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
}

.cd-load { margin-top: 1.75rem; }
.cd-load h3 { color: var(--cherry); }
.amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}
.amount {
  position: relative;
  padding: 0.5rem 0.95rem;
  font-weight: 800;
  color: var(--ink);
  border-radius: 999px;
  background: #f6d3df;
  box-shadow: inset 0 0 0 2px rgba(58, 11, 24, 0.12);
  cursor: pointer;
}
.amount input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.amount.is-checked { color: #fff; background: var(--cherry); box-shadow: 0 3px 0 var(--cherry-deep); }
.amount.has-focus { outline: 3px solid var(--butter); outline-offset: 2px; }
.custom-amount {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b2b40;
  margin-bottom: 0.3rem;
}
.custom-wrap {
  display: flex;
  align-items: center;
  width: 10rem;
  margin-bottom: 1rem;
  padding: 0 0.85rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 2px rgba(58, 11, 24, 0.15);
}
.custom-cur { font-weight: 800; color: #6b2b40; }
.custom-wrap input {
  width: 100%;
  min-width: 0;
  padding: 0.55rem 0.35rem;
  font: 700 1rem var(--body);
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: none;
}
.custom-wrap:focus-within { outline: 3px solid var(--butter); outline-offset: 2px; }
.cd-manual { margin-top: 1rem; }
.cd-manual[hidden], .cd-demo-note[hidden] { display: none; }
.cd-demo-note { margin: 1rem 0 0.8rem; font-size: 0.9rem; color: #6b2b40; }
#cd-load-btn { margin-top: 0.2rem; }

.cd-log-wrap { margin-top: 2rem; }
.cd-log-wrap[hidden] { display: none; }
.cd-log {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.cd-log li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  background: rgba(255, 227, 236, 0.06);
  font-variant-numeric: tabular-nums;
}
.cd-log .log-amt { font-weight: 800; white-space: nowrap; }
.cd-log li.is-all { color: var(--butter); background: rgba(255, 211, 110, 0.14); font-weight: 800; }
.cd-log li.is-load { color: #a8e6c1; }

.broke {
  width: min(92vw, 24rem);
  padding: 1.6rem 1.4rem 1.4rem;
  text-align: center;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.broke::backdrop {
  background: rgba(42, 10, 18, 0.7);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.broke[open] { animation: pop 0.35s cubic-bezier(0.3, 1.5, 0.5, 1); }
@keyframes pop { from { transform: scale(0.85); opacity: 0; } }
.broke-title {
  font-family: var(--display);
  font-size: 2rem;
  line-height: 1.1;
  color: var(--cherry);
}
.broke-text { margin-top: 0.6rem; font-size: 1.02rem; }
.broke-receipt { margin-top: 0.6rem; font-size: 0.8rem; color: #8a4a5e; }
.broke-cta { margin-top: 0.5rem; font-size: 0.88rem; font-weight: 700; }
.broke-actions {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

/* machine picker */
.picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: calc(var(--mw) * 0.72 + 0.6rem);
}
.no-mascot .picker { margin-bottom: 1.75rem; }
.pick {
  --pick-accent: var(--bubblegum);
  position: relative;
  display: block;
  padding: 0.6rem 0.4rem 0.7rem;
  text-align: center;
  color: var(--muted);
  border: 2px solid rgba(255, 227, 236, 0.18);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.pick input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.pick-name {
  display: block;
  font-family: var(--display);
  font-size: 1.02rem;
  line-height: 1.1;
}
.pick-blurb {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  line-height: 1.3;
}
.pick.is-checked {
  color: var(--blush);
  border-color: var(--pick-accent);
  background: color-mix(in srgb, var(--pick-accent) 16%, transparent);
}
.pick.has-focus { outline: 3px solid var(--butter); outline-offset: 3px; }
.pick-count {
  position: absolute;
  top: -0.6rem;
  right: -0.35rem;
  min-width: 1.45rem;
  height: 1.45rem;
  padding: 0 0.35rem;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  background: var(--cherry);
  border-radius: 999px;
  box-shadow: 0 0 0 2px var(--velvet);
}
.pick-count[hidden] { display: none; }

/* the machine */
.machine-wrap {
  --marquee-h: 7.4rem;
  --cab-pad: 1.1rem;
  position: relative;
  width: min(100%, 25.5rem);
  margin: 0 auto;
  padding-right: 2.6rem;
}
.machine-wrap:has(.mascot-slots.has-scene) {
  --marquee-h: calc(var(--mw) * 0.6 + 5.1rem);
}
.machine {
  --accent-light: color-mix(in srgb, var(--accent), #fff 28%);
  --accent-deep: color-mix(in srgb, var(--accent), var(--ink) 38%);
  position: relative;
  transition: --accent 0.6s ease;
}

.marquee {
  position: relative;
  height: var(--marquee-h);
  margin: 0 1.4rem -6px;
  border: 6px solid transparent;
  border-bottom: 0;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background:
    radial-gradient(ellipse 80% 90% at 50% 100%, color-mix(in srgb, var(--accent), var(--ink) 55%), var(--ink) 75%) padding-box,
    var(--chrome) border-box;
}
.bulbs { position: absolute; inset: 0; }
.bulb {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #fff6cf;
  box-shadow: 0 0 5px 2px rgba(255, 211, 110, 0.85);
}
.bulb:nth-child(even) { opacity: 0.45; }
.machine.is-spinning .bulb {
  animation: chase 0.7s steps(1) infinite;
  animation-delay: calc(var(--i) * -47ms);
}
.machine.is-win .bulb { animation: flash 0.22s steps(1) infinite; }
.machine.is-win .bulb:nth-child(even) { animation-delay: -0.11s; }
@keyframes chase {
  0% { opacity: 1; }
  50% { opacity: 0.2; }
}
@keyframes flash {
  0% { opacity: 1; }
  50% { opacity: 0.15; }
}
.marquee-sign {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.85rem;
  display: grid;
  justify-items: center;
  gap: 0.1rem;
  padding: 0 1.5rem;
  text-align: center;
}
.marquee-name {
  font-family: var(--display);
  font-size: clamp(1.45rem, 6.5vw, 2rem);
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 0 8px var(--accent), 0 0 20px var(--accent);
}
.marquee-blurb {
  font-size: 0.78rem;
  color: var(--blush);
  opacity: 0.85;
}

.cabinet {
  position: relative;
  padding: var(--cab-pad) 1rem 1rem;
  border: 6px solid transparent;
  border-radius: 26px 26px 20px 20px;
  background:
    linear-gradient(180deg, var(--accent-light), var(--accent) 34%, var(--accent-deep)) padding-box,
    var(--chrome) border-box;
  box-shadow:
    0 30px 60px -18px rgba(0, 0, 0, 0.75),
    inset 0 2px 0 rgba(255, 255, 255, 0.55);
}

.reels {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px;
  border-radius: 14px;
  background: var(--ink);
  box-shadow:
    inset 0 4px 10px rgba(0, 0, 0, 0.6),
    0 0 0 3px var(--accent-deep);
}
.reel {
  position: relative;
  height: calc(var(--cell) * 3);
  overflow: hidden;
  border-radius: 8px;
  background: var(--paper);
}
.reel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(58, 11, 24, 0.6),
    rgba(58, 11, 24, 0) 30%,
    rgba(58, 11, 24, 0) 70%,
    rgba(58, 11, 24, 0.6));
}
.reel.is-anticipating {
  box-shadow: 0 0 0 3px var(--butter), 0 0 18px 4px rgba(255, 211, 110, 0.8);
  animation: tease 0.35s ease-in-out infinite alternate;
}
@keyframes tease {
  to { box-shadow: 0 0 0 3px var(--butter), 0 0 6px 1px rgba(255, 211, 110, 0.4); }
}
.strip { will-change: transform; }
.cell {
  height: var(--cell);
  display: grid;
  place-items: center;
}
.cell svg {
  width: 68%;
  height: 68%;
  max-width: 56px;
}
.sym-img {
  display: block;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.cell .sym-img { width: 80%; height: 80%; max-width: 66px; }
.pay-syms .sym-img { width: 1.85rem; height: 1.85rem; }
.ticket-syms .sym-img { width: 28px; height: 28px; }
.history .h-syms .sym-img { width: 1.4rem; height: 1.4rem; }
.tab-icon .sym-img { width: 1.55rem; height: 1.55rem; }
.sym-text {
  font-size: calc(var(--cell) * 0.5);
  line-height: 1;
  color: var(--ink);
}
.cell.is-hit { animation: hit 0.45s ease-out 3; }
@keyframes hit {
  50% { transform: scale(1.16); }
}
.payline {
  position: absolute;
  left: 2px;
  right: 2px;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  background: var(--cherry);
  box-shadow: 0 0 8px var(--cherry);
  pointer-events: none;
  opacity: 0.85;
}
.payline::before,
.payline::after {
  content: "";
  position: absolute;
  top: 50%;
  border: 8px solid transparent;
  transform: translateY(-50%);
}
.payline::before { left: -2px; border-left-color: var(--butter); }
.payline::after { right: -2px; border-right-color: var(--butter); }

.lock {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.9rem;
  border-radius: 14px;
  text-align: center;
  background: rgba(42, 10, 18, 0.8);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  transition: opacity 0.35s ease, visibility 0.35s;
}
.lock[hidden] { display: grid; opacity: 0; visibility: hidden; }
.lock-title {
  font-family: var(--display);
  font-size: 1.7rem;
  color: #fff;
}

.confetti {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  font-size: 1.25rem;
  line-height: 1;
  pointer-events: none;
}

.panel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}
.counter {
  min-width: 4.8rem;
  padding: 0.3rem 0.6rem 0.4rem;
  text-align: center;
  border-radius: 12px;
  background: var(--ink);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}
.counter-num {
  display: block;
  font-family: var(--display);
  font-size: 1.75rem;
  line-height: 1.15;
  color: var(--butter);
  text-shadow: 0 0 10px rgba(255, 211, 110, 0.7);
  font-variant-numeric: tabular-nums;
}
.counter-label {
  display: block;
  font-size: 0.7rem;
  color: var(--blush);
  opacity: 0.85;
  white-space: nowrap;
}
.spin-btn {
  font-family: var(--display);
  font-size: 1.55rem;
  line-height: 1;
  color: #fff;
  padding: 0.6rem 1rem 0.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--cherry);
  box-shadow: 0 6px 0 var(--cherry-deep), inset 0 2px 0 rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.2s ease;
}
.spin-btn:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--cherry-deep), inset 0 2px 0 rgba(255, 255, 255, 0.35);
}
.spin-btn:disabled {
  cursor: not-allowed;
  filter: grayscale(0.7) brightness(0.85);
}
.sound-btn {
  width: 2.7rem;
  height: 2.7rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
}
.sound-btn svg {
  width: 1.3rem;
  height: 1.3rem;
  fill: none;
  stroke: var(--blush);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sound-btn .spk { fill: var(--blush); }
.sound-btn .mute { display: none; }
.sound-btn[aria-pressed="false"] .wave { display: none; }
.sound-btn[aria-pressed="false"] .mute { display: inline; }

.slot {
  width: 66%;
  height: 10px;
  margin: 1.1rem auto 0;
  border-radius: 6px;
  background: var(--ink);
  box-shadow: inset 0 3px 4px rgba(0, 0, 0, 0.85), 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* the printed ticket */
.ticket-area {
  position: relative;
  width: 62%;
  margin: -14px auto 0;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s ease;
}
.ticket-area.is-open { grid-template-rows: 1fr; }
.ticket-clip {
  min-height: 0;
  overflow: hidden;
}
.ticket {
  padding: 1.2rem 0.9rem 1.3rem;
  text-align: center;
  color: var(--ink);
  background: var(--paper);
  transform: translateY(-100%);
  transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s;
  -webkit-mask: radial-gradient(circle at 7px 100%, transparent 4.5px, #000 5px) 0 0 / 14px 100% repeat-x;
  mask: radial-gradient(circle at 7px 100%, transparent 4.5px, #000 5px) 0 0 / 14px 100% repeat-x;
}
.ticket-area.is-open .ticket { transform: translateY(0); }
.ticket-head {
  font-size: 0.78rem;
  font-weight: 700;
  color: #8a4a5e;
}
.ticket-syms {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin: 0.5rem 0 0.35rem;
}
.ticket-syms svg { width: 26px; height: 26px; }
.ticket-syms .sym-text { font-size: 1.3rem; }
.ticket-result {
  font-family: var(--display);
  font-size: 1.35rem;
  line-height: 1.15;
  color: var(--cherry);
  overflow-wrap: anywhere;
}
.ticket-meta {
  margin-top: 0.6rem;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #8a4a5e;
  overflow-wrap: anywhere;
}
.ticket-cta {
  margin-top: 0.55rem;
  font-size: 0.8rem;
  font-weight: 700;
}
.ticket-demo {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: #8a4a5e;
  border-radius: 4px;
  padding: 0 0.35rem;
}

/* lever */
.lever {
  position: absolute;
  top: calc(var(--marquee-h) + var(--cab-pad) + 8px + var(--cell) * 1.5 - 8.9rem);
  right: 0;
  width: 2.6rem;
  height: 17rem;
  transition: --pull 0.75s cubic-bezier(0.34, 1.7, 0.6, 1);
  pointer-events: none;
}
.lever.is-pulling { transition: --pull 0.2s cubic-bezier(0.5, 0, 0.9, 0.6); }
.lever.is-dragging { transition: none; }
.lever-rod {
  position: absolute;
  top: 1.3rem;
  left: 1.05rem;
  width: 0.62rem;
  height: 7.6rem;
  border-radius: 6px;
  background: var(--chrome);
  transform-origin: 50% 100%;
  transform: scaleY(calc(1 - var(--pull) * 1.4));
  box-shadow: 1px 0 2px rgba(0, 0, 0, 0.4);
}
.lever-mount {
  position: absolute;
  top: 7.3rem;
  left: 0;
  width: 1.55rem;
  height: 3.2rem;
  border-radius: 0 12px 12px 0;
  background: var(--chrome-v);
  box-shadow: 2px 3px 6px rgba(0, 0, 0, 0.5);
}
.lever-knob {
  position: absolute;
  top: 0;
  left: 0.15rem;
  width: 2.45rem;
  height: 2.45rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffb3c3 0 12%, var(--cherry) 34%, var(--cherry-deep) 100%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  transform: translateY(calc(var(--pull) * 1.4 * 7.6rem)) scale(calc(1 + var(--pull) * 0.22));
  cursor: grab;
  touch-action: none;
  pointer-events: auto;
}
.lever.is-dragging .lever-knob { cursor: grabbing; }
.lever-knob:disabled { cursor: not-allowed; }
.lever.is-ready .lever-knob { animation: invite 0.9s ease-in-out 4; }
@keyframes invite {
  50% { box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5), 0 0 0 7px rgba(255, 211, 110, 0.55); }
}

.unlock-msg {
  min-height: 1.6rem;
  margin-top: 1rem;
  text-align: center;
  font-weight: 700;
  color: var(--butter);
}

/* paytable */
.paytable { margin-top: 1.25rem; }
.paytable summary {
  cursor: pointer;
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--bubblegum);
  list-style-position: outside;
}
.paytable ul {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}
.pay-row {
  display: grid;
  grid-template-columns: 6.6rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.15rem;
  border-bottom: 1px dashed rgba(255, 227, 236, 0.2);
}
.pay-syms {
  display: flex;
  justify-content: center;
  gap: 2px;
  padding: 3px 5px;
  border-radius: 10px;
  background: var(--paper);
  justify-self: start;
}
.pay-syms svg { width: 1.7rem; height: 1.7rem; }
.pay-syms .sym-text { font-size: 1.35rem; }
.pay-nomatch {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0 0.45rem;
  white-space: nowrap;
  justify-self: start;
}
.pay-odds {
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ticket history */
.history { margin-top: 2.25rem; }
.history[hidden] { display: none; }
.history ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.history li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.75rem;
  padding: 0.6rem 0.8rem;
  color: var(--ink);
  background: var(--paper);
  border-radius: 6px;
}
.history .h-result { font-weight: 800; }
.history .h-meta {
  grid-column: 2;
  font-size: 0.75rem;
  color: #8a4a5e;
  overflow-wrap: anywhere;
}
.history .h-syms { grid-row: span 2; display: flex; align-items: center; gap: 1px; }
.history .h-syms .sym-img { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2)); }
.history .h-syms svg { width: 1.3rem; height: 1.3rem; }

/* steps */
.steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 0.9rem;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  align-items: baseline;
  gap: 0.75rem;
}
.steps li::before {
  content: counter(step);
  font-family: var(--display);
  font-size: 1.8rem;
  line-height: 1;
  color: var(--butter);
  text-align: right;
}

/* payment */
.pay-for { color: var(--muted); }
.pay-for strong { color: var(--blush); }
.text-link { color: var(--bubblegum); white-space: nowrap; }

.chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1.75rem 0 1.5rem;
}
.chip-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding-top: 0.9rem;
  cursor: pointer;
}
.chip-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.chip {
  width: min(100%, 6.4rem);
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--chip) 0 55%, var(--ink) 55.5% 58%, transparent 58.5%),
    repeating-conic-gradient(var(--chip) 0 18deg, #fff3e6 18deg 36deg);
  box-shadow: 0 6px 0 #14030a;
  transition: transform 0.2s cubic-bezier(0.3, 1.5, 0.5, 1), box-shadow 0.2s ease;
}
.chip-num {
  display: block;
  font-family: var(--display);
  font-size: 2rem;
  line-height: 1;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 0 var(--ink);
}
.chip-unit {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  color: #fff;
}
.chip-price { font-weight: 800; font-size: 1.15rem; }
.chip-badge {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  padding: 0.05rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
  color: var(--ink);
  background: var(--butter);
  border-radius: 6px;
  transform: translateX(-50%) rotate(-4deg);
}
.chip-option.is-checked .chip {
  transform: translateY(-6px) rotate(-10deg);
  box-shadow: 0 12px 0 #14030a, 0 0 0 4px var(--butter);
}
.chip-option.has-focus .chip { outline: 3px solid var(--butter); outline-offset: 4px; }

.pay-box {
  padding: 1.1rem 1.1rem 1.25rem;
  color: var(--ink);
  background: var(--blush);
  border-radius: 18px;
}
.pay-total {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}
.pay-total strong {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--cherry);
  margin-left: 0.25rem;
}
.age-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
}
.age-check input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.05rem 0 0;
  accent-color: var(--cherry);
}
.pay-error {
  min-height: 0;
  margin: 0.6rem 0 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #b00d2e;
}
.pay-error:empty { margin: 0; }
.paypal-slot {
  margin-top: 1rem;
  transition: opacity 0.2s ease;
}
.paypal-slot.is-waiting { opacity: 0.45; }
.paypal-slot[hidden] { display: none; }
.pay-loading { font-size: 0.9rem; color: #8a4a5e; }
.manual-box { margin-top: 1rem; }
.manual-box[hidden] { display: none; }
.manual-step {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.manual-step strong { color: var(--cherry); }
.pay-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}
.btn-dark {
  background: var(--ink);
  color: var(--blush);
  box-shadow: 0 4px 0 #14030a;
}
.btn-dark:active { box-shadow: 0 1px 0 #14030a; }
.demo-box { margin-top: 1rem; }
.demo-box[hidden] { display: none; }
.demo-box p {
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
  color: #6b2b40;
}
.pay-note {
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.restore { margin-top: 1.5rem; }
.restore[hidden] { display: none; }
.restore summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--bubblegum);
}
.restore-form {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.restore-row { display: flex; gap: 0.5rem; }
.restore-row input {
  flex: 1;
  min-width: 0;
  font: 600 1rem var(--body);
  color: var(--ink);
  background: var(--blush);
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1rem;
}
.restore-msg { min-height: 1.4rem; color: var(--blush); }

/* rules + contact */
.rules ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.rules li {
  display: grid;
  grid-template-columns: 1.4rem 1fr;
  gap: 0.4rem;
}
.rules li::before {
  content: "♡";
  color: var(--bubblegum);
}
.contact { text-align: center; }
.contact p { margin-bottom: 1rem; color: var(--muted); }

.footer {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  padding: 1rem 1.25rem 3rem;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (min-width: 720px) {
  :root { --cell: 86px; }
  .machine-wrap { width: 29rem; --marquee-h: 8rem; }
}

@media (max-width: 420px) {
  :root { --cell: 62px; --mw: 116px; }
  .bubble { font-size: 0.82rem; padding: 0.45rem 0.7rem 0.55rem; }
  main, .game-panel { gap: 3.75rem; }
  .game-tab { font-size: 0.98rem; padding-inline: 0.6rem 0.85rem; }
  .coin-controls { grid-template-columns: 1fr 1fr auto; }
  .bucket { height: 2rem; border-radius: 6px; }
  .machine-wrap { --marquee-h: 6.4rem; --cab-pad: 0.8rem; }
  .machine-wrap:has(.mascot-slots.has-scene) {
    --marquee-h: calc(var(--mw) * 0.6 + 6rem);
  }
  .machine-wrap:has(.mascot-slots.has-scene) .marquee-sign { padding-inline: 0.65rem; }
  .cabinet { padding-inline: 0.7rem; padding-bottom: 0.8rem; }
  .marquee { margin-inline: 1rem; }
  .pay-row { grid-template-columns: 5.2rem 1fr auto; gap: 0.6rem; }
  .pay-syms svg, .pay-syms .sym-img { width: 1.4rem; height: 1.4rem; }
  .spin-btn { font-size: 1.3rem; }
  .counter { min-width: 4.2rem; }
  .ticket-area { width: 76%; }
}

@media (max-width: 360px) {
  .machine-wrap:has(.mascot-slots.has-scene) {
    --marquee-h: calc(var(--mw) * 0.6 + 7rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .loader-heart,
  .reel.is-anticipating,
  .cell.is-hit,
  .lever.is-ready .lever-knob,
  .machine.is-spinning .bulb,
  .machine.is-win .bulb { animation: none; }
  .ticket, .ticket-area, .lever, .machine { transition-duration: 0.01s; }
  .bucket.is-hit, .stat-num.is-bump, .broke[open], .mascot.is-talking .m-imgs { animation: none; }
  .bubble { transition-duration: 0.01s; }
}
