.three-model-viewer {
    position: relative;
    border: 1px solid var(--tab-edge);
    box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    cursor: grab;
}

.three-model-viewer:active {
    cursor: grabbing;
}

.modal-media-frame {
    width: min(90vw, calc(90vh * var(--modal-ratio)));
    aspect-ratio: var(--modal-ratio);
}

.three-model-viewer canvas {
    position: absolute;
    inset: 0;
    z-index: 2;

    display: block;
    width: 100% !important;
    height: 100% !important;

    transition: opacity 0.15s ease;

    cursor: grab;
}

.three-model-viewer canvas:active {
    cursor: grabbing;
}

.three-viewer-preview {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: contain;
    display: block;

    z-index: 1;
}

.three-viewer-loading {
    filter: blur(2px);
    opacity: 0.92;

    transition:
        filter 180ms ease,
        opacity 180ms ease;
}