:root {
  --bg: #fbfaf7;
  --fg: #26292c;
  --muted: #7a7f85;
  --line: #e4e2dc;
  --accent: #2eb1c2;
  --accent-ink: #1d8694;
  --code-bg: #f1efe9;
  --quote: #5d6166;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1d20;
    --fg: #dcdcd6;
    --muted: #8d9197;
    --line: #34373c;
    --accent: #2eb1c2;
    --accent-ink: #5cc9d6;
    --code-bg: #25282c;
    --quote: #a9adb2;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, serif;
  font-size: 17px;
  line-height: 1.85;
}
main { max-width: 760px; margin: 0 auto; padding: 8px 16px 80px; }
.site-header { max-width: 760px; margin: 0 auto; padding: 20px 16px 0; font-size: 14px; }
.site-header a { color: var(--muted); text-decoration: none; }
.site-header a:hover { color: var(--accent-ink); }
a { color: var(--accent-ink); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
a:hover { border-bottom-color: var(--accent); }
h1, h2, h3, h4, h5, h6 { line-height: 1.4; margin: 1.8em 0 0.6em; scroll-margin-top: 16px; }
h1 { font-size: 1.7em; }
h2 { font-size: 1.4em; border-bottom: 1px solid var(--line); padding-bottom: 0.2em; }
h3 { font-size: 1.2em; }
.note-title { margin-top: 0.8em; margin-bottom: 0.2em; }
.note-meta { color: var(--muted); font-size: 14px; margin: 0 0 2em; }
p { margin: 0.8em 0; }
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
blockquote { margin: 1em 0; padding: 0.2em 1em; border-left: 3px solid var(--accent); color: var(--quote); }
code { font-family: "Cascadia Code", Consolas, "Lucida Console", monospace; font-size: 0.88em; background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; }
pre { background: var(--code-bg); padding: 12px 14px; border-radius: 6px; overflow-x: auto; line-height: 1.55; }
pre code { background: none; padding: 0; }
table { border-collapse: collapse; display: block; overflow-x: auto; max-width: 100%; margin: 1em 0; }
th, td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
th { background: var(--code-bg); }
ul, ol { padding-left: 1.6em; }
li > p { margin: 0.2em 0; }
.task-list-item { list-style: none; }
.task-list-item-checkbox { margin: 0 0.4em 0 -1.4em; }
mark { background: color-mix(in srgb, var(--accent) 28%, transparent); color: inherit; padding: 0 0.15em; }
.np-muted, .np-hidden { color: var(--muted); font-style: italic; }
.math.display { display: block; overflow-x: auto; text-align: center; margin: 1em 0; }
.footnotes { font-size: 0.9em; color: var(--quote); border-top: 1px solid var(--line); margin-top: 3em; }
/* callout */
.callout { margin: 1em 0; padding: 10px 14px; border-radius: 6px; border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.callout[data-callout="warning"], .callout[data-callout="caution"], .callout[data-callout="attention"] { border-left-color: #e0952f; background: color-mix(in srgb, #e0952f 10%, transparent); }
.callout[data-callout="danger"], .callout[data-callout="error"], .callout[data-callout="bug"], .callout[data-callout="failure"] { border-left-color: #d6534d; background: color-mix(in srgb, #d6534d 10%, transparent); }
.callout[data-callout="success"], .callout[data-callout="check"], .callout[data-callout="done"], .callout[data-callout="tip"] { border-left-color: #3fa66a; background: color-mix(in srgb, #3fa66a 10%, transparent); }
.callout[data-callout="quote"], .callout[data-callout="cite"] { border-left-color: var(--muted); background: color-mix(in srgb, var(--muted) 8%, transparent); }
.callout-title { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.callout-icon { display: inline-flex; }
.callout-icon svg { width: 18px; height: 18px; }
.callout-content > :first-child { margin-top: 0.4em; }
.callout-content > :last-child { margin-bottom: 0.2em; }
/* 嵌入 */
.np-embed { margin: 1em 0; padding: 4px 14px; border-left: 2px solid var(--line); }
.np-embed-title { font-size: 14px; color: var(--muted); margin-top: 6px; }
/* 画布 */
:root { --cv-edge: #a3a7ad; --cv-node-bg: #ffffff; }
@media (prefers-color-scheme: dark) { :root { --cv-edge: #6b7077; --cv-node-bg: #23262a; } }
body.canvas-page main, body.canvas-page .site-header { max-width: none; }
body.canvas-page main { padding-bottom: 16px; }
.canvas-body { margin: 0 -16px; }
.cv-viewport { position: relative; height: calc(100vh - 170px); min-height: 360px; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background-color: var(--bg); background-image: radial-gradient(color-mix(in srgb, var(--fg) 14%, transparent) 1px, transparent 1px); background-size: 22px 22px; touch-action: none; cursor: grab; }
.cv-viewport:active { cursor: grabbing; }
.cv-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.cv-toolbar { position: absolute; right: 12px; top: 12px; z-index: 5; display: flex; gap: 4px; }
.cv-toolbar button { font: inherit; font-size: 14px; min-width: 34px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--fg); cursor: pointer; }
.cv-toolbar button:hover { border-color: var(--accent); }
.cv-edges { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.cv-edges path { fill: none; stroke-width: 2.5; }
.cv-node { position: absolute; border-radius: 8px; }
.cv-text, .cv-file, .cv-link { --node-color: var(--line); border: 2px solid var(--node-color); background: var(--cv-node-bg); overflow: hidden; }
.cv-colored.cv-text, .cv-colored.cv-file, .cv-colored.cv-link { background: color-mix(in srgb, var(--node-color) 9%, var(--cv-node-bg)); }
.cv-content { height: 100%; overflow: auto; scrollbar-width: thin; padding: 2px 12px; font-size: 15px; line-height: 1.6; }
.cv-content p { margin: 0.35em 0; }
.cv-content > :first-child { margin-top: 0.4em; }
.cv-content h1, .cv-content h2, .cv-content h3 { margin: 0.6em 0 0.3em; }
.cv-content .np-embed { margin: 0; padding: 0; border: 0; }
.cv-file img, .cv-content > img:only-child { display: block; width: 100%; height: 100%; object-fit: contain; }
.cv-file .cv-content:has(> img:only-child) { padding: 0; }
.cv-link .cv-content { display: flex; align-items: center; word-break: break-all; }
.cv-group { --node-color: var(--muted); border: 2px solid color-mix(in srgb, var(--node-color) 55%, transparent); background: color-mix(in srgb, var(--node-color) 6%, transparent); }
.cv-group-label { position: absolute; left: 0; bottom: 100%; margin-bottom: 4px; font-size: 18px; font-weight: 700; color: var(--node-color); white-space: nowrap; }
.cv-edge-label { position: absolute; transform: translate(-50%, -50%); padding: 0 6px; font-size: 14px; line-height: 1.5; background: var(--bg); color: var(--quote); border-radius: 4px; white-space: nowrap; }
/* 首页 */
.index-title { margin-top: 1em; }
.note-list { list-style: none; padding: 0; }
.note-list li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.note-list a { border-bottom: 0; }
.note-list time { color: var(--muted); font-size: 14px; white-space: nowrap; }
.empty, .notice-page { color: var(--muted); }
.notice-page { margin-top: 4em; text-align: center; }
/* 代码高亮（Obsidian 渲染时带的 Prism token） */
.token.comment, .token.prolog { color: var(--muted); font-style: italic; }
.token.keyword, .token.important { color: #b0569e; }
.token.string, .token.attr-value { color: #4f9a4a; }
.token.number, .token.boolean { color: #c1772c; }
.token.function { color: var(--accent-ink); }
@media (max-width: 600px) {
  body { font-size: 16px; line-height: 1.8; }
  h1 { font-size: 1.45em; }
  .note-list li { flex-direction: column; gap: 2px; }
}
