/* ==========================================================================
   DIRK DOLLAR — Homepage "The Ride"
   Homepage-only styles (game.html keeps using arcade.css + game.css).
   Palette from the key art: blood sky, sun cream, silhouette black.
   Motion rules: transform/opacity only, calm curves, no flashing.
   ========================================================================== */

:root {
    --blood: #a3121a;
    --crimson: #5e0a0e;
    --crimson-deep: #2a0507;
    --cream: #f3e5c0;
    --ink: #0b0706;
    --ink-2: #160c0a;
    --dirt: #3b2516;
    --gold: #f5b83d;
    --gold-dark: #7a4f0d;
    --bandana: #e8322b;
    --teal: #3fd0c9;
    --amber: #ffb347;
    --muted: #cdbd9e;

    --f-wordmark: 'Rye', 'Georgia', serif;
    --f-pixel: 'Press Start 2P', ui-monospace, monospace;
    --f-body: 'VT323', ui-monospace, 'Courier New', monospace;

    --glow-cream: 0 0 2px currentColor, 0 0 12px rgba(243, 229, 192, 0.35);
    --glow-gold: 0 0 2px currentColor, 0 0 14px rgba(245, 184, 61, 0.5);
    --glow-red: 0 0 2px currentColor, 0 0 16px rgba(232, 50, 43, 0.55);

    --marquee-h: 64px;
    --hud-h: 26px;
    --header-h: calc(var(--marquee-h) + var(--hud-h));
    --horizon: 66%;
    --chase-dur: 1.8s;
    /* ink outline keeps the cream wordmark readable over the cream sun (poster style) */
    --wm-shadow: -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 2px 2px 0 var(--ink), 0 -3px 0 var(--ink), 0 3px 0 var(--ink), -3px 0 0 var(--ink), 3px 0 0 var(--ink), 6px 6px 0 var(--blood), 9px 9px 0 rgba(11, 7, 6, 0.55), 0 0 26px rgba(255, 179, 71, 0.45);
    --step: steps(1, end);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

    --cur: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' shape-rendering='crispEdges'%3E%3Cpath fill='%230b0706' d='M10 0h4v9h-4zM10 15h4v9h-4zM0 10h9v4h-9zM15 10h9v4h-9zM10 10h4v4h-4z'/%3E%3Cpath fill='%23f3e5c0' d='M11 1h2v7h-2zM11 16h2v7h-2zM1 11h7v2h-7zM16 11h7v2h-7zM11 11h2v2h-2z'/%3E%3C/svg%3E") 12 12, crosshair;
    --cur-hot: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' shape-rendering='crispEdges'%3E%3Cpath fill='%230b0706' d='M10 0h4v9h-4zM10 15h4v9h-4zM0 10h9v4h-9zM15 10h9v4h-9zM9 9h6v6h-6z'/%3E%3Cpath fill='%23f5b83d' d='M11 1h2v7h-2zM11 16h2v7h-2zM1 11h7v2h-7zM16 11h7v2h-7zM10 10h4v4h-4z'/%3E%3C/svg%3E") 12 12, pointer;
}

@media (max-aspect-ratio: 10/13) {
    :root { --horizon: 64%; }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 12px);
    -webkit-text-size-adjust: 100%;
    background: var(--ink);
}

body {
    margin: 0;
    background: var(--ink);
    color: var(--cream);
    font-family: var(--f-body);
    font-size: 1.375rem; /* 22px — VT323 runs small */
    line-height: 1.35;
    overflow-x: hidden;
    overflow-x: clip;
}

img,
canvas,
svg {
    display: block;
    max-width: 100%;
}

img,
canvas {
    image-rendering: pixelated;
}

a {
    color: var(--gold);
}

button {
    font: inherit;
    color: inherit;
}

.sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.icon {
    width: 1em;
    height: 1em;
    fill: currentColor;
    shape-rendering: crispEdges;
    flex: none;
}

:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -100px;
    z-index: 300;
    background: var(--gold);
    color: var(--ink);
    padding: 10px 14px;
    font-family: var(--f-pixel);
    font-size: 0.7rem;
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
}

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

/* custom pixel crosshair (desktop, fine pointer, motion allowed — set by JS) */
html.has-cursor,
html.has-cursor body {
    cursor: var(--cur);
}

html.has-cursor a,
html.has-cursor button,
html.has-cursor [role='slider'],
html.has-cursor label,
html.has-cursor input {
    cursor: var(--cur-hot);
}

/* --------------------------------------------------------------------------
   WORLD (fixed pixel canvas behind everything) + CRT glass + FX
   -------------------------------------------------------------------------- */
.world {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
    width: 100vw;
    height: 100vh;
    /* instant key-art stand-in until the canvas paints (and without JS) */
    background:
        linear-gradient(180deg, transparent var(--horizon), #1e201b var(--horizon)),
        radial-gradient(circle at 50% var(--horizon), #d8c6a5 0 min(30vw, 33vh), transparent calc(min(30vw, 33vh) + 1px)),
        linear-gradient(180deg, #8a1d24 0%, #9a2128 50%, #a8272c var(--horizon));
    pointer-events: none;
}

.crt {
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    background:
        radial-gradient(ellipse at center, transparent 58%, rgba(0, 0, 0, 0.5) 100%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, transparent 32%),
        repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0 1px, transparent 1px 3px);
}

.crt-roll {
    position: absolute;
    left: 0;
    right: 0;
    top: -120px;
    height: 120px;
    background: linear-gradient(180deg, transparent, rgba(243, 229, 192, 0.04), transparent);
    animation: crtRoll 11s linear infinite;
    will-change: transform;
}

@keyframes crtRoll {
    to { transform: translateY(calc(100vh + 120px)); }
}

body.crt-off .crt {
    display: none;
}

.fx {
    position: fixed;
    inset: 0;
    z-index: 95;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.spur {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 96;
    width: 26px;
    height: 26px;
    margin: -13px 0 0 -13px;
    color: var(--gold);
    pointer-events: none;
    opacity: 0;
    transition: opacity 200ms linear;
    will-change: transform;
}

.spur svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    filter: drop-shadow(2px 2px 0 rgba(11, 7, 6, 0.85));
}

html.has-cursor .spur.is-on {
    opacity: 0.9;
}

/* --------------------------------------------------------------------------
   ENTRANCE — arcade hall → coin → power-on → fly into the screen
   -------------------------------------------------------------------------- */
.intro {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 150;
    overflow: hidden;
    background: radial-gradient(ellipse 70% 60% at 50% 70%, #1a0c08 0%, #070403 60%, #020101 100%);
    transition: opacity 400ms linear;
}

html.has-intro .intro {
    display: block;
    animation: introFailsafe 1ms linear 7s forwards; /* if JS never runs */
}

html.intro-lock body {
    overflow: hidden;
}

.intro-hall,
.intro-ui {
    opacity: 0;
}

.intro.is-on .intro-hall,
.intro.is-on .intro-ui {
    opacity: 1;
}

.intro-hall {
    transition: opacity 500ms linear;
}

.intro.is-out {
    opacity: 0;
    transition-duration: 480ms;
    pointer-events: none;
}

@keyframes introFailsafe {
    to { opacity: 0; visibility: hidden; }
}

.intro-hall {
    position: absolute;
    inset: 0;
}

.hall-glow {
    position: absolute;
    bottom: 0;
    width: 34vw;
    height: 70vh;
    opacity: 0.55;
}

.hall-glow-l {
    left: -6vw;
    background: radial-gradient(ellipse 50% 50% at 50% 60%, rgba(63, 208, 201, 0.16), transparent 70%);
}

.hall-glow-r {
    right: -6vw;
    background: radial-gradient(ellipse 50% 50% at 50% 60%, rgba(232, 50, 43, 0.2), transparent 70%);
}

.hall-smoke {
    position: absolute;
    width: 90vmax;
    height: 50vmax;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(243, 229, 192, 0.07), transparent);
    will-change: transform;
}

.hall-smoke-1 {
    left: -30vmax;
    top: 10vh;
    animation: smokeDrift 9s ease-in-out infinite alternate;
}

.hall-smoke-2 {
    right: -35vmax;
    top: 35vh;
    animation: smokeDrift 11s ease-in-out infinite alternate-reverse;
}

@keyframes smokeDrift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(14vw, -4vh, 0) scale(1.15); }
}

/* the cabinet, seen from the front (close-up, cut off at the bottom) */
.cab {
    position: absolute;
    left: 50%;
    top: 5vh;
    width: min(52vh, 84vw);
    height: 100vh;
    margin-left: calc(min(52vh, 84vw) / -2);
    transform-origin: 50% 30%;
    transition: transform 700ms cubic-bezier(0.7, 0, 0.84, 0);
    will-change: transform;
    background: linear-gradient(90deg, #120807 0%, #241410 8%, #1a0e0b 50%, #241410 92%, #120807 100%);
    box-shadow: 0 0 0 3px #000, 0 0 80px rgba(232, 50, 43, 0.12);
}

.cab::before,
.cab::after {
    content: '';
    position: absolute;
    top: 13%;
    bottom: 0;
    width: 7px;
    background: repeating-linear-gradient(180deg, var(--bandana) 0 18px, var(--gold) 18px 36px);
    opacity: 0.55;
}

.cab::before { left: 3%; }
.cab::after { right: 3%; }

.cab-top {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 12%;
    display: grid;
    place-items: center;
    background: radial-gradient(ellipse at 50% 120%, #c42a1f, #5e0a0e 60%, #2a0507);
    border-bottom: 4px solid #000;
    box-shadow: inset 0 0 0 3px #000, inset 0 0 0 6px var(--dirt), 0 0 40px rgba(232, 50, 43, 0.35);
}

.cab-top span {
    font-family: var(--f-wordmark);
    font-size: min(4.6vh, 7vw);
    color: var(--cream);
    text-shadow: 0 0 2px var(--cream), 0 0 18px rgba(255, 179, 71, 0.7), 2px 2px 0 var(--blood);
}

.cab-bezel {
    position: absolute;
    left: 6%;
    right: 6%;
    top: 13%;
    height: 35%;
    padding: 6%;
    background: linear-gradient(180deg, #0d0706, #1c100c);
    border-radius: 6px;
    box-shadow: inset 0 0 0 3px #000, inset 0 0 30px #000;
}

.cab-glass {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 18px / 22px;
    background: radial-gradient(ellipse at 50% 50%, #120a09, #040202 75%);
    box-shadow: inset 0 0 40px #000, 0 0 0 3px #000;
}

.cab-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 3px;
    margin-top: -1px;
    background: var(--cream);
    box-shadow: 0 0 12px var(--cream), 0 0 40px var(--amber);
    transform: scale(0, 1);
    opacity: 0;
}

.cab-glare {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.09), transparent 40%);
}

.cab-deck {
    position: absolute;
    left: 2%;
    right: 2%;
    top: 49%;
    height: 10%;
    background: linear-gradient(180deg, #3b2516, #1e120b);
    clip-path: polygon(6% 0, 94% 0, 100% 100%, 0 100%);
    box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.08);
}

.cab-stick {
    position: absolute;
    left: 24%;
    top: 22%;
    width: min(4vh, 6vw);
    height: min(4vh, 6vw);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #ff6a5e, var(--bandana) 45%, #6a1210);
    box-shadow: 0 min(2.2vh, 3vw) 0 -0.6vh #000;
}

.cab-btn {
    position: absolute;
    top: 38%;
    width: min(3.2vh, 5vw);
    height: min(3.2vh, 5vw);
    border-radius: 50%;
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.4), 0 3px 0 #000;
}

.cab-btn-r { left: 58%; background: var(--bandana); }
.cab-btn-g { left: 70%; background: var(--gold); }

.cab-door {
    position: absolute;
    left: 30%;
    right: 30%;
    top: 60%;
    height: 22%;
    background: linear-gradient(180deg, #2c2c2c, #151515);
    border: 3px solid #000;
    box-shadow: inset 0 0 0 2px #444;
}

.cab-slot {
    position: absolute;
    left: 50%;
    top: 14%;
    width: 10%;
    height: 22%;
    margin-left: -5%;
    background: #000;
    border: 2px solid #777;
    box-shadow: 0 0 14px rgba(232, 50, 43, 0.75), inset 0 0 6px rgba(232, 50, 43, 0.9);
}

.cab-price {
    position: absolute;
    left: 0;
    right: 0;
    top: 46%;
    text-align: center;
    font-family: var(--f-pixel);
    font-size: min(1.5vh, 2.4vw);
    color: var(--bandana);
    text-shadow: var(--glow-red);
}

.cab-coin {
    position: absolute;
    left: 50%;
    top: 0;
    width: min(5vh, 8vw);
    height: min(5vh, 8vw);
    margin-left: calc(min(5vh, 8vw) / -2);
    border-radius: 50%;
    background: radial-gradient(circle at 38% 34%, #ffe9a8 0 18%, var(--gold) 20% 58%, #b97a14 60%);
    box-shadow: inset 0 0 0 3px #b97a14, 0 0 18px rgba(245, 184, 61, 0.6);
    opacity: 0;
    transform: translate3d(0, -60vh, 0);
}

.intro.is-coin .cab-coin {
    animation: coinDrop 560ms cubic-bezier(0.55, 0, 0.9, 0.45) forwards;
}

@keyframes coinDrop {
    0% { opacity: 1; transform: translate3d(0, -60vh, 0) rotateY(0deg); }
    80% { opacity: 1; transform: translate3d(0, 0, 0) rotateY(720deg); }
    100% { opacity: 0; transform: translate3d(0, 1.6vh, 0) rotateY(810deg) scale(0.6); }
}

.intro.is-credit .cab-slot {
    animation: slotFlash 520ms ease-out;
}

@keyframes slotFlash {
    0% { box-shadow: 0 0 40px 8px rgba(245, 184, 61, 0.95), inset 0 0 12px var(--gold); border-color: var(--gold); }
    100% { box-shadow: 0 0 14px rgba(232, 50, 43, 0.75), inset 0 0 6px rgba(232, 50, 43, 0.9); }
}

.intro.is-power .cab-line {
    animation: powerLine 520ms var(--ease-out) forwards;
}

@keyframes powerLine {
    0% { opacity: 1; transform: scale(0, 1); }
    30% { opacity: 1; transform: scale(1, 1); }
    100% { opacity: 1; transform: scale(1, 90); background: #ffe3a8; }
}

.intro.is-zoom .cab {
    transform: scale(6.5);
}

.intro-bloom {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 45%, #fff6dc 0%, var(--cream) 40%, #e9a35a 100%);
    opacity: 0;
    transition: opacity 320ms ease-in 360ms;
    pointer-events: none;
}

.intro.is-zoom .intro-bloom {
    opacity: 1;
}

.intro-ui {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: max(4vh, 18px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    transition: opacity 260ms linear, transform 260ms var(--ease-out);
}

.intro-ui::before {
    content: '';
    position: absolute;
    inset: -40px -50vw -60px;
    background: linear-gradient(180deg, transparent, rgba(2, 1, 1, 0.92) 45%);
    z-index: -1;
}

.intro.is-zoom .intro-ui {
    opacity: 0;
    transform: translateY(20px);
}

.intro-insert {
    margin: 0;
    font-family: var(--f-pixel);
    font-size: clamp(0.75rem, 2vw, 1rem);
    color: var(--gold);
    text-shadow: var(--glow-gold);
    transition: color 200ms linear;
}

.intro.is-credit .intro-insert {
    color: var(--cream);
}

.intro-choice {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

.intro-keys {
    margin: 0;
    font-family: var(--f-pixel);
    font-size: 0.5rem;
    color: var(--muted);
    opacity: 0.75;
}

/* --------------------------------------------------------------------------
   MARQUEE (header) + HUD + SOUND
   -------------------------------------------------------------------------- */
.marquee {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    background: rgba(11, 7, 6, 0.94);
    border-bottom: 3px solid var(--gold);
    box-shadow: 0 0 0 1px #000, 0 6px 24px rgba(0, 0, 0, 0.6);
}

.marquee-inner {
    position: relative;
    height: var(--marquee-h);
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: radial-gradient(ellipse 60% 140% at 50% 120%, rgba(163, 18, 26, 0.5), transparent 70%);
}

.marquee-logo {
    font-family: var(--f-wordmark);
    font-size: clamp(1.3rem, 3vw, 2rem);
    color: var(--cream);
    text-decoration: none;
    letter-spacing: 0.04em;
    white-space: nowrap;
    text-shadow: 0 0 2px var(--cream), 0 0 18px rgba(232, 50, 43, 0.6), 3px 3px 0 var(--blood);
}

.nav {
    margin-left: auto;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2px;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    position: relative;
    display: block;
    padding: 10px 10px 10px 22px;
    font-family: var(--f-pixel);
    font-size: 0.6rem;
    text-transform: uppercase;
    color: var(--cream);
    text-decoration: none;
}

.nav-menu a::before {
    content: '▶';
    position: absolute;
    left: 6px;
    color: var(--gold);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 160ms linear, transform 200ms var(--ease-out);
}

.nav-menu a:hover,
.nav-menu a:focus-visible,
.nav-menu a.is-active {
    color: var(--gold);
    text-shadow: var(--glow-gold);
}

.nav-menu a:hover::before,
.nav-menu a:focus-visible::before,
.nav-menu a.is-active::before {
    opacity: 1;
    transform: none;
}

.marquee-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sound-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 12px;
    font-family: var(--f-pixel);
    font-size: 0.55rem;
    color: var(--muted);
    background: #000;
    border: 2px solid rgba(243, 229, 192, 0.35);
    box-shadow: 0 4px 0 #000;
    cursor: pointer;
    transition: transform 80ms linear, box-shadow 80ms linear, color 160ms linear, border-color 160ms linear;
}

.sound-toggle .icon {
    width: 16px;
    height: 16px;
}

.sound-toggle .icon-on,
.sound-toggle[aria-pressed='true'] .icon-off {
    display: none;
}

.sound-toggle[aria-pressed='true'] .icon-on {
    display: block;
}

.sound-toggle[aria-pressed='true'] {
    color: var(--ink);
    background: var(--gold);
    border-color: var(--gold);
}

.sound-toggle:hover {
    color: var(--gold);
    border-color: var(--gold);
}

.sound-toggle[aria-pressed='true']:hover {
    color: var(--ink);
}

.sound-toggle:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #000;
}


.nav-toggle {
    display: none;
    min-height: 40px;
    background: var(--crimson);
    border: 2px solid var(--gold);
    padding: 10px 12px;
    font-family: var(--f-pixel);
    font-size: 0.6rem;
    color: var(--cream);
    cursor: pointer;
    box-shadow: 0 4px 0 #000;
}

.nav-toggle:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #000;
}

.hud-strip {
    height: var(--hud-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
    font-family: var(--f-pixel);
    font-size: 0.55rem;
    color: var(--bandana);
    border-top: 1px solid rgba(245, 184, 61, 0.25);
    white-space: nowrap;
    overflow: hidden;
}

.hud-strip b {
    color: var(--cream);
    font-weight: normal;
}

.hud-now {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hud-now b {
    color: var(--gold);
}

.hud-booking b {
    color: var(--cream);
}

/* --------------------------------------------------------------------------
   CHASING MARQUEE BULBS (compositor-only: one strip translates in 3 steps)
   -------------------------------------------------------------------------- */
.bulbs {
    --pitch: 18px;
    --size: 6px;
    --lit: #ffe3a0;
    --dim: rgba(245, 184, 61, 0.22);
    position: absolute;
    overflow: hidden;
    pointer-events: none;
}

.bulbs > span {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: calc(100% + var(--pitch) * 3);
    background:
        radial-gradient(circle at calc(var(--pitch) / 2) 50%, var(--lit) 0 calc(var(--size) / 2), rgba(255, 200, 110, 0.35) calc(var(--size) / 2 + 0.5px), transparent calc(var(--size) / 2 + 3px)) 0 0 / calc(var(--pitch) * 3) 100% repeat-x,
        radial-gradient(circle at calc(var(--pitch) / 2) 50%, var(--dim) 0 calc(var(--size) / 2), transparent calc(var(--size) / 2 + 0.5px)) 0 0 / var(--pitch) 100% repeat-x;
    animation: bulbChase var(--chase-dur) steps(3, end) infinite;
    will-change: transform;
}

@keyframes bulbChase {
    to { transform: translateX(calc(var(--pitch) * -3)); }
}

.bulbs-h {
    left: 0;
    right: 0;
    bottom: -7px;
    height: 10px;
}

/* --------------------------------------------------------------------------
   BUTTONS (magnetic: --mx/--my set by JS)
   -------------------------------------------------------------------------- */
.btn {
    --mx: 0px;
    --my: 0px;
    --press: 0px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 22px;
    font-family: var(--f-pixel);
    font-size: 0.72rem;
    line-height: 1.2;
    text-decoration: none;
    text-transform: uppercase;
    border: 3px solid currentColor;
    cursor: pointer;
    transform: translate3d(var(--mx), calc(var(--my) + var(--press)), 0);
    transition: box-shadow 80ms linear, background-color 160ms linear, color 160ms linear;
}

.btn-start {
    color: var(--ink);
    background: var(--gold);
    border-color: var(--ink);
    box-shadow: 0 0 0 3px var(--gold), 0 6px 0 3px var(--gold-dark), 0 10px 26px rgba(245, 184, 61, 0.3);
}

.btn-start:hover,
.btn-start:focus-visible {
    background: var(--cream);
}

.btn-ghost {
    color: var(--cream);
    background: rgba(11, 7, 6, 0.78);
    box-shadow: 0 6px 0 #000;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
    color: var(--gold);
    text-shadow: var(--glow-gold);
}

.btn:active {
    --press: 4px;
    box-shadow: 0 2px 0 #000;
}

.btn-start:active {
    box-shadow: 0 0 0 3px var(--gold), 0 2px 0 3px var(--gold-dark);
}

.btn-small {
    padding: 12px 16px;
    font-size: 0.6rem;
}

/* --------------------------------------------------------------------------
   TICKET RAIL (scroll progress)
   -------------------------------------------------------------------------- */
.ticket-rail {
    position: fixed;
    z-index: 85;
    right: 10px;
    top: calc(var(--header-h) + 26px);
    bottom: 26px;
    width: 52px;
    pointer-events: none;
}

.ticket-track {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    border-left: 2px dashed rgba(243, 229, 192, 0.09);
}

.ticket,
.buitre {
    position: absolute;
    left: 50%;
    top: 0;
    will-change: transform;
}

.ticket {
    width: 36px;
    height: 24px;
    margin-left: -18px;
    opacity: 0.8;
}

.ticket canvas,
.buitre canvas {
    width: 100%;
    height: 100%;
}

.buitre {
    width: 88px;
    height: 88px;
    margin-left: -44px;
    opacity: 0;
}

.ticket-msg {
    position: absolute;
    right: 48px;
    top: 0;
    width: max-content;
    max-width: 46vw;
    padding: 5px 7px;
    font-family: var(--f-pixel);
    font-size: 0.42rem;
    line-height: 1.5;
    color: var(--ink);
    background: var(--gold);
    box-shadow: 0 0 0 3px #000, 3px 3px 0 3px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 240ms linear, transform 360ms var(--ease-out);
}

.ticket-msg.is-on {
    opacity: 1;
    transform: none;
}

/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */
main,
.control-panel {
    position: relative;
    z-index: 2;
}

main:focus {
    outline: none;
}

.hero {
    position: relative;
    height: 100vh;
    height: 100svh;
    min-height: 540px;
    padding: 0 16px;
    text-align: center;
}

.hero-top {
    position: absolute;
    left: 16px;
    right: 16px;
    top: calc(var(--header-h) + 10px);
    bottom: calc(100% - var(--horizon) + 15%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-bottom {
    position: absolute;
    left: 16px;
    right: 16px;
    top: calc(var(--horizon) + 18px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-kicker {
    display: inline-block;
    margin: 0 0 14px;
    padding: 6px 10px;
    background: rgba(11, 7, 6, 0.6);
    font-family: var(--f-pixel);
    font-size: clamp(0.55rem, 1.3vw, 0.78rem);
    letter-spacing: 0.3em;
    color: var(--cream);
    text-shadow: 2px 2px 0 var(--ink);
}

.wordmark {
    margin: 0;
    font-family: var(--f-wordmark);
    font-weight: 400;
    font-size: clamp(3rem, min(11vw, 12vh), 8.5rem);
    line-height: 0.92;
    color: var(--cream);
    letter-spacing: 0.02em;
}

.wm {
    display: block;
}

.wm-line {
    display: block;
    white-space: nowrap;
    text-shadow: var(--wm-shadow);
}

.wm-char {
    display: inline-block;
}

.hero-tag {
    margin: 0 auto 22px;
    max-width: 36ch;
    padding: 6px 14px;
    font-size: clamp(1.3rem, 2.2vw, 1.6rem);
    line-height: 1.2;
    color: var(--cream);
    background: rgba(11, 7, 6, 0.85);
    box-shadow: 0 0 0 2px rgba(11, 7, 6, 0.85);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
}

.hero-gamelink {
    margin-top: 16px;
    padding: 6px 8px;
    font-family: var(--f-pixel);
    font-size: 0.55rem;
    color: var(--muted);
    text-decoration: none;
    background: rgba(11, 7, 6, 0.6);
    transition: color 160ms linear;
}

.hero-gamelink:hover,
.hero-gamelink:focus-visible {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.scroll-cue {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 26px;
    font-family: var(--f-pixel);
    font-size: 0.5rem;
    letter-spacing: 0.2em;
    color: var(--muted);
    text-decoration: none;
    opacity: 0.85;
}

.scroll-cue i {
    width: 10px;
    height: 10px;
    border-right: 3px solid var(--gold);
    border-bottom: 3px solid var(--gold);
    transform: rotate(45deg);
    animation: cueBob 2.4s var(--ease-io) infinite;
}

@keyframes cueBob {
    0%, 100% { transform: translateY(0) rotate(45deg); }
    50% { transform: translateY(6px) rotate(45deg); }
}

/* entrance choreography (html.hero-pending → html.hero-in) */
html.hero-pending .wm-line,
html.hero-pending .hero-kicker,
html.hero-pending .hero-bottom > * {
    opacity: 0;
    animation: failsafeShow 1ms linear 7.5s forwards;
}

@keyframes failsafeShow {
    to { opacity: 1; }
}

html.hero-in .wm-line {
    opacity: 1;
}

html.hero-in .wm-char {
    animation: burnIn 1300ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(240ms + var(--i) * 60ms);
}

@keyframes burnIn {
    0% { opacity: 0; color: #2a0507; transform: translateY(0.12em) scale(0.96); text-shadow: 0 0 0 transparent, 0 0 0 transparent, 0 0 0 transparent, 0 0 0 transparent, 0 0 0 transparent, 0 0 0 transparent, 0 0 0 transparent, 0 0 0 transparent, 0 0 0 transparent, 0 0 0 transparent, 0 0 0 transparent; }
    30% { opacity: 1; color: #ffd27a; text-shadow: -2px -2px 0 #2a0507, 2px -2px 0 #2a0507, -2px 2px 0 #2a0507, 2px 2px 0 #2a0507, 0 -3px 0 #2a0507, 0 3px 0 #2a0507, -3px 0 0 #2a0507, 3px 0 0 #2a0507, 0 0 30px #ffb347, 0 0 60px #e8322b, 0 0 2px #fff, 0 0 2px #fff, 0 0 2px #fff; }
    100% { opacity: 1; color: var(--cream); transform: none; text-shadow: var(--wm-shadow); }
}

html.hero-in .hero-kicker,
html.hero-in .hero-bottom > * {
    animation: riseIn 900ms var(--ease-out) both;
}

html.hero-in .hero-kicker { animation-delay: 80ms; }
html.hero-in .hero-bottom > :nth-child(1) { animation-delay: 1000ms; }
html.hero-in .hero-bottom > :nth-child(2) { animation-delay: 1150ms; }
html.hero-in .hero-bottom > :nth-child(3) { animation-delay: 1600ms; }

@keyframes riseIn {
    from { opacity: 0; transform: translate3d(0, 16px, 0); }
    to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   STAGES (each section is a CRT screen floating over the world)
   -------------------------------------------------------------------------- */
.stage {
    position: relative;
    padding: 0 16px;
}

#musik {
    padding-top: 10vh;
}

.interlude {
    height: 48vh;
}

.interlude-tall {
    height: 72vh;
}

.interlude-short {
    height: 30vh;
}

.interlude-camp {
    height: 64vh;
}

.screen {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(28px, 5vw, 56px) clamp(18px, 4vw, 56px);
    background:
        radial-gradient(ellipse at 50% 40%, rgba(94, 10, 14, 0.32), transparent 75%),
        var(--ink-2);
    border-radius: 28px;
    box-shadow:
        inset 0 0 0 2px rgba(243, 229, 192, 0.06),
        inset 0 0 80px rgba(0, 0, 0, 0.9),
        0 0 0 10px #1c1210,
        0 0 0 13px #000,
        0 0 0 16px var(--dirt),
        0 24px 60px rgba(0, 0, 0, 0.75);
}

/* reveal states (set by JS only for sections that are still below the fold) */
.stage.is-pending[data-reveal='iris'] .screen { clip-path: circle(0% at 50% 30%); }
.stage.is-pending[data-reveal='power'] .screen { transform: scale(1, 0.006); opacity: 0.6; }
.stage.is-pending[data-reveal='wipe'] .screen { clip-path: inset(0 0 100% 0); }

.stage.is-revealing[data-reveal='iris'] .screen {
    animation: irisOpen 900ms steps(14, end) both;
}

@keyframes irisOpen {
    from { clip-path: circle(0% at 50% 30%); }
    to { clip-path: circle(150% at 50% 30%); }
}

.stage.is-revealing[data-reveal='power'] .screen {
    animation: crtOn 700ms var(--ease-out) both;
}

@keyframes crtOn {
    0% { transform: scale(0.2, 0.006); opacity: 0.6; filter: brightness(3); }
    35% { transform: scale(1, 0.006); opacity: 1; filter: brightness(3); }
    100% { transform: none; opacity: 1; filter: none; }
}

.stage.is-revealing[data-reveal='wipe'] .screen {
    animation: wipeDown 700ms steps(12, end) both;
}

@keyframes wipeDown {
    from { clip-path: inset(0 0 100% 0); }
    to { clip-path: inset(0 0 0 0); }
}

.dissolve {
    position: absolute;
    inset: 0;
    z-index: 5;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    pointer-events: none;
}

.stage-no {
    margin: 0 0 10px;
    font-family: var(--f-pixel);
    font-size: 0.62rem;
    color: var(--bandana);
    letter-spacing: 0.2em;
}

.stage-title {
    margin: 0 0 28px;
    font-family: var(--f-pixel);
    font-weight: 400;
    font-size: clamp(1.05rem, 3.4vw, 2rem);
    line-height: 1.3;
    color: var(--cream);
    text-shadow: var(--glow-cream), 4px 4px 0 var(--blood);
    min-height: 1.3em;
}

.copy {
    margin: 0 0 18px;
    color: var(--muted);
    max-width: 62ch;
}

.copy.center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.sub {
    margin: 0 0 16px;
    font-family: var(--f-pixel);
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--gold);
    text-shadow: var(--glow-gold);
}

.gold {
    color: var(--gold);
}

/* ---- Stage 1: Musik ---- */
.music-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.embed-frame {
    padding: 8px;
    background: #000;
    box-shadow: 0 0 0 3px var(--dirt), 0 0 0 6px #000;
}

.embed-frame iframe {
    display: block;
    border: 0;
}

.platforms {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.platform {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    font-family: var(--f-pixel);
    font-size: 0.68rem;
    color: var(--cream);
    text-decoration: none;
    background: #000;
    border: 2px solid rgba(243, 229, 192, 0.2);
    overflow: hidden;
    transition: border-color 160ms linear, color 160ms linear, background-color 160ms linear, transform 260ms var(--ease-out);
}

.platform::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(245, 184, 61, 0.16), transparent);
    transform: translateX(-100%);
    transition: transform 600ms var(--ease-out);
}

.platform .icon {
    width: 24px;
    height: 24px;
    color: var(--gold);
    transition: transform 400ms var(--ease-out);
}

.platform::after {
    content: '▶';
    margin-left: auto;
    color: var(--gold);
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 160ms linear, transform 300ms var(--ease-out);
}

.platform:hover,
.platform:focus-visible {
    border-color: var(--gold);
    color: var(--gold);
    background: var(--crimson-deep);
    transform: translateX(4px);
}

.platform:hover::before,
.platform:focus-visible::before {
    transform: translateX(100%);
}

.platform:hover .icon,
.platform:focus-visible .icon {
    transform: rotate(-8deg) scale(1.12);
}

.platform:hover::after,
.platform:focus-visible::after {
    opacity: 1;
    transform: none;
}

/* ---- Stage 2: Jukebox ---- */
.jukebox {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 22px 22px;
    background: linear-gradient(180deg, #2b1a10, #170d08);
    border: 3px solid #000;
    border-radius: 200px 200px 6px 6px / 70px 70px 6px 6px;
    box-shadow: inset 0 0 0 3px var(--dirt), inset 0 0 0 6px #000, 0 12px 0 #000;
}

.jb-arch {
    position: relative;
    height: 74px;
    margin: 0 -22px 18px;
    display: grid;
    place-items: end center;
    padding-bottom: 12px;
    border-radius: 200px 200px 0 0 / 70px 70px 0 0;
    background: radial-gradient(ellipse at 50% 140%, #c42a1f, #5e0a0e 55%, #2a0507);
    box-shadow: inset 0 0 0 3px #000, inset 0 -3px 0 var(--gold);
    overflow: hidden;
}

.bulbs-arch {
    left: 12%;
    right: 12%;
    top: 12px;
    height: 12px;
}

.jb-brand {
    font-family: var(--f-wordmark);
    font-size: clamp(0.95rem, 2.4vw, 1.35rem);
    color: var(--cream);
    letter-spacing: 0.06em;
    text-shadow: 0 0 2px var(--cream), 0 0 14px rgba(255, 179, 71, 0.6), 2px 2px 0 #000;
}

.jb-body {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 22px;
    align-items: start;
}

.jb-deck {
    display: grid;
    gap: 14px;
    padding: 14px;
    background: #0a0605;
    border: 3px solid #000;
    box-shadow: inset 0 0 0 2px var(--dirt);
}

.turntable {
    position: relative;
    aspect-ratio: 1;
    padding: 8%;
    background: radial-gradient(circle at 30% 25%, #3a2a20, #1a100b 70%);
    border-radius: 8px;
    box-shadow: inset 0 0 0 2px #000, inset 0 0 24px #000;
}

.record {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 0 3px #000, 0 6px 16px rgba(0, 0, 0, 0.7);
}

.record-spin {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle, transparent 0 34%, rgba(255, 255, 255, 0.05) 34.5% 35%, transparent 35.5%),
        repeating-radial-gradient(circle, #121010 0 2px, #1d1a19 2px 3px, #121010 3px 5px);
    animation: spin 1.8s linear infinite;
    animation-play-state: paused;
    will-change: transform;
}

body.is-playing .record-spin {
    animation-play-state: running;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.record-label {
    position: absolute;
    left: 32%;
    top: 32%;
    width: 36%;
    height: 36%;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: radial-gradient(circle, #000 0 5%, var(--blood) 6% 62%, var(--gold) 63% 70%, var(--blood) 71%);
}

.record-label b {
    font-family: var(--f-wordmark);
    font-weight: 400;
    font-size: clamp(0.8rem, 2vw, 1.2rem);
    color: var(--cream);
    line-height: 1;
    transform: translateY(-30%);
}

.record-label i {
    font-family: var(--f-pixel);
    font-style: normal;
    font-size: 0.4rem;
    color: var(--gold);
    transform: translateY(70%);
}

.record-sheen {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 20deg, transparent 0 10%, rgba(255, 255, 255, 0.09) 14%, transparent 22% 55%, rgba(255, 255, 255, 0.07) 62%, transparent 70%);
    pointer-events: none;
}

.tonearm {
    position: absolute;
    right: 5%;
    top: 5%;
    width: 14%;
    height: 66%;
    transform-origin: 50% 8%;
    transform: rotate(-24deg);
    transition: transform 900ms var(--ease-io);
}

.tonearm::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 16px;
    height: 16px;
    margin-left: -8px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #e0e0e6, #8d8f96 60%, #3a3a40);
    box-shadow: 0 0 0 2px #000;
}

.tonearm i {
    position: absolute;
    left: 50%;
    top: 8px;
    bottom: 0;
    width: 5px;
    margin-left: -2px;
    background: linear-gradient(90deg, #c4c6cc, #8d8f96);
    box-shadow: 0 0 0 1px #000;
    transform: rotate(10deg);
    transform-origin: top;
}

.tonearm i::after {
    content: '';
    position: absolute;
    left: -5px;
    bottom: -6px;
    width: 14px;
    height: 12px;
    background: #2a2a2e;
    box-shadow: 0 0 0 2px #000;
}

body.is-playing .tonearm {
    transform: rotate(4deg);
}

.jb-meters {
    width: 100%;
    height: auto;
    aspect-ratio: 160 / 52;
}

.jb-main {
    display: grid;
    gap: 18px;
}

.jb-display {
    position: relative;
    padding: 18px;
    background: #050302;
    border: 3px solid #000;
    box-shadow: inset 0 0 30px rgba(245, 184, 61, 0.08), 0 0 0 2px var(--dirt);
    overflow: hidden;
}

.jb-viz {
    width: 100%;
    height: auto;
    aspect-ratio: 96 / 30;
    margin-bottom: 14px;
}

.jb-now {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.jb-label {
    font-family: var(--f-pixel);
    font-size: 0.55rem;
    color: var(--bandana);
}

.jb-title {
    font-family: var(--f-pixel);
    font-size: clamp(0.66rem, 1.8vw, 0.9rem);
    line-height: 1.5;
    color: var(--amber);
    text-shadow: var(--glow-gold);
}

.jb-progress {
    position: relative;
    height: 14px;
    background: #1a0f0a;
    border: 2px solid var(--dirt);
    cursor: pointer;
}

.jb-progress-fill {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 8px);
    transform-origin: left;
    transform: scaleX(0);
}

.jb-time {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-family: var(--f-pixel);
    font-size: 0.55rem;
    color: var(--muted);
}

.jb-controls {
    display: flex;
    justify-content: center;
    gap: 14px;
}

.key {
    --mx: 0px;
    --my: 0px;
    --press: 0px;
    min-width: 64px;
    min-height: 48px;
    padding: 14px 16px;
    font-family: var(--f-pixel);
    font-size: 0.65rem;
    color: var(--cream);
    background: var(--crimson);
    border: 3px solid #000;
    box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.15), 0 6px 0 #000;
    cursor: pointer;
    transform: translate3d(var(--mx), calc(var(--my) + var(--press)), 0);
    transition: background-color 120ms linear, box-shadow 70ms linear;
}

.key:hover {
    background: var(--blood);
}

.key:active {
    --press: 4px;
    box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.15), 0 2px 0 #000;
}

.key-play {
    min-width: 132px;
    background: var(--gold);
    color: var(--ink);
}

.key-play:hover {
    background: var(--cream);
}

.jb-versions {
    display: flex;
    justify-content: center;
}

.jb-ver {
    min-width: 120px;
    min-height: 44px;
    padding: 10px 14px;
    font-family: var(--f-pixel);
    font-size: 0.6rem;
    color: var(--muted);
    background: #000;
    border: 2px solid var(--dirt);
    cursor: pointer;
    transition: background-color 160ms linear, color 160ms linear;
}

.jb-ver[aria-pressed='true'] {
    color: var(--ink);
    background: var(--gold);
    border-color: var(--gold);
}

.jb-ver:hover {
    color: var(--gold);
}

.jb-ver[aria-pressed='true']:hover {
    color: var(--ink);
}

.jb-list {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 6px;
}

.jb-list small {
    font-size: 0.85em;
    color: var(--muted);
}

.jb-list button {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    text-align: left;
    font-family: var(--f-body);
    font-size: 1.4rem;
    background: rgba(0, 0, 0, 0.45);
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 160ms linear, background-color 160ms linear, transform 240ms var(--ease-out);
}

.jb-lv {
    font-family: var(--f-pixel);
    font-size: 0.55rem;
    color: var(--bandana);
}

.jb-list button:hover,
.jb-list button:focus-visible {
    border-color: rgba(245, 184, 61, 0.5);
    transform: translateX(3px);
}

.jb-list button[aria-current='true'] {
    color: var(--gold);
    border-color: var(--gold);
    background: var(--crimson-deep);
}

.jb-list button[aria-current='true']::after {
    content: '♪';
    margin-left: auto;
}

.jb-locked {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    font-family: var(--f-body);
    font-size: 1.4rem;
    color: var(--muted);
    border: 2px dashed rgba(245, 184, 61, 0.35);
}

.jb-locked .jb-lv {
    color: var(--gold);
}

body.is-playing .jb-list button[aria-current='true']::after {
    animation: noteFloat 1.6s var(--ease-io) infinite;
}

@keyframes noteFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* ---- Stage 3: Band ---- */
.band-figure {
    position: relative;
    margin: 0 0 36px;
    background: #000;
    box-shadow: 0 0 0 3px #000, 0 0 0 6px var(--dirt), 0 0 0 9px #000;
}

.band-figure img {
    width: 100%;
    height: auto;
}

.lineup {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.lineup .tag {
    --c: var(--cream);
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 9px 7px;
    font-size: clamp(0.9rem, 1.8vw, 1.25rem);
    line-height: 1;
    color: var(--cream);
    background: rgba(11, 7, 6, 0.88);
    border: 2px solid var(--c);
    box-shadow: 0 3px 0 #000;
    white-space: nowrap;
    pointer-events: auto;
    transform: translate(-50%, -100%);
    animation: tagIdle 3.6s var(--ease-io) infinite;
    transition: box-shadow 200ms linear, background-color 200ms linear;
}

.lineup .tag::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -9px;
    margin-left: -6px;
    border: 6px solid transparent;
    border-top-color: var(--c);
    border-bottom: 0;
}

@keyframes tagIdle {
    0%, 100% { transform: translate(-50%, -100%); }
    50% { transform: translate(-50%, calc(-100% - 4px)); }
}

.lineup .tag.is-hot,
.lineup .tag:hover {
    background: var(--c);
    color: var(--ink);
    box-shadow: 0 0 0 2px #000, 0 0 22px var(--c);
    animation: tagHop 600ms var(--ease-out);
}

.lineup .tag.is-hot small,
.lineup .tag:hover small {
    color: var(--ink);
}

@keyframes tagHop {
    0% { transform: translate(-50%, -100%); }
    40% { transform: translate(-50%, calc(-100% - 10px)); }
    100% { transform: translate(-50%, -100%); }
}

.lineup b {
    font-family: var(--f-pixel);
    font-weight: 400;
    font-size: clamp(0.55rem, 1.4vw, 0.85rem);
}

.tag-toby { --c: var(--gold); left: 23%; top: 33%; animation-delay: 0s; }
.tag-shmu { --c: var(--teal); left: 45%; top: 38%; animation-delay: -1.2s; }
.tag-birk { --c: #ff6a5e; left: 72.5%; top: 31%; animation-delay: -2.4s; }

.crew {
    margin: 0 0 36px;
}

.crew-cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.crew-card {
    --c: var(--cream);
    --mx: 0px;
    --my: 0px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 10px 18px;
    text-align: center;
    background: #000;
    border: 3px solid rgba(243, 229, 192, 0.16);
    box-shadow: 0 6px 0 #000;
    transform: translate3d(0, 0, 0);
    transition: transform 320ms var(--ease-out), border-color 160ms linear, box-shadow 220ms linear;
}

.crew-card[data-member='toby'] { --c: var(--gold); }
.crew-card[data-member='shmu'] { --c: var(--teal); }
.crew-card[data-member='birk'] { --c: #ff6a5e; }

.crew-card:hover,
.crew-card.is-hot {
    border-color: var(--c);
    transform: translate3d(0, -6px, 0);
    box-shadow: 0 12px 0 #000, 0 0 26px color-mix(in srgb, var(--c) 30%, transparent);
}


.crew-portrait {
    width: min(120px, 100%);
    height: auto;
    aspect-ratio: 1;
    background: radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--c) 22%, #1a0f0a), #0b0706 70%);
    box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--dirt);
}

.crew-name {
    margin-top: 8px;
    font-family: var(--f-pixel);
    font-size: 0.8rem;
    color: var(--c);
}

.crew-inst {
    font-size: 1.3rem;
    color: var(--cream);
    line-height: 1;
}

.crew-line {
    font-size: 1.1rem;
    color: var(--muted);
    line-height: 1.1;
}

.bio {
    columns: 2 320px;
    column-gap: 40px;
}

.bio p {
    margin: 0 0 16px;
    color: var(--muted);
    break-inside: avoid;
}

.bio .bio-lead {
    font-size: 1.7rem;
    line-height: 1.2;
    color: var(--cream);
}

/* ---- Bonus stage: Game teaser + highscores (deliberately small and calm) ---- */
.stage-bonus .screen {
    max-width: 880px;
    padding: clamp(22px, 3.5vw, 36px) clamp(16px, 3vw, 36px);
}

.stage-bonus .stage-title {
    margin-bottom: 18px;
    font-size: clamp(0.85rem, 2.2vw, 1.25rem);
}

.stage-bonus .copy,
.stage-bonus .controls-list {
    font-size: 1.15rem;
}

.stage-bonus .chase-screen {
    max-width: 380px;
    padding: 14px 8px;
}

.stage-bonus .hiscore {
    padding: 16px 14px;
}

.stage-bonus .hiscore-title {
    margin-bottom: 10px;
    font-size: 0.65rem;
}

.stage-bonus .hiscore-list {
    font-size: 0.52rem;
}

.stage-bonus .hiscore-list li {
    padding: 6px 0;
}

.teaser-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr);
    gap: 28px;
    align-items: start;
}

.chase-screen {
    position: relative;
    margin: 0 0 22px;
    padding: 18px 10px;
    background: #050302;
    border: 3px solid #000;
    border-radius: 14px;
    box-shadow: inset 0 0 0 3px var(--dirt), 0 0 0 3px #000;
}

.chase-screen canvas {
    width: 100%;
    height: auto;
    aspect-ratio: 256 / 112;
    border-radius: 8px;
}

.bulbs-top,
.bulbs-bottom {
    left: 14px;
    right: 14px;
    height: 10px;
    --pitch: 16px;
    --size: 5px;
}

.bulbs-top { top: 4px; }
.bulbs-bottom { bottom: 4px; }

.bulbs-bottom > span {
    animation-direction: reverse;
}

.chase-caption {
    position: absolute;
    left: 50%;
    top: 26px;
    transform: translateX(-50%);
    margin: 0;
    width: max-content;
    max-width: 90%;
    font-family: var(--f-pixel);
    font-size: clamp(0.42rem, 1vw, 0.6rem);
    text-align: center;
    color: var(--cream);
    text-shadow: 2px 2px 0 #000;
}

.chase-caption b {
    font-weight: 400;
    color: var(--gold);
}

.controls-list {
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
    display: grid;
    gap: 8px;
    color: var(--muted);
}

.hiscore {
    padding: 22px 20px;
    background: #000;
    border: 3px solid var(--dirt);
}

.hiscore-title {
    margin: 0 0 18px;
    text-align: center;
    font-family: var(--f-pixel);
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--bandana);
    text-shadow: var(--glow-red);
}

.hiscore-list {
    list-style: none;
    counter-reset: rank;
    margin: 0;
    padding: 0;
    font-family: var(--f-pixel);
    font-size: 0.62rem;
}

.hiscore-list li {
    counter-increment: rank;
    display: grid;
    grid-template-columns: 4.2em 1fr auto;
    gap: 8px;
    padding: 9px 0;
    color: var(--teal);
    border-bottom: 1px dashed rgba(243, 229, 192, 0.08);
}

.hiscore-list li::before {
    content: counter(rank) 'TH';
}

.hiscore-list li:nth-child(1)::before { content: '1ST'; }
.hiscore-list li:nth-child(2)::before { content: '2ND'; }
.hiscore-list li:nth-child(3)::before { content: '3RD'; }
.hiscore-list li:nth-child(1) { color: var(--cream); }
.hiscore-list li:nth-child(2) { color: var(--gold); }
.hiscore-list li:nth-child(3) { color: var(--bandana); }

.hiscore-list li.hiscore-empty {
    display: block;
    text-align: center;
    color: var(--muted);
}

.hiscore-list li.hiscore-empty::before {
    content: none;
}

.hs-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hs-score {
    font-variant-numeric: tabular-nums;
}

.hiscore-list li.is-rolling .hs-score {
    color: var(--muted);
}

/* ---- Stage 5: Booking ---- */
.booking-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 40px;
}

.show-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.show-list li {
    padding: 14px 0;
    border-bottom: 2px dashed rgba(243, 229, 192, 0.15);
}

.show-empty {
    color: var(--muted);
}

.press-start {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin: 6px 0 26px;
    font-family: var(--f-pixel);
    font-size: clamp(0.7rem, 2.2vw, 1.05rem);
    color: var(--gold);
    text-decoration: none;
    text-shadow: var(--glow-gold);
    word-break: break-all;
    transition: color 160ms linear;
}

.press-start .icon {
    width: 28px;
    height: 28px;
    transition: transform 400ms var(--ease-out);
}

.press-start:hover,
.press-start:focus-visible {
    color: var(--cream);
}

.press-start:hover .icon,
.press-start:focus-visible .icon {
    transform: translateY(-3px) rotate(-6deg);
}

/* --------------------------------------------------------------------------
   CONTROL PANEL (footer)
   -------------------------------------------------------------------------- */
.control-panel {
    padding: 44px 16px 48px;
    background: linear-gradient(180deg, #2a1810 0%, #120a07 100%);
    border-top: 6px solid #000;
    box-shadow: inset 0 6px 0 var(--dirt);
}

.bulbs-panel {
    top: 14px;
    bottom: auto;
    height: 12px;
    --pitch: 24px;
    --size: 8px;
}

.panel-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 24px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas:
        'socials buttons coin'
        'meta meta meta';
    gap: 28px;
    align-items: center;
}

.socials {
    grid-area: socials;
    list-style: none;
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.socials a {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: var(--cream);
    background: #000;
    border: 2px solid var(--dirt);
    transition: color 160ms linear, border-color 160ms linear, transform 260ms var(--ease-out);
}

.socials a:hover,
.socials a:focus-visible {
    color: var(--gold);
    border-color: var(--gold);
    transform: translateY(-3px);
}

.socials .icon {
    width: 24px;
    height: 24px;
}

.panel-buttons {
    grid-area: buttons;
    display: flex;
    gap: 22px;
}

.arcade-btn {
    --mx: 0px;
    --my: 0px;
    --press: 0px;
    position: relative;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    text-decoration: none;
    font-family: var(--f-pixel);
    font-size: 0.55rem;
    color: var(--cream);
    border: 4px solid #000;
    box-shadow: inset 0 -8px 0 rgba(0, 0, 0, 0.35), inset 0 6px 0 rgba(255, 255, 255, 0.3), 0 8px 0 #000, 0 0 0 6px #1a0f0a, 0 8px 0 6px #000;
    transform: translate3d(var(--mx), calc(var(--my) + var(--press)), 0);
    transition: box-shadow 70ms linear, filter 160ms linear;
}

.arcade-btn span {
    text-shadow: 1px 1px 0 #000;
}

.arcade-big {
    width: 96px;
    height: 96px;
    font-size: 0.6rem;
}

.arcade-small {
    width: 58px;
    height: 58px;
    font-size: 0.45rem;
    align-self: center;
}

.arcade-red { background: var(--bandana); }
.arcade-gold { background: var(--gold); color: var(--ink); }
.arcade-gold span { text-shadow: none; }

.arcade-btn:hover,
.arcade-btn:focus-visible {
    filter: brightness(1.15);
}

.arcade-btn:active {
    --press: 6px;
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.35), inset 0 6px 0 rgba(255, 255, 255, 0.3), 0 2px 0 #000, 0 0 0 6px #1a0f0a, 0 2px 0 6px #000;
}

.coin-door {
    grid-area: coin;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: #0d0806;
    border: 3px solid #3a3a3a;
    box-shadow: inset 0 0 0 2px #000;
    font-family: var(--f-pixel);
    font-size: 0.5rem;
    color: var(--bandana);
}

.coin-slot {
    display: grid;
    place-items: center;
    width: 44px;
    height: 48px;
    padding: 0;
    background: #1a1a1a;
    border: 2px solid #555;
    cursor: pointer;
}

.coin-slot span {
    width: 8px;
    height: 30px;
    background: #000;
    border: 2px solid #777;
    box-shadow: 0 0 10px rgba(232, 50, 43, 0.6);
    transition: box-shadow 200ms linear;
}

.coin-slot:hover span,
.coin-slot:focus-visible span {
    box-shadow: 0 0 16px rgba(245, 184, 61, 0.9);
}

.coin-slot.is-fed span {
    animation: slotFlash 520ms ease-out;
}

.panel-meta {
    grid-area: meta;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 18px;
    border-top: 2px solid rgba(0, 0, 0, 0.6);
    font-family: var(--f-pixel);
    font-size: 0.5rem;
    color: var(--muted);
}

.panel-meta p {
    margin: 0;
}

.dip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    cursor: pointer;
}

.dip input {
    appearance: none;
    width: 34px;
    height: 18px;
    margin: 0;
    background: #000;
    border: 2px solid var(--muted);
    position: relative;
    cursor: pointer;
}

.dip input::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    background: var(--muted);
    transition: left 160ms var(--ease-out);
}

.dip input:checked {
    border-color: var(--teal);
}

.dip input:checked::after {
    left: 18px;
    background: var(--teal);
}

/* --------------------------------------------------------------------------
   CRT POWER-OFF (exit to the game)
   -------------------------------------------------------------------------- */
.power-off {
    position: fixed;
    inset: 0;
    z-index: 160;
    pointer-events: none;
    display: none;
    background: #000;
}

.power-off.is-on {
    display: block;
}

.power-off::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 100vh;
    margin-top: -50vh;
    background: var(--cream);
    animation: powerOff 320ms ease-in forwards;
}

@keyframes powerOff {
    0% { transform: scale(1, 1); opacity: 0.25; }
    55% { transform: scale(1, 0.004); opacity: 1; }
    100% { transform: scale(0, 0.004); opacity: 1; }
}

/* --------------------------------------------------------------------------
   KONAMI — Night Surf palette swap
   -------------------------------------------------------------------------- */
body.night-surf {
    --blood: #0f5c63;
    --crimson: #0a3a40;
    --crimson-deep: #062226;
    --bandana: #3fd0c9;
    --gold: #f3e5c0;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 110;
    padding: 12px 16px;
    font-family: var(--f-pixel);
    font-size: 0.6rem;
    color: var(--ink);
    background: var(--teal);
    box-shadow: 0 0 0 3px #000, 4px 4px 0 3px rgba(0, 0, 0, 0.5);
    transform: translate(-50%, 20px);
    opacity: 0;
    transition: opacity 240ms linear, transform 400ms var(--ease-out);
    pointer-events: none;
}

.toast.is-on {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
    .ticket-rail {
        right: 4px;
        width: 40px;
    }

    .ticket {
        width: 30px;
        height: 20px;
        margin-left: -15px;
    }
}

@media (max-width: 960px) {
    .nav-menu a {
        padding: 10px 8px 10px 18px;
        font-size: 0.55rem;
    }

    .nav-menu a::before {
        left: 4px;
    }

    .sound-label {
        display: none;
    }
}

@media (max-width: 900px) {
    .music-grid,
    .teaser-grid,
    .booking-grid,
    .jb-body {
        grid-template-columns: 1fr;
    }

    .jb-deck {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
        align-items: center;
    }

    .panel-inner {
        grid-template-columns: 1fr;
        grid-template-areas: 'buttons' 'socials' 'coin' 'meta';
        justify-items: center;
    }

    .coin-door {
        justify-self: center;
    }

    /* ticket rail becomes a thin horizontal track under the HUD */
    .ticket-rail {
        top: calc(var(--header-h) + 8px);
        bottom: auto;
        left: 12px;
        right: 12px;
        width: auto;
        height: 26px;
    }

    .ticket-track {
        left: 0;
        right: 0;
        top: 50%;
        bottom: auto;
        border-left: 0;
        border-top: 2px dashed rgba(243, 229, 192, 0.08);
    }

    .ticket {
        left: 0;
        top: 1px;
        margin-left: 0;
    }

    .buitre {
        left: 0;
        margin-left: 0;
        width: 72px;
        height: 72px;
    }

    .ticket-msg {
        right: 0;
        top: 28px;
        transform: translateY(-6px);
    }

    .ticket-msg.is-on {
        transform: none;
    }
}

@media (max-width: 760px) {
    :root {
        --marquee-h: 58px;
    }

    body {
        font-size: 1.3rem;
    }

    .nav-toggle {
        display: block;
    }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        margin: 0;
        background: var(--ink);
        border-bottom: 3px solid var(--gold);
        visibility: hidden;
        transform: scaleY(0);
        transform-origin: top;
        transition: transform 200ms var(--ease-out), visibility 0s 200ms;
        z-index: 2;
    }

    .nav.is-open {
        visibility: visible;
        transform: scaleY(1);
        transition: transform 240ms var(--ease-out);
    }

    .nav-menu {
        flex-direction: column;
        padding: 8px 16px 16px;
    }

    .nav-menu a {
        padding: 16px 12px 16px 26px;
        font-size: 0.75rem;
    }

    .hud-strip {
        font-size: 0.45rem;
    }

    .hud-credit {
        display: none;
    }

    .marquee-logo {
        font-size: 1.25rem;
    }

    .stage {
        padding: 0 12px;
    }

    .interlude {
        height: 34vh;
    }

    .interlude-tall {
        height: 52vh;
    }

    .interlude-camp {
        height: 52vh;
    }

    .screen {
        border-radius: 18px;
        box-shadow:
            inset 0 0 0 2px rgba(243, 229, 192, 0.06),
            inset 0 0 60px rgba(0, 0, 0, 0.9),
            0 0 0 6px #1c1210,
            0 0 0 8px #000,
            0 0 0 10px var(--dirt),
            0 16px 40px rgba(0, 0, 0, 0.7);
    }

    .lineup .tag small {
        display: none;
    }

    .lineup .tag {
        padding: 5px 6px;
    }

    .btn {
        padding: 14px 14px;
        font-size: 0.6rem;
    }

    .hero-actions {
        gap: 12px;
    }

    .hero-tag {
        margin-bottom: 18px;
        font-size: 1.25rem;
    }

    .scroll-cue {
        margin-top: 18px;
    }

    .crew-cards {
        gap: 10px;
    }

    .crew-card {
        padding: 14px 6px 14px;
    }

    .crew-line {
        display: none;
    }

    .crew-name {
        font-size: 0.6rem;
    }

    .crew-inst {
        font-size: 1.1rem;
    }

    .jukebox {
        padding: 0 12px 14px;
        border-radius: 120px 120px 6px 6px / 50px 50px 6px 6px;
    }

    .jb-arch {
        height: 60px;
        margin: 0 -12px 14px;
        border-radius: 120px 120px 0 0 / 50px 50px 0 0;
    }

    .jb-deck {
        padding: 10px;
        gap: 10px;
    }

    .jb-list {
        grid-template-columns: 1fr;
    }

    .jb-list button {
        font-size: 1.25rem;
    }

}

@media (max-width: 560px) {
    .control-panel {
        padding: 36px 12px 28px;
    }

    .panel-inner {
        grid-template-columns: auto auto;
        grid-template-areas: 'buttons coin' 'socials socials' 'meta meta';
        gap: 20px 18px;
        justify-content: center;
    }

    .arcade-big {
        width: 80px;
        height: 80px;
    }

    .arcade-small {
        width: 54px;
        height: 54px;
    }

    .panel-buttons {
        gap: 16px;
    }

    .coin-label {
        display: none;
    }

    .coin-door {
        padding: 8px;
    }

    .panel-meta {
        justify-content: center;
    }
}

@media (max-width: 380px) {
    .hero-actions .btn {
        padding: 13px 10px;
        font-size: 0.55rem;
    }

    .key {
        min-width: 56px;
        padding: 12px 10px;
    }

    .key-play {
        min-width: 112px;
    }
}

@media (max-height: 640px) {
    .scroll-cue {
        display: none;
    }
}

/* short landscape phones: the hero is the viewport, horizon a bit lower (world uses the same 72%) */
@media (max-height: 519px) and (orientation: landscape) {
    :root {
        --horizon: 72%;
    }

    .hero {
        min-height: 0;
    }

    .hero-kicker {
        display: none;
    }

    .wordmark {
        font-size: clamp(2rem, 12vh, 4rem);
    }

    .hero-bottom {
        top: calc(var(--horizon) + 8px);
    }

    .hero-gamelink {
        margin-top: 6px;
    }
}

/* --------------------------------------------------------------------------
   REDUCED MOTION — calm, static, fully usable
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        animation-delay: 0ms !important;
        transition-duration: 1ms !important;
    }

    .crt-roll,
    .intro,
    .spur,
    .fx,
    .ticket-rail,
    .scroll-cue {
        display: none !important;
    }

    .bulbs > span,
    .record-spin,
    .lineup .tag {
        animation: none !important;
    }

    .lineup .tag {
        transform: translate(-50%, -100%);
    }

    .stage .screen {
        clip-path: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}
