body.lightbox-open { overflow: hidden; }
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(12, 12, 12, .92);
}
.lightbox.is-open { display: flex; }
.lightbox-figure {
    margin: 0;
    max-width: min(1100px, 100%);
    max-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}
.lightbox-figure img {
    max-width: 100%;
    max-height: calc(100vh - 130px);
    object-fit: contain;
    border-radius: 8px;
    background: #111;
}
.lightbox-figure figcaption {
    color: #f4f1ea;
    font-size: .9rem;
    text-align: center;
    max-width: 70ch;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .32);
    background: rgba(0, 0, 0, .45);
    color: #fff;
    cursor: pointer;
    border-radius: 999px;
    font-size: 1.6rem;
    line-height: 1;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.lightbox-close { top: 18px; right: 18px; }
.lightbox-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255, 255, 255, .2); }
.lightbox-count {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .8);
    font-size: .78rem;
    letter-spacing: .08em;
}
@media (max-width: 640px) {
    .lightbox { padding: 12px; }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
    .lightbox-figure img { max-height: calc(100vh - 160px); }
}
@media (prefers-reduced-motion: no-preference) {
    .lightbox.is-open .lightbox-figure img { animation: lightbox-in .18s ease-out; }
    @keyframes lightbox-in { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }
}
