img:has(+.lightbox-image) {
    cursor: zoom-in;
    width: min(50vw, 600px);
    height: auto;
}

#lightbox {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    padding: 0;
    border: 0;
    background: transparent;
}

#lightbox::backdrop {
    background: rgb(0 0 0 / 0.9);
}

#lightbox[open] {
    display: grid;
    place-items: center;
    align-content: center;
    gap: var(--gap);
}

#lightbox-description {
    color: antiquewhite;
    font-style: italic;
    font-family: sans-serif;
    max-width: 95vw;
}

#lightbox-preview {
    display: block;
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
}

.lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1;

    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 50%;

    color: white;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}