/* 学习站 · 版式（浅色） */
:root {
  color-scheme: light;
  --fg: #1f2937;
  --fg2: #4b5563;
  --fg3: #9aa3af;
  --bg: #ffffff;
  --bg2: #fafafa;
  --bg3: #f6f8fa;
  --bd: #e5e7eb;
  --bd2: #d1d5db;
  --accent: #0f766e;
  --accent2: #0d9488;
  --accent-bg: #f0fdfa;
  --maxw: 780px;
  --side-w: 268px;
  --toc-w: 216px;
  --top-h: 56px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--top-h) + 64px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.85 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: #ccfbf1; }

/* ── 顶栏 ── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  height: var(--top-h); padding: 0 20px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bd);
}
.brand { display: flex; align-items: baseline; gap: 8px; font-weight: 700; font-size: 17px; color: var(--fg); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand small { font-weight: 400; font-size: 12px; color: var(--fg3); }
.topbar nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: nowrap; overflow-x: auto; min-width: 0; scrollbar-width: none; }
.topbar nav::-webkit-scrollbar { display: none; }
.topbar nav a { padding: 6px 12px; border-radius: 8px; font-size: 14px; color: var(--fg2); white-space: nowrap; }
.topbar nav a:hover { background: var(--bg3); text-decoration: none; }
.topbar nav a.on { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
#menuBtn {
  display: none; border: 1px solid var(--bd2); background: transparent; color: var(--fg);
  width: 36px; height: 36px; border-radius: 8px; font-size: 16px; cursor: pointer;
}

/* ── 布局 ── */
.layout { display: flex; align-items: flex-start; }

/* ── 侧栏 ── */
.side {
  position: sticky; top: var(--top-h);
  height: calc(100vh - var(--top-h));
  overflow-y: auto;
  width: var(--side-w); flex: 0 0 var(--side-w);
  background: var(--bg2);
  border-right: 1px solid var(--bd);
  padding: 14px 12px 60px;
  font-size: 14px;
}
.sidenote { font-size: 12px; color: var(--fg3); padding: 0 8px 10px; border-bottom: 1px dashed var(--bd); margin-bottom: 10px; }
.navgroup { margin-bottom: 14px; }
.gh { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--fg3); margin: 0 8px 4px; }
.side a, .side .pending { display: block; padding: 4px 8px; border-radius: 6px; color: var(--fg2); line-height: 1.5; }
.side a:hover { background: #eef2f1; text-decoration: none; }
.side a.on { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.side .pending { color: #c3c9d2; cursor: default; }
.side .sub { padding-left: 14px; }
.side details { margin: 2px 0; }
.side summary { cursor: pointer; padding: 4px 8px; border-radius: 6px; color: var(--fg2); list-style-position: inside; }
.side summary:hover { background: #eef2f1; }

/* ── 主区 ── */
.main { flex: 1; min-width: 0; display: flex; justify-content: center; gap: 44px; padding: 34px 32px 90px; }
.article { width: 100%; max-width: var(--maxw); min-width: 0; }
.crumb { font-size: 13px; color: var(--fg3); margin-bottom: 22px; }
.crumb i { font-style: normal; color: var(--bd2); margin: 0 4px; }
.meta { font-size: 12.5px; color: var(--fg3); margin: -6px 0 26px; overflow-wrap: break-word; }

/* 正文 */
.content h1 { font-size: 25px; line-height: 1.5; margin: 0 0 .5em; padding-bottom: .35em; border-bottom: 1px solid var(--bd); }
.content h2 { font-size: 20px; line-height: 1.5; margin: 1.9em 0 .7em; }
.content h3 { font-size: 17px; line-height: 1.5; margin: 1.6em 0 .6em; }
.content h4 { font-size: 15.5px; margin: 1.4em 0 .5em; }
.content p { margin: .85em 0; }
.content ul, .content ol { padding-left: 1.6em; margin: .85em 0; }
.content li { margin: .25em 0; }
.content { overflow-wrap: break-word; }
.content table { width: 100%; border-collapse: collapse; margin: 0; font-size: 14.5px; line-height: 1.7; }
.tablewrap { overflow-x: auto; margin: 1.1em 0; }
.tablewrap table { margin: 0; }
.content th, .content td { border: 1px solid var(--bd); padding: 7px 10px; vertical-align: top; text-align: left; }
.content th { background: var(--bg3); font-weight: 600; }
.content tr:nth-child(2n) td { background: #fbfcfd; }
.content li.task-list-item { list-style: none; }
.content .task-list-item input[type="checkbox"] { margin: 0 .5em 0 -1.35em; vertical-align: baseline; }
.content blockquote {
  margin: 1em 0; padding: .55em 1em;
  border-left: 3px solid var(--accent2);
  background: #f7fafa; color: var(--fg2);
  border-radius: 0 8px 8px 0;
}
.content blockquote p { margin: .4em 0; }
.content code { background: var(--bg3); padding: 2px 6px; border-radius: 6px; font-size: .9em; font-family: 'JetBrains Mono', Consolas, monospace; }
.content pre { background: var(--bg3); border: 1px solid var(--bd); border-radius: 10px; padding: 12px 14px; overflow: auto; line-height: 1.6; }
.content pre code { background: none; padding: 0; }
.content hr { border: 0; border-top: 1px solid var(--bd); margin: 2.2em 0; }
.content img { max-width: 100%; height: auto; border-radius: 8px; }
.content strong { color: #111827; }
.content a { border-bottom: 1px solid #99e5db; }
.content a:hover { text-decoration: none; border-bottom-color: var(--accent); }

/* 目录 */
.toc {
  position: sticky; top: calc(var(--top-h) + 68px);
  width: var(--toc-w); flex: 0 0 var(--toc-w);
  max-height: calc(100vh - var(--top-h) - 116px); overflow-y: auto;
  font-size: 13px; line-height: 1.6;
}
.toc .th { font-weight: 700; color: var(--fg3); font-size: 12px; letter-spacing: .06em; margin-bottom: 8px; }
.toc a { display: block; padding: 3px 8px; color: var(--fg2); border-left: 2px solid var(--bd); }
.toc a:hover { color: var(--accent); text-decoration: none; }
.toc a.lv3 { padding-left: 20px; font-size: 12.5px; }

/* 上/下一篇 */
.prevnext {
  display: flex; justify-content: space-between; gap: 18px;
  margin-top: 60px; padding-top: 18px; border-top: 1px solid var(--bd);
  font-size: 14px;
}

/* ── 首页 ── */
.homewrap { width: 100%; max-width: 920px; margin: 0 auto; }
.hero { padding: 54px 8px 6px; text-align: center; }
.hero h1 { font-size: 34px; margin: 0 0 10px; }
.hero .tag { color: var(--fg2); margin: 0; }
.samplebanner {
  margin: 22px 8px 0; padding: 11px 16px;
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
  border-radius: 10px; font-size: 13.5px; line-height: 1.7;
}
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 26px 8px 8px; }
.card {
  display: block; border: 1px solid var(--bd); border-radius: 14px;
  padding: 22px 22px 18px; color: var(--fg);
  transition: border-color .15s, box-shadow .15s;
}
.card:hover { text-decoration: none; border-color: var(--accent); box-shadow: 0 6px 22px rgba(15, 118, 110, .08); }
.card .ico { font-size: 26px; }
.card h2 { margin: 8px 0 6px; font-size: 19px; }
.card p { margin: 0; color: var(--fg2); font-size: 13.5px; }
.recent { padding: 34px 8px 60px; }
.recent h3 { font-size: 15px; color: var(--fg2); margin: 0 0 10px; }
.recent ul { list-style: none; margin: 0; padding: 0; }
.recent li { display: flex; align-items: baseline; gap: 14px; padding: 9px 4px; border-bottom: 1px dashed var(--bd); }
.recent li .d { margin-left: auto; color: var(--fg3); font-size: 12.5px; white-space: nowrap; }

/* ── 分区首页列表 ── */
.sectiondesc { color: var(--fg2); font-size: 14px; }
.idxgroup { margin-top: 30px; }
.idxgroup h2 { font-size: 17px; margin: 0 0 10px; }
.idxparent { font-weight: 600; color: var(--fg2); margin: 14px 0 4px; font-size: 14.5px; }
.idxrow {
  display: flex; align-items: baseline; gap: 12px;
  padding: 8px 12px; margin: 6px 0;
  border: 1px solid var(--bd); border-radius: 10px;
  color: var(--fg); font-size: 14.5px; background: #fff;
}
.idxrow:hover { text-decoration: none; border-color: var(--accent); }
.idxrow .d { margin-left: auto; color: var(--fg3); font-size: 12.5px; white-space: nowrap; }
.idxrow.pending { color: #c3c9d2; cursor: default; background: var(--bg2); }

/* ── 工具页（iframe 包装） ── */
.toolmode .main { padding: 0; display: block; }
.toolwrap { height: calc(100vh - var(--top-h)); display: flex; flex-direction: column; }
.toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px; font-size: 13px;
  border-bottom: 1px solid var(--bd); background: var(--bg2);
}
.toolbar .sep { color: var(--bd2); }
.toolbar .tb-title { font-weight: 600; }
.toolbar .tb-open { margin-left: auto; }
.toolbar .tb-left { display: flex; gap: 8px; align-items: center; color: var(--fg2); }
.toolframe { flex: 1; width: 100%; border: 0; background: #fff; }

/* ── 阅读状态 / 操作条（吸顶：滚动时已读/收藏/笔记按钮始终可见） ── */
.actionbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  position: sticky; top: var(--top-h); z-index: 40;
  margin: 0 0 22px; padding: 9px 0 10px;
  background: var(--bg); border-bottom: 1px solid var(--bd);
}
.actionbar button {
  font: inherit; font-size: 13.5px; padding: 5px 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--bd2); background: #fff; color: var(--fg2);
}
.actionbar button:hover { border-color: var(--accent); color: var(--accent); }
.actionbar button.on { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.actionbar button.hasnote { border-color: var(--accent2); color: var(--accent2); }
#abStatus { font-size: 12.5px; color: var(--fg3); margin-left: auto; }
.notepanel {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 14px;
  width: min(760px, calc(100vw - 32px)); z-index: 90;
  padding: 10px 14px 12px; border: 1px solid var(--bd2); border-radius: 14px;
  background: #fff; box-shadow: 0 12px 40px rgba(0, 0, 0, .16);
}
.np-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 13px; color: var(--fg3); }
.np-close { border: 0; background: none; color: var(--fg3); font-size: 15px; cursor: pointer; padding: 2px 8px; border-radius: 6px; font-family: inherit; }
.np-close:hover { background: var(--bg3); color: var(--fg); }
.notepanel textarea {
  width: 100%; min-height: 110px; resize: vertical; font: inherit; font-size: 14.5px; line-height: 1.7;
  padding: 10px 12px; border: 1px solid var(--bd); border-radius: 8px; background: #fff; color: var(--fg);
}
.notepanel textarea:focus { outline: none; border-color: var(--accent); }
.np-status { font-size: 12px; color: var(--fg3); margin-top: 6px; text-align: right; }
/* 轻提示 */
.toast {
  position: fixed; left: 18px; bottom: 18px; z-index: 85;
  display: flex; align-items: center; gap: 10px;
  background: #111827; color: #fff; font-size: 13px;
  padding: 9px 14px; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
  transition: opacity .35s ease;
}
.toast.out { opacity: 0; }
.toast button {
  font: inherit; font-size: 12.5px; padding: 4px 10px; border-radius: 6px;
  border: 0; background: #0f766e; color: #fff; cursor: pointer;
}

/* 划词批注 */
.annMark { background: #fef3c7; border-bottom: 1px dashed #b45309; cursor: pointer; }
#annBtn {
  position: fixed; z-index: 95; display: none;
  font: inherit; font-size: 13px; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--accent); background: #fff; color: var(--accent);
  box-shadow: 0 6px 20px rgba(15, 118, 110, .2); cursor: pointer;
}
.np-ann {
  display: flex; align-items: center; gap: 8px;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px;
  padding: 6px 10px; margin-bottom: 8px; font-size: 12.5px; color: #92400e;
}
.np-quote { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-ann button {
  font: inherit; font-size: 12px; padding: 3px 9px; border-radius: 6px; cursor: pointer;
  border: 1px solid #fcd34d; background: #fff; color: #92400e; white-space: nowrap;
}
.np-ann button:hover { border-color: #b45309; }

/* 笔记页：批注卡 */
.lc-quote {
  margin-top: 8px; padding: 8px 12px; border-left: 3px solid #fcd34d;
  background: #fffbeb; color: #92400e; font-size: 13.5px; border-radius: 0 8px 8px 0;
}

/* 工具页动作条 */
.tb-ab { display: flex; align-items: center; gap: 6px; margin-left: 14px; }
.tb-ab button {
  font: inherit; font-size: 12.5px; padding: 3px 10px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--bd2); background: #fff; color: var(--fg2);
}
.tb-ab button:hover { border-color: var(--accent); color: var(--accent); }
.tb-ab button.on { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.tb-ab button.hasnote { border-color: var(--accent2); color: var(--accent2); }
.tb-ab #abStatus { margin-left: 4px; }
.tb-pdf {
  font: inherit; font-size: 12.5px; padding: 3px 10px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
  text-decoration: none; white-space: nowrap;
}
.tb-pdf:hover { background: var(--accent2); border-color: var(--accent2); color: #fff; }
.tb-pdf[hidden] { display: none !important; }

/* ── 顶栏用户区 ── */
.userbox { display: flex; align-items: center; gap: 10px; margin-left: 14px; font-size: 13.5px; color: var(--fg2); white-space: nowrap; }
.userbox .ub-name { font-weight: 600; color: var(--fg); }
.userbox .ub-link { color: var(--fg2); }
.userbox .ub-link:hover { color: var(--accent); text-decoration: none; }

/* 授权条目锁标 */
.side a.locked, a.idxrow.locked { color: var(--fg3); }
.lockIco { margin-left: 5px; font-size: 11px; }

/* 登录 / 注册卡片 */
.authcard { max-width: 380px; margin: 56px auto 0; border: 1px solid var(--bd); border-radius: 16px; padding: 30px 28px 24px; box-shadow: 0 10px 40px rgba(0, 0, 0, .06); background: #fff; }
.auth-title { margin: 0 0 10px; font-size: 24px; text-align: center; }
.authmsg { font-size: 13px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 8px 12px; margin: 12px 0 4px; }
.fhint { display: block; font-size: 12px; margin-top: 4px; color: #b91c1c; }
.fhint.ok { color: #15803d; }
.authform label { display: block; font-size: 13.5px; color: var(--fg2); margin: 12px 0 0; }
.authform input { display: block; width: 100%; margin-top: 5px; font: inherit; font-size: 15px; padding: 9px 12px; border: 1px solid var(--bd2); border-radius: 9px; background: #fff; color: var(--fg); }
.authform input:focus { outline: none; border-color: var(--accent); }
.authbtn { display: block; width: 100%; margin-top: 16px; font: inherit; font-size: 15px; padding: 10px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; cursor: pointer; font-weight: 600; }
.authbtn.small { display: inline-block; width: auto; padding: 6px 14px; font-size: 13.5px; margin: 8px 0; }
.authbtn:hover { background: var(--accent2); }
.authbtn:disabled { opacity: .6; cursor: default; }
.authswitch { text-align: center; margin-top: 14px; font-size: 13.5px; }
.authswitch a { margin: 0 8px; }
.authprivacy { font-size: 12px; line-height: 1.6; color: var(--fg3); margin: 4px 0 2px; }
.authconsent { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 7px; font-size: 13px; line-height: 1.6; color: var(--fg2); margin: 6px 0 2px; }
.authconsent input { margin-top: 4px; }
.authconsent .fhint { flex-basis: 100%; }
.profmodal { position: fixed; inset: 0; z-index: 200; background: rgba(15, 23, 42, .55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.profcard { width: min(460px, 100%); max-height: 90vh; overflow: auto; background: #fff; border-radius: 16px; padding: 24px 26px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.profcard h2 { margin: 0 0 6px; font-size: 20px; }
.profdesc { font-size: 13px; color: var(--fg2); margin: 0 0 8px; line-height: 1.6; }
.profcard label { display: block; font-size: 13.5px; color: var(--fg2); margin: 10px 0 0; }
.profcard input:not([type="checkbox"]) { display: block; width: 100%; margin-top: 5px; padding: 9px 12px; border: 1px solid var(--bd2); border-radius: 9px; font: inherit; font-size: 14px; color: var(--fg); background: #fff; }
.profcard input:not([type="checkbox"]):focus { outline: none; border-color: var(--accent); }
.profconsent { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 7px; font-size: 13px; line-height: 1.6; }
.profconsent input { margin-top: 4px; }
.profconsent .fhint { flex-basis: 100%; }
.profmsg { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: #fef2f2; color: #b91c1c; font-size: 13px; }
.profexit { text-align: center; font-size: 13px; margin: 12px 0 0; }
body.prof-open { overflow: hidden; }

/* 管理页 */
.admrow { display: flex; flex-direction: column; gap: 4px; }
.admctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--fg2); margin-top: 6px; }
.admctl select, .admctl input { font: inherit; font-size: 13px; padding: 4px 8px; border: 1px solid var(--bd2); border-radius: 7px; background: #fff; color: var(--fg); }
.admctl button { font: inherit; font-size: 13px; padding: 4px 12px; border: 1px solid var(--accent); background: #fff; color: var(--accent); border-radius: 7px; cursor: pointer; }
.admctl button:hover { background: var(--accent-bg); }
.admbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0 4px; font-size: 13.5px; color: var(--fg2); }
.admbar input[type="search"], .admbar input[type="text"] { font: inherit; font-size: 13.5px; padding: 6px 12px; border: 1px solid var(--bd2); border-radius: 999px; width: 220px; background: #fff; color: var(--fg); }
.admbar input[type="search"]:focus, .admbar input[type="text"]:focus { outline: none; border-color: var(--accent); }
.admbar input[type="text"] { width: 320px; }
.adm-allbox { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.adm-barright { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.adm-barright select { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--bd2); border-radius: 7px; background: #fff; color: var(--fg); }
.adm-sort { display: flex; align-items: center; gap: 6px; }
.adm-sort select { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--bd2); border-radius: 7px; background: #fff; color: var(--fg); }
.adm-titlerow { display: flex; align-items: center; gap: 8px; }
.privIco { margin-left: 5px; font-size: 11px; }
.adm-missing { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #fff7ed; color: #b45309; border: 1px solid #fed7aa; font-size: 11px; font-weight: 600; }
.adm-subtitle { font-size: 15px; margin: 22px 0 8px; }
.admstat { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin: 12px 0 16px; }
.admstat > div { border: 1px solid var(--bd); border-radius: 12px; padding: 12px 10px; background: var(--bg2); text-align: center; }
.admstat b { display: block; font-size: 22px; line-height: 1.2; color: var(--accent); }
.admstat span { font-size: 12px; color: var(--fg2); }
.admtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.admtable th, .admtable td { padding: 7px 8px; border-bottom: 1px solid var(--bd); text-align: left; }
.admtable th { color: var(--fg2); font-weight: 600; background: var(--bg2); }
.admbar-cell { position: relative; min-width: 90px; }
.admbar-cell i { position: absolute; left: 0; top: 2px; bottom: 2px; background: var(--accent-bg); border-radius: 4px; z-index: 0; }
.admbar-cell span { position: relative; z-index: 1; }
.adm-datatabs { display: flex; gap: 6px; margin: 12px 0 14px; }
.adm-dtab { font: inherit; font-size: 13.5px; padding: 6px 16px; border: 1px solid var(--bd2); border-radius: 999px; background: #fff; color: var(--fg2); cursor: pointer; }
.adm-dtab:hover { border-color: var(--accent); color: var(--accent); }
.adm-dtab.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.admoverview { margin-bottom: 8px; }
.admoverview td:first-child { width: 90px; }
.adm-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.adm-two .adm-subtitle { margin-top: 14px; }
.admdetails { margin-top: 16px; border: 1px solid var(--bd); border-radius: 12px; padding: 10px 14px; background: var(--bg2); }
.admdetails summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--fg2); }
.admdetails[open] summary { margin-bottom: 10px; }
.adm-rangehint { font-size: 12px; color: var(--fg3); }
.admbar input[type="date"] { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--bd2); border-radius: 7px; background: #fff; color: var(--fg); }
@media (max-width: 880px) {
  .adm-two { grid-template-columns: 1fr; gap: 4px; }
}

/* 管理页：左侧设置导航 + 右侧内容 */
.adminmode .homewrap { max-width: 1160px; }
.adminmode .article { max-width: 1120px; }
.admin-shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 26px; align-items: start; }
.admin-nav { position: sticky; top: calc(var(--top-h) + 16px); background: var(--bg2); border: 1px solid var(--bd); border-radius: 14px; padding: 8px; }
.admin-nav .adm-navtitle { font-size: 12px; color: var(--fg3); letter-spacing: 1px; padding: 6px 10px 8px; }
.admin-nav .adm-navbtn { display: block; width: 100%; text-align: left; padding: 10px 12px; margin: 2px 0; border: 0; border-radius: 9px; background: transparent; color: var(--fg2); font: inherit; font-size: 14px; cursor: pointer; }
.admin-nav .adm-navbtn:hover { background: var(--bg3); color: var(--fg); }
.admin-nav .adm-navbtn.on { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.admin-panel { display: none; margin-top: 0; }
.admin-panel.on { display: block; }
.admin-scroll { max-height: 58vh; overflow-y: auto; padding-right: 4px; overscroll-behavior: contain; }
@media (max-width: 880px) {
  .adminmode .homewrap, .adminmode .article { max-width: none; }
  .admin-shell { grid-template-columns: 1fr; gap: 12px; }
  .admin-nav { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 6px; }
  .admin-nav .adm-navtitle { display: none; }
  .admin-nav .adm-navbtn { width: auto; white-space: nowrap; padding: 8px 12px; }
  .admin-scroll { max-height: none; }
}

/* 禁复制（打印时彻底隐藏正文） */
@media print {
  body.no-copy .layout, body.no-copy .topbar, body.no-copy .notepanel { display: none !important; }
  body.no-copy::before { content: "该内容不允许打印。"; display: block; padding: 60px 40px; font-size: 20px; color: #1f2937; }
}

/* 已读标记 */
.side a.isread::after { content: "✓"; color: var(--accent2); margin-left: 6px; font-size: 12px; }
.newchip { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: #e11d48; color: #fff; font-size: 10.5px; line-height: 16px; vertical-align: 1px; letter-spacing: .04em; }
.noticebox { margin: 4px 0 16px; padding: 13px 18px; border: 1px solid #f3d9a4; background: #fffbeb; border-radius: 14px; }
.noticebox .nb-h { font-weight: 700; color: #92400e; margin-bottom: 4px; font-size: 14px; }
.noticebox .nb-item { display: flex; gap: 12px; align-items: baseline; padding: 3px 0; }
.noticebox .nb-t { flex: 1; color: #4b5563; font-size: 14px; white-space: pre-wrap; overflow-wrap: break-word; }
.noticebox .nb-d { font-size: 12px; color: #9aa3af; white-space: nowrap; }
.idxrow.isread span:first-child::before { content: "✓ "; color: var(--accent2); }
.readcount { float: right; font-size: 12.5px; color: var(--fg3); font-weight: 400; }

/* 顶栏搜索 */
.searchbox { margin-left: auto; display: flex; }
.searchbox input {
  font: inherit; font-size: 13.5px; width: 180px; padding: 6px 12px;
  border: 1px solid var(--bd2); border-radius: 999px; background: #fff; color: var(--fg);
}
.searchbox input:focus { outline: none; border-color: var(--accent); }
.topbar nav { margin-left: 12px; }
.searchlink { display: none; margin-left: auto; font-size: 17px; padding: 4px 8px; }

/* 首页：继续阅读 / 快捷入口 */
.continue-card {
  display: flex; align-items: baseline; gap: 14px;
  margin: 20px 8px 0; padding: 14px 18px;
  border: 1px solid var(--bd); border-radius: 12px; background: #fff;
}
.cc-h { font-size: 13px; color: var(--fg3); }
.cc-title { font-size: 16px; font-weight: 600; }
.cc-time { margin-left: auto; font-size: 12.5px; color: var(--fg3); }
.quicklinks { padding: 16px 8px 0; display: flex; gap: 20px; font-size: 14px; }

/* 列表页（收藏 / 笔记） */
.listcard { position: relative; border: 1px solid var(--bd); border-radius: 12px; padding: 14px 16px; margin: 12px 0; }
.listcard .lc-title { font-size: 16px; font-weight: 600; }
.listcard .lc-meta { font-size: 12.5px; color: var(--fg3); margin-top: 4px; }
.lc-del {
  position: absolute; top: 12px; right: 12px; font-size: 12.5px; cursor: pointer;
  background: none; border: 1px solid var(--bd2); border-radius: 8px; padding: 3px 10px; color: var(--fg2);
}
.lc-del:hover { border-color: #b91c1c; color: #b91c1c; }
textarea.lc-note {
  width: 100%; margin-top: 10px; min-height: 70px; font: inherit; font-size: 14px; line-height: 1.7;
  padding: 8px 10px; border: 1px solid var(--bd); border-radius: 8px; background: var(--bg2);
}
.empty { color: var(--fg3); }
.deadlink { color: var(--fg3); border-bottom: 1px dotted var(--bd2); cursor: help; }

/* 搜索页 */
.srchinput {
  width: 100%; font: inherit; font-size: 16px; padding: 12px 16px;
  border: 1px solid var(--bd2); border-radius: 12px; margin: 18px 0 6px;
}
.srchinput:focus { outline: none; border-color: var(--accent); }
.srchitem { display: block; padding: 14px 16px; border: 1px solid var(--bd); border-radius: 12px; margin: 10px 0; color: var(--fg); }
.srchitem:hover { border-color: var(--accent); text-decoration: none; }
.si-title { font-weight: 600; font-size: 15.5px; }
.si-path { font-size: 12.5px; color: var(--fg3); margin: 3px 0; }
.si-snip { font-size: 13.5px; color: var(--fg2); line-height: 1.7; }
.si-snip mark { background: #fde68a; padding: 0 2px; border-radius: 3px; }

/* ── 响应式 ── */
@media (max-width: 1380px) {
  /* 中等宽度：收起副标题、压缩间距和搜索框，保证顶栏五个导航项一行放得下 */
  .brand small { display: none; }
  .searchbox input { width: 150px; }
  .topbar { padding: 0 14px; }
  .topbar nav a { padding: 6px 10px; }
}
@media (max-width: 1180px) {
  .toc { display: none; }
}
@media (max-width: 880px) {
  #menuBtn { display: block; }
  .side {
    position: fixed; top: var(--top-h); left: 0; bottom: 0; z-index: 60;
    transform: translateX(-100%); transition: transform .18s ease;
    box-shadow: 12px 0 30px rgba(0, 0, 0, .08);
    width: 290px; flex-basis: 290px; height: auto;
  }
  body.nav-open .side { transform: none; }
  .main { padding: 22px 20px 70px; }
  .cards { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
  .brand small { display: none; }
  .topbar { gap: 10px; padding: 0 14px; }
  .topbar nav { flex-wrap: nowrap; overflow-x: auto; }
  .searchbox { display: none; }
  .searchlink { display: block; }
  #abStatus { flex-basis: 100%; margin-left: 0; }
  .notepanel { bottom: 0; width: 100%; border-radius: 14px 14px 0 0; }
  .topbar nav a { padding: 5px 9px; font-size: 13.5px; }
  .topbar nav a:first-child { display: none; }
  .content h1 { font-size: 21px; }
  .content h2 { font-size: 18.5px; }
}

/* ── 页脚（ICP 备案号） ── */
.site-footer {
  padding: 22px 16px 28px;
  text-align: center;
  font-size: 12px;
  color: var(--fg2);
  border-top: 1px solid var(--bd);
  margin-top: 30px;
}
.site-footer a { color: var(--fg2); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer .sep { margin: 0 8px; color: var(--bd2); }
