/* =========================================================
   GLOBAL TWO-SLOT SCREEN RAIL
========================================================= */

.global-viewport {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 8%, rgba(96, 205, 255, .055), transparent 32%),
        radial-gradient(circle at 86% 92%, rgba(120, 119, 198, .045), transparent 34%),
        #0f0f0f;
}

/*
 * The rail is always exactly two viewports wide. Before every transition JS
 * exposes only the current and target screens and orders them side-by-side.
 * Consequently every route moves exactly 100vw with identical timing.
 */
.global-track {
    display: flex;
    width: 200vw;
    height: 100vh;
    transform: translate3d(0, 0, 0);
    transition: none;
    will-change: transform;
}

.global-track.is-transitioning {
    pointer-events: none;
    transition: transform 900ms cubic-bezier(.77, 0, .18, 1);
}

.global-screen {
    position: relative;
    flex: 0 0 100vw;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.global-screen[hidden] {
    display: none !important;
}

.global-screen--case {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    background:
        radial-gradient(circle at 14% 0%, rgba(96, 205, 255, .045), transparent 30%),
        #0f0f0f;
}

.case-panel[hidden] {
    display: none !important;
}

.admin-bar .global-viewport {
    height: calc(100vh - 32px);
    height: calc(100dvh - 32px);
}

.admin-bar .global-track,
.admin-bar .global-screen {
    height: calc(100vh - 32px);
    height: calc(100dvh - 32px);
}

@media screen and (max-width: 782px) {
    .admin-bar .global-viewport,
    .admin-bar .global-track,
    .admin-bar .global-screen {
        height: calc(100vh - 46px);
        height: calc(100dvh - 46px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .global-track.is-transitioning {
        transition-duration: .01ms !important;
    }
}
