.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    background: var(--bg-clr);
    backdrop-filter: blur(15px);
    user-select: none;
    touch-action: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.is-open {
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 1;
}

body.lb-active {
    overflow: hidden;
    scrollbar-gutter: stable;
}

.lb-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 100%;
}

.lb-actions {
    display: flex;
    gap: 5px;
}

#lb-image {
    max-width: 90%;
    max-height: 85dvh;
    object-fit: contain;
    transform: translate(var(--pan-x, 0px), var(--pan-y, 0px)) scale(var(--scale, 1));
    cursor: grab;
    will-change: transform;
}

.lb-nav,
.lb-close {
    position: absolute;
    color: var(--text-clr);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    z-index: 100;
}

.lb-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 120px;
    font-size: 50px;
}

.lb-prev {
    left: 0;
    border-radius: 0 12px 12px 0;
}

.lb-next {
    right: 0;
    border-radius: 12px 0 0 12px;
}

.lb-close {
    top: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: transparent;
    border: none;
    font-size: 36px;
    -webkit-text-stroke: 1.5px var(--bg-clr);
    opacity: 0.25;
}

.lb-footer {
    position: absolute;
    left: 0;
    bottom: 0;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: linear-gradient(90deg, var(--bg-clr) -40%, transparent 100%);
    z-index: 101;
}

.lb-btn {
    padding: 5px 24px;
    background: color-mix(in srgb, var(--bg-clr), transparent 60%);
    color: var(--text-clr);
    border: 0.5px solid var(--text-clr);
    font-size: x-large;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}