/* ── ライトボックス ── */
[data-lightbox] {
    cursor: zoom-in;
    transition: opacity var(--transition-fast);
}

[data-lightbox]:hover {
    opacity: 0.85;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.lightbox.is-active {
    opacity: 1;
    visibility: visible;
}

.lightbox__content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s;
}

.lightbox.is-active .lightbox__img {
    transform: scale(1);
}

.lightbox__close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    padding: 8px;
    opacity: 0.8;
    transition: opacity 0.2s;
    z-index: 1;
}

.lightbox__close:hover {
    opacity: 1;
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 56px;
    line-height: 1;
    cursor: pointer;
    padding: 16px;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 1;
    display: none;
}

.lightbox__nav:hover {
    opacity: 1;
}

.lightbox__nav--prev {
    left: 8px;
}

.lightbox__nav--next {
    right: 8px;
}

.lightbox__counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    display: none;
}
