/* These rules apply only when a full-page template explicitly includes the layer. */
body:has(> #content-root .page-background) {
    isolation: isolate;
}
.page-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: #0f172a;
}
.page-background::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(13,17,26,.68), rgba(15,23,42,.48) 55%, rgba(13,17,26,.72));
}
.page-background-media {
    display: block;
    position: absolute;
    inset: -3%;
    width: 106%;
    height: 106%;
    transform: scale(1.035);
    translate: 0 var(--auth-background-scroll, 0px);
    filter: blur(var(--auth-background-blur, 3px));
    will-change: auto;
}
.page-background-picture img,.page-background-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--auth-background-position, 50% 50%);
}
.page-background.is-moving .page-background-picture {
    animation: auth-background-drift var(--auth-background-duration, 40s) ease-in-out infinite;
}
.page-background-video {
    width: 106%;
    height: 106%;
    opacity: 0;
}
.page-background.has-video .page-background-video {
    opacity: 1;
}
.page-background.has-video .page-background-picture {
    animation: none;
}
.page-background.is-paused .page-background-picture {
    animation-play-state: paused;
}
body:has(.page-background) #content-root > .auth-card,
body:has(.page-background) #content-root > #logout-page {
    background: rgba(13,17,26,.86);
    border: 1px solid rgba(222,173,170,.16);
    backdrop-filter: blur(12px);
}
@keyframes auth-background-drift {
    0%,100% { transform: scale(1.035) translate3d(-.4%,0,0); }
    50% { transform: scale(1.08) translate3d(.4%,-.5%,0); }
}
@media (prefers-color-scheme: light) {
    .page-background::after {
        background: linear-gradient(135deg,rgba(250,247,243,.58),rgba(242,235,229,.38) 55%,rgba(250,247,243,.64));
    }
    body:has(.page-background) #content-root > .auth-card,
    body:has(.page-background) #content-root > #logout-page {
        background: rgba(255,255,255,.9);
        border-color: rgba(15,23,42,.1);
    }
}
@media (prefers-reduced-motion: reduce) {
    .page-background-media { animation:none!important;transform:scale(1.035)!important;translate:none!important; }
    .page-background-video { display:none!important; }
}
