:root {
    color-scheme: light;
    --sky-fallback-top: #0879ee;
    --sky-fallback-bottom: #48c7ef;
    --scene-width: 20000px;
    --fence-image-height: 66svh;
    --fence-image-top: 25svh;
    --sidewalk-height: 22svh;
    --sidewalk-image-height: 75svh;
    --sidewalk-image-offset: -22svh;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    min-height: 100svh;
    overflow: hidden;
    background-color: var(--sky-fallback-top);
}

.scene-viewport {
    position: relative;
    width: 100%;
    height: 100svh;
    isolation: isolate;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior: none;
    touch-action: pan-x pinch-zoom;
    cursor: grab;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    background-color: var(--sky-fallback-top);
    background-image: url("../layers/00_sky/sky_day_01.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.scene-viewport::-webkit-scrollbar {
    display: none;
}

.scene-viewport.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.scene-viewport:focus-visible {
    outline: 3px solid rgb(255 255 255 / 0.9);
    outline-offset: -3px;
}

.scene-viewport::after {
    content: "";
    position: fixed;
    z-index: 0;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 110%, rgb(255 255 255 / 0.14), transparent 48%),
        linear-gradient(to bottom, transparent 70%, rgb(0 95 170 / 0.05));
}

.scene-track {
    position: relative;
    z-index: 1;
    width: var(--scene-width);
    height: 100%;
}

.scene-layer {
    position: absolute;
    pointer-events: none;
    user-select: none;
}

.scene-layer--fence {
    z-index: 10;
    inset: 0;
    background-image: url("../layers/05_fence/1.png");
    background-repeat: repeat-x;
    background-position: left var(--fence-image-top);
    background-size: auto var(--fence-image-height);
}

.artwork {
    position: absolute;
    z-index: 15;
    display: block;
    width: 360px;
    height: 300px;
    -webkit-user-drag: none;
}

.artwork img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}

.artwork--project-logo {
    top: calc(62svh - 150px);
    left: 220px;
}

.artwork.is-shared {
    filter: drop-shadow(0 0 10px rgb(255 226 74 / 0.9));
}

.artwork:focus-visible {
    border-radius: 12px;
    outline: 3px solid #ffe24a;
    outline-offset: 5px;
}

.scene-layer--sidewalk {
    z-index: 20;
    right: 0;
    bottom: 0;
    left: 0;
    height: var(--sidewalk-height);
    overflow: hidden;
    background-image: url("../layers/07_road/road_01.png");
    background-repeat: repeat-x;
    background-position: left var(--sidewalk-image-offset);
    background-size: auto var(--sidewalk-image-height);
}

.sidewalk-objects {
    position: absolute;
    z-index: 30;
    inset: 0;
    pointer-events: none;
}

.sidewalk-object {
    position: absolute;
    display: block;
    background-repeat: no-repeat;
    pointer-events: none;
    user-select: none;
}

@media (max-width: 700px) {
    :root {
        --fence-image-height: 70svh;
        --fence-image-top: 22svh;
        --sidewalk-height: 24svh;
        --sidewalk-image-height: 82svh;
        --sidewalk-image-offset: -24svh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .scene-viewport {
        scroll-behavior: auto;
    }
}
