body {
    margin: 0;
    background: #11131f;

    display: block;
    justify-content: center;
    align-items: center;

    min-height: 100vh;
}

body.game-active {
    display: flex;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

.privacy-policy[hidden] { display: none; }
.privacy-policy { position: fixed; z-index: 10000; display: grid; place-items: center; inset: 0; padding: 16px; }
.privacy-policy__backdrop { position: absolute; inset: 0; background: rgba(2, 6, 12, .88); backdrop-filter: blur(4px); }
.privacy-policy__dialog {
    position: relative;
    width: min(92vw, 620px);
    max-height: min(88vh, 680px);
    overflow: auto;
    border: 2px solid #617697;
    border-radius: 8px;
    padding: 24px;
    color: #dce7f4;
    background: linear-gradient(#111c2b, #070c16);
    box-shadow: 0 18px 60px #000c, inset 0 0 30px #78a9d40d;
    font-family: "Segoe UI", sans-serif;
}
.privacy-policy__dialog > small { color: #75d7a3; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.privacy-policy__dialog h2 { margin: 6px 0 18px; color: #f1f7ff; font-size: clamp(20px, 4vw, 28px); }
.privacy-policy__copy { color: #b8c7d9; font-size: 14px; line-height: 1.55; }
.privacy-policy__copy p { margin: 0 0 13px; }
.privacy-policy__close {
    width: 100%;
    margin-top: 8px;
    border: 1px solid #75d7a3;
    border-radius: 6px;
    padding: 11px;
    color: #dfffee;
    background: #173629;
    cursor: pointer;
    font-weight: 800;
}
.privacy-policy__close:hover, .privacy-policy__close:focus-visible { outline: 2px solid #75d7a3; outline-offset: 2px; }

[hidden] {
    display: none !important;
}

#gameShell {
    position: relative;
    width: min(100vw, calc(100vh * 16 / 9));
    width: min(100vw, calc(100dvh * 16 / 9));
    flex-shrink: 0;
    aspect-ratio: 16 / 9;
    filter: drop-shadow(0 22px 42px rgba(0, 0, 0, 0.38));
}

#scene3dLayer {
    position: absolute;
    inset: 1px;
    z-index: 1;
    overflow: hidden;
    border-radius: 11px;
    background: linear-gradient(#17213f, #332f48);
}

#scene3dLayer.very-low-menu-hidden {
    visibility: hidden;
}

#scene3dLayer.encounter-active {
    filter: var(--encounter-filter, none);
}

#scene3dLayer.encounter-active::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-color: var(--encounter-tint, transparent);
    background-image: var(--encounter-image, none);
    background-size: cover;
    background-position: center;
}

.scene3d-road-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.scene3d-background-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: url("Assets/World/Background.jpg") center center / cover no-repeat;
    image-rendering: pixelated;
    pointer-events: none;
}

#scene3dLayer.world-boss-active .scene3d-background-layer {
    filter: brightness(0.48) saturate(0.72) hue-rotate(285deg) contrast(1.18);
}

#scene3dLayer.world-boss-active .scene3d-cloud-layer {
    filter: brightness(0.42) saturate(0.55) hue-rotate(300deg) contrast(1.3);
    opacity: 0.82;
}

#scene3dLayer.world-boss-active .scene3d-road-strip {
    filter: brightness(0.55) saturate(0.62) hue-rotate(315deg);
}

.scene3d-cloud-layer {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    z-index: 1;
    height: 65%;
    background-image: url("Assets/World/clouds.png");
    background-repeat: repeat-x;
    background-position: 0 bottom;
    background-size: auto 100%;
    image-rendering: pixelated;
    pointer-events: none;
    will-change: background-position;
}

.scene3d-road-camera {
    position: absolute;
    inset: 0;
    transform-origin: center center;
    z-index: 2;
}

.scene3d-road-strip {
    position: absolute;
    left: 0;
    top: 0;
    height: auto;
    background-repeat: repeat-x;
    background-position: 0 0;
    image-rendering: pixelated;
    will-change: background-position;
}

.scene3d-shadow-canvas {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.scene3d-canvas {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: block;
    width: 100%;
    height: 100%;
}

#scene3dLayer.low-graphics .scene3d-canvas,
#scene3dLayer.low-graphics .scene3d-shadow-canvas {
    display: none;
}

.very-low-graphics canvas,
.very-low-graphics #scene3dLayer {
    image-rendering: pixelated;
    filter: none !important;
    will-change: auto !important;
}

#gameCanvas {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(177, 207, 232, 0.58);
    border-radius: 12px;
    background: transparent;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

#creditsLinkLayer {
    position: absolute;
    inset: 1px;
    pointer-events: none;
    z-index: 3;
}

#creditsLinkLayer .credit-copy-address {
    position: absolute;
    border: 1px solid rgba(93, 126, 157, 0.62);
    border-radius: 4px;
    padding: 2px 6px;
    color: #9ecbff;
    background: rgba(7, 16, 28, 0.78);
    font: 10px Arial, sans-serif;
    pointer-events: auto;
    cursor: copy;
    text-decoration: none;
    white-space: nowrap;
}

#creditsLinkLayer .credit-copy-address:hover,
#creditsLinkLayer .credit-copy-address:focus-visible {
    color: #d8edff;
    border-color: #d8edff;
    background: rgba(22, 47, 68, 0.92);
    outline: none;
}

#creditsLinkLayer .credit-copy-address::after {
    content: "  COPY";
    color: #76dfa7;
    font-weight: 800;
}
