/* 笔记、知识点页、学习星图（notes.js，第一轮 2026-10-18）。颜色全用 style.css 的变量，深色浅色跟着手机走。 */

/* 资料首页上的两张入口卡片 */
.notes-entry-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
.notes-entry { min-width:0; }
.notes-entry .study-entry-symbol { font:600 26px var(--font);letter-spacing:-1px;background:var(--btn);-webkit-background-clip:text;background-clip:text;color:transparent;min-width:56px;text-align:center; }
.notes-entry .notes-sky-symbol { font-size:34px; }
.notes-entry strong { font-size:21px; }
.notes-entry .small { color:var(--fg2); }
/* 手机上两张并排的小卡（整体布局和图表）：符号、条数、名字；长说明和“打开 →”收起来，卡片本身就是按钮 */
@media (max-width:760px) {
  .notes-entry-grid { gap:10px; }
  .notes-entry.material-study-entry { flex-direction:column; align-items:flex-start; flex-wrap:nowrap; gap:6px; padding:16px 16px 14px; border-radius:20px; }
  .notes-entry .study-entry-symbol { min-width:0; text-align:left; font-size:22px; line-height:1.2; }
  .notes-entry .notes-sky-symbol { font-size:26px; }
  .notes-entry strong { font-size:17px; }
  .notes-entry > span:nth-child(2) { gap:2px; }
  .notes-entry > span:nth-child(2) > .small,.notes-entry > span:last-child { display:none; }
}

/* 一页 */
.notes-page { display:grid;gap:18px;max-width:760px;padding-bottom:40px; }
.notes-back { justify-self:start;min-height:44px;padding:8px 0;color:var(--accent-ink);font-size:14px; }
.notes-body { display:grid;gap:18px;min-width:0; }
.notes-head { display:grid;gap:6px;min-width:0; }
.notes-head h1 { margin:0;font-size:30px;font-weight:700;letter-spacing:-.4px;overflow-wrap:anywhere; }
.notes-head .sub { margin:0;color:var(--fg2); }
.notes-actions { gap:10px;flex-wrap:wrap; }
.notes-error,.notes-page .link.danger { color:var(--danger-ink); }
.notes-foot { display:grid;gap:6px;padding-top:6px;border-top:1px solid var(--line); }
.notes-foot .row { gap:18px;flex-wrap:wrap; }
.notes-chips { display:flex;gap:8px;overflow-x:auto;padding:2px;margin:-2px;scrollbar-width:none;-webkit-overflow-scrolling:touch; }
.notes-chips::-webkit-scrollbar { display:none; }
.notes-chips .chip { flex:none;transition:background .3s cubic-bezier(.32,.72,0,1),color .3s cubic-bezier(.32,.72,0,1),box-shadow .3s cubic-bezier(.32,.72,0,1); }
.notes-chips .chip[aria-pressed=true] { background:var(--fg);color:var(--on-fg);box-shadow:0 0 0 1px var(--fg); }

/* 笔记卡片 */
.note-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
.note-card,.note-backlink { display:grid;gap:6px;min-width:0;padding:18px 20px;text-align:left;background:var(--surface);border-radius:22px;box-shadow:0 0 0 1px var(--ring);transition:background .28s cubic-bezier(.32,.72,0,1); }
.note-card strong,.note-backlink strong { font-size:17px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.note-card-text { font-size:13px;line-height:1.7;color:var(--fg2);overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden; }
.note-backlink .small { line-height:1.7;overflow-wrap:anywhere; }
@media(hover:hover) { .note-card:hover,.note-backlink:hover,.note-mention-open:hover { background:var(--tint); } }
.notes-empty { grid-column:1/-1; }
@media (max-width:760px) { .note-grid { grid-template-columns:1fr;gap:10px; } .notes-head h1 { font-size:26px; } }

/* 笔记正文 */
.note-doc { display:grid;gap:12px;padding:22px 24px;background:var(--surface);border-radius:24px;box-shadow:0 0 0 1px var(--ring);line-height:1.85;font-size:16px;overflow-wrap:anywhere;min-width:0; }
.note-doc > * { margin:0; }
.note-doc .note-h { line-height:1.4;margin-top:6px; }
.note-doc h2.note-h { font-size:22px; } .note-doc h3.note-h { font-size:19px; } .note-doc h4.note-h,.note-doc h5.note-h,.note-doc h6.note-h { font-size:17px; }
.note-doc blockquote { padding:4px 0 4px 16px;border-left:3px solid var(--a2);color:var(--fg2); }
.note-doc blockquote p { margin:0; }
.note-doc hr { border:0;border-top:1px solid var(--line);margin:4px 0; }
.note-doc code,.note-math { font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.92em;padding:1px 6px;border-radius:6px;background:var(--soft);box-shadow:0 0 0 1px var(--line); }
.note-math { font-style:italic; }
.note-code { margin:0;padding:14px 16px;border-radius:14px;background:var(--soft);overflow-x:auto;font-size:14px;line-height:1.6;white-space:pre; }
.note-code code { padding:0;background:none;box-shadow:none; }
.note-doc mark { background:color-mix(in srgb,var(--warm) 28%,transparent);color:var(--fg);border-radius:4px;padding:0 2px; }
.note-doc a { color:var(--accent-ink);text-decoration:underline;text-underline-offset:3px; }
.note-list { padding-left:22px;display:grid;gap:4px; }
.note-list li.lv1 { margin-left:20px; } .note-list li.lv2 { margin-left:40px; } .note-list li.lv3 { margin-left:60px; }
.note-list li.task { list-style:none;margin-left:-22px;display:flex;gap:10px;align-items:baseline; }
.note-list li.task.lv1 { margin-left:-2px; } .note-list li.task.lv2 { margin-left:18px; } .note-list li.task.lv3 { margin-left:38px; }
.note-check { flex:none;width:16px;height:16px;border-radius:5px;box-shadow:inset 0 0 0 1.5px var(--fg3);transform:translateY(2px); }
.note-list li.done { color:var(--fg2); }
.note-list li.done .note-check { background:var(--btn);box-shadow:none; }
.note-table { overflow-x:auto; }
.note-table table { border-collapse:collapse;font-size:14.5px;min-width:100%; }
.note-table th,.note-table td { padding:8px 12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top; }
.note-table th { font-weight:600; }
.note-empty { color:var(--fg2); }
/* [[链接]]：连到知识点的是蓝紫色，连到笔记的是青色，还没有这篇的是灰色虚线 */
.wiki { display:inline;padding:0 2px;margin:0 1px;font:inherit;color:var(--accent-ink);background:none;border-radius:6px;
  text-decoration:underline;text-decoration-thickness:1.5px;text-underline-offset:4px;text-decoration-color:color-mix(in srgb,var(--a2) 55%,transparent);
  transition:background .28s cubic-bezier(.32,.72,0,1),color .28s cubic-bezier(.32,.72,0,1);cursor:pointer;overflow-wrap:anywhere; }
.wiki.note { color:color-mix(in srgb,var(--a3) 75%,var(--fg));text-decoration-color:color-mix(in srgb,var(--a3) 55%,transparent); }
.wiki.missing { color:var(--fg2);text-decoration-style:dashed;text-decoration-color:var(--fg3); }
@media(hover:hover) { .wiki:hover { background:var(--tint); } }
.note-kp-chip { justify-self:start;min-height:40px;padding:8px 14px;border-radius:999px;background:var(--tint);color:var(--accent-ink);font-size:14px;font-weight:600;text-align:left; }
.note-ai { display:grid;gap:2px;padding:12px 16px;border-radius:18px;background:var(--soft);box-shadow:0 0 0 1px var(--line); }
.note-ai p { margin:0; }

/* 反向链接和未链接提及 */
.notes-section { display:grid;gap:10px;min-width:0; }
.notes-section h2 { margin:6px 0 0;font-size:19px; }
.notes-section > p { margin:0; }
.note-mention { display:flex;align-items:center;gap:12px;justify-content:space-between;min-width:0;padding:12px 12px 12px 18px;background:var(--surface);border-radius:20px;box-shadow:0 0 0 1px var(--ring); }
.note-mention > div,.note-mention-open { display:grid;gap:4px;min-width:0;text-align:left;flex:1;border-radius:14px;transition:background .28s cubic-bezier(.32,.72,0,1); }
.note-mention .small { line-height:1.7;overflow-wrap:anywhere; }
.note-mention mark { background:color-mix(in srgb,var(--accent-ink) 22%,transparent);color:var(--fg);border-radius:4px;padding:0 1px; }
.note-mention .btn { flex:none; }

/* 写笔记 */
.note-title-input { font-size:22px;font-weight:700;min-height:52px; }
.note-area { max-width:360px; }
.note-area-new { gap:8px;max-width:360px; }
.note-area-new .field { flex:1; }
.note-area-hint { margin:-8px 0 0;color:var(--fg2); }
.note-area-hint:empty { display:none; }
.note-tools { display:flex;gap:8px;flex-wrap:wrap; }
.note-tools .chip { min-height:38px;font-size:14px; }
.note-text { min-height:220px;font-size:16px;line-height:1.8;resize:vertical; }
.note-cands { display:grid;gap:6px;padding:8px;margin-top:-10px;border-radius:20px;background:var(--surface);box-shadow:0 0 0 1px var(--ring-strong),var(--shadow); }
.note-cand { display:grid;gap:2px;min-height:44px;padding:8px 12px;text-align:left;border-radius:14px;transition:background .25s cubic-bezier(.32,.72,0,1); }
.note-cand strong { font-size:15px; }
.note-cand.new strong { color:var(--fg2); }
@media(hover:hover) { .note-cand:hover { background:var(--tint); } }
.note-save { margin:-6px 0 0;color:var(--fg2); }
.note-save.is-error { color:var(--danger-ink); }
.note-version { padding:14px 18px;border-radius:20px;background:var(--surface);box-shadow:0 0 0 1px var(--ring); }
.note-version summary { cursor:pointer;min-height:32px; }
.note-version .note-doc { margin:12px 0;box-shadow:none;background:var(--soft); }

/* 知识点页 */
.kp-level { display:flex;align-items:center;gap:8px;margin:2px 0 0;font-size:14px;color:var(--fg2); }
.kp-level i,.kmap-key i { width:10px;height:10px;border-radius:50%;background:var(--tick-off);flex:none; }
.lv1 > i { background:var(--a1);opacity:.6; } .lv2 > i { background:var(--a1);box-shadow:0 0 0 2px color-mix(in srgb,var(--a1) 35%,transparent); }
.lv3 > i { background:var(--a2); } .lv4 > i { background:var(--a3);box-shadow:0 0 6px var(--a3); }
.kp-standard { margin:0;padding:14px 18px;border-radius:20px;background:var(--soft);box-shadow:0 0 0 1px var(--line);display:grid;gap:6px;line-height:1.8; }
.kp-standard p { margin:0; }
.kp-alias { margin:-6px 0 0; }
.kp-wrong { display:grid;gap:2px;padding:12px 16px;border-radius:18px;background:var(--surface);box-shadow:0 0 0 1px var(--ring);overflow-wrap:anywhere; }

/* 学习星图 */
.kmap-stage { margin:0 -12px;min-width:0; }
.kmap { display:block;width:100%;max-width:520px;height:auto;margin:0 auto;overflow:visible;-webkit-user-select:none;user-select:none;touch-action:manipulation; }
.kmap-path { fill:none;stroke:var(--fg3);stroke-width:1;stroke-dasharray:.1 5;stroke-linecap:round;opacity:.55; }
.kmap-line { fill:none;stroke:var(--fg2);stroke-width:1;stroke-dasharray:.1 3.4;stroke-linecap:round;opacity:.5; }
.kmap-link { fill:none;stroke:var(--a2);stroke-width:1.3;opacity:.6; }
.kmap-hit { fill:transparent;stroke:none; }
.kmap-ch,.kmap-pt { cursor:pointer;outline:none;-webkit-tap-highlight-color:transparent; }
.kmap-ch:focus-visible .kmap-hit,.kmap-pt:focus-visible .kmap-hit { stroke:var(--a2);stroke-width:1.5; }
.kmap-ch .kmap-hit { transition:fill .3s cubic-bezier(.32,.72,0,1); }
@media(hover:hover) { .kmap-ch:hover .kmap-hit,.kmap-pt:hover .kmap-hit { fill:color-mix(in srgb,var(--a2) 7%,transparent); } }
.kmap-core { fill:var(--tick-off); }
.kmap-glow { fill:var(--star);opacity:.22; }
.kmap-star { --star:var(--a1); }
.kmap-star.lv1 .kmap-core { fill:var(--a1);opacity:.75; }
.kmap-star.lv2 .kmap-core { fill:var(--a1); }
.kmap-star.lv3 { --star:var(--a2); } .kmap-star.lv3 .kmap-core { fill:var(--a2); }
.kmap-star.lv4 { --star:var(--a3); } .kmap-star.lv4 .kmap-core { fill:var(--a3); }
.kmap-star.lv4 .kmap-glow { opacity:.32; }
:root:not([data-theme="light"]) .kmap-star.lv4 .kmap-core { filter:drop-shadow(0 0 3px var(--a3)); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .kmap-star.lv4 .kmap-core { filter:none; } }
/* 有错题该重做了：外面一圈慢慢闪；减少动态效果时不闪，只留那一圈 */
.kmap-due { fill:none;stroke:var(--warm);stroke-width:1.2;opacity:.8;animation:kmap-due 2.4s ease-in-out infinite; }
@keyframes kmap-due { 0%,100% { opacity:.85; } 50% { opacity:.2; } }
@media (prefers-reduced-motion: reduce) { .kmap-due { animation:none; } }
.kmap text { paint-order:stroke;stroke:var(--bg);stroke-width:3px;stroke-linejoin:round; }
.kmap-label { font:600 11px var(--font);fill:var(--fg2);text-anchor:middle; }
.kmap-ch.lit .kmap-label { fill:var(--fg); }
.kmap-count { font:10px var(--num);fill:var(--fg3);text-anchor:middle;font-variant-numeric:tabular-nums; }
.kmap-name { font:600 15px var(--font);fill:var(--fg); }
.kmap-sub { font:12px var(--font);fill:var(--fg2); }
.kmap-legend { display:flex;flex-wrap:wrap;gap:6px 14px;margin:0; }
.kmap-key { display:inline-flex;align-items:center;gap:6px; }
.kmap-note { margin:0;color:var(--fg2); }

/* 全部方面连成的一张图（2026-10-19）：中间是“我”，方面围一圈，各自的东西往外排成扇形 */
.kmap-self { max-width:460px; }
.self-spoke { stroke:var(--fg3);opacity:.32;stroke-linecap:round; }
.self-link { fill:none;stroke:var(--fg3);stroke-width:.8;opacity:.45; }
.self-link.cross { stroke:var(--a2);stroke-width:1.1;opacity:.62; }
.self-dim { cursor:pointer;outline:none;-webkit-tap-highlight-color:transparent; }
.self-dim .kmap-hit { transition:fill .3s cubic-bezier(.32,.72,0,1); }
.self-dim:focus-visible .kmap-hit { stroke:var(--a2);stroke-width:1.5; }
@media(hover:hover) { .self-dim:hover .kmap-hit,.self-me:hover .kmap-hit { fill:color-mix(in srgb,var(--a2) 8%,transparent); } }
.self-node { fill:var(--surface);stroke:var(--fg3);stroke-width:1.2; }
.self-dim.lit .self-node { fill:url(#self-grad);stroke:none; }
.self-g1 { stop-color:var(--a1); } .self-g2 { stop-color:var(--a2); } .self-g3 { stop-color:var(--a3); }
.self-dim.lit .kmap-label { fill:var(--fg); }
.self-me { cursor:pointer;outline:none;-webkit-tap-highlight-color:transparent; }
.self-me:focus-visible .kmap-hit { stroke:var(--a2);stroke-width:1.5; }
.self-core { fill:url(#self-grad); }
:root:not([data-theme="light"]) .self-core { filter:drop-shadow(0 0 6px var(--a1)); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .self-core { filter:none; } }
.self-me-name { font:700 11px var(--font);fill:var(--on-accent);text-anchor:middle;stroke:none !important; }
.self-dot .kmap-core { fill:var(--fg3); }
.self-dot.k-kp.lv1 .kmap-core { fill:var(--a1);opacity:.7; }
.self-dot.k-kp.lv2 .kmap-core { fill:var(--a1); }
.self-dot.k-kp.lv3 .kmap-core { fill:var(--a2); }
.self-dot.k-kp.lv4 .kmap-core { fill:var(--a3); }
.self-dot.k-note .kmap-core { fill:var(--a3); }
.self-dot.k-know .kmap-core,.self-dot.k-goal .kmap-core,.self-dot.k-plan .kmap-core,.self-dot.k-exam .kmap-core,.self-dot.k-test .kmap-core,
.self-dot.k-major .kmap-core,.self-dot.k-obs .kmap-core,.self-dot.k-custom .kmap-core,.self-dot.k-mood .kmap-core { fill:var(--fg2); }
.self-dot.k-wrong .kmap-core { fill:var(--a1);opacity:.85; }
.self-dot.k-talk .kmap-core { fill:var(--fg3);opacity:.8; }
.self-key i { background:var(--fg2); }
.self-key.k-kp i { background:var(--a2); }
.self-key.k-note i { background:var(--a3); }
.self-key.k-wrong i { background:var(--a1);box-shadow:0 0 0 2px var(--bg),0 0 0 3.2px var(--warm); }
.self-crosses h2 { margin-bottom:0; }
.self-cross { display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:10px;min-width:0;min-height:56px;padding:10px 16px;text-align:left;
  background:var(--surface);border-radius:18px;box-shadow:0 0 0 1px var(--ring);transition:background .28s cubic-bezier(.32,.72,0,1); }
@media(hover:hover) { .self-cross:hover { background:var(--tint); } }
.self-cross-end { display:grid;gap:2px;min-width:0; }
.self-cross-end small { color:var(--fg2);font-size:12px; }
.self-cross-end span { font-size:15px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.self-cross-arrow { color:var(--a2);font-size:16px; }

/* 助手整理的页（2026-10-19，wiki.js）：关系图和笔记列表上的卡片、页上面那一行 */
.wiki-card { display:grid;gap:8px;padding:16px 18px;border-radius:22px;background:var(--surface);box-shadow:0 0 0 1px var(--ring); }
.wiki-card p { margin:0;color:var(--fg2);line-height:1.7; }
.wiki-card-head { display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap; }
.wiki-card-head strong { font-size:17px;background:var(--btn);-webkit-background-clip:text;background-clip:text;color:transparent; }
.wiki-status { color:var(--fg2); }
.wiki-card .row { gap:16px;flex-wrap:wrap;align-items:center; }
.wiki-banner { display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:10px 16px;border-radius:16px;background:var(--soft);box-shadow:0 0 0 1px var(--line); }
.wiki-banner p { margin:0;font-size:13.5px;color:var(--fg2);line-height:1.6; }
.wiki-banner strong { color:var(--fg); }

/* 一键记成笔记（2026-10-19）：助手回答下面一行淡字，错题行上一个小字按钮 */
.note-capture { min-height:44px; padding:0 2px; border:0; background:none; color:var(--fg2); font:inherit; font-size:14px; font-weight:500; flex:none; align-self:flex-start; cursor:pointer; transition:opacity .2s, color .2s; }
.note-capture:active { opacity:.55; }
.note-capture:disabled { opacity:.55; cursor:default; }
.note-capture.chat { margin:-10px 0 -6px; }
.ilist .note-capture { min-height:36px; color:var(--accent-ink); white-space:nowrap; }
@media(hover:hover) { .note-capture:hover { color:var(--fg); } }
/* 手机上错因下拉框换到题目下面一行（folders.css），“记成笔记”跟在它右边，不挤题目 */
@media (max-width:760px) { .ilist li > .note-capture { order:10; align-self:center; } }
