@import url("https://fonts.googleapis.com/css2?family=Archivo+Black&family=DM+Mono:wght@400;500&display=swap");

/* =========================================================
   DJ JAMES ROLL UP â€” BUBBLES & FLOW
   Green / Blue / Black / Gold / Louisiana
========================================================= */

:root {
    --ink: #020704;
    --ink-2: #06140b;
    --panel: rgba(3, 14, 8, 0.91);
    --panel-solid: #06110a;

    --green: #4dff76;
    --green-2: #9cff43;
    --blue: #2b8cff;
    --blue-2: #61c8ff;
    --gold: #f2c14d;
    --gold-2: #ffd86b;

    --white: #f8f4dc;
    --muted: #c7ccb9;
    --danger: #ff5a4f;

    --border: rgba(77, 255, 118, 0.50);
    --border-gold: rgba(242, 193, 77, 0.55);
    --shadow: 0 0 24px rgba(43, 140, 255, 0.18);

    --topbar-height: 72px;
    --hud-gap: 1rem;
}

/* =========================================================
   RESET / ACCESSIBILITY
========================================================= */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at top, #133d1c 0, #07120a 42%, #020704 72%),
        var(--ink);
    color: var(--white);
    font-family: "DM Mono", monospace;
}

button,
a {
    font: inherit;
}

button {
    color: inherit;
}

a {
    color: inherit;
}

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

[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 1000;
    padding: 0.65rem 0.8rem;
    background: var(--gold);
    color: var(--ink);
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

/* =========================================================
   SHELL / SCENE
========================================================= */

.game-shell,
.scene {
    min-height: 100vh;
    min-height: 100svh;
}

.scene {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.scene__background,
.scene__overlay,
.scene__scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.scene__background {
    z-index: -4;
    background:
        linear-gradient(135deg, rgba(77, 255, 118, 0.16), rgba(43, 140, 255, 0.10)),
        radial-gradient(circle at 80% 20%, rgba(242, 193, 77, 0.18), transparent 35%),
        #06110a;
    background-size: cover;
    background-position: center;
    transition:
        background-image 350ms ease,
        filter 350ms ease;
}

.scene__overlay {
    z-index: -3;
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.04), rgba(2, 7, 4, 0.48)),
        radial-gradient(circle at center, transparent 46%, rgba(0, 0, 0, 0.56) 100%);
}

.scene__scanlines {
    z-index: 40;
    opacity: 0.09;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.07) 0,
        rgba(255, 255, 255, 0.07) 1px,
        transparent 1px,
        transparent 4px
    );
    mix-blend-mode: soft-light;
}

/* =========================================================
   TOPBAR
========================================================= */

.topbar {
    position: relative;
    z-index: 50;
    min-height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: rgba(2, 7, 4, 0.86);
    backdrop-filter: blur(14px);
}

.brand {
    display: inline-flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    text-decoration: none;
}

.brand__eyebrow,
.eyebrow {
    color: var(--gold-2);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.brand__title {
    font-family: "Archivo Black", sans-serif;
    letter-spacing: 0.04em;
    color: var(--green);
    text-shadow: 0 0 14px rgba(77, 255, 118, 0.38);
}

.status {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 0.75rem;
}

.status__dot {
    color: var(--green);
    animation: pulse 1.2s infinite;
}

.icon-button {
    min-height: 44px;
    min-width: 44px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--white);
    cursor: pointer;
}

/* =========================================================
   STAGE / HUD
========================================================= */

.stage {
    position: relative;
    min-height: clamp(590px, 66vh, 780px);
    padding: 1rem;
}

.objective-card,
.gigawatt-card {
    position: absolute;
    top: 1rem;
    z-index: 30;
    width: min(320px, calc(50% - 1.5rem));
    min-width: 0;
    padding: 0.9rem 1rem;
    backdrop-filter: blur(10px);
}

.objective-card {
    left: 1rem;
    border: 1px solid rgba(97, 200, 255, 0.55);
    background: rgba(3, 12, 18, 0.78);
    box-shadow: 0 0 18px rgba(43, 140, 255, 0.10);
}

.objective-card__label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--blue-2);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
}

.objective-card strong {
    display: block;
    overflow-wrap: anywhere;
}

.gigawatt-card {
    right: 1rem;
    border: 1px solid var(--border-gold);
    background: rgba(8, 14, 5, 0.82);
    box-shadow: 0 0 18px rgba(242, 193, 77, 0.10);
}

.gigawatt-card__header,
.gigawatt-card__stats {
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
}

.gigawatt-card__header {
    margin-bottom: 0.55rem;
    color: var(--gold);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
}

.gigawatt-meter {
    width: 100%;
    height: 16px;
    accent-color: var(--green);
}

.gigawatt-card__stats {
    margin-top: 0.5rem;
    color: var(--muted);
    font-size: 0.62rem;
    letter-spacing: 0.11em;
}

.gigawatt-card__stats strong {
    display: block;
    margin-top: 0.15rem;
    color: var(--white);
    font-family: "Archivo Black", sans-serif;
    font-size: 0.9rem;
}

.gigawatt-warning {
    display: block;
    margin-top: 0.55rem;
    color: var(--danger);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
}

/* =========================================================
   CHARACTER STAGING
   One character = hero scale.
   Two characters = balanced left/right staging.
========================================================= */

.character-layer {
    position: absolute;
    inset: 6rem 0.75rem 0.5rem;
    z-index: 12;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: clamp(1.5rem, 6vw, 7rem);
    min-width: 0;
    padding-inline: clamp(1rem, 6vw, 6rem);
    pointer-events: none;
}

.character-sprite {
    flex: 0 1 auto;
    width: min(46vw, 620px);
    max-height: 100%;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.46));
    transform-origin: center bottom;
    animation: idleFloat 2.8s ease-in-out infinite;
}

.character-layer:not(.has-duo) .character-sprite--primary {
    width: min(48vw, 650px);
}

.character-layer.has-duo {
    justify-content: space-evenly;
    gap: clamp(1rem, 4vw, 4.5rem);
    padding-inline: clamp(2rem, 7vw, 8rem);
}

.character-layer.has-duo .character-sprite {
    width: min(32vw, 460px);
    max-height: 94%;
}

.character-layer.has-duo .character-sprite[data-character="bagMan"] {
    width: min(29vw, 410px);
}

.character-layer.has-duo .character-sprite[data-character="vibeKiller"] {
    width: min(33vw, 480px);
}

.character-layer.has-duo .character-sprite[data-character^="james"] {
    width: min(31vw, 450px);
}

.character-sprite.enter {
    animation:
        spriteEnter 300ms ease-out,
        idleFloat 2.8s 300ms ease-in-out infinite;
}

.character-sprite.shake {
    animation: shake 250ms linear 1;
}

.character-sprite.glitch {
    animation: glitchSprite 280ms steps(2, end) 2;
}

/* When the golden booty shares a normal story scene with James,
   move James left and the booty right instead of stacking them. */

.stage.has-booty:not(.qte-mode) .character-layer:not(.has-duo) {
    justify-content: flex-start;
    padding-left: clamp(1rem, 7vw, 7rem);
    padding-right: 38%;
}

.stage.has-booty:not(.qte-mode)
.character-layer:not(.has-duo)
.character-sprite--primary {
    width: min(38vw, 520px);
}

/* =========================================================
   GOLDEN BOOTY
========================================================= */

.booty-layer {
    position: absolute;
    inset: 0;
    z-index: 16;
    pointer-events: none;
}

.golden-booty-sprite {
    position: absolute;
    left: 74%;
    top: 52%;
    width: clamp(190px, 23vw, 340px);
    max-width: 34vw;
    max-height: 46%;
    object-fit: contain;
    transform:
        translate(-50%, -50%)
        scale(0.98);
    transform-origin: 50% 58%;
    opacity: 0;
    filter:
        drop-shadow(0 12px 30px rgba(0, 0, 0, 0.44))
        drop-shadow(0 0 24px rgba(242, 193, 77, 0.30));
    transition:
        opacity 180ms ease,
        filter 180ms ease;
}

.booty-layer--qte .golden-booty-sprite {
    left: 50%;
    top: 39%;
    width: clamp(250px, 30vw, 430px);
    max-width: 46vw;
    max-height: 50%;
}

.golden-booty-sprite.is-visible {
    opacity: 1;
    animation: goldenBootyIdle 2.2s ease-in-out infinite;
}

.golden-booty-sprite.is-pulsing {
    animation: goldenBootyPulse 520ms ease-out 1;
}

.golden-booty-sprite.jiggle-left {
    animation: goldenBootyJiggleLeft 180ms cubic-bezier(.2, .9, .3, 1.2) 1;
}

.golden-booty-sprite.jiggle-right {
    animation: goldenBootyJiggleRight 180ms cubic-bezier(.2, .9, .3, 1.2) 1;
}

/* =========================================================
   GLITCH MESSAGE
========================================================= */

.glitch-message {
    position: absolute;
    inset: 35% auto auto 50%;
    z-index: 38;
    width: min(90%, 800px);
    transform: translate(-50%, -50%);
    color: var(--white);
    font-family: "Archivo Black", sans-serif;
    font-size: clamp(1.3rem, 5vw, 3.5rem);
    text-align: center;
    text-shadow:
        -3px 0 var(--blue),
        3px 0 var(--green);
    animation: glitchText 120ms steps(2, end) infinite;
}

/* =========================================================
   DIALOGUE / CHOICES
========================================================= */

.dialogue-panel {
    position: relative;
    z-index: 35;
    width: min(980px, calc(100% - 2rem));
    min-width: 0;
    min-height: 150px;
    margin: 0 auto 1.25rem;
    padding: 1rem;
    border: 1px solid var(--border);
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.dialogue-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.7rem;
}

.speaker-name {
    color: var(--green);
    font-family: "Archivo Black", sans-serif;
    text-transform: uppercase;
}

.scene-counter {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 0.72rem;
}

.dialogue-text {
    min-height: 3.6em;
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--white);
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.65;
    white-space: pre-line;
}

.choices {
    display: grid;
    gap: 0.65rem;
    margin-top: 1rem;
}

.choices:empty {
    min-height: 0;
}

.choice-button,
.primary-button,
.secondary-button {
    min-height: 48px;
    border: 1px solid var(--border);
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 150ms ease,
        border-color 150ms ease,
        background 150ms ease;
}

.choice-button {
    width: 100%;
    padding: 0.85rem 1rem;
    background:
        linear-gradient(90deg, rgba(77, 255, 118, 0.14), rgba(43, 140, 255, 0.10)),
        rgba(255, 255, 255, 0.025);
    color: var(--white);
    text-align: left;
}

.choice-button::before {
    content: ">";
    margin-right: 0.6rem;
    color: var(--gold);
}

.choice-button:hover,
.choice-button:focus-visible,
.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-2px);
    border-color: var(--gold);
}

/* =========================================================
   QTE
========================================================= */

.qte-panel {
    position: absolute;
    right: 50%;
    bottom: 1rem;
    z-index: 34;
    width: min(700px, calc(100% - 2rem));
    max-height: calc(100% - 1.5rem);
    overflow: auto;
    padding: 1rem;
    transform: translateX(50%);
    border: 1px solid var(--border-gold);
    background: rgba(2, 9, 5, 0.95);
    box-shadow: 0 0 38px rgba(242, 193, 77, 0.18);
    backdrop-filter: blur(14px);
}

.qte-panel__eyebrow {
    margin: 0 0 0.35rem;
    color: var(--gold);
    font-size: 0.65rem;
    letter-spacing: 0.18em;
}

.qte-panel h2 {
    margin: 0;
    color: var(--green);
    font-family: "Archivo Black", sans-serif;
    font-size: clamp(1.6rem, 4vw, 2.6rem);
}

.qte-panel__instructions {
    margin: 0.7rem 0;
    color: var(--muted);
    line-height: 1.6;
}

.qte-ready-note {
    color: var(--gold-2);
    font-size: 0.72rem;
    line-height: 1.5;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.qte-status {
    min-height: 1.5rem;
    margin-bottom: 0.7rem;
    color: var(--blue-2);
    font-family: "Archivo Black", sans-serif;
}

.qte-visual {
    position: relative;
    min-height: 78px;
    display: grid;
    place-items: center;
    margin-bottom: 0.75rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.24);
}

.qte-counter {
    color: var(--gold-2);
    font-family: "Archivo Black", sans-serif;
    font-size: clamp(2rem, 7vw, 4rem);
    text-align: center;
}

.qte-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.qte-button {
    min-height: 54px;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--border);
    background: rgba(77, 255, 118, 0.07);
    color: var(--white);
    font-family: "Archivo Black", sans-serif;
    cursor: pointer;
}

.qte-button:hover,
.qte-button:focus-visible {
    border-color: var(--gold);
    background: rgba(242, 193, 77, 0.09);
}

.qte-button--wide {
    grid-column: 1 / -1;
}

.qte-button--decoy {
    border-color: rgba(255, 90, 79, 0.30);
    color: #e5b0ac;
}

.timing-track {
    position: relative;
    width: min(520px, 90%);
    height: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #010302;
}

.timing-zone {
    position: absolute;
    inset: 0 auto 0 42%;
    width: 16%;
    border-inline: 1px solid var(--green);
    background: rgba(77, 255, 118, 0.30);
}

.timing-marker {
    position: absolute;
    top: -7px;
    left: 0;
    width: 4px;
    height: 38px;
    background: var(--gold);
    box-shadow: 0 0 14px rgba(242, 193, 77, 0.70);
}

/* =========================================================
   FRAGMENT / FESTIVAL OVERLAYS
========================================================= */

.fragment-screen,
.festival-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    overflow: auto;
    padding: 1rem;
    background: rgba(1, 5, 3, 0.94);
    backdrop-filter: blur(14px);
}

.fragment-screen__inner {
    width: min(560px, 100%);
    padding: 2rem;
    border: 1px solid var(--border-gold);
    background:
        radial-gradient(circle at center, rgba(77, 255, 118, 0.15), transparent 48%),
        var(--panel-solid);
    box-shadow: 0 0 60px rgba(43, 140, 255, 0.20);
    text-align: center;
}

.fragment-icon {
    color: var(--gold);
    font-size: 5rem;
    text-shadow: 0 0 30px rgba(242, 193, 77, 0.75);
    animation: pulse 1.1s infinite;
}

.fragment-screen h2,
.festival-card h1 {
    margin: 0.25rem 0;
    color: var(--green);
    font-family: "Archivo Black", sans-serif;
}

.fragment-readout {
    display: grid;
    gap: 0.35rem;
    margin: 1.25rem 0;
    padding: 0.85rem;
    border: 1px solid rgba(97, 200, 255, 0.24);
    color: var(--blue-2);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1rem;
}

.primary-button {
    border-color: var(--green);
    background: var(--green);
    color: #031006;
    font-weight: 700;
}

.secondary-button {
    background: transparent;
    color: var(--white);
}

.festival-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
    gap: 1.25rem;
    width: min(1040px, 100%);
    max-height: 92vh;
    overflow: auto;
    padding: 1rem;
    border: 1px solid var(--border-gold);
    background: var(--panel-solid);
    box-shadow: 0 0 60px rgba(43, 140, 255, 0.18);
}

.festival-card__copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem;
}

.festival-card__poster img {
    width: 100%;
    height: 100%;
    max-height: 76vh;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.03);
}

.festival-actions {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.4rem;
}

/* =========================================================
   EFFECT STATES
========================================================= */

body.corrupted .scene__background {
    filter: saturate(1.35) contrast(1.08) hue-rotate(-8deg);
}

body.corrupted .dialogue-panel {
    box-shadow:
        -8px 0 0 rgba(43, 140, 255, 0.08),
        8px 0 0 rgba(77, 255, 118, 0.08);
}

body.gigawatt-overload .scene__background {
    filter: saturate(1.45) contrast(1.08);
}

body.gigawatt-overload .gigawatt-card {
    box-shadow:
        0 0 35px rgba(77, 255, 118, 0.22),
        0 0 65px rgba(242, 193, 77, 0.12);
}

/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes idleFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-7px);
    }
}

@keyframes spriteEnter {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    50% {
        transform: translateX(8px);
    }

    75% {
        transform: translateX(-5px);
    }
}

@keyframes glitchSprite {
    0% {
        transform: translate(0, 0);
        filter: none;
    }

    25% {
        transform: translate(-5px, 2px);
        filter: hue-rotate(45deg);
    }

    50% {
        transform: translate(5px, -2px);
        filter: contrast(1.6);
    }

    75% {
        transform: translate(-2px, -3px);
        filter: hue-rotate(-45deg);
    }

    100% {
        transform: translate(0, 0);
        filter: none;
    }
}

@keyframes glitchText {
    0%,
    100% {
        transform: translate(-50%, -50%);
    }

    33% {
        transform: translate(-50%, -50%) translate(-3px, 1px);
    }

    66% {
        transform: translate(-50%, -50%) translate(3px, -1px);
    }
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.55;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes goldenBootyIdle {
    0%,
    100% {
        transform:
            translate(-50%, -50%)
            rotate(-1deg)
            scale(0.98);
    }

    50% {
        transform:
            translate(-50%, calc(-50% - 8px))
            rotate(1deg)
            scale(1.01);
    }
}

@keyframes goldenBootyPulse {
    0% {
        transform:
            translate(-50%, -50%)
            scale(0.96);
    }

    45% {
        transform:
            translate(-50%, -50%)
            scale(1.10);
    }

    100% {
        transform:
            translate(-50%, -50%)
            scale(1);
    }
}

@keyframes goldenBootyJiggleLeft {
    0%,
    100% {
        transform:
            translate(-50%, -50%)
            rotate(0)
            scale(1);
    }

    35% {
        transform:
            translate(calc(-50% - 18px), -50%)
            rotate(-7deg)
            scaleX(1.07)
            scaleY(0.94);
    }

    70% {
        transform:
            translate(calc(-50% + 7px), -50%)
            rotate(3deg)
            scaleX(0.97)
            scaleY(1.03);
    }
}

@keyframes goldenBootyJiggleRight {
    0%,
    100% {
        transform:
            translate(-50%, -50%)
            rotate(0)
            scale(1);
    }

    35% {
        transform:
            translate(calc(-50% + 18px), -50%)
            rotate(7deg)
            scaleX(1.07)
            scaleY(0.94);
    }

    70% {
        transform:
            translate(calc(-50% - 7px), -50%)
            rotate(-3deg)
            scaleX(0.97)
            scaleY(1.03);
    }
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {
    .stage {
        min-height: clamp(610px, 70svh, 760px);
    }

    .character-layer {
        inset: 6.25rem 0.5rem 0.5rem;
        padding-inline: clamp(0.75rem, 3vw, 2.5rem);
    }

    .character-layer:not(.has-duo) .character-sprite--primary {
        width: min(68vw, 540px);
    }

    .character-layer.has-duo {
        gap: clamp(0.75rem, 2vw, 1.5rem);
        padding-inline: 0.5rem;
    }

    .character-layer.has-duo .character-sprite,
    .character-layer.has-duo .character-sprite[data-character="bagMan"],
    .character-layer.has-duo .character-sprite[data-character="vibeKiller"],
    .character-layer.has-duo .character-sprite[data-character^="james"] {
        width: min(43vw, 350px);
        max-height: 86%;
    }

    .stage.has-booty:not(.qte-mode) .character-layer:not(.has-duo) {
        padding-left: 1rem;
        padding-right: 38%;
    }

    .stage.has-booty:not(.qte-mode)
    .character-layer:not(.has-duo)
    .character-sprite--primary {
        width: min(55vw, 430px);
    }

    .golden-booty-sprite {
        left: 76%;
        width: min(280px, 32vw);
        max-width: 34vw;
    }

    .booty-layer--qte .golden-booty-sprite {
        left: 50%;
        width: min(360px, 52vw);
        max-width: 52vw;
    }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 720px) {
    :root {
        --topbar-height: 64px;
    }

    .topbar {
        align-items: flex-start;
        padding: 0.8rem 0.9rem;
    }

    .status {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.35rem;
    }

    .stage {
        min-height: clamp(640px, 76svh, 800px);
        padding: 0.75rem;
    }

    .objective-card,
    .gigawatt-card {
        width: calc(50% - 1.1rem);
        padding: 0.75rem 0.8rem;
    }

    .objective-card {
        left: 0.75rem;
    }

    .gigawatt-card {
        right: 0.75rem;
    }

    .character-layer {
        inset: 7.4rem 0.25rem 0.5rem;
        gap: 0.4rem;
        padding-inline: 0.25rem;
    }

    .character-layer:not(.has-duo) .character-sprite--primary {
        width: min(84vw, 470px);
        max-height: 96%;
    }

    .character-layer.has-duo {
        justify-content: space-between;
        align-items: flex-end;
    }

    .character-layer.has-duo .character-sprite,
    .character-layer.has-duo .character-sprite[data-character="bagMan"],
    .character-layer.has-duo .character-sprite[data-character="vibeKiller"],
    .character-layer.has-duo .character-sprite[data-character^="james"] {
        width: min(46vw, 285px);
        max-height: 82%;
    }

    .stage.has-booty:not(.qte-mode) .character-layer:not(.has-duo) {
        padding-left: 0;
        padding-right: 34%;
    }

    .stage.has-booty:not(.qte-mode)
    .character-layer:not(.has-duo)
    .character-sprite--primary {
        width: min(62vw, 360px);
        max-height: 88%;
    }

    .golden-booty-sprite {
        left: 77%;
        top: 53%;
        width: min(210px, 38vw);
        max-width: 38vw;
        max-height: 38%;
    }

    .booty-layer--qte .golden-booty-sprite {
        left: 50%;
        top: 35%;
        width: min(300px, 68vw);
        max-width: 68vw;
        max-height: 40%;
    }

    .dialogue-panel {
        width: calc(100% - 1rem);
        margin-bottom: 0.5rem;
    }

    .qte-panel {
        bottom: 0.5rem;
        width: calc(100% - 1rem);
        max-height: 58%;
    }

    .festival-card {
        grid-template-columns: 1fr;
    }

    .festival-card__poster {
        order: -1;
    }

    .festival-card__poster img {
        max-height: 46vh;
    }
}

/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 520px) {
    #chapterLabel,
    .brand__eyebrow {
        display: none;
    }

    .brand__title {
        font-size: 0.9rem;
    }

    .status {
        flex-direction: row;
        align-items: center;
    }

    .status__dot {
        display: none;
    }

    .stage {
        min-height: clamp(650px, 80svh, 820px);
    }

    .objective-card {
        top: 0.65rem;
        left: 0.65rem;
        width: calc(100% - 1.3rem);
    }

    .gigawatt-card {
        top: 5.55rem;
        right: 0.65rem;
        width: calc(100% - 1.3rem);
    }

    .gigawatt-card__stats {
        display: flex;
    }

    .character-layer {
        inset: 10.9rem 0.15rem 0.25rem;
    }

    .character-layer:not(.has-duo) .character-sprite--primary {
        width: min(92vw, 430px);
        max-height: 98%;
    }

    .character-layer.has-duo .character-sprite,
    .character-layer.has-duo .character-sprite[data-character="bagMan"],
    .character-layer.has-duo .character-sprite[data-character="vibeKiller"],
    .character-layer.has-duo .character-sprite[data-character^="james"] {
        width: min(47vw, 250px);
        max-height: 78%;
    }

    .stage.has-booty:not(.qte-mode) .character-layer:not(.has-duo) {
        padding-right: 35%;
    }

    .stage.has-booty:not(.qte-mode)
    .character-layer:not(.has-duo)
    .character-sprite--primary {
        width: min(64vw, 330px);
    }

    .golden-booty-sprite {
        left: 78%;
        top: 55%;
        width: min(180px, 39vw);
        max-width: 39vw;
    }

    .booty-layer--qte .golden-booty-sprite {
        left: 50%;
        top: 34%;
        width: min(270px, 72vw);
        max-width: 72vw;
        max-height: 36%;
    }

    .dialogue-panel__header {
        align-items: flex-start;
    }

    .dialogue-text {
        font-size: 0.98rem;
        line-height: 1.6;
    }

    .choice-button,
    .primary-button,
    .secondary-button,
    .qte-button {
        min-height: 52px;
    }

    .qte-panel {
        max-height: 60%;
        padding: 0.9rem;
    }

    .qte-controls {
        grid-template-columns: 1fr;
    }

    .qte-button--wide {
        grid-column: auto;
    }

    .festival-card__copy {
        padding: 0.5rem;
    }
}

/* =========================================================
   MOTION / CONTRAST ACCESSIBILITY
========================================================= */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .character-sprite,
    .golden-booty-sprite,
    .golden-booty-sprite.is-visible,
    .golden-booty-sprite.is-pulsing,
    .golden-booty-sprite.jiggle-left,
    .golden-booty-sprite.jiggle-right {
        animation: none !important;
    }

    .golden-booty-sprite.is-visible {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@media (prefers-contrast: more) {
    :root {
        --border: rgba(77, 255, 118, 0.85);
        --border-gold: rgba(242, 193, 77, 0.90);
        --muted: #eef2e5;
    }

    .dialogue-panel,
    .objective-card,
    .gigawatt-card,
    .qte-panel {
        background: rgba(0, 0, 0, 0.96);
    }
}

@media (forced-colors: active) {
    .objective-card,
    .gigawatt-card,
    .dialogue-panel,
    .qte-panel,
    .fragment-screen__inner,
    .festival-card,
    .choice-button,
    .primary-button,
    .secondary-button,
    .icon-button,
    .qte-button {
        border: 1px solid ButtonText;
    }
}