:root{
  --bg:#f5f6f8; --panel:#ffffff; --line:#e3e6eb; --line2:#cfd5dd;
  --txt:#1b1f24; --txt2:#5b6472; --txt3:#8b95a3;
  --brand:#1f5ea8; --brand2:#2f7ad1; --accent:#c0392b;
  --ok:#1e8e5a; --warn:#c9861a; --soft:#eef3fa;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei","PingFang SC","Hiragino Sans GB",sans-serif;
  background:var(--bg); color:var(--txt); font-size:16px; line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
a{color:var(--brand); text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%}

/* 顶栏 */
.topbar{
  display:flex; align-items:center; gap:24px; padding:0 24px; height:58px;
  background:#fff; border-bottom:1px solid var(--line); position:sticky; top:0; z-index:50;
}
.brand a{font-size:18px; font-weight:700; color:var(--txt); letter-spacing:.3px}
.brand a:hover{text-decoration:none}
.nav{display:flex; gap:4px; flex:1; flex-wrap:wrap}
.nav a{
  padding:7px 13px; border-radius:7px; color:var(--txt2); font-size:15px; font-weight:500;
}
.nav a:hover{background:var(--soft); text-decoration:none; color:var(--brand)}
.nav a.on{background:var(--brand); color:#fff}
.user a{color:var(--txt3); font-size:14px}

.wrap{max-width:1180px; margin:0 auto; padding:26px 24px 80px}
.wrap.wide{max-width:1400px}

h1{font-size:24px; margin:0 0 6px; font-weight:700}
h2{font-size:19px; margin:32px 0 12px; font-weight:700}
h3{font-size:16px; margin:0 0 10px; font-weight:700}
.sub{color:var(--txt2); font-size:14px; margin-bottom:18px}

.flash{background:#e8f5ee; border:1px solid #b9e0cb; color:#14603d; padding:10px 14px;
  border-radius:9px; margin-bottom:16px; font-size:15px}

/* 卡片 */
.card{background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:20px 22px; margin-bottom:16px}
.card.tight{padding:14px 16px}

/* 按钮 */
.btn{display:inline-block; padding:8px 16px; border-radius:8px; border:1px solid var(--line2);
  background:#fff; color:var(--txt); font-size:15px; cursor:pointer; font-family:inherit; line-height:1.4}
.btn:hover{background:var(--soft); text-decoration:none}
.btn.primary{background:var(--brand); border-color:var(--brand); color:#fff}
.btn.primary:hover{background:var(--brand2)}
.btn.danger{color:var(--accent); border-color:#edcac5}
.btn.danger:hover{background:#fdf0ee}
.btn.sm{padding:5px 11px; font-size:13.5px; border-radius:7px}
.btn.lg{padding:11px 24px; font-size:16.5px}
.btn[disabled]{opacity:.5; cursor:not-allowed}

/* 表单 */
label{font-size:14px; color:var(--txt2); font-weight:600; display:block; margin-bottom:5px}
input[type=text],input[type=number],input[type=password],select,textarea{
  width:100%; padding:9px 11px; border:1px solid var(--line2); border-radius:8px;
  font-size:15px; font-family:inherit; background:#fff; color:var(--txt);
}
input:focus,select:focus,textarea:focus{outline:2px solid #cfe0f7; border-color:var(--brand2)}
textarea{resize:vertical; min-height:74px; line-height:1.7}
.row{display:flex; gap:14px; flex-wrap:wrap}
.row > div{flex:1; min-width:130px}
.field{margin-bottom:14px}
.hint{font-size:13px; color:var(--txt3); margin-top:4px}

/* 过滤条 */
.filters{background:#fff; border:1px solid var(--line); border-radius:12px; padding:14px 16px; margin-bottom:18px}
.filters .row{gap:10px}
.filters select,.filters input{padding:7px 9px; font-size:14px}
.filters .row > div{min-width:110px; flex:0 1 auto}
.filters .grow{flex:1 1 220px}
.filters .acts{display:flex; gap:8px; align-items:flex-end; padding-top:22px}

/* 题目行 */
.qitem{background:#fff; border:1px solid var(--line); border-radius:12px; padding:16px 18px; margin-bottom:12px}
.qitem:hover{border-color:var(--line2)}
.qhead{display:flex; align-items:flex-start; gap:10px; margin-bottom:8px; flex-wrap:wrap}
.qno{font-weight:700; color:var(--txt3); font-size:14px; min-width:34px}
.src{font-size:13.5px; color:var(--brand); background:var(--soft); padding:2px 9px; border-radius:6px}
.stem{font-size:15.5px; color:var(--txt); margin:4px 0 10px; line-height:1.75;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden}
.stem.full{-webkit-line-clamp:unset; overflow:visible}
.meta{display:flex; gap:8px; flex-wrap:wrap; align-items:center; font-size:13px; color:var(--txt2)}
.chip{background:#f1f3f6; border-radius:6px; padding:2px 8px; color:var(--txt2)}
.chip.rate-bad{background:#fdecea; color:#a02c1e; font-weight:700}
.chip.rate-mid{background:#fdf4e3; color:#8a5b0c; font-weight:700}
.chip.rate-ok{background:#e9f5ef; color:#1a6b47; font-weight:700}
.chip.kind-坑{background:#fdecea; color:#a02c1e}
.chip.kind-大招{background:#e8f0fb; color:#1f5ea8}
.chip.ans{background:#e9f5ef; color:#1a6b47; font-weight:700}
/* 可点击的解析状态标签：直接进「解析录入/编辑」页 */
.chip-link{display:inline-flex; align-items:center; gap:1px; border:1px solid transparent;
  cursor:pointer; font-weight:600; transition:border-color .12s, background .12s}
.chip-link:hover{text-decoration:none; border-color:currentColor; opacity:.92}
.chip-link.link-ok{background:#e8f5ee; color:#14603d}
.chip-link.link-todo{background:#fdf4e3; color:#8a5b0c}

.empty{text-align:center; color:var(--txt3); padding:60px 20px; font-size:15px}

/* 分页 */
.pager{display:flex; gap:8px; align-items:center; justify-content:center; margin:22px 0; font-size:14px; color:var(--txt2)}
.pager a,.pager span{padding:6px 12px; border-radius:8px; border:1px solid var(--line)}
.pager .cur{background:var(--brand); color:#fff; border-color:var(--brand)}

/* 详情页 */
.qbody{font-size:17px; line-height:1.85}
.qbody img{max-width:100%; border:1px solid var(--line); border-radius:8px; margin:8px 0}
table.q-table{border-collapse:collapse; width:100%; margin:12px 0; font-size:15px}
table.q-table td{border:1px solid var(--line2); padding:7px 10px; vertical-align:top}
.opt{display:flex; gap:10px; padding:9px 12px; border-radius:9px; margin-bottom:6px; font-size:16px; line-height:1.7}
.opt .lab{font-weight:700; color:var(--txt2); min-width:22px}
.opt.right{background:#e9f5ef; border:1px solid #b9e0cb}
.opt.right .lab{color:#14603d}
.opt.wrong-hot{background:#fdf1ef; border:1px solid #f0cfc9}
.opt .cnt{font-size:13.5px; color:#a02c1e; margin-left:auto; white-space:nowrap; align-self:center}
.opt.right .cnt{color:#14603d}

.bar{height:9px; background:#eef0f3; border-radius:5px; overflow:hidden; width:100%}
.bar > i{display:block; height:100%; background:var(--brand2); border-radius:5px}

.analysis{background:#fbfcfd; border-left:4px solid var(--brand2); padding:14px 18px; border-radius:0 10px 10px 0; font-size:16px; line-height:1.85}
.analysis h4{margin:0 0 8px; font-size:15px; color:var(--brand)}

.tagline{display:flex; gap:8px; flex-wrap:wrap; margin:10px 0}

/* 编辑器 */
.editor-wrap{border:1px solid var(--line2); border-radius:10px; overflow:hidden; background:#fff}
.editor-toolbar{display:flex; gap:6px; padding:7px 9px; background:#f7f8fa; border-bottom:1px solid var(--line); flex-wrap:wrap}
.editor-toolbar button{font-size:13.5px; padding:4px 10px; border-radius:6px; border:1px solid var(--line2); background:#fff; cursor:pointer; font-family:inherit}
.editor-toolbar button:hover{background:var(--soft)}
.editor{min-height:130px; padding:12px 14px; font-size:16px; line-height:1.8; outline:none}
.editor:empty:before{content:attr(data-placeholder); color:#aab2bd}
.editor img{max-width:100%; border:1px solid var(--line); border-radius:8px; margin:8px 0; display:block}
.editor table{border-collapse:collapse; width:100%; margin:10px 0; font-size:15px}
.editor td{border:1px solid var(--line2); padding:6px 9px}
.editor.big{min-height:260px}

/* 章节树 */
.tree-book{margin-bottom:20px}
.tree-book > .bh{display:flex; align-items:center; gap:12px; padding:11px 14px; background:#eef3fa;
  border:1px solid #dbe6f5; border-radius:9px; font-weight:700; font-size:16px}
.tree-unit{margin:10px 0 0 14px; border-left:2px solid var(--line); padding-left:14px}
.tree-unit > .uh{display:flex; align-items:center; gap:10px; padding:7px 0; font-weight:600; font-size:15px; color:var(--txt2)}
.tree-lesson{display:flex; align-items:center; gap:8px; padding:5px 0 5px 6px; font-size:15px}
.tree-lesson.off{opacity:.45; text-decoration:line-through}
.inline-form{display:inline-flex; gap:6px; align-items:center}
.inline-form input[type=text]{width:auto; min-width:160px; padding:5px 8px; font-size:14px}

/* 统计 */
.stat-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px; margin-bottom:22px}
.stat{background:#fff; border:1px solid var(--line); border-radius:12px; padding:16px 18px}
.stat .n{font-size:30px; font-weight:700; color:var(--brand); line-height:1.2}
.stat .l{font-size:13.5px; color:var(--txt2); margin-top:3px}
table.data{width:100%; border-collapse:collapse; font-size:15px; background:#fff}
table.data th,table.data td{border-bottom:1px solid var(--line); padding:9px 10px; text-align:left}
table.data th{background:#f7f8fa; font-size:13.5px; color:var(--txt2); font-weight:700}
table.data td.num{text-align:right; font-variant-numeric:tabular-nums}
table.data tr:hover td{background:#fafbfc}

/* 登录 */
.login-box{max-width:380px; margin:12vh auto 0; background:#fff; border:1px solid var(--line);
  border-radius:14px; padding:34px 30px; box-shadow:0 8px 30px rgba(20,40,80,.06)}
.login-box h1{font-size:20px; text-align:center; margin-bottom:6px}
.login-box .sub{text-align:center; margin-bottom:22px}

/* 录入页 */
.entry-head{display:flex; justify-content:space-between; align-items:center; gap:14px; margin-bottom:14px; flex-wrap:wrap}
.progress{font-size:14px; color:var(--txt2)}
.progress b{color:var(--brand); font-size:16px}
.savebar{display:flex; gap:10px; justify-content:flex-end; padding-bottom:40px}

/* 导入预览 */
.prev{border:1px solid var(--line); border-radius:10px; padding:14px 16px; margin-bottom:12px; background:#fff}
.prev .t{font-weight:600; font-size:15px; margin-bottom:6px}
.prev .ops{font-size:14px; color:var(--txt2)}
.skipped{opacity:.45}

/* ==========================================================
   移动端（微信内置浏览器 / 手机）适配
   断点 760px：手机竖屏 ~430px、横屏 ~700px 都覆盖
   ========================================================== */
@media (max-width:760px){
  /* ---------- 顶栏：两行结构，标题单行省略 + 导航横滑 ---------- */
  .topbar{
    height:auto; padding:0; gap:0; flex-wrap:wrap; align-items:stretch;
  }
  .brand{flex:1 1 auto; min-width:0; padding:8px 12px; display:flex; align-items:center}
  .brand a{
    display:block; width:100%; font-size:15px; font-weight:700; letter-spacing:0;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  }
  .user{flex:0 0 auto; padding:8px 12px 8px 6px; display:flex; align-items:center}
  .user a{font-size:14px; padding:2px 6px}
  .nav{
    order:3; flex:0 0 100%; display:flex; flex-wrap:nowrap; gap:2px;
    overflow-x:auto; overflow-y:hidden; padding:0 8px 6px;
    -webkit-overflow-scrolling:touch; scrollbar-width:none;
  }
  .nav::-webkit-scrollbar{display:none; height:0}
  .nav a{
    padding:4px 10px; font-size:13.5px; border-radius:6px;
    flex:0 0 auto; white-space:nowrap;
  }
  /* 右侧渐隐：提示导航还能往右滑 */
  .topbar::after{
    content:''; position:absolute; right:0; bottom:0; width:26px; height:32px;
    pointer-events:none;
    background:linear-gradient(to right, rgba(255,255,255,0), #fff 70%);
  }

  /* ---------- 全局紧凑 ---------- */
  body{font-size:15px; line-height:1.6}
  .wrap{padding:10px 10px 84px; padding-bottom:calc(84px + env(safe-area-inset-bottom))}
  h1{font-size:19px; margin-bottom:4px}
  h2{font-size:17px; margin:18px 0 8px}
  h3{font-size:15px; margin-bottom:8px}
  .sub{font-size:13px; margin-bottom:12px}
  .flash{padding:8px 11px; font-size:14px; margin-bottom:10px; border-radius:8px}
  .card{padding:12px 12px; border-radius:10px; margin-bottom:10px}
  .card.tight{padding:10px 12px}

  /* 输入控件统一 16px：低于 16px 时 iOS/微信会自动放大页面 */
  input[type=text],input[type=number],input[type=password],select,textarea{font-size:16px; padding:8px 10px}
  label{font-size:13px; margin-bottom:4px}
  .field{margin-bottom:10px}
  .btn{padding:8px 12px; font-size:14.5px}
  .btn.sm{padding:5px 10px; font-size:13px}
  .btn.lg{padding:10px 16px; font-size:15.5px}

  /* 两列排布：普通表单行不再一列到底 */
  .row{gap:8px}
  .row > div{flex:1 1 calc(50% - 4px); min-width:0}
  .row > div.full{flex:1 1 100% !important; max-width:none !important}

  /* 编辑页选项行：标签 + 内容 + 误选人数压缩到一行 */
  .optrow{align-items:center !important; gap:6px}
  .optrow .ok-lab{max-width:20px !important; padding-bottom:0 !important; font-size:15px}
  .optrow .ok-cnt{max-width:80px !important}
  .optrow .ok-cnt label{display:none}
  .optrow .ok-cnt input{padding:8px 4px; text-align:center}

  /* 章节维护页的行内表单不撑破 */
  .inline-form{display:flex; width:100%; flex-wrap:wrap; gap:5px}
  .inline-form input[type=text]{min-width:0 !important; flex:1 1 100%; width:100%}

  /* 文件选择框：手机上把「选择文件」做成可点的大按钮 */
  input[type=file]{width:100%; font-size:14px; color:var(--txt2)}
  input[type=file]::file-selector-button{
    padding:9px 16px; margin-right:10px; border-radius:8px;
    border:1px solid var(--brand); background:var(--soft); color:var(--brand);
    font-size:14px; font-family:inherit; font-weight:600;
  }

  /* ---------- 筛选条：默认折叠，只留关键词 + 教材章节 ---------- */
  .filters{padding:10px 11px; border-radius:10px; margin-bottom:10px}
  .filters .row{gap:8px}
  .filters .row > div{flex:1 1 100%; min-width:0}
  .filters select,.filters input{font-size:16px; padding:7px 9px}
  .filters .acts{
    padding-top:2px; flex:1 1 100%; gap:6px; flex-wrap:nowrap;
  }
  .filters .acts .btn{flex:1 1 0; text-align:center; padding:8px 6px}
  .filters:not(.open) .f-more{display:none}
  /* 展开后高级筛选走两列，避免一列到底过长 */
  .filters.open .f-more{flex:1 1 calc(50% - 4px); min-width:0 !important}
  .filters.open .f-more input[type=number]{width:0 !important; flex:1 1 0; min-width:0; text-align:center}
  .filters .acts .f-toggle{display:inline-block}
  .filters.open .f-toggle .ar{transform:rotate(180deg)}
  .f-toggle .ar{display:inline-block; margin-left:2px; transition:transform .15s}

  /* ---------- 列表条目 ---------- */
  .qitem{padding:11px 12px; border-radius:10px; margin-bottom:9px}
  .qhead{gap:6px; margin-bottom:6px; align-items:center}
  .qno{font-size:13px; min-width:0}
  .src{font-size:12.5px; padding:1px 7px}
  .chip{font-size:12.5px; padding:1px 7px; border-radius:5px}
  .stem{font-size:14.5px; line-height:1.72; margin:3px 0 8px}
  .meta{gap:5px; font-size:12.5px}
  .meta .btn.sm{padding:4px 9px}
  .empty{padding:40px 14px; font-size:14px}

  /* 操作按钮组：换行显示，不堆叠成多行单列 */
  .hbtns{display:flex; gap:6px; flex-wrap:wrap}
  .hbtns .btn{flex:0 0 auto}
  .entry-head{margin-bottom:9px; gap:8px; align-items:stretch}
  .entry-head .progress{font-size:13px}
  .progress b{font-size:15px}

  /* ---------- 分页 ---------- */
  .pager{margin:14px 0; gap:6px; font-size:13.5px}
  .pager a,.pager span{padding:7px 14px}

  /* ---------- 题目正文与选项 ---------- */
  .qbody{font-size:15.5px; line-height:1.78}
  .qbody img{margin:6px 0; border-radius:6px}
  table.q-table{font-size:13.5px; margin:8px 0; display:block; overflow-x:auto; white-space:nowrap}
  table.q-table td{padding:5px 8px}
  .opt{font-size:15px; padding:7px 10px; gap:6px; line-height:1.65; border-radius:8px}
  .opt .lab{min-width:18px}
  .opt .cnt{font-size:12px}
  .analysis{padding:10px 12px; font-size:15px; line-height:1.8; border-left-width:3px}
  .tagline{gap:6px; margin:8px 0}
  .bar{height:8px}

  /* ---------- 编辑器 ---------- */
  .editor-wrap{border-radius:8px}
  .editor-toolbar{padding:5px 6px; gap:4px}
  .editor-toolbar button{font-size:12.5px; padding:4px 8px; border-radius:5px}
  .editor{padding:10px 11px; font-size:16px; min-height:110px}
  .editor.big{min-height:190px}
  .editor table{font-size:13.5px}
  .editor td{padding:5px 7px}

  /* ---------- 底部固定保存栏（录入页） ---------- */
  .savebar{
    position:fixed; left:0; right:0; bottom:0; z-index:60;
    display:flex; justify-content:stretch; gap:7px; margin:0;
    padding:8px 10px;
    padding-bottom:calc(8px + env(safe-area-inset-bottom));
    background:rgba(255,255,255,.97); border-top:1px solid var(--line);
    box-shadow:0 -2px 12px rgba(20,40,80,.07);
  }
  .savebar .btn{flex:1 1 0; text-align:center; padding:10px 6px; font-size:14px}
  .savebar .btn.primary{flex:1.6 1 0; font-weight:600}

  /* ---------- 章节树 / 统计表 ---------- */
  .tree-book > .bh{padding:9px 11px; font-size:15px; border-radius:8px}
  .tree-unit{margin-left:8px; padding-left:10px}
  .tree-lesson{font-size:14px; padding:6px 0 6px 4px}
  .tree-unit > .uh{font-size:14px; padding:6px 0}
  .inline-form input[type=text]{min-width:110px; font-size:16px}
  .stat-grid{grid-template-columns:repeat(2,1fr); gap:8px; margin-bottom:14px}
  .stat{padding:11px 12px; border-radius:10px}
  .stat .n{font-size:24px}
  .stat .l{font-size:12.5px}
  table.data{font-size:13.5px; display:block; overflow-x:auto; white-space:nowrap}
  table.data th,table.data td{padding:7px 9px}

  /* ---------- 登录页 ---------- */
  .login-box{margin:10vh 12px 0; padding:26px 20px; max-width:none}

  /* ---------- 打印页 ---------- */
  .prev{padding:11px 12px; margin-bottom:9px}
}

/* 桌面端：筛选折叠按钮不显示 */
.f-toggle{display:none}

@media (max-width:760px){
  /* 窄屏隐藏按钮里的辅助文字，避免一行放不下 */
  .pc-only{display:none}
}

@media print{
  .topbar,.no-print,.nav,.savebar{display:none !important}
  .wrap{max-width:none; padding:0}
  .print-q{page-break-after:always; padding:10mm}
}

/* ==========================================================
   解题方法体系（卷 → 篇）
   ========================================================== */
.m-hero{display:flex; justify-content:space-between; align-items:flex-end; gap:16px; margin-bottom:18px}
.m-hero h1{margin:0}
.m-hero-stat{display:flex; gap:22px; flex:none}
.m-hero-stat div{text-align:center}
.m-hero-stat b{display:block; font-size:26px; color:var(--brand); line-height:1.1; font-variant-numeric:tabular-nums}
.m-hero-stat span{font-size:12.5px; color:var(--txt3)}

.m-preface{display:block; background:linear-gradient(135deg,#eef3fa,#f8fbfe); border:1px solid #dbe6f5;
  border-radius:12px; padding:14px 18px; margin-bottom:22px; color:var(--txt); transition:border-color .15s}
.m-preface:hover{text-decoration:none; border-color:var(--brand2)}
.m-preface-tag{display:inline-block; background:var(--brand); color:#fff; font-size:12px;
  padding:2px 8px; border-radius:5px; margin-right:9px; vertical-align:2px}
.m-preface-title{font-weight:700; font-size:16px}
.m-preface-sum{display:block; color:var(--txt2); font-size:13.5px; margin-top:6px; line-height:1.65}
.m-preface-go{display:inline-block; color:var(--brand); font-size:13px; font-weight:600; margin-top:6px}

.m-vol{background:#fff; border:1px solid var(--line); border-radius:12px; padding:18px 20px 8px; margin-bottom:16px}
.m-vol-head{display:flex; align-items:center; gap:10px; margin-bottom:10px; flex-wrap:wrap}
.m-vol-no{background:var(--brand); color:#fff; font-size:12.5px; font-weight:700; padding:3px 9px;
  border-radius:6px; white-space:nowrap; flex:none}
.m-vol-head h2{margin:0; font-size:19px; flex:1; min-width:0}
.m-vol-head h2 a{color:var(--txt)}
.m-vol-cnt{font-size:13px; color:var(--txt3); flex:none}

.m-vol-intro{display:flex; gap:12px; background:#fbfcfd; border-left:3px solid var(--brand2);
  border-radius:0 8px 8px 0; padding:10px 14px; margin-bottom:12px}
.m-vol-intro-l{font-size:12px; color:var(--brand); font-weight:700; white-space:nowrap; padding-top:3px}
.m-vol-intro-c{font-size:14.5px; color:var(--txt2); line-height:1.75; min-width:0}
.m-vol-intro-c p{margin:0 0 6px}
.m-vol-intro-c p:last-child{margin-bottom:0}

.m-list{list-style:none; margin:0; padding:0}
.m-list li{border-top:1px solid var(--line)}
.m-list li:first-child{border-top:none}
.m-list li > a{display:flex; align-items:baseline; gap:9px; padding:9px 5px; color:var(--txt); border-radius:7px}
.m-list li > a:hover{background:var(--soft); text-decoration:none}
.m-seq{font-size:12.5px; color:var(--txt3); font-variant-numeric:tabular-nums; width:20px; flex:none}
.m-name{font-size:15.5px; font-weight:600; flex:none}
.m-sum{font-size:13px; color:var(--txt3); flex:1; min-width:0; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap}

.m-tag{font-size:11.5px; padding:1px 7px; border-radius:5px; white-space:nowrap; font-weight:600;
  flex:none; line-height:1.7}
.m-tag.t-坑{background:#fdecea; color:#a02c1e}
.m-tag.t-大招{background:#e8f0fb; color:#1f5ea8}
.m-tag.t-方法{background:#eef0f3; color:#5b6472}
.m-tag.t-导语{background:#fdf4e3; color:#8a5b0c}
.m-tag.t-卷{background:#eef3fa; color:var(--brand)}

.m-foot{text-align:center; color:var(--txt3); font-size:13px; padding:18px 12px 8px; line-height:1.8}

/* 篇章页：左侧目录 + 右侧正文 */
.m-layout{display:flex; gap:24px; align-items:flex-start}
.m-side{width:252px; flex:none; position:sticky; top:72px; max-height:calc(100vh - 88px);
  overflow-y:auto; background:#fff; border:1px solid var(--line); border-radius:12px; padding:12px 8px}
.m-side-head{display:flex; justify-content:space-between; align-items:center; padding:0 8px 8px;
  border-bottom:1px solid var(--line); margin-bottom:6px; font-size:13px; font-weight:700; color:var(--txt2)}
.m-side-x{display:none; border:none; background:none; font-size:16px; color:var(--txt3); cursor:pointer; padding:0 2px}
.m-side-vol{display:flex; gap:7px; align-items:flex-start; margin:12px 6px 3px; font-size:13.5px; font-weight:700}
.m-side-volno{background:#eef3fa; color:var(--brand); border-radius:4px; padding:0 5px;
  font-size:11.5px; line-height:1.7; flex:none}
.m-side-vol a{color:var(--txt)}
.m-side-ch{display:block; padding:5px 8px; border-radius:6px; font-size:13.5px; color:var(--txt2); line-height:1.5}
.m-side-ch:hover{background:var(--soft); text-decoration:none; color:var(--brand)}
.m-side-ch.on{background:var(--brand); color:#fff; font-weight:600}
.m-side-ch.on:hover{color:#fff}
.m-side-ch.lv1{margin-bottom:4px}
.m-side-seq{color:var(--txt3); margin-right:5px; font-size:12px; font-variant-numeric:tabular-nums}
.m-side-ch.on .m-side-seq{color:rgba(255,255,255,.72)}
.m-mask{display:none}

.m-main{flex:1; min-width:0}
.m-crumb{font-size:13px; color:var(--txt3); margin-bottom:10px; line-height:1.7}
.m-crumb .sep{margin:0 5px; color:var(--line2)}
.m-crumb .cur{color:var(--txt2)}
.m-title-row{display:flex; align-items:center; gap:10px; margin-bottom:14px; flex-wrap:wrap}
.m-title-row h1{margin:0; font-size:24px; line-height:1.35}

.m-volnote{background:#fbfcfd; border:1px solid var(--line); border-radius:10px; margin-bottom:16px}
.m-volnote summary{padding:10px 14px; cursor:pointer; font-size:13.5px; color:var(--txt2); font-weight:600}
.m-volnote-c{margin:0 14px 12px; padding-left:12px; border-left:3px solid var(--brand2);
  font-size:14.5px; color:var(--txt2); line-height:1.75}
.m-volnote-c p{margin:0 0 6px}
.m-volnote-c p:last-child{margin-bottom:0}

.m-body{background:#fff; border:1px solid var(--line); border-radius:12px; padding:22px 24px;
  font-size:16.5px; line-height:1.9; color:var(--txt)}
.m-body p{margin:0 0 12px}
.m-body h2{font-size:19px; margin:24px 0 10px}
.m-body h2:first-child{margin-top:0}
.m-body h3{font-size:16.5px; margin:20px 0 8px; color:var(--brand)}
.m-body h4{font-size:15.5px; margin:16px 0 8px; color:var(--txt2)}
.m-body ul,.m-body ol{margin:0 0 12px; padding-left:24px}
.m-body li{margin-bottom:5px}
.m-body blockquote{margin:0 0 12px; padding:8px 14px; border-left:3px solid var(--line2); color:var(--txt2)}
.m-body pre{background:#f7f8fa; border:1px solid var(--line); border-radius:8px; padding:10px 12px;
  overflow-x:auto; font-size:14px}
.m-body img{max-width:100%; border:1px solid var(--line); border-radius:8px; margin:10px 0;
  cursor:zoom-in; display:block}
.m-body img.zoom{width:100%; cursor:zoom-out}
.m-body table.q-table{margin:12px 0}
.m-body .m-note{background:#f6f9fd; border-left:3px solid var(--brand2); border-radius:0 8px 8px 0;
  padding:10px 14px; margin:0 0 14px; font-size:15.5px; color:var(--txt2)}
.m-body .m-ref{color:var(--brand); font-weight:600}
.m-body .m-empty{color:var(--txt3); font-size:14.5px; background:#fafbfc; border:1px dashed var(--line2);
  border-radius:8px; padding:12px 14px}

.m-pager{display:flex; gap:12px; margin:18px 0 40px}
.m-pg{flex:1; border:1px solid var(--line); border-radius:10px; padding:11px 14px; background:#fff; color:var(--txt)}
.m-pg:hover{text-decoration:none; border-color:var(--brand2); background:var(--soft)}
.m-pg.next{text-align:right}
.m-pg-l{display:block; font-size:12.5px; color:var(--txt3)}
.m-pg-t{display:block; font-size:14.5px; font-weight:600; margin-top:2px}
.m-tocbar{display:none}

@media (max-width:760px){
  .m-hero{flex-direction:column; align-items:stretch; gap:10px; margin-bottom:12px}
  .m-hero h1{font-size:19px; line-height:1.4}
  .m-hero-stat{justify-content:flex-start; gap:26px}
  .m-hero-stat b{font-size:20px}
  .m-preface{padding:11px 13px; margin-bottom:12px; border-radius:10px}
  .m-preface-title{font-size:15px}
  .m-preface-sum{font-size:12.5px}

  .m-vol{padding:12px 12px 4px; border-radius:10px; margin-bottom:10px}
  .m-vol-head{gap:7px; margin-bottom:8px}
  .m-vol-head h2{font-size:16px}
  .m-vol-no{font-size:11.5px; padding:2px 7px}
  .m-vol-intro{display:block; padding:9px 11px; margin-bottom:8px}
  .m-vol-intro-l{margin-bottom:4px}
  .m-vol-intro-c{font-size:14px}
  .m-list li > a{padding:8px 3px; gap:6px; flex-wrap:wrap}
  .m-name{font-size:14.5px; flex:1 1 auto}
  .m-sum{flex:1 1 100%; font-size:12.5px; white-space:normal; line-height:1.5; margin-top:1px;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden}
  .m-foot{font-size:12px; padding:12px 8px 4px}

  /* 目录抽屉 */
  .m-tocbar{display:flex; align-items:center; gap:9px; margin:-2px 0 8px; padding-bottom:6px;
    border-bottom:1px solid var(--line)}
  .m-tocbar-t{font-size:12.5px; color:var(--txt2); min-width:0; overflow:hidden;
    text-overflow:ellipsis; white-space:nowrap}
  .m-layout{display:block}
  .m-side{position:fixed; top:0; left:0; bottom:0; width:84%; max-width:330px; z-index:120;
    border-radius:0; border:none; border-right:1px solid var(--line); max-height:none;
    transform:translateX(-103%); transition:transform .22s ease; padding:12px 10px;
    overflow-y:auto; -webkit-overflow-scrolling:touch}
  .m-side.open{transform:none; box-shadow:4px 0 26px rgba(20,40,80,.14)}
  .m-side-x{display:block}
  .m-side-ch{padding:7px 8px; font-size:14px}
  .m-mask{display:block; position:fixed; inset:0; background:rgba(20,30,50,.35); z-index:110;
    opacity:0; pointer-events:none; transition:opacity .2s}
  .m-mask.on{opacity:1; pointer-events:auto}

  .m-crumb{font-size:12px; margin-bottom:8px}
  .m-title-row{margin-bottom:10px; gap:7px}
  .m-title-row h1{font-size:18.5px}
  .m-body{padding:13px 13px; font-size:16px; line-height:1.85; border-radius:10px}
  .m-body p{margin-bottom:10px}
  .m-body h2{font-size:17px; margin:18px 0 8px}
  .m-body h3{font-size:15.5px; margin:15px 0 7px}
  .m-body h4{font-size:15px; margin:13px 0 6px}
  .m-body ul,.m-body ol{padding-left:20px}
  .m-body .m-note{padding:9px 11px; font-size:15px}
  .m-volnote-c{font-size:14px; line-height:1.75}
  .m-pager{gap:8px; margin:14px 0 20px}
  .m-pg{padding:9px 11px}
  .m-pg-t{font-size:13.5px; line-height:1.45}
}
