.gallery a {
    display: block;
    object-fit: cover;
    width: 100%;
    height: 100%;
    overflow: hidden;
    outline: none;
}
.gallery img {
    width: 100%;
    object-fit: cover;
    display: block;
    transition: transform .15s ease;
}
.gallery a:focus img,
.gallery a:hover img { transform: scale(1.02); }

.lightbox {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0,0,0,.92);
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
    z-index: 9999;
}
.lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox__figure {
    margin: 0;
    width: min(92vw, 1400px);
    height: min(92vh, 900px);
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 10px;
}

.lightbox__imgWrap {
    position: relative;
    display: grid;
    place-items: center;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(0, 0, 0, 1);
}
.lightbox__img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox__caption {
    font: 14px/1.3 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: rgba(255,255,255,.75);
    text-align: center;
    padding: 0 8px;
    min-height: 1.3em;
}

.lightbox__btn {
    position: absolute;
    top: 14px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: white;
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 999;
    transition: background .15s ease;
}
.lightbox__btn:hover { background: rgba(255,255,255,.18); }
.lightbox__btn:focus { outline: 2px solid rgba(255,255,255,.35); outline-offset: 2px; }

.lightbox__close { 
    right: 14px;
}
.lightbox__prev,
.lightbox__next {
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,.10);
    font-size: 35px;
}
.lightbox__prev { left: 14px; }
.lightbox__next { right: 14px; }

@media (max-width: 420px) {
.lightbox__prev, .lightbox__next { display: none; }
}

body.no-scroll { overflow: hidden; }