/* =========================================================
   🎨 主题变量 —— 想换配色就只动这里
   ========================================================= */
:root[data-theme="light"] {
  --bg:            #faf7f2;                 /* 羊皮纸暖底 */
  --bg-grain:      rgba(180,150,110,.04);   /* 纸张噪点 */
  --ink:           #1f2937;                 /* 主文字 */
  --ink-soft:      #6b7280;
  --ink-faint:     #9ca3af;
  --line:          #e5e1d8;                 /* 分隔线 */
  --card:          #ffffff;
  --card-shadow:   0 1px 2px rgba(31,41,55,.04), 0 4px 16px rgba(31,41,55,.06);
  --card-shadow-hover: 0 4px 8px rgba(31,41,55,.06), 0 12px 28px rgba(31,41,55,.10);
  --accent:        #c2542d;                 /* 赤陶橘：主强调色 */
  --accent-soft:   rgba(194,84,45,.10);
  /* 调色板：鼠尾草/琥珀/赤陶/板岩/梅子 */
  --c1: #6b8f71;  --c2: #d19a3f;  --c3: #c2542d;
  --c4: #5b7a9d;  --c5: #8d5a83;  --c6: #4a9c94;
}
:root[data-theme="dark"] {
  --bg:            #0f1319;
  --bg-grain:      rgba(255,255,255,.02);
  --ink:           #e8e6e1;
  --ink-soft:      #9ca3af;
  --ink-faint:     #6b7280;
  --line:          #232a33;
  --card:          #1a1f27;
  --card-shadow:   0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  --card-shadow-hover: 0 4px 8px rgba(0,0,0,.35), 0 12px 28px rgba(0,0,0,.45);
  --accent:        #e8956b;
  --accent-soft:   rgba(232,149,107,.12);
  --c1: #7fae86;  --c2: #e0b05c;  --c3: #e8956b;
  --c4: #7a9fc4;  --c5: #b07ba8;  --c6: #6bb8af;
}

* { margin:0; padding:0; box-sizing:border-box; }
html, body { height:100%; overflow:hidden; }

body {
  font-family: 'Inter', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--ink);
  transition: background .4s ease, color .4s ease;
}
/* 纸张噪点 + 柔和氛围光 */
body::before {
  content:''; position:fixed; inset:0; pointer-events:none; z-index:0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  opacity:.35; mix-blend-mode:multiply;
}
body::after {
  content:''; position:fixed; inset:0; pointer-events:none; z-index:0;
  background:
    radial-gradient(circle at 15% 20%, var(--accent-soft), transparent 45%),
    radial-gradient(circle at 85% 80%, color-mix(in srgb, var(--c4) 10%, transparent), transparent 45%);
}

/* =========================================================
   顶部 / 底部
   ========================================================= */
header {
  position:fixed; top:0; left:0; right:0; z-index:10;
  display:flex; align-items:center; justify-content:space-between;
  padding: 18px 28px;
  background: linear-gradient(to bottom, var(--bg) 30%, transparent);
  pointer-events:none;
}
header > * { pointer-events:auto; }

.brand { display:flex; align-items:center; gap:12px; }
.brand-mark {
  width:34px; height:34px; border-radius:10px;
  background: linear-gradient(135deg, var(--c3), var(--c2));
  display:grid; place-items:center; color:#fff;
  font-family:'Noto Serif SC', serif; font-weight:900; font-size:16px;
  box-shadow: var(--card-shadow);
  transition: transform .3s cubic-bezier(.2,1.2,.4,1);
}
.brand-mark:hover { transform: rotate(-6deg) scale(1.06); }
.brand-text h1 {
  font-family:'Noto Serif SC', serif;
  font-size:17px; font-weight:700; letter-spacing:.5px;
}
.brand-text p { font-size:10.5px; color:var(--ink-faint); letter-spacing:3px; margin-top:1px; }

.top-actions { display:flex; gap:8px; align-items:center; }
.icon-btn {
  width:34px; height:34px; border-radius:9px; border:1px solid var(--line);
  background: var(--card); color: var(--ink-soft); cursor:pointer;
  display:grid; place-items:center; font-size:14px;
  transition: all .18s ease;
}
.icon-btn:hover { color:var(--accent); border-color:var(--accent); transform:translateY(-1px); }
.icon-btn.active { background:var(--accent); color:#fff; border-color:var(--accent); }
.explore-entry {
  display:inline-flex; align-items:center; gap:6px;
  height:34px; padding:0 13px;
  border:1px solid var(--line); border-radius:9px;
  background:var(--card); color:var(--ink-soft);
  font-family:'Inter','Noto Sans SC',sans-serif;
  font-size:12px; letter-spacing:.08em; text-decoration:none;
  transition:all .18s ease;
}
.explore-entry .entry-icon { color:var(--accent); font-size:10px; }
.cabinet-entry .entry-icon { color:var(--c4); }
.reflection-entry .entry-icon { color:var(--c5); }
.moment-entry .entry-icon { color:var(--c6); }
.explore-entry:hover {
  color:var(--accent); border-color:var(--accent); transform:translateY(-1px);
}

footer {
  position:fixed; bottom:18px; left:28px; z-index:10;
  font-size:11px; color:var(--ink-faint); letter-spacing:.5px;
  display:flex; align-items:center; gap:14px;
}
footer .dot { width:3px; height:3px; border-radius:50%; background:var(--ink-faint); }
.footer-link { color:var(--ink-faint); text-decoration:none; letter-spacing:.5px; transition:color .18s ease; }
.footer-link:hover { color:var(--accent); }

/* =========================================================
   脑图容器
   ========================================================= */
#mindmap-wrap {
  position:absolute; inset:0; z-index:1;
  cursor:grab;
}
#mindmap-wrap.dragging { cursor:grabbing; }
svg#mindmap { width:100%; height:100%; display:block; }

/* =========================================================
   Markmap 节点分层样式（核心）
   foreignObject 里的内容是 Markdown 渲染后的 HTML
   ========================================================= */

/* —— 通用 —— */
.markmap-foreign, .markmap-foreign * {
  font-family: inherit;
  color: var(--ink);
  transition: color .2s;
}
.markmap-foreign a { text-decoration:none; }

/* —— 根节点（depth-0）：大标题胶囊 + 缓缓流动的鎏金 —— */
.markmap-node-depth-0 .markmap-foreign {
  padding: 10px 22px !important;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--c2)), var(--accent));
  background-size: 220% 220%;
  animation: nodeIn .5s cubic-bezier(.2,.8,.2,1) .05s backwards,
             rootShimmer 7s ease-in-out .05s infinite;
  border-radius: 999px;
  box-shadow: var(--card-shadow-hover),
              0 0 22px color-mix(in srgb, var(--accent) 22%, transparent);
}
@keyframes rootShimmer {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}
.markmap-node-depth-0 .markmap-foreign *,
.markmap-node-depth-0 text {
  color:#fff !important; fill:#fff !important;
  font-family:'Noto Serif SC', serif !important;
  font-size: 20px !important; font-weight: 900 !important;
  letter-spacing: 1.5px;
}

/* —— 一级分类（depth-1）：卡片 + 左侧色条 —— */
.markmap-node-depth-1 .markmap-foreign {
  padding: 8px 16px 8px 14px !important;
  background: var(--card);
  border-radius: 12px;
  border-left: 3px solid var(--node-color, var(--accent));
  box-shadow: var(--card-shadow);
  font-size: 15px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.markmap-node-depth-1 .markmap-foreign:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover),
              0 0 14px color-mix(in srgb, var(--node-color, var(--accent)) 25%, transparent);
}
.markmap-node-depth-1 .markmap-foreign h2,
.markmap-node-depth-1 .markmap-foreign strong {
  font-family:'Noto Serif SC', serif;
  font-size: 15.5px; font-weight: 700;
  color: var(--ink);
}

/* —— 二级（depth-2）：文章胶囊，可点击 —— */
.markmap-node-depth-2 .markmap-foreign {
  padding: 4px 12px !important;
  background: color-mix(in srgb, var(--node-color, var(--accent)) 8%, var(--card));
  border: 1px solid color-mix(in srgb, var(--node-color, var(--accent)) 20%, transparent);
  border-radius: 999px;
  font-size: 13px; font-weight: 500;
  transition: transform .18s, background .18s, border-color .18s;
}
.markmap-node-depth-2 .markmap-foreign a { color: var(--ink); }
.markmap-node-depth-2 .markmap-foreign:hover {
  transform: translateY(-1.5px) scale(1.02);
  background: color-mix(in srgb, var(--node-color, var(--accent)) 16%, var(--card));
  border-color: var(--node-color, var(--accent));
}
.markmap-node-depth-2 .markmap-foreign a:hover { color: var(--node-color, var(--accent)); }

/* —— 三级及以下（depth-3+）：极简小标签 —— */
.markmap-node-depth-3 .markmap-foreign,
.markmap-node-depth-4 .markmap-foreign {
  padding: 2px 8px !important;
  font-size: 11.5px;
  color: var(--ink-soft) !important;
  font-weight: 400;
  letter-spacing: .3px;
}
.markmap-node-depth-3 .markmap-foreign a,
.markmap-node-depth-4 .markmap-foreign a { color: var(--ink-soft); }
.markmap-node-depth-3 .markmap-foreign a:hover { color: var(--accent); }

/* —— 节点圆点：按层级递减，hover 放大 —— */
.markmap-node > circle {
  stroke-width: 2;
  stroke: var(--bg);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.12));
  transition: r .18s ease;
}
.markmap-node-depth-0 > circle { r: 0; }               /* 根节点隐藏圆点 */
.markmap-node-depth-1 > circle { r: 5; }
.markmap-node-depth-2 > circle { r: 4; }
.markmap-node-depth-3 > circle,
.markmap-node-depth-4 > circle { r: 3; opacity:.7; }
.markmap-node > circle:hover { r: 7; }

/* —— 分支连线：透明度随深度递减 —— */
.markmap-link { fill:none; stroke-linecap: round; }
.markmap-link-depth-0 { stroke-width: 2.4; opacity: .85; }
.markmap-link-depth-1 { stroke-width: 1.8; opacity: .65; }
.markmap-link-depth-2 { stroke-width: 1.3; opacity: .45; }
.markmap-link-depth-3,
.markmap-link-depth-4 { stroke-width: 1;   opacity: .28; }

/* —— 入场级联动画 —— */
@keyframes nodeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
.markmap-node .markmap-foreign {
  animation: nodeIn .5s cubic-bezier(.2,.8,.2,1) backwards;
}
.markmap-node-depth-1 .markmap-foreign { animation-delay: .15s; }
.markmap-node-depth-2 .markmap-foreign { animation-delay: .28s; }
.markmap-node-depth-3 .markmap-foreign { animation-delay: .40s; }
@keyframes lineIn { from { stroke-opacity: 0; } }
.markmap-link { animation: lineIn .6s ease backwards; }

/* —— 搜索高亮 —— */
.markmap-node.matched .markmap-foreign {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 999px;
}
.markmap-node.matched-dim { opacity: .25; transition: opacity .25s; }

/* =========================================================
   搜索框
   ========================================================= */
.search-box {
  position:fixed; top: 18px; left: 50%; transform: translateX(-50%) translateY(-8px);
  z-index: 20;
  display:flex; align-items:center; gap:8px;
  padding: 8px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--card-shadow-hover);
  opacity:0; pointer-events:none;
  transition: all .22s cubic-bezier(.2,.8,.2,1);
}
.search-box.show { opacity:1; pointer-events:auto; transform: translateX(-50%) translateY(0); }
.search-box input {
  border:none; outline:none; background:none;
  font: inherit; font-size: 13.5px; width: 220px; color: var(--ink);
}
.search-box kbd {
  font: 11px 'JetBrains Mono', monospace;
  padding: 2px 6px; border-radius:5px;
  background: var(--bg); color: var(--ink-faint); border:1px solid var(--line);
}

/* =========================================================
   右下角工具栏
   ========================================================= */
.toolbar {
  position:fixed; right:20px; bottom:20px; z-index:20;
  display:flex; flex-direction:column; gap:6px;
}
.toolbar .icon-btn { width:36px; height:36px; font-size:14px; background:var(--card); }

/* =========================================================
   移动端
   ========================================================= */
@media (max-width: 720px) {
  header { padding: 12px 16px; }
  .brand-text p, .top-actions .hint { display:none; }
  footer { display:none; }
  .search-box input { width: 160px; }
  .markmap-node-depth-0 .markmap-foreign { font-size:17px !important; padding:8px 18px !important; }
  .markmap-node-depth-1 .markmap-foreign { font-size:13.5px; padding:6px 12px !important; }
  .markmap-node-depth-2 .markmap-foreign { font-size:12px; padding:3px 10px !important; }
}
/* 极光层 */
.aurora {
  position: fixed; inset: -20%;
  z-index: 0; pointer-events: none;
  filter: blur(80px) saturate(140%);
  opacity: .55;
  animation: auroraShift 24s ease-in-out infinite alternate;
}
.aurora::before,
.aurora::after {
  content: ''; position: absolute; border-radius: 50%;
}
.aurora::before {
  width: 55vw; height: 55vw;
  top: -10%; left: 5%;
  background: radial-gradient(circle at 30% 30%, var(--c3), transparent 65%);
  animation: blobA 18s ease-in-out infinite alternate;
}
.aurora::after {
  width: 45vw; height: 45vw;
  bottom: -15%; right: 5%;
  background: radial-gradient(circle at 60% 40%, var(--c4), transparent 65%);
  animation: blobB 22s ease-in-out infinite alternate;
}
.aurora > .blob-c {
  position: absolute;
  width: 40vw; height: 40vw;
  top: 30%; left: 35%;
  background: radial-gradient(circle at 50% 50%, var(--c6), transparent 65%);
  animation: blobC 26s ease-in-out infinite alternate;
}

@keyframes auroraShift {
  from { transform: rotate(0deg) scale(1); }
  to   { transform: rotate(8deg) scale(1.08); }
}
@keyframes blobA { from { transform: translate(0,0); } to { transform: translate(12vw, 8vh); } }
@keyframes blobB { from { transform: translate(0,0); } to { transform: translate(-10vw, -6vh); } }
@keyframes blobC { from { transform: translate(0,0) scale(1); } to { transform: translate(-8vw, 10vh) scale(1.15); } }

/* 暗色模式下极光更浓郁 */
:root[data-theme="dark"] .aurora { opacity: .45; filter: blur(100px) saturate(160%); }

/* =========================================================
   🎬 开场引导层 · 「道生万物」
   ========================================================= */
:root { --intro-dur: 4600ms; }

.intro {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  transition: opacity .7s cubic-bezier(.4,0,.2,1),
              transform .7s cubic-bezier(.4,0,.2,1),
              filter .7s cubic-bezier(.4,0,.2,1);
  cursor: pointer;
}
.intro.leaving {
  opacity: 0; transform: scale(1.04); filter: blur(12px);
  pointer-events: none;
}
.intro-inner { display:flex; flex-direction:column; align-items:center; text-align:center; }

/* 内部元素级联入场 */
.intro-inner > * { animation: introUp .8s cubic-bezier(.2,.8,.2,1) backwards; }
.intro-inner > .intro-seed     { animation-delay: .1s; }
.intro-inner > .tao-phase      { animation-delay: .15s; }
.intro-inner > .intro-title    { animation-delay: .35s; }
.intro-inner > .intro-sub      { animation-delay: .55s; }
.intro-inner > .intro-divider  { animation-delay: .7s; }
.intro-inner > .intro-stats    { animation-delay: .8s; }
.intro-inner > .intro-progress { animation-delay: 1s; }
.intro-inner > .intro-hint     { animation-delay: 1.2s; }
@keyframes introUp { from { opacity:0; transform: translateY(18px); } to { opacity:1; transform:none; } }

.intro-title {
  font-family:'Noto Serif SC', serif; font-weight:900;
  font-size: clamp(34px, 6vw, 56px);
  letter-spacing: .18em; margin: 16px 0 8px;
  background: linear-gradient(120deg, var(--ink) 20%, var(--accent) 75%, var(--c2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--accent) 30%, transparent));
}
.intro-sub { color: var(--ink-soft); font-size: 14px; letter-spacing: .35em; text-indent: .35em; }

/* =========================================================
   ✦ 道生万物 · 生成之树
   道(根) → 一 → 二(阴阳) → 三 → 万物(九叶)
   每一层等上一层生成完毕再依次展开，节奏即"生生不息"
   ========================================================= */
.intro-seed { width: 195px; height: 195px; animation: seedFloat 5s ease-in-out infinite alternate; }
@keyframes seedFloat { from { transform: translateY(-4px) } to { transform: translateY(6px) } }
.seed-svg { width:100%; height:100%; overflow: visible; }

/* —— SVG 渐变停靠点：颜色跟随主题变量 —— */
.sgVine-a { stop-color: var(--accent); }
.sgVine-b { stop-color: var(--c2); }
.sgNode-a { stop-color: color-mix(in srgb, var(--c2) 55%, #fff); }
.sgNode-b { stop-color: var(--accent); }
.sgRoot-a { stop-color: color-mix(in srgb, var(--accent) 18%, #fff); }
.sgRoot-b { stop-color: var(--c2); }
.sgRoot-c { stop-color: var(--accent); }
.sgHalo-a { stop-color: var(--accent); stop-opacity:.45; }
.sgHalo-b { stop-color: var(--accent); stop-opacity:0; }

/* —— 缓旋虚线轨道 —— */
.orbit {
  transform-box: fill-box; transform-origin: center;
  animation: orbitSpin 46s linear infinite, orbitFade 1.4s ease .2s backwards;
}
@keyframes orbitSpin { to { transform: rotate(360deg); } }
@keyframes orbitFade { from { opacity: 0; } to { opacity: 1; } }
.orbit circle {
  fill:none; stroke: var(--ink); opacity:.12; stroke-width:1;
  stroke-dasharray: .018 .03; stroke-linecap: round;
}

/* —— 根部呼吸光晕 —— */
.halo {
  fill: url(#sgHalo); stroke: none;
  transform-box: fill-box; transform-origin: center;
  animation: haloBreath 3s ease-in-out infinite;
}
@keyframes haloBreath {
  0%,100% { transform: scale(.9); opacity:.55; }
  50%     { transform: scale(1.25); opacity:.95; }
}

/* —— 双层声呐波纹（错峰扩散） —— */
.sonar {
  fill: none; stroke: var(--accent); stroke-width: 1.5;
  transform-box: fill-box; transform-origin: center;
  animation: sonar 2.4s ease-out infinite;
}
.sonar.s-b { animation-delay: 1.2s; }
@keyframes sonar { from { transform: scale(.6); opacity:.55 } to { transform: scale(2.4); opacity:0 } }

/* —— 藤蔓：渐变描边 + 辉光，按"世代"依次生长 —— */
.sl {
  stroke: url(#sgVine); stroke-width: 2.3; stroke-linecap: round; fill: none;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 55%, transparent));
  animation: draw .8s cubic-bezier(.4,0,.2,1) forwards;
}
.sl.g1 { animation-delay:.45s; }   /* 道生一 */
.sl.g2 { animation-delay:1.25s; }  /* 一生二 */
.sl.g3 { animation-delay:2.05s; }  /* 二生三 */
@keyframes draw { to { stroke-dashoffset: 0 } }

/* —— 细枝：三生万物，九枝散叶 —— */
.twig {
  stroke: var(--c2); stroke-width: 1.1; stroke-linecap: round; fill:none;
  opacity:.6; stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw .5s ease forwards;
}
.twig.tw1 { animation-delay:2.95s } .twig.tw2 { animation-delay:3.02s }
.twig.tw3 { animation-delay:3.09s } .twig.tw4 { animation-delay:3.16s }
.twig.tw5 { animation-delay:3.23s } .twig.tw6 { animation-delay:3.30s }
.twig.tw7 { animation-delay:3.37s } .twig.tw8 { animation-delay:3.44s }
.twig.tw9 { animation-delay:3.51s }

/* —— 知识节点：渐变描边圆点，弹性绽放 —— */
.sn {
  fill: var(--bg); stroke: url(#sgNode); stroke-width: 2.2;
  transform-box: fill-box; transform-origin: center;
  transform: scale(0);
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 55%, transparent));
  animation: pop .5s cubic-bezier(.2,1.4,.4,1) forwards;
}
.sn.n1 { animation-delay:.95s; }   /* 一 */
.sn.n2 { animation-delay:1.85s; }  /* 二 */
.sn.n3 { animation-delay:2.65s; }  /* 三 */
@keyframes pop { to { transform: scale(1) } }

/* —— 阴阳二仪：一空一盈 —— */
.sn.yin  { fill: var(--bg); stroke: url(#sgNode); }
.sn.yang { fill: url(#sgNode); stroke: none; }

/* —— 根部：鎏光呼吸的「道」 —— */
.sn.root {
  fill: url(#sgRoot); stroke: none;
  transform: scale(1);
  animation: rootPulse 2.2s ease-in-out infinite;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 70%, transparent));
}
@keyframes rootPulse { 0%,100% { transform: scale(1) } 50% { transform: scale(1.16) } }

/* —— 万物之叶 —— */
.lf {
  fill: var(--c2); stroke:none;
  transform-box: fill-box; transform-origin: center;
  transform: scale(0);
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--c2) 60%, transparent));
  animation: pop .45s cubic-bezier(.2,1.4,.4,1) forwards;
}
.lf.lf1 { animation-delay:3.35s } .lf.lf2 { animation-delay:3.42s }
.lf.lf3 { animation-delay:3.49s } .lf.lf4 { animation-delay:3.56s }
.lf.lf5 { animation-delay:3.63s } .lf.lf6 { animation-delay:3.70s }
.lf.lf7 { animation-delay:3.77s } .lf.lf8 { animation-delay:3.84s }
.lf.lf9 { animation-delay:3.91s }

/* —— 光尘：散落的时光正被拾起 —— */
.dust {
  fill: var(--c2); opacity: 0;
  transform-box: fill-box; transform-origin: center;
  animation: dustFloat 4.5s ease-in infinite;
}
@keyframes dustFloat {
  0%   { opacity:0; transform: translateY(10px) scale(.7); }
  25%  { opacity:.9; }
  100% { opacity:0; transform: translateY(-30px) scale(1.2); }
}

/* —— 流光：沿生成之路巡游的光点 —— */
.spark {
  fill: var(--accent); stroke:none; opacity:0;
  filter: drop-shadow(0 0 5px var(--accent));
  animation: sparkLife 2.4s linear infinite;
}
@keyframes sparkLife {
  0% { opacity:0; } 12% { opacity:1; } 82% { opacity:1; } 100% { opacity:0; }
}

/* —— 节点铭文：道 / 一 / 二 / 三 / 万物 —— */
.lbl {
  font-family:'Noto Serif SC', serif; font-size:10px;
  fill: var(--ink-soft); opacity:0;
  animation: lblIn .7s ease forwards;
}
.lbl.l-wan { font-size:11px; fill: var(--accent); letter-spacing:2px; }
.lbl.l-dao { animation-delay:.6s }
.lbl.l-yi  { animation-delay:1.15s }
.lbl.l-er  { animation-delay:2.05s }
.lbl.l-san { animation-delay:2.85s }
.lbl.l-wan { animation-delay:3.75s }
@keyframes lblIn { from { opacity:0; transform: translateY(4px); } to { opacity:.8; transform:none; } }
.lbl.l-wan { animation-name: lblInWan; }
@keyframes lblInWan { from { opacity:0; transform: translateY(4px) scale(.9); } to { opacity:1; transform:none; } }

/* =========================================================
   ✦ 生成之语：道生一 → 一生二 → 二生三 → 三生万物
   与树的展开节奏逐段同步（总时长 ≈ --intro-dur）
   ========================================================= */
.tao-phase {
  position:relative; width: 220px; height: 24px; margin: 2px 0 0;
}
.tao-phase span {
  position:absolute; inset:0; display:grid; place-items:center;
  font-family:'Noto Serif SC', serif;
  font-size:14px; letter-spacing:.5em; text-indent:.5em;
  color: var(--ink-soft);
  opacity:0;
  animation-duration: 4.6s;
  animation-timing-function: ease;
  animation-fill-mode: forwards;
}
.tao-phase span:nth-child(1) { animation-name: taoP1; }
.tao-phase span:nth-child(2) { animation-name: taoP2; }
.tao-phase span:nth-child(3) { animation-name: taoP3; }
.tao-phase span:nth-child(4) { animation-name: taoP4; color: var(--accent); }
@keyframes taoP1 { 0%{opacity:0} 5%{opacity:1} 18%{opacity:1} 25%{opacity:0} 100%{opacity:0} }
@keyframes taoP2 { 0%{opacity:0} 23%{opacity:0} 29%{opacity:1} 40%{opacity:1} 47%{opacity:0} 100%{opacity:0} }
@keyframes taoP3 { 0%{opacity:0} 43%{opacity:0} 49%{opacity:1} 60%{opacity:1} 67%{opacity:0} 100%{opacity:0} }
@keyframes taoP4 { 0%{opacity:0} 64%{opacity:0} 71%{opacity:1} 100%{opacity:1} }

/* —— 数据统计：竖线分隔 + 数字鎏金渐变 —— */
.intro-stats { display:flex; gap: 0; margin: 20px 0 28px; }
.stat { display:flex; flex-direction:column; align-items:center; gap:4px; padding: 0 26px; position:relative; }
.stat + .stat::before {
  content:''; position:absolute; left:0; top:18%; height:64%; width:1px;
  background: linear-gradient(180deg, transparent, var(--line) 30%, var(--line) 70%, transparent);
}
.stat b {
  font-family:'Noto Serif SC', serif; font-size: 26px; font-weight:900;
  background: linear-gradient(180deg, var(--ink) 30%, color-mix(in srgb, var(--accent) 60%, var(--ink)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.stat span { font-size: 11px; color: var(--ink-faint); letter-spacing: 2px; }

/* 进度条：时长由 JS 写入 --intro-dur，与自动跳转严格同步 */
.intro-progress {
  width: 240px; height: 2px; border-radius: 2px; overflow: hidden;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
}
.intro-progress i {
  display:block; height:100%; width:0; border-radius:2px;
  background: linear-gradient(90deg, var(--c3), var(--c2));
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent);
  animation: introProg var(--intro-dur) linear forwards;
}
@keyframes introProg { to { width: 100% } }

.intro-hint {
  margin-top: 12px; font-size: 11.5px; color: var(--ink-faint);
  letter-spacing: 3px; animation: hintBlink 2.4s ease-in-out infinite;
}
@keyframes hintBlink { 0%,100%{opacity:.45} 50%{opacity:1} }

.intro-skip {
  position: absolute; right: 28px; bottom: 26px;
  padding: 8px 18px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--ink-soft);
  border: 1px solid var(--line);
  font-size: 12.5px; font-family: inherit; letter-spacing: 2px;
  transition: all .2s;
}
.intro-skip:hover { color: var(--accent); border-color: var(--accent); transform: translateX(-2px); }

/* —— 主页面在开场前"未聚焦"，揭幕后聚焦呈现 —— */
#mindmap-wrap, header, footer, .toolbar {
  opacity: 0; transform: scale(.975); filter: blur(8px);
  transition: opacity .9s ease .15s,
              transform .9s cubic-bezier(.2,.8,.2,1) .15s,
              filter .9s ease .15s;
}
body.intro-done #mindmap-wrap, body.intro-done header,
body.intro-done footer, body.intro-done .toolbar {
  opacity: 1; transform: none; filter: none;
}

@media (max-width: 720px) {
  .stat { padding: 0 16px; }
  .stat b { font-size: 20px; }
  .intro-progress { width: 190px; }
  .intro-divider i { width: 44px; }
  .tao-phase { width: 180px; }
  .tao-phase span { font-size: 12.5px; }
}

/* —— 无障碍：偏好减弱动效时，直接呈现生成完成的静帧 —— */
@media (prefers-reduced-motion: reduce) {
  .intro-seed, .intro-hint, .sonar, .sn.root, .halo, .orbit,
  .dust, .spark, .intro-divider b,
  .markmap-node-depth-0 .markmap-foreign { animation: none !important; }
  .sl, .twig { animation: none !important; stroke-dashoffset: 0 !important; }
  .sn, .lf { animation: none !important; transform: none !important; opacity: 1 !important; }
  .lbl { animation: none !important; opacity: .8 !important; }
  .lbl.l-wan { opacity: 1 !important; }
  .tao-phase span { animation: none !important; opacity: 0 !important; }
  .tao-phase span:last-child { opacity: 1 !important; }
  .dust, .spark { opacity: 0 !important; }
  .intro, #mindmap-wrap, header, footer, .toolbar { transition-duration: .01s !important; }
}

/* 四个入口时的移动端收紧 */
@media (max-width: 720px) {
  header { padding: 10px 12px; }
  .top-actions { gap: 5px; }
  .explore-entry { height: 32px; padding: 0 9px; }
  .explore-entry .entry-text { display: none; }
  .icon-btn { width: 32px; height: 32px; }
  .brand { gap: 9px; }
  .brand-mark { width: 32px; height: 32px; }
}
@media (max-width: 380px) {
  .brand-text { display: none; }
}
