#lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    /* すこし明るめの黒 */
    backdrop-filter: blur(8px);
    /* 背景をぼかす魔法のコードです！ */
    -webkit-backdrop-filter: blur(8px);
    /* Safari対策 */
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#lightbox.active {
    display: flex;
}

#lightbox .lb-outerContainer {
    position: relative;
    background: transparent;
    border-radius: 4px;
    padding: 0;
    box-shadow: none;
    max-width: 92%;
}

#lightbox img {
    display: block;
    max-width: 100%;
    max-height: calc(92vh - 40px);
    width: auto;
    height: auto;
    border-radius: 3px;
    opacity: 1;
    transition: opacity 0.3s ease;
    touch-action: pan-y;
}

/* 下部情報エリア（outerContainerの中に固定） */
#lightbox .lb-data {
    padding: 8px 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ddd;
    font-size: 15px;
    background: transparent;
    border-radius: 0 0 4px 4px;
    margin-top: 0;
    /* ←消す */
}

#lightbox-counter {
    position: relative;
    margin-left: auto;
}

#lightbox-close {
    color: #ddd;
    font-size: 38px;
    cursor: pointer;
    line-height: 1;
    position: fixed;
    top: 15px;
    right: 20px;
    padding: 8px;
    z-index: 9999;
}

#lightbox-close:hover {
    color: white;
}

/* 矢印 */
#lightbox-prev,
#lightbox-next {
    position: absolute;
    top: 0;
    width: 80px;
    height: 100%;
    cursor: pointer;
    z-index: 30;
    opacity: 0.3;
}

#lightbox-prev:hover,
#lightbox-next:hover {
    opacity: 1;
}

#lightbox-prev {
    left: 0;
}

/* ←15pxでもいいけど0推奨 */
#lightbox-next {
    right: 0;
}

#lightbox-prev::before,
#lightbox-next::before {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 70px;
    color: white;
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.9);
    pointer-events: none;
}

#lightbox-prev::before {
    content: "‹";
    left: 15px;
}

#lightbox-next::before {
    content: "›";
    right: 15px;
}


#lightbox-prev,
#lightbox-next {
    opacity: 0.3;
    transition: 0.2s;
}