/* ==========================================================================
   SPOOKIZ DRESS-UP — Arcade redesign
   Concept: the page is the game's HUD. Chunky outlines, hard drop shadows,
   neon-on-night palette, and a playable Style Studio as the centrepiece.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
    --ink: #1a0b2e;
    --night: #170826;
    --night-2: #23103e;
    --night-3: #2f1552;

    --magenta: #ff2d95;
    --purple: #a24bff;
    --cyan: #2ee6ff;
    --lime: #8bff5a;
    --yellow: #ffd83d;
    --orange: #ff7a2f;

    --paper: #fff6fb;
    --muted: #c9b3e6;

    --edge: 3px;
    --radius: 22px;
    --radius-sm: 14px;

    --drop: 0 6px 0 var(--ink);
    --drop-lg: 0 10px 0 var(--ink), 0 26px 44px rgba(0, 0, 0, .45);

    --font-display: 'Luckiest Guy', 'Trebuchet MS', system-ui, sans-serif;
    --font-body: 'Baloo 2', 'Trebuchet MS', system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 17px;
    line-height: 1.6;
    color: var(--paper);
    background: var(--night);
    overflow-x: clip;   /* `clip` instead of `hidden` so the sticky HUD keeps working */
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }

.wrap {
    width: min(1180px, 100% - 2.5rem);
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--yellow);
    color: var(--ink);
    padding: .75rem 1.25rem;
    border-radius: 0 0 var(--radius-sm) 0;
    font-weight: 800;
}
.skip-link:focus { left: 0; }

:focus-visible {
    outline: 3px dashed var(--yellow);
    outline-offset: 3px;
}

/* ---------- Background ---------- */
.arcade-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 50% -10%, #3a1560 0%, transparent 60%),
        linear-gradient(180deg, #1d0a33 0%, #140620 100%);
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(120% 100% at 50% 0%, #000 25%, transparent 75%);
}

.bg-glow {
    position: absolute;
    width: 46vw;
    height: 46vw;
    border-radius: 50%;
    filter: blur(90px);
    opacity: .35;
    animation: drift 18s ease-in-out infinite;
}
.bg-glow-1 { background: var(--magenta); top: -10%; left: -8%; }
.bg-glow-2 { background: var(--cyan); top: 35%; right: -12%; animation-delay: -6s; }
.bg-glow-3 { background: var(--purple); bottom: -15%; left: 30%; animation-delay: -12s; }

@keyframes drift {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(4%, -6%, 0) scale(1.12); }
}

.bg-confetti { position: absolute; inset: 0; }
.bg-confetti i {
    position: absolute;
    width: 10px;
    height: 14px;
    border-radius: 3px;
    opacity: .5;
    animation: fall linear infinite;
}
@keyframes fall {
    from { transform: translateY(-12vh) rotate(0deg); }
    to { transform: translateY(112vh) rotate(720deg); }
}

/* ---------- Buttons ---------- */
.btn {
    --btn-bg: var(--magenta);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .85rem 1.6rem;
    border: var(--edge) solid var(--ink);
    border-radius: 999px;
    background: var(--btn-bg);
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--drop);
    transform: translateY(0);
    transition: transform .09s ease, box-shadow .09s ease, filter .15s ease;
    user-select: none;
    white-space: nowrap;
}
.btn:hover { filter: brightness(1.07); }
.btn:active {
    transform: translateY(5px);
    box-shadow: 0 1px 0 var(--ink);
}
.btn svg { width: 20px; height: 20px; fill: none; }
.btn-start svg { stroke: currentColor; }

.btn-sm { padding: .55rem 1.1rem; font-size: .92rem; }
.btn-wide { width: 100%; }
.btn-xl { padding: 1.15rem 2.4rem; font-size: 1.25rem; }

.btn-start {
    --btn-bg: linear-gradient(180deg, var(--yellow), var(--orange));
    background-image: var(--btn-bg);
    flex-direction: column;
    line-height: 1.05;
    padding: .8rem 2.2rem;
}
.btn-start.btn-xl,
.btn-start.btn-wide { flex-direction: row; }

.btn-kicker {
    font-family: var(--font-body);
    font-size: .7rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    opacity: .75;
}
.btn-main { font-family: var(--font-display); font-size: 1.4rem; letter-spacing: .04em; }
.btn-xl .btn-main { font-size: 1.5rem; }
.btn-wide .btn-main { font-size: 1.25rem; }

.btn-play { --btn-bg: linear-gradient(180deg, #ff5fae, var(--magenta)); background-image: var(--btn-bg); color: #fff; }

.btn-ghost {
    background: rgba(255, 255, 255, .06);
    color: var(--paper);
    border-color: rgba(255, 255, 255, .35);
    box-shadow: 0 6px 0 rgba(0, 0, 0, .35);
    backdrop-filter: blur(6px);
}
.btn-ghost svg { fill: currentColor; }

.btn-chunky { padding: .7rem 1.3rem; font-size: .95rem; }
.btn-lime { --btn-bg: var(--lime); }
.btn-plain { --btn-bg: #fff; }

/* ---------- Coin ---------- */
.coin {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff4b8, var(--yellow) 55%, #e0a400);
    border: 2px solid var(--ink);
    display: inline-block;
    flex: none;
}
.coin-sm { width: 14px; height: 14px; border-width: 1.5px; }

.coin-chip {
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .4rem .85rem;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: rgba(255, 216, 61, .16);
    box-shadow: 0 3px 0 var(--ink);
}
.coin-count { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: .05em; }
.coin-count.bump { animation: bump .35s ease; }
@keyframes bump {
    50% { transform: scale(1.4); color: var(--yellow); }
}

/* ---------- HUD / header ---------- */
.hud {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: .7rem 0;
    background: rgba(23, 8, 38, .78);
    backdrop-filter: blur(14px);
    border-bottom: 2px solid rgba(255, 255, 255, .09);
}
.hud-inner {
    width: min(1180px, 100% - 2.5rem);
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.hud-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
    color: inherit;
}
.hud-logo { height: 30px; width: auto; }
.hud-wordmark {
    font-family: var(--font-display);
    font-size: 1.15rem;
    letter-spacing: .04em;
    color: var(--yellow);
    -webkit-text-stroke: 1px var(--ink);
    padding-top: 4px;
}

.hud-nav {
    display: flex;
    gap: .35rem;
    margin-left: auto;
}
.hud-nav a {
    padding: .45rem .95rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 700;
    font-size: .95rem;
    transition: background .18s ease, color .18s ease;
}
.hud-nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }

.hud-right { display: flex; align-items: center; gap: .7rem; }

/* ---------- Hero ---------- */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(2rem, 5vw, 4rem); }
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}

.tagline {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin: 0 0 1.2rem;
    padding: .35rem .9rem;
    border: 2px solid rgba(139, 255, 90, .45);
    border-radius: 999px;
    background: rgba(139, 255, 90, .1);
    color: var(--lime);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.blink {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 10px var(--lime);
    animation: blink 1.4s steps(2, end) infinite;
}
@keyframes blink { 50% { opacity: .15; } }

.hero-title {
    font-family: var(--font-display);
    margin: 0;
    line-height: .92;
    letter-spacing: .01em;
    text-transform: uppercase;
}
.hero-title span { display: block; }
.line-1 {
    font-size: clamp(3.2rem, 7.5vw, 6rem);
    background: linear-gradient(180deg, #fff 20%, var(--yellow) 60%, var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 5px 0 var(--ink));
}
.line-2 {
    font-size: clamp(2.6rem, 6vw, 4.8rem);
    color: var(--magenta);
    -webkit-text-stroke: 3px var(--ink);
    paint-order: stroke fill;
    text-shadow: 0 6px 0 var(--ink);
}

.hero-sub {
    max-width: 46ch;
    margin: 1.4rem 0 2rem;
    color: var(--muted);
    font-weight: 500;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: stretch;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin: 2.5rem 0 0;
    padding-top: 1.5rem;
    border-top: 2px dashed rgba(255, 255, 255, .14);
}
.hero-stats dt {
    font-size: .72rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}
.hero-stats dd {
    margin: .15rem 0 0;
    font-family: var(--font-display);
    font-size: 1.7rem;
    color: var(--cyan);
}

/* Hero screen */
.hero-screen { position: relative; }

.screen-bezel {
    position: relative;
    border: var(--edge) solid var(--ink);
    border-radius: 26px;
    background: linear-gradient(180deg, var(--night-3), var(--night-2));
    padding: .6rem;
    box-shadow: var(--drop-lg);
    overflow: hidden;
}
.screen-bezel::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 26px;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .1);
    pointer-events: none;
}

.screen-hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .25rem .5rem .6rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .75rem;
    border: 2px solid var(--ink);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    background: #fff;
    color: var(--ink);
}
.pill-level { background: var(--cyan); }
.pill-coins { background: var(--yellow); }
.pill-score { background: var(--lime); }
.pill b { font-family: var(--font-display); font-size: .95rem; letter-spacing: .04em; }

.hearts { display: inline-flex; gap: .25rem; }
.hearts i {
    width: 15px; height: 15px;
    background: var(--magenta);
    border: 1.5px solid var(--ink);
    clip-path: polygon(50% 100%, 0 35%, 15% 0, 50% 20%, 85% 0, 100% 35%);
    display: inline-block;
}

.screen-art {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    border: 2px solid var(--ink);
    background: #0e0418;
    animation: float 7s ease-in-out infinite;
}
.screen-art img { width: 100%; }

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

.screen-scan {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(0, 0, 0, .14) 3px 4px);
    mix-blend-mode: overlay;
    pointer-events: none;
    border-radius: 26px;
}

.sticker {
    position: absolute;
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    border: var(--edge) solid var(--ink);
    box-shadow: var(--drop);
    z-index: 3;
}
.sticker-new {
    left: -18px;
    bottom: 26px;
    padding: .5rem 1rem;
    border-radius: 12px;
    background: var(--lime);
    color: var(--ink);
    transform: rotate(-9deg);
    font-size: 1.1rem;
    animation: wobble 3s ease-in-out infinite;
}
.sticker-star {
    top: -22px;
    right: -10px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--magenta);
    color: #fff;
    font-size: 1.5rem;
    transform: rotate(12deg);
    animation: wobble 3.6s ease-in-out infinite reverse;
}
@keyframes wobble {
    0%, 100% { transform: rotate(-9deg) translateY(0); }
    50% { transform: rotate(-4deg) translateY(-6px); }
}

/* ---------- Section headings ---------- */
.sec-head {
    text-align: center;
    max-width: 62ch;
    margin: 0 auto clamp(2rem, 4vw, 3.25rem);
}
.sec-kicker {
    margin: 0 0 .5rem;
    font-size: .78rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--cyan);
    font-weight: 700;
}
.sec-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: .02em;
    color: #fff;
    text-shadow: 0 5px 0 var(--ink);
}
.sec-sub {
    margin: 1rem auto 0;
    color: var(--muted);
    font-weight: 500;
}

/* ---------- Style Studio ---------- */
.studio { position: relative; padding: clamp(3rem, 6vw, 5.5rem) 0; }

.studio-board {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) 320px;
    gap: 1.25rem;
    align-items: start;
}

/* Character rail */
.rail {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.rail-btn {
    display: grid;
    justify-items: center;
    gap: .15rem;
    padding: .5rem .25rem .35rem;
    border: var(--edge) solid var(--ink);
    border-radius: var(--radius-sm);
    background: var(--night-2);
    box-shadow: 0 4px 0 var(--ink);
    cursor: pointer;
    transition: transform .12s ease, background .2s ease;
}
.rail-btn img { width: 40px; height: 48px; object-fit: contain; }
.rail-btn span { font-size: .68rem; font-weight: 800; color: var(--muted); }
.rail-btn:hover { transform: translateY(-2px); }
.rail-btn.is-active {
    background: linear-gradient(180deg, var(--magenta), #d3157a);
}
.rail-btn.is-active span { color: #fff; }

/* Stage */
.stage-col { display: grid; gap: 1rem; }

.stage {
    position: relative;
    aspect-ratio: 4 / 3.4;
    border: var(--edge) solid var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--drop-lg);
    overflow: hidden;
    touch-action: none;
    transition: background .45s ease;
}
.stage.scene-stage { background: radial-gradient(80% 70% at 50% 10%, #6b2bb0, #2a0f47 70%); }
.stage.scene-night { background: radial-gradient(70% 60% at 50% 15%, #123a6b, #06101f 70%); }
.stage.scene-holi { background: conic-gradient(from 210deg, #ff2d95, #ffd83d, #8bff5a, #2ee6ff, #a24bff, #ff2d95); }
.stage.scene-candy { background: linear-gradient(160deg, #ffb3e0, #ffe6a1 60%, #b6f5ff); }

.stage-hud {
    position: absolute;
    top: .9rem;
    left: .9rem;
    right: .9rem;
    display: flex;
    justify-content: space-between;
    z-index: 4;
    pointer-events: none;
}

.spotlight {
    position: absolute;
    left: 50%;
    top: -14%;
    width: 72%;
    height: 118%;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, .28), transparent 62%);
    pointer-events: none;
}

.stage-char {
    position: absolute;
    left: 50%;
    bottom: 4%;
    transform: translateX(-50%);
    height: 78%;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .45));
    z-index: 2;
    animation: idle 4s ease-in-out infinite;
}
@keyframes idle {
    0%, 100% { transform: translateX(-50%) translateY(0) rotate(0deg); }
    50% { transform: translateX(-50%) translateY(-9px) rotate(-.6deg); }
}
.stage-char.swap { animation: pop .4s ease; }
@keyframes pop {
    0% { transform: translateX(-50%) scale(.85); opacity: 0; }
    60% { transform: translateX(-50%) scale(1.04); opacity: 1; }
    100% { transform: translateX(-50%) scale(1); }
}

.sticker-layer { position: absolute; inset: 0; z-index: 3; }

.equipped {
    position: absolute;
    width: 22%;
    cursor: grab;
    touch-action: none;
    filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .4));
    animation: drop-in .35s cubic-bezier(.2, 1.5, .4, 1);
}
.equipped:active { cursor: grabbing; }
.equipped svg { width: 100%; height: auto; pointer-events: none; }
@keyframes drop-in {
    from { transform: translate(-50%, -50%) scale(.2) rotate(-25deg); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1) rotate(0); opacity: 1; }
}

.stage-hint {
    position: absolute;
    left: 50%;
    bottom: .8rem;
    transform: translateX(-50%);
    margin: 0;
    padding: .35rem 1rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    z-index: 4;
    transition: opacity .3s ease;
    pointer-events: none;
}
.stage-hint.hide { opacity: 0; }

.stage-controls { display: flex; gap: .75rem; justify-content: center; }

/* Wardrobe */
.wardrobe {
    border: var(--edge) solid var(--ink);
    border-radius: var(--radius);
    background: var(--night-2);
    box-shadow: var(--drop-lg);
    padding: 1rem;
}
.ward-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .3rem;
    padding: .3rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, .3);
    margin-bottom: 1rem;
}
.ward-tab {
    padding: .5rem .25rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 800;
    cursor: pointer;
    transition: background .18s ease, color .18s ease;
}
.ward-tab:hover { color: #fff; }
.ward-tab.is-active { background: var(--cyan); color: var(--ink); }

.ward-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .6rem;
    min-height: 236px;
    align-content: start;
}

.item {
    position: relative;
    display: grid;
    place-items: center;
    gap: .2rem;
    aspect-ratio: 1;
    padding: .4rem;
    border: 2px solid rgba(255, 255, 255, .16);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .05);
    cursor: pointer;
    transition: transform .12s ease, border-color .18s ease, background .18s ease;
}
.item:hover {
    transform: translateY(-3px);
    border-color: var(--yellow);
    background: rgba(255, 216, 61, .12);
}
.item.is-on {
    border-color: var(--lime);
    background: rgba(139, 255, 90, .14);
}
.item.is-on::after {
    content: '✓';
    position: absolute;
    top: -7px;
    right: -7px;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--lime);
    color: var(--ink);
    border: 2px solid var(--ink);
    font-size: .8rem;
    font-weight: 800;
}
.item svg { width: 60%; height: auto; }
.item .price {
    display: flex;
    align-items: center;
    gap: .2rem;
    font-size: .68rem;
    font-weight: 800;
    color: var(--yellow);
}
.item .swatch {
    width: 60%;
    aspect-ratio: 1;
    border-radius: 10px;
    border: 2px solid var(--ink);
}

.ward-note {
    margin: 1rem 0 0;
    text-align: center;
    font-size: .75rem;
    color: var(--muted);
    font-weight: 500;
}

/* Toast */
.toast {
    position: fixed;
    left: 50%;
    bottom: 2rem;
    transform: translate(-50%, 150%);
    z-index: 120;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.3rem;
    border: var(--edge) solid var(--ink);
    border-radius: 999px;
    background: var(--yellow);
    color: var(--ink);
    font-weight: 800;
    box-shadow: var(--drop);
    transition: transform .35s cubic-bezier(.2, 1.4, .4, 1);
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- Roster ---------- */
.roster { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.roster-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.char-card {
    position: relative;
    border: var(--edge) solid var(--ink);
    border-radius: var(--radius);
    background: var(--night-2);
    box-shadow: var(--drop);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}
.char-card:hover {
    transform: translateY(-8px) rotate(-1deg);
    box-shadow: 0 14px 0 var(--ink), 0 22px 30px rgba(0, 0, 0, .4);
}
.char-art {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 210px;
    padding: 1rem .75rem 0;
    overflow: hidden;
    background: radial-gradient(70% 80% at 50% 100%, color-mix(in srgb, var(--char) 55%, transparent), transparent 70%);
}
/* max-height, not height:100% — a percentage height doesn't resolve here, so the
   image falls back to its intrinsic size and spills over the card body. */
.char-art img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transform-origin: bottom center;
    filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .4));
    transition: transform .25s ease;
}
.char-card:hover .char-art img { transform: scale(1.07) translateY(-4px); }

.char-body { padding: 1rem 1rem 1.25rem; border-top: 2px solid rgba(255, 255, 255, .08); }
.char-tag {
    display: inline-block;
    padding: .15rem .6rem;
    border-radius: 999px;
    background: var(--char);
    color: var(--ink);
    font-size: .72rem;
    font-weight: 800;
    text-transform: capitalize;
    letter-spacing: .02em;
    border: 2px solid var(--ink);
}
.char-body h3 {
    /* font-family: var(--font-display); */
    margin: .5rem 0 .25rem;
    font-size: 1.5rem;
    letter-spacing: .03em;
}
.char-body p { margin: 0; font-size: .85rem; color: var(--muted); font-weight: 500; line-height: 1.45; }

/* ---------- Event / quest ---------- */
.event { padding: clamp(3rem, 6vw, 5.5rem) 0; }

.quest-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border: var(--edge) solid var(--ink);
    border-radius: 30px;
    background:
        radial-gradient(60% 90% at 15% 20%, rgba(255, 45, 149, .35), transparent 60%),
        radial-gradient(60% 90% at 85% 80%, rgba(46, 230, 255, .3), transparent 60%),
        var(--night-2);
    box-shadow: var(--drop-lg);
    overflow: hidden;
}

.quest-art { position: relative; }
.quest-art img { border-radius: var(--radius); border: 2px solid var(--ink); }

.splash {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: .85;
    animation: pulse 5s ease-in-out infinite;
}
.s1 { width: 70px; height: 70px; background: var(--yellow); top: -14px; left: 12%; }
.s2 { width: 52px; height: 52px; background: var(--lime); bottom: 8%; right: -12px; animation-delay: -1.5s; }
.s3 { width: 40px; height: 40px; background: var(--cyan); top: 40%; left: -14px; animation-delay: -3s; }
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: .7; }
    50% { transform: scale(1.25); opacity: 1; }
}

.quest-badge {
    display: inline-block;
    padding: .3rem .85rem;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: var(--orange);
    color: var(--ink);
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .12em;
    box-shadow: 0 3px 0 var(--ink);
}
.quest-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 4.5vw, 3.4rem);
    margin: 1rem 0 .5rem;
    color: var(--yellow);
    -webkit-text-stroke: 2px var(--ink);
    paint-order: stroke fill;
    text-shadow: 0 5px 0 var(--ink);
}
.quest-text { margin: 0 0 1.5rem; color: var(--muted); font-weight: 500; }

.quest-progress { margin-bottom: 1.4rem; }
.quest-progress-head {
    display: flex;
    justify-content: space-between;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .4rem;
    color: var(--muted);
}
.quest-progress-head b { color: var(--lime); }
.bar {
    height: 16px;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: rgba(0, 0, 0, .4);
    overflow: hidden;
}
.bar span {
    display: block;
    height: 100%;
    width: var(--pct);
    border-radius: 999px;
    background: repeating-linear-gradient(45deg, var(--lime) 0 10px, #63d63d 10px 20px);
    animation: slide 1.2s linear infinite;
}
@keyframes slide { to { background-position: 28px 0; } }

.quest-rewards {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    list-style: none;
    margin: 0 0 1.6rem;
    padding: 0;
}
.quest-rewards li {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .8rem;
    border: 2px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    background: rgba(0, 0, 0, .25);
    font-size: .8rem;
    font-weight: 700;
}
.rw { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); }
.rw-pink { background: var(--magenta); }
.rw-yellow { background: var(--yellow); }
.rw-cyan { background: var(--cyan); }

/* ---------- Loot / features ---------- */
.loot { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.loot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.1rem;
}
.loot-card {
    position: relative;
    padding: 2rem 1.25rem 1.5rem;
    border: var(--edge) solid var(--ink);
    border-radius: var(--radius);
    background: linear-gradient(180deg, color-mix(in srgb, var(--rare) 18%, var(--night-2)), var(--night-2));
    box-shadow: var(--drop);
    transition: transform .18s ease;
}
.loot-card:hover { transform: translateY(-6px); }
.rarity {
    position: absolute;
    top: -2px;
    right: 1.1rem;
    padding: .3rem .7rem .35rem;
    border: 2px solid var(--ink);
    border-top: 0;
    border-radius: 0 0 10px 10px;
    background: var(--rare);
    color: var(--ink);
    font-size: .64rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
}
.loot-icon {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    border: 2px solid var(--ink);
    border-radius: 16px;
    background: var(--rare);
    color: var(--ink);
    box-shadow: 0 4px 0 var(--ink);
}
.loot-icon svg { width: 28px; height: 28px; }
.loot-card h3 {
    font-family: var(--font-display);
    margin: 0 0 .4rem;
    font-size: 1.35rem;
    letter-spacing: .02em;
}
.loot-card p { margin: 0; font-size: .88rem; color: var(--muted); font-weight: 500; line-height: 1.5; }

/* ---------- Gallery ---------- */
.gallery { padding: clamp(3rem, 6vw, 5.5rem) 0; }

.phone-rig {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(1rem, 4vw, 3rem);
}

.phone {
    position: relative;
    width: min(320px, 72vw);
    padding: 12px;
    border: var(--edge) solid var(--ink);
    border-radius: 40px;
    background: linear-gradient(180deg, #3b1c5f, #1e0a35);
    box-shadow: var(--drop-lg);
}
.phone-notch {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 8px;
    border-radius: 999px;
    background: var(--ink);
    z-index: 3;
}
.phone-screen {
    border-radius: 30px;
    overflow: hidden;
    border: 2px solid var(--ink);
    background: #000;
    aspect-ratio: 9 / 16;
}
.track {
    display: flex;
    height: 100%;
    transition: transform .5s cubic-bezier(.4, 0, .2, 1);
}
.slide { flex: 0 0 100%; height: 100%; }
.slide img { width: 100%; height: 100%; object-fit: cover; }

.nav-btn {
    flex: none;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: var(--edge) solid var(--ink);
    border-radius: 50%;
    background: var(--paper);
    color: var(--ink);
    cursor: pointer;
    box-shadow: var(--drop);
    transition: transform .1s ease, box-shadow .1s ease, background .18s ease;
}
.nav-btn:hover { background: var(--yellow); }
.nav-btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.nav-btn svg { width: 24px; height: 24px; }

.dots {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-top: 2rem;
}
.dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: rgba(255, 255, 255, .3);
    cursor: pointer;
    transition: width .25s ease, background .25s ease;
}
.dot.is-active { width: 34px; border-radius: 999px; background: var(--magenta); }

/* ---------- Download cabinet ---------- */
.download { padding: clamp(3rem, 6vw, 6rem) 0; }

.cabinet {
    max-width: 760px;
    margin-inline: auto;
    border: var(--edge) solid var(--ink);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--drop-lg);
    background: var(--night-2);
}
.cabinet-marquee {
    padding: .75rem;
    text-align: center;
    font-family: var(--font-display);
    letter-spacing: .3em;
    text-transform: uppercase;
    font-size: .95rem;
    color: var(--ink);
    background: repeating-linear-gradient(90deg, var(--magenta) 0 40px, var(--purple) 40px 80px);
    border-bottom: var(--edge) solid var(--ink);
    animation: marquee 2.5s linear infinite;
}
@keyframes marquee { to { background-position: 80px 0; } }

.cabinet-body {
    padding: clamp(2rem, 5vw, 3.5rem) 1.5rem;
    text-align: center;
    background: radial-gradient(80% 100% at 50% 0%, rgba(255, 216, 61, .16), transparent 65%);
}
.cab-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3rem);
    margin: 0 0 .75rem;
    text-transform: uppercase;
    text-shadow: 0 5px 0 var(--ink);
}
.cab-sub { max-width: 40ch; margin: 0 auto 2rem; color: var(--muted); font-weight: 500; }
.cab-note { margin: 1.25rem 0 0; font-size: .8rem; color: var(--muted); font-weight: 500; }

/* ---------- Footer ---------- */
.footer {
    border-top: 2px solid rgba(255, 255, 255, .1);
    background: rgba(10, 3, 18, .7);
    padding-top: 3.5rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 2rem;
    padding-bottom: 3rem;
}
.footer-brand img { height: 34px; width: auto; margin-bottom: .9rem; }
.footer-brand p { margin: 0; color: var(--muted); font-size: .9rem; font-weight: 500; max-width: 28ch; }

.footer-col h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin: 0 0 .9rem;
    color: var(--yellow);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.footer-col a {
    color: var(--muted);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 600;
    transition: color .18s ease, padding-left .18s ease;
}
.footer-col a:hover { color: var(--cyan); padding-left: 4px; }

.footer-base {
    border-top: 2px solid rgba(255, 255, 255, .08);
    padding: 1.25rem;
    text-align: center;
}
.footer-base p { margin: 0; font-size: .8rem; color: var(--muted); font-weight: 500; }
.footer-base p.footer-credit { font-size: 1.05rem; font-weight: 800; color: var(--paper); }
.footer-base p.footer-copyright { margin-top: .35rem; font-size: .68rem; opacity: .65; }

/* ---------- Modal ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}
.modal.active { opacity: 1; pointer-events: auto; }
.modal-overlay { position: absolute; inset: 0; background: rgba(6, 2, 12, .85); backdrop-filter: blur(6px); }
.modal-content {
    position: relative;
    width: min(900px, 92vw);
    border: var(--edge) solid var(--ink);
    border-radius: var(--radius);
    background: var(--night-2);
    padding: .6rem;
    box-shadow: var(--drop-lg);
    transform: scale(.94);
    transition: transform .25s cubic-bezier(.2, 1.3, .4, 1);
}
.modal.active .modal-content { transform: scale(1); }
.modal-close {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: var(--edge) solid var(--ink);
    border-radius: 50%;
    background: var(--magenta);
    color: #fff;
    cursor: pointer;
    box-shadow: var(--drop);
    z-index: 2;
}
.modal-close svg { width: 20px; height: 20px; }
.video-container { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; border: 2px solid var(--ink); background: #000; }
.video-container iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.video-fallback {
    display: block;
    padding: .7rem .5rem .3rem;
    text-align: center;
    font-size: .82rem;
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
}
.video-fallback:hover { color: var(--cyan); }

/* ---------- Confetti burst ---------- */
.burst {
    position: fixed;
    width: 9px;
    height: 12px;
    border-radius: 2px;
    pointer-events: none;
    z-index: 300;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .55s ease, transform .55s cubic-bezier(.2, .8, .3, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
    .studio-board { grid-template-columns: 84px minmax(0, 1fr); }
    .wardrobe { grid-column: 1 / -1; }
    .ward-grid { grid-template-columns: repeat(6, 1fr); min-height: 0; }
    .roster-grid { grid-template-columns: repeat(3, 1fr); }
    .loot-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-copy { display: grid; justify-items: center; }
    .hero-sub { margin-inline: auto; }
    .hero-stats { justify-content: center; gap: 1.75rem; }
    .hero-screen { order: -1; max-width: 520px; margin-inline: auto; }
    .hud-nav { display: none; }
    .hud-brand { margin-right: auto; }
    .quest-card { grid-template-columns: 1fr; }
    .quest-art { max-width: 420px; margin-inline: auto; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
    body { font-size: 16px; }
    .studio-board { grid-template-columns: 1fr; }
    .rail {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: .5rem;
        scrollbar-width: none;
    }
    .rail::-webkit-scrollbar { display: none; }
    .rail-btn { flex: 0 0 74px; }
    .ward-grid { grid-template-columns: repeat(4, 1fr); }
    .roster-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-btn { width: 44px; height: 44px; }
    .phone-rig { gap: .5rem; }
    .sticker-new { left: -6px; }
}

@media (max-width: 520px) {
    .loot-grid, .roster-grid { grid-template-columns: 1fr; }
    .ward-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }
    .hero-actions { width: 100%; flex-direction: column; }
    .hero-actions .btn { width: 100%; }
    .coin-chip { display: none; }

    /* The HUD only has room for the mark and one call to action */
    .hud-wordmark { display: none; }
    .hud-logo { height: 26px; }
    .btn-sm { padding: .5rem .9rem; font-size: .85rem; }
    .stage-hint { font-size: .74rem; max-width: 80%; text-align: center; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}
