: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%}

/* 顶栏（导航收进右上角折叠菜单，见 .mpanel） */
.topbar{
  display:flex; align-items:center; gap:16px; padding:0 18px; height:56px;
  background:#fff; border-bottom:1px solid var(--line); position:sticky; top:0; z-index:50;
}
.brand{flex:0 0 auto; min-width:0}
.brand a{
  display:block; font-size:18px; font-weight:700; color:var(--txt); letter-spacing:.3px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.brand a:hover{text-decoration:none}
.user{flex:0 0 auto; display:flex; align-items:center; gap:10px}
.user a.uout{color:var(--txt3); font-size:14px}
.user a.uout:hover{color:var(--brand); text-decoration:none}

/* ===== 顶部横向固定导航（2026-10-25 改版：由右侧抽屉改为横排 + 悬停下拉） ===== */
.topnav{
  flex:1 1 auto; min-width:0; display:flex; align-items:center; gap:2px;
}
.tn{
  flex:none; display:inline-flex; align-items:center; gap:5px;
  padding:8px 12px; border-radius:9px; border:0; background:none;
  font-family:inherit; font-size:15px; line-height:1.2; color:var(--txt2);
  white-space:nowrap; cursor:pointer;
}
.tn:hover{background:var(--soft); color:var(--brand); text-decoration:none}
.tn.on{color:var(--brand); font-weight:600; background:#eff5fd}
.caret{
  width:0; height:0; border-left:4px solid transparent; border-right:4px solid transparent;
  border-top:5px solid currentColor; opacity:.5; margin-top:1px; transition:transform .15s ease;
}
.navdrop.open > .tn .caret{transform:rotate(180deg)}
.navdrop{position:relative; flex:none}
.drop{
  display:none; position:absolute; top:calc(100% + 4px); left:0; z-index:80;
  min-width:172px; padding:6px; background:#fff; border:1px solid var(--line);
  border-radius:12px; box-shadow:0 14px 30px rgba(18,30,50,.15);
}
.drop a{
  display:block; padding:8px 12px; border-radius:8px;
  font-size:14.5px; color:var(--txt2); white-space:nowrap;
}
.drop a:hover{background:#eff4fa; color:var(--brand); text-decoration:none}
/* 「定哥笔记」两列面板：左板块 右类型 */
.drop-2col{grid-template-columns:1fr 1fr; gap:2px 10px; min-width:328px; padding:10px}
.dcol{display:flex; flex-direction:column; min-width:0}
.dlab{font-size:12px; color:var(--txt3); padding:4px 12px 6px; letter-spacing:.4px}
.dall{
  grid-column:1 / -1; margin-top:8px; padding-top:9px !important;
  border-top:1px solid var(--line); text-align:center; color:var(--brand) !important;
}
/* 桌面：鼠标划过即展开 */
@media (hover:hover) and (min-width:900px){
  .navdrop:hover > .drop{display:block}
  .navdrop:hover > .drop-2col{display:grid}
}
/* 点击 / 触摸：由脚本加 .open 展开 */
.navdrop.open > .drop{display:block}
.navdrop.open > .drop-2col{display:grid}

/* 折叠菜单按钮（三条杠 ⇄ ×） */
.mbtn{
  width:40px; height:34px; flex:none; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:3px; padding:0; cursor:pointer;
  border:1px solid var(--line2); border-radius:9px; background:#fff;
}
.mbtn:hover{background:var(--soft); border-color:#b9c2cf}
.mbar{
  display:block; width:16px; height:2px; border-radius:1px; background:var(--txt);
  transition:transform .18s ease, opacity .14s ease;
}
.mbtn[aria-expanded="true"] .mbar:nth-child(1){transform:translateY(5px) rotate(45deg)}
.mbtn[aria-expanded="true"] .mbar:nth-child(2){opacity:0}
.mbtn[aria-expanded="true"] .mbar:nth-child(3){transform:translateY(-5px) rotate(-45deg)}

/* 右侧抽屉菜单：从右上展开、头部固定、可上下滚 */
.mmask{
  position:fixed; inset:0; z-index:70; background:rgba(16,24,38,.34);
  opacity:0; transition:opacity .18s ease;
}
.mmask.on{opacity:1}
.mpanel{
  position:fixed; top:0; right:0; bottom:0; z-index:80;
  width:min(300px, 88vw); background:#fff; border-left:1px solid var(--line);
  box-shadow:-10px 0 30px rgba(18,30,50,.12);
  transform:translateX(103%); transition:transform .2s ease;
  display:flex; flex-direction:column;
  padding-top:constant(safe-area-inset-top);
  padding-top:env(safe-area-inset-top);
}
.mpanel.on{transform:none}
body.menu-open{overflow:hidden}
.mhead{
  flex:none; display:flex; align-items:center; justify-content:space-between;
  padding:11px 10px 11px 18px; border-bottom:1px solid var(--line);
}
.mtitle{font-size:13px; font-weight:600; color:var(--txt3); letter-spacing:.08em}
.mx{
  width:30px; height:30px; border:0; background:transparent; cursor:pointer;
  font-size:20px; line-height:1; color:var(--txt3); border-radius:7px; padding:0 0 3px;
}
.mx:hover{background:var(--soft); color:var(--txt)}
.mnav{flex:1; overflow-y:auto; padding:6px 0 24px; -webkit-overflow-scrolling:touch}

.mi{
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  width:100%; padding:11px 18px; border:0; background:transparent;
  font-family:inherit; font-size:15.5px; font-weight:500; color:var(--txt);
  text-align:left; cursor:pointer; border-left:3px solid transparent;
}
.mi:hover{background:var(--soft); text-decoration:none; color:var(--brand)}
.mi.on{color:var(--brand); font-weight:600; background:#eff5fd; border-left-color:var(--brand)}
.mi .ar{
  font-size:15px; line-height:1; color:#94a0b0; font-weight:600;
  transition:transform .16s ease; transform:rotate(90deg);
}
.mi.open .ar{transform:rotate(-90deg); color:var(--brand)}

.msub{display:none; background:#fafbfc; border-top:1px solid #eff1f4; border-bottom:1px solid #eff1f4}
.msub.on{display:block}
.msub a{display:block; padding:9px 18px 9px 30px; font-size:14.5px; color:var(--txt2)}
.msub a:hover{background:#eff4fa; color:var(--brand); text-decoration:none}

.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}
/* 列表里的题源：固定宽度，长短看起来一样齐；超长尾部打点，鼠标悬停（title）看全称。
   单题页不加 .fixed，显示完整题源。 */
.src.fixed{display:inline-block; width:15.5em; overflow:hidden; text-overflow:ellipsis;
  white-space:nowrap; vertical-align:bottom}
/* 单题页「源于《… 原第x题》」—— 跟线下练习册对题号用 */
.qdoc{font-size:13px; color:var(--txt2); margin:0 0 12px; padding-left:9px;
  border-left:3px solid #d3dfef; line-height:1.65; word-break:break-all}
.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 都覆盖
   ========================================================== */
/* 平板 / 手机：导航横向滚动，下拉改全宽浮层
   （.topnav 一旦 overflow-x:auto 就会裁掉绝对定位的下拉面板，所以窄屏一律 fixed 贴顶） */
@media (max-width:899px){
  .topbar{height:52px; padding:0 8px; gap:8px}
  .brand{flex:0 0 auto; min-width:0; max-width:30vw}
  .brand a{
    display:block; width:100%; font-size:12.5px; font-weight:700; letter-spacing:0;
    white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  }
  .topnav{
    overflow-x:auto; overflow-y:hidden; gap:0; margin-right:-4px; padding-bottom:1px;
    scrollbar-width:none; -webkit-overflow-scrolling:touch;
  }
  .topnav::-webkit-scrollbar{display:none}
  .tn{padding:7px 9px; font-size:13.5px; border-radius:8px}
  .caret{border-left-width:3.5px; border-right-width:3.5px; border-top-width:4.5px}
  .user{flex:0 0 auto; gap:6px; padding:0}
  .drop,.drop-2col{
    position:fixed; left:8px; right:8px; top:52px; width:auto; min-width:0;
    max-height:calc(100vh - 70px); overflow:auto;
  }
  .drop-2col{grid-template-columns:1fr 1fr}
  .drop a{padding:10px 12px; font-size:15px}
}

@media (max-width:760px){
  /* ---------- 顶栏导航样式已上移到 899px 断点统一处理 ---------- */

  /* ---------- 全局紧凑 ---------- */
  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}
  .src.fixed{width:13em}
  .qdoc{font-size:12.5px; margin-bottom:10px}
  .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,.mpanel,.mmask{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)}

/* 解题技巧：四类切换 chips */
.m-cats{display:flex; flex-wrap:wrap; gap:8px; margin:-6px 0 18px}
.m-cat{
  display:inline-block; padding:7px 14px; border-radius:999px; border:1px solid var(--line2);
  background:#fff; font-size:14px; color:var(--txt2); white-space:nowrap;
}
.m-cat:hover{border-color:var(--brand2); color:var(--brand); text-decoration:none}
.m-cat.on,.m-cat.on:hover{background:var(--brand); border-color:var(--brand); color:#fff; font-weight:600}

/* 分类空态 */
.m-empty{
  background:#fff; border:1px dashed var(--line2); border-radius:12px;
  padding:34px 22px; text-align:center; margin-bottom:16px;
}
.m-empty-t{font-size:16.5px; font-weight:700; color:var(--txt); margin-bottom:8px}
.m-empty-s{font-size:14px; color:var(--txt2); line-height:1.75}

.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}
}

/* ============================================================
   教学管理系统（2026-10-25）
   教材目录 / 内容库 / 学生名册
   ============================================================ */

:root{
  --k-note:#e8f0fb; --k-concept:#e8f5ee; --k-pitfall:#fdecea;
  --k-qa:#fdf4e3; --k-topic:#f0ebfa; --k-stage:#e6f4f7; --k-howto:#eef0f3;
}

.me{color:var(--txt2); font-size:13.5px}

/* 小徽标 */
.cb{
  display:inline-block; font-size:11.5px; font-style:normal; font-weight:500;
  padding:1px 6px; border-radius:4px; margin-left:5px; vertical-align:1px; white-space:nowrap;
}
.cb-note{background:#e8f0fb; color:#1f5ea8}
.cb-concept{background:#e8f5ee; color:#14603d}
.cb-pitfall{background:#fdecea; color:#a02c1e}
.cb-qa{background:#fdf4e3; color:#8a5b0c}
.cb-topic{background:#f0ebfa; color:#5b3ea8}
.cb-q{background:#eef0f3; color:#5b6472}
.cb-stage{background:#f0ebfa; color:#5b3ea8}
.cb-draft{background:#f1f2f4; color:#8b95a3}
.cb-video{background:#e8f5ee; color:#14603d}
.cb-rate{background:#fdf4e3; color:#8a5b0c}
.cb-star{background:#fdecea; color:#a02c1e}
.cb-admin{background:#e8f0fb; color:#1f5ea8}
.cb-txtb{background:#eef0f3; color:#5b6472; font-style:normal}

.empty.sm{padding:10px 0; font-size:14px}
.cnt{
  display:inline-block; margin-left:6px; padding:0 6px; border-radius:9px;
  background:#eef0f3; color:var(--txt2); font-size:12px; font-weight:400; vertical-align:2px;
}
h3 .add{margin-left:10px; font-size:13px; font-weight:400}

/* ---------- 教材目录（一行一课：标题在左、版块按钮在右） ---------- */
.book-head{font-size:17px}
.u-block{margin:12px 0 4px; padding-top:10px; border-top:1px dashed var(--line)}
.u-block:first-of-type{border-top:0; padding-top:0}
.u-name{font-size:14px; color:var(--txt2); font-weight:600; margin-bottom:5px}
.ls-list{display:flex; flex-direction:column; gap:1px}
.ls-row{
  display:flex; align-items:center; gap:0; padding:6px 9px; border-radius:7px;
  border:1px solid transparent;
}
.ls-row:hover{background:#f7faff; border-color:#e4ecfa}
/* 课序号：每本书从 01 连续编号，等宽数字保证竖排对齐 */
.ls-no{
  flex:none; min-width:26px; margin-right:9px; text-align:right;
  font-size:13px; font-weight:700; color:#9aa4b2;
  font-variant-numeric:tabular-nums; letter-spacing:.02em;
}
.ls-row:hover .ls-no{color:var(--brand)}
.ls-t{
  flex:0 1 auto; min-width:0; font-size:15px; line-height:1.5; color:var(--txt);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.ls-t:hover{color:var(--brand); text-decoration:none}
.ls-dots{flex:1 1 12px; min-width:12px; align-self:center; border-bottom:1px dotted #d7dce4; margin:0 9px}
.ls-b{flex:0 0 auto; display:flex; align-items:center; gap:4px}
.ls-bt{
  display:inline-flex; align-items:center; gap:2px; padding:0 7px; border-radius:5px;
  font-size:12px; line-height:1.75; font-weight:500; border:1px solid transparent;
  white-space:nowrap; color:var(--txt2); background:#f4f5f7;
}
.ls-bt b{font-weight:600; font-style:normal}
.ls-bt:hover{text-decoration:none; border-color:currentColor}
.ls-bt.k-note{background:#e8f0fb; color:#1f5ea8}
.ls-bt.k-concept{background:#e8f5ee; color:#14603d}
.ls-bt.k-pitfall{background:#fdecea; color:#a02c1e}
.ls-bt.k-qa{background:#fdf4e3; color:#8a5b0c}
.ls-bt.k-topic{background:#f0ebfa; color:#5b3ea8}
.ls-bt.k-stage{background:#e6f4f7; color:#1b6376}
.ls-bt.k-q{background:#eef0f3; color:#5b6472}
/* 无内容的版块只留极淡字迹：让已录入的彩色块一眼跳出来，同时保留「本课还没录」的信息。
   必须放在 k-* 之后 —— 同特异性下后定义者胜，否则底色会被彩色规则盖回去。 */
.ls-bt.off{background:transparent; color:#c8ced8}
.ls-bt.off:hover{background:#f4f5f7; color:#96a0af; border-color:#e2e6ec}
.m-only{display:none}

/* ---------- 某课中枢 ---------- */
/* 从教材目录点「易错」会跳到 #sec-pitfall，顶栏是 sticky 的，
   不留出这段距离的话目标卡片会被压住看不见 */
[id^="sec-"]{scroll-margin-top:68px}
.lh-head{display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:14px}
.lh-title{font-size:24px; margin:0 0 4px}
.lh-no{
  display:inline-block; margin-right:10px; padding:1px 9px; border-radius:8px;
  background:#eef2f8; color:#5b6472; font-size:15px; font-weight:700;
  font-variant-numeric:tabular-nums; vertical-align:2px;
}
.lh-nav{display:flex; gap:8px; flex:none}

/* 课内跳转条：一页内容多，先给五个版块的入口和条数 */
.lh-toc{display:flex; flex-wrap:wrap; gap:8px; margin:0 0 14px}
.lh-toc a{
  display:inline-flex; align-items:center; gap:6px; padding:6px 12px;
  border:1px solid var(--line); border-radius:16px; background:#fff;
  font-size:13.5px; color:var(--txt2);
}
.lh-toc a:hover{border-color:var(--brand2); color:var(--brand); text-decoration:none}
.lh-toc b{font-size:12px; font-weight:700; color:var(--brand); font-variant-numeric:tabular-nums}
.lh-toc b:empty{display:none}
.card h3{display:flex; align-items:center}

/* ---------- 某课中枢：全文阅读区 ---------- */
/* .ct-body 那套文章排版（h2 / p / table / p.li 编号悬挂缩进…）原样复用，
   in-card 只是把它的白底边框去掉 —— 它现在住在 .card 里面，再套一层框会变双框 */
.ct-body.in-card{
  background:transparent; border:0; border-radius:0; padding:0; margin:0;
  font-size:16px; line-height:1.9;
}
/* 正文里的小标题（「一、时间轴：」「1．分封制」这两级）要比板块标题小一号。
   原来 .ct-body h3 是 17px、板块标题 16px —— 条目标题比板块名字还大，
   读者分不清哪儿是新板块的开头。这里压到 15/16px，统一挂一道淡蓝竖线当「文内」标记，
   板块标题没有竖线、带计数徽标，两者就不会混 */
.ct-body.in-card h2{
  font-size:16px; margin:20px 0 9px; line-height:1.5;
  padding-left:10px; border-left:3px solid #c6d7ec;
}
.ct-body.in-card h3{
  font-size:15px; margin:15px 0 6px; line-height:1.5;
  padding-left:9px; border-left:3px solid #d3dfef;
}
.ct-body.in-card > :first-child{margin-top:0}

.lt-h{font-size:16px; font-weight:700; margin:2px 0 8px}
.lt-h a{color:var(--txt)}
.lt-h a:hover{color:var(--brand); text-decoration:none}
.lt-foot{display:flex; align-items:center; gap:8px; margin:12px 0 0; font-size:13px}
.lt-foot a{color:var(--txt3)}
.lt-foot a:hover{color:var(--brand)}
.lt-all{
  margin-left:auto; border:1px solid var(--line); background:#fff; color:var(--txt2);
  border-radius:14px; padding:2px 11px; font-size:12.5px; font-weight:500;
  cursor:pointer; font-family:inherit;
}
.lt-all:hover{border-color:var(--brand2); color:var(--brand)}

/* 秒懂概念：折叠成只显示概念名。用原生 details —— 不用 JS 也能点开，
   JS 只负责「展开全部」这一层便利 */
.acc-list{border-top:1px solid var(--line); margin-top:4px}
.acc{border-bottom:1px solid var(--line)}
.acc:last-child{border-bottom:0}
.acc-h{
  display:flex; align-items:center; gap:8px; padding:11px 2px; cursor:pointer;
  list-style:none; font-size:15.5px; font-weight:600; color:var(--txt);
}
.acc-h::-webkit-details-marker{display:none}
.acc-h:hover{color:var(--brand)}
.acc-t{flex:1; min-width:0; line-height:1.5}
/* ＋ / − 指示：竖线缩放消失即变减号，不加额外的字符与图标 */
.acc-x{flex:none; width:20px; height:20px; position:relative; border-radius:50%; background:#f1f4f9}
.acc-x::before,.acc-x::after{
  content:""; position:absolute; left:50%; top:50%; background:#7d8796;
  border-radius:1px; transform:translate(-50%,-50%);
}
.acc-x::before{width:9px; height:1.6px}
.acc-x::after{width:1.6px; height:9px; transition:transform .18s}
.acc[open] .acc-x::after{transform:translate(-50%,-50%) scaleY(0)}
.acc[open] .acc-h{color:var(--brand)}
.acc-b{padding:0 2px 12px}
.acc-b .ct-body{font-size:15.5px}
.acc-more{font-size:13px; margin-top:6px}
.acc-more a{color:var(--txt3)}
.acc-more a:hover{color:var(--brand)}

/* 易混易错：序号 + 标题 + 全文，条间虚线分隔。右侧 › 是通向内容详情页的唯一入口，
   常态压到很淡，鼠标移到这一条才浮起来，避免 26 条一排箭头太吵。
   左侧 34px 让给序号：这一课常有二十来条，编号比虚线好数 */
.pf{position:relative; padding:12px 24px 12px 34px; border-bottom:1px dashed var(--line)}
.pf:first-of-type{padding-top:4px}
.pf:last-child{border-bottom:0}
.pf-no{
  position:absolute; left:0; top:15px; font-size:12.5px; font-weight:700;
  line-height:1.6; color:var(--brand); opacity:.5; letter-spacing:.2px;
  font-variant-numeric:tabular-nums;
}
.pf:first-of-type .pf-no{top:7px}
.pf:hover .pf-no{opacity:.9}
.pf-t{display:block; font-size:15.5px; font-weight:600; line-height:1.55; color:var(--txt); margin-bottom:5px}
.pf-t:hover{color:var(--brand); text-decoration:none}
.pf .ct-body{font-size:15.5px; line-height:1.85}
.pf-go{
  position:absolute; right:0; top:12px; width:20px; height:20px; line-height:18px;
  text-align:center; border-radius:50%; font-size:15px; color:var(--txt3);
  opacity:.35; transition:opacity .15s, background .15s;
}
.pf:hover .pf-go{opacity:1; background:#f1f4f9; color:var(--brand); text-decoration:none}

.d-sub{margin-top:12px}
.d-sub:first-of-type{margin-top:4px}
.d-lab{font-size:14px; font-weight:600; color:var(--txt2); margin-bottom:6px}
.di{padding:6px 0; border-bottom:1px dashed var(--line); font-size:15px}
.di:last-child{border-bottom:0}
.di-s{color:var(--txt3); font-size:13px; margin-left:8px}

.qi{display:flex; gap:10px; align-items:baseline; padding:8px 8px; margin:0 -8px; border-bottom:1px dashed var(--line); border-radius:7px}
.qi:last-child{border-bottom:0}
/* 整行是链接：点正文节选就进那道题（周老师要求），所以 hover 要有整块反馈 */
a.qi{color:inherit}
a.qi:hover{background:#f7faff; text-decoration:none}
a.qi:hover .qi-stem{color:var(--brand)}
.qi-src{flex:none; font-size:12.5px; color:var(--brand); min-width:110px}
.qi-stem{flex:1; font-size:14.5px; color:var(--txt2); line-height:1.55}

/* ---------- 内容库列表 ---------- */
.kindtabs{display:flex; gap:6px; flex-wrap:wrap; margin:12px 0}
.kt{
  padding:6px 12px; border-radius:16px; border:1px solid var(--line);
  background:#fff; color:var(--txt2); font-size:14px;
}
.kt:hover{text-decoration:none; border-color:var(--brand2); color:var(--brand)}
.kt.on{background:var(--brand); border-color:var(--brand); color:#fff}
.kt-n{font-style:normal; font-size:11.5px; opacity:.75; margin-left:4px}
.kt-lab{flex:none; white-space:nowrap; font-size:13px; color:var(--txt2); margin-right:2px; align-self:center; line-height:1.2}

.clist{margin-top:12px; display:flex; flex-direction:column; gap:6px}
.cl-row{
  display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:9px;
  border:1px solid var(--line); background:#fff; color:var(--txt);
}
.cl-row:hover{border-color:var(--brand2); background:#fafcff; text-decoration:none}
.cl-kind{
  flex:none; width:26px; height:26px; border-radius:7px; display:flex;
  align-items:center; justify-content:center; font-size:12.5px; font-weight:600; color:#3c4453;
}
.cl-main{flex:1; min-width:0}
.cl-t{
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden; font-size:15.5px; font-weight:600; line-height:1.45;
}
.cl-s{
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden; font-size:13px; color:var(--txt3); margin-top:2px; line-height:1.5;
}

/* 平铺清单的排序切换（秒懂概念：首字拼音 / 课序） */
.sortrow{display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin:-4px 0 10px}
.sortrow .kt{padding:4px 10px; font-size:13px}
.sortrow-note{margin-left:auto; font-size:12.5px; color:var(--txt3)}
.cl-loc{flex:none; font-size:12.5px; color:var(--txt3); max-width:210px; text-align:right}

/* ---------- 内容详情 ---------- */
.ct-head{display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:10px}
.ct-kinds{margin-bottom:6px}
.kt-badge{
  display:inline-block; font-style:normal; font-size:12.5px; font-weight:600;
  padding:2px 9px; border-radius:5px; background:var(--soft); color:var(--brand);
}
.ct-title{font-size:26px; margin:2px 0 4px; line-height:1.35}
.ct-sub{color:var(--txt2); font-size:15px}
.ct-acts{display:flex; gap:8px; flex:none}
.btn.danger{color:var(--accent); border-color:#eccdc8}
.btn.danger:hover{background:#fdf0ee}
.ct-meta{display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin:8px 0}
.ct-meta .ml{font-size:13px; color:var(--txt3); flex:none}
.ct-body{
  background:#fff; border:1px solid var(--line); border-radius:12px;
  padding:22px 26px; margin:14px 0; font-size:16.5px; line-height:1.9;
}
.ct-body h2{font-size:19px; margin:22px 0 10px}
.ct-body h3{font-size:17px; margin:18px 0 8px}
.ct-body p{margin:0 0 12px}
.ct-body ul,.ct-body ol{padding-left:24px; margin:0 0 12px}
.ct-body table{border-collapse:collapse; width:100%; margin:12px 0; font-size:15px}
.ct-body th,.ct-body td{border:1px solid var(--line2); padding:7px 10px}
.ct-body th{background:var(--soft)}
.ct-body img{border-radius:6px; max-width:100%}
/* 复习笔记导入：分期对照行保留原空格对齐；序号行收紧行距 */
.ct-body p.pre{white-space:pre-wrap; font-variant-numeric:tabular-nums; margin-bottom:6px}
.ct-body p.num{margin-bottom:6px}
/* 自动编号段（①②③ / 1. / •）：编号单列 + 正文悬挂缩进 */
.ct-body p.li{padding-left:1.75em; text-indent:-1.75em; margin-bottom:7px}
.ct-body p.li1{padding-left:3.5em; text-indent:-1.75em}
.ct-body p.li2{padding-left:5.25em; text-indent:-1.75em}
.ct-body p.li .n{display:inline-block; width:1.75em; text-indent:0; color:#6b7280; font-variant-numeric:tabular-nums}

.lk{display:flex; align-items:center; gap:8px; padding:7px 0; border-bottom:1px dashed var(--line)}
.lk:last-child{border-bottom:0}
.lk-rel{
  flex:none; font-style:normal; font-size:11.5px; padding:1px 7px; border-radius:4px;
  background:#f0ebfa; color:#5b3ea8;
}
.lk-k{color:var(--txt3); font-size:12.5px}
.lk-x{
  border:0; background:transparent; color:var(--txt3); cursor:pointer;
  font-size:17px; line-height:1; padding:0 4px;
}
.lk-x:hover{color:var(--accent)}

.lk-pick{
  max-height:280px; overflow:auto; border:1px solid var(--line); border-radius:9px;
  padding:10px 12px; background:#fcfcfd; column-gap:18px;
}
.lk-book{font-size:13px; font-weight:600; color:var(--txt2); margin:9px 0 4px}
.lk-book:first-child{margin-top:0}
.lk-chk{display:inline-flex; align-items:center; gap:5px; font-size:14.5px; margin:0 14px 5px 0; cursor:pointer}
.lk-chk input{margin:0}
.chkline{display:inline-flex; align-items:center; gap:6px; font-size:14.5px; cursor:pointer}
.chkline input{margin:0}

/* ---------- 学生名册 ---------- */
.stu-list{display:flex; flex-direction:column; gap:8px; margin-top:12px}
.stu{border:1px solid var(--line); border-radius:10px; background:#fff; padding:10px 12px}
.stu.off{opacity:.62}
.stu-head{display:flex; align-items:center; gap:9px; flex-wrap:wrap; font-size:15px}
.stu-u{color:var(--txt3); font-size:13px}
.stu-c{font-size:12.5px; color:var(--txt2); background:#eef0f3; padding:1px 7px; border-radius:4px}
.stu-t{margin-left:auto; font-size:12px; color:var(--txt3)}
.stu-tools{display:flex; gap:8px; align-items:flex-end; margin-top:10px; flex-wrap:wrap}
.stu-tools .row{flex:1 1 auto; margin:0}
.stu-tools label{font-size:12.5px; margin-bottom:3px}
.stu-tools input, .stu-tools select{padding:6px 8px; font-size:14px}

/* ============================================================
   手机适配
   ============================================================ */
@media (max-width:760px){
  .me{display:none}

  .entry-head{flex-wrap:wrap; gap:8px}
  .entry-head h1{font-size:19px}

  .ls-list{gap:0}
  .ls-row{padding:7px 2px; gap:6px; align-items:center}
  .ls-t{
    flex:1 1 auto; font-size:15px; line-height:1.42; white-space:normal;
    display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2;
    overflow:hidden;
  }
  .ls-dots{display:none}
  .ls-b{gap:3px}
  .ls-bt{padding:0 4px; font-size:10.5px; gap:1px; line-height:1.75}
  .ls-bt.off{display:none}
  .m-only{display:inline}

  .lh-head{flex-direction:column; gap:9px}
  [id^="sec-"]{scroll-margin-top:74px}
  .lh-title{font-size:20px}
  .lh-nav{width:100%}
  .lh-nav .btn{flex:1; text-align:center}

  .cp-grid{grid-template-columns:1fr}
  .qi{flex-direction:column; gap:3px}
  .qi-src{min-width:0}

  /* 课内阅读区：手机上收紧序号、跳转条、折叠行字号 */
  .ls-no{min-width:22px; margin-right:6px; font-size:12px}
  .lh-toc{gap:6px}
  .lh-toc a{padding:5px 10px; font-size:12.5px}
  .acc-h{padding:10px 0; font-size:15px}
  .acc-b .ct-body,.pf .ct-body{font-size:15px}
  /* 手机上没有鼠标，右侧 › 常驻淡显就够了；左侧序号留白收窄一点，正文多两字 */
  .pf{padding-left:28px}
  .pf-no{top:14px}
  .pf:first-of-type .pf-no{top:6px}
  .lt-all{margin-left:0}

  .kindtabs{gap:5px; overflow-x:auto; flex-wrap:nowrap; padding-bottom:3px; align-items:center}
  .kt-lab{font-size:12.5px}
  .kt{flex:none; padding:6px 11px; font-size:13.5px}

  /* 平铺清单：手机上一行放不下「标题 + 定位」，改成块状流程 ——
     色块浮动在左上，标题与摘要占满宽度，「中国史 · 春秋战国」落到下一行。
     不用 flex-wrap 是因为 .cl-main 的 flex-basis 是 0，和 flex-basis:100% 的
     定位同时存在时两个会被塞进同一行，标题会被压没。 */
  .cl-row{display:block; padding:9px 10px}
  .cl-kind{float:left; width:23px; height:23px; font-size:11.5px; margin:1px 8px 0 0}
  .cl-main{display:block}
  .cl-loc{display:block; clear:both; max-width:none; margin-top:3px; text-align:left; font-size:12px}
  .cl-t{font-size:15px; line-height:1.4}
  .cl-s{font-size:12.5px}

  .ct-head{flex-direction:column; gap:10px}
  .ct-title{font-size:21px}
  .ct-acts{width:100%; flex-wrap:wrap}
  .ct-acts .btn{flex:1}
  .ct-body{padding:14px 13px; font-size:16px; line-height:1.85; border-radius:10px}
  .ct-body h2{font-size:18px}
  .ct-body h3{font-size:16.5px}
  .ct-body table{display:block; overflow-x:auto}

  .lk-pick{max-height:230px}

  .stu-head{gap:6px}
  .stu-t{margin-left:0; width:100%}
  .stu-tools{flex-direction:column; align-items:stretch}
  .stu-tools .row{flex-wrap:wrap}
  .stu-tools .btn{width:100%}

  /* 手机端输入控件必须 >=16px，否则 iOS 会自动放大页面 */
  input, select, textarea{font-size:16px}
  .stu-tools input, .stu-tools select{font-size:16px}
}

/* ---------- 教材模块 ---------- */
.tbbooks{display:flex; flex-direction:column; gap:10px; margin-top:14px}
.tbbook{
  display:flex; align-items:baseline; justify-content:space-between; gap:12px;
  padding:16px 18px; border:1px solid var(--line); border-radius:10px; background:#fff;
}
.tbbook:hover{text-decoration:none; border-color:var(--brand2); background:#f7faff}
.tbb-name{font-size:17px; font-weight:600; color:var(--txt)}
.tbb-meta{font-size:13.5px; color:var(--txt2); white-space:nowrap}

.tb-pg{font-size:12.5px; color:var(--txt2); font-variant-numeric:tabular-nums; white-space:nowrap}

.tb-pages{display:flex; flex-direction:column; align-items:center; gap:18px; margin-top:12px}
.tb-page{margin:0; width:100%; max-width:820px}
.tb-img{display:block}
.tb-img img{width:100%; height:auto; border:1px solid var(--line); border-radius:8px; background:#fff}
.tbp-n{font-size:12px; color:#9aa3b0; margin-bottom:4px; font-variant-numeric:tabular-nums}

.tb-text{margin-top:12px}
.tbp{padding:14px 0; border-bottom:1px dashed var(--line)}
.tbp:last-child{border-bottom:0}
.tbp-t{white-space:pre-wrap; line-height:1.85; font-size:15.5px}

@media (max-width:760px){
  .tbbook{padding:13px 13px; flex-direction:column; align-items:flex-start; gap:4px}
  .tbb-name{font-size:16px}
  .tbb-meta{font-size:12.5px}
  .tb-pages{gap:10px}
  .tbp-t{font-size:15px; line-height:1.8}
}

/* ---------- 操作日志 ---------- */
.logstat{display:flex; gap:10px; flex-wrap:wrap; margin:4px 0 14px}
.ls-item{flex:1 1 110px; background:#fff; border:1px solid var(--line); border-radius:10px; padding:9px 14px}
.ls-item b{display:block; font-size:22px; line-height:1.25; font-variant-numeric:tabular-nums}
.ls-item b.warn{color:var(--accent)}
.ls-item span{font-size:12.5px; color:var(--txt2)}

.logfilter{display:flex; gap:8px; flex-wrap:wrap; margin:0 0 14px; align-items:center}
.logfilter select,.logfilter input[type=text]{
  height:36px; border:1px solid var(--line2); border-radius:9px; padding:0 10px;
  font-size:14px; background:#fff; color:var(--txt); font-family:inherit;
}
.logfilter select{flex:0 0 150px}
.logfilter input[type=text]{flex:1 1 200px; min-width:0}

.logs{background:#fff; border:1px solid var(--line); border-radius:10px; overflow:hidden}
.logrow{display:flex; align-items:center; gap:12px; padding:9px 14px; border-bottom:1px solid var(--line)}
.logrow:last-child{border-bottom:0}
.logrow.is-del{background:#fdf7f6}
.log-side{flex:0 0 88px; display:flex; flex-direction:column; line-height:1.35; min-width:0}
.log-time{font-size:12.5px; color:var(--txt2); font-variant-numeric:tabular-nums}
.log-who{font-size:12px; color:var(--txt3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.log-main{flex:1 1 auto; min-width:0; display:flex; align-items:baseline; gap:8px}
.log-act{flex:none; font-size:12px; padding:1px 7px; border-radius:5px; background:var(--soft); color:var(--brand)}
.act-del{background:#fdeceb; color:var(--accent)}
.act-add{background:#eaf6ef; color:var(--ok)}
.act-import{background:#f3eefc; color:#6b46c1}
.act-restore{background:#eaf6ef; color:var(--ok)}
.act-status{background:#fdf5e6; color:var(--warn)}
.log-tgt{flex:none; font-size:12.5px; color:var(--txt3)}
.log-title{flex:0 1 auto; min-width:0; font-size:14.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.log-tail{flex:0 0 auto}
.log-done{font-size:12.5px; color:var(--txt3)}

@media (max-width:760px){
  .logstat .ls-item{flex:1 1 44%; padding:8px 12px}
  .logstat .ls-item b{font-size:19px}
  .logfilter select,.logfilter input[type=text]{flex:1 1 100%; font-size:16px}
  .logrow{flex-wrap:wrap; gap:5px 8px; padding:10px 12px}
  .log-side{flex:0 0 100%; flex-direction:row; align-items:baseline; gap:8px}
  .log-main{flex:1 1 100%}
  .log-title{flex:1 1 100%; white-space:normal; overflow:visible}
  .log-tail{flex:0 0 auto; margin-left:auto}
}

/* ---------- 定哥笔记：板块与类型同排（板块左、类型右） ---------- */
.ktrow{display:flex; align-items:center; gap:0 16px; flex-wrap:wrap; margin:12px 0}
.ktrow .kindtabs{margin:0}
/* 同一行时把类型推到最右；窄屏换行后必须归左，否则会右对齐显得断层 */
.ktrow .kindtabs + .kindtabs{margin-left:auto}
.flat-note{font-size:13px; font-weight:400; color:var(--txt3); margin-left:6px}

.lsearch{display:flex; gap:6px; align-items:center; flex:0 1 auto; max-width:340px}
.lsearch input[type=text]{
  height:34px; width:210px; min-width:0; border:1px solid var(--line2); border-radius:8px;
  padding:0 10px; font-size:14px; font-family:inherit; color:var(--txt); background:#fff;
}
.lsearch input[type=text]:focus{outline:none; border-color:var(--brand2)}

@media (max-width:760px){
  .ktrow{gap:6px 0; margin:10px 0}
  .ktrow .kindtabs + .kindtabs{margin-left:0}
  .lsearch{flex:1 1 100%; max-width:none}
  .lsearch input[type=text]{flex:1 1 auto; width:auto; font-size:16px}
}

/* 大事年表 → 课堂 PK 入口。夹在标题和搜索框之间，margin-right:auto 让它
   紧贴标题、把搜索框推回右边 */
.pk-go{margin-right:auto; white-space:nowrap}

/* ---------- 大事年表 ---------- */
/* 分期边界按区域不同（中国 1840/1949，世界 1500/1917），写在页头一行小字里，
   比在每个区块标题上标死年份更不容易对不上 */
.tl-rules{
  font-size:12.5px; line-height:1.7; color:var(--txt3);
  background:#f7f9fc; border:1px solid var(--line); border-radius:8px;
  padding:6px 10px; margin:0 0 4px;
}

/* 古代 / 近代 / 现代 三块，各用一套背景色 + 左侧色条。
   色板刻意压得很淡：正文黑字压在上面仍然够对比度，手机上也吃得消 */
.tl-block{
  /* --blk 是分期的浅底色；--blk-deep 是对应的深实色，给年份胶囊做底（浅字压深底） */
  --blk:#fff; --blk-line:#e3e8f0; --blk-ink:#5b6472; --blk-deep:#3c4653;
  background:var(--blk); border:1px solid var(--blk-line);
  border-left:4px solid var(--blk-ink);
  border-radius:12px; padding:14px 18px 10px; margin-bottom:16px;
}
.tl-anc{--blk:#fdf6e6; --blk-line:#e2d2ab; --blk-ink:#a87d21; --blk-deep:#8a6410}
.tl-mod{--blk:#edf5fd; --blk-line:#bfd6ed; --blk-ink:#2e6cab; --blk-deep:#1f5ea8}
.tl-con{--blk:#ecf9f1; --blk-line:#b3d9c3; --blk-ink:#2c8851; --blk-deep:#1b7a45}

.tl-block-h{
  display:flex; align-items:baseline; gap:10px; padding-bottom:8px;
  border-bottom:1px solid var(--blk-line);
}
.tl-block-n{font-size:17px; font-weight:700; color:var(--blk-ink); letter-spacing:.5px}
.tl-block-rg{font-size:12.5px; color:var(--blk-ink); opacity:.85; font-variant-numeric:tabular-nums}
.tl-block-c{font-size:12.5px; color:var(--txt3); font-variant-numeric:tabular-nums}
.tl-block-c em{font-style:normal; margin-left:4px}

/* --- 单区域：左年份、右事件 --- */
.tl-list{margin-top:2px}
.tl-row{display:flex; align-items:flex-start; padding:8px 0; border-bottom:1px solid rgba(0,0,0,.055)}
.tl-row:last-child{border-bottom:0}
.tl-y{
  flex:0 0 104px; padding-right:10px; text-align:right;
  font-size:14px; font-weight:600; color:var(--blk-ink);
  font-variant-numeric:tabular-nums; line-height:1.4;
  overflow-wrap:anywhere;
}
.tl-md{display:block; font-style:normal; font-size:11.5px; font-weight:400; color:var(--txt3)}

/* 竖轴：一条线 + 一个点 */
.tl-stem{flex:0 0 18px; position:relative; align-self:stretch}
.tl-stem::before{
  content:""; position:absolute; left:6px; top:-8px; bottom:-8px;
  width:1px; background:var(--blk-line);
}
.tl-row:first-child .tl-stem::before{top:8px}
.tl-row:last-child .tl-stem::before{bottom:auto; height:16px}
.tl-dot{
  position:absolute; left:2px; top:6px; width:9px; height:9px; border-radius:50%;
  background:var(--blk-ink); border:2px solid #fff;
}

.tl-e{flex:1 1 auto; min-width:0; font-size:15.5px; line-height:1.6}
/* 同一年的多条事件并成一行、用顿号分隔（2026-10-25 周老师要求「更紧凑」）。
   顿号做成「每条事件的后缀」而不是独立分隔符：换行时它只会留在上一行末尾，
   不会跑到行首（浏览器的中文断行规则本身也禁止顿号出现在行首）。 */
.tl-ev{display:inline}
.tl-ev:not(:last-child)::after{content:"、"}

/* --- 全部模式：中轴 + 左中国史 / 右世界史 对照 --- */
.tl3{margin-top:2px}
.tl3-hd{
  display:grid; grid-template-columns:1fr 104px 1fr; gap:0 14px;
  padding:6px 0 6px; font-size:12.5px; font-weight:600; color:var(--txt3);
}
.tl3-hd .tl3-c{text-align:right}
.tl3-hd .tl3-y{text-align:center}
.tl3-row{
  display:grid; grid-template-columns:1fr 104px 1fr; gap:0 14px;
  padding:8px 0; border-bottom:1px solid rgba(0,0,0,.055); align-items:start;
}
.tl3-row:last-child{border-bottom:0}
.tl3-c{text-align:right; font-size:15px; line-height:1.6; min-width:0}
.tl3-w{text-align:left; font-size:15px; line-height:1.6; min-width:0}
.tl3-ev{display:inline}
.tl3-ev:not(:last-child)::after{content:"、"}
/* 中轴：一条淡竖线，年份压在线上
   年份胶囊改「深底浅字」：底 = 本分期深实色，字 = #fff。
   box-shadow 第一层用块底色描一圈 3px，正好把中轴竖线干净地切断，
   第二层给一点投影让胶囊浮起来。 */
.tl3-y{position:relative; text-align:center; align-self:stretch}
.tl3-y::before{
  content:""; position:absolute; left:50%; top:-8px; bottom:-8px;
  width:1px; background:var(--blk-deep); opacity:.24; transform:translateX(-.5px);
}
.tl3-yv{
  position:relative; display:inline-block; padding:2px 10px; border-radius:12px;
  background:var(--blk-deep); border:1px solid var(--blk-deep);
  font-size:13.5px; font-weight:700; color:#fff; letter-spacing:.2px;
  font-variant-numeric:tabular-nums; line-height:1.45; white-space:nowrap;
  box-shadow:0 0 0 3px var(--blk), 0 1px 3px rgba(0,0,0,.16);
}

@media (max-width:760px){
  /* 手机上让筛选条整块占满一行并按需换行：flex 子项默认 min-width:auto
     会撑出容器导致右侧 chips 被裁掉，这里必须显式 min-width:0 */
  .ktrow .kindtabs{flex:1 1 100%; min-width:0; flex-wrap:wrap}
  .ktrow .kindtabs .kt-lab{flex:none}

  .tl-rules{font-size:12px; line-height:1.65}
  .tl-block{padding:12px 12px 8px; border-left-width:3px; border-radius:10px}
  .tl-block-n{font-size:16px}
  .tl-y{flex:0 0 78px; padding-right:6px; font-size:12.5px; line-height:1.3}
  .tl-e{font-size:15px}
  .tl3-c,.tl3-w{font-size:15px}

  /* 对照模式在 390px 上三栏只剩 90px 一栏，字挤成一条；
     改成「年份在上、中国史与世界史上下排」，对照关系还在，但读得清 */
  .tl3-hd{display:none}
  .tl3-row{grid-template-columns:1fr; gap:3px; padding:10px 0}
  .tl3-y{order:-1; text-align:left; padding-bottom:2px}
  .tl3-y::before{display:none}
  .tl3-yv{padding:1px 9px; font-size:13px}
  .tl3-c{text-align:left}
  .tl3-c::before,.tl3-w::before{
    display:inline-block; margin-right:5px; padding:0 5px; border-radius:4px;
    font-size:11px; line-height:1.6; vertical-align:1px;
  }
  .tl3-c::before{content:"中国"; background:#e8f0fb; color:#1f5ea8}
  .tl3-w::before{content:"世界"; background:#fdf1e3; color:#a8661a}
  /* 同一年的多条事件已在 .tl3-ev 里改成顿号连排，这里不再需要单独处理 */
  .tl3-c:empty,.tl3-w:empty{display:none}
}
