/* ============ 详情页预览区：政文纸感（增量样式，不改动 site.css） ============ */
.preview-area {
    background: #faeeda;
    border: 1px solid #e8dcc0;
    border-radius: .4rem;
    padding: 1.4rem 1.6rem 1.1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}
.preview-head {
    text-align: center;
    font-family: "FangSong", "FangSong_GB2312", "STFangsong", "仿宋", "SimSun", serif;
    font-size: 1.04rem;
    font-weight: 600;
    color: #854f0b;
    letter-spacing: 4px;
    padding-bottom: .7rem;
    margin-bottom: 1rem;
    border-bottom: 1px dashed #d9c9a4;
    position: relative;
}
.preview-head::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 26px;
    height: 3px;
    transform: translateX(-50%);
    background: #ba7517;
    border-radius: 2px;
}
.preview-content {
    font-family: "FangSong", "FangSong_GB2312", "STFangsong", "仿宋", "SimSun", serif;
    color: #3f2f14;
    line-height: 2;
    font-size: 1.02rem;
    min-height: 6rem;
}
.preview-para {
    text-indent: 2em;
    margin: 0 0 .55rem;
    text-align: justify;
}
.preview-subhead {
    margin: .6rem 0 .4rem;
    padding: .15rem 0 .15rem .75rem;
    border-left: 3px solid #ba7517;
    color: #854f0b;
    font-weight: 500;
    text-indent: 0;
}
.preview-empty {
    text-align: center;
    color: #8a7a5c;
    margin: .5rem 0;
}
.preview-lock {
    color: #6b5d3e;
    margin: .5rem 0;
}
.preview-lock a { color: #854f0b; font-weight: 500; }
.preview-foot {
    text-align: center;
    color: #9a8863;
    font-size: .85rem;
    margin: 1rem 0 0;
    padding-top: .75rem;
    border-top: 1px dashed #d9c9a4;
    letter-spacing: 1px;
}

/* 预览分页器（与 /api/preview 的 perPage 模型一致） */
.preview-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: .75rem;
    border-top: 1px dashed #d9c9a4;
    font-size: .9rem;
    color: #6b5d3e;
}
.preview-pager a {
    display: inline-flex;
    align-items: center;
    padding: .3rem .9rem;
    border: 1px solid #d9c9a4;
    border-radius: 999px;
    background: #fffdf8;
    color: #854f0b;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease;
}
.preview-pager a:hover {
    background: #ba7517;
    border-color: #ba7517;
    color: #fff;
}
.preview-pager .pager-current { letter-spacing: 1px; }
.preview-pager .pager-disabled {
    display: inline-flex;
    align-items: center;
    padding: .3rem .9rem;
    border: 1px solid #ece1c8;
    border-radius: 999px;
    background: #faf4e6;
    color: #c4b48f;
    cursor: not-allowed;
}

/* 原样 PDF 预览（pdf.js iframe） */
.pdf-frame-wrap {
    position: relative;
    width: 100%;
    /* 16:9 视觉较扁，改用 4:3 更接近 A4/PPT；A4 ≈ √2:1 → 这里 1.42:1 */
    aspect-ratio: 1 / 1.42;
    max-height: 86vh;
    margin: 0 auto;
    border: 1px solid #d9c9a4;
    border-radius: 6px;
    background: #ece4cf;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
    overflow: hidden;
}
.pdf-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #f3eedb;
}
@media (max-width: 640px) {
    .pdf-frame-wrap { aspect-ratio: auto; height: 78vh; max-height: none; }
}
