:root {
    color-scheme: dark;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    background: #050b13;
}

.ocean-stage {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #050b13;
    pointer-events: none;
}

#jellyfish {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0;
}

body[data-render-mode="webgl"] #jellyfish {
    opacity: 1;
}

body[data-render-mode="fallback"] #jellyfish {
    visibility: hidden;
}

.fallback-art {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: clamp(44px, 7vh, 76px) 12px clamp(54px, 8vh, 86px);
    pointer-events: none;
}

.fallback-art img {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: contain;
    transform: rotate(clamp(-14deg, var(--still-angle, -10deg), 14deg));
    transform-origin: 50% 40%;
}

body[data-render-mode="webgl"] .fallback-art {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    margin: -1px;
    padding: 0;
    border: 0;
}

/* The ocean is always dark: the homepage pins the shared dark controls. */
html[data-theme="dark"] body {
    background: #050b13;
    color: #e0e0e0;
}

@media (max-width: 600px) {
    .fallback-art {
        padding: 78px 0 126px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #jellyfish {
        transition: none;
    }
}

/* Leave room for the existing project links below the collection on phones. */
@media (max-width: 768px) and (min-height: 451px) {
    body[data-homepage="true"] .specimen-controls {
        bottom: calc(194px + env(safe-area-inset-bottom, 0px));
    }

    body[data-homepage="true"] .specimen-panel {
        max-height: calc(100dvh - 320px - var(--camera-row) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    }
}
