/* crimson · 图片灯箱（点击正文图片放大预览） */
.cr-lb {
    position: fixed;
    inset: 0;
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 8, 12, .92);
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, visibility .18s ease;
    user-select: none;
    -webkit-user-select: none;
}

.cr-lb.is-open {
    opacity: 1;
    visibility: visible;
}

.cr-lb-fig {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 120px);
}

.cr-lb-img {
    max-width: 100%;
    max-height: calc(100vh - 160px);
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, .55);
}

.cr-lb-cap {
    margin: 12px 0 0;
    color: #d6d6d6;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
    max-width: 72vw;
    overflow-wrap: break-word;
}

.cr-lb-close,
.cr-lb-prev,
.cr-lb-next {
    position: fixed;
    z-index: 99991;
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: background .15s ease, border-color .15s ease;
}

.cr-lb-close:hover,
.cr-lb-prev:hover,
.cr-lb-next:hover {
    background: rgba(255, 255, 255, .22);
    border-color: rgba(255, 255, 255, .7);
}

.cr-lb-close {
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    font-size: 22px;
}

.cr-lb-prev {
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    font-size: 30px;
}

.cr-lb-next {
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    font-size: 30px;
}

.cr-lb-count {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .75);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    background: rgba(0, 0, 0, .45);
    border-radius: 20px;
    padding: 4px 14px;
}

/* 仅单张时不显示切换按钮 */
.cr-lb:not(.cr-lb-multi) .cr-lb-prev,
.cr-lb:not(.cr-lb-multi) .cr-lb-next {
    display: none;
}

/* 打开期间锁定页面滚动 */
body.cr-lb-lock {
    overflow: hidden;
}

@media (max-width: 600px) {
    .cr-lb-prev { left: 6px; width: 38px; height: 38px; font-size: 26px; }
    .cr-lb-next { right: 6px; width: 38px; height: 38px; font-size: 26px; }
    .cr-lb-close { top: 10px; right: 10px; width: 36px; height: 36px; font-size: 20px; }
    .cr-lb-cap { max-width: 86vw; }
}
