:root {
  --cell: min(56px, calc((100vw - 32px) / 8));
  --bg1: #fff3ea;
  --bg2: #ffe4ee;
  --ink: #3a1030;
  --muted: #9a6b83;
  --accent: #ff4d6d;
  --card: #fffdfb;
  --radius: 18px;
  --dur: .28s;
  --ease: cubic-bezier(.32, 1.28, .5, 1);

  --c0: #ff2d55; --c1: #ff9500; --c2: #ffd60a;
  --c3: #32d74b; --c4: #0a84ff; --c5: #bf5af2;

  --board-face: linear-gradient(150deg, #55203f, #310f28);
  --tile-radius: 14px;
  --glyph-fill: #ffffff;
}

body[data-theme="wood"] {
  --bg1: #efe0c9;
  --bg2: #e2cba9;
  --ink: #3a2415;
  --muted: #8a6b4a;
  --accent: #a85f34;
  --card: #f7eddc;
  --tile-radius: 6px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: "Baloo 2", ui-rounded, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(rgba(18,9,30,.40), rgba(18,9,30,.58)),
    #1b0f2e url("assets/bg.webp") center / cover no-repeat;
  display: flex; align-items: flex-start; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.wrap {
  width: 100%; max-width: 520px;
  padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(40px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

.hud { display: flex; gap: 8px; justify-content: space-between; align-items: stretch; margin-bottom: 10px; }
.hud-item {
  position: relative; flex: 1; min-height: 58px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  border: 1.5px solid transparent; border-radius: 999px; padding: 8px 10px; text-align: center;
  background:
    linear-gradient(180deg, #1d1a2b, #100e1a) padding-box,
    linear-gradient(135deg, #ff4d6d, #ffb23f, #4aa8ff, #b06bff) border-box;
  box-shadow: 0 6px 16px #00000066, inset 0 1px 0 rgba(255,255,255,.1), 0 0 18px 1px #b06bff66;
  animation: hudGlow 5s linear infinite;
}
.hud-item:nth-child(2) { animation-delay: -1.25s; }
.hud-item:nth-child(3) { animation-delay: -2.5s; }
.hud-item:nth-child(4) { animation-delay: -3.75s; }
@keyframes hudGlow {
  0%, 100% { box-shadow: 0 6px 16px #00000066, inset 0 1px 0 rgba(255,255,255,.1), 0 0 20px 2px #ff4d6d88; }
  20% { box-shadow: 0 6px 16px #00000066, inset 0 1px 0 rgba(255,255,255,.1), 0 0 20px 2px #ffb23f88; }
  40% { box-shadow: 0 6px 16px #00000066, inset 0 1px 0 rgba(255,255,255,.1), 0 0 20px 2px #ffd23f88; }
  60% { box-shadow: 0 6px 16px #00000066, inset 0 1px 0 rgba(255,255,255,.1), 0 0 20px 2px #5ecb6b88; }
  80% { box-shadow: 0 6px 16px #00000066, inset 0 1px 0 rgba(255,255,255,.1), 0 0 20px 2px #4aa8ff88; }
}
.hud-item.level-up { animation: levelUpPulse .6s ease; }
@keyframes levelUpPulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.16); box-shadow: 0 6px 16px #00000066, inset 0 1px 0 rgba(255,255,255,.1), 0 0 28px 4px #fff8; }
  100% { transform: scale(1); }
}
.hud-label {
  display: block; font-size: 9px; line-height: 1.15; letter-spacing: .08em; text-transform: uppercase;
  color: #b9b6d4; font-weight: 700;
}
.hud-value { font-size: 22px; line-height: 1.05; font-weight: 800; color: #ffffff; text-shadow: 0 0 12px rgba(255,255,255,.35); font-variant-numeric: tabular-nums; }

.tools { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 12px; }
.tool {
  font-family: inherit; font-weight: 800; font-size: 13px; letter-spacing: .02em; color: #f4f3fb;
  min-height: 44px; padding: 10px 16px; cursor: pointer;
  border: 1.5px solid transparent; border-radius: 999px;
  background:
    linear-gradient(180deg, #1d1a2b, #100e1a) padding-box,
    linear-gradient(135deg, rgba(255,255,255,.34), rgba(255,255,255,.1)) border-box;
  box-shadow: 0 5px 14px #00000055, inset 0 1px 0 rgba(255,255,255,.1), 0 0 12px #4aa8ff55;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  transition: transform .12s var(--ease), filter .2s, box-shadow .2s;
  animation: toolGlow 6.5s linear infinite;
}
.tool:nth-child(2) { animation-delay: -1.3s; }
.tool:nth-child(3) { animation-delay: -2.6s; }
.tool:nth-child(4) { animation-delay: -3.9s; }
.tool:nth-child(5) { animation-delay: -5.2s; }
#tab-arcade {
  animation: none; color: #8ffcfc; text-shadow: 0 0 10px rgba(0,240,240,.6);
  background:
    linear-gradient(180deg, #0b1d22, #071217) padding-box,
    linear-gradient(135deg, #00f0f0, #4aa8ff) border-box;
  box-shadow: 0 5px 14px #00000055, 0 0 16px #00f0f088;
}
#tab-arcade:hover { filter: brightness(1.18); }
@keyframes toolGlow {
  0%, 100% { box-shadow: 0 5px 14px #00000055, inset 0 1px 0 rgba(255,255,255,.1), 0 0 12px #ff4d6d77; }
  33% { box-shadow: 0 5px 14px #00000055, inset 0 1px 0 rgba(255,255,255,.1), 0 0 12px #ffd23f77; }
  66% { box-shadow: 0 5px 14px #00000055, inset 0 1px 0 rgba(255,255,255,.1), 0 0 12px #5ecb6b77; }
}
.tool:hover { transform: translateY(-1px); filter: brightness(1.08); }
.tool:active { transform: translateY(1px); }
.tool:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.board {
  position: relative; overflow: hidden;
  width: calc(var(--cell) * 8); height: calc(var(--cell) * 8);
  margin: 0 auto; border-radius: var(--radius);
  background: var(--board-face);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.08),
    inset 0 2px 14px #00000055,
    0 0 0 1px rgba(0,0,0,.35),
    0 18px 40px #00000059;
}
body[data-theme="wood"] .board {
  background: #3a2414 url("assets/wood-board.jpg") center / cover no-repeat;
}

.candy {
  position: absolute; top: 0; left: 0;
  width: var(--cell); height: var(--cell);
  display: grid; place-items: center;
  padding: 0; border: 0; background: transparent; cursor: pointer;
  transform: translate(calc(var(--x, 0) * var(--cell)), calc(var(--y, 0) * var(--cell)));
  transition: transform var(--dur) var(--ease);
  will-change: transform;
}
.candy::before {
  content: ""; position: absolute; inset: 5px; border-radius: var(--tile-radius);
  background:
    radial-gradient(circle at 32% 22%, rgba(255,255,255,.92), rgba(255,255,255,0) 44%),
    radial-gradient(circle at 70% 84%, rgba(0,0,0,.3), rgba(0,0,0,0) 55%),
    var(--cc);
  box-shadow:
    inset 0 -5px 9px #00000059,
    inset 0 5px 8px #ffffff73,
    inset 0 0 0 1.5px rgba(0,0,0,.18),
    0 3px 7px #00000059;
}
body[data-theme="wood"] .candy::before {
  background-color: #8a5a30;
  background-image:
    linear-gradient(158deg, rgba(255,240,214,.16), rgba(30,16,6,.30)),
    url("assets/wood.jpg");
  background-size: 180%, 180%;
  background-position: calc(var(--wx, 50) * 1%) calc(var(--wy, 50) * 1%);
  box-shadow:
    inset 0 -5px 8px rgba(0,0,0,.42),
    inset 0 4px 6px rgba(255,240,214,.30),
    inset 0 0 0 1px rgba(35,18,6,.38),
    0 3px 5px rgba(0,0,0,.34);
}
body[data-theme="wood"] .candy svg {
  fill: var(--cc);
  filter: drop-shadow(0 1px 0 rgba(255,245,220,.55)) drop-shadow(0 -1px 1px rgba(0,0,0,.4));
}
.candy svg {
  position: relative; width: 54%; height: 54%; fill: var(--glyph-fill);
  filter: drop-shadow(0 1.5px 1.5px rgba(42,10,34,.65)) drop-shadow(0 0 1px rgba(42,10,34,.75));
}
.candy::after {
  content: ""; position: absolute; top: 5px; left: 24%; width: 38%; height: 22%;
  border-radius: 50%; pointer-events: none; z-index: 1;
  background: radial-gradient(closest-side, rgba(255,255,255,.85), rgba(255,255,255,0));
}
body[data-theme="wood"] .candy::after { display: none; }
.candy[data-type="0"] { --cc: var(--c0); }
.candy[data-type="1"] { --cc: var(--c1); }
.candy[data-type="2"] { --cc: var(--c2); }
.candy[data-type="3"] { --cc: var(--c3); }
.candy[data-type="4"] { --cc: var(--c4); }
.candy[data-type="5"] { --cc: var(--c5); }

.candy.sp-striped.sp-row::before { background-image: repeating-linear-gradient(0deg, #ffffffb0 0 3px, transparent 3px 9px); }
.candy.sp-striped.sp-col::before { background-image: repeating-linear-gradient(90deg, #ffffffb0 0 3px, transparent 3px 9px); }
.candy.sp-wrapped::before { box-shadow: inset 0 0 0 3px #fff, inset 0 -4px 8px #0003, 0 0 14px 2px var(--cc); }
.candy.sp-wrapped { animation: wob 1.4s ease-in-out infinite; }
.candy.sp-bomb::before { background: conic-gradient(#ff4d6d, #ffb23f, #ffd23f, #5ecb6b, #4aa8ff, #b06bff, #ff4d6d); }
.candy.sp-bomb svg { fill: #ffffff; opacity: .9; }

.candy.selected { z-index: 5; animation: selpulse .75s ease-in-out infinite; }
.candy.selected::before { outline: 3px solid #fff; outline-offset: -2px; transform: scale(1.07); }
@keyframes selpulse {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(255,255,255,.7)); }
  50% { filter: drop-shadow(0 0 11px rgba(255,255,255,.95)); }
}
.candy.pop { animation: pop .2s var(--ease) forwards; z-index: 6; }
.candy.shake { animation: shake .3s; }

@keyframes pop {
  0%   { transform: translate(calc(var(--x) * var(--cell)), calc(var(--y) * var(--cell))) scale(1); }
  40%  { transform: translate(calc(var(--x) * var(--cell)), calc(var(--y) * var(--cell))) scale(1.22); }
  100% { transform: translate(calc(var(--x) * var(--cell)), calc(var(--y) * var(--cell))) scale(0); opacity: 0; }
}
@keyframes shake {
  0%, 100% { transform: translate(calc(var(--x) * var(--cell)), calc(var(--y) * var(--cell))); }
  25% { transform: translate(calc(var(--x) * var(--cell) - 4px), calc(var(--y) * var(--cell))); }
  75% { transform: translate(calc(var(--x) * var(--cell) + 4px), calc(var(--y) * var(--cell))); }
}
@keyframes wob { 0%, 100% { opacity: 1; } 50% { opacity: .82; } }

.footnote { text-align: center; color: rgba(255,255,255,.6); font-size: 12px; margin-top: 16px; font-weight: 600; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.builder-credit { display: block; text-align: center; margin-top: 5px; font-size: 12px; font-weight: 700;
  letter-spacing: .04em; color: rgba(255,255,255,.5); text-decoration: none; text-shadow: 0 1px 3px rgba(0,0,0,.5); transition: color .2s; }
.builder-credit b { color: rgba(255,255,255,.8); }
.builder-credit:hover { color: #b06bff; }
.builder-credit:hover b { color: #cba3ff; }

#fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 40; }
#overlay.party { background: radial-gradient(circle at 50% 42%, rgba(45,22,60,.26), rgba(18,9,26,.55)); }
.hidden { display: none !important; }

.sheet-card { text-align: center; }
.sheet-in { width: 100%; font-family: inherit; font-weight: 700; font-size: 19px; color: var(--ink);
  background: #fff; border: 2px solid transparent; border-radius: 14px; padding: 13px 16px; margin: 0 0 12px;
  box-shadow: inset 0 2px 6px #0000000f; outline: none; }
.sheet-in:focus { border-color: var(--accent); }
.sheet-in::placeholder { color: #cab6c2; font-weight: 600; }
.sheet-pin { text-align: center; letter-spacing: .55em; font-size: 26px; padding-left: .55em; }
.sheet-err { color: var(--accent); font-size: 14px; font-weight: 700; margin: -4px 0 10px; min-height: 18px; }
.sheet-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 8px;
  padding: 8px 16px; background: none; border: 0; color: var(--muted); font-family: inherit; font-weight: 700;
  font-size: 14px; cursor: pointer; text-decoration: underline; }
.sheet-link:hover { color: var(--ink); }
.save-rows { display: flex; flex-direction: column; gap: 10px; margin: 6px 0; }
.save-row { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-family: inherit; text-align: left; width: 100%; background: #fff; border: 0; border-radius: 14px;
  padding: 14px 16px; cursor: pointer; box-shadow: 0 4px 12px #5a224615; transition: transform .12s var(--ease); }
.save-row:hover { transform: translateY(-1px); }
.save-row:active { transform: translateY(1px); }
.save-row:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.save-row-name { font-weight: 800; font-size: 17px; color: var(--ink); }
.save-row-meta { font-weight: 600; font-size: 12px; color: var(--muted); white-space: nowrap; }
@keyframes shakeX { 0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-6px)} 40%,80%{transform:translateX(6px)} }
.shaking { animation: shakeX .32s; }

.jukebox-btn { position: fixed; right: 16px; bottom: 16px; z-index: 45; width: 54px; height: 54px; border-radius: 50%;
  border: 0; cursor: pointer; background: linear-gradient(145deg, #3a2a72, #1b1440); color: #d9d2ff;
  box-shadow: 0 10px 24px rgba(0,0,0,.4), inset 0 0 0 1px rgba(150,130,255,.28); display: grid; place-items: center;
  transition: transform .15s var(--ease); }
.jukebox-btn svg { width: 27px; height: 27px; fill: currentColor; }
.jukebox-btn:hover { transform: translateY(-2px); }
.jukebox-btn:focus-visible { outline: 3px solid #6f63ff; outline-offset: 2px; }
.jukebox-btn.playing { animation: jbpulse 1.5s ease-in-out infinite; }
@keyframes jbpulse {
  0%, 100% { box-shadow: 0 10px 24px rgba(111,99,255,.35), inset 0 0 0 1px rgba(150,130,255,.35); }
  50% { box-shadow: 0 12px 34px rgba(111,99,255,.6), inset 0 0 0 2px rgba(150,130,255,.55); }
}
/* ---- jukebox: real phone shell ---- */
.phone {
  position: relative; width: min(304px, 84vw); margin: 0 auto;
  padding: 14px 10px 20px; border-radius: 46px;
  background: linear-gradient(165deg, #2c2c35, #101013 60%, #050506);
  box-shadow: 0 40px 90px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.06) inset, 0 2px 0 rgba(255,255,255,.08) inset;
}
.phone::before { content: ""; position: absolute; left: -2px; top: 96px; width: 3px; height: 46px;
  background: linear-gradient(180deg,#3a3a42,#18181b); border-radius: 2px 0 0 2px; }
.phone::after { content: ""; position: absolute; right: -2px; top: 120px; width: 3px; height: 64px;
  background: linear-gradient(180deg,#3a3a42,#18181b); border-radius: 0 2px 2px 0; }
.phone-notch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 84px; height: 22px; border-radius: 14px; background: #050506; z-index: 3;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }
.phone-screen { position: relative; overflow-y: auto; overflow-x: hidden; border-radius: 34px;
  background: #0a0817; box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); max-height: calc(100vh - 140px); }

.phone-statusbar { display: flex; align-items: center; justify-content: space-between;
  padding: 10px 22px 4px; color: #f2f0ff; font-size: 13px; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.ps-icons { display: flex; align-items: center; gap: 5px; }
.ps-icon { width: 16px; height: 11px; fill: #f2f0ff; }
.ps-battery { width: 22px; height: 11px; }

.jb-app { padding: 6px 16px 14px; }
.jb-appbar { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 14px; }
.jb-close { width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.06); color: #c9c4e6; display: grid; place-items: center; transition: .15s; }
.jb-close svg { width: 16px; height: 16px; }
.jb-close:hover { background: rgba(255,255,255,.12); color: #fff; }
.jb-close:focus-visible { outline: 2px solid #6f63ff; outline-offset: 2px; }
.jb-appbar-brand { display: flex; align-items: center; gap: 6px; }
.jb-appbar-logo { width: 16px; height: 16px; border-radius: 50%; display: block; background: #1DB954;
  box-shadow: 0 0 10px rgba(29,185,84,.5); }
.jb-appbar-label { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #b9b1ff; }
#jukebox.theme-cosmic .jb-appbar-logo { background: #6f63ff; box-shadow: 0 0 10px rgba(111,99,255,.5); }
.jb-appbar-spacer { width: 32px; }

.jb-stage { position: relative; border-radius: 20px; overflow: hidden; margin-bottom: 14px;
  box-shadow: 0 14px 30px rgba(0,0,0,.4), inset 0 0 0 1px rgba(255,255,255,.06); }
.jb-cv { display: block; width: 100%; height: 210px; background: #0b0820; }
.jb-spotify { display: block; width: 100%; height: 352px; border: 0; background: #0b0820; }

.jb-now { text-align: center; margin-bottom: 14px; }
.jb-title { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.jb-sub { font-size: 12px; color: #9a93c8; margin-top: 2px; }

.jb-controls { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 16px; }
.jb-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.05); color: #ece9ff; cursor: pointer; display: grid; place-items: center;
  transition: transform .12s var(--ease), background .15s, border-color .15s; }
.jb-btn svg { width: 18px; height: 18px; fill: currentColor; }
.jb-btn:hover { background: rgba(255,255,255,.1); border-color: rgba(111,99,255,.5); }
.jb-btn:active { transform: scale(.92); }
.jb-btn:focus-visible { outline: 2px solid #6f63ff; outline-offset: 2px; }
.jb-play { width: 60px; height: 60px; background: #1DB954; border-color: transparent; color: #04150c;
  box-shadow: 0 8px 22px rgba(29,185,84,.4); }
.jb-play svg { width: 24px; height: 24px; }
.jb-play:hover { background: #22e065; }
#jukebox.theme-cosmic .jb-play { background: #6f63ff; color: #fff; box-shadow: 0 8px 22px rgba(111,99,255,.4); }
#jukebox.theme-cosmic .jb-play:hover { background: #8478ff; }

.jb-vol { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.jb-vol input { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg,#6f63ff 55%,rgba(255,255,255,.14) 55%); cursor: pointer; }
.jb-vol input::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); margin-top: -4.5px; }
.jb-vol input::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 0; }
.jb-vol input::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255,255,255,.14); }

.jb-queue-label { font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: #726b9c; margin: 0 0 8px 4px; }
.jb-stations { display: flex; flex-direction: column; gap: 6px; }
.jb-chip { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 10px; border-radius: 14px; border: 1px solid transparent; background: rgba(255,255,255,.03);
  color: #ece9ff; cursor: pointer; font-family: inherit; transition: background .15s, border-color .15s, transform .1s; }
.jb-chip:hover { background: rgba(255,255,255,.07); transform: translateX(2px); }
.jb-chip.on { background: rgba(111,99,255,.14); border-color: rgba(111,99,255,.4); }
.jb-chip:focus-visible { outline: 2px solid #6f63ff; outline-offset: 2px; }
.jb-chip-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.jb-n { font-size: 13px; font-weight: 700; }
.jb-s { font-size: 10px; color: #8e87bd; text-transform: uppercase; letter-spacing: .06em; }
.jb-eq { display: flex; align-items: flex-end; gap: 2px; width: 14px; height: 13px; flex: none; opacity: 0; transition: opacity .2s; }
.jb-chip.on .jb-eq { opacity: 1; }
.jb-eq i { display: block; width: 3px; border-radius: 1px; background: #8478ff; height: 4px; }
#jukebox.playing .jb-chip.on .jb-eq i { animation: eqBounce .9s ease-in-out infinite; }
#jukebox.playing .jb-chip.on .jb-eq i:nth-child(2) { animation-delay: -.6s; }
#jukebox.playing .jb-chip.on .jb-eq i:nth-child(3) { animation-delay: -.3s; }
@keyframes eqBounce { 0%, 100% { height: 4px; } 50% { height: 13px; } }

.phone-home { margin: 6px auto 0; width: 120px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.35); }

.screen {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 24px; z-index: 50;
  background: radial-gradient(circle at 50% 28%, #5a2246ee, #2a1024f2);
}
.screen.hidden { display: none; }

.hero {
  cursor: pointer; padding: 0;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(176,107,255,.28), transparent 55%),
    radial-gradient(110% 80% at 50% 115%, rgba(255,77,109,.22), transparent 55%),
    linear-gradient(rgba(18,9,30,.55), rgba(18,9,30,.72)),
    #1b0f2e url("assets/bg.webp") center / cover no-repeat;
}
.hero-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-inner {
  position: relative; z-index: 1;
  width: 100%; max-width: min(560px, 92vw);
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(14px, 2.6vh, 24px);
}
.hero-art {
  width: 100%; aspect-ratio: 1600 / 873; border-radius: 22px;
  background: url("assets/hero.webp") center / cover no-repeat;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.14),
    0 0 34px rgba(176,107,255,.45),
    0 24px 60px rgba(0,0,0,.55);
  animation: heroFloat 6s ease-in-out infinite;
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 0 34px rgba(176,107,255,.45), 0 24px 60px rgba(0,0,0,.55); }
  50% { transform: translateY(-6px); box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 0 44px rgba(255,77,109,.4), 0 30px 66px rgba(0,0,0,.6); }
}
.hero-kicker {
  margin: 0; font-size: clamp(12px, 3.2vw, 14px); font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(255,255,255,.72); text-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.hero-cta { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; }
.hero-play {
  position: relative; overflow: hidden;
  width: min(320px, 100%); min-height: 56px;
  font-size: clamp(17px, 4.6vw, 21px); padding: 15px 30px; letter-spacing: .01em;
  background: linear-gradient(135deg, #ff4d6d, #ff7a4d);
  box-shadow: 0 10px 26px #ff4d6d66, 0 0 0 1px rgba(255,255,255,.18) inset;
}
.hero-play::after {
  content: ""; position: absolute; top: -60%; bottom: -60%; width: 34%; left: -55%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.42), transparent);
  transform: skewX(-18deg); animation: shine 3.6s ease-in-out infinite;
}
@keyframes shine { 0%, 55% { left: -55%; } 85%, 100% { left: 130%; } }
.hero-play:hover { transform: translateY(-2px); filter: brightness(1.06); }
.hero-sub {
  width: min(320px, 100%); min-height: 48px;
  font-size: clamp(13px, 3.6vw, 15px); padding: 11px 20px; letter-spacing: 0;
  background: rgba(24,12,36,.66); box-shadow: 0 6px 16px rgba(0,0,0,.32), 0 0 0 1px rgba(255,255,255,.16) inset;
  backdrop-filter: blur(6px);
}
.hero-sub:hover { background: rgba(24,12,36,.8); }
.hero-arcade {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: min(320px, 100%); min-height: 48px; margin-top: 2px; border-radius: 16px;
  font-size: clamp(13px, 3.6vw, 15px); font-weight: 800; letter-spacing: .08em;
  color: #7ff7f7; text-decoration: none; text-shadow: 0 0 12px rgba(0,240,240,.55);
  background: rgba(6,20,26,.6);
  box-shadow: 0 0 0 1px rgba(0,240,240,.4) inset, 0 0 18px rgba(0,240,240,.28), 0 6px 16px rgba(0,0,0,.35);
  transition: box-shadow .2s, color .2s, transform .12s var(--ease);
  backdrop-filter: blur(6px);
}
.hero-arcade:hover {
  color: #d9ffff; transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(0,240,240,.75) inset, 0 0 28px rgba(0,240,240,.5), 0 8px 18px rgba(0,0,0,.4);
}
.hero:focus-visible { outline: 4px solid #ffffffaa; outline-offset: -6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-height: 560px) {
  .hero-inner { flex-direction: row; max-width: 92vw; gap: 24px; }
  .hero-art { width: min(46vw, 420px); }
  .hero-cta { width: auto; flex: 1; }
}

.screen-card {
  background: var(--card); border-radius: 26px; padding: 34px 28px; max-width: 360px; width: 100%;
  text-align: center; box-shadow: 0 30px 70px #00000055;
}
.kicker { text-transform: uppercase; letter-spacing: .16em; font-size: 12px; color: var(--accent); font-weight: 700; margin: 0 0 8px; }
.title { font-size: clamp(34px, 9vw, 52px); line-height: 1; margin: 0 0 14px; font-weight: 800; color: var(--ink); transform: rotate(-2deg); }
.subtitle { color: var(--muted); font-size: 17px; margin: 0 0 22px; font-weight: 600; }
.name { color: var(--accent); }
.ov-title { font-size: 32px; margin: 0 0 8px; font-weight: 800; }
.ov-body { color: var(--muted); font-size: 17px; margin: 0 0 22px; font-weight: 600; line-height: 1.4; }

.btn {
  font-family: inherit; font-weight: 800; font-size: 17px; color: #fff; background: var(--accent);
  border: 0; border-radius: 16px; padding: 14px 22px; cursor: pointer; box-shadow: 0 10px 24px #ff4d6d55;
  transition: transform .12s var(--ease), box-shadow .2s, filter .2s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); box-shadow: 0 14px 30px #ff4d6d66; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .candy { transition-duration: .05ms; }
  .candy.pop, .candy.shake, .candy.sp-wrapped { animation-duration: .05ms !important; }
  .candy.selected { animation: none !important; }
  .shaking { animation-duration: .05ms !important; }
  .save-row { transition-duration: .05ms; }
  .jukebox-btn.playing { animation-duration: .05ms !important; }
  .hud-item, .tool, .hud-value { animation: none !important; }
  .jb-eq i { animation: none !important; height: 7px !important; }
}
