/* Scene overlays follow the selected palette while retaining the original artwork. */
:root{--section-wash:237 245 249;--section-opacity:.80}
:root[data-theme="burgundy"]{--section-wash:38 19 29;--section-opacity:.62}
:root[data-theme="emerald"]{--section-wash:9 36 28;--section-opacity:.64}
body .home-codex,body.guide-page .page-content{background:linear-gradient(rgb(var(--section-wash) / var(--section-opacity)),rgb(var(--section-wash) / var(--section-opacity))),url(home/guide-scene.webp) center/cover;border-block:1px solid var(--gold-line)}
body .home-codex .features-heading{padding:25px;max-width:900px;margin-inline:auto;background:radial-gradient(ellipse,rgb(var(--section-wash) / 75%),transparent 72%)}
body .home-codex .rising-codex .codex-nav{padding:18px;gap:12px;border:1px solid var(--gold-line);border-radius:14px;background:var(--surface);box-shadow:0 12px 36px #0003}
body .rising-codex .codex-nav a{border-radius:8px;padding:15px 22px}
body .rising-codex .codex-placeholder{padding:38px 24px;border:1px solid var(--gold-line);border-radius:14px;background:var(--surface);box-shadow:0 12px 36px #0002}
body .rising-codex .codex-placeholder::before{content:'✦';display:block;color:var(--gold);font-size:34px;margin-bottom:12px}
body .quest-skip-section{padding-block:55px;background:linear-gradient(120deg,var(--surface),var(--sky));border-top:1px solid var(--gold-line)}
body .quest-skip-section .free-quest-callout{margin:0 auto;max-width:1400px;background:transparent;border:0;padding:0}
body .client-download,body.download-page .page-masthead{background:linear-gradient(rgb(var(--section-wash) / var(--section-opacity)),rgb(var(--section-wash) / var(--section-opacity))),url(home/download-scene.webp) center/cover}
body.download-page .page-content{padding:0;max-width:none}
body.download-page .client-download{padding:70px var(--space)}
body .community-banner{background:linear-gradient(rgb(var(--section-wash) / var(--section-opacity)),rgb(var(--section-wash) / var(--section-opacity))),url(home/community-scene.webp) center 58%/cover;min-height:320px}
:root:not([data-theme="light"]) body .community-banner,:root:not([data-theme="light"]) body.download-page .page-masthead{background:linear-gradient(rgb(var(--section-wash) / var(--section-opacity)),rgb(var(--section-wash) / var(--section-opacity))),url(home/community-scene.webp) center/cover}
:root:not([data-theme="light"]) body.download-page .page-masthead{background-image:linear-gradient(rgb(var(--section-wash) / var(--section-opacity)),rgb(var(--section-wash) / var(--section-opacity))),url(home/download-scene.webp)}
@media(max-width:650px){body .home-codex .features-heading{padding:0}body .home-codex .rising-codex .codex-nav{padding:10px;gap:8px}body .rising-codex .codex-nav a{padding:12px;font-size:15px}body .community-banner{min-height:360px}}

:root[data-theme="sapphire"]{--section-wash:7 28 55;--section-opacity:.62}
/* Size the scene against the viewport, never the expanded guide height. */
body .home-codex,body.guide-page .page-content{background-attachment:fixed;background-size:cover;background-position:center;}
body .rising-codex .codex-close{font:inherit;color:var(--gold);background:var(--surface);border:1px solid var(--gold-line);border-radius:8px;padding:15px 22px;cursor:pointer;margin-left:auto;}
body .rising-codex .codex-close:hover{background:var(--sky)}
body .rising-codex .codex-close:focus-visible{outline:2px solid var(--focus);outline-offset:3px}
@media(max-width:650px){body .rising-codex .codex-close{padding:12px;font-size:15px}}

/* Blur the scenery only; guide text and controls remain crisp. */
body .home-codex,body.guide-page .page-content{position:relative;isolation:isolate}
body .home-codex::before,body.guide-page .page-content::before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;backdrop-filter:blur(0);-webkit-backdrop-filter:blur(0);transition:backdrop-filter .25s ease}
body .home-codex.guide-is-open::before,body.guide-page .page-content.guide-is-open::before{backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
@media(prefers-reduced-motion:reduce){body .home-codex::before,body.guide-page .page-content::before{transition:none}}

/* Player account banner uses the supplied crystal cavern scene. */
:root[data-theme] body .page-masthead.player-masthead{background:linear-gradient(rgb(var(--section-wash) / var(--section-opacity)),rgb(var(--section-wash) / var(--section-opacity))),url(home/community-scene.webp) center 55%/cover;}

/* Support title banner: supplied chandelier scene, tinted by the active theme. */
:root[data-theme] body .page-masthead.support-masthead{background:linear-gradient(rgb(var(--section-wash) / var(--section-opacity)),rgb(var(--section-wash) / var(--section-opacity))),url(home/guide-scene.webp) center 40%/cover;}

/* Compact, aligned mobile guide controls with a dedicated close icon. */
@media(max-width:650px){
 body .rising-codex .codex-nav,body .home-codex .rising-codex .codex-nav{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) 44px;gap:6px;padding:8px;align-items:stretch}
 body .rising-codex .codex-nav a{display:flex;align-items:center;justify-content:center;padding:8px 5px;font-size:13px;line-height:1.25;text-align:center;min-height:44px}
 body .rising-codex .codex-nav a:nth-of-type(3){grid-column:1 / 3}
 body .rising-codex .codex-close{grid-column:3;grid-row:1 / 3;align-self:center;margin:0;padding:0;width:44px;height:44px;font-size:28px;line-height:1;display:grid;place-items:center}
 .codex-close-label{display:none}
}

/* Account-entry banners use supplied scenery and outrank legacy dark-theme art. */
:root[data-theme] body .page-masthead.auth-cavern-masthead,
:root[data-theme] body .page-masthead.auth-mansion-masthead,
:root[data-theme] body .page-masthead.auth-chandelier-masthead{background:linear-gradient(rgb(var(--section-wash) / var(--section-opacity)),rgb(var(--section-wash) / var(--section-opacity))),var(--account-banner-scene) center 45%/cover}
.page-masthead.auth-cavern-masthead{--account-banner-scene:url(home/community-scene.webp)}
.page-masthead.auth-mansion-masthead{--account-banner-scene:url(home/download-scene.webp)}
.page-masthead.auth-chandelier-masthead{--account-banner-scene:url(home/guide-scene.webp)}

/* Registration keeps a solid heading; the supplied mansion surrounds the form. */
:root[data-theme] body.registration-page .page-masthead{background:var(--surface)}
:root[data-theme] body.registration-page .page-content{background:linear-gradient(90deg,rgb(var(--section-wash) / 40%),rgb(var(--section-wash) / var(--section-opacity))),url(home/download-scene.webp) center/cover no-repeat}
:root[data-theme] .registration-page .registration-layout .form-card{background:rgb(var(--section-wash) / 88%);border:1px solid var(--gold-line)}
