html:has(.build-lightbox[open]),
body:has(.build-lightbox[open]) {
    overflow: hidden;
}

.build-lightbox {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    overscroll-behavior: none;
    background: #1594f6;
    color: #fff;
}

#build-preview {
    z-index: 8;
}

#build-preview-status {
    top: auto;
    bottom: calc(96px + var(--safe-area-bottom));
    font-size: 14px;
}

.build-preview-remix {
    position: absolute;
    bottom: calc(28px + var(--safe-area-bottom));
    left: 50%;
    min-width: 180px;
    padding: 15px 38px;
    border: 0;
    border-radius: 999px;
    color: #404348;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.28);
    font-family: 'Open Sans', sans-serif;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    cursor: pointer;
    touch-action: manipulation;
    transform: translateX(-50%);
    transition: box-shadow 150ms ease, opacity 150ms ease;
}

.build-preview-remix:disabled {
    opacity: 0.65;
    cursor: wait;
}

.build-preview-remix:hover:enabled {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.32);
}

.build-preview-remix:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 4px;
}

.build-lightbox::backdrop {
    background: #1594f6;
}

.build-lightbox__viewport {
    position: absolute;
    inset: 0;
}

.build-lightbox__viewport canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

.build-lightbox__status {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 24px;
    font-weight: 800;
    text-align: center;
    pointer-events: none;
}

.build-lightbox .viewport-close {
    position: absolute;
    top: calc(24px + var(--safe-area-top));
    left: calc(24px + var(--safe-area-left));
    z-index: 4;
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    padding: 0;
    border: 0;
    background: #1b7dd4;
    border-radius: 50%;
    box-shadow: none;
    cursor: pointer;
    touch-action: manipulation;
}

.build-lightbox .viewport-close:hover {
    background: #006bc8;
    transform: translateY(-1px);
}

.build-lightbox .viewport-close:active {
    transform: translateY(1px);
}

.build-lightbox .viewport-close:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.94);
    outline-offset: 3px;
}

.build-lightbox .viewport-close img {
    display: block;
    width: 50px;
    height: 50px;
    object-fit: contain;
}

@media (max-width: 620px) {
    .build-lightbox .viewport-close {
        top: calc(16px + var(--safe-area-top));
        left: calc(16px + var(--safe-area-left));
    }
}

