/* ContentPlus CMS 读者前台样式：无外网字体/图片，全部本地 CSS */

:root {
    --color-primary: #2c5fd0;
    --color-primary-dark: #1f4bb5;
    --color-primary-light: #eaf0ff;
    --color-text: #22262e;
    --color-text-sub: #5a6472;
    --color-text-mute: #8b94a3;
    --color-border: #e6e9f0;
    --color-bg: #f5f7fb;
    --color-card: #ffffff;
    --color-danger: #e03e3e;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(24, 32, 48, .06), 0 8px 24px rgba(24, 32, 48, .06);
    --shadow-hover: 0 4px 10px rgba(24, 32, 48, .1), 0 16px 36px rgba(24, 32, 48, .12);
    --header-h: 62px;
    --container: 1220px;
}

/* ---------------------------------------------------------------- 基础 */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
}

a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--color-primary); }
img { max-width: 100%; }
ul, ol { margin: 0 0 0 1.2em; padding: 0; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }

mark { background: #ffe58a; color: inherit; padding: 0 2px; border-radius: 3px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.text-mute { color: var(--color-text-mute); }
.sr-hide { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- 顶部导航 */
.site-header {
    position: sticky;
    top: 0;
    z-index: 900;
    height: var(--header-h);
    background: rgba(255, 255, 255, .95);
    border-bottom: 1px solid var(--color-border);
    backdrop-filter: blur(6px);
}

.header-inner { display: flex; align-items: center; height: var(--header-h); gap: 18px; }

.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 9px; color: #fff; font-weight: 700;
    background: linear-gradient(135deg, #4f7df0, #7a5cf0);
}
.brand-name { font-size: 18px; font-weight: 700; letter-spacing: .5px; }
.brand-sub { display: block; margin-top: -3px; font-size: 12px; color: var(--color-text-mute); }

.main-nav { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav-item { position: relative; }
.nav-item > .nav-link {
    display: block; padding: 8px 12px; border-radius: 8px;
    font-size: 15px; color: var(--color-text-sub); white-space: nowrap;
}
.nav-item:hover > .nav-link, .nav-item.active > .nav-link { color: var(--color-primary); background: var(--color-primary-light); }
.nav-link .caret { font-size: 10px; margin-left: 4px; color: var(--color-text-mute); }

.sub-nav {
    position: absolute; top: 100%; left: 0; min-width: 170px;
    margin: 0; padding: 6px; list-style: none;
    background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
    box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: all .18s;
}
.nav-item:hover .sub-nav, .nav-item.open .sub-nav { opacity: 1; visibility: visible; transform: translateY(4px); }
.sub-nav a { display: block; padding: 7px 10px; border-radius: 6px; font-size: 14px; color: var(--color-text-sub); }
.sub-nav a:hover { background: var(--color-primary-light); color: var(--color-primary); }
.sub-nav .sub-count { float: right; color: var(--color-text-mute); font-size: 12px; }

.header-search { position: relative; margin-left: auto; flex: 1 1 220px; max-width: 300px; }
.header-search input {
    width: 100%; height: 36px; padding: 0 38px 0 14px;
    background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 18px;
    outline: none; transition: all .2s;
}
.header-search input:focus { background: #fff; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(44, 95, 208, .12); }
.header-search .search-btn {
    position: absolute; right: 3px; top: 3px; width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border: 0; border-radius: 50%; background: var(--color-primary); color: #fff;
}
.header-search .search-btn:hover { background: var(--color-primary-dark); }

.nav-toggle {
    display: none; width: 38px; height: 34px; flex: none;
    border: 1px solid var(--color-border); border-radius: 8px; background: #fff;
    font-size: 16px; color: var(--color-text-sub);
}

/* 移动端抽屉式导航 */
.nav-drawer { display: none; }

/* ---------------------------------------------------------------- 页脚 */
.site-footer { margin-top: 48px; padding: 28px 0; background: #22262e; color: #b9c0cc; font-size: 13px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; }
.footer-brand { font-size: 15px; font-weight: 600; color: #fff; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a { color: #b9c0cc; }
.footer-links a:hover { color: #fff; }
.footer-copy { width: 100%; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); color: #8b94a3; }
.footer-copy a { color: #8b94a3; }

/* ---------------------------------------------------------------- 布局 */
.page-body { padding: 22px 0 8px; }

.layout { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 992px) { .layout { grid-template-columns: minmax(0, 1fr) 300px; } }

.panel { background: var(--color-card); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-pad { padding: 20px 22px; }
@media (max-width: 767px) { .panel-pad { padding: 16px 14px; } }
.section-title {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 16px; font-size: 19px; font-weight: 700;
}
.section-title::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--color-primary); }
.section-title .title-more { margin: 0 0 0 auto; font-size: 13px; font-weight: 400; color: var(--color-text-mute); }

/* ---------------------------------------------------------------- Banner */
.banner {
    position: relative; overflow: hidden; margin-bottom: 24px;
    border-radius: 14px; box-shadow: var(--shadow);
    background: linear-gradient(120deg, #33415c 0%, #2c5fd0 55%, #7a5cf0 100%);
    color: #fff;
}
.banner-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.banner-inner { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 34px 30px; min-height: 210px; justify-content: center; }
.banner-tag { align-self: flex-start; padding: 3px 10px; border-radius: 12px; background: rgba(255, 255, 255, .22); font-size: 12px; }
.banner-title { margin: 0; font-size: 28px; line-height: 1.35; font-weight: 700; }
.banner-title a:hover { color: #fff; opacity: .88; }
.banner-summary { margin: 0; max-width: 760px; color: rgba(255, 255, 255, .86); font-size: 15px; }
.banner-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: rgba(255, 255, 255, .8); }
.banner-btn {
    align-self: flex-start; margin-top: 6px; padding: 8px 20px;
    border-radius: 20px; background: #fff; color: var(--color-primary-dark); font-weight: 600;
}
.banner-btn:hover { color: var(--color-primary); transform: translateY(-1px); }

/* ---------------------------------------------------------------- 文章卡片 */
.article-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.article-rowlist { display: grid; gap: 14px; }

.card {
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--color-card); border-radius: var(--radius); box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card:hover .card-title a { color: var(--color-primary); }

.card-cover { position: relative; display: block; flex: none; aspect-ratio: 16 / 9; overflow: hidden; background: #eef1f7; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card-cover:hover img { transform: scale(1.04); }
.card-badge {
    position: absolute; top: 8px; left: 8px; padding: 2px 8px;
    border-radius: 4px; background: rgba(224, 62, 62, .92); color: #fff; font-size: 12px;
}
.card-badge.recommend { left: auto; right: 8px; background: rgba(255, 154, 46, .94); }

/* 无封面时用标题首字 + 稳定渐变色块 */
.cover-ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: rgba(255, 255, 255, .95); font-size: 46px; font-weight: 700; }
.ph-0 { background: linear-gradient(135deg, #5b8def, #8f6ae8); }
.ph-1 { background: linear-gradient(135deg, #22a6a3, #4fc3f7); }
.ph-2 { background: linear-gradient(135deg, #f6a623, #f76b6b); }
.ph-3 { background: linear-gradient(135deg, #7b6cf6, #c56cf0); }
.ph-4 { background: linear-gradient(135deg, #26c281, #6dd5fa); }
.ph-5 { background: linear-gradient(135deg, #ef6292, #ffa96b); }
.ph-6 { background: linear-gradient(135deg, #4a5f9e, #7f9cf5); }
.ph-7 { background: linear-gradient(135deg, #12a1c9, #56d6a4); }

.card-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; min-width: 0; }
.card-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--color-text-mute); }
.card-cat { color: var(--color-primary); background: var(--color-primary-light); padding: 1px 8px; border-radius: 10px; }
.card-title { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 600; }
.card-title a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-summary {
    margin: 0; font-size: 13px; color: var(--color-text-sub);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--color-border); font-size: 12px; color: var(--color-text-mute); }
.card-foot .stat { display: inline-flex; align-items: center; gap: 4px; }
.card-foot .stat + .stat { margin-left: 2px; }
.card-foot .card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-right: auto; }

.tag-chip { display: inline-block; padding: 1px 9px; border-radius: 10px; background: #f0f2f7; color: var(--color-text-sub); font-size: 12px; }
.tag-chip:hover { background: var(--color-primary-light); color: var(--color-primary); }

/* 横向列表卡 */
.card-row { flex-direction: row; }
.card-row .card-cover { width: 220px; aspect-ratio: auto; }
.card-row .cover-ph { font-size: 34px; }
.card-row .card-body { padding: 16px 18px; }
@media (max-width: 620px) {
    .card-row { flex-direction: column; }
    .card-row .card-cover { width: auto; aspect-ratio: 16 / 9; }
}

/* ---------------------------------------------------------------- 面包屑 / 排序 */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; font-size: 13px; color: var(--color-text-mute); }
.breadcrumb a { color: var(--color-text-sub); }
.breadcrumb .sep { color: #c4cad6; }
.breadcrumb .current { color: var(--color-text); font-weight: 600; }

.list-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.list-head .page-title { margin: 0; font-size: 22px; font-weight: 700; }
.list-head .page-desc { font-size: 13px; color: var(--color-text-mute); }

.sort-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; padding: 4px; background: #fff; border-radius: 22px; box-shadow: var(--shadow); width: -moz-fit-content; width: fit-content; }
.sort-tabs button { padding: 5px 16px; border: 0; border-radius: 16px; background: transparent; color: var(--color-text-sub); font-size: 14px; }
.sort-tabs button:hover { color: var(--color-primary); }
.sort-tabs button.active { background: var(--color-primary); color: #fff; }

.pagination { display: flex; justify-content: center; margin: 26px 0 6px; }
.pagination .layui-laypage { margin: 0; }

.empty { padding: 54px 20px; text-align: center; color: var(--color-text-mute); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.empty .empty-icon { font-size: 40px; color: #cdd4e0; }
.empty .empty-title { margin: 10px 0 4px; font-size: 16px; color: var(--color-text-sub); }
.empty a { color: var(--color-primary); text-decoration: underline; }

/* ---------------------------------------------------------------- 侧栏组件 */
.widget { padding: 16px 18px; margin-bottom: 20px; }
.widget-title { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 16px; font-weight: 700; }
.widget-title::before { content: ""; width: 3px; height: 15px; border-radius: 2px; background: var(--color-primary); }

.stat-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); text-align: center; }
.stat-item b { display: block; font-size: 20px; color: var(--color-primary); font-weight: 700; }
.stat-item span { font-size: 12px; color: var(--color-text-mute); }

.rank-list { margin: 0; padding: 0; list-style: none; counter-reset: rank; }
.rank-list li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--color-border); }
.rank-list li:last-child { border-bottom: 0; }
.rank-list .rank-no { flex: none; width: 20px; height: 20px; margin-top: 3px; border-radius: 5px; background: #eef1f7; color: var(--color-text-mute); font-size: 12px; text-align: center; line-height: 20px; }
.rank-list li:nth-child(1) .rank-no { background: #f6a623; color: #fff; }
.rank-list li:nth-child(2) .rank-no { background: #a8b3c5; color: #fff; }
.rank-list li:nth-child(3) .rank-no { background: #d98f5a; color: #fff; }
.rank-list .rank-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.5; }
.rank-list .rank-meta { font-size: 12px; color: var(--color-text-mute); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud .tag-chip { padding: 3px 12px; font-size: 13px; }

.archive-list { margin: 0; padding: 0; list-style: none; }
.archive-list li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--color-border); font-size: 14px; }

/* ---------------------------------------------------------------- 详情页 */
.article-layout { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "toc" "side"; }
.area-main { grid-area: main; min-width: 0; }
.area-toc { grid-area: toc; }
.area-side { grid-area: side; }

@media (min-width: 768px) {
    .article-layout { grid-template-columns: minmax(0, 1fr) 280px; grid-template-areas: "toc toc" "main side"; }
}
@media (min-width: 1200px) {
    .article-layout { grid-template-columns: minmax(0, 1fr) 220px 270px; grid-template-areas: "main toc side"; align-items: start; }
}

.article-card { padding: 26px 30px 22px; }
@media (max-width: 767px) { .article-card { padding: 18px 16px; } }

.article-title { margin: 0 0 12px; font-size: 28px; line-height: 1.4; font-weight: 700; word-break: break-word; }
@media (max-width: 767px) { .article-title { font-size: 22px; } }

.article-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; padding-bottom: 16px; border-bottom: 1px solid var(--color-border); font-size: 13px; color: var(--color-text-mute); }
.article-meta .meta-item { display: inline-flex; align-items: center; gap: 5px; }
.article-meta .layui-icon { font-size: 14px; }

.article-cover { margin: 20px 0; border-radius: var(--radius); overflow: hidden; }
.article-cover img { display: block; width: 100%; }

/* ------- 正文排版（内容已由后端白名单净化） ------- */
.article-body { font-size: 16.5px; line-height: 1.85; color: #2b3038; word-break: break-word; }
.article-body > *:first-child { margin-top: 0; }
.article-body p { margin: 0 0 1.1em; }
.article-body h1, .article-body h2, .article-body h3, .article-body h4, .article-body h5, .article-body h6 {
    margin: 1.7em 0 .8em; font-weight: 700; line-height: 1.4; scroll-margin-top: calc(var(--header-h) + 16px);
}
.article-body h1 { font-size: 25px; }
.article-body h2 { font-size: 21px; padding-left: 11px; border-left: 4px solid var(--color-primary); }
.article-body h3 { font-size: 18.5px; }
.article-body h4 { font-size: 17px; }
.article-body h5, .article-body h6 { font-size: 16px; color: var(--color-text-sub); }
.article-body ul, .article-body ol { margin: 0 0 1.1em 1.4em; }
.article-body li { margin: .3em 0; }
.article-body li > ul, .article-body li > ol { margin-bottom: 0; }
.article-body blockquote {
    margin: 0 0 1.2em; padding: 12px 16px;
    background: #f6f8fc; border-left: 4px solid #c3d3f5; border-radius: 0 8px 8px 0; color: var(--color-text-sub);
}
.article-body blockquote > *:last-child { margin-bottom: 0; }
.article-body pre {
    margin: 0 0 1.2em; padding: 14px 16px; overflow-x: auto;
    background: #23283a; color: #e8ecf5; border-radius: 8px;
    font-family: Consolas, Monaco, "Courier New", monospace; font-size: 13.5px; line-height: 1.65;
}
.article-body pre code { display: inline; padding: 0; background: none; color: inherit; white-space: pre; }
.article-body code { padding: 2px 6px; background: #eef1f7; border-radius: 4px; color: #c0392b; font-family: Consolas, Monaco, "Courier New", monospace; font-size: .9em; }
.article-body img { display: block; max-width: 100%; height: auto; margin: 14px auto; border-radius: 8px; }
.article-body figure { margin: 0 0 1.3em; text-align: center; }
.article-body figure img { margin: 0 auto; }
.article-body figcaption { margin-top: 8px; font-size: 13px; color: var(--color-text-mute); }
.article-body table { width: 100%; margin: 0 0 1.2em; border-collapse: collapse; font-size: 14.5px; display: block; overflow-x: auto; }
.article-body table th, .article-body table td { padding: 8px 12px; border: 1px solid #dbe1ea; text-align: left; }
.article-body table th { background: #f2f5fa; font-weight: 600; }
.article-body table tr:nth-child(even) td { background: #fafbfd; }
.article-body hr { margin: 1.8em 0; border: 0; border-top: 1px solid var(--color-border); }
.article-body a { color: var(--color-primary); text-decoration: underline; }
.article-body strong { font-weight: 700; }

/* ------- 目录 TOC ------- */
.toc-box { position: sticky; top: calc(var(--header-h) + 18px); padding: 14px 16px; max-height: calc(100vh - var(--header-h) - 40px); overflow: auto; }
.toc-box .toc-title { margin: 0 0 10px; font-size: 14px; font-weight: 700; color: var(--color-text-sub); }
.toc-list { margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--color-border); }
.toc-list li { line-height: 1.5; }
.toc-list a { display: block; padding: 4px 0 4px 12px; margin-left: -2px; border-left: 2px solid transparent; font-size: 13px; color: var(--color-text-mute); }
.toc-list .toc-l3 a { padding-left: 26px; }
.toc-list a:hover { color: var(--color-primary); }
.toc-list a.active { color: var(--color-primary); border-left-color: var(--color-primary); font-weight: 600; }
@media (min-width: 768px) and (max-width: 1199px) {
    .toc-box { position: static; max-height: none; margin-bottom: 18px; }
    .toc-list { display: flex; flex-wrap: wrap; border-left: 0; gap: 4px 10px; }
    .toc-list a { padding: 3px 10px; border: 1px solid var(--color-border); border-radius: 14px; }
    .toc-list .toc-l3 a { padding-left: 10px; }
    .toc-list a.active { border-color: var(--color-primary); background: var(--color-primary-light); }
}
@media (max-width: 767px) { .area-toc { display: none; } }

/* ------- 文章尾部 / 操作条 ------- */
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 20px; }
.article-nav { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 18px; }
.article-nav a { display: block; padding: 12px 16px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.article-nav a:hover { box-shadow: var(--shadow-hover); }
.article-nav .nav-label { font-size: 12px; color: var(--color-text-mute); }
.article-nav .nav-value { font-size: 15px; color: var(--color-text); }
.article-nav a:hover .nav-value { color: var(--color-primary); }
.article-nav .nav-next { text-align: right; }
.article-nav .nav-empty { padding: 12px 16px; color: var(--color-text-mute); background: #fafbfd; border-radius: var(--radius); text-align: center; font-size: 14px; }

.action-bar {
    position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
    margin: 0 -30px; padding: 12px 30px; background: rgba(255, 255, 255, .96); border-top: 1px solid var(--color-border);
    backdrop-filter: blur(4px);
}
@media (max-width: 767px) { .action-bar { margin: 0 -16px; padding: 10px 16px; } }
.action-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 18px; border: 1px solid var(--color-border); border-radius: 20px; background: #fff; color: var(--color-text-sub); font-size: 14px; transition: all .2s; }
.action-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.action-btn.liked { border-color: var(--color-danger); color: var(--color-danger); background: #fff5f5; }
.action-btn.active { border-color: #f6a623; color: #f6a623; }
.action-bar .view-total { margin-left: auto; font-size: 13px; color: var(--color-text-mute); }

/* ---------------------------------------------------------------- 评论区 */
.comments-box { margin-top: 22px; padding: 22px 30px 26px; }
@media (max-width: 767px) { .comments-box { padding: 16px; } }
.comments-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.comments-head h3 { margin: 0; font-size: 18px; font-weight: 700; }
.comments-head .count { color: var(--color-primary); }

.notice { padding: 14px 18px; border-radius: var(--radius); background: #f6f8fc; color: var(--color-text-sub); font-size: 14px; }
.notice.muted { text-align: center; padding: 30px 18px; color: var(--color-text-mute); }

.comment-form { margin-bottom: 22px; padding: 16px; background: #fafbfd; border: 1px solid var(--color-border); border-radius: var(--radius); }
.reply-tip { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 6px 10px; background: var(--color-primary-light); border-radius: 6px; font-size: 13px; color: var(--color-primary-dark); }
.reply-tip button { margin-left: auto; padding: 2px 10px; border: 0; border-radius: 12px; background: #fff; color: var(--color-text-sub); font-size: 12px; }
.form-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 12px; }
.form-field label { display: block; margin-bottom: 5px; font-size: 13px; color: var(--color-text-sub); }
.form-field .req { color: var(--color-danger); }
.form-field input, .form-field textarea {
    width: 100%; padding: 8px 12px; background: #fff;
    border: 1px solid var(--color-border); border-radius: 8px; outline: none; transition: all .2s;
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(44, 95, 208, .12); }
.form-field textarea { min-height: 100px; resize: vertical; line-height: 1.7; }
.form-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.char-count { font-size: 12px; color: var(--color-text-mute); margin-left: auto; }
.char-count.over { color: var(--color-danger); }
.captcha-row { display: flex; align-items: center; gap: 10px; }
.captcha-row input { width: 130px; }
.captcha-img { height: 38px; width: 112px; border: 1px solid var(--color-border); border-radius: 6px; background: #fff; cursor: pointer; object-fit: cover; }
.btn-primary { padding: 9px 26px; border: 0; border-radius: 20px; background: var(--color-primary); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.comment-list { margin: 0; padding: 0; list-style: none; }
.comment-item { padding: 16px 0; border-bottom: 1px solid var(--color-border); }
.comment-item:last-child { border-bottom: 0; }
.comment-main { display: flex; gap: 12px; }
.c-avatar { flex: none; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; font-size: 16px; font-weight: 600; }
.c-content-wrap { flex: 1; min-width: 0; }
.c-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--color-text-mute); }
.c-name { font-size: 14px; font-weight: 600; color: var(--color-text); }
.c-admin { padding: 0 6px; border-radius: 4px; background: var(--color-primary-light); color: var(--color-primary); }
.c-text { margin: 6px 0 8px; font-size: 14.5px; color: #2b3038; word-break: break-word; }
.c-actions { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--color-text-mute); }
.c-actions button { padding: 0; border: 0; background: none; color: var(--color-text-mute); font-size: 12px; }
.c-actions button:hover { color: var(--color-primary); }
.c-children { margin: 10px 0 0; padding: 10px 14px; background: #fafbfd; border-radius: 8px; }
.c-children .c-child { padding: 8px 0; border-bottom: 1px dashed var(--color-border); font-size: 13.5px; }
.c-children .c-child:last-child { border-bottom: 0; }
.c-children .c-reply-to { color: var(--color-primary); }
.c-toggle { margin-top: 8px; padding: 0; border: 0; background: none; color: var(--color-primary); font-size: 13px; }
.load-more { display: block; width: 100%; margin-top: 16px; padding: 9px; border: 1px dashed var(--color-border); border-radius: 8px; background: #fff; color: var(--color-text-sub); font-size: 14px; }
.load-more:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* ---------------------------------------------------------------- 加载态 */
.skeleton { padding: 40px; text-align: center; color: var(--color-text-mute); }
.loading-text { display: flex; align-items: center; justify-content: center; gap: 8px; }

/* ---------------------------------------------------------------- 移动端导航 */
@media (max-width: 991px) {
    .main-nav, .header-search { display: none; }
    .nav-toggle { display: block; margin-left: auto; }
    .nav-drawer.show { display: block; position: absolute; left: 0; right: 0; top: var(--header-h); max-height: 70vh; overflow: auto; margin: 0; padding: 10px 16px 18px; list-style: none; background: #fff; border-bottom: 1px solid var(--color-border); box-shadow: var(--shadow); }
    .nav-drawer .nav-link { display: block; padding: 10px 0; border-bottom: 1px solid var(--color-border); color: var(--color-text-sub); }
    .nav-drawer .sub-nav { display: none; position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 14px; background: transparent; }
    .nav-drawer .nav-item.open .sub-nav { display: block; }
    .nav-drawer .header-search { display: block; max-width: none; margin: 12px 0; }
}

/* 页脚与通用小屏微调 */
@media (max-width: 767px) {
    .page-body { padding-top: 16px; }
    .banner-inner { padding: 24px 20px; min-height: 170px; }
    .banner-title { font-size: 21px; }
    .layout, .article-layout { gap: 16px; }
    .article-body { font-size: 16px; }
}
