/* GoKinko: Lucky Cat's funfair.
   Night-time fairground (deep indigo sky, warm lanterns) around a cream booth with chunky ink outlines.
   Chrome that touches money (cashier, fairness, terms) stays plain cream so it reads as trustworthy. */

:root {
  --ink: #3a1f3d;
  --cream: #fff6e5;
  --paper: #fffaf0;
  --sand: #ffe9c7;
  --coral: #ff4d5e;
  --coral-d: #d92d45;
  --gold: #ffc83d;
  --gold-d: #e8941a;
  --gold-l: #ffe27a;
  --teal: #2fd0b4;
  --teal-d: #0f8f7b;
  --pink: #ff5fa2;
  --violet: #7c5cff;
  --n1: #1b1446;
  --n2: #2d1f6e;
  --n3: #4a2b86;
  --text: #2b1a33;
  --muted: #6d5a77;
  --line: #ecd9b8;
  --font: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Arial Rounded MT Bold", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --cmd-h: 80px;

  /* Reel geometry; reels.js recomputes these from the available width */
  --cw: 100px;
  --ch: 88px;
  --sz: 80px;
  --gap: 6px;
  --pad: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  color: #fff;
  background: linear-gradient(180deg, var(--n1) 0%, var(--n2) 50%, var(--n3) 100%) fixed;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button { font-family: inherit; color: inherit; cursor: pointer; }
img, svg { display: block; }
[hidden] { display: none !important; }
a { color: inherit; }

/* ---------- Sky ---------- */
.sky { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; transition: filter 0.8s; }
.bokeh { position: absolute; border-radius: 50%; filter: blur(2px); opacity: 0.5; animation: float 9s ease-in-out infinite; }
.b1 { width: 90px; height: 90px; left: 6%; top: 18%; background: radial-gradient(circle, #ffb04a, transparent 70%); }
.b2 { width: 60px; height: 60px; left: 78%; top: 12%; background: radial-gradient(circle, #ff5fa2, transparent 70%); animation-delay: -3s; }
.b3 { width: 120px; height: 120px; left: 62%; top: 52%; background: radial-gradient(circle, #5fd6ff, transparent 70%); animation-delay: -5s; opacity: 0.32; }
.b4 { width: 70px; height: 70px; left: 14%; top: 64%; background: radial-gradient(circle, #ffe27a, transparent 70%); animation-delay: -2s; }
.b5 { width: 50px; height: 50px; left: 40%; top: 8%; background: radial-gradient(circle, #9d7bff, transparent 70%); animation-delay: -6s; }
.b6 { width: 100px; height: 100px; left: 88%; top: 78%; background: radial-gradient(circle, #ff8a5c, transparent 70%); animation-delay: -4s; }
.hang { position: absolute; top: -8px; width: 84px; height: 84px; display: none; transform-origin: 50% 0; animation: sway 5s ease-in-out infinite; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.4)); }
.hang-l { left: 8%; }
.hang-r { right: 8%; animation-delay: -2.5s; }
@media (min-width: 980px) { .hang { display: block; } }
body[data-fs="1"] .sky { filter: hue-rotate(38deg) saturate(1.35); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

/* ---------- Header ---------- */
.top, .wrap, .foot { position: relative; z-index: 1; }
.top {
  max-width: 1040px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; min-width: 0; }
.brand-mark { width: 38px; height: 38px; flex: none; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.35)); }
.brand-mark svg { width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-name { font-weight: 900; font-size: 19px; letter-spacing: 0.01em; color: #fff; white-space: nowrap; }
.brand-cjk { font-weight: 700; font-size: 12px; color: var(--gold-l); margin-left: 2px; }
.brand-sub { font-size: 11px; font-weight: 600; color: #cfc6f5; white-space: nowrap; }
.top-right { display: flex; align-items: center; gap: 8px; }
.flags { display: flex; gap: 5px; }
.flag { display: block; width: 28px; height: 20px; border-radius: 5px; overflow: hidden; border: 2px solid rgba(255, 255, 255, 0.35); opacity: 0.75; transition: transform 0.15s, opacity 0.15s; }
.flag img { width: 100%; height: 100%; object-fit: cover; }
.flag:hover { opacity: 1; transform: translateY(-1px); }
.flag.active { opacity: 1; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255, 200, 61, 0.35); }
.avatar { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--ink); background: var(--gold); color: var(--ink); font-weight: 900; font-size: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: 14px;
  border: 3px solid var(--ink); background: #fff; color: var(--ink);
  font-weight: 800; font-size: 14px; text-decoration: none;
  box-shadow: 0 3px 0 var(--ink);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.15s;
}
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-gold { background: linear-gradient(var(--gold-l), var(--gold)); }
.btn-outline { background: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 12px; }
.btn-lg { padding: 13px 20px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, 0.4); color: #fff; box-shadow: none; }
.btn-ghost:active { transform: none; }
.modal .btn-ghost, .soft-card .btn-ghost, .feature-bar .btn-ghost { color: var(--ink); border-color: rgba(58, 31, 61, 0.35); }

/* ---------- Hero ---------- */
.wrap { max-width: 560px; margin: 0 auto; padding: 0 12px; }
.hero { text-align: center; padding: 4px 0 14px; }
.hero-title { margin: 0 0 4px; font-size: 30px; line-height: 1.1; font-weight: 900; letter-spacing: 0.005em; text-shadow: 0 3px 0 rgba(27, 20, 70, 0.9); }
.hero-sub { margin: 0 auto 10px; max-width: 460px; font-size: 14px; line-height: 1.45; color: #d9d0f5; font-weight: 500; }
.trust { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.trust li {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px 5px 7px; border-radius: 99px;
  font-size: 12px; font-weight: 700; color: #fff;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.22);
}
.trust li::before {
  content: ""; flex: none; width: 15px; height: 15px; border-radius: 50%;
  background: var(--gold)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4l2.6 2.6L12 5.4' fill='none' stroke='%233a1f3d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.hero-cta {
  margin-top: 10px; padding: 8px 18px; border-radius: 99px;
  border: 3px solid var(--ink); background: linear-gradient(var(--gold-l), var(--gold)); color: var(--ink);
  font-weight: 900; font-size: 14px; box-shadow: 0 3px 0 var(--ink);
}
.hero-cta:active { transform: translateY(3px); box-shadow: none; }

/* ---------- Stage (the booth) ---------- */
.stage {
  position: relative; overflow: hidden;
  width: 100%; max-width: 540px; margin: 6px auto 0; padding-bottom: 12px;
  background: linear-gradient(180deg, var(--cream), var(--sand));
  border: 4px solid var(--ink); border-radius: 26px;
  box-shadow: 0 6px 0 var(--ink), 0 24px 44px rgba(10, 5, 40, 0.5);
  color: var(--ink);
  transition: box-shadow 0.4s, background 0.4s;
}
.stage[data-fs="1"] {
  background: linear-gradient(180deg, #fff0cf, #ffd98a);
  box-shadow: 0 6px 0 var(--ink), 0 0 0 4px var(--gold), 0 0 46px rgba(255, 200, 61, 0.6);
}
.awning {
  position: relative; z-index: 1; height: 36px;
  background: repeating-linear-gradient(90deg, var(--coral) 0 28px, var(--cream) 28px 56px);
  -webkit-mask: radial-gradient(circle at 14px 0, #000 13.5px, transparent 14.5px) bottom / 28px 14px repeat-x, linear-gradient(#000 0 0) top / 100% calc(100% - 13px) no-repeat;
  mask: radial-gradient(circle at 14px 0, #000 13.5px, transparent 14.5px) bottom / 28px 14px repeat-x, linear-gradient(#000 0 0) top / 100% calc(100% - 13px) no-repeat;
  filter: drop-shadow(0 3px 0 rgba(58, 31, 61, 0.9));
}
.stage[data-fs="1"] .awning { background: repeating-linear-gradient(90deg, var(--gold) 0 28px, var(--coral) 28px 56px); }
.plate {
  position: absolute; z-index: 3; top: 9px; left: 50%; transform: translateX(-50%);
  padding: 3px 16px; border-radius: 99px;
  background: var(--cream); border: 3px solid var(--ink);
  font-weight: 900; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap;
  box-shadow: 0 2px 0 var(--ink);
}

.status-row {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  min-height: 68px; margin-top: -4px; padding: 0 14px 10px 104px;
}
.mascot-wrap { position: absolute; left: 10px; bottom: 0; width: 82px; pointer-events: none; }
.mascot { width: 100%; height: auto; overflow: visible; }
.mascot-img { object-fit: contain; }
.bubble {
  position: relative; flex: 1; min-width: 0; min-height: 40px;
  display: flex; align-items: center;
  padding: 7px 12px; border-radius: 16px;
  background: #fff; border: 3px solid var(--ink);
  font-weight: 800; font-size: 13px; line-height: 1.25; color: var(--ink);
}
.bubble::before {
  content: ""; position: absolute; left: -9px; top: 50%; width: 12px; height: 12px;
  background: #fff; border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
  transform: translateY(-50%) rotate(45deg);
}
.bubble.pop { animation: bubblepop 0.3s ease-out; }
@keyframes bubblepop { 0% { transform: scale(0.9); } 60% { transform: scale(1.05); } 100% { transform: scale(1); } }
.winbox { text-align: right; flex: none; min-width: 70px; }
.winbox-lbl { display: block; font-size: 10px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.winbox-val { display: block; font-size: 20px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; }
.winbox.win .winbox-val { color: #d4640a; animation: winpulse 0.5s ease-out; }
@keyframes winpulse { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }

.fs-banner {
  margin: 0 14px 10px; padding: 6px 12px; border-radius: 99px;
  background: linear-gradient(#ff7a6b, var(--coral-d)); color: #fff;
  border: 3px solid var(--ink);
  font-weight: 900; font-size: 13px; text-align: center; letter-spacing: 0.02em;
  box-shadow: 0 3px 0 var(--ink);
}

/* ---------- Reels ---------- */
.reels-frame { padding: 0 12px; }
.reels {
  position: relative; margin: 0 auto;
  width: calc(3 * var(--cw) + 2 * var(--gap) + 2 * var(--pad) + 10px);
  padding: var(--pad);
  background: #4a2b55;
  border: 5px solid var(--gold); border-radius: 22px;
  box-shadow: 0 0 0 3px var(--ink), inset 0 6px 16px rgba(0, 0, 0, 0.5), 0 5px 0 3px var(--ink);
  touch-action: manipulation;
}
.reels::before {
  content: ""; position: absolute; inset: 0; border-radius: 17px; pointer-events: none;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18);
}
.reels-cols { display: grid; grid-template-columns: repeat(3, var(--cw)); gap: var(--gap); }
.reel {
  position: relative; width: var(--cw); height: calc(var(--ch) * 3);
  overflow: hidden; border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #fff3da 100%);
  transition: box-shadow 0.15s;
}
.reel::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, rgba(58, 31, 61, 0.32), transparent 24%, transparent 76%, rgba(58, 31, 61, 0.32));
}
.strip { position: absolute; left: 0; top: 0; width: 100%; will-change: transform; }
.cell { height: var(--ch); display: grid; place-items: center; position: relative; }
.cell + .cell::before { content: ""; position: absolute; top: 0; left: 14%; right: 14%; border-top: 2px dashed rgba(58, 31, 61, 0.08); }
.sym { width: var(--sz); height: var(--sz); overflow: visible; filter: drop-shadow(0 2px 0 rgba(58, 31, 61, 0.18)); }
.strip.spinning .sym { filter: blur(1.2px); }
.reels.has-win .cell:not(.win) { opacity: 0.4; filter: saturate(0.5); transition: opacity 0.25s, filter 0.25s; }
.cell.win { z-index: 1; }
.cell.win::after {
  content: ""; position: absolute; inset: 4%; border-radius: 14px; z-index: -1;
  background: radial-gradient(circle, #fff3b0 0%, rgba(255, 226, 122, 0.55) 55%, transparent 75%);
  animation: cellglow 0.75s ease-in-out infinite alternate;
}
.cell.win .sym { animation: symhop 0.8s ease-in-out infinite; }
.reels.quiet .cell.win .sym { animation: none; }
.reels.quiet .cell.win::after { animation: none; opacity: 0.7; }
.reel.landed .strip { animation: landbump 0.22s ease-out; }
@keyframes cellglow { from { opacity: 0.55; transform: scale(0.92); } to { opacity: 1; transform: scale(1.04); } }
@keyframes symhop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1) rotate(-2deg); } }
@keyframes landbump { 0% { transform: translateY(0); } 40% { transform: translateY(4px); } 100% { transform: translateY(0); } }

.lines-svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; overflow: visible; }
.lines-svg polyline { fill: none; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; opacity: 0.92; stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: drawline 0.5s ease-out forwards; filter: drop-shadow(0 1px 0 rgba(58, 31, 61, 0.8)); }
@keyframes drawline { to { stroke-dashoffset: 0; } }

/* Anticipation: two envelopes already showing, the last reel is still turning */
.reel.hot { box-shadow: 0 0 0 3px var(--gold-l), 0 0 22px 4px rgba(255, 200, 61, 0.85); animation: hotpulse 0.4s ease-in-out infinite alternate; }
@keyframes hotpulse { from { box-shadow: 0 0 0 3px var(--gold-l), 0 0 12px 2px rgba(255, 200, 61, 0.6); } to { box-shadow: 0 0 0 3px #fff, 0 0 28px 6px rgba(255, 200, 61, 1); } }

/* Nudge / Hold controls on the reels */
.nudge {
  position: absolute; left: 50%; z-index: 5; display: none;
  width: calc(var(--cw) * 0.7); height: 30px; margin-left: calc(var(--cw) * -0.35);
  border: 3px solid var(--ink); border-radius: 99px;
  background: linear-gradient(var(--gold-l), var(--gold)); box-shadow: 0 3px 0 var(--ink);
  animation: nudgepulse 1s ease-in-out infinite;
}
.nudge.up { top: 5px; }
.nudge.down { bottom: 5px; }
.nudge::before {
  content: ""; position: absolute; left: 50%; top: 50%; margin: -5px 0 0 -8px;
  border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 10px solid var(--ink);
}
.nudge.down::before { border-bottom: 0; border-top: 10px solid var(--ink); }
.nudge:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.reels[data-feature="nudge"] .nudge { display: block; }
.reels.busy .nudge { display: none; }
@keyframes nudgepulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.hold-pill {
  position: absolute; left: 50%; bottom: 6px; z-index: 5; transform: translateX(-50%);
  display: none; padding: 3px 10px; border-radius: 99px;
  border: 3px solid var(--ink); background: var(--gold); color: var(--ink);
  font-weight: 900; font-size: 11px; letter-spacing: 0.06em;
}
.reels[data-feature="hold"] .hold-pill { display: block; }
.reels[data-feature="hold"] .reel:not(.held) .hold-pill { width: 34px; height: 18px; padding: 0; color: transparent; background: rgba(255, 255, 255, 0.8); }
.reels[data-feature="hold"] .reel { cursor: pointer; }
.reel.held { box-shadow: 0 0 0 3px var(--gold), 0 0 18px 2px rgba(255, 200, 61, 0.8); }
.reels.busy .hold-pill { display: none; }

/* Tier celebration + particles */
.tier-fx { position: absolute; inset: 0; z-index: 7; pointer-events: none; overflow: visible; }
.tier {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 8px 26px 10px; text-align: center; white-space: nowrap;
  background: linear-gradient(var(--gold-l), #ffb020); color: var(--ink);
  border: 4px solid var(--ink); border-radius: 20px; box-shadow: 0 5px 0 var(--ink);
  animation: tierpop 2.4s ease forwards;
}
.tier-name { display: block; font-weight: 900; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.tier-amt { display: block; font-weight: 900; font-size: 32px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tier-x { display: block; font-weight: 800; font-size: 12px; }
.tier.mega { background: linear-gradient(#ff9ad0, var(--pink) 55%, #e8368a); color: #fff; }
.tier.mega .tier-name, .tier.mega .tier-amt, .tier.mega .tier-x { text-shadow: 0 2px 0 var(--ink); }
@keyframes tierpop {
  0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0; }
  12% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
  20% { transform: translate(-50%, -50%) scale(1); }
  85% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -56%) scale(0.9); opacity: 0; }
}
.pcl {
  position: absolute; left: 50%; top: 50%; width: var(--s); height: var(--s);
  background: var(--c); border: 2px solid var(--ink); border-radius: var(--r);
  animation: burst var(--t) cubic-bezier(0.15, 0.7, 0.3, 1) forwards;
}
@keyframes burst {
  0% { transform: translate(-50%, -50%) rotate(0) scale(0.3); opacity: 1; }
  75% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scale(1); opacity: 0; }
}

/* Free-spin intro / outro overlay */
.overlay {
  position: absolute; inset: -5px; z-index: 8; display: grid; place-items: center; text-align: center;
  border-radius: 22px; padding: 14px; cursor: pointer;
  background: radial-gradient(circle at 50% 45%, rgba(45, 31, 110, 0.55), rgba(27, 20, 70, 0.92));
  animation: ovin 0.3s ease-out;
}
.ov-title {
  display: block; font-weight: 900; font-size: 36px; line-height: 1; letter-spacing: 0.03em; color: var(--gold-l);
  text-shadow: 0 4px 0 var(--ink), 0 0 24px rgba(255, 200, 61, 0.7);
  animation: ovtitle 0.7s cubic-bezier(0.2, 1.3, 0.4, 1);
}
.ov-text { display: block; margin-top: 10px; font-weight: 800; font-size: 16px; color: #fff; text-shadow: 0 2px 0 var(--ink); }
.ov-amt { display: block; margin-top: 6px; font-weight: 900; font-size: 30px; color: #fff; text-shadow: 0 3px 0 var(--ink); }
@keyframes ovin { from { opacity: 0; } to { opacity: 1; } }
@keyframes ovtitle { 0% { transform: scale(0.3) rotate(-6deg); } 100% { transform: scale(1) rotate(0); } }

/* ---------- Feature bar + deck ---------- */
.feature-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 12px 12px 0; padding: 8px 12px;
  background: linear-gradient(#fff3b0, #ffd24a); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 3px 0 var(--ink);
  animation: slidein 0.25s ease-out;
}
.feature-text strong { display: block; font-weight: 900; font-size: 14px; }
.feature-text span { display: block; font-weight: 700; font-size: 12px; line-height: 1.3; }
.feature-side { display: flex; align-items: center; gap: 8px; flex: none; }
.feature-preview { font-weight: 900; font-size: 12px; }
@keyframes slidein { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.deck { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px 0; }
.reel-hint { font-size: 12px; font-weight: 700; color: var(--muted); opacity: 0; transition: opacity 0.2s; }
.reel-hint.show { opacity: 1; }
.deck-toggles { display: flex; gap: 6px; margin-left: auto; }
.chip {
  padding: 4px 11px; border-radius: 99px; border: 2px solid var(--ink); background: #fff; color: var(--ink);
  font-weight: 800; font-size: 11px; letter-spacing: 0.02em;
}
.chip[aria-pressed="true"] { background: var(--gold); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5); }

/* ---------- Info row, soft card, footer ---------- */
.info-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px auto 0; }
.info-row button, .info-row a {
  padding: 8px 15px; border-radius: 99px; text-decoration: none;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.28); color: #fff;
  font-weight: 700; font-size: 13px;
}
.info-row button:hover, .info-row a:hover { background: rgba(255, 255, 255, 0.18); }
.soft-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  max-width: 540px; margin: 16px auto 0; padding: 12px 14px;
  background: var(--cream); color: var(--ink); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 var(--ink);
  animation: slidein 0.3s ease-out;
}
.soft-card strong { font-size: 15px; font-weight: 900; }
.soft-card p { margin: 2px 0 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.soft-actions { display: flex; gap: 8px; }
.foot { max-width: 760px; margin: 0 auto; padding: 26px 16px calc(var(--cmd-h) + 28px); text-align: center; font-size: 12px; line-height: 1.7; color: #b8afe3; }
.foot strong { color: #fff; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-top: 4px; }
.foot-links a { color: #cfc6f5; text-decoration: none; }
.foot-links a:hover { color: #fff; text-decoration: underline; }

/* ---------- Fixed command bar ---------- */
.cmd {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; align-items: center; gap: 8px;
  padding: 9px max(10px, calc((100vw - 560px) / 2)) calc(9px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, var(--cream), #ffe3b3);
  border-top: 4px solid var(--ink);
  box-shadow: 0 -10px 28px rgba(10, 5, 40, 0.4);
  color: var(--ink);
}
.cmd-lbl { display: block; font-weight: 800; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.cmd-lbl.tokens { color: var(--teal-d); }
.cmd-balance {
  position: relative; flex: 1 1 0; min-width: 0; text-align: left;
  padding: 5px 10px; border: 3px solid var(--ink); border-radius: 14px; background: #fff; color: var(--ink);
  line-height: 1.12; transition: background 0.3s;
}
button.cmd-balance { cursor: pointer; }
.cmd-val { display: block; font-weight: 900; font-size: 19px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmd-cur { font-size: 13px; margin-right: 1px; opacity: 0.7; }
.cmd-sub { display: block; font-size: 11px; font-weight: 800; color: var(--teal-d); }
.cmd-delta { position: absolute; right: 8px; top: 2px; font-weight: 900; font-size: 12px; opacity: 0; }
.cmd-delta.show { animation: deltafloat 1.1s ease-out; }
.cmd-delta.up { color: #12935a; }
.cmd-delta.down { color: var(--coral-d); }
@keyframes deltafloat { 0% { opacity: 0; transform: translateY(8px); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
.cmd.flash-up .cmd-balance { background: #d9ffec; }
.cmd.flash-down .cmd-balance { background: #ffe6e9; }
.cmd-bet { display: flex; align-items: center; flex: none; border: 3px solid var(--ink); border-radius: 14px; background: #fff; overflow: hidden; }
.cmd-step { width: 32px; height: 46px; border: 0; background: transparent; font-weight: 900; font-size: 22px; color: var(--ink); }
.cmd-step:active { background: var(--sand); }
.cmd-step:disabled { opacity: 0.3; }
.cmd-bet-val { min-width: 54px; text-align: center; line-height: 1.12; }
.cmd-bet-val span:last-child { display: block; font-weight: 900; font-size: 16px; font-variant-numeric: tabular-nums; }
.spin {
  flex: 0 0 auto; min-width: 98px; height: 58px; padding: 0 12px;
  border: 4px solid var(--ink); border-radius: 20px;
  background: linear-gradient(#ff8576, var(--coral) 55%, #e0364c); color: #fff;
  font-weight: 900; font-size: 19px; letter-spacing: 0.05em; text-shadow: 0 2px 0 rgba(58, 31, 61, 0.55);
  box-shadow: 0 5px 0 var(--ink), inset 0 3px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.15s;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05;
}
.spin:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink), inset 0 3px 0 rgba(255, 255, 255, 0.4); }
.spin:disabled { filter: grayscale(0.5) brightness(0.9); cursor: not-allowed; transform: none; box-shadow: 0 5px 0 var(--ink); }
.spin.ready { animation: spinpulse 2.2s ease-in-out infinite; }
.spin.alt { background: linear-gradient(var(--gold-l), var(--gold)); color: var(--ink); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6); }
.spin.stop { background: linear-gradient(#a58cff, var(--violet) 55%, #5b3fd6); }
.spin-sub { display: block; margin-top: 2px; font-weight: 800; font-size: 11px; letter-spacing: 0.02em; opacity: 0.9; text-shadow: none; }
.spin.has-sub .spin-main { font-size: 16px; }
@keyframes spinpulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
.cmd-add {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--ink);
  background: linear-gradient(var(--gold-l), var(--gold)); color: var(--ink); font-weight: 900; font-size: 22px; line-height: 1; box-shadow: 0 3px 0 var(--ink);
}
.cmd-add:active { transform: translateY(3px); box-shadow: none; }

/* ---------- Toasts ---------- */
.toast-stack {
  position: fixed; z-index: 200; left: 50%; transform: translateX(-50%);
  top: calc(env(safe-area-inset-top) + 10px); width: min(94vw, 440px);
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 8px; max-width: 100%;
  padding: 7px 14px 7px 8px; border-radius: 99px;
  background: #fff; color: var(--ink); border: 3px solid var(--ink); box-shadow: 0 4px 0 var(--ink), 0 10px 24px rgba(10, 5, 40, 0.4);
  font-weight: 700; font-size: 13px; line-height: 1.25;
  animation: toastin 0.35s cubic-bezier(0.2, 1.2, 0.4, 1);
}
.toast.out { animation: toastout 0.3s ease-in forwards; }
.toast-ico { width: 28px; height: 28px; flex: none; }
.toast strong { font-weight: 900; color: #d4640a; }
.toast.sys { background: var(--ink); color: #fff; border-color: #fff; padding-left: 14px; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35); }
.toast.err { background: #ffe3e6; border-color: var(--coral-d); color: #7a1226; padding-left: 14px; }
@keyframes toastin { from { opacity: 0; transform: translateY(-14px) scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes toastout { to { opacity: 0; transform: translateY(-10px) scale(0.95); } }

/* ---------- Modals (plain cream: money + trust screens) ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-end; justify-content: center;
  background: rgba(20, 10, 50, 0.7); backdrop-filter: blur(3px);
}
.modal-backdrop.open { display: flex; }
.modal {
  width: 100%; max-width: 560px; max-height: 90vh; max-height: 90dvh; overflow-y: auto;
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
  background: var(--cream); color: var(--text);
  border: 4px solid var(--ink); border-bottom: 0; border-radius: 24px 24px 0 0;
  animation: sheetup 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
  -webkit-overflow-scrolling: touch;
}
.modal-sm { max-width: 460px; }
@media (min-width: 700px) {
  .modal-backdrop { align-items: center; }
  .modal { border-bottom: 4px solid var(--ink); border-radius: 24px; padding-bottom: 20px; box-shadow: 0 8px 0 var(--ink); }
}
@keyframes sheetup { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-head h2 { margin: 0; font-size: 20px; font-weight: 900; color: var(--ink); }
.modal-close { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; color: var(--ink); font-weight: 900; font-size: 20px; line-height: 1; }
.modal-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; }
.modal-tab { flex: none; padding: 6px 12px; border-radius: 99px; border: 2px solid var(--line); background: #fff; color: var(--muted); font-weight: 800; font-size: 13px; }
.modal-tab.active { border-color: var(--ink); background: var(--gold); color: var(--ink); }
.muted { color: var(--muted); font-size: 14px; line-height: 1.5; font-weight: 500; }
.small { font-size: 12px; }
.pos { color: #12935a; }
.h3 { margin: 4px 0 6px; font-size: 16px; font-weight: 900; color: var(--ink); }
.rule { border: 0; border-top: 2px dashed var(--line); margin: 16px 0; }
.field { margin-bottom: 12px; }
.field label, .lbl { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 800; letter-spacing: 0.02em; color: var(--muted); }
.input {
  width: 100%; padding: 10px 12px; border: 3px solid #e4cfa6; border-radius: 12px; background: #fff;
  color: var(--ink); font-family: inherit; font-weight: 600; font-size: 15px;
}
.input:focus { outline: 0; border-color: var(--gold-d); box-shadow: 0 0 0 3px rgba(255, 200, 61, 0.35); }
.inline { display: flex; gap: 8px; }
.inline .input { flex: 1; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.presets { display: flex; gap: 6px; margin-bottom: 10px; }
.preset { flex: 1; padding: 8px 0; border-radius: 12px; border: 2px solid var(--line); background: #fff; color: var(--ink); font-weight: 800; font-size: 14px; }
.preset.active { border-color: var(--ink); background: var(--gold); }
.result-box { margin-top: 10px; padding: 10px 12px; background: #fff; border: 3px dashed var(--line); border-radius: 12px; font-size: 13px; line-height: 1.5; color: var(--text); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; word-break: break-all; padding: 8px 10px; background: #fff; border: 2px solid var(--line); border-radius: 10px; color: var(--ink); margin: 4px 0; }
.note { padding: 10px 12px; margin-bottom: 12px; background: #fff3b0; border: 3px solid var(--ink); border-radius: 12px; font-size: 13px; font-weight: 700; color: var(--ink); }
.stat-pair, .spec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-bottom: 12px; }
.stat-pair > div, .spec-grid > div { padding: 8px 12px; background: #fff; border: 2px solid var(--line); border-radius: 12px; }
.stat-pair strong, .spec-grid strong { display: block; font-size: 18px; font-weight: 900; color: var(--ink); }
.sandbox { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 8px 12px; border: 2px dashed var(--line); border-radius: 12px; font-size: 12px; color: var(--muted); font-weight: 600; }
.shop-grid { display: grid; gap: 8px; }
.shop-item { padding: 10px 12px; background: #fff; border: 2px solid var(--line); border-radius: 14px; }
.shop-name { font-weight: 800; font-size: 14px; color: var(--ink); }
.shop-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; color: var(--ink); }
.steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; font-size: 14px; line-height: 1.55; font-weight: 500; }
.steps li::marker { font-weight: 900; color: var(--coral-d); }
.promo-details { margin-bottom: 12px; }
.promo-details summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--muted); margin-bottom: 8px; }

/* Payout table */
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.pay-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; background: #fff; border: 2px solid var(--line); border-radius: 14px; min-width: 0; }
.pay-row.pay-wild, .pay-row.pay-scatter { grid-column: 1 / -1; background: #fff8e0; border-color: var(--gold-d); }
.pay-ico { width: 40px; height: 40px; flex: none; }
.pay-icos { display: flex; flex: none; }
.pay-icos .pay-ico { width: 34px; height: 34px; margin-right: -6px; }
.pay-name { flex: 1; min-width: 0; font-weight: 800; font-size: 13px; line-height: 1.2; color: var(--ink); }
.pay-val { flex: none; font-weight: 900; font-size: 14px; color: var(--coral-d); white-space: nowrap; }
.line-mini-wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 6px 0 12px; }
.line-mini { display: grid; grid-template-columns: repeat(3, 10px); gap: 2px; padding: 4px; background: #fff; border: 2px solid var(--line); border-radius: 8px; }
.line-mini i { width: 10px; height: 10px; border-radius: 3px; background: #ead9bb; }
.line-mini i.on { background: var(--coral); }
.line-mini-cap { font-size: 12px; font-weight: 800; color: var(--muted); }
.rules { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 13px; line-height: 1.5; font-weight: 500; color: var(--text); }
.rules li::marker { color: var(--gold-d); }

/* ---------- Mascot ---------- */
.mascot .eyes-open, .mascot .eyes-closed, .mascot .mouth-open, .mascot .m-band, .mascot .m-sparkles { display: none; }
.mascot .m-all { transform-origin: 70px 150px; animation: mbob 3.2s ease-in-out infinite; }
.mascot .m-paw { transform-origin: 112px 100px; animation: mwave 1.5s ease-in-out infinite; }
.mascot .m-head { transform-origin: 70px 90px; }
.mascot .eyes-happy { transform-origin: 70px 55px; animation: mblink 5.5s infinite; }
.mascot .sp { transform-box: fill-box; transform-origin: center; animation: twinkle 0.9s ease-in-out infinite; }
.mascot .sp2 { animation-delay: 0.22s; }
.mascot .sp3 { animation-delay: 0.45s; }
.mascot .sp4 { animation-delay: 0.67s; }
.mascot[data-fs="1"] .m-band { display: block; }
.mascot[data-state="spin"] .eyes-happy { display: none; }
.mascot[data-state="spin"] .eyes-open { display: block; }
.mascot[data-state="spin"] .m-paw { animation-duration: 0.45s; }
.mascot[data-state="spin"] .m-head { animation: mshake 0.3s linear infinite; }
.mascot[data-state="think"] .eyes-happy { display: none; }
.mascot[data-state="think"] .eyes-open { display: block; }
.mascot[data-state="think"] .m-head { transform: rotate(-7deg); }
.mascot[data-state="win"] .mouth-smile, .mascot[data-state="big"] .mouth-smile { display: none; }
.mascot[data-state="win"] .mouth-open, .mascot[data-state="big"] .mouth-open { display: block; }
.mascot[data-state="win"] .m-sparkles, .mascot[data-state="big"] .m-sparkles { display: block; }
.mascot[data-state="win"] .m-all { animation: mjump 0.55s ease-out 2; }
.mascot[data-state="win"] .m-paw { animation-duration: 0.6s; }
.mascot[data-state="big"] .m-all { animation: mjump 0.5s ease-out infinite; }
.mascot[data-state="big"] .m-paw { animation-duration: 0.35s; }
.mascot[data-state="lose"] .eyes-happy { display: none; }
.mascot[data-state="lose"] .eyes-closed { display: block; }
.mascot[data-state="lose"] .m-all { animation: none; }
.mascot[data-state="lose"] .m-paw { animation-duration: 3s; }
.mascot-img[data-state="win"], .mascot-img[data-state="big"] { animation: mjump 0.55s ease-out 2; }
@keyframes mbob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes mwave { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(16deg); } }
@keyframes mshake { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes mjump { 0% { transform: translateY(0) scale(1, 1); } 35% { transform: translateY(-14px) scale(0.97, 1.04); } 70% { transform: translateY(0) scale(1.04, 0.96); } 100% { transform: translateY(0) scale(1, 1); } }
@keyframes mblink { 0%, 93%, 100% { transform: scaleY(1); } 95.5% { transform: scaleY(0.12); } }
@keyframes twinkle { 0%, 100% { transform: scale(0.3) rotate(0); opacity: 0; } 50% { transform: scale(1) rotate(20deg); opacity: 1; } }

/* ---------- Document / blocked pages ---------- */
.doc {
  position: relative; z-index: 1; max-width: 760px; margin: 8px auto 40px; padding: 22px 22px 26px;
  background: var(--cream); color: var(--text); border: 4px solid var(--ink); border-radius: 24px; box-shadow: 0 6px 0 var(--ink);
  line-height: 1.65; font-size: 15px;
}
.doc h1 { margin: 0 0 12px; font-size: 26px; font-weight: 900; color: var(--ink); }
.doc h2 { margin: 22px 0 6px; font-size: 18px; font-weight: 900; color: var(--ink); }
.doc p { margin: 0 0 10px; }
.doc code { padding: 1px 6px; background: #fff; border: 1px solid var(--line); border-radius: 6px; font-size: 0.9em; }
.doc a { color: var(--coral-d); font-weight: 700; }
.center-page { display: grid; place-items: center; padding: 20px; }
.center-page .card { position: relative; z-index: 1; max-width: 520px; padding: 26px; text-align: center; background: var(--cream); color: var(--text); border: 4px solid var(--ink); border-radius: 24px; box-shadow: 0 6px 0 var(--ink); }
.center-page .card .brand-mark { margin: 0 auto 10px; width: 56px; height: 56px; }
.center-page .card h1 { margin: 0 0 10px; font-size: 22px; font-weight: 900; color: var(--ink); }
.center-page .card p { margin: 0; line-height: 1.6; }

/* ---------- Small screens ---------- */
@media (max-width: 440px) {
  .brand-sub { display: none; }
  .brand-name { font-size: 18px; }
  .flag { width: 24px; height: 17px; }
  .flags { gap: 4px; }
  .top { padding: 8px 10px; }
  .top-right { gap: 6px; }
  .hero-title { font-size: 26px; }
  .cmd { gap: 6px; padding-left: 8px; padding-right: 8px; }
  .cmd-step { width: 28px; }
  .cmd-bet-val { min-width: 48px; }
  .spin { min-width: 92px; }
  .grid-2 { grid-template-columns: 1fr; }
  .pay-grid { grid-template-columns: 1fr; }
  .status-row { padding-left: 98px; }
  .mascot-wrap { width: 78px; }
  .cmd-add { width: 36px; height: 36px; }
}
/* Short phones: keep the whole machine above the fixed bar */
@media (max-width: 560px) and (max-height: 760px) {
  .hero { padding-bottom: 8px; }
  .hero-title { font-size: 23px; margin-bottom: 6px; }
  .hero-sub, .hero-cta { display: none; }
  .trust li { padding: 3px 9px 3px 6px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
