/* ============================================================
   市场监管法律法规检索系统 · 全站样式
   配色参考：政务红 #b01f24 / 深红 #8c171b / 链接蓝 #1f5fbf
   ============================================================ */
:root {
    --red: #b01f24;
    --red-dark: #8c171b;
    --red-light: #fdf3f3;
    --blue: #1f5fbf;
    --blue-light: #eef4fd;
    --ink: #222;
    --ink-2: #555;
    --ink-3: #888;
    --line: #e4e7ec;
    --bg: #f5f6f8;
    --card: #fff;
    --green: #1d7a3e;
    --green-bg: #e8f5ec;
    --orange: #b06a00;
    --orange-bg: #fdf3e2;
    --gray-bg: #f0f1f3;
    --purple: #6b3fa0;
    --purple-bg: #f3eefb;
    --danger: #c0392b;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 4px 16px rgba(0, 0, 0, .05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.7;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; color: var(--ink); }
ul, ol { list-style: none; }
img { max-width: 100%; }
code { background: var(--gray-bg); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.page-main { min-height: 60vh; padding-bottom: 32px; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.mono { font-family: Consolas, "Courier New", monospace; }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mt20 { margin-top: 20px; } .mt24 { margin-top: 24px; }
.text-red { color: var(--red); }
.text-danger { color: var(--danger); }
.hidden { display: none !important; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 44px; padding: 8px 22px; border-radius: 8px; border: 1px solid transparent;
    font-size: 15px; line-height: 1.2; background: var(--red); color: #fff;
    transition: background .15s, opacity .15s, border-color .15s;
}
.btn:hover { background: var(--red-dark); color: #fff; }
.btn.secondary { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn.secondary:hover { background: var(--bg); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--red); border-color: var(--red); }
.btn.ghost:hover { background: var(--red-light); }
.btn.danger { background: #fff; color: var(--danger); border-color: #e6b8b3; }
.btn.danger:hover { background: #fdf0ee; }
.btn.sm { min-height: 36px; padding: 4px 14px; font-size: 13px; border-radius: 6px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: none; color: var(--blue); font-size: 13.5px; padding: 4px 6px; min-height: 30px; white-space: nowrap; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--danger); }
.link-btn.block { display: block; width: 100%; text-align: center; }
.code404 { font-size: 48px; font-weight: 700; color: var(--line); letter-spacing: 4px; line-height: 1.2; margin-bottom: 6px; }

/* ---------- 头部 ---------- */
.site-header { background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%); color: #fff; }
.site-header .top { display: flex; align-items: center; gap: 14px; padding: 14px 16px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; }
.logo:hover { color: #fff; }
.logo .emblem {
    width: 42px; height: 42px; border-radius: 50%; background: #fff; color: var(--red);
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 19px; flex: 0 0 auto;
}
.logo > span:last-child { display: flex; flex-direction: column; justify-content: center; }
.logo .name { display: block; font-size: 23px; font-weight: 700; letter-spacing: 1px; line-height: 1.05; }
.logo .sub { display: block; font-size: 10.5px; opacity: .85; letter-spacing: 2px; line-height: 1.1; margin-top: 2px; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.header-actions .btn { min-height: 38px; padding: 5px 16px; font-size: 14px; }
.header-actions .welcome { color: #fff; opacity: .92; }
.header-actions .btn.on-red { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .5); color: #fff; }
.header-actions .btn.on-red:hover { background: rgba(255, 255, 255, .3); color: #fff; }
.site-nav { background: rgba(0, 0, 0, .18); }
.site-nav .wrap { display: flex; gap: 4px; overflow-x: auto; padding: 0 16px; }
.site-nav .nav-item {
    color: #fff; opacity: .85; padding: 11px 16px; font-size: 15px; white-space: nowrap;
    border-bottom: 3px solid transparent; min-height: 44px; display: inline-flex; align-items: center;
}
.site-nav .nav-item:hover { opacity: 1; background: rgba(255, 255, 255, .08); color: #fff; }
.site-nav .nav-item.active { opacity: 1; font-weight: 700; border-bottom-color: #ffd9a0; }

/* ---------- 页脚 ---------- */
.site-footer { background: #2b2f36; color: #c8cdd4; margin-top: 40px; padding: 32px 0 24px; font-size: 14px; }
.site-footer .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 48px; }
/* 有公众号二维码时多出一列，靠右对齐 */
.site-footer .cols.has-qr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
.footer-qr { justify-self: end; align-self: start; }
.footer-qr img { display: block; width: 140px; height: 140px; padding: 7px; box-sizing: border-box; object-fit: contain; background: #fff; border-radius: 8px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 10px; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: #c8cdd4; }
.site-footer a:hover { color: #fff; }
.site-footer .bottom { border-top: 1px solid #3d424a; margin-top: 24px; padding-top: 16px; text-align: center; color: #8b919b; font-size: 12px; }

/* ---------- 提示 / 表单 ---------- */
.flash-stack { padding-top: 14px; }
.alert { border-radius: 8px; padding: 10px 16px; font-size: 14px; margin-bottom: 10px; border: 1px solid transparent; }
.alert-success { background: var(--green-bg); color: var(--green); border-color: #c7e6d1; }
.alert-error { background: #fdecea; color: var(--danger); border-color: #f3cfca; }
.alert-info { background: var(--blue-light); color: var(--blue); border-color: #d3e2f8; }
.alert-warn { background: var(--orange-bg); color: var(--orange); border-color: #f3e0bd; }

.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 6px; font-weight: 600; }
.form-row label .req { color: var(--red); }
.form-row input[type=text], .form-row input[type=password], .form-row input[type=email],
.form-row input[type=number], .form-row input[type=datetime-local], .form-row input[type=file],
.form-row select, .form-row textarea {
    width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 8px;
    padding: 8px 12px; background: #fff; color: var(--ink); font-size: 15px;
}
.form-row textarea { min-height: 90px; resize: vertical; line-height: 1.7; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
    outline: 2px solid rgba(31, 95, 191, .22); border-color: var(--blue);
}
.form-row input:disabled { background: var(--gray-bg); color: var(--ink-3); }
.form-tip { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; line-height: 1.6; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.form-row-action { display: flex; align-items: flex-end; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.checkbox-line { display: flex !important; align-items: center; gap: 8px; font-weight: 400 !important; min-height: 44px; font-size: 14px; color: var(--ink-2); }
.checkbox-line input { width: auto; min-height: auto; }
.inline-form-btn { display: inline; }
.radio-row { display: flex; flex-direction: column; gap: 8px; }

/* 多分类选择器（后台文档表单）：按顶级分类分组、可滚动 */
.cat-picker {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px 14px; padding: 12px; max-height: 320px; overflow-y: auto;
    border: 1px solid var(--line); border-radius: 6px; background: #fff;
}
.cat-group { border-left: 2px solid var(--line); padding-left: 8px; }
.cat-group-title { font-size: 12.5px; color: var(--ink-3); font-weight: 600; margin-bottom: 2px; }
.cat-opt {
    display: flex !important; align-items: center; gap: 6px;
    font-weight: 400 !important; font-size: 13.5px; color: var(--ink-2);
    padding: 3px 4px; margin: 0 !important; border-radius: 4px; cursor: pointer; line-height: 1.5;
}
.cat-opt:hover { background: var(--gray-bg, #f5f5f5); }
.cat-opt input[type=checkbox] { width: auto; min-height: auto; margin: 0; flex: 0 0 auto; }
.cat-opt.lv1 { padding-left: 12px; }
.cat-opt.lv2 { padding-left: 24px; }
.cat-opt.lv3 { padding-left: 36px; }
.cat-opt .cat-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-opt .cat-flag {
    flex: 0 0 auto; font-size: 11px; line-height: 1; padding: 2px 4px; border-radius: 3px;
    background: var(--red); color: #fff;
}
.radio-item { display: flex !important; align-items: center; gap: 8px; font-weight: 400 !important; font-size: 14px; color: var(--ink-2); }

/* 后台弹窗（批量改分类等） */
.wb-dialog {
    /* 站点有 * { margin:0 } 重置，会把原生 dialog 的居中 margin:auto 清掉，这里显式写回 */
    position: fixed; inset: 0; margin: auto; padding: 0; overflow: auto;
    width: min(880px, 94vw); max-height: 90vh;
    border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
    box-shadow: 0 18px 48px rgba(17, 24, 39, .18);
}
.wb-dialog::backdrop { background: rgba(17, 24, 39, .45); }
.wb-dialog form { padding: 18px 20px 16px; }
.wb-dialog h4 { margin: 0 0 12px; font-size: 16px; color: var(--ink); }
.wb-dialog .cat-picker { max-height: 38vh; }
.wb-dialog .form-tip { margin: 10px 0 0; }
.batch-mode { display: grid; gap: 6px; margin-bottom: 12px; }
.mode-opt {
    display: flex !important; align-items: flex-start; gap: 7px; margin: 0 !important;
    font-weight: 400 !important; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; cursor: pointer;
}
.mode-opt input[type=radio] { width: auto; min-height: auto; margin: 3px 0 0; flex: 0 0 auto; }
.mode-opt b { color: var(--ink); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* ---------- 首页 ---------- */
.hero { background: linear-gradient(180deg, var(--red-light), var(--bg)); padding: 34px 0 26px; }
.hero h1 { text-align: center; font-size: 27px; color: var(--red-dark); letter-spacing: 2px; }
.hero p.tagline { text-align: center; color: var(--ink-2); margin-top: 6px; }
.hero-meta { text-align: center; color: var(--ink-3); font-size: 13px; margin-top: 14px; }
.hero-meta strong { color: var(--red); font-size: 15px; }
.search-box { display: flex; gap: 10px; max-width: 760px; margin: 20px auto 0; flex-wrap: wrap; justify-content: center; }
.search-box input[type=text] {
    flex: 1 1 360px; min-height: 52px; border: 2px solid var(--red); border-radius: 8px;
    padding: 0 16px; font-size: 16px; background: #fff;
}
.search-box input[type=text]:focus { outline: 3px solid rgba(176, 31, 36, .14); }
.search-box .btn { min-height: 52px; padding: 0 32px; font-size: 16px; flex: 0 0 auto; }
.search-box .mode-switch { flex: 1 0 100%; display: flex; justify-content: center; gap: 18px; font-size: 14px; color: var(--ink-2); margin-top: 2px; }
.mode-switch label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; min-height: 32px; }
.search-box.compact { margin: 14px 0 0; justify-content: flex-start; max-width: none; }
.search-box.compact input[type=text] { min-height: 46px; flex: 1 1 320px; }
.search-box.compact .btn { min-height: 46px; padding: 0 26px; font-size: 15px; }
.inline-select { min-height: 46px; border: 2px solid var(--red); border-radius: 8px; padding: 0 10px; background: #fff; }

.home-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; margin-top: 26px; align-items: start; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.panel h3 { font-size: 17px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.panel h3::before { content: ""; width: 4px; height: 18px; background: var(--red); border-radius: 2px; }
.hot-list { display: block; }
.hot-item { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); align-items: baseline; }
.hot-item:last-child { border-bottom: none; }
.hot-item .rank {
    flex: 0 0 22px; height: 22px; border-radius: 4px; background: var(--gray-bg); color: var(--ink-3);
    font-size: 12px; display: flex; align-items: center; justify-content: center; align-self: center;
}
.hot-item .rank.top { background: var(--red); color: #fff; }
.hot-item a { flex: 1; color: var(--ink); font-size: 14px; line-height: 1.5; }
.hot-item a:hover { color: var(--red); }

.cat-nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.cat-card {
    display: flex; align-items: center; gap: 8px;
    background: #fbfbfc; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
    transition: border-color .15s, background .15s;
}
.cat-card:hover { border-color: var(--red); background: #fff7f7; }
.cat-title { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14.5px; font-weight: 700; color: var(--red-dark); min-width: 0; flex: 1 1 auto; }
.cat-title .ct-name-clip { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-title .cat-count { flex: 0 0 auto; }
.cat-title:hover { color: var(--red); }
.cat-count { background: var(--red-light); color: var(--red); font-size: 12px; font-weight: 600; border-radius: 10px; padding: 1px 8px; }
.cat-card .subs { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.sub-link {
    font-size: 13px; color: var(--ink-2); background: #fff; border: 1px solid var(--line);
    border-radius: 20px; padding: 3px 12px; min-height: 28px; display: inline-flex; align-items: center;
}
.sub-link:hover { color: var(--red); border-color: var(--red); }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud {
    max-height: 320px; overflow-y: auto; padding: 10px; border: 1px solid var(--line);
    border-radius: 10px; background: #fff; align-content: flex-start;
}
.tag-filter-input {
    width: 100%; margin-bottom: 8px; padding: 7px 12px; border: 1px solid var(--line);
    border-radius: 8px; font-size: 13px; color: var(--ink-1); background: #fff;
}
.tag-filter-input:focus { outline: none; border-color: var(--red); }
.chip {
    border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 4px 12px;
    font-size: 13px; color: var(--ink-2); min-height: 32px; display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { border-color: var(--red); color: var(--red); }
.chip.active { background: var(--red); border-color: var(--red); color: #fff; }
.chip-num { color: var(--ink-3); font-size: 12px; }
.chip.active .chip-num { color: #fff; opacity: .85; }

/* ---------- 标签 / 徽标 ---------- */
.tag { display: inline-flex; align-items: center; background: var(--blue-light); color: var(--blue); border-radius: 4px; padding: 2px 9px; font-size: 12px; min-height: 24px; }
.tag:hover { background: #dfeafb; }
.badge { display: inline-flex; align-items: center; border-radius: 4px; padding: 2px 9px; font-size: 12px; white-space: nowrap; }
.badge.st1 { background: var(--orange-bg); color: var(--orange); }
.badge.st2 { background: var(--green-bg); color: var(--green); }
.badge.st3 { background: var(--gray-bg); color: var(--ink-3); }
.badge.st4 { background: var(--purple-bg); color: var(--purple); }
.badge.au0 { background: var(--orange-bg); color: var(--orange); }
.badge.au1 { background: var(--green-bg); color: var(--green); }
.badge.au2 { background: #fdecea; color: var(--danger); }
.badge.au3 { background: var(--gray-bg); color: var(--ink-3); }
.badge.file { background: var(--blue-light); color: var(--blue); text-transform: uppercase; }

/* ---------- 检索页 ---------- */
.page-head { background: var(--card); border-bottom: 1px solid var(--line); padding: 18px 0 16px; }
.page-head h2 { font-size: 21px; }
.search-layout { display: grid; grid-template-columns: 252px 1fr; gap: 20px; margin-top: 20px; align-items: start; }
.filter-panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
/* 移动端侧栏折叠按钮：桌面隐藏 */
.side-toggle { display: none; }
.side-toggle .st-act { color: var(--red); font-weight: 600; }
.filter-panel h4 { font-size: 13.5px; color: var(--ink-3); margin: 14px 0 8px; font-weight: 600; }
.filter-panel h4:first-child { margin-top: 0; }
.filter-panel select { width: 100%; min-height: 40px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; background: #fff; color: var(--ink); font-size: 14px; }
.result-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; color: var(--ink-3); font-size: 14px; }
.doc-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 14px; }
.doc-card h3 { font-size: 17px; line-height: 1.5; }
.doc-card h3 .h3-badge { font-size: 11px; padding: 1px 7px; margin-left: 8px; vertical-align: 2px; }
.doc-card h3 a { color: var(--ink); font-weight: 600; }
.doc-card h3 a:hover { color: var(--red); }
.doc-card .meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13px; color: var(--ink-3); align-items: center; }
.doc-card .excerpt { margin-top: 8px; color: var(--ink-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.doc-card .excerpt mark { background: #ffe9b8; color: inherit; padding: 0 1px; }
.doc-card .tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.article-card .excerpt { -webkit-line-clamp: 3; }
.empty { background: var(--card); border-radius: var(--radius); padding: 48px 20px; text-align: center; color: var(--ink-3); box-shadow: var(--shadow); }
.empty .big { font-size: 40px; margin-bottom: 10px; }

/* ---------- 分页 ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; align-items: center; margin: 22px 0; flex-wrap: wrap; }
.page-btn { min-width: 38px; min-height: 38px; border: 1px solid var(--line); background: #fff; border-radius: 6px; font-size: 14px; color: var(--ink-2); padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; }
.page-btn:hover { border-color: var(--red); color: var(--red); }
.page-btn.cur { background: var(--red); border-color: var(--red); color: #fff; }
.page-btn.disabled { opacity: .4; pointer-events: none; }
.page-gap { color: var(--ink-3); padding: 0 2px; }
.page-info { color: var(--ink-3); font-size: 13px; margin-left: 8px; }

/* ---------- 详情页 ---------- */
.doc-page { max-width: 980px; margin: 0 auto; }
.breadcrumb { font-size: 13px; color: var(--ink-3); padding: 14px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.doc-main { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 32px; margin-top: 12px; }
.doc-title { font-size: 25px; text-align: center; line-height: 1.5; color: #1c1c1c; }
.doc-meta { text-align: center; color: var(--ink-3); font-size: 13px; margin-top: 12px; display: flex; gap: 8px 18px; justify-content: center; flex-wrap: wrap; align-items: center; }
.doc-tags { text-align: center; margin-top: 10px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.doc-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; align-items: center; }
.reader { margin-top: 22px; border: 1px solid var(--line); border-radius: 8px; background: #fafaf7; overflow: hidden; }
.reader-bar { background: #eceae4; border-bottom: 1px solid #ddd9d0; padding: 8px 16px; font-size: 12px; color: #7a7466; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 18px; border-radius: 8px 8px 0 0; }
.reader .reader-bar { margin-top: 0; }
.pdf-frame { border: 1px solid var(--line); border-top: none; border-radius: 0 0 8px 8px; background: #f0f1f3; overflow: hidden; }
.pdf-frame iframe { width: 100%; height: 680px; border: none; display: block; }
/* 基准字号与后台编辑器（TinyMCE 正文 16pt 三号仿宋）保持一致：
   docx 解析出的正文逐 run 带 font-size，缺字号的片段（旧数据、编辑器重写后）
   会继承这里的基准值。以前是 15px，和后台 16pt 差了 42%，同一篇里
   “有字号 / 没字号”的段落就会一大一小，看起来像字体字号不统一。 */
.paper { padding: 36px 40px; min-height: 320px; background: #fffdf8; margin: 18px; border: 1px solid #e8e4d8; box-shadow: 0 1px 6px rgba(0, 0, 0, .08); font-size: 16pt; line-height: 1.75; color: #2c2c2c; }
.paper h1 { text-align: center; font-size: 21px; margin-bottom: 20px; line-height: 1.6; }
.paper h3 { font-size: 16.5px; margin: 22px 0 10px; text-align: center; color: #333; }
/* 缩进策略：原文 HTML 自带 text-indent 时（indent-src）完全以原文为准，
   全站默认的 2em 只在原文没有任何缩进信息时兜底（indent-auto）。
   否则公文里本该顶格的「主送机关」「发文机关署名」等会被凭空缩进两个字的空白。 */
.paper p { margin-bottom: 10px; }
.paper.indent-auto p { text-indent: 2em; }
.paper p.art { text-indent: 0; font-weight: 600; }
.paper p.law-note { text-indent: 0; background: var(--orange-bg); color: var(--orange); font-size: 13px; padding: 8px 12px; border-radius: 6px; margin-bottom: 16px; line-height: 1.7; }
.paper ul, .paper ol { list-style: disc; padding-left: 2em; margin-bottom: 10px; }
.paper img, .paper .docx-img img { max-width: 100%; height: auto; }
/* 正文内的超链接：统一蓝色下划线（Word 解析出的黑色字色 / 下划线样式不能覆盖） */
.paper a,
.paper a span,
.paper a strong,
.reader .paper a *,
.article-content a,
.article-content a span,
.article-content a strong { color: var(--blue) !important; text-decoration: underline; text-underline-offset: 2px; }
.paper a:hover,
.paper a:hover span,
.article-content a:hover,
.article-content a:hover span { color: #14498f !important; }
.paper a img { border: none; }
.docx-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.docx-table td { border: 1px solid var(--line); padding: 6px 10px; }
.content-mask { position: relative; }
.content-mask.locked .paper { filter: blur(4px); user-select: none; pointer-events: none; }
.lock-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(255, 253, 248, .78); text-align: center; padding: 20px; }
.lock-overlay .ic { font-size: 36px; }
.lock-actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; justify-content: center; }
.info-table { width: 100%; border-collapse: collapse; margin-top: 22px; font-size: 14px; }
.info-table td { border: 1px solid var(--line); padding: 9px 14px; }
.info-table td.k { background: var(--bg); color: var(--ink-2); width: 110px; white-space: nowrap; }
.audit-history { margin-top: 20px; }
.audit-history h3 { font-size: 15px; margin-bottom: 8px; }
.audit-history li { font-size: 13.5px; color: var(--ink-2); padding: 6px 0; border-bottom: 1px dashed var(--line); }
.related-panel { margin-top: 16px; }

/* ---------- 文章 ---------- */
.article-body h1 { font-size: 24px; text-align: center; line-height: 1.5; }
.article-summary { background: var(--bg); border-left: 3px solid var(--red); padding: 10px 14px; color: var(--ink-2); font-size: 14px; margin-top: 18px; border-radius: 0 6px 6px 0; }
.article-content { margin-top: 20px; line-height: 2; font-size: 15.5px; }
.article-content p { margin-bottom: 12px; }
.article-content.indent-auto p { text-indent: 2em; }
.article-content h2, .article-content h3 { margin: 18px 0 8px; text-indent: 0; }
.article-content ul, .article-content ol { list-style: disc; padding-left: 2em; margin-bottom: 12px; }
.tree-nav li { margin-bottom: 4px; }
.tree-nav a { display: block; padding: 5px 10px; border-radius: 6px; font-size: 14px; color: var(--ink-2); }
.tree-nav a:hover { background: var(--bg); color: var(--red); }
.tree-nav a.active { background: var(--red-light); color: var(--red); font-weight: 600; }
.tree-nav ul { margin-left: 14px; }

/* ---------- 认证 / 用户中心 ---------- */
.auth-wrap { max-width: 440px; margin: 40px auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; }
.auth-wrap h2 { text-align: center; font-size: 21px; margin-bottom: 6px; }
.auth-wrap .sub { text-align: center; color: var(--ink-3); font-size: 13px; margin-bottom: 20px; }
.auth-switch { text-align: center; margin-top: 16px; font-size: 14px; color: var(--ink-3); }
/* 登录验证码 */
.captcha-row { display: flex; align-items: center; gap: 10px; }
.captcha-row input { flex: 1; min-width: 0; }
.captcha-img { border: 1px solid var(--line); border-radius: 8px; cursor: pointer; flex: none; }
.captcha-q { flex: none; background: var(--gray-bg, #f2f3f5); border-radius: 8px; padding: 9px 12px; font-size: 15px; font-weight: 700; color: var(--ink-1, #222); letter-spacing: 1px; white-space: nowrap; }
.captcha-hint { margin: 4px 0 0; font-size: 12px; color: var(--ink-3); }
.demo-accounts { background: var(--blue-light); border-radius: 8px; padding: 10px 14px; font-size: 13px; color: var(--ink-2); margin-bottom: 18px; line-height: 1.7; }
.uc-layout { display: grid; grid-template-columns: 210px 1fr; gap: 20px; margin-top: 24px; align-items: start; }
/* 网格子项默认 min-width:auto，会被内部 900px 宽表格撑破视口，必须置 0 */
.uc-layout > * { min-width: 0; }
.uc-side { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; }
.uc-side .who { padding: 10px 12px 14px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.uc-side .who .av { width: 44px; height: 44px; border-radius: 50%; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 700; }
.uc-side .who .nm { font-weight: 700; margin-top: 8px; }
.uc-side .nav-i { display: flex; width: 100%; text-align: left; padding: 10px 12px; font-size: 14px; color: var(--ink-2); border-radius: 8px; min-height: 44px; align-items: center; gap: 8px; }
.uc-side .nav-i:hover { background: var(--bg); color: var(--red); }
.uc-side .nav-i.active { background: var(--red-light); color: var(--red); font-weight: 600; }
.uc-main { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.uc-main h3 { font-size: 17px; margin-bottom: 16px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat-card .n { font-size: 26px; font-weight: 700; color: var(--red-dark); line-height: 1.3; }
.stat-card .l { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.stat-card.blue .n { color: var(--blue); }
.stat-card.green .n { color: var(--green); }
.stat-card.orange .n { color: var(--orange); }
.fav-cats { margin-bottom: 18px; }
.fav-cats h4 { font-size: 14px; color: var(--ink-2); margin-bottom: 8px; }
.fav-group { margin-bottom: 18px; }
.fav-group-title { font-size: 14px; border-left: 3px solid var(--red); padding-left: 8px; margin-bottom: 8px; }
.fav-list li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }

/* ---------- 上传 ---------- */
.upload-wrap { max-width: 860px; margin: 26px auto; }
.upload-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
/* 上传成功后停留本页的提示条（不跳转个人中心） */
.upload-done { display: flex; align-items: flex-start; gap: 12px; margin: 14px 0 4px; padding: 13px 16px; border: 1px solid #cbe3c2; border-left: 4px solid var(--green); border-radius: 8px; background: var(--green-bg); color: #1e5230; }
.upload-done[hidden] { display: none; }
.upload-done strong { display: block; margin-bottom: 5px; font-size: 15px; }
.upload-done p { margin: 0; font-size: 14px; line-height: 1.7; }
.upload-done p.small { font-size: 13px; color: #476b52; margin-top: 4px; }
.upload-done a { color: var(--red); text-decoration: underline; }
.upload-done-close { flex: none; margin-left: auto; padding: 0 4px; border: 0; background: transparent; font-size: 20px; line-height: 1; color: #6b8f72; cursor: pointer; }
.upload-done-close:hover { color: #1e5230; }
.file-drop { border: 2px dashed var(--line); border-radius: var(--radius); background: #fcfcfd; padding: 26px; text-align: center; color: var(--ink-3); cursor: pointer; transition: border-color .15s, background .15s; }
.file-drop:hover { border-color: var(--red); background: var(--red-light); }
.file-drop .ic { font-size: 34px; margin-bottom: 6px; }
.file-drop.has-file { border-color: var(--green); border-style: solid; color: var(--green); background: var(--green-bg); }
.tag-input-wrap { display: flex; flex-wrap: wrap; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fff; min-height: 44px; align-items: center; }
.tag-input-wrap input { flex: 1; min-width: 140px; border: none; outline: none; min-height: 30px; font-size: 14px; padding: 0 4px; }
/* 标签建议：横版多行点选 */
.tag-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tag-suggest .tag-chip { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 4px 14px; font-size: 13px; cursor: pointer; line-height: 1.5; }
.tag-suggest .tag-chip:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }
.tag-suggest .tag-chip.active, .tag-suggest .tag-chip:disabled { opacity: .45; cursor: not-allowed; background: #f2f2f2; color: #999; }
/* 帮我选关键词 */
.tag-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.tag-toolbar .btn-sm { padding: 6px 14px; font-size: 13px; min-height: 34px; }
.tag-toolbar .btn-sm .ic { margin-right: 4px; }
.kw-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; padding: 10px 12px; border: 1px dashed var(--blue); border-radius: 8px; background: var(--blue-light); }
.kw-suggest[hidden] { display: none; }
.kw-suggest .tag-chip { border: 1px solid var(--blue); background: #fff; color: var(--blue); border-radius: 999px; padding: 4px 14px; font-size: 13px; cursor: pointer; line-height: 1.5; }
.kw-suggest .tag-chip:hover { background: var(--blue); color: #fff; }
.kw-suggest .tag-chip.active, .kw-suggest .tag-chip:disabled { opacity: .4; cursor: default; background: #f2f2f2; border-color: var(--line); color: #999; }
.kw-suggest .tag-chip.kw-all { border-style: dashed; color: var(--ink-2); border-color: var(--ink-3); }
.kw-suggest .tag-chip.kw-all:hover { background: var(--ink-2); color: #fff; border-color: var(--ink-2); }
.tag-pill { display: inline-flex; align-items: center; gap: 5px; background: var(--blue-light); color: var(--blue); border-radius: 4px; padding: 3px 8px; font-size: 13px; }
.tag-pill button { background: none; border: none; color: var(--blue); font-size: 14px; padding: 0 2px; min-height: 22px; }
/* 横排标签词表（替代原生 datalist 的竖式下拉） */
.vocab-box { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fcfcfd; }
.vocab-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.vocab-toggle { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 2px 10px; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.vocab-toggle:hover { border-color: var(--red); color: var(--red); }
.vocab-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 170px; overflow-y: auto; padding-right: 2px; }
.vocab-list[hidden] { display: none; }

/* 标签分组：常用类默认展开，其余折叠，点标题展开（不套内层滚动条，避免双层滚动） */
.vocab-groups { display: flex; flex-direction: column; gap: 6px; }
.vocab-group { border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.vocab-group[hidden] { display: none; }
.vocab-group-head {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 7px 10px; border: 0; background: #fafbfc; text-align: left;
    font-size: 13.5px; color: var(--ink); cursor: pointer;
}
.vocab-group-head:hover { background: var(--red-light); }
.vocab-group.is-open .vocab-group-head { border-bottom: 1px solid var(--line); }
.vg-arrow { flex: none; width: 12px; color: var(--ink-3); font-size: 12px; transition: transform .15s; }
.vocab-group.is-open .vg-arrow { transform: rotate(90deg); }
.vg-name { font-weight: 600; }
.vg-meta { margin-left: auto; flex: none; font-size: 12px; color: var(--ink-3); }
.vg-meta b { color: var(--ink-2); font-weight: 600; }
.vocab-group-body { display: flex; flex-wrap: wrap; gap: 6px; padding: 9px 10px; }
.vocab-group-body[hidden] { display: none; }
.tag-picked-count { margin-left: auto; flex: none; font-size: 12.5px; color: var(--ink-3); }
.tag-picked-count b { color: var(--red); font-weight: 600; }
.vocab-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 12px; font-size: 13px; line-height: 1.7; color: var(--ink-2); cursor: pointer; transition: border-color .12s, color .12s, background .12s; }
.vocab-chip:hover { border-color: var(--red); color: var(--red); background: var(--red-light); }
.vocab-chip.is-picked { border-style: dashed; border-color: #d8d8d8; background: #f4f4f4; color: #aaa; cursor: default; }
.vocab-chip[hidden] { display: none; }
.vocab-empty { margin: 8px 0 0; font-size: 13px; color: var(--ink-3); }
.vocab-empty[hidden] { display: none; }
.cascade-selects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cascade-selects select { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; background: #fff; font-size: 14px; }
.editor { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.editor .toolbar { display: flex; gap: 4px; flex-wrap: wrap; background: var(--bg); border-bottom: 1px solid var(--line); padding: 6px 8px; align-items: center; }
.editor .toolbar button { min-width: 34px; min-height: 34px; border: 1px solid transparent; background: none; border-radius: 6px; font-size: 13px; color: var(--ink-2); padding: 0 8px; }
.editor .toolbar button:hover { background: #fff; border-color: var(--line); }
.editor .editable { min-height: 240px; padding: 14px 16px; background: #fff; font-size: 15px; line-height: 1.9; overflow-y: auto; max-height: 520px; }
.editor .editable:focus { outline: none; }
.editor .editable:empty::before { content: attr(data-placeholder); color: #bbb; }
.editor .editable p { text-indent: 2em; margin-bottom: 8px; }
.editor .editable h3 { margin: 10px 0 6px; }
.editor-name { font-size: 12px; color: var(--ink-3); margin-left: auto; align-self: center; padding-right: 4px; }
.file-current { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); background: var(--bg); border-radius: 8px; padding: 10px 14px; }

/* ---------- 后台 ---------- */
.admin-body { background: #f4f5f7; }
.admin-header { background: linear-gradient(135deg, #2a3038 0%, #1d222a 100%); }
.admin-header .logo .emblem { color: #232a36; }
.admin-layout { display: grid; grid-template-columns: 216px 1fr; gap: 20px; margin-top: 22px; align-items: start; }
.admin-side { background: #232a36; border-radius: var(--radius); padding: 12px; position: sticky; top: 16px; }
.admin-side .ttl { color: #fff; font-weight: 700; padding: 10px 12px; font-size: 15px; border-bottom: 1px solid #343d4d; margin-bottom: 8px; }
.admin-side .nav-i { display: flex; width: 100%; text-align: left; color: #aeb8c6; padding: 10px 12px; font-size: 14px; border-radius: 8px; min-height: 42px; gap: 8px; align-items: center; }
.admin-side .nav-i .ic { width: 18px; display: inline-block; text-align: center; font-size: 13px; }
.admin-side .nav-i:hover { background: #2e3747; color: #fff; }
.admin-side .nav-i.active { background: var(--red); color: #fff; }
.admin-main { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; min-width: 0; transition: opacity .15s ease; }
/* AJAX 局部更新期间轻微淡出，提示「正在刷新列表」，避免整页刷新 */
.admin-main[data-swapping] { opacity: .55; }
.admin-main h3 { font-size: 18px; margin-bottom: 4px; }
.admin-main h3.mt24 { margin-top: 24px; }
.admin-main .desc { color: var(--ink-3); font-size: 13px; margin-bottom: 16px; }
.admin-quick { display: flex; gap: 10px; flex-wrap: wrap; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { background: var(--bg); text-align: left; padding: 10px 12px; font-size: 13px; color: var(--ink-2); white-space: nowrap; border-bottom: 1px solid var(--line); }
.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:hover td { background: #fafbfc; }
.data-table .ops { white-space: nowrap; }
/* 后台列表 AJAX 操作：行淡出、按钮处理中 */
.data-table tr.is-removing td { opacity: .35; transition: opacity .18s ease; background: var(--orange-bg); }
.link-btn.is-busy, .btn.is-busy { opacity: .6; cursor: default; }
.link-btn[disabled], .btn[disabled] { cursor: default; }
.data-table td.center { text-align: center; }
.table-scroll { overflow-x: auto; }
.toolbar-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar-row input, .toolbar-row select { min-height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; background: #fff; font-size: 14px; }
.toolbar-row input { flex: 1 1 200px; min-width: 160px; }
.split-2 { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
/* 网格子项默认 min-width:auto 会被宽内容（长文字、表格）撑破，统一置 0 */
.split-2 > *, .home-grid > *, .search-layout > *, .admin-layout > *, .uc-layout > * { min-width: 0; }

/* 后台分类管理：三栏联动 */
.cat-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.cat-col { display: flex; flex-direction: column; background: #fbfbfc; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cat-col-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    flex-wrap: wrap; row-gap: 2px;
    padding: 8px 10px; background: #fff; border-bottom: 1px solid var(--line);
}
.cat-col-head strong { font-size: 13px; color: var(--ink-2); min-width: 0; }
.cat-col-head .link-btn { font-size: 12.5px; white-space: nowrap; }
.cat-col-head .link-btn.accent { color: var(--red); font-weight: 600; }
.cat-col-head .link-btn.accent:hover { background: var(--red-light); }
.cat-col-list { flex: 1 1 auto; max-height: 480px; overflow-y: auto; padding: 4px; }
.cat-row { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 6px; font-size: 13px; }
.cat-row:hover { background: var(--red-light); }
.cat-row.is-active { background: var(--red); }
.cat-row.is-off { opacity: .55; }
.cr-name {
    flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    color: var(--ink); font-size: 13px;
}
.cat-row.is-active .cr-name { color: #fff; font-weight: 600; }
.cr-num {
    flex: 0 0 auto; font-size: 11.5px; color: var(--ink-3); background: var(--gray-bg);
    border-radius: 8px; padding: 0 5px; line-height: 16px; min-width: 18px; text-align: center;
}
.cat-row.is-active .cr-num { background: rgba(255, 255, 255, .24); color: #fff; }
.cat-row .inline-form-btn { flex: 0 0 auto; margin: 0; line-height: 1; }
.cat-row .inline-form-btn .link-btn { font-size: 12px; }
.cat-row.is-active .inline-form-btn .link-btn { color: #fff; opacity: .85; }
.cat-row.is-active .inline-form-btn .link-btn:hover { color: #fff; opacity: 1; }
.cat-col-empty { padding: 20px 10px; color: var(--ink-3); font-size: 12.5px; text-align: center; }
/* 三级（省份）栏：省份状态条，常驻栏头下方，三种状态都可操作 */
.cat-prov-bar {
    display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap;
    padding: 7px 10px; background: #fdf7f7; border-bottom: 1px solid var(--line);
}
.cat-prov-bar-txt { font-size: 11.5px; color: var(--ink-2); line-height: 1.5; min-width: 0; }
.cat-prov-bar-txt b { font-weight: 600; color: var(--ink); }
.cat-prov-bar form { margin-left: auto; }
.cat-prov-bar.is-done { background: #fafafa; }
.cat-prov-bar.is-done .cat-prov-bar-txt { color: var(--ink-3); }
.prov-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 26px; padding: 2px 9px; border: 1px solid var(--red); border-radius: 6px;
    background: var(--red); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.2;
    white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s;
}
.prov-btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.prov-link {
    background: none; border: none; padding: 2px 2px; min-height: 24px;
    color: var(--blue); font-size: 11.5px; white-space: nowrap; cursor: pointer;
}
.prov-link:hover { text-decoration: underline; }

.side-form { background: #fbfbfc; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.side-form h4 { font-size: 15px; margin-bottom: 12px; }
.admin-form { max-width: 980px; }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 10px 0; }
.inline-form input { min-height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; }
.timeline li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.audit-preview { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 20px; background: #fcfcfd; }
.audit-preview-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.audit-preview-head h4 { font-size: 17px; }
.audit-preview-head-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.audit-preview-body { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; max-height: 420px; overflow-y: auto; font-size: 14px; line-height: 1.9; }
.audit-preview-body p { margin-bottom: 8px; }
.audit-preview-body.indent-auto p { text-indent: 2em; }
.audit-preview-body p.law-note { text-indent: 0; background: var(--orange-bg); color: var(--orange); padding: 8px 12px; border-radius: 6px; font-size: 13px; }
.audit-preview-body a, .audit-preview-body a span { color: var(--blue) !important; text-decoration: underline; }
.audit-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.reject-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: 1 1 320px; }
.reject-form input[type=text] { flex: 1 1 200px; min-width: 180px; min-height: 38px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; font-size: 14px; }

/* ---------- 安装向导 ---------- */
.install-body { background: var(--bg); }
.install-wrap { max-width: 780px; margin: 32px auto; }
.install-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 34px; }
.install-card h2 { font-size: 21px; text-align: center; }
.install-sub { text-align: center; color: var(--ink-3); font-size: 13px; margin: 6px 0 0; }
.step-title { font-size: 16px; margin: 8px 0 14px; }
.steps { display: flex; margin: 22px 0 24px; gap: 4px; }
.steps .st { flex: 1; text-align: center; font-size: 12px; color: var(--ink-3); position: relative; padding-top: 30px; }
.steps .st .dot {
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--line);
    font-size: 12px; display: flex; align-items: center; justify-content: center; color: var(--ink-3); z-index: 2;
}
.steps .st::after { content: ""; position: absolute; top: 10px; left: calc(50% + 14px); right: calc(-50% + 14px); height: 2px; background: var(--line); }
.steps .st:last-child::after { display: none; }
.steps .st.done .dot, .steps .st.cur .dot { background: var(--red); border-color: var(--red); color: #fff; }
.steps .st.done .dot { font-size: 12px; }
.steps .st.cur { color: var(--red); font-weight: 700; }
.steps .st.done::after { background: var(--red); }
.check-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 10px; }
.check-table th { text-align: left; background: var(--bg); padding: 9px 12px; font-size: 13px; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.check-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.check-table td.ok { color: var(--green); font-weight: 600; }
.check-table td.bad { color: var(--danger); font-weight: 600; }
.install-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; align-items: center; flex-wrap: wrap; }
.install-nav.center { justify-content: center; }
.install-done { text-align: center; padding: 10px 0; }
.install-done h3 { font-size: 20px; margin: 10px 0 6px; }
.done-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--green-bg); color: var(--green); font-size: 30px; display: flex; align-items: center; justify-content: center; margin: 0 auto; }
.done-icon.lock { background: var(--orange-bg); font-size: 26px; }
.done-info { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin: 18px 0 4px; }
.done-info div { background: var(--bg); border-radius: 8px; padding: 10px 18px; font-size: 13px; color: var(--ink-3); }
.done-info strong { display: block; color: var(--ink); font-size: 15px; margin-top: 2px; }
.install-tip { text-align: center; font-size: 12.5px; color: var(--ink-3); margin-top: 14px; }
.install-footer { text-align: center; color: var(--ink-3); font-size: 12px; padding: 18px 0 26px; }
.reset-form { margin-top: 16px; }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { background: #fff; border-radius: 12px; max-width: 460px; width: 100%; padding: 28px; text-align: center; box-shadow: 0 12px 40px rgba(0, 0, 0, .2); max-height: 90vh; overflow-y: auto; }
.modal-check { width: 54px; height: 54px; border-radius: 50%; background: var(--green-bg); color: var(--green); font-size: 26px; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.modal h3 { font-size: 18px; margin-bottom: 8px; }
.modal p { color: var(--ink-2); font-size: 14px; line-height: 1.8; }
.m-ops { margin-top: 20px; display: flex; gap: 10px; justify-content: center; }
.cat-fav-form { margin: 4px 0 2px; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .home-grid, .search-layout, .uc-layout, .admin-layout, .split-2 { grid-template-columns: 1fr; }
    /* 检索页侧栏：折叠成一行，点开再看分类与筛选 */
    .filter-panel.is-folded > :not(.side-toggle) { display: none; }
    .filter-panel.is-folded { padding: 0; background: transparent; box-shadow: none; }
    .filter-panel.is-folded .side-toggle { box-shadow: var(--shadow); }
    .side-toggle {
        display: flex; align-items: center; justify-content: space-between; gap: 10px;
        width: 100%; min-height: 46px; padding: 0 14px;
        background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
        font-size: 14.5px; font-weight: 600; color: var(--ink); cursor: pointer;
    }
    .filter-panel.is-folded .side-toggle { border-color: transparent; box-shadow: none; }
    .cat-tree { max-height: 360px; }
    /* 后台表格：不再压缩列宽，改为横向滚动；单元格不换行，分类列保留换行 */
    .data-table { min-width: 900px; }
    .data-table td { white-space: nowrap; }
    .data-table td.cat-cell, .data-table td.cell-wrap,
    .data-table td.doc-title-cell { white-space: normal; }
    .data-table td.doc-title-cell { min-width: 220px; max-width: 320px; }
    .table-scroll { -webkit-overflow-scrolling: touch; }
    .admin-side { position: static; display: flex; overflow-x: auto; gap: 6px; padding: 10px; }
    .admin-side .ttl { display: none; }
    .admin-side .nav-i { white-space: nowrap; width: auto; }
    .uc-side { display: flex; overflow-x: auto; gap: 6px; align-items: center; padding: 10px; }
    .uc-side .who { border-bottom: none; margin-bottom: 0; padding: 4px 10px; flex: 0 0 auto; }
    .uc-side .who .av { display: none; }
    .uc-side .nav-i { width: auto; white-space: nowrap; }
    .site-footer .cols, .site-footer .cols.has-qr { grid-template-columns: 1fr; }
    .footer-qr { justify-self: start; }
    .doc-main, .article-body { padding: 20px 16px; }
    .paper { padding: 22px 18px; margin: 10px; }
    .cascade-selects, .form-grid-3 { grid-template-columns: 1fr; }
    .form-grid-2 { grid-template-columns: 1fr; }
    .hero h1 { font-size: 21px; }
    .search-box { flex-direction: column; align-items: stretch; }
    .search-box input[type=text] { flex: 0 0 auto; width: 100%; min-height: 52px; }
    .search-box .btn { width: 100%; }
    .search-box.compact { flex-direction: row; flex-wrap: wrap; align-items: stretch; }
    .search-box.compact input[type=text] { flex: 1 1 100%; min-height: 46px; }
    .search-box.compact .inline-select { flex: 1 1 auto; }
    .search-box.compact .btn { width: auto; flex: 1 1 auto; }
    .steps .st { font-size: 10px; padding-top: 26px; }
    .doc-title { font-size: 20px; }
    .pdf-frame iframe { height: 460px; }
    .split-2 { gap: 16px; }
    /* 文档分类三栏在窄屏改为纵向堆叠，避免每栏被压到只剩几十像素 */
    .cat-cols { grid-template-columns: 1fr; }
    .cat-col-list { max-height: 320px; }
}

@media print {
    .site-header, .site-footer, .doc-actions, .breadcrumb, .related-panel, .lock-overlay { display: none !important; }
    .doc-main { box-shadow: none; padding: 0; }
    .paper { margin: 0; border: none; box-shadow: none; }
}

/* ============================================================
   阅读权限 / 会员等级 / 阅读器 / 微信登录
   ============================================================ */
.badge.ac0 { background: var(--blue-light); color: var(--blue); }
.badge.ac1 { background: var(--orange-bg); color: var(--orange); }
.badge.ac2 { background: var(--purple-bg); color: var(--purple); }
.badge.lv1 { background: var(--gray-bg); color: var(--ink-2); }
.badge.lv2 { background: var(--green-bg); color: var(--green); }
.badge.lv3 { background: #fdf0e3; color: #b07400; }

/* 受限文件提示 */
.locked-panel { margin-top: 22px; border: 1px dashed #dcd6c8; border-radius: var(--radius); background: #fcfaf4; padding: 34px 24px; text-align: center; }
.locked-panel .lock-ic { font-size: 40px; line-height: 1; margin-bottom: 10px; }
.locked-panel h3 { font-size: 17px; margin-bottom: 8px; }
.locked-panel p { color: var(--ink-2); font-size: 14px; }
.locked-panel .lock-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }

/* 阅读器工具栏 */
.reader-label { display: flex; flex-direction: column; gap: 2px; }
.reader-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.zoom-tools, .find-tools { display: flex; align-items: center; gap: 4px; background: #fff; border: 1px solid #ddd9d0; border-radius: 6px; padding: 2px 4px; }
.tool-btn { border: none; background: none; min-height: 28px; padding: 0 8px; border-radius: 4px; font-size: 13px; color: var(--ink-2); }
.tool-btn:hover { background: var(--bg); color: var(--red); }
.zoom-val { font-size: 12px; color: var(--ink-3); min-width: 38px; text-align: center; font-variant-numeric: tabular-nums; }
.find-tools input { border: none; outline: none; font-size: 13px; min-height: 28px; padding: 0 6px; width: 168px; background: transparent; }
.find-count { font-size: 12px; color: var(--ink-3); min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; }
.reader-scroll { max-height: 780px; overflow-y: auto; background: #fafaf7; }
/* 图片类附件（GIF/JPG/PNG）直接内联展示：居中、棋盘底衬托透明图 */
.img-frame {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 20px 16px 14px; background: #f0f1f3; width: 100%;
    border: 1px solid var(--line); border-top: none; border-radius: 0 0 8px 8px;
    max-height: 780px; overflow: auto;
}
/* min-width:0 让 flex 子项可以收缩到图片固有宽度以下，否则大图会把整页撑出横向滚动条 */
.img-frame .img-open { display: block; max-width: 100%; min-width: 0; line-height: 0; cursor: zoom-in; }
.img-frame img {
    display: block; max-width: 100%; height: auto; vertical-align: top;
    background: #fff; border-radius: 4px; box-shadow: 0 2px 10px rgba(0, 0, 0, .16);
}
.img-frame .img-tip { margin: 0; text-align: center; }
.paper.no-copy { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
.reader-foot-note { background: #fbf6ee; border-top: 1px solid #ece5d6; color: var(--orange); font-size: 12px; padding: 7px 16px; }
mark.find-hit { background: #ffe58a; color: inherit; padding: 0 1px; border-radius: 2px; }
/* 当前命中的底色较深，文字用深色（白字在橙底上几乎看不清）；文档正文里的行内 span 也是深色字，视觉统一 */
mark.find-hit.current { background: #ff9632; color: #221000; box-shadow: 0 0 0 2px rgba(255, 150, 50, .35); }
.copy-toast { position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%); background: rgba(30, 30, 30, .88); color: #fff; padding: 9px 18px; border-radius: 20px; font-size: 13px; z-index: 9999; }

/* 游客试读遮罩 */
.preview-gate { position: relative; margin: -40px 18px 18px; padding: 26px 20px 22px; text-align: center; background: linear-gradient(180deg, rgba(255, 253, 248, 0) 0%, #fffdf8 32%); border: 1px solid #e8e4d8; border-top: none; border-radius: 0 0 6px 6px; }
.preview-gate-inner strong { display: block; font-size: 15px; color: var(--red-dark); margin-bottom: 4px; }
.preview-gate .lock-actions { display: flex; gap: 10px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.preview-gate .btn { min-height: 38px; font-size: 14px; }
/* 试读遮罩内的次按钮：统一为红底白字，与「登录阅读全文」一致 */
.preview-gate .btn.secondary { background: var(--red); color: #fff; border-color: var(--red); }
.preview-gate .btn.secondary:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
/* 遮罩若被放进 .paper / .article-content（正文链接是蓝色 !important），按钮文字仍必须是白色、无下划线 */
.preview-gate .btn,
.preview-gate .btn:link,
.preview-gate .btn:visited,
.preview-gate .btn:hover,
.preview-gate .btn:active,
.preview-gate .btn *,
.paper .preview-gate a.btn,
.article-content .preview-gate a.btn {
    color: #fff !important;
    text-decoration: none !important;
}

/* 上传/文档表单中的权限选项 */
.perm-group { display: flex; flex-wrap: wrap; gap: 8px; }
.perm-group label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 14px; background: #fff; cursor: pointer; }
.perm-group label:has(input:checked) { border-color: var(--red); background: var(--red-light); color: var(--red-dark); }
.checkbox-line { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); min-height: 44px; }

/* 微信登录 */
.wechat-block { margin-top: 18px; }
.auth-divider { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 12px; margin: 18px 0 14px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.btn-wechat { display: flex; width: 100%; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border-radius: 8px; border: 1px solid #d7e6d5; background: #f4fbf4; color: #1a7f37; font-size: 15px; }
.btn-wechat:hover { background: #e9f7e9; border-color: #b8ddb4; }
.btn-wechat .wx-ic { width: 22px; height: 22px; border-radius: 50%; background: #1aad19; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.wechat-tip { font-size: 12px; color: var(--ink-3); text-align: center; margin-top: 8px; line-height: 1.7; }
.wechat-panel { max-width: 460px; margin: 40px auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; text-align: center; }
.wechat-panel h2 { font-size: 20px; margin-bottom: 8px; }
.wechat-panel .qr-box { width: 180px; height: 180px; margin: 18px auto; border: 1px solid var(--line); border-radius: 10px; background: repeating-linear-gradient(45deg, #f7f7f7, #f7f7f7 8px, #fff 8px, #fff 16px); display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 13px; text-align: center; padding: 10px; }
.wechat-panel .cfg { text-align: left; background: var(--gray-bg); border-radius: 8px; padding: 12px 14px; font-size: 12.5px; color: var(--ink-2); line-height: 1.9; margin-top: 14px; }
.wechat-panel .cfg code { background: #fff; }

/* 个人中心积分 */
.points-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.points-card { border-radius: var(--radius); padding: 18px; color: #fff; background: linear-gradient(135deg, #b01f24, #8c171b); }
.points-card .n { font-size: 30px; font-weight: 700; line-height: 1.2; }
.points-card .l { font-size: 13px; opacity: .9; margin-top: 4px; }
.points-card.level { background: linear-gradient(135deg, #2f6f4e, #1d7a3e); }
.points-card.progress { background: linear-gradient(135deg, #3d4a5c, #2a3038); }
.points-card .bar { height: 6px; background: rgba(255, 255, 255, .25); border-radius: 4px; margin-top: 10px; overflow: hidden; }
.points-card .bar i { display: block; height: 100%; background: #fff; border-radius: 4px; }
.rule-list { font-size: 13px; color: var(--ink-2); line-height: 2; }
.point-log { width: 100%; border-collapse: collapse; font-size: 13px; }
.point-log th, .point-log td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.point-log th { color: var(--ink-3); font-weight: 500; background: var(--bg); }
.point-log .plus { color: var(--green); font-weight: 600; }
.point-log .minus { color: var(--danger); font-weight: 600; }

/* 后台用户角色 */
.level-legend { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 16px; font-size: 13px; }
.level-legend span { background: var(--bg); border-radius: 6px; padding: 5px 10px; color: var(--ink-2); }
/* 用户管理：导出/导入 */
.toolbar-sep { width: 1px; align-self: stretch; background: var(--line); margin: 2px 2px; }
.import-box { border: 1px dashed var(--line); border-radius: 8px; padding: 10px 14px; margin: 0 0 16px; background: #fbfbfd; }
.import-box summary { cursor: pointer; color: var(--ink-2); font-size: 13.5px; user-select: none; }
.import-box summary:hover { color: var(--red); }
.import-box[open] summary { margin-bottom: 10px; }
.import-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.import-form input[type="file"] { font-size: 13.5px; }
.import-box code { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-size: 12.5px; }
.points-form { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.points-form input[type="number"] { width: 74px; min-height: 30px; border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; font-size: 13px; }
.level-select { min-height: 30px; border: 1px solid var(--line); border-radius: 5px; font-size: 13px; padding: 0 6px; background: #fff; }

/* 审核页：权限设置 */
.audit-perm-form { border-top: 1px dashed #e2ddd0; background: #fcfaf4; padding: 14px 18px; }
.perm-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.perm-head strong { font-size: 14px; color: var(--ink); }
.perm-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.perm-label { font-size: 13px; color: var(--ink-3); min-width: 62px; }
.perm-row .perm-group label { padding: 6px 10px; font-size: 13px; }
.perm-row .checkbox-line { min-height: 30px; font-size: 13px; }
.perm-row input[disabled] + span, .perm-row label:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.perm-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.perm-note { line-height: 1.9; }

/* 通用弹窗警示态 + 上传进度 */
.modal-check.warn { background: var(--orange-bg); color: var(--orange); font-weight: 700; }
.upload-progress { display: none; margin: 16px 0 4px; }
.upload-progress.on { display: block; }
.upload-progress .bar-track { height: 8px; border-radius: 6px; background: #eee9df; overflow: hidden; }
.upload-progress .bar-fill { height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, #c9302c, #b01f24); transition: width .2s ease; }
.upload-progress .bar-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 12.5px; color: var(--ink-2); }
.upload-progress .bar-meta .pct { font-variant-numeric: tabular-nums; color: var(--red); font-weight: 600; }
.upload-progress.done .bar-fill { background: linear-gradient(90deg, #2f9e5e, #1d7a3e); }
.upload-progress.done .bar-meta .pct { color: var(--green); }
.upload-progress.fail .bar-fill { background: #c0392b; }

/* 上传页：是否有附件 + 附件列表 */
.choice-group { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
    display: inline-flex; align-items: center; gap: 6px; min-width: 78px; justify-content: center;
    padding: 7px 18px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
    font-size: 14px; color: var(--ink-2); cursor: pointer; transition: border-color .15s, background .15s, color .15s;
}
.choice input { accent-color: var(--red); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--red); background: var(--red-light); color: var(--red); font-weight: 600; }
.attach-drop { padding: 18px; }
.attach-count { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.attach-count b { color: var(--red); font-size: 15px; }
.attach-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.attach-item {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px;
    border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 13.5px;
}
.attach-item .a-ic { font-size: 14px; line-height: 1; }
.attach-item .a-ic.a-ico { font-size: 10px; line-height: 1; height: 20px; min-width: 34px; }
.attach-item .a-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.attach-item .a-title { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attach-item .a-meta { font-size: 12px; color: var(--ink-3); }
.attach-item .a-state { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.attach-item[data-status="uploading"] .a-state { color: var(--red); }
.attach-item[data-status="uploading"] { border-style: dashed; }
.attach-item[data-status="done"] .a-state { color: var(--green); }
.attach-item[data-status="done"] { border-color: #bfe0ca; background: #f7fcf9; }
.attach-item[data-status="fail"] .a-state { color: var(--danger); }
.attach-item[data-status="fail"] { border-color: #f0c8c3; background: #fdf5f4; }
.attach-item .a-del {
    background: none; border: 0; padding: 2px 4px; color: var(--ink-3); font-size: 12.5px; border-radius: 4px;
}
.attach-item .a-del:hover { color: var(--danger); background: #fdecea; }
.submit-hint { margin: 10px 0 0; text-align: right; font-size: 13px; color: var(--danger); }
#attachRow.is-blocked .attach-drop { border-color: var(--orange); background: #fffdf6; }
input.auto-filled { animation: titleFlash .9s ease; }
@keyframes titleFlash { 0% { background: #fff8dc; border-color: var(--orange); } 100% { background: #fff; } }

/* 详情页：附件区（原文下方） */
.doc-attachments {
    margin-top: 16px; padding: 14px 18px 10px; background: var(--card);
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.doc-attachments .attach-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.doc-attachments h3 { font-size: 15px; color: var(--ink); }
.doc-attachments h3 span { color: var(--ink-3); font-weight: 400; font-size: 13px; }
.doc-attachments ul { margin-top: 6px; }
.doc-attachments li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.doc-attachments li:last-child { border-bottom: 0; }
.doc-attachments .a-link { display: inline-flex; align-items: center; gap: 7px; color: var(--blue); font-size: 14px; min-width: 0; }
.doc-attachments .a-link:hover { text-decoration: underline; }
.doc-attachments .a-title-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-attachments .a-size { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.doc-attachments .a-lock { color: var(--ink-3); font-size: 14px; }
.doc-attachments .attach-foot { margin-top: 8px; font-size: 12.5px; color: var(--ink-3); }

/* 后台审核预览：附件清单 */
.audit-attachments { border-top: 1px dashed #e2ddd0; background: #fcfaf4; padding: 12px 18px; font-size: 13px; }
.audit-attachments strong { font-size: 13.5px; color: var(--ink); }
.audit-attachments ul { margin-top: 6px; }
.audit-attachments li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.audit-attachments li:last-child { border-bottom: 0; }

/* ---------- PDF 原文阅读器（pdf.js 自托管渲染） ---------- */
.pdf-viewer {
    position: relative; height: 720px; overflow: auto; padding: 16px 0 24px;
    background: #e9ebee; display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
}
.pdf-viewer.is-loading::after {
    content: 'PDF 正在加载…'; position: sticky; bottom: 12px; align-self: center;
    background: rgba(30, 30, 30, .82); color: #fff; font-size: 12.5px;
    padding: 6px 14px; border-radius: 16px;
}
/* 用 auto 外边距居中而不是 align-items:center：
   页面被放大到超过容器宽度时，auto 边距会自动归零，不会把左半边裁出可视区 */
.pdf-page {
    position: relative; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .16);
    flex: 0 0 auto;
    margin-left: auto; margin-right: auto;
}
.pdf-page canvas { display: block; }
.pdf-text-layer {
    position: absolute; inset: 0; overflow: hidden; line-height: 1;
    text-align: initial; text-size-adjust: none; transform-origin: 0 0;
    opacity: 1; z-index: 2;
}
.pdf-text-layer span, .pdf-text-layer br {
    color: transparent; position: absolute; white-space: pre;
    transform-origin: 0% 0%; cursor: text;
}
.pdf-text-layer span.markedContent { top: 0; height: 0; }
.pdf-text-layer ::selection { background: rgba(0, 100, 255, .28); }
mark.pdf-hit {
    color: transparent; background: rgba(255, 214, 0, .62);
    border-radius: 2px; padding: 0;
}
mark.pdf-hit.current { background: rgba(255, 138, 0, .85); box-shadow: 0 0 0 1.5px rgba(230, 100, 0, .6); }
.pdf-error { color: var(--danger); background: #fff; padding: 40px 24px; border-radius: 8px; font-size: 14px; }
@media (max-width: 720px) {
    .pdf-viewer { height: 62vh; min-height: 420px; padding: 10px 4px 16px; gap: 10px; }
    .pdf-page { box-shadow: 0 1px 6px rgba(0, 0, 0, .18); }
}

/* ---------- 详情页操作栏：收藏 / 点赞 / 分享 / 失效 / 错误 ---------- */
.doc-actions { flex-direction: column; gap: 8px; align-items: center; justify-content: flex-start; }
.doc-actions .action-row {
    display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start;
    align-items: center; width: 100%;
}
.act-form { display: inline-flex; margin: 0; }
.act-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 14px; font-size: 13.5px; line-height: 1.4;
    color: var(--ink-2); background: #fff; border: 1px solid var(--line);
    border-radius: 999px; cursor: pointer; transition: all .15s; white-space: nowrap;
}
.act-btn .ic { font-size: 13px; opacity: .85; }
.act-btn b { font-weight: 600; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.act-btn:hover { border-color: var(--red); color: var(--red); background: var(--red-light); }
.act-btn:hover b { color: var(--red); }
.act-btn.is-active { border-color: var(--red); color: var(--red); background: var(--red-light); font-weight: 600; }
.act-btn.is-active b { color: var(--red); }
.doc-actions .action-hint { width: 100%; text-align: left; font-size: 12.5px; color: var(--ink-3); margin: 2px 0 0; }
/* 详情页「下载 / 复制」栏内的下载链接 */
.dl-inline { margin-left: 10px; font-weight: 600; }
.dl-note { white-space: nowrap; }
@media (max-width: 640px) {
    .dl-inline { margin-left: 0; }
}
@media (max-width: 640px) {
    .act-btn { padding: 6px 11px; font-size: 13px; }
}

/* 后台：用户反馈提醒条 */
.admin-alert-bar {
    margin: 16px 0 0; padding: 12px 16px; border: 1px solid #f0c9a8;
    border-left: 4px solid var(--orange); background: #fff8ef; border-radius: 6px;
    font-size: 13.5px; color: #7a4a12;
}
.admin-alert-bar strong { display: block; margin-bottom: 6px; color: #a0490c; font-size: 13.5px; }
.admin-alert-bar ul { margin: 4px 0 6px; padding-left: 18px; }
.admin-alert-bar li { line-height: 1.9; }
.admin-alert-bar a { color: var(--blue); }
.admin-alert-bar p { margin: 0; }

/* ---------- 轻量提示条（分享复制成功等） ---------- */
.wb-toast {
    position: fixed; left: 50%; top: 50%;
    transform: translate(-50%, calc(-50% + 12px)) scale(.96);
    display: flex; align-items: center; gap: 8px;
    padding: 11px 20px; border-radius: 999px;
    background: rgba(28, 30, 34, .9); color: #fff;
    font-size: 13.5px; line-height: 1.4; letter-spacing: .2px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .24);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .24s ease, transform .24s cubic-bezier(.2, .8, .3, 1), visibility .24s;
    z-index: 9999; max-width: min(88vw, 460px);
}
.wb-toast.show { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.wb-toast .t-ic {
    display: inline-flex; align-items: center; justify-content: center;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--green); color: #fff; font-size: 11px; font-weight: 700; flex: 0 0 auto;
}
.wb-toast .t-msg { white-space: normal; word-break: break-word; text-align: left; }
.wb-toast.is-warn .t-ic { background: var(--orange); }
.wb-toast.is-error .t-ic { background: var(--danger, #c0392b); }
.wb-toast.is-info .t-ic { background: var(--blue); }
@media (max-width: 640px) {
    .wb-toast { font-size: 13px; padding: 10px 16px; }
    .wb-toast .t-msg { white-space: normal; }
}

/* ===== 上传/审核的重名比对提示 ===== */
.dup-check { margin-top: 8px; padding: 10px 14px; border: 1px solid #f0c36d; border-radius: 8px; background: #fff9ec; font-size: 13px; line-height: 1.9; }
.dup-check .dup-line strong { color: #b06f00; }
.dup-check a, .dup-links a { color: #1156d3 !important; text-decoration: underline !important; }
.dup-check .dup-tip, .dup-links .small.muted { margin-left: 6px; color: var(--muted, #8a93a3); }
.dup-check .dup-same strong { color: #c0392b; }
.dup-check .dup-same { color: #8c2f21; }

.dup-links { margin-top: 6px; padding: 6px 10px; border-left: 3px solid #f0c36d; background: #fffaf0; border-radius: 4px; font-size: 12.5px; line-height: 1.9; color: #6b5518; }
.dup-links .dup-flag { font-weight: 700; color: #b06f00; }

/* 后台标签管理：搜索行 */
.tag-search { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.tag-search input { flex: 0 0 220px; width: 220px; min-height: 38px; }

/* ---------- 检索页：条件回显 ---------- */
.chip.is-off { opacity: .42; }
.chip.is-off:hover { opacity: 1; }
.active-filters {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    padding: 10px 12px; margin-bottom: 12px; border-radius: 8px;
    background: var(--red-light); border: 1px solid #f3dcdc;
}
.af-label { font-size: 13px; color: var(--ink-3); margin-right: 2px; }
.af-chip {
    display: inline-flex; align-items: center; gap: 6px; background: #fff;
    border: 1px solid #e9c9c9; border-radius: 999px; padding: 3px 6px 3px 11px;
    font-size: 13px; color: var(--red-dark); line-height: 1.5;
}
.af-chip i { font-style: normal; width: 16px; height: 16px; border-radius: 50%; background: #f3dcdc; color: var(--red-dark); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.af-chip:hover { border-color: var(--red); }
.af-chip:hover i { background: var(--red); color: #fff; }
.af-clear { font-size: 13px; color: var(--ink-3); margin-left: auto; }
.af-clear:hover { color: var(--red); }
/* 检索页：当前条件栏里的“过滤掉地方法规”开关 */
.af-none { font-size: 13px; color: var(--ink-3); }
.af-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 11px; border-radius: 999px; font-size: 13px; line-height: 1.5;
    border: 1px dashed #d9a3a3; color: var(--red-dark); background: #fff;
}
.af-toggle::before {
    content: ""; width: 12px; height: 12px; border-radius: 3px;
    border: 1px solid #d9a3a3; background: #fff; flex: 0 0 auto;
}
.af-toggle:hover { border-style: solid; border-color: var(--red); background: #fff7f7; }
.af-toggle.is-on {
    border-style: solid; border-color: var(--red-dark);
    background: var(--red-dark); color: #fff;
}
.af-toggle.is-on::before {
    border-color: #fff; background: #fff;
    box-shadow: inset 0 0 0 2px var(--red-dark);
}
.af-toggle.is-on i {
    font-style: normal; width: 15px; height: 15px; border-radius: 50%;
    background: rgba(255, 255, 255, .25); color: #fff; font-size: 12px;
    display: inline-flex; align-items: center; justify-content: center;
}
.af-toggle.is-on:hover { background: var(--red); border-color: var(--red); color: #fff; }
.af-toggle.is-disabled {
    border-style: dotted; border-color: var(--line); color: var(--ink-3);
    background: #fafbfc; cursor: not-allowed;
}
.af-toggle.is-disabled::before { border-color: var(--line); }
.cat-fav-box { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }

/* ---------- 检索页：左侧分类树（一级 → 二级 → 省份折叠） ---------- */
.cat-tree {
    max-height: 560px; overflow-y: auto; overflow-x: hidden;
    margin: 0 -4px; padding: 2px 4px 4px;
    border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.ct-all, .ct-link, .ct-sub {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 9px; border-radius: 6px; color: var(--ink-2); font-size: 13.5px; line-height: 1.4;
}
.ct-all { font-weight: 600; color: var(--ink); }
.ct-all:hover, .ct-link:hover, .ct-sub:hover { background: var(--red-light); color: var(--red-dark); }
.ct-all.is-active, .ct-link.is-active, .ct-sub.is-active { background: var(--red); color: #fff; }
.ct-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-link.is-zero .ct-name, .ct-sub.is-zero .ct-name { color: var(--ink-3); font-weight: 400; }
.ct-sub.is-zero { opacity: .62; }
.ct-prov.is-zero { color: #b6bcc6; }
.ct-num {
    flex: 0 0 auto; font-size: 11.5px; color: var(--ink-3); background: var(--gray-bg);
    border-radius: 9px; padding: 0 6px; line-height: 17px; min-width: 20px; text-align: center;
}
.ct-all.is-active .ct-num, .ct-link.is-active .ct-num, .ct-sub.is-active .ct-num { background: rgba(255, 255, 255, .24); color: #fff; }
.ct-row { display: flex; align-items: center; }
.ct-row .ct-link { flex: 1 1 auto; min-width: 0; }
.ct-caret {
    flex: 0 0 22px; width: 22px; height: 24px; border: 0; background: transparent;
    color: var(--ink-3); font-size: 10px; cursor: pointer; border-radius: 5px;
}
.ct-caret::before { content: "▸"; display: block; transition: transform .15s; }
.ct-caret:hover { background: var(--red-light); color: var(--red-dark); }
.ct-node.is-open > .ct-row .ct-caret::before { content: "▾"; }
.ct-kids { margin: 1px 0 5px 9px; padding-left: 7px; border-left: 1px dashed var(--line); }
.ct-kids[hidden] { display: none; }
.ct-sub { font-size: 13px; padding: 5px 8px; color: var(--ink-2); }
.ct-prov-wrap { margin: 0 0 4px 6px; }
.ct-prov-toggle {
    width: 100%; text-align: left; padding: 4px 8px; border: 1px dashed var(--line);
    border-radius: 6px; background: #fafbfc; color: var(--ink-3); font-size: 12px; cursor: pointer;
}
.ct-prov-toggle:hover { border-color: var(--red); color: var(--red-dark); background: var(--red-light); }
.ct-prov-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 5px 0 3px; }
.ct-prov-list[hidden] { display: none; }
.ct-prov {
    font-size: 12px; text-align: center; padding: 3px 2px; border-radius: 4px;
    color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ct-prov:hover { background: var(--red-light); color: var(--red-dark); }
.ct-prov.is-active { background: var(--red); color: #fff; }

/* ---------- 检索页：当前条件栏的层级过滤 / 省份勾选 ---------- */
.af-toggle-row, .af-prov {
    flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    padding-top: 9px; margin-top: 2px; border-top: 1px dashed #eccfcf;
}
.af-tip { font-size: 12px; color: var(--ink-3); }
.af-prov .af-label, .af-toggle-row .af-label { margin-right: 0; }
.prov-chip { position: relative; display: inline-flex; }
.prov-chip input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.prov-chip span {
    display: inline-flex; align-items: center; justify-content: center; min-width: 54px;
    padding: 3px 10px; border-radius: 999px; border: 1px solid #e9c9c9; background: #fff;
    font-size: 13px; line-height: 1.5; color: var(--ink-2); cursor: pointer;
}
.prov-chip:hover span { border-color: var(--red); color: var(--red-dark); }
.prov-chip input:checked + span { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.prov-chip input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 1px; }

/* 检索页：无结果标签折叠 */
.tag-off { display: contents; }
.tag-off[hidden] { display: none; }
.tag-more {
    width: 100%; margin-top: 8px; padding: 6px 10px; border: 1px dashed var(--line);
    border-radius: 8px; background: #fafbfc; color: var(--ink-3); font-size: 12.5px; cursor: pointer;
}
.tag-more:hover { border-color: var(--red); color: var(--red); background: var(--red-light); }
.tag-cloud { overflow-x: hidden; }
.tag-cloud .chip { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* 上传页：词表提示 */
.tag-tip {
    display: none; margin-top: 6px; padding: 6px 10px; border-radius: 6px;
    background: #fff7e6; border: 1px solid #f5dfae; color: #8a5b00; font-size: 12.5px;
}

/* ---------- 详情页附件：查看详情按钮 ---------- */
.doc-attachments li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.doc-attachments li .a-link, .doc-attachments li .a-lock { flex: 1 1 auto; min-width: 0; }
.a-view {
    flex: 0 0 auto; padding: 3px 10px; border: 1px solid #e3c9c9; border-radius: 999px;
    font-size: 12.5px; color: var(--red-dark); background: #fff; white-space: nowrap;
}
.a-view:hover { background: var(--red-light); border-color: var(--red); }

/* ---------- 附件详情页 ---------- */
.attach-back-bar {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin: 0 0 14px; padding: 10px 14px; border-radius: 10px;
    background: #fff; border: 1px solid var(--line);
}
.attach-back-bar .attach-back { flex: 0 0 auto; }
.attach-page .doc-title { font-size: 22px; line-height: 1.5; }
.attach-foot-link { margin: 18px 0 6px; }
.attach-empty { padding: 40px 24px; text-align: center; }
.attach-empty p { margin: 0 0 12px; }
.badge-att { background: #eef6ff; color: #1f5fa8; border: 1px solid #cfe3f8; }
a.badge-att:hover { background: #dfeeff; border-color: #9fc6ee; text-decoration: none; }

/* 附件格式图标（PDF / Word / Excel / PPT 分色） */
.a-ico {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 auto; min-width: 34px; height: 20px; padding: 0 5px;
    border-radius: 4px; color: #fff; font-size: 10px; font-weight: 700;
    letter-spacing: .3px; line-height: 1; font-family: var(--font-mono, ui-monospace, monospace);
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .12);
}
.a-ico-pdf { background: #c9372c; }
.a-ico-word { background: #2b579a; }
.a-ico-excel { background: #1e7145; }
.a-ico-ppt { background: #c0501f; }
.a-ico-txt { background: #5f6b7a; }
.a-ico-zip { background: #7a5ea8; }
.a-ico-file { background: #8d8d8d; }
.a-ico.is-dim { opacity: .55; }
.a-meta-ext { display: inline-flex; align-items: center; gap: 6px; }

/* 附件详情页：上一篇 / 下一篇 */
.attach-pager-inline { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.pager-btn {
    display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px;
    border: 1px solid var(--line); background: #fff; font-size: 12.5px; color: var(--ink-2);
    white-space: nowrap;
}
a.pager-btn:hover { border-color: var(--red); color: var(--red-dark); background: var(--red-light); text-decoration: none; }
.pager-btn.is-disabled { color: #b6b0a6; border-style: dashed; background: #faf8f3; cursor: not-allowed; }

.attach-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 0; }
.pager-card {
    display: flex; flex-direction: column; gap: 4px; padding: 10px 14px;
    border: 1px solid var(--line); border-radius: 10px; background: #fff; min-width: 0;
}
.pager-card.next { text-align: right; }
a.pager-card:hover { border-color: var(--red); box-shadow: 0 2px 10px rgba(0, 0, 0, .05); text-decoration: none; }
.pager-card.is-disabled { background: #faf8f3; border-style: dashed; }
.pager-dir { font-size: 12px; color: var(--ink-3); }
.pager-name { font-size: 13.5px; color: var(--blue); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager-card.is-disabled .pager-name { color: #b6b0a6; }
@media (max-width: 640px) {
    .attach-pager { grid-template-columns: 1fr; }
    .attach-pager-inline { margin-left: 0; width: 100%; }
}

/* 后台 · 页脚公众号二维码上传 */
.qr-admin { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin: 4px 0 4px; }
.qr-admin-preview {
    width: 140px; height: 140px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 6px; background: var(--gray-bg); border: 1px dashed #cfd4dc; border-radius: 8px;
}
.qr-admin-preview img { width: 100%; height: 100%; object-fit: contain; background: #fff; border-radius: 4px; }
.qr-admin-form { min-width: 0; }
.qr-admin-form input[type=file] { display: block; font-size: 13px; margin-bottom: 10px; max-width: 100%; }

/* 后台 · 标签管理（按分类维护） */
.tm-groups { display: flex; flex-direction: column; gap: 10px; }
.tm-group { border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.tm-group[hidden] { display: none; }
.tm-head { display: flex; align-items: center; gap: 10px; padding: 7px 12px; background: #fafbfc; }
.tm-group.is-open .tm-head { border-bottom: 1px solid var(--line); }
.tm-toggle {
    flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0;
    border: 0; background: transparent; padding: 0; cursor: pointer; text-align: left;
    font: inherit; color: inherit;
}
.tm-toggle:hover .tm-name { color: var(--red); }
.tm-arrow { flex: none; width: 12px; color: var(--ink-3); font-size: 12px; transition: transform .15s; }
.tm-group.is-open .tm-arrow { transform: rotate(90deg); }
.tm-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tm-flag { flex: none; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--red-light); color: var(--red); }
.tm-meta { margin-left: auto; flex: 0 1 auto; min-width: 0; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-meta b { color: var(--ink-2); font-weight: 600; }
.tm-body { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; }
.tm-body[hidden] { display: none; }
.tm-chip {
    display: inline-flex; align-items: center; gap: 4px;
    border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 12px; background: #fff; font-size: 13px;
}
.tm-chip[hidden] { display: none; }
.tm-chip:hover { border-color: #f0c9c9; }
.tm-chip-name { color: var(--ink-2); text-decoration: none; line-height: 1.8; }
.tm-chip-name:hover { color: var(--red); }
.tm-chip-count { font-size: 11px; color: var(--ink-3); background: var(--gray-bg); border-radius: 6px; padding: 0 5px; line-height: 16px; }
.tm-chip-x {
    border: 0; background: transparent; color: var(--ink-3); cursor: pointer;
    font-size: 13px; line-height: 1; padding: 2px 4px; border-radius: 50%;
}
.tm-chip-x:hover { color: #fff; background: var(--red); }
.tm-add { display: flex; gap: 6px; width: 100%; margin-top: 2px; }
.tm-add input {
    flex: 1; min-width: 160px; min-height: 32px; border: 1px solid var(--line);
    border-radius: 8px; padding: 0 10px; font-size: 13px;
}
.tm-add .btn { flex: none; }

/* 分类选择器（一级主题 → 文件类型 → 省份） */
.cat-cascade { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cat-cascade select {
    flex: 1 1 180px; min-width: 160px; min-height: 40px; border: 1px solid var(--line);
    border-radius: 8px; padding: 0 10px; background: #fff; font-size: 14px; color: var(--ink);
}
.cat-cascade select[hidden] { display: none; }
.cat-cascade .btn { flex: none; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cat-chips:empty::after { content: '尚未选择分类'; font-size: 12.5px; color: var(--ink-3); }
.cat-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px;
    border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 13px; color: var(--ink-2);
}
.cat-chip.is-primary { border-color: #f0c9c9; background: var(--red-light); color: var(--ink); }
.cat-chip-flag {
    display: inline-block; font-size: 11px; line-height: 1; padding: 2px 4px; border-radius: 3px;
    background: var(--red); color: #fff;
}
.cat-chip-x {
    border: 0; background: transparent; color: var(--ink-3); cursor: pointer;
    font-size: 14px; line-height: 1; padding: 2px 4px; border-radius: 50%;
}
.cat-chip-x:hover { color: #fff; background: var(--red); }
.cat-cascade > .cat-chips { flex: 1 1 100%; margin-top: 2px; }
/* 文档列表的分类列：路径较长，限制宽度避免被挤成竖排 */
.data-table td.cat-cell { min-width: 150px; max-width: 240px; line-height: 1.6; word-break: break-word; }

/* ---------- 手机端细调（首页卡片两列 / 触控目标高度） ---------- */
@media (max-width: 640px) {
    .cat-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .cat-card { padding: 11px 12px; gap: 8px; }
    .cat-title { font-size: 13.5px; gap: 6px; align-items: flex-start; }
    .cat-title .ct-name-clip {
        white-space: normal; display: -webkit-box; -webkit-line-clamp: 2;
        -webkit-box-orient: vertical; line-height: 1.4;
    }
    .cat-count { padding: 1px 6px; font-size: 11.5px; }
    .af-toggle { padding: 6px 12px; }
    .prov-chip span { min-width: 50px; padding: 6px 8px; }
    .ct-prov { padding: 7px 2px; }
    .ct-link, .ct-sub { min-height: 34px; }
    .side-toggle { min-height: 44px; }
}

/* ---------- 手机端：头部居中、导航等分、个人中心排版 ---------- */
@media (max-width: 860px) {
    /* 页头：logo 居中，欢迎语与按钮各占一行并居中（窄屏、平板横屏统一） */
    .site-header .top {
        flex-direction: column; align-items: center; gap: 10px;
        padding: 14px 16px 12px;
    }
    .logo { justify-content: center; gap: 9px; }
    .logo .emblem { width: 38px; height: 38px; font-size: 17px; }
    .logo .name { font-size: 20px; letter-spacing: .5px; }
    .logo .sub { font-size: 9px; letter-spacing: 1.4px; }
    .header-actions {
        margin-left: 0; width: 100%; justify-content: center;
        gap: 8px; flex-wrap: wrap; row-gap: 8px;
    }
    .header-actions .welcome {
        width: 100%; text-align: center; font-size: 12.5px; line-height: 1.5;
        display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px;
    }
    .header-actions .btn {
        min-height: 34px; padding: 4px 14px; font-size: 13px;
        flex: 0 1 auto; white-space: nowrap;
    }
    /* 主导航：入口等分一屏，不再被截断 */
    .site-nav .wrap { gap: 0; padding: 0 6px; }
    .site-nav .nav-item {
        flex: 1 1 0; min-width: 0; justify-content: center;
        padding: 10px 2px; font-size: 13px; letter-spacing: 0;
        border-bottom-width: 2px;
    }
}

@media (max-width: 640px) {
    /* 手机端个人中心：两侧留白收窄，卡片纵向排布 */
    .uc-layout { gap: 14px; margin-top: 16px; }
    .uc-main { padding: 16px 14px; border-radius: 12px; }
    .uc-main h3 { font-size: 16px; margin-bottom: 12px; }
    .uc-main h3.mt24 { margin-top: 18px; }
    .uc-side { border-radius: 12px; }
    .uc-side .nav-i { font-size: 13px; padding: 8px 12px; }
    .points-hero { grid-template-columns: 1fr; gap: 10px; margin-bottom: 14px; }
    .points-card { padding: 14px 16px; border-radius: 10px; }
    .points-card .n { font-size: 26px; }
    .rule-list { font-size: 12.5px; line-height: 1.85; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
    .stat-card { padding: 12px 14px; }
    .stat-card .n { font-size: 22px; }
    .stat-card .l { font-size: 12px; }

    /* 积分明细：手机上改为列表行（说明为主、时间与类型为辅、右侧积分） */
    .point-log { display: block; font-size: 12px; }
    .point-log thead { display: none; }
    .point-log tbody { display: block; }
    .point-log tr {
        display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 8px;
        padding: 9px 0; border-bottom: 1px solid var(--line);
    }
    .point-log td { display: block; padding: 0; border: 0; }
    .point-log td:nth-child(3) { flex: 1 1 100%; order: 1; font-size: 12.5px; line-height: 1.55; color: var(--ink); }
    .point-log td:nth-child(1) { order: 2; font-size: 11.5px; white-space: nowrap; }
    .point-log td:nth-child(2) { order: 3; font-size: 11.5px; white-space: nowrap; }
    .point-log td:nth-child(2)::before { content: '· '; }
    .point-log td:nth-child(4) { order: 4; margin-left: auto; font-size: 12.5px; white-space: nowrap; }

    /* 上传记录表：手机上改成卡片式，免横向滚动 */
    .data-table.cards { min-width: 0; display: block; }
    .data-table.cards thead { display: none; }
    .data-table.cards tbody { display: block; }
    .data-table.cards tr {
        display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
        padding: 12px 0; border-bottom: 1px solid var(--line);
    }
    .data-table.cards tr:hover td { background: transparent; }
    .data-table.cards td {
        display: inline-flex; align-items: center; padding: 0;
        border: 0; white-space: normal;
    }
    .data-table.cards td.c-title { flex: 1 1 100%; font-size: 13.5px; font-weight: 600; line-height: 1.55; }
    /* 分类列限宽省略，避免长分类把「查看」挤到下一行 */
    .data-table.cards td.c-cat {
        order: 2; max-width: 34%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    /* 固定的三行结构：标题 / 分类+状态+查看 / 提交时间 */
    .data-table.cards td:nth-child(3) { order: 3; }
    .data-table.cards td:nth-child(4) { order: 4; }
    .data-table.cards td.c-op { order: 5; }
    .data-table.cards td.c-time { order: 6; flex: 1 1 100%; margin-top: 1px; }
    .data-table.cards td.c-title a { color: var(--ink); }
    .data-table.cards td.c-cat { font-size: 12px; color: var(--ink-3); }
    .data-table.cards td.c-time { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
    .data-table.cards td.c-op { margin-left: auto; }
    .data-table.cards td.c-title { order: 1; }
    .data-table.cards td.c-op .link-btn {
        min-height: 28px; padding: 2px 12px; border: 1px solid var(--line);
        border-radius: 999px; color: var(--red); font-size: 12.5px; line-height: 1.6;
    }
}

/* 手机端：个人中心左侧导航改为两列铺满，避免横向滚动 */
@media (max-width: 640px) {
    .uc-side { flex-wrap: wrap; gap: 6px; padding: 12px; }
    .uc-side .who {
        flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px;
        border-bottom: 1px solid var(--line); padding: 0 2px 10px; margin-bottom: 4px;
    }
    .uc-side .who .nm { margin: 0; font-size: 15px; }
    .uc-side .who .small { flex: 1 1 auto; text-align: right; font-size: 12px; }
    .uc-side .who .mt8 { display: flex; gap: 6px; flex: 1 1 100%; margin-top: 2px; }
    .uc-side .nav-i {
        flex: 1 1 calc(50% - 4px); justify-content: center; text-align: center;
        font-size: 13px; padding: 9px 6px;
    }
}

/* 超窄屏（≤360px）：导航字号再收一档，保证 5 个入口完整 */
@media (max-width: 360px) {
    .site-nav .nav-item { font-size: 12px; padding: 10px 0; }
    .logo .name { font-size: 18.5px; }
    .logo .sub { font-size: 8.5px; letter-spacing: 1px; }
    .header-actions .btn { padding: 4px 12px; font-size: 12.5px; }
    .header-actions .welcome { font-size: 12px; }
}

/* 手机端：后台侧边导航改为两列按钮，避免被横向截断 */
@media (max-width: 640px) {
    .admin-side {
        display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px; padding: 10px; overflow: visible;
    }
    .admin-side .nav-i {
        width: 100%; justify-content: flex-start; white-space: normal;
        font-size: 13px; padding: 9px 10px; min-height: 40px;
    }
    .admin-side .nav-i .ic { display: none; }
}

/* ---------- 账号安全页：键值信息表（窄屏两行堆叠，不再被 900px 撑破） ---------- */
.kv-table { min-width: 0; table-layout: auto; }
.kv-table th { width: 150px; }
.kv-note {
    margin-top: 6px; padding: 8px 10px; border-radius: 8px;
    background: #fff8ec; color: #b45309; font-size: 12.5px; line-height: 1.65;
}

@media (max-width: 900px) {
    .kv-table { display: block; min-width: 0; }
    .kv-table tbody, .kv-table tr, .kv-table th, .kv-table td { display: block; }
    .kv-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
    .kv-table tr:last-child { border-bottom: 0; padding-bottom: 0; }
    .kv-table tr:hover td { background: transparent; }
    .kv-table th {
        width: auto !important; padding: 0 0 3px; border: 0; background: transparent;
        font-size: 12px; font-weight: 500; color: var(--ink-3); white-space: normal;
    }
    .kv-table td {
        border: 0; padding: 0; white-space: normal;
        font-size: 13.5px; line-height: 1.65; word-break: break-word;
    }
    .kv-table td.small, .kv-table td .muted.small { font-size: 12.5px; }
    .kv-table .badge { vertical-align: 1px; }
}

@media (max-width: 640px) {
    .security-page .page-head { padding: 14px 0 12px; }
    .security-page .page-head h2 { font-size: 19px; }
    .security-page .page-head p { font-size: 12.5px; line-height: 1.7; }
    .security-page .panel { padding: 16px 14px; }
    .security-page .panel h3 { font-size: 16px; }
    .security-page code { overflow-wrap: anywhere; word-break: normal; }
    .security-page ul { padding-left: 18px !important; line-height: 1.8 !important; }
    .security-page .form-actions { flex-direction: column; align-items: stretch; gap: 10px; }
    .security-page .form-actions .btn { width: 100%; }
    .security-page .form-actions .muted { align-self: center !important; text-align: center; }
}

/* 账号安全页：长命令 / SQL 作为独立代码块，避免行内背景被切成碎片 */
.security-page .code-block {
    display: block; margin: 6px 0 2px; padding: 8px 10px;
    background: var(--gray-bg); border-radius: 8px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 11.5px; line-height: 1.7; color: var(--ink-2);
    white-space: pre-wrap; overflow-wrap: anywhere;
}

/* ---------- 登录设备列表（个人中心 / 账号安全共用） ---------- */
.dev-list { margin-top: 4px; }
.dev-row {
    display: flex; flex-wrap: wrap; align-items: center; gap: 3px 12px;
    padding: 10px 0; border-bottom: 1px solid var(--line);
}
.dev-row:last-child { border-bottom: 0; }
.dev-row.is-cur { background: #f6fbf6; margin: 0 -10px; padding: 10px; border-radius: 8px; border-bottom: 1px solid var(--line); }
.dev-row.is-cur:last-child { border-bottom: 0; }
.dev-main { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.dev-main strong { min-width: 3.2em; }
.dev-meta { flex: 1 1 auto; min-width: 0; }
.dev-kick { margin-left: auto; }
.dev-kick .link-btn { color: var(--red); }
@media (max-width: 640px) {
    /* 手机上：设备名 + IP 与「下线」同行，登录时间另起一行 */
    .dev-row { gap: 2px 8px; padding: 11px 0; }
    .dev-main { order: 1; flex: 1 1 auto; min-width: 0; }
    .dev-kick { order: 2; margin-left: auto; }
    .dev-kick .link-btn {
        min-height: 30px; padding: 3px 12px; border: 1px solid var(--line);
        border-radius: 999px; font-size: 12.5px; line-height: 1.5;
    }
    .dev-meta { order: 3; flex: 1 1 100%; font-size: 12px; }
    .dev-row.is-cur { margin: 0 -6px; padding: 10px 6px; }
}
