/*
 * QueenK Story Scene presentation.
 *
 * This stylesheet only presents environment backgrounds.
 * Characters, dialogue, effects and Puzzle UI remain separate layers.
 */

body[data-story-scene-active="true"] {
    background-color: #050811;

    background-image:
        var(--queenk-story-background);

    background-repeat:
        no-repeat;

    background-size:
        cover;

    background-position:
        var(
            --queenk-story-background-position,
            center center
        );

    background-attachment:
        fixed;
}


/*
 * The current world-mode layout places its environment artwork
 * on ::before. Story Scene presentation takes ownership of that
 * visual layer only while a Story Scene is active.
 */
body.queenk-world[
    data-story-scene-active="true"
]::before {
    background-image:
        var(--queenk-story-background);

    background-repeat:
        no-repeat;

    background-size:
        cover;

    background-position:
        var(
            --queenk-story-background-position,
            center center
        );
}


/*
 * Keep existing QueenK contrast overlays.
 *
 * We are replacing only the environment artwork,
 * not HUD/puzzle readability mechanics.
 */
body.queenk-world[
    data-story-scene-active="true"
]::after {
    content: "";
}


/*
 * Story artwork must remain responsive.
 *
 * The data catalogue can later provide a dedicated mobile image.
 * Until then, mobile uses an alternate crop position from the
 * desktop master.
 */
@media (max-width: 720px) {
    body[data-story-scene-active="true"] {
        background-attachment:
            scroll;
    }
}


/* =========================================================
   STORY SCENE EXCLUSIVE ENVIRONMENT PRESENTATION
   ========================================================= */

/*
 * When a Story Scene is active, location-specific world visuals
 * must not render over the illustrated story environment.
 *
 * This affects presentation only.
 * It does not change gameplay state.
 */
body[data-story-scene-active="true"]
#sanctuary-visual,
body[data-story-scene-active="true"]
.sanctuary-visual {
    display: none !important;
}


/*
 * Story scenes also suppress the old world artwork pseudo-layer
 * unless the Story Scene presenter supplies the replacement image.
 */
body.queenk-world[
    data-story-scene-active="true"
]::before {
    background-image:
        var(
            --queenk-story-background
        ) !important;
}
