/* ============ C++ / Qt 学习之路 ============ */
:root {
  --bg: #f6f7f9;
  --bg-soft: #eef1f5;
  --panel: #ffffff;
  --border: #e3e7ee;
  --border-soft: #edf0f5;
  --text: #1e2530;
  --text-2: #4a5567;
  --text-3: #8b95a5;
  --accent: #2f6fed;
  --accent-soft: #eaf1fe;
  --accent-2: #0d9488;
  --warn: #ea580c;
  --code-bg: #1b2230;
  --code-text: #d7dee9;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);
  --radius: 10px;
  --mono: "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --topbar-h: 58px;
  --side-w: 290px;
}

html[data-theme="dark"] {
  --bg: #14181f;
  --bg-soft: #1a1f28;
  --panel: #1c222c;
  --border: #2a323e;
  --border-soft: #232a35;
  --text: #dfe5ee;
  --text-2: #a9b4c4;
  --text-3: #74808f;
  --accent: #6ea0ff;
  --accent-soft: #1c2b47;
  --code-bg: #10141b;
  --code-text: #d7dee9;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
b, strong { color: var(--text); font-weight: 600; }
.muted { color: var(--text-3); font-size: 13px; }

/* ---- 阅读进度条 ---- */
.read-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  background: transparent; z-index: 60; pointer-events: none;
}
.read-progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }

/* ---- 顶栏 ---- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h);
  background: var(--panel); border-bottom: 1px solid var(--border); z-index: 50;
  backdrop-filter: saturate(180%) blur(8px);
}
.topbar-inner {
  max-width: 1500px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 14px; padding: 0 16px;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--text); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-family: var(--mono); font-size: 15px; font-weight: 700;
}
.brand-text { font-size: 15px; letter-spacing: .2px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel); color: var(--text-2); cursor: pointer; font-size: 15px;
  display: grid; place-items: center; flex-shrink: 0;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--text); }
.menu-btn { display: none; }

/* ---- 搜索 ---- */
.search-box { position: relative; flex: 1; max-width: 460px; margin-left: auto; }
.search-box input {
  width: 100%; height: 36px; padding: 0 12px 0 34px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg-soft);
  color: var(--text); font-size: 14px; font-family: var(--sans); outline: none;
}
.search-box input:focus { border-color: var(--accent); background: var(--panel); }
.search-box::before {
  content: "\1F50D"; position: absolute; left: 11px; top: 8px; font-size: 13px; opacity: .45;
}
.search-result {
  position: absolute; top: 42px; left: 0; right: 0; background: var(--panel);
  border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow);
  max-height: 60vh; overflow-y: auto; display: none; z-index: 70;
}
.search-result.show { display: block; }
.sr-item { display: block; padding: 9px 13px; border-bottom: 1px solid var(--border-soft); color: var(--text); }
.sr-item:last-child { border-bottom: none; }
.sr-item:hover { background: var(--bg-soft); text-decoration: none; }
.sr-title { font-size: 14px; font-weight: 600; display: block; }
.sr-title mark { background: #ffe9a8; color: inherit; border-radius: 2px; padding: 0 1px; }
.sr-meta { font-size: 12px; color: var(--text-3); display: block; margin-top: 2px; }
.sr-empty { padding: 14px; color: var(--text-3); font-size: 14px; text-align: center; }

/* ---- 布局 ---- */
.layout {
  max-width: 1500px; margin: 0 auto; padding-top: var(--topbar-h);
  display: flex; align-items: flex-start;
}
.sidebar {
  width: var(--side-w); flex-shrink: 0; position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h)); border-right: 1px solid var(--border);
  background: var(--panel);
}
.side-scroll { height: 100%; overflow-y: auto; padding: 16px 10px 40px; }
.side-scroll::-webkit-scrollbar { width: 7px; }
.side-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.side-head { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--text-3); padding: 4px 10px 8px; }
.side-progress { font-size: 12px; color: var(--text-3); padding: 0 10px 6px; }
.side-progress b { color: var(--accent); font-weight: 700; }
.side-bar { height: 4px; background: var(--bg-soft); border-radius: 3px; margin: 0 10px 14px; overflow: hidden; }
.side-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .25s; }
.side-part { margin-bottom: 6px; }
.side-part-h {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: none; border: none; cursor: pointer; text-align: left; color: var(--text);
  font-family: var(--sans); font-size: 13.5px; font-weight: 600; border-radius: 8px;
}
.side-part-h:hover { background: var(--bg-soft); }
.dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.sp-no { color: var(--text-3); font-weight: 500; font-size: 12px; }
.sp-name { flex: 1; }
.caret { font-size: 10px; color: var(--text-3); transition: transform .18s; }
.side-part.closed .caret { transform: rotate(-90deg); }
.side-part.closed .side-list { display: none; }
.side-list { list-style: none; margin: 2px 0 8px; padding: 0 0 0 8px; }
.side-list li a {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 7px;
  font-size: 13.5px; color: var(--text-2); line-height: 1.5;
}
.side-list li a:hover { background: var(--bg-soft); text-decoration: none; }
.side-list li a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-list .num {
  width: 20px; text-align: right; font-size: 11.5px; color: var(--text-3); font-family: var(--mono); flex-shrink: 0;
}
.side-list .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chk {
  width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid var(--border); flex-shrink: 0;
  cursor: pointer; position: relative; transition: .15s;
}
.chk:hover { border-color: var(--accent); }
.chk.done { background: var(--accent); border-color: var(--accent); }
.chk.done::after {
  content: ""; position: absolute; left: 3.5px; top: 1px; width: 4px; height: 7px;
  border: solid #fff; border-width: 0 1.6px 1.6px 0; transform: rotate(43deg);
}

.main { flex: 1; min-width: 0; padding: 30px 40px 70px; }
.toc {
  width: 230px; flex-shrink: 0; position: sticky; top: calc(var(--topbar-h) + 24px);
  max-height: calc(100vh - var(--topbar-h) - 48px); overflow-y: auto; padding: 0 16px 40px 8px;
}
.toc-title { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--text-3); margin-bottom: 10px; }
.toc a {
  display: block; font-size: 13px; color: var(--text-2); padding: 4px 0 4px 10px;
  border-left: 2px solid var(--border); line-height: 1.55;
}
.toc a:hover { color: var(--accent); text-decoration: none; }
.toc a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.toc a.toc-3 { padding-left: 22px; font-size: 12.5px; color: var(--text-3); }
.mask { display: none; }

/* ---- 首页 Hero ---- */
.hero {
  background: linear-gradient(135deg, #eaf1fe 0%, #f6f7f9 55%, #eafaf6 100%);
  border: 1px solid var(--border); border-radius: 16px; padding: 46px 44px; margin-bottom: 34px;
}
html[data-theme="dark"] .hero { background: linear-gradient(135deg, #1b2436 0%, #171c25 55%, #16262a 100%); }
.hero-tag {
  display: inline-block; font-size: 12.5px; color: var(--accent); background: var(--panel);
  border: 1px solid var(--border); border-radius: 20px; padding: 4px 14px; margin-bottom: 18px;
}
.hero-title { font-size: 34px; line-height: 1.35; margin: 0 0 16px; letter-spacing: -.4px; font-weight: 800; }
.hero-desc { font-size: 16px; color: var(--text-2); max-width: 760px; margin: 0 0 26px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 30px; margin-bottom: 26px; }
.stat b { display: block; font-size: 26px; font-weight: 800; color: var(--text); line-height: 1.2; }
.stat span { font-size: 13px; color: var(--text-3); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; height: 42px; padding: 0 22px; border-radius: 9px;
  border: 1px solid var(--border); background: var(--panel); color: var(--text);
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.btn:hover { text-decoration: none; background: var(--bg-soft); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }

/* ---- 首页区块 ---- */
.sec-h { font-size: 21px; margin: 0 0 18px; font-weight: 700; }
.who { margin-bottom: 38px; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.who-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px;
}
.who-card h3 { font-size: 15px; margin: 0 0 8px; }
.who-card p { font-size: 14px; color: var(--text-2); margin: 0; line-height: 1.75; }

.parts { display: grid; gap: 16px; }
.part-card {
  background: var(--panel); border: 1px solid var(--border); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 20px 22px;
}
.pc-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.pc-no { font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .5px; }
.pc-name { font-size: 18px; margin: 0; font-weight: 700; }
.pc-desc { font-size: 14.5px; color: var(--text-2); margin: 0 0 8px; }
.pc-goal { font-size: 14px; color: var(--text-3); margin: 0 0 14px; }
.pc-goal b { color: var(--text-2); }
.pc-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2px; }
.pc-list li a {
  display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 7px; font-size: 14px;
  color: var(--text-2);
}
.pc-list li a:hover { background: var(--bg-soft); text-decoration: none; color: var(--accent); }
.pc-list .n { font-family: var(--mono); font-size: 12px; color: var(--text-3); width: 22px; }
.pc-list .ti { flex: 1; }
.pc-list .lv { font-size: 11px; color: var(--text-3); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; }

.tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.tip { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; }
.tip b { display: block; font-size: 14.5px; margin-bottom: 4px; }
.tip span { font-size: 13.5px; color: var(--text-2); }

/* ---- 章节页 ---- */
.chapter { max-width: 860px; }
.crumb { font-size: 13px; color: var(--text-3); margin-bottom: 14px; }
.crumb a { color: var(--text-3); }
.crumb .sep { margin: 0 7px; }
.ch-title { font-size: 31px; line-height: 1.35; margin: 0 0 10px; font-weight: 800; letter-spacing: -.3px; }
.ch-summary { font-size: 16.5px; color: var(--text-2); margin: 0 0 16px; }
.ch-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid var(--border); }
.badge { font-size: 12px; padding: 2px 10px; border-radius: 20px; font-weight: 600; }
.badge.b-basic { background: #e6f6ee; color: #0f7b52; }
.badge.b-adv { background: #fff0e6; color: #b8480f; }
html[data-theme="dark"] .badge.b-basic { background: #14342a; color: #4ecf9a; }
html[data-theme="dark"] .badge.b-adv { background: #38231a; color: #ff9d63; }
.chip { font-size: 12px; color: var(--text-3); border: 1px solid var(--border); border-radius: 20px; padding: 2px 10px; }

.ch-body { font-size: 16px; }
.ch-body h2 {
  font-size: 22px; margin: 40px 0 14px; padding-bottom: 8px; font-weight: 700;
  border-bottom: 1px solid var(--border-soft); letter-spacing: -.2px;
}
.ch-body h3 { font-size: 17.5px; margin: 28px 0 10px; font-weight: 700; }
.ch-body h4 { font-size: 15.5px; margin: 22px 0 8px; font-weight: 700; color: var(--text-2); }
.ch-body p { margin: 0 0 15px; color: var(--text); }
.ch-body ul, .ch-body ol { margin: 0 0 16px; padding-left: 24px; }
.ch-body li { margin-bottom: 6px; }
.ch-body li > ul, .ch-body li > ol { margin: 6px 0; }
.ch-body blockquote {
  margin: 18px 0; padding: 12px 18px; background: var(--bg-soft);
  border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; color: var(--text-2); font-size: 15px;
}
.ch-body blockquote p:last-child { margin-bottom: 0; }
.ch-body blockquote ul:last-child, .ch-body blockquote ol:last-child { margin-bottom: 0; }
.ch-body hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.ch-body code {
  font-family: var(--mono); font-size: 13.5px; background: var(--bg-soft);
  border: 1px solid var(--border-soft); border-radius: 4px; padding: 1px 5px; color: #c0392b;
}
html[data-theme="dark"] .ch-body code { color: #ff9d8a; }
.anchor-h { position: relative; scroll-margin-top: 78px; }
.anchor {
  position: absolute; left: -22px; top: 0; color: var(--text-3); opacity: 0; font-weight: 400;
  font-size: .8em; text-decoration: none !important;
}
.anchor-h:hover .anchor { opacity: .6; }

.table-wrap { overflow-x: auto; margin: 18px 0 22px; }
.ch-body table { border-collapse: collapse; width: 100%; font-size: 14.5px; background: var(--panel); }
.ch-body th, .ch-body td { border: 1px solid var(--border); padding: 9px 13px; text-align: left; }
.ch-body th { background: var(--bg-soft); font-weight: 700; }
.ch-body tbody tr:nth-child(even) { background: var(--bg-soft); }

/* ---- 代码块 ---- */
.code-block {
  margin: 20px 0 24px; border-radius: 10px; overflow: hidden;
  background: var(--code-bg); border: 1px solid #2a3341;
}
.code-head {
  display: flex; align-items: center; justify-content: space-between; height: 34px;
  padding: 0 8px 0 14px; background: rgba(255, 255, 255, .04); border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.code-lang { font-size: 11.5px; color: #8fa0b8; font-family: var(--mono); letter-spacing: .5px; }
.code-copy {
  font-size: 11.5px; color: #8fa0b8; background: transparent; border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 5px; padding: 2px 9px; cursor: pointer; font-family: var(--sans);
}
.code-copy:hover { color: #fff; border-color: rgba(255, 255, 255, .35); }
.code-copy.ok { color: #5ddba0; border-color: #5ddba0; }
.code-block pre {
  margin: 0; padding: 15px 18px; overflow-x: auto; font-family: var(--mono);
  font-size: 13.5px; line-height: 1.72; color: var(--code-text); tab-size: 4;
}
.code-block pre::-webkit-scrollbar { height: 8px; }
.code-block pre::-webkit-scrollbar-thumb { background: #3a4759; border-radius: 4px; }
.code-block code { background: none; border: none; padding: 0; color: inherit; font-size: inherit; }
.c-c { color: #6b7c93; font-style: italic; }
.c-s { color: #a8e6a1; }
.c-k { color: #ff9ec4; }
.c-t { color: #74d0ff; }
.c-f { color: #ffd580; }
.c-n { color: #f9a8a8; }
.c-m { color: #c4a5ff; }
.c-p { color: #9fb4d4; }
.c-ns { color: #74d0ff; }
.c-a { color: #74d0ff; }
.c-v { color: #ffd580; }
.c-i { color: var(--code-text); }

/* ---- 翻页 / 完成按钮 ---- */
.pager { display: flex; gap: 12px; margin: 44px 0 20px; flex-wrap: wrap; }
.pager-item {
  flex: 1; min-width: 200px; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 18px; color: var(--text);
}
.pager-item:hover { border-color: var(--accent); text-decoration: none; }
.pager-item.next { text-align: right; }
.pg-label { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 3px; }
.pg-title { display: block; font-size: 15px; font-weight: 600; color: var(--accent); }
.done-wrap { margin-top: 8px; }
.done-btn {
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 20px; font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer;
  font-family: var(--sans);
}
.done-btn:hover { border-color: var(--accent); color: var(--accent); }
.done-btn.done { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---- 页脚 ---- */
.footer { border-top: 1px solid var(--border); background: var(--panel); }
.footer-inner { max-width: 1500px; margin: 0 auto; padding: 24px 40px; font-size: 13.5px; color: var(--text-2); }
.footer-inner p { margin: 0 0 4px; }

/* ---- 响应式 ---- */
@media (max-width: 1240px) {
  .toc { display: none; }
}
@media (max-width: 900px) {
  .menu-btn { display: grid; }
  .brand-text { display: none; }
  .sidebar {
    position: fixed; left: 0; top: var(--topbar-h); z-index: 45; transform: translateX(-100%);
    transition: transform .22s ease; box-shadow: var(--shadow);
  }
  .sidebar.open { transform: translateX(0); }
  .mask {
    display: block; position: fixed; inset: var(--topbar-h) 0 0; background: rgba(0, 0, 0, .35);
    z-index: 40; opacity: 0; pointer-events: none; transition: opacity .22s;
  }
  .mask.show { opacity: 1; pointer-events: auto; }
  .main { padding: 22px 18px 60px; }
  .hero { padding: 30px 22px; }
  .hero-title { font-size: 25px; }
  .ch-title { font-size: 25px; }
  .ch-body h2 { font-size: 20px; }
  .search-box { max-width: none; }
  .footer-inner { padding: 20px 18px; }
  .anchor { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .hero-stats { gap: 18px; }
  .stat b { font-size: 21px; }
}

/* ============ 配图 ============ */
.fig { margin: 26px 0 30px; }
.fig svg { width: 100%; height: auto; display: block; }
.fig figcaption {
  text-align: center; font-size: 13px; color: var(--text-3); margin-top: 8px; line-height: 1.6;
}

/* ============ 案例卡片（首页） ============ */
.sec-sub { font-size: 13px; font-weight: 400; color: var(--text-3); margin-left: 10px; }
.case-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.case-card {
  display: flex; flex-direction: column; background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; color: var(--text);
}
.case-card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.case-card:hover { box-shadow: var(--shadow); }
.case-tag {
  align-self: flex-start; font-size: 11.5px; color: #0891b2; background: #e0f5fb;
  border-radius: 4px; padding: 1px 8px; margin-bottom: 8px;
}
html[data-theme="dark"] .case-tag { background: #10333d; color: #67d3e8; }
.case-name { font-size: 15.5px; font-weight: 700; margin-bottom: 6px; }
.case-sum { font-size: 13.5px; color: var(--text-2); flex: 1; line-height: 1.7; }
.case-go { font-size: 13px; color: var(--accent); font-weight: 600; margin-top: 10px; }

/* ============ 侧边栏笔记入口 & 笔记标记 ============ */
.side-notes {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 10px 14px; padding: 8px 10px; border-radius: 8px;
  background: var(--bg-soft); font-size: 13.5px; font-weight: 600; color: var(--text);
}
.side-notes:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.sn-count {
  font-size: 11.5px; background: var(--accent); color: #fff; border-radius: 10px;
  padding: 0 7px; min-width: 20px; text-align: center;
}
.nmark { width: 6px; height: 6px; border-radius: 50%; background: #f59e0b; flex-shrink: 0; display: none; }
.nmark.has { display: block; }

/* ============ 章节页笔记面板 ============ */
.notes {
  margin-top: 34px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--panel); padding: 16px 18px 14px;
}
.notes-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.notes-title { font-size: 15px; font-weight: 700; }
.note-status { font-size: 12.5px; color: #0f7b52; }
.note-status.err { color: var(--warn); }
.note-acts { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.note-btn {
  font-size: 12.5px; padding: 4px 11px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--text-2); cursor: pointer; font-family: var(--sans);
}
.note-btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.note-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.note-btn.primary:hover { color: #fff; filter: brightness(1.08); }
.note-input {
  width: 100%; min-height: 130px; resize: vertical; padding: 12px 14px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg-soft);
  color: var(--text); font-family: var(--sans); font-size: 14.5px; line-height: 1.75; outline: none;
}
.note-input:focus { border-color: var(--accent); background: var(--panel); }
.note-input::placeholder { color: var(--text-3); }
.note-preview {
  margin-top: 12px; padding: 12px 14px; border: 1px dashed var(--border); border-radius: 8px;
  font-size: 14.5px; line-height: 1.75; color: var(--text-2); display: none; word-break: break-word;
}
.note-preview.show { display: block; }
.note-preview h1, .note-preview h2, .note-preview h3 { font-size: 15.5px; margin: 10px 0 6px; }
.note-preview code {
  font-family: var(--mono); font-size: 13px; background: var(--bg-soft);
  border-radius: 4px; padding: 1px 5px; color: #c0392b;
}
.note-preview pre {
  background: var(--code-bg); color: var(--code-text); padding: 10px 14px; border-radius: 8px;
  overflow-x: auto; font-family: var(--mono); font-size: 13px;
}
.note-preview pre code { background: none; color: inherit; padding: 0; }
.note-preview ul, .note-preview ol { padding-left: 22px; margin: 6px 0; }
.note-preview blockquote {
  margin: 8px 0; padding: 6px 12px; border-left: 3px solid var(--accent); color: var(--text-3);
}
.note-tip { font-size: 12.5px; color: var(--text-3); margin-top: 10px; }

/* ============ 笔记总览页 ============ */
.notes-page { max-width: 900px; }
.np-title { font-size: 28px; margin: 0 0 8px; font-weight: 800; }
.np-desc { color: var(--text-2); margin: 0 0 16px; font-size: 15px; }
.np-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.btn.danger { color: #b91c1c; border-color: #fecaca; }
.btn.danger:hover { background: #fee2e2; }
.np-stat {
  font-size: 14px; color: var(--text-2); padding: 10px 16px; background: var(--bg-soft);
  border-radius: 8px; margin-bottom: 20px;
}
.np-stat b { color: var(--accent); }
.np-list { display: grid; gap: 12px; }
.np-item {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px;
}
.np-item-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.np-item-part { font-size: 12px; color: var(--text-3); }
.np-item-title { font-size: 15px; font-weight: 700; }
.np-item-title:hover { color: var(--accent); }
.np-item-body { font-size: 14px; color: var(--text-2); white-space: pre-wrap; line-height: 1.75; }
.np-empty {
  text-align: center; padding: 60px 20px; color: var(--text-3); font-size: 15px;
  border: 1px dashed var(--border); border-radius: 12px;
}

@media (max-width: 900px) {
  .np-title { font-size: 23px; }
  .note-acts { margin-left: 0; width: 100%; }
}
