body.opus-alt-page {
    min-height: 100vh;
    min-height: 100svh;
    overflow-x: hidden;
    overflow-y: auto;
}

.preview-stage {
    display: grid;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: 6rem 4vw;
}

.preview-grid {
    display: grid;
    /* Two columns per preview allow the six-item rows to sit centered. */
    grid-template-columns: repeat(14, minmax(0, 1fr));
    align-items: center;
    gap: 1rem;
    width: min(100%, 80rem);
    margin: 0 auto;
}

.preview-link {
    position: relative;
    display: grid;
    grid-column: span 2;
    place-items: center;
    min-width: 0;
    width: 100%;
    aspect-ratio: 4 / 3;
    touch-action: manipulation;
}

.preview-link:nth-child(1),
.preview-link:nth-child(14) {
    grid-column: 2 / span 2;
}

.preview-link img {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: contain;
}

.preview-link.planar-preview img {
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.preview-title {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: max-content;
    max-width: min(18rem, calc(100vw - 1rem));
    padding: .35rem .5rem;
    color: #fff;
    mix-blend-mode: difference;
    font-size: .875rem;
    line-height: 1.3;
    text-align: left;
    overflow-wrap: anywhere;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.preview-link.is-title-visible .preview-title {
    visibility: visible;
    opacity: 1;
}

.preview-link:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 4px;
}

.opus-alt-page .view-switch {
    position: fixed;
    left: 4%;
    bottom: 4%;
}

.view-switch a:hover {
    animation: rainbow 1.74s linear infinite normal;
}

/* Keep the stacked image layout available when opening this version on a phone. */
@media (max-width: 500px), (hover: none) and (pointer: coarse) {
    .preview-stage {
        display: block;
        min-height: 100vh;
        min-height: 100svh;
        padding: max(12rem, 33vh) 0 7rem;
        padding-top: max(12rem, 33svh);
    }

    .preview-grid {
        grid-template-columns: 1fr;
        gap: .5rem;
        width: min(222px, calc(100% - 2rem));
    }

    .preview-grid .preview-link {
        grid-column: auto;
        display: block;
        aspect-ratio: auto;
    }

    .preview-link img {
        height: auto;
    }
}

@media (hover: none) and (pointer: coarse) {
    .opus-alt-page .inner-cursor,
    .opus-alt-page .outer-cursor {
        display: none;
    }
}
