/* ============================================================
   home2.css · 首页门面 v4 —— 墨色重构（原型 _preview_home_redesign 落地版）
   ------------------------------------------------------------
   只作用于 .home-tab 下的 .nx-* 新结构与 .ziwu-tab；
   摘掉 index.html 里 <link href="home2.css"> 即可回退旧首页。
   配色沿用 ink.css「水墨山河」令牌：墨底 #0e0f12 / 卡 #14161b /
   线 #2b2c33 / 米白 #f6efe2 / 朱 #c0453a·#d8604a / 金 #e8b968·#d4a04a
   ============================================================ */

/* ---------- 0. 布局基座：home-tab 纵向流 + 出血 ---------- */
.home-tab{ display:block; padding:0 }
body:has(.home-tab:not([hidden])){ overflow-x:clip }

/* 兼容隐藏槽（app.js renderShelfStats 写 home-stat-*） */
.visually-hidden{ position:absolute; width:1px; height:1px; margin:-1px; padding:0;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0 }

/* ---------- 1. 通告条 ---------- */
.nx-topbar{
  background:#14161b; border-bottom:1px solid var(--line,#2b2c33);
  color:#cdbf9d; text-align:center;
  padding:9px 16px; font-size:13px; letter-spacing:.6px; font-weight:300;
}
.nx-topbar b{ color:#e8b968; font-weight:500 }
.nx-topbar-tag{
  background:rgba(232,185,104,.15); color:#e8b968;
  border:1px solid rgba(232,185,104,.35);
  border-radius:20px; padding:1px 10px; font-size:11px; margin-left:8px;
}

/* ---------- 2. Hero（复用 menu-scene 底图钩子） ---------- */
.home-hero{ display:none } /* 旧 hero 结构已由 nx-hero 取代，保险置灰 */
.nx-hero{
  position:relative; overflow:hidden;
  margin:0 calc(50% - 50vw);
}
.nx-hero .menu-scene{
  position:relative; isolation:isolate;
  display:flex; flex-direction:column;
  min-height:min(88vh,760px);
  overflow:hidden; border-radius:0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 18%, rgba(140,110,70,.28), transparent 60%),
    radial-gradient(ellipse 60% 50% at 18% 88%, rgba(60,80,70,.30), transparent 60%),
    linear-gradient(180deg,#14161b 0%,#0e0f12 100%);
}
.nx-hero .menu-bg{
  background-position:center 30%;
  filter:saturate(.72) brightness(.9);
}
.nx-hero .menu-veil{
  background:
    linear-gradient(180deg, rgba(14,15,18,.55) 0%, rgba(14,15,18,.42) 38%, rgba(14,15,18,.72) 82%, rgba(14,15,18,.92) 100%);
}
.nx-hero .menu-scene::after{
  content:""; position:absolute; inset:auto 0 0 0; height:34vh; z-index:0; pointer-events:none;
  background:
    radial-gradient(ellipse 55% 100% at 12% 100%, rgba(190,180,160,.13), transparent 70%),
    radial-gradient(ellipse 70% 130% at 58% 115%, rgba(190,180,160,.10), transparent 70%);
}
/* 立绘衬景：桌面右侧 */
.nx-hero .menu-master{ display:none }
@media (min-width:1100px){
  .nx-hero .menu-master{
    display:block; position:absolute; right:clamp(16px,2vw,48px); bottom:0;
    width:min(26vw,400px); z-index:1; pointer-events:none;
    filter:drop-shadow(0 28px 48px rgba(0,0,0,.55));
    /* 2026-09-19 删除下缘渐隐。原来这两行
         -webkit-mask-image / mask-image: linear-gradient(180deg,#000 82%,transparent)
       把元素盒下缘 18% 渐隐掉；立绘换成裁紧的半身版后，它正好吃在人物腰腹上
       （把「下半身」啃掉），站主定稿要求删掉，故整条移除。
       首页另有 home3.css 的 .home-tab .ds-desk .menu-master{mask-image:none} 兜底。 */
  }
  /* 立绘放大后给文字区让出右侧 ~460px（立绘宽 400 + 右偏移 ~48 + 安全距）*/
  .nx-hero .menu-inner{ padding-right:clamp(380px,28vw,480px); align-items:flex-start; text-align:left }
  .nx-hero-badge{ margin-left:0 }
}
.nx-hero .menu-inner{
  /* 必须高于 .nx-hero-stats（z-index:3）。
     .nx-sres 虽是 position:fixed，仍属于本节点的层叠上下文；
     统计条是同级兄弟，z-index 更大就会把检索结果压住。 */
  position:relative; z-index:5; flex:1;
  display:flex; flex-direction:column;
  align-items:center; justify-content:center; text-align:center;
  padding:clamp(44px,8vh,84px) clamp(14px,4vw,32px) clamp(36px,6vh,56px);
}
.nx-hero-badge{
  display:inline-flex; gap:8px; align-items:center;
  background:rgba(232,185,104,.10);
  border:1px solid rgba(232,185,104,.35); color:#e6c88a;
  border-radius:40px; padding:7px 20px;
  font-size:13px; letter-spacing:1px; font-weight:300; margin-bottom:24px;
}
.nx-h1{
  font-family:var(--serif-cn); font-weight:900;
  font-size:clamp(28px,4.8vw,48px);
  line-height:1.3; letter-spacing:.08em;
  color:#f6efe2; margin:0 0 16px;
}
.nx-h1 em{ font-style:normal; color:#e8b968; text-shadow:0 2px 30px rgba(232,185,104,.25) }
.nx-sub{
  max-width:600px; margin:0 auto 30px;
  font-size:clamp(13.5px,1.9vw,15.5px); color:#cdbf9d;
  line-height:2; font-weight:300; letter-spacing:.05em;
}

/* ---------- 3. Hero 搜索框 ---------- */
.nx-search{ max-width:620px; margin:0 auto 34px; position:relative; text-align:left; width:100%;
  /* 抬高层级即可。不要 isolation:isolate——会把内部 position:fixed 的
     .nx-sres 钉死在本元素，滚动时面板跟着走、也更容易被兄弟层压住。 */
  z-index:150; }
.nx-sbox{
  display:flex; background:#171922; border:1px solid rgba(232,185,104,.35);
  border-radius:44px; padding:5px 5px 5px 18px; align-items:center; gap:10px;
  box-shadow:0 10px 34px rgba(0,0,0,.45);
  transition:border-color .35s cubic-bezier(.4,0,.2,1), box-shadow .35s cubic-bezier(.4,0,.2,1);
}
.nx-sbox:focus-within{ border-color:#e8b968; box-shadow:0 14px 44px rgba(212,160,74,.18) }
.nx-sico{ color:#d4a04a; font-size:16px; flex:none }
.nx-sbox input{
  flex:1; min-width:0; background:none; border:none; outline:none;
  color:#f6efe2; font-size:14.5px; font-family:inherit; padding:11px 0;
}
.nx-sbox input::placeholder{ color:#6f6754 }
.nx-sbtn{
  background:linear-gradient(135deg,#e8b968,#d4a04a); color:#191204;
  border:none; border-radius:36px; padding:11px 22px;
  font-size:13.5px; font-weight:700; letter-spacing:1px; cursor:pointer;
  font-family:var(--serif-cn); white-space:nowrap;
}
.nx-sbtn:hover{ filter:brightness(1.06) }
.nx-shint{
  display:flex; gap:8px; justify-content:center; flex-wrap:wrap;
  margin-top:12px; font-size:12px; color:#8d8370; align-items:center;
}
.nx-schip{
  border:1px solid #2b2c33; background:rgba(255,255,255,.03); color:#cdbf9d;
  border-radius:20px; padding:3px 13px; font-size:12px; cursor:pointer;
  transition:border-color .2s, color .2s; font-family:inherit;
}
.nx-schip:hover{ border-color:rgba(232,185,104,.5); color:#e8b968 }
.nx-sres{
  /* 必须用 fixed！
     根因：.nx-hero 和 .nx-hero .menu-scene 都有 overflow:hidden，
     absolute 定位的面板会被这两个容器裁掉（看起来像「被下方区域遮挡」，其实是「被切了」）。
     position:fixed 能逃逸祖先的 overflow 裁剪——前提是祖先链上没有
     transform / filter / perspective / will-change / contain（本项目已确认没有）。
     top / left / width / maxHeight 由 homefx.js 的 sPos() 按搜索框实测位置动态设置，
     这样面板永远精确贴在搜索框正下方，且不会被裁。 */
  position:fixed; z-index:160;
  background:#15171e; border:1.5px solid rgba(232,185,104,.35); border-radius:16px;
  box-shadow:0 28px 72px rgba(0,0,0,.7), 0 0 0 1px rgba(232,185,104,.1) inset;
  overflow:auto; display:none;
  /* 顶部小三角箭头，指回搜索框 */
  --arrow-size:10px;
}
.nx-sres::before{
  content:""; position:absolute; top:calc(var(--arrow-size) * -1 + 1px);
  left:50%; transform:translateX(-50%);
  width:0; height:0; border-left:var(--arrow-size) solid transparent;
  border-right:var(--arrow-size) solid transparent;
  border-bottom:var(--arrow-size) solid rgba(232,185,104,.35);
}
.nx-sres::after{
  content:""; position:absolute; top:calc(var(--arrow-size) * -1 + 2px);
  left:50%; transform:translateX(-50%);
  width:0; height:0; border-left:calc(var(--arrow-size) - 1px) solid transparent;
  border-right:calc(var(--arrow-size) - 1px) solid transparent;
  border-bottom:calc(var(--arrow-size) - 1px) solid #15171e;
}
/* 面板底部渐隐：暗示「可滚动看更多」 */
.nx-sres::after-content{ display:none }
.nx-sres.open{ display:block }
.nx-sitem{ padding:10px 16px; border-bottom:1px solid #23242c; cursor:pointer; transition:background .2s }
.nx-sitem:last-child{ border-bottom:none }
.nx-sitem:hover{ background:rgba(232,185,104,.06) }
/* meta 行：左侧源标签 + 右侧「查看完整原文」链接（flex 两端对齐）*/
.nx-smeta{ font-size:11px; color:#d4a04a; letter-spacing:.5px; margin-bottom:3px;
  display:flex; align-items:center; justify-content:space-between; gap:10px }
.nx-ssrc{ color:#d4a04a; font-weight:600 }
.nx-smore{ font-size:11.5px; color:#e8b968; text-decoration:none; padding:1px 6px;
  border:1px solid rgba(232,185,104,.35); border-radius:6px; letter-spacing:0;
  white-space:nowrap; flex:none; transition:background .15s, color .15s }
.nx-smore:hover{ background:rgba(232,185,104,.14); color:#f3d9a0 }
.nx-stitle{ font-size:13.5px; font-weight:600; color:#f0e8da; font-family:var(--serif-cn); margin-top:1px }
.nx-ssnip{
  font-size:12px; color:#a99e86; margin-top:3px; line-height:1.65;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  white-space:pre-line;
}
.nx-sitem.exp .nx-ssnip{ -webkit-line-clamp:unset; display:block }
/* snippet 内嵌元素的样式 */
.nx-ssnip h5.nx-sh5{ font-size:12.5px; font-weight:600; color:#e8b968;
  margin:0 0 4px; font-family:var(--serif-cn); letter-spacing:.04em; display:inline }
.nx-ssnip em.nx-sem{ font-style:normal; color:#cfc6b0; background:rgba(232,185,104,.06);
  border-left:2px solid rgba(232,185,104,.35); padding:1px 6px; display:inline-block }
.nx-ssnip mark.nx-smark{ background:rgba(232,185,104,.32); color:#f6efe2; padding:0 3px;
  border-radius:3px; font-weight:600 }
.nx-ssnip code{ background:#1d1f27; border:1px solid #2c2d36; border-radius:4px;
  padding:0 5px; color:#d4a04a; font-size:11.5px }
.nx-sempty{ padding:22px 18px; font-size:13px; color:#a99e86; text-align:center; line-height:1.9 }
.nx-sempty code{ background:#1d1f27; border:1px solid #2c2d36; border-radius:6px; padding:1px 8px; color:#d4a04a }
.nx-sscope{ color:#6f6857; font-size:11.5px }

/* ---------- 4. Hero CTA 行 ---------- */
.nx-hero-cta{
  display:flex; justify-content:center; align-items:center; gap:14px; flex-wrap:wrap;
}
.nx-hero .cta-btn{
  font-family:var(--serif-cn); font-weight:700; letter-spacing:.12em; text-indent:.12em;
  font-size:14px; min-height:44px; padding:0 clamp(18px,2.6vw,30px);
  border-radius:44px; cursor:pointer;
  transition:transform .25s, box-shadow .25s, background .25s, border-color .25s;
}
.nx-hero .cta-btn:focus-visible{ outline:2px solid #e8b968; outline-offset:2px }
.nx-hero .cta-main{
  background:linear-gradient(135deg,#e8b968,#d4a04a); color:#241a08;
  border:1px solid #f3d9a0;
  box-shadow:0 12px 32px -10px rgba(232,185,104,.55);
}
.nx-hero .cta-main:hover,.nx-hero .cta-main:focus-visible{ transform:translateY(-2px); box-shadow:0 18px 42px -12px rgba(232,185,104,.7) }
.nx-hero .cta-ghost{
  background:transparent; color:#e8b968; border:1.5px solid rgba(232,185,104,.55);
}
.nx-hero .cta-ghost:hover,.nx-hero .cta-ghost:focus-visible{ transform:translateY(-2px); background:rgba(232,185,104,.12); border-color:#e8b968 }
.nx-dao-inline{
  display:inline-flex; align-items:center; gap:6px;
  padding:5px 14px; border-radius:999px;
  border:1px solid rgba(232,185,104,.4); background:rgba(14,15,18,.35);
  color:#e8b968;
}
.nx-dao-inline b{ font-family:var(--serif-cn); font-size:13.5px; color:#f3d9a0 }
.nx-dao-inline small{ font-size:11px; color:rgba(214,203,178,.75); letter-spacing:.1em }

/* ---------- 5. Hero 数据带 ---------- */
.nx-hero-stats{
  position:relative; z-index:3; margin:0;
  padding:clamp(12px,2.2vw,18px) clamp(10px,3vw,28px);
  list-style:none;
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr));
  background:rgba(10,11,14,.62);
  border-top:1px solid rgba(232,185,104,.35);
  backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
}
@media (max-width:767px){ .nx-hero-stats{ grid-template-columns:repeat(2,minmax(0,1fr)); row-gap:10px } }
.nx-hero-stats li{
  display:flex; flex-direction:column; align-items:center; gap:3px;
  padding:8px 10px; text-align:center;
  border-right:1px solid rgba(246,239,226,.14);
}
.nx-hero-stats li:last-child{ border-right:0 }
.nx-hero-stats b{
  font-family:var(--serif-cn); font-weight:700;
  font-size:clamp(19px,2.3vw,26px); line-height:1.15;
  color:#e8b968; letter-spacing:.02em;
}
.nx-hero-stats span{ font-size:clamp(10px,1.8vw,11.5px); line-height:1.6; color:rgba(246,239,226,.78) }
.nx-scrollhint{
  position:absolute; bottom:38px; left:50%; transform:translateX(-50%); z-index:3;
  margin:0; font-size:11px; letter-spacing:.4em; text-indent:.4em;
  color:rgba(214,203,178,.6); pointer-events:none;
}

/* ---------- 6. 信任条 ---------- */
.nx-trust{
  background:#101116; border-bottom:1px solid var(--line,#2b2c33);
  display:flex; justify-content:center; align-items:center;
  gap:clamp(14px,4vw,46px); flex-wrap:wrap;
  padding:14px clamp(16px,4vw,40px);
  font-size:12.5px; color:#a99e86;
}
.nx-trust i{ font-style:normal; margin-right:6px; color:#e8b968 }

/* ---------- 7. 通用区块 ---------- */
.nx-sec{
  max-width:1120px; margin:0 auto;
  padding:clamp(44px,7vw,76px) clamp(16px,4vw,32px) 0;
}
.nx-sec-head{ text-align:center; margin-bottom:clamp(26px,4vw,44px) }
.nx-sectag{
  display:inline-block; background:rgba(192,69,58,.14); color:#e0705a;
  border-radius:30px; padding:5px 18px; font-size:12px; font-weight:500;
  letter-spacing:3px; margin-bottom:14px;
}
.nx-sec-head h2{
  font-family:var(--serif-cn); font-weight:900;
  font-size:clamp(21px,3.4vw,29px); letter-spacing:.08em; color:#f6efe2; margin:0;
}
.nx-sec-head p{ max-width:560px; margin:12px auto 0; color:#a99e86; font-size:13.5px; font-weight:300 }

/* 进场动效（reveal2 由 homefx.js IntersectionObserver 点亮） */
.reveal2{ opacity:0; transform:translateY(22px); transition:opacity .65s ease,transform .65s ease }
.reveal2.in{ opacity:1; transform:none }
@media (prefers-reduced-motion:reduce){ .reveal2{ opacity:1; transform:none; transition:none } }

/* ---------- 8. 每日一方 ---------- */
.nx-daily{
  display:grid; grid-template-columns:auto 1fr auto; gap:clamp(18px,3.6vw,34px); align-items:start;
  background:
    radial-gradient(ellipse 60% 80% at 85% 10%, rgba(140,110,70,.14), transparent 65%),
    linear-gradient(160deg,#16181f,#101116);
  border:1px solid rgba(232,185,104,.28);
  border-radius:20px; padding:clamp(22px,4vw,36px);
  box-shadow:0 18px 44px -18px rgba(0,0,0,.6);
  position:relative; overflow:hidden;
}
.nx-daily::before{
  content:'每日一方'; position:absolute; right:-8px; top:-24px;
  font-family:var(--serif-cn); font-size:100px; font-weight:900;
  color:rgba(232,185,104,.05); pointer-events:none; white-space:nowrap; line-height:1.4;
}
.nx-dc-seal{
  width:78px; height:78px; border-radius:14px;
  background:rgba(179,69,47,.12); border:2px solid #b3452f; color:#d8604a;
  font-family:var(--serif-cn); font-size:34px; font-weight:900;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 0 26px rgba(179,69,47,.2); position:relative; z-index:2; flex:none;
}
.nx-dc-main{ min-width:0; position:relative; z-index:2 }
.nx-dc-titlerow{ display:flex; align-items:baseline; flex-wrap:wrap; gap:10px }
.nx-dc-name{ font-family:var(--serif-cn); font-size:clamp(20px,3vw,25px); font-weight:900; color:#f3ead6 }
.nx-dc-chan{
  font-size:11.5px; color:#8fbf77; background:rgba(130,180,95,.12);
  border:1px solid rgba(130,180,95,.35); border-radius:16px; padding:2px 12px;
}
.nx-dc-comp{ margin:10px 0 0; font-size:13.5px; color:#cdbf9d }
.nx-dc-comp b{ color:#d4a04a; font-weight:500; margin-right:8px; font-size:12px; letter-spacing:2px }
.nx-dc-text{ margin:10px 0 0; font-size:13.5px; line-height:1.9; color:#cfc4ab }
.nx-dc-side{ display:flex; flex-direction:column; gap:10px; min-width:138px; position:relative; z-index:2 }
.nx-dc-punch{
  background:linear-gradient(135deg,#e8b968,#d4a04a); border:none; border-radius:38px;
  color:#191204; font-family:var(--serif-cn); font-weight:700; font-size:14px;
  padding:11px 18px; cursor:pointer; transition:transform .2s;
}
.nx-dc-punch:hover{ transform:translateY(-2px) }
.nx-dc-punch.done{
  background:none; border:1px solid rgba(130,180,95,.55); color:#8fbf77; cursor:default; transform:none;
}
.nx-dc-streak{ font-size:11.5px; color:#a99e86; text-align:center }
.nx-dc-more{
  background:none; border:1px solid #2b2c33; color:#cdbf9d; border-radius:38px;
  font-size:12.5px; padding:8px 16px; cursor:pointer; text-align:center;
  transition:border-color .2s, color .2s; font-family:inherit;
}
.nx-dc-more:hover{ border-color:rgba(232,185,104,.45); color:#e8b968 }
.nx-dc-full{ min-width:0 }
.nx-dc-full summary{ cursor:pointer; font-size:12.5px; color:#a99e86 }
.nx-dc-full[open] summary{ color:#e8b968 }
.nx-dc-cite{ margin:12px 0 10px; border-left:2px solid rgba(212,160,74,.4); padding:2px 0 2px 14px }
.nx-dc-cite b{ font-size:11.5px; color:#d4a04a; display:block; margin-bottom:2px; font-weight:500 }
.nx-dc-cite p{ font-size:12.8px; color:#bdb298; line-height:1.85; margin:0 }
@media (max-width:720px){
  .nx-daily{ grid-template-columns:1fr }
  .nx-dc-side{ flex-direction:row; flex-wrap:wrap; align-items:center }
  .nx-dc-side .nx-dc-full{ flex-basis:100% }
}

/* ---------- 9. 学习路径 ---------- */
.nx-path-sub{ color:#d8a05a !important; font-size:13px !important; letter-spacing:.3em; text-indent:.3em }
.nx-path-steps{
  list-style:none; margin:0; padding:0;
  display:flex; flex-wrap:wrap; justify-content:center; align-items:stretch;
  gap:12px 6px;
}
.nx-path-steps li{ display:flex; align-items:center; gap:6px }
.nx-step{
  min-width:118px; height:74px; padding:6px 16px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1px;
  background:linear-gradient(170deg,#17181d,#14161b);
  border:1px solid rgba(232,185,104,.28); border-radius:14px;
  cursor:pointer; text-align:center; white-space:nowrap;
  font-family:inherit; color:inherit;
  transition:transform .22s, border-color .22s, box-shadow .22s, background .22s;
}
.nx-step:hover,.nx-step:focus-visible{
  transform:translateY(-4px); border-color:#e8b968;
  background:rgba(232,185,104,.07);
  box-shadow:0 10px 24px rgba(0,0,0,.45); outline:none;
}
.nx-step-no{ font-style:normal; font-size:10px; letter-spacing:.16em; color:#a08a5c }
.nx-step b{ font-family:var(--serif-cn); font-size:15.5px; color:#f6efe2 }
.nx-step small{ font-size:10.5px; color:#8fbf77; letter-spacing:.04em }
.nx-arrow{ color:rgba(212,160,74,.55); font-size:15px }
@media (max-width:560px){
  .nx-step{ min-width:96px; height:66px; padding:5px 10px }
  .nx-step b{ font-size:13.5px }
  .nx-arrow{ display:none }
}

/* ---------- 10. 六部书卡 ---------- */
.nx-books-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); gap:clamp(14px,2.2vw,20px) }
.nx-book{
  position:relative; display:flex; flex-direction:column; align-items:flex-start;
  padding:clamp(20px,2.6vw,26px) clamp(16px,2.2vw,22px);
  background:linear-gradient(160deg, rgba(255,253,247,.05), rgba(255,253,247,.015));
  border:1px solid rgba(232,185,104,.16); border-radius:16px;
  text-align:left; cursor:pointer; font:inherit; color:inherit;
  transition:transform .26s, box-shadow .26s, border-color .26s;
}
.nx-book::before{
  content:''; position:absolute; inset:0 0 auto 0; height:3px;
  background:linear-gradient(90deg,#c0453a,#e8b968);
  opacity:0; transition:opacity .26s; border-radius:16px 16px 0 0;
}
.nx-book:hover,.nx-book:focus-visible{
  transform:translateY(-6px); border-color:rgba(232,185,104,.5);
  box-shadow:0 18px 40px rgba(0,0,0,.5); outline:none;
}
.nx-book:hover::before{ opacity:1 }
.nx-book-tag{
  font-size:11px; color:#e8b968; letter-spacing:.16em;
  border:1px solid currentColor; border-radius:2px; padding:2px 10px;
}
.nx-book-tag.hot{ color:#e0705a }
.nx-book-ico{ font-size:26px; margin:14px 0 10px }
.nx-book h3{ font-family:var(--serif-cn); font-size:19px; letter-spacing:.06em; color:#f0e8da; margin:0 0 8px }
.nx-book p{ margin:0; font-size:12.8px; line-height:1.85; color:#a99e86; flex:1 }
.nx-book-go{ margin-top:14px; color:#e8b968; font-size:13.5px; letter-spacing:.08em }
.nx-book-count{ font-style:normal; margin-top:5px; font-size:11px; color:rgba(169,158,134,.7) }

/* ---------- 11. 工具箱九宫格 ---------- */
.nx-tools-wrap{
  width:100%; max-width:none;
  background:linear-gradient(180deg,#0e0f12,#101116 50%,#0e0f12);
  padding:clamp(44px,7vw,76px) 0 0;
  margin-top:clamp(44px,7vw,76px);
}
.nx-tools-wrap .nx-sec-head{ padding:0 clamp(16px,4vw,32px) }
.nx-tools-grid{
  display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,222px),1fr));
  gap:16px; max-width:1180px; margin:0 auto; padding:0 clamp(16px,4vw,32px);
}
.nx-tool{
  position:relative; display:flex; flex-direction:column; align-items:center; text-align:center;
  background:#14161b; border:1px solid #2b2c33; border-radius:18px;
  padding:26px 18px 22px; cursor:pointer; text-decoration:none; color:inherit;
  font:inherit;
  box-shadow:0 10px 28px -14px rgba(0,0,0,.55);
  transition:transform .25s, box-shadow .25s, border-color .25s;
}
.nx-tool:hover,.nx-tool:focus-visible{
  transform:translateY(-5px); border-color:#3a3b44;
  box-shadow:0 18px 40px rgba(0,0,0,.5); outline:none;
}
.nx-tool-chip{
  position:absolute; top:12px; right:12px; font-size:10.5px; font-weight:500;
  border-radius:20px; padding:2px 9px;
  background:rgba(122,176,207,.12); color:#7ab0cf;
}
.nx-tool-chip.chip-new{ background:rgba(232,185,104,.13); color:#e8b968 }
.nx-tool-ico{
  width:54px; height:54px; margin:6px 0 12px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-family:var(--serif-cn); font-size:22px; font-weight:900; color:#fff;
  background:radial-gradient(circle at 32% 28%,#d8604a,#8f3227);
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.12), 0 6px 18px rgba(179,69,47,.25);
}
.nx-tool-ico.t2{ background:radial-gradient(circle at 32% 28%,#4d7a5e,#33543f) }
.nx-tool strong{ font-family:var(--serif-cn); font-size:15.5px; font-weight:700; color:#f0e8da; margin-bottom:6px }
.nx-tool small{ font-size:12px; color:#a99e86; line-height:1.7 }

/* ---------- 12. 子午流注 teaser ---------- */
.nx-zw-teaser{ padding-top:clamp(44px,7vw,76px) }
.nx-zw-band{
  display:grid; grid-template-columns:auto 1fr; gap:clamp(20px,4vw,42px); align-items:center;
  background:
    radial-gradient(ellipse 70% 90% at 85% 20%, rgba(140,110,70,.22), transparent 65%),
    linear-gradient(160deg,#14161b,#101116);
  border:1px solid rgba(232,185,104,.22);
  border-radius:20px; padding:clamp(24px,4vw,40px);
  box-shadow:0 18px 44px -18px rgba(0,0,0,.6);
  position:relative; overflow:hidden;
}
.nx-zw-band::after{
  content:'流注'; position:absolute; right:-10px; bottom:-32px;
  font-family:var(--serif-cn); font-size:140px; font-weight:900;
  color:rgba(232,185,104,.045); pointer-events:none;
}
.nx-zw-left{ position:relative; z-index:2; display:flex; justify-content:center }
.nx-zw-detail{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(148px,1fr)); gap:13px;
  position:relative; z-index:2;
}
.nx-zw-item{
  background:rgba(255,255,255,.03); border:1px solid rgba(232,185,104,.22);
  border-radius:14px; padding:14px 16px;
}
.nx-zw-item small{ display:block; font-size:11px; color:#a99e86; letter-spacing:2px; margin-bottom:4px }
.nx-zw-item b{ font-family:var(--serif-cn); font-size:17px; font-weight:700; color:#ecdcb4 }
.nx-zw-item.good b{ color:#8fbf77 }
.nx-zw-item.bad b{ color:#e0705a }
.nx-zw-more{
  grid-column:1/-1; justify-self:start;
  background:transparent; border:1.5px solid rgba(232,185,104,.5); color:#e8b968;
  border-radius:44px; padding:9px 22px; font-size:13px; font-weight:400;
  cursor:pointer; letter-spacing:1px; font-family:inherit;
  transition:background .25s, border-color .25s;
}
.nx-zw-more:hover{ background:rgba(232,185,104,.1); border-color:#e8b968 }
@media (max-width:720px){ .nx-zw-band{ grid-template-columns:1fr } }

/* ---------- 13. 适合人群 ---------- */
.nx-who-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(236px,1fr)); gap:18px }
.nx-who{
  background:#14161b; border-radius:18px; border:1px solid #2b2c33;
  padding:24px 22px; box-shadow:0 10px 28px -14px rgba(0,0,0,.55);
  transition:transform .22s, border-color .22s;
}
.nx-who:hover{ border-color:#3a3b44; transform:translateY(-4px) }
.nx-who-q{ font-family:var(--serif-cn); font-size:16px; font-weight:700; color:#e8b968; margin-bottom:9px }
.nx-who p{ font-size:13px; color:#a99e86; font-weight:300; line-height:1.85; margin:0 0 4px }
.nx-route-btn{
  display:inline-block; margin-top:12px; font-size:12px; font-weight:500; color:#e8b968;
  background:transparent; border:1px solid rgba(232,185,104,.45); border-radius:20px;
  padding:5px 14px; cursor:pointer; font-family:inherit;
  transition:background .25s;
}
.nx-route-btn:hover{ background:rgba(232,185,104,.1) }

/* ---------- 14. 底部 CTA ---------- */
.nx-cta{
  position:relative; overflow:hidden; text-align:center;
  margin-top:clamp(44px,7vw,76px);
  background:
    radial-gradient(ellipse 60% 90% at 70% 10%, rgba(140,110,70,.25), transparent 60%),
    linear-gradient(150deg,#201014,#571e18 55%,#201014);
  padding:clamp(46px,7vw,68px) 20px;
  border-top:1px solid var(--line,#2b2c33);
}
.nx-cta::before{
  content:'☯'; position:absolute; left:50%; top:50%;
  transform:translate(-50%,-50%);
  font-size:210px; color:rgba(232,185,104,.07); pointer-events:none;
}
.nx-cta h2{
  position:relative; font-family:var(--serif-cn); font-weight:900;
  font-size:clamp(21px,3.6vw,28px); letter-spacing:.1em; margin:0 0 12px; color:#f6efe2;
}
.nx-cta p{ position:relative; color:#cdbf9d; max-width:440px; margin:0 auto 26px; font-size:14px; font-weight:300 }
.nx-cta-btn{ position:relative }
.nx-cta .cta-btn{
  font-family:var(--serif-cn); font-weight:700; letter-spacing:.12em; text-indent:.12em;
  font-size:15px; min-height:46px; padding:0 32px;
  border-radius:44px; cursor:pointer;
}
.nx-cta .cta-main{
  background:linear-gradient(135deg,#e8b968,#d4a04a); color:#241a08;
  border:1px solid #f3d9a0; box-shadow:0 10px 30px rgba(0,0,0,.4);
}
.nx-cta .cta-main:hover{ transform:translateY(-3px) }

/* ---------- 15. 结语 + 页脚警告 ---------- */
.nx-quote{ margin-top:clamp(44px,7vw,76px); padding-bottom:2px }
.home-quote p{ margin:0 }
.nx-ft-warn{
  max-width:760px; margin:26px auto 0 !important; padding-top:18px;
  border-top:1px solid rgba(43,44,51,.9);
  font-size:11.5px; color:rgba(169,158,134,.65); line-height:1.9; font-weight:300;
  letter-spacing:.02em;
}
.nx-ft-warn b{ color:rgba(224,112,90,.85); font-weight:400 }

/* ---------- 16. AI 浮窗（全站右下，与 proto 一致的墨金风） ---------- */
/* theme.css 的提层规则 body>*:not([hidden]):not(.hd){position:relative;z-index:1}
   特异性更高，会把 .nx-fab/.nx-panel 从 fixed 拽回 relative 掉到页尾——
   这里用 :where() 降低特异性没用的（反而更弱），必须显式打赢：
   方案：提高选择器特异性到 0,2,1 以上，并且 !important 兜底。 */
body .nx-fab{
  position:fixed !important; right:clamp(14px,3vw,26px); bottom:clamp(64px,11vh,92px); z-index:160;
  width:56px; height:56px; border-radius:50%;
  border:2px solid rgba(232,185,104,.55);
  background:radial-gradient(circle at 32% 28%,#d8604a,#93301f);
  color:#fff; font-family:var(--serif-cn); font-size:22px; font-weight:900; cursor:pointer;
  box-shadow:0 10px 30px rgba(179,69,47,.4), inset 0 0 0 2px rgba(255,255,255,.1);
  transition:transform .3s cubic-bezier(.4,0,.2,1), opacity .3s;
}
.nx-fab:hover{ transform:translateY(-3px) scale(1.04) }
.nx-fab.hide{ transform:scale(0); pointer-events:none; opacity:0 }
.nx-fab i{
  position:absolute; inset:-7px; border-radius:50%;
  border:1px dashed rgba(232,185,104,.35);
  animation:nx-spin 14s linear infinite;
}
@keyframes nx-spin{ to{ transform:rotate(360deg) } }
@media (prefers-reduced-motion:reduce){ .nx-fab i{ animation:none } }
.nx-panel{
  position:fixed !important; right:clamp(14px,3vw,26px); bottom:clamp(64px,11vh,92px); z-index:161;
  width:min(372px,calc(100vw - 28px)); height:min(566px,calc(100vh - 150px));
  background:#13151b; border:1px solid #33343e; border-radius:20px;
  box-shadow:0 24px 64px rgba(0,0,0,.55);
  display:flex; flex-direction:column; overflow:hidden;
  transform:translateY(16px) scale(.97); opacity:0; pointer-events:none;
  transition:.3s cubic-bezier(.4,0,.2,1);
}
.nx-panel.open{ transform:none; opacity:1; pointer-events:auto }
/* 「↓ 回到最新」：用户上滚翻看历史后浮出，点一下平滑回到底部。
   手机端同名样式在 app-shell.css；PC 端此前缺这条，按钮会退化成裸 button
   且没有定位。bottom 由 homefx.js 的 nxPlaceJump() 按消息区实际 rect 动态写。 */
.nx-jump{
  position:absolute; right:14px; bottom:76px; z-index:6;
  margin:0; cursor:pointer;
  border:1px solid rgba(232,185,104,.55);
  background:rgba(19,21,27,.94);
  color:#e8b968;
  font-size:12px; font-weight:600; line-height:1;
  padding:7px 12px; border-radius:999px;
  box-shadow:0 6px 18px rgba(0,0,0,.45);
}
.nx-jump:hover{ background:#22242b }
.nx-panel-head{
  display:flex; align-items:center; gap:10px; padding:13px 16px;
  background:#171922; border-bottom:1px solid #23242c;
}
.nx-panel-avatar{
  width:34px; height:34px; border-radius:10px; flex:none;
  background:rgba(179,69,47,.15); border:1px solid #b3452f; color:#d8604a;
  display:flex; align-items:center; justify-content:center;
  font-family:var(--serif-cn); font-weight:900;
}
.nx-panel-tt{ line-height:1.25; min-width:0 }
.nx-panel-tt strong{ display:block; font-family:var(--serif-cn); font-size:15px; color:#f0e8da }
.nx-panel-tt span{ font-size:11px; color:#8fbf77 }
.nx-voice-badge{
  display:inline-block; margin-top:3px; padding:1px 7px; border-radius:999px;
  font-size:10.5px; letter-spacing:.5px; font-weight:700;
  color:#1a1206; background:linear-gradient(135deg,#e8b968,#d89b4a);
  border:1px solid #c98f3c; box-shadow:0 1px 3px rgba(232,185,104,.3);
  vertical-align:middle;
}
.nx-voice-badge::before{ content:"🎙 "; }
.nx-panel-close{ margin-left:auto; background:none; border:none; color:#a99e86; font-size:17px; cursor:pointer; padding:4px }
.nx-panel-close:hover{ color:#f6efe2 }
.nx-kb{
  position:relative;
  display:flex; align-items:center; gap:8px; padding:8px 14px;
  border-bottom:1px solid #23242c; background:#171922;
}
.nx-kb label{ font-size:11px; color:#8a8272; letter-spacing:.1em; flex:none }
.nx-kb select{
  flex:1; background:#0e0f12; border:1px solid #2b2c33; border-radius:7px;
  color:#f3d9a0; font-size:12.5px; padding:6px 8px; outline:none;
  color-scheme: dark;
  appearance:none; -webkit-appearance:none;
  padding-right:26px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a99e86' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 10px center;
}
.nx-kb select option,
.nx-kb option{ background:#0e0f12; color:#f3d9a0; }
.nx-kb select:focus{ border-color:#d4a04a }
.nx-kb.nx-kb-custom select{
  position:absolute; width:1px; height:1px; opacity:0;
  overflow:hidden; pointer-events:none; clip:rect(0 0 0 0);
}
.nx-kb-btn{
  flex:1; min-width:0; height:32px;
  display:flex; align-items:center; justify-content:space-between;
  gap:8px; padding:0 12px;
  font:inherit; font-size:12.5px; text-align:left;
  color:#f3d9a0; background:#0e0f12;
  border:1px solid #2b2c33; border-radius:7px; cursor:pointer;
}
.nx-kb-btn b{ flex:1; min-width:0; font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.nx-kb-btn i{
  flex:none; width:10px; height:6px;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a99e86' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}
.nx-kb-btn:focus, .nx-kb-btn:hover{ border-color:#d4a04a }
#nx-kb-sheet{
  position:fixed; inset:0; z-index:280;
  display:none; align-items:flex-end; justify-content:center;
  background:rgba(8,9,12,.55);
}
#nx-kb-sheet.open{ display:flex }
.nx-kb-sheet-card{
  width:min(420px, 100%); max-height:78vh; overflow:auto;
  background:#14161b; color:#f6efe2;
  border:1px solid #2b2c33; border-bottom:0;
  border-radius:18px 18px 0 0;
  padding:10px 12px 16px;
  box-shadow:0 -18px 40px rgba(0,0,0,.45);
}
.nx-kb-sheet-hd{
  display:flex; align-items:center; justify-content:space-between;
  padding:6px 4px 10px;
}
.nx-kb-sheet-hd strong{ font-size:15px; font-weight:700 }
.nx-kb-sheet-hd button{
  width:32px; height:32px; border-radius:10px;
  background:#1a1c22; border:1px solid #2b2c33; color:#a99e86; cursor:pointer;
}
.nx-kb-sheet-list{ display:flex; flex-direction:column; gap:4px }
.nx-kb-opt{
  display:block; width:100%; text-align:left;
  padding:11px 12px; border-radius:12px;
  background:transparent; border:1px solid transparent;
  color:#f6efe2; font-size:14px; line-height:1.35; cursor:pointer;
}
.nx-kb-opt:hover{ background:#1a1c22 }
.nx-kb-opt.on{
  background:rgba(212,160,74,.12);
  border-color:rgba(212,160,74,.4);
  color:#f3d9a0;
}
.nx-routes{
  display:flex; gap:8px; padding:8px 14px 0; background:#171922;
}
.nx-routes[hidden]{ display:none !important }
.nx-route{
  flex:1; font-size:12px; font-family:var(--serif-cn); cursor:pointer;
  background:#12141a; border:1px solid #2b2c33; color:#cdbf9d;
  border-radius:8px; padding:6px 8px;
}
.nx-route.on{ border-color:#e8b968; color:#e8b968; background:rgba(232,185,104,.1) }
.nx-route.locked{ opacity:.45 }
.nx-route-hint{
  font-size:10.5px; color:#8a8272; margin:0; padding:4px 14px 8px; background:#171922;
  border-bottom:1px solid #23242c;
}
.nx-route-hint[hidden]{ display:none !important }
.nx-msgs{ flex:1; overflow-y:auto; padding:16px 14px; display:flex; flex-direction:column; gap:12px }
.m-user,.m-bot{ max-width:88% }
.m-user{
  align-self:flex-end; background:linear-gradient(135deg,#7c3527,#94331f); color:#ffe9dd;
  border-radius:14px 14px 3px 14px; padding:10px 14px; font-size:13.5px; line-height:1.75; white-space:pre-wrap;
}
.m-bot{
  align-self:flex-start; background:#1a1c23; border:1px solid #26272f;
  border-radius:14px 14px 14px 3px; padding:11px 14px; font-size:13.5px; line-height:1.85; color:#ddd3bd;
}
.m-bot p{ margin:0 0 8px }.m-bot p:last-child{ margin-bottom:0 }
.m-bot b{ color:#f3d9a0 }
.m-bot ul,.m-bot ol{ margin:4px 0 8px 18px; padding:0 }
.m-bot li{ margin:3px 0 }
.m-load p::after{ content:' ▎'; color:#e8b968; animation:nx-blink 1s steps(2) infinite }
@keyframes nx-blink{ 50%{ opacity:.15 } }
.m-err{ border-color:rgba(192,69,58,.5) !important; background:rgba(192,69,58,.08) !important }
/* 被刷新打断的那轮回答：恢复历史时顶替掉永远转的加载气泡，弱化显示 */
.m-note{ border-style:dashed !important; border-color:#3a3b45 !important; background:transparent !important; color:#8d8677 !important; font-size:12.5px !important }
.ai-refs{ align-self:flex-start; max-width:92%; border-top:1px dashed #34353f; margin-top:-4px; padding-top:8px }
.ai-refs-h{ font-size:10.5px; color:#77705f; letter-spacing:1px; margin-bottom:3px }
.ai-ref{ font-size:11.5px; color:#a99e86; padding:3px 0; cursor:pointer; line-height:1.6 }
.ai-ref:hover b{ text-decoration:underline }
.ai-ref b{ color:#7ab0cf; font-weight:500 }
/* 参考来源条目结构（homefx.js 改为可点开的卡片结构：标题行 + 来源 + 摘录 + › 箭头） */
.ai-ref-hd{ display:flex; align-items:baseline; gap:6px }
.ai-ref-t{ flex:1; color:#7ab0cf; font-weight:500 }
.ai-ref-x{ color:#4a4438; font-size:13px; line-height:1 }
.ai-ref:hover .ai-ref-t{ text-decoration:underline }
.ai-ref-s{ display:block; font-size:10.5px; color:#77705f; margin-top:2px }
.ai-ref-snip{
  /* 摘录已在 JS 侧按整句取（≤92 字），不再两行钳制——视觉省略号读起来像回答被截断 */
  font-size:11px; color:#8d8370; line-height:1.6; margin-top:2px;
}
.nx-quick{ display:flex; gap:8px; flex-wrap:wrap; padding:0 14px 10px }
.nx-qchip{
  font-size:11.5px; color:#cdbf9d; background:rgba(255,255,255,.04);
  border:1px solid #2b2c33; border-radius:16px; padding:4px 12px; cursor:pointer; font-family:inherit;
}
.nx-qchip:hover{ border-color:rgba(232,185,104,.5); color:#e8b968 }
/* 体质档案提醒 chip：金色描边，跟普通问题 chip 区分开 */
.nx-qchip.nx-const-chip{ color:#e8c88a; border-color:rgba(212,160,74,.55); background:rgba(212,160,74,.10) }
.nx-qchip.nx-const-chip:hover{ border-color:#d4a04a; color:#f3d9a0; background:rgba(212,160,74,.18) }
.nx-qchip.nx-const-chip[hidden]{ display:none }
.nx-input{ display:flex; gap:8px; padding:12px 14px 8px; border-top:1px solid #23242c; background:#12141a }
.nx-input input{
  flex:1; min-width:0; background:#1b1d25; border:1px solid #2c2d36; border-radius:12px;
  outline:none; color:#f6efe2; padding:10px 13px; font-size:13.5px; font-family:inherit;
}
.nx-input input:focus{ border-color:rgba(232,185,104,.5) }
.nx-send{
  background:linear-gradient(135deg,#e8b968,#d4a04a); border:none; border-radius:12px;
  color:#191204; font-weight:700; font-family:var(--serif-cn); padding:0 18px; cursor:pointer; font-size:14px;
}
.nx-note{ font-size:10.5px; color:#77705f; text-align:center; padding:0 12px 10px; margin:0 }

/* 追问按钮（VIP_SERVICES.md 需求 backlog #1） */
.nx-follow{
  background:transparent; border:1px solid rgba(232,185,104,.45); border-radius:12px;
  color:#e8b968; font-weight:700; font-family:var(--serif-cn); padding:0 13px; cursor:pointer; font-size:13px;
  transition:background .16s, border-color .16s;
}
.nx-follow:hover,.nx-follow.on{ background:rgba(232,185,104,.14); border-color:#e8b968 }
.nx-follow:disabled{ opacity:.4; cursor:not-allowed }
.nx-follow-hint{
  font-size:10.5px; color:#e8b968; text-align:center; padding:0 12px 6px; margin:0;
  animation:nxFadeIn .25s ease;
}
@keyframes nxFadeIn{ from{ opacity:0 } to{ opacity:1 } }

/* ---------- 17. ziwu-tab：独立工具页签的骨架与标题 ---------- */
.ziwu-tab{ display:block }
.ziwu-tab .home-ziwu{ max-width:1080px; width:100%; margin-inline:auto;
  /* 复用 home.css 的墨色卡视觉：那套规则挂在 .home-tab 作用域下，
     这里给 ziwu-tab 同等视觉的最小集 */
  border-radius:10px;
  background:radial-gradient(ellipse 60% 60% at 50% 40%, rgba(255,253,247,.045), transparent 70%),
             linear-gradient(180deg,#14161b,#101116);
  border:1px solid rgba(232,185,104,.16);
  box-shadow:0 18px 44px -18px rgba(0,0,0,.6);
  padding:clamp(20px,4.5vw,40px);
  display:block;
}
.ziwu-tab .ziwu-head h2{
  font-family:var(--serif-cn); font-size:clamp(18px,4.4vw,26px); font-weight:700;
  color:#f3d9a0; letter-spacing:.06em; margin:0;
}
.ziwu-tab .home-time{ font-family:var(--serif-cn); color:rgba(214,203,178,.62); font-size:clamp(11.5px,2.7vw,13.5px); letter-spacing:.08em }
.ziwu-tab .ziwu-phase{ font-family:var(--serif-cn); font-size:clamp(15px,3.8vw,20px); font-weight:700; color:#f6efe2; letter-spacing:.06em; margin:8px 0 2px }
.ziwu-tab .ziwu-summary{ font-size:clamp(12px,2.9vw,14px); color:rgba(214,203,178,.68); line-height:1.75; margin:0; max-width:52ch }
.ziwu-tab .wheel-note{ text-align:center; color:rgba(214,203,178,.55); font-size:clamp(11px,2.6vw,12.5px); line-height:1.7; margin-top:clamp(12px,2.5vw,18px); max-width:46ch; margin-inline:auto }
.ziwu-tab .current-detail strong{ color:#f6efe2 }
.ziwu-tab .current-detail span:not(.detail-label){ color:rgba(214,203,178,.68) }
.ziwu-tab .detail-label{ color:#e8b968 }
.ziwu-tab .ziwu-reset{
  font-family:var(--serif-cn); margin-top:12px; min-height:38px; padding:0 16px;
  border-radius:999px; border:1px solid rgba(232,185,104,.45);
  background:rgba(232,185,104,.08); color:#e8b968;
  font-size:12.5px; font-weight:600; letter-spacing:.1em; cursor:pointer;
  transition:border-color .16s, box-shadow .16s;
}
.ziwu-tab .ziwu-reset:hover{ border-color:#e8b968; box-shadow:0 0 0 3px rgba(232,185,104,.14); outline:none }
.ziwu-tab .ziwu-module{ margin-top:clamp(18px,3.5vw,32px); overflow-x:clip }
.ziwu-tab .ziwu-wheel-frame{ margin-inline:auto; width:min(100%,620px); max-width:min(92vw,620px); container-type:inline-size }
.ziwu-tab .current-detail{
  display:grid; grid-template-columns:auto 1fr; column-gap:12px; align-items:baseline;
  padding-top:16px; border-top:1px solid rgba(232,185,104,.14); margin-top:clamp(14px,2.5vw,22px);
}
.ziwu-tab .detail-label{ grid-row:span 2; font-size:12px; font-weight:700; letter-spacing:.08em;
  font-family:ui-monospace,monospace }
.ziwu-tab .current-detail strong{ font-family:var(--serif-cn); font-size:20px; font-weight:600 }
.ziwu-tab .current-detail span:not(.detail-label){ font-size:13px }
.ziwu-tab .current-detail #ziwu-advice{ grid-column:2 }
/* 太极随盘缩放（theme.css 规则带 .ziwu-wheel 选择器，无作用域限制，直接生效；
   但容器查询单位的锚点在 frame 上，这里保持一致即可） */

/* ---------- 18. 动效尊重系统设置 ---------- */
@media (prefers-reduced-motion:reduce){
  body:has(.home-tab:not([hidden])) *{ transition-duration:.01ms !important; animation-duration:.01ms !important }
}

/* ---------- 19. AI 浮窗 · 图版命中卡 + 行内图 ---------- */
.nx-ai-hits{ margin-top:8px; padding:8px 10px; background:rgba(232,185,104,.06); border:1px solid rgba(232,185,104,.25); border-radius:10px }
.nx-ai-hits-h{ font-size:12px; color:#e8b968; letter-spacing:.5px; margin-bottom:6px }
.nx-ai-hits-grid{ display:flex; flex-direction:column; gap:8px }
.nx-ai-hit{ background:rgba(20,22,27,.6); border:1px solid #2b2c33; border-radius:8px; padding:8px }
.nx-ai-hit-h{ display:flex; gap:8px; align-items:baseline; font-size:13px; margin-bottom:6px }
.nx-ai-hit-h b{ color:#f6efe2 }
.nx-ai-hit-h span{ color:#a99e86; font-size:11px }
.nx-ai-hit-imgs{ display:grid; grid-template-columns:repeat(auto-fill, minmax(72px,1fr)); gap:4px; margin-bottom:4px }
.nx-ai-hit-img{ display:block; aspect-ratio:1/1; overflow:hidden; border-radius:4px; background:#0e0f12 }
.nx-ai-hit-img img{ width:100%; height:100%; object-fit:cover; display:block; transition:transform .18s ease }
.nx-ai-hit-img:hover img{ transform:scale(1.06) }
.nx-ai-hit-more summary{ font-size:11px; color:#a99e86; cursor:pointer; padding:4px 0 }
.nx-ai-hit-more summary:hover{ color:#e8b968 }
.nx-ai-hit-dt{ font-size:12px; color:#d6cdb3; line-height:1.6; padding:4px 8px 4px 0;
  max-height:150px; overflow-y:auto; overscroll-behavior:contain;
  border-top:1px dashed rgba(232,185,104,.18); margin-top:4px;
  scrollbar-width:thin; scrollbar-color:#4a4438 transparent }
.nx-ai-hit-dt::-webkit-scrollbar{ width:5px }
.nx-ai-hit-dt::-webkit-scrollbar-thumb{ background:#4a4438; border-radius:3px }
.nx-ai-hit-dt::-webkit-scrollbar-thumb:hover{ background:#6b6250 }
.nx-ai-hit-dt::-webkit-scrollbar-track{ background:transparent }
.nx-ai-hit-dt p{ margin:2px 0 }
.nx-ai-hit-dt b{ color:#e8b968; margin-right:4px }
.nx-ai-img{ display:inline-block; margin:2px 4px 2px 0; vertical-align:middle; line-height:0; border-radius:6px; overflow:hidden; box-shadow:0 0 0 1px #2b2c33 }
.nx-ai-img img{ max-width:200px; max-height:160px; border-radius:6px; display:block; transition:transform .18s ease }
.nx-ai-img:hover img{ transform:scale(1.03) }
.nx-ai-imgstub{ display:inline-block; padding:2px 8px; margin:0 4px; background:rgba(232,185,104,.08); border:1px dashed rgba(232,185,104,.45); border-radius:6px; font-size:12px; color:#e8b968 }
.nx-ai-imgstub b{ color:#f6efe2; font-weight:600 }
.nx-ai-imghint{ color:#a99e86; margin-left:4px; font-size:11px }

/* ---------- 20. AI 答案附带的工具入口卡（tool_hits → 感冒治症图等） ---------- */
.nx-ai-toolgo{
  width:100%; display:flex; align-items:center; gap:10px; cursor:pointer; text-align:left;
  background:rgba(20,22,27,.6); border:1px solid rgba(212,160,74,.4); border-radius:8px; padding:9px 11px;
  transition:background .15s ease, border-color .15s ease;
}
.nx-ai-toolgo:hover{ background:rgba(212,160,74,.12); border-color:rgba(212,160,74,.7) }
.nx-ai-toolgo-tt{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px }
.nx-ai-toolgo-tt b{ color:#f6efe2; font-size:13.5px; letter-spacing:1px }
.nx-ai-toolgo-tt small{ color:#a99e86; font-size:11.5px; line-height:1.5 }
.nx-ai-toolgo-go{ flex:none; color:#e8b968; font-style:normal; font-size:12.5px; letter-spacing:1px }

/* ---------- 20b. AI 答案附带的相关图解卡（figure_hits → 重点笔记的 #fig-xxx） ----------
   与 20 的工具卡同一套皮，但用 <a> 而不是 <button>：点了是【离开】去笔记页看图，
   不是面板内切 tab。所以补一条 text-decoration:none 与 block 布局放图注。 */
.nx-ai-fig{
  display:flex; flex-direction:column; gap:4px; text-decoration:none;
  background:rgba(20,22,27,.6); border:1px solid rgba(212,160,74,.4); border-radius:8px; padding:9px 11px;
  transition:background .15s ease, border-color .15s ease;
}
.nx-ai-fig:hover{ background:rgba(212,160,74,.12); border-color:rgba(212,160,74,.7) }
.nx-ai-fig-tt{ display:flex; flex-direction:column; gap:2px }
.nx-ai-fig-tt b{ color:#f6efe2; font-size:13.5px; letter-spacing:1px }
.nx-ai-fig-tt small{ color:#a99e86; font-size:11.5px; line-height:1.5 }
.nx-ai-fig-cap{ color:#8f8878; font-size:11.5px; line-height:1.6 }
.nx-ai-fig-go{ color:#e8b968; font-style:normal; font-size:12.5px; letter-spacing:1px; margin-top:2px }

/* ---------- 20c. 回答正文里的内联图解（figure_inline → shadow root） ----------
   关键：图是按【浅底卡片】设计的 —— 标注用 .lbl{fill:#574e45} / .lbl-b{fill:#2a2521}，
   都是深色字。AI 面板是深色的，图直接放上去标注全看不见。
   所以必须给它一块浅底（照抄笔记页 .dg 的底），图才和设计一致。
   同理 .nx-fig-cap 用浅灰，不能沿用卡片那套深灰。 */
.nx-fig-box{ display:block; text-decoration:none; margin:12px 0 2px }
.nx-fig-inline{
  display:block; border-radius:12px; padding:6px 4px; overflow:hidden;
  background:radial-gradient(circle at 50% 15%, #fffefb, #fdf8ef 70%);
  border:1px solid #efe8db; box-shadow:inset 0 0 0 1px #fff;
  transition:border-color .15s ease;
}
.nx-fig-box:hover .nx-fig-inline{ border-color:#d9a441 }
.nx-fig-note{ display:block; margin-top:7px; line-height:1.6 }
.nx-fig-cap{ display:block; color:#a99e86; font-size:11.5px; letter-spacing:.03em }
.nx-fig-go{ display:inline-block; margin-top:3px; color:#e8b968; font-style:normal;
  font-size:12px; letter-spacing:.06em }

/* ---------- 21. 首页检索「检索中」状态（按钮转圈 + 结果占位） ---------- */
#nx-sgo.busy{ opacity:.8; cursor:default }
.nx-sgo-spin{
  display:inline-block; width:12px; height:12px; margin-right:6px; vertical-align:-2px;
  border:2px solid rgba(0,0,0,.22); border-top-color:currentColor; border-radius:50%;
  animation:nx-sgo-spin .7s linear infinite;
}
@keyframes nx-sgo-spin{ to{ transform:rotate(360deg) } }
.nx-sloading{ display:flex; align-items:center; gap:11px; padding:15px 14px; font-size:13px; color:#f6efe2 }
.nx-sloading .nx-sgo-spin{ width:15px; height:15px; margin:0; flex:none;
  border:2px solid rgba(212,160,74,.28); border-top-color:#d4a04a }
.nx-sloading b{ color:#f6efe2; font-weight:600 }
.nx-sloading small{ display:block; color:#8a8272; font-size:11px; margin-top:2px }
@media (prefers-reduced-motion:reduce){ .nx-sgo-spin{ animation-duration:2.4s } }

/* AI 图版灯箱：页内放大，不新开标签。z-index 盖过助教浮窗。 */
.nx-img-lb{
  position:fixed; inset:0; z-index:10060;
  background:rgba(8,9,12,.92);
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:max(16px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
  cursor:zoom-out;
}
.nx-img-lb-pic{
  max-width:min(920px, 96vw); max-height:78vh;
  object-fit:contain; border-radius:10px;
  box-shadow:0 18px 48px rgba(0,0,0,.55);
  background:#0e0f12; cursor:default;
}
.nx-img-lb-x{
  position:absolute; top:max(12px, env(safe-area-inset-top));
  right:max(12px, env(safe-area-inset-right));
  min-width:72px; height:40px; padding:0 14px; border:0; border-radius:20px;
  background:#c0453a; color:#f6efe2; font-size:14px; cursor:pointer;
  font-family:inherit; z-index:1;
}
.nx-img-lb-x:hover{ background:#e0705a }
.nx-img-lb-cap{ margin-top:10px; color:#f3d9a0; font-size:14px; text-align:center }
.nx-img-lb-hint{ margin-top:6px; color:#8a8272; font-size:12px; text-align:center }
@media (max-width: 640px){
  .nx-img-lb-pic{ max-width:100%; max-height:72vh }
  .nx-img-lb-x{ min-width:88px; height:44px; font-size:15px }
}

/* ═══ AI 问答工具条 + 分享卡预览层（2026-09-23） ═══
   .ai-tools 挂在每条回答下面（与 .m-bot 平级的兄弟节点），所以 align-self
   才能生效；「存图」出的卡是 canvas 画的，预览层沿用图版灯箱的层级。 */
.ai-tools{ align-self:flex-start; display:flex; gap:8px; margin-top:-6px; padding-left:2px }
.ai-tool{
  display:inline-flex; align-items:center; gap:5px; font-family:inherit;
  font-size:11.5px; line-height:1; color:#cdbf9d; background:rgba(255,255,255,.04);
  border:1px solid #2b2c33; border-radius:14px; padding:5px 11px; cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  transition:border-color .16s ease, color .16s ease, background .16s ease;
}
.ai-tool:hover{ color:#e8b968; border-color:rgba(232,185,104,.5); background:rgba(232,185,104,.08) }
.ai-tool.ok{ color:#e8b968; border-color:rgba(232,185,104,.55); background:rgba(232,185,104,.1) }
.ai-tool[data-busy]{ opacity:.6 }
.ai-tool-i{ width:13px; height:13px; flex:none; fill:none; stroke:currentColor;
  stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round }
/* 分享卡预览层：压过图版灯箱（10060） */
.nx-card-lb{
  position:fixed; inset:0; z-index:10070; display:flex; flex-direction:column;
  background:rgba(6,7,9,.94);
  -webkit-backdrop-filter:blur(3px); backdrop-filter:blur(3px);
}
/* theme.css:68 的 body>*:not([hidden]):not(.hd) 提层规则特异性 0-2-1，压过单类的 fixed
   —— 本层是 body 直接子元素，必须带 !important 守卫（同 promo-modal/fb-modal 先例）。 */
body>.nx-card-lb{ position:fixed !important; z-index:10070 }
.nx-card-scroll{
  flex:1; overflow:auto; display:flex; align-items:flex-start; justify-content:center;
  padding:max(14px, env(safe-area-inset-top)) 12px 6px;
}
.nx-card-pic{ max-width:100%; height:auto; border-radius:10px; box-shadow:0 12px 40px rgba(0,0,0,.6);
  -webkit-touch-callout:default; -webkit-user-select:auto; user-select:auto; -webkit-user-drag:auto }
.nx-card-bar{ display:flex; align-items:center; gap:10px; padding:8px 14px 4px }
.nx-card-btn{
  flex:1; font-family:inherit; font-size:14px; padding:10px 12px; border-radius:11px;
  cursor:pointer; color:#cdbf9d; background:rgba(255,255,255,.05); border:1px solid #2b2c33;
}
.nx-card-btn.pri{
  color:#2a1c08; font-weight:600; border-color:#d4a04a;
  background:linear-gradient(135deg,#e8b968,#d4a04a);
}
.nx-card-x{
  flex:none; width:40px; height:40px; border-radius:11px; cursor:pointer; font-size:15px;
  color:#cdbf9d; background:rgba(255,255,255,.05); border:1px solid #2b2c33;
}
.nx-card-hint{ text-align:center; font-size:11px; color:#8d8677; padding:2px 14px 12px }
.nx-card-tip{
  text-align:center; font-size:12px; color:#f3d9a0; padding:0 14px 2px; min-height:17px;
  opacity:0; transition:opacity .2s ease;
}
.nx-card-tip.on{ opacity:1 }
