/*
 * 图片预览层样式：统一 chat 与 admin 的查看浮层。
 * 作者: @ccfork
 */
.image-viewer {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(36, 20, 28, 0.74);
    backdrop-filter: blur(2px);
}

.image-viewer[hidden] {
    display: none;
}

.image-viewer-img {
    max-width: min(94vw, 1100px);
    max-height: 88vh;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    object-fit: contain;
}

.image-viewer-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    color: #b35573;
    background: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

body.image-viewer-open {
    overflow: hidden;
}
