/* =============================================================================
   梦马论坛 · 帖子正文排版优化（forum.php?mod=viewthread&tid=N）
   数据来源：Playwright 实测 style_49
     改前 t_f: 14px / line-height 21px (1.5) / .pcb padding 0
   目标（中文长文阅读最佳实践，参考科技媒体正文排印）：
     16px / 30px (1.875) / 段落间距 1.2em / 左右留白 20px
   只覆盖阅读区（楼层正文），不动版式骨架。
   ============================================================================= */

/* ---------- 1. 正文容器留白 ---------- */
.pct {
    padding: 0 0 18px !important;
}
.pcb {
    padding: 18px 22px 6px !important;    /* 改前 0 → 给正文呼吸空间 */
    background: #fff !important;
}
.t_fsz { padding: 0 !important; }

/* 正文里的 table 去掉默认紧贴 */
.t_fsz table { width: 100% !important; }
.t_fsz td.t_f { vertical-align: top !important; }

/* ---------- 2. 正文字体与行距（核心） ---------- */
.t_f,
td.t_f {
    font-size: 16px !important;
    line-height: 30px !important;          /* 1.875，长文最优区间 */
    color: #2B3A47 !important;
    font-family: "Noto Sans SC", "Source Han Sans SC", "Source Han Sans CN",
                 "Noto Sans CJK SC", "思源黑体", "思源黑体 CN",
                 "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
                 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    letter-spacing: .01em !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    text-align: left !important;
    padding: 0 !important;
}

/* 段落间距 */
.t_f p,
.t_f .p {
    margin: 0 0 1.1em !important;
    padding: 0 !important;
    line-height: 30px !important;
}
.t_f p:last-child,
.t_f .p:last-child { margin-bottom: 0 !important; }

/* 段首不缩进（现代网页排印习惯），保留原有 <br> 断行 */
.t_f br + br { line-height: 18px !important; }

/* ---------- 3. 标题层级（正文内的 heading / 加粗强调行） ---------- */
.t_f h1, .t_f h2, .t_f h3, .t_f h4, .t_f h5 {
    margin: 1.5em 0 .7em !important;
    color: #1B2B3A !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
}
.t_f h1 { font-size: 22px !important; }
.t_f h2 { font-size: 19px !important; }
.t_f h3 { font-size: 17px !important; }
.t_f h4, .t_f h5 { font-size: 16px !important; }
.t_f h1:first-child, .t_f h2:first-child, .t_f h3:first-child { margin-top: 0 !important; }

/* 加粗强调 */
.t_f strong, .t_f b { color: #1B2B3A !important; font-weight: 600 !important; }

/* ---------- 4. 列表 ---------- */
.t_f ul, .t_f ol {
    margin: 0 0 1.1em !important;
    padding-left: 1.9em !important;
}
.t_f li {
    margin: 0 0 .5em !important;
    line-height: 30px !important;
    list-style-position: outside !important;
}
.t_f li:last-child { margin-bottom: 0 !important; }

/* ---------- 5. 引用 ---------- */
.t_f blockquote,
.t_f .quote {
    margin: 1.2em 0 !important;
    padding: 12px 16px !important;
    background: #F7F9FC !important;
    border-left: 3px solid #0A4F9E !important;
    border-radius: 0 8px 8px 0 !important;
    color: #5A6B7C !important;
    font-size: 15px !important;
    line-height: 28px !important;
}

/* ---------- 6. 代码 ---------- */
.t_f code,
.t_f .blockcode {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
    font-size: 14px !important;
}
.t_f code {
    padding: 2px 6px !important;
    background: #F2F5F9 !important;
    border-radius: 5px !important;
    color: #C7254E !important;
}
.t_f .blockcode,
.t_f pre {
    margin: 1.2em 0 !important;
    padding: 14px 16px !important;
    background: #F7F9FC !important;
    border: 1px solid #EDF1F6 !important;
    border-radius: 8px !important;
    line-height: 1.7 !important;
    overflow-x: auto !important;
    color: #2B3A47 !important;
}

/* ---------- 7. 链接与标签 ---------- */
.t_f a { color: #0A4F9E !important; text-decoration: none !important; }
.t_f a:hover { text-decoration: underline !important; }

/* 正文下方标签行（.ptg） */
.ptg {
    margin: 14px 0 4px !important;
    padding-top: 12px !important;
    border-top: 1px solid #F2F5F9 !important;
    line-height: 2 !important;
}
.ptg a {
    display: inline-block !important;
    padding: 3px 12px !important;
    margin: 0 6px 6px 0 !important;
    background: #F0F6FF !important;
    border: 1px solid #DCE9F8 !important;
    border-radius: 20px !important;
    color: #0A4F9E !important;
    font-size: 12px !important;
    text-decoration: none !important;
    transition: all .15s ease !important;
}
.ptg a:hover {
    background: #0A4F9E !important;
    border-color: #0A4F9E !important;
    color: #fff !important;
}

/* ---------- 8. 图片 ---------- */
.t_f img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    margin: 8px 0 !important;
    display: block !important;
}
.t_f .attach_n { margin: 8px 0 4px !important; }

/* ---------- 9. 楼层头部（作者条）适度放大 ---------- */
.pi {
    font-size: 14px !important;
    line-height: 1.6 !important;
    padding: 10px 0 !important;
}
.authi { font-size: 14px !important; }
.authi .xw1 { font-weight: 600 !important; color: #1B2B3A !important; }

/* 楼层间的分隔更清晰 */
.pct:not(:last-child) { border-bottom: 1px solid #F2F5F9 !important; }
.plc { border-bottom: 1px solid #F2F5F9 !important; }
.plc:first-child { border-bottom: 0 !important; }

/* 楼层签名（.signature） */
.signature,
.pcb .signature {
    margin-top: 18px !important;
    padding-top: 12px !important;
    border-top: 1px dashed #EDF1F6 !important;
    color: #9AA7B5 !important;
    font-size: 13px !important;
    line-height: 26px !important;
}

/* ---------- 10. 评分 / 支持反对区 ---------- */
.pcb .pstl,
.pcb .rate {
    margin: 14px 0 !important;
    font-size: 13px !important;
}
.pcb .pstl .rate { line-height: 1.8 !important; }

/* ---------- 11. 移动端 ---------- */
@media (max-width: 760px) {
    .pcb { padding: 14px 14px 4px !important; }
    .t_f, td.t_f {
        font-size: 16px !important;
        line-height: 29px !important;
    }
    .t_f p, .t_f .p { line-height: 29px !important; }
    .t_f li { line-height: 29px !important; }
    .t_f blockquote, .t_f .quote { font-size: 15px !important; line-height: 27px !important; }
    .plc { padding: 14px !important; }
}
