#lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    /* padding: 60px 54px 20px; top: close btn, sides: arrows, bottom: breathing room */
    box-sizing: border-box;
}

#lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

#lightbox.active {
    display: flex;
}

#closeBtn {
    position: fixed;
    top: 0; right: 0;
    font-size: 28px;
    color: white;
    cursor: pointer;
    padding: 12px 18px;
    background: rgba(0,0,0,0.5);
    line-height: 1;
    /* big tap target */
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#prevBtn, #nextBtn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 28px;
    color: white;
    cursor: pointer;
    user-select: none;
    /* big tap targets for mobile */
    width: 44px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
    border-radius: 4px;
    -webkit-tap-highlight-color: transparent;
}

#prevBtn { left: 0; border-radius: 0 4px 4px 0; }
#nextBtn { right: 0; border-radius: 4px 0 0 4px; }

#prevBtn:hover, #nextBtn:hover,
#prevBtn:active, #nextBtn:active {
    background: rgba(0,0,0,0.75);
}

@media (max-width: 768px) {
    #lightbox-img {
        max-width: calc(100% - 100px);
        max-height: 80vh;
    }

    #prevBtn, #nextBtn {
        min-height: 120px;
    }
}