:root {
  --bg: #0b0610;
  --panel: #1a1024;
  --ink: #ffe9f2;
  --muted: #c9a3b5;
  --pink: #ff6b9d;
  --gold: #f4c56a;
  --line: #3a2438;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--ink);
  font-family: "Zen Kaku Gothic New", system-ui, sans-serif;
  background: var(--bg);
  overflow-x: hidden;
}
.night {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 500px at 20% -10%, #5a163866, transparent 60%),
    radial-gradient(700px 420px at 90% 0%, #2a1850aa, transparent 55%),
    linear-gradient(#140a18, #0b0610 50%, #1a0c14);
}
.petals { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.top, .tabs, .view, footer { width: min(980px, calc(100% - 1.5rem)); margin-inline: auto; }
.top {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: 1.2rem 0 .6rem; flex-wrap: wrap;
}
.brand { display: flex; gap: .8rem; align-items: center; }
.mark {
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #ff8fb3, #c44569);
  font-size: 1.4rem; box-shadow: 0 8px 24px #ff6b9d44;
}
h1 {
  font-family: "Cormorant Garamond", serif;
  margin: 0; font-size: 1.7rem; letter-spacing: .04em;
}
.brand p { margin: .1rem 0 0; color: var(--muted); font-size: .78rem; }
.wallets { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip {
  min-width: 110px; padding: .45rem .75rem; border-radius: 12px;
  background: #24162c; border: 1px solid var(--line);
}
.chip span { display: block; color: var(--muted); font-size: .68rem; }
.chip strong { font-size: 1.05rem; }
.chip.gold strong { color: var(--gold); }
.chip.pink strong { color: var(--pink); }
.tabs { display: flex; gap: .4rem; margin: .4rem auto 1rem; }
.tab {
  border: 1px solid var(--line); background: #160e1c; color: var(--muted);
  border-radius: 999px; padding: .4rem 1rem; cursor: pointer; font: inherit;
}
.tab.on { color: var(--ink); background: #2a1730; border-color: #ff6b9d66; }
.play-grid {
  display: grid; grid-template-columns: 210px 1fr; gap: 1rem; align-items: stretch;
}
.muse {
  background: #17101d; border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; display: flex; flex-direction: column;
}
.muse-art { flex: 1; min-height: 280px; display: grid; }
.muse-art svg { width: 100%; height: 100%; object-fit: cover; }
.muse-meta { padding: .65rem .8rem .85rem; }
.muse-meta strong { display: block; font-family: "Cormorant Garamond", serif; font-size: 1.2rem; }
.muse-meta span { color: var(--muted); font-size: .78rem; }
.machine { position: relative; }
.lanterns { position: absolute; inset: -10px 8px auto; display: flex; justify-content: space-between; }
.lanterns i {
  width: 18px; height: 28px; border-radius: 8px 8px 10px 10px;
  background: radial-gradient(circle at 50% 30%, #ffe08a, #ff6b3d);
  box-shadow: 0 0 24px #ff8a4c88;
}
.frame {
  background: linear-gradient(#3a2430, #24151f);
  border: 3px solid #f4c56a88;
  border-radius: 22px;
  padding: 14px;
  box-shadow: 0 20px 50px #0008, inset 0 0 40px #ff6b9d22;
  position: relative;
}
.reels {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
  background: #09060c; border-radius: 14px; padding: 10px; overflow: hidden;
}
.reel {
  height: 318px; overflow: hidden; border-radius: 10px;
  background: linear-gradient(#1c1220, #120c16);
  position: relative;
}
.reel::before, .reel::after {
  content: ""; position: absolute; left: 0; right: 0; height: 28px; z-index: 2; pointer-events: none;
}
.reel::before { top: 0; background: linear-gradient(#09060c, transparent); }
.reel::after { bottom: 0; background: linear-gradient(transparent, #09060c); }
.strip { display: flex; flex-direction: column; }
.cell {
  height: 106px; display: grid; place-items: center;
  font-size: 2.4rem; border-bottom: 1px solid #ffffff0d;
}
.cell.win { animation: glow .9s ease; }
@keyframes glow {
  50% { background: #ff6b9d33; text-shadow: 0 0 18px #ffd; }
}
.banner {
  text-align: center; color: var(--gold); min-height: 1.4em; margin: .8rem 0 0;
  font-family: "Cormorant Garamond", serif; font-size: 1.15rem;
}
.controls {
  display: flex; justify-content: center; align-items: center;
  gap: 1rem; margin: 1.2rem 0 2rem; flex-wrap: wrap;
}
.bet {
  display: flex; align-items: center; gap: .6rem;
  background: #1a1022; border: 1px solid var(--line); border-radius: 16px; padding: .4rem;
}
.bet button, .refill {
  width: 42px; height: 42px; border-radius: 12px; border: 0;
  background: #2c1a32; color: var(--ink); font-size: 1.3rem; cursor: pointer;
}
.bet small { color: var(--muted); display: block; font-size: .7rem; }
.bet strong { font-size: 1.2rem; }
.spin {
  width: 108px; height: 108px; border-radius: 50%; border: 3px solid #ffd9a0;
  background: radial-gradient(circle at 35% 30%, #ffb3c9, #e11d74 55%, #7a1040);
  color: #fff; font-weight: 700; letter-spacing: .12em; cursor: pointer;
  box-shadow: 0 10px 30px #e11d7466, inset 0 0 20px #fff3;
}
.spin:disabled { opacity: .55; cursor: default; }
.spin.free { box-shadow: 0 10px 30px #f4c56a88, inset 0 0 20px #fff3; border-color: #f4c56a; }
.refill { width: auto; padding: 0 1rem; font-size: .9rem; }
.lead { color: var(--muted); }
.gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem; padding-bottom: 3rem;
}
.card {
  background: #17101d; border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; cursor: pointer; text-align: left; color: inherit; font: inherit;
  padding: 0;
}
.card .art { height: 280px; display: grid; place-items: end center; position: relative; overflow: hidden; }
.card .art svg { width: 100%; height: 100%; }
.card.on { border-color: #ff6b9d99; box-shadow: 0 0 0 1px #ff6b9d55; }
.card .meta { padding: .7rem .85rem 1rem; }
.card h3 { margin: 0; font-family: "Cormorant Garamond", serif; font-size: 1.25rem; }
.card p { margin: .15rem 0 0; color: var(--muted); font-size: .82rem; }
.card.locked .art { filter: blur(7px) saturate(.75) brightness(.55); }
.lock {
  position: absolute; inset: auto 10px 10px auto;
  background: #000a; border-radius: 999px; padding: .2rem .55rem; font-size: .75rem;
}
.paygrid { display: grid; gap: .5rem; }
.payrow {
  display: grid; grid-template-columns: 56px 1fr auto; gap: .7rem; align-items: center;
  background: #17101d; border: 1px solid var(--line); border-radius: 12px; padding: .5rem .8rem;
}
.modal {
  position: fixed; inset: 0; background: #050208cc; display: grid; place-items: center;
  padding: 1rem; z-index: 20;
}
.modal[hidden] { display: none; }
.sheet {
  width: min(480px, 100%); background: #1a1022; border: 1px solid #f4c56a55;
  border-radius: 20px; overflow: hidden; max-height: 92vh; overflow-y: auto;
}
.sheet .hero { height: 420px; }
.sheet .hero svg { width: 100%; height: 100%; }
.sheet .body { padding: 1rem 1.1rem 1.2rem; }
.sheet h2 { margin: 0; font-family: "Cormorant Garamond", serif; }
.sheet button, .sheet .close {
  margin-top: .8rem; width: 100%; border: 0; border-radius: 12px; padding: .7rem;
  background: linear-gradient(90deg, #ff6b9d, #c44569); color: #fff; font: inherit; cursor: pointer;
}
.sheet .close { background: #2a1b30; }
footer { text-align: center; color: #7a5b6c; font-size: .78rem; padding: 0 0 2rem; }
@media (max-width: 800px) {
  .play-grid { grid-template-columns: 1fr; }
  .muse { display: none; }
}
@media (max-width: 640px) {
  .reel { height: 246px; }
  .cell { height: 82px; font-size: 1.8rem; }
  .spin { width: 88px; height: 88px; }
  .card .art { height: 240px; }
  .sheet .hero { height: 340px; }
}
