/* =====================================================================
 * 璇玑阁 —— mobile-ui.css
 * 手机端：字迹清晰化 · 布局适配
 * 顶部目录 HUD 保留；底部翻页恢复原样式
 * ===================================================================== */

/* ---------- 字号：手机够大且清晰 ---------- */
:root {
  --hud-h: 60px;
  --pager-h: 56px;
  --touch: 44px;
  --fs-body: 17px;
  --fs-ui: 15px;
  --fs-small: 13.5px;
  /* 手机上正文优先用系统中文，避免花体网络字发糊 */
  --f-kai-m: "PingFang SC", "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", "Heiti SC", sans-serif;
  --f-song-m: "PingFang SC", "HarmonyOS Sans SC", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", "Songti SC", serif;
  --f-xw-m: "PingFang SC", "HarmonyOS Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 17px;
}

body {
  font-family: var(--f-song-m);
  font-size: var(--fs-body);
  line-height: 1.85;
  padding-top: var(--hud-h);
  padding-bottom: calc(var(--pager-h) + 20px);
  min-height: 100%;
  /* 关键：手机上不要用 antialiased，会让中文细笔画发糊/发虚 */
  -webkit-font-smoothing: auto;
  font-smoothing: auto;
  font-synthesis: none;
  text-rendering: optimizeSpeed;
  color: var(--paper); /* 与桌面 token 一致 */
}

body.font-lg { --fs-body: 19px; --fs-ui: 16px; --fs-small: 14.5px; font-size: 19px; }
body.font-xl { --fs-body: 21px; --fs-ui: 17px; --fs-small: 15.5px; font-size: 21px; }

/* 手机上把装饰性楷体换成清晰黑体系（标题仍可保留一点楷体气质） */
.sec-head h2, .pan-sub h3, .yy-head, .ge-title h4,
.zd-plain-k, .toc-gk, .eli-tag, .sc-book-head,
.hud-title, .hud-sign, .hud-btn, .pager-label, .pager-btn,
.lr-box-h, .classic footer, .foot-motto {
  font-family: var(--f-kai-m) !important;
  font-weight: 600;
  letter-spacing: 0.06em !important;
  text-shadow: none !important;
}

.hero-title, .p-char, .ge-name, .dyn-big,
.lr-qi-score b, .he-score b, .ln-gz, .dy-gz,
.sc-stat b, .gauge-verdict b {
  /* 大字可用系统黑体，避免网络楷体锯齿/模糊 */
  font-family: var(--f-kai-m) !important;
  font-weight: 700;
  text-shadow: none !important;
  /* 极细描边让中文边缘更实（手机上很有效） */
  -webkit-text-stroke: 0.35px currentColor;
  /* 首页标题强制不与背景叠字 */
  overflow-wrap: anywhere;
  max-width: 100%;
}
.hero-title { -webkit-text-stroke: 0 !important; line-height: 1.25 !important; filter: drop-shadow(0 2px 12px rgba(201,162,75,.2)); }

/* 正文类：系统字体 + 稍粗字重，杜绝小字发糊 */
body, p, li, td, th, span, div,
.eli-intro, .eli-gu, .eli-bai, .eli-guan, .eli-head,
.qmp-fine, .ge-note, .ge-line, .ys-basis li, .wx-foot,
.chart-meta, .foot-fine, .guji-bai, .lr-why, .lr-fine,
.zd-plain-p, .zd-plain-one, .sda-pai, .sda-gong, .sda-desc,
.toc-item span, .opt-label, .opt,
.ss-table, .rel-chip, .th-quote, .dy-intro,
.lr-men-card .eli-bai, .lr-men-card .eli-guan, .lr-men-card .eli-gu,
.lr-qa-list, .lr-qa-tips, .mod-body, .yy-card, .panel,
.field label, .hud-meta, .hud-item span {
  font-family: var(--f-song-m) !important;
  font-weight: 500;
  letter-spacing: 0.02em !important;
  text-shadow: none !important;
}

.eli-intro, .eli-gu, .eli-bai, .eli-guan, .eli-head,
.qmp-fine, .ge-note, .ge-line, .ys-basis li, .wx-foot,
.chart-meta, .foot-fine, .guji-bai, .lr-why, .lr-fine,
.zd-plain-p, .zd-plain-one, .sda-pai, .sda-gong, .sda-desc,
.toc-item span, .classic footer, .opt-label, .opt,
.ss-table, .rel-chip, .th-quote, .dy-intro, .eli-src,
.lr-men-card .eli-bai, .lr-men-card .eli-guan, .lr-men-card .eli-gu,
.lr-qa-list, .lr-qa-tips, .sc-sum-item p, .mod-body p,
.yy-card p, .sc-card p, .ge-note {
  font-size: max(var(--fs-body), 16.5px) !important;
  line-height: 1.9;
}
.eli-gu, .zd-plain-one {
  font-size: max(calc(var(--fs-body) + 1px), 17.5px) !important;
}
.zd-plain-k, .yy-head, .ge-title h4, .pan-sub h3,
.eli-tag, .lr-box-h, .toc-gk, .sc-book-head {
  font-size: max(calc(var(--fs-body) + 1px), 17.5px) !important;
}
.qmp-fine, .classic footer, .pager-idx, .opt b,
.p-label, .p-palace, .p-cs, .p-nayin, .ln-year, .ln-tg,
.dy-age, .dy-tg, .dy-year, .ly-jian, .ly-tg, .ss-table th,
.eli-gu b, .quote-mini, .hud-meta {
  font-size: max(var(--fs-small), 13.5px) !important;
  font-weight: 500;
}
.field label, .opt-label, .he-opt .opt-label {
  font-size: max(var(--fs-ui), 15px) !important;
}

input[type="text"], input[type="date"], input[type="time"],
input[type="number"], select, textarea {
  font-family: var(--f-song-m) !important;
  font-size: max(var(--fs-body), 16.5px) !important;
  min-height: var(--touch);
  padding: 12px 14px !important;
  color: var(--paper) !important;
  -webkit-appearance: none;
  appearance: none;
  font-weight: 500;
}
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%),
                    linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px !important;
}
.btn, .seg button, .lr-ptab, .pager-btn, .hud-btn, .hud-item {
  min-height: var(--touch);
  font-family: var(--f-kai-m) !important;
  font-weight: 600;
  letter-spacing: 0.08em !important;
  text-shadow: none !important;
  font-size: max(var(--fs-ui), 14.5px);
}
.seg button { padding: 12px 10px !important; font-size: max(var(--fs-ui), 14.5px) !important; }
.btn { padding: 12px 20px; }
.btn-big { font-size: max(calc(var(--fs-body) + 1px), 17.5px) !important; padding: 16px 28px !important; }

.p-char { font-size: clamp(50px, 13vw, 60px) !important; -webkit-text-stroke: 0.45px currentColor; }
.p-tengod { font-size: max(var(--fs-ui), 14.5px) !important; }
.ge-name { font-size: clamp(30px, 8vw, 36px) !important; }
.gauge-verdict b { font-size: clamp(26px, 7vw, 30px) !important; }

/* ---------- 每页动态 HUD（保留：目录好用） ---------- */
.page-hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  background: rgba(12, 10, 7, 0.96);
  border-bottom: 1px solid rgba(111, 88, 40, 0.55);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
  /* 顶栏不要 backdrop 模糊，避免连带文字发糊 */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.hud-inner {
  display: flex; align-items: center; gap: 10px;
  max-width: 1080px; margin: 0 auto;
  padding: 8px 12px 4px;
  min-height: calc(var(--hud-h) - 10px);
}
.hud-seal {
  position: relative;
  flex: 0 0 auto;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(201, 162, 75, .4);
  display: flex; align-items: center; justify-content: center;
  /* 深墨底托住描金线 */
  background: radial-gradient(circle at 50% 42%, #1a140c 0%, #0a0907 72%);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(201, 162, 75, .1), 0 2px 10px rgba(0, 0, 0, .45);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.hud-seal-orb {
  position: relative;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: block;
  animation: hudTaijiSpin 56s linear infinite;
}
.hud-seal-img {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 50%;
  display: block;
  /* 描金：提亮金线、压杂讯 */
  filter: saturate(1.15) contrast(1.12) brightness(1.18);
  animation: hudTaijiBreath 5.5s ease-in-out infinite;
}
.hud-seal-glow {
  position: absolute; inset: -4px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, transparent 50%, rgba(201, 162, 75, .2) 68%, transparent 82%);
  mix-blend-mode: screen;
  animation: hudTaijiGlow 5.5s ease-in-out infinite;
}
.hud-seal-glow::before {
  content: ""; position: absolute; inset: 1px;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 75, .3);
  box-shadow: 0 0 10px rgba(201, 162, 75, .28), inset 0 0 8px rgba(201, 162, 75, .1);
}
.hud-seal-sweep {
  position: absolute; inset: 0;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: screen;
}
.hud-seal-sweep::before {
  content: ""; position: absolute; top: -30%; bottom: -30%;
  width: 40%; left: -40%;
  background: linear-gradient(90deg, transparent, rgba(255, 236, 180, .35), transparent);
  transform: skewX(-18deg);
  animation: hudTaijiSweep 4.8s ease-in-out infinite;
}
.hud-seal:hover {
  transform: scale(1.06);
  border-color: rgba(236, 210, 138, .65);
  box-shadow: 0 0 0 1px rgba(236, 210, 138, .2), 0 0 18px rgba(201, 162, 75, .28), 0 2px 12px rgba(0, 0, 0, .45);
}
.hud-seal:active { transform: scale(.96); }
.hud-seal.is-home::after {
  content: ""; position: absolute; inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(236, 210, 138, .4);
  animation: hudTaijiPing .7s ease-out forwards;
  pointer-events: none;
}
@keyframes hudTaijiSpin { to { transform: rotate(360deg); } }
@keyframes hudTaijiBreath {
  0%, 100% { filter: saturate(1.15) contrast(1.12) brightness(1.14); }
  50%      { filter: saturate(1.25) contrast(1.18) brightness(1.28); }
}
@keyframes hudTaijiGlow {
  0%, 100% { opacity: .45; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.06); }
}
@keyframes hudTaijiSweep {
  0%   { left: -45%; opacity: 0; }
  20%  { opacity: 1; }
  60%  { opacity: .5; }
  100% { left: 110%; opacity: 0; }
}
@keyframes hudTaijiPing {
  from { transform: scale(.85); opacity: .9; }
  to   { transform: scale(1.35); opacity: 0; }
}
.hud-text { flex: 1 1 auto; min-width: 0; }
.hud-sign {
  display: inline-block;
  font-family: var(--f-kai-m); font-weight: 700; font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--cinnabar-bright);
  border: 1px solid rgba(176, 59, 46, 0.45); border-radius: 999px;
  padding: 1px 8px; margin-right: 6px; vertical-align: 1px;
  background: rgba(176, 59, 46, 0.12);
}
.hud-title {
  display: inline-block;
  font-family: var(--f-kai-m); font-weight: 700;
  font-size: max(15px, var(--fs-ui));
  letter-spacing: 0.06em; color: var(--gold-bright);
  max-width: 68%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  vertical-align: middle;
}
.hud-meta {
  margin-top: 2px; font-size: 12.5px; font-weight: 500;
  color: var(--paper-dim); letter-spacing: 0.04em;
}
.hud-actions { flex: 0 0 auto; display: flex; gap: 6px; align-items: center; }
.hud-btn {
  min-width: 42px; min-height: 42px;
  border: 1px solid var(--line-bright); border-radius: 10px;
  background: #171208; color: var(--gold-bright);
  font-family: var(--f-kai-m); font-weight: 700; font-size: 14px;
  cursor: pointer; padding: 0 10px;
}
.hud-btn.on { border-color: var(--gold); background: rgba(85, 61, 23, 0.55); }
/* 顶栏小圆环仅作装饰，不抢底部翻页 */
.hud-ring { width: 36px; height: 36px; display: block; opacity: .9; }
.hud-ring circle { fill: none; stroke-width: 3; }
.hud-ring .bg { stroke: rgba(111, 88, 40, 0.35); }
.hud-ring .fg { stroke: var(--gold-bright); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset .4s ease; }

/* 顶部细进度线（轻量，不糊字） */
.hud-bar {
  height: 2px; margin: 0 12px 6px; max-width: 1060px;
  border-radius: 999px; background: rgba(111, 88, 40, 0.28); overflow: hidden;
}
.hud-bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--cinnabar), var(--gold-bright));
  border-radius: 999px; transition: width .35s ease;
}
.hud-drawer {
  border-top: 1px solid rgba(111, 88, 40, 0.4);
  background: #100d08;
  max-height: min(70vh, 560px); overflow-y: auto;
  padding: 8px 10px 12px;
  -webkit-overflow-scrolling: touch;
}
.hud-drawer[hidden] { display: none !important; }
.hud-list { display: grid; gap: 6px; max-width: 1080px; margin: 0 auto; }
@media (min-width: 720px) { .hud-list { grid-template-columns: 1fr 1fr 1fr; } }
.hud-item {
  display: flex; align-items: center; gap: 10px;
  min-height: var(--touch);
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: #171208;
  color: var(--paper); font-family: var(--f-kai-m); font-weight: 600;
  font-size: max(14.5px, var(--fs-ui)); letter-spacing: 0.04em;
  cursor: pointer; text-align: left; width: 100%;
}
.hud-item b {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(176, 59, 46, 0.9); color: #f5e6c8;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.hud-item span { flex: 1 1 auto; }
.hud-item.on {
  border-color: var(--gold-bright);
  background: #2a2010;
  color: var(--gold-bright);
}

/* ---------- 底部翻页：恢复原样（胶囊圆点） ---------- */
#pager {
  position: fixed; left: 50%; bottom: 18px; z-index: 95;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, rgba(26, 20, 11, 0.94), rgba(13, 10, 6, 0.96));
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  padding: 7px 10px 7px 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(201, 162, 75, 0.08);
  max-width: calc(100vw - 20px);
  flex-wrap: nowrap !important;
  left: 50% !important; right: auto !important;
  min-height: auto !important;
}
#pager .pager-btn {
  font-family: var(--f-kai-m); font-weight: 600; font-size: 13px;
  letter-spacing: 0.08em; color: var(--gold); background: none;
  border: 1px solid var(--gold-dim); border-radius: 999px;
  padding: 6px 12px; white-space: nowrap;
  min-width: auto !important; min-height: 34px !important;
}
#pager .pager-label {
  font-family: var(--f-kai-m); font-weight: 600; font-size: 13px;
  letter-spacing: 0.06em; color: var(--paper); white-space: nowrap;
  display: flex; align-items: baseline; gap: 6px;
  flex: 0 1 auto !important; order: 0 !important; text-align: left !important;
}
#pager .pager-label b { color: var(--cinnabar-bright); font-size: 14px; font-weight: 700; }
#pager .pager-idx {
  font-family: var(--f-song-m); font-size: 11px; color: var(--paper-faint);
  letter-spacing: 0.06em; display: inline !important; margin-left: 4px;
}
#pager .pager-dots {
  display: flex; gap: 5px; margin: 0 2px;
  max-width: 40vw; overflow-x: auto; width: auto !important;
  justify-content: flex-start;
}
.pager-dot {
  width: 7px; height: 7px; flex: 0 0 7px !important;
  border-radius: 50%; border: 1px solid var(--gold-dim);
  background: none; cursor: pointer; padding: 0;
}
.pager-dot.on {
  background: var(--cinnabar-bright); border-color: var(--cinnabar-bright);
  box-shadow: 0 0 6px rgba(212, 79, 63, 0.6);
  transform: scale(1.2);
}
@media (max-width: 420px) {
  #pager { gap: 4px; padding: 6px 6px 6px 8px; bottom: 12px; }
  #pager .pager-btn { padding: 5px 8px; font-size: 12px; letter-spacing: .05em; flex: 0 0 auto; }
  #pager .pager-label { font-size: 11px; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #pager .pager-idx { display: none !important; }
  #pager .pager-dots { max-width: 24vw; flex: 0 1 auto; overflow: hidden; }
  .hero-eyebrow {
    margin-top: 4px;
    padding: 0 4px;
  }
  .hero-eyebrow span {
    letter-spacing: .04em !important;
    text-indent: .04em !important;
    font-size: 11.5px !important;
    line-height: 1.5;
  }
  .page-hud .hud-title { max-width: 30vw; }
  .page-hud .hud-btn { padding: 6px 8px; letter-spacing: 0; }
  .page-hud .hud-meta { display: none; }
}

/* ---------- 布局适配手机 ---------- */
@media (max-width: 860px) {
  .hero.site-page-on,
  main > .sec.site-page-on {
    min-height: calc(100dvh - var(--hud-h) - var(--pager-h));
    padding-top: 10px;
    padding-bottom: 18px;
  }
  .sec { padding-left: 12px; padding-right: 12px; }
  .sec-head { flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
  .sec-head h2 { font-size: clamp(24px, 7vw, 30px); }
  .sec-no { font-size: 30px; width: 38px; height: 38px; }

  .qmp-grid, .he-grid, .lr-form .he-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .panel, .qmp, .he-form, .lr-form {
    padding-left: 14px !important; padding-right: 14px !important;
  }
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ln-grid, .ly-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sda-grid, .lr-men-grid, .he-two, .classics,
  .ge-grid, .wx-wrap, .lr-sike-row, .lr-chuan-row {
    grid-template-columns: 1fr !important;
  }

  .ss-table, .panel > table {
    display: block; width: 100%; overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .lr-plate-ring { width: 220px; height: 220px; }
  .lr-cell {
    transform: rotate(calc(var(--i) * 30deg)) translateY(-96px)
              rotate(calc(var(--i) * -30deg));
  }

  .lr-pagebar, .plain-pb {
    top: calc(var(--hud-h) + 2px);
    overflow-x: auto; flex-wrap: nowrap;
  }
  .lr-ptab { flex: 0 0 auto; min-height: 40px; white-space: nowrap; }

  .lr-qa-form { flex-direction: column; }
  .lr-qa-form input, .lr-qa-form button { width: 100%; min-height: var(--touch); }

  .vtext { writing-mode: horizontal-tb; letter-spacing: 0.08em; font-size: max(var(--fs-body), 16.5px) !important; }
  .classic { min-height: auto; }

  .hero-title { font-size: clamp(42px, 14vw, 72px) !important; }
  .hero-eyebrow {
    font-size: 12px !important;
    letter-spacing: .12em !important;
    text-indent: 0 !important;
    white-space: normal !important;
    max-width: 100%;
  }
  .hero-eyebrow::before, .hero-eyebrow::after { width: 16px !important; }
  .hero-sub {
    font-size: 14px !important;
    letter-spacing: .04em !important;
    text-indent: 0 !important;
    white-space: normal !important;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.75;
  }
  .hero-quote {
    font-size: max(var(--fs-small), 13.5px);
    padding: 0 4px;
    letter-spacing: .02em !important;
    white-space: normal !important;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  .hero-actions .btn-big { width: 100%; }

  .toc-item { padding: 12px 12px; flex-direction: column; gap: 4px; }
  .toc-item b { font-size: max(var(--fs-ui), 15px); }
  .toc-item span { font-size: max(var(--fs-small), 13.5px); line-height: 1.6; }

  .toast { left: 12px; right: 12px; bottom: 78px; transform: none; }
  .tooltip { max-width: min(300px, 88vw); }
  #btnTop { right: 12px; bottom: 78px; }

  .ss, .tag, .ys-chip, .rel-chip, .jx {
    font-size: max(var(--fs-small), 13.5px) !important;
    padding: 4px 8px; font-weight: 600;
  }
}

@media (max-width: 420px) {
  .hud-title { max-width: 52%; font-size: 14px; }
  .hud-seal { width: 40px; height: 40px; }
  .hud-seal-orb { width: 36px; height: 36px; }
  .hud-ring { width: 32px; height: 32px; }
  .p-char { font-size: 44px !important; width: 54px; height: 54px; }
}

/* 触控：点击更跟手 */
a, button, .toc-item, .hud-item, .lr-ptab, .sda-card, .pager-dot {
  touch-action: manipulation;
}

/* 降低阴影/发光对字迹的干扰（手机上更干净） */
@media (max-width: 860px) {
  .panel::before, .eli-card::before, .yy-card::before { display: none !important; }
  .btn-primary { box-shadow: none; }
  .hero-title { letter-spacing: 0.02em; line-height: 1.15; }
  .sec-head h2 { text-shadow: none !important; }
}

@media print {
  .page-hud, #pager, #btnTop, .lr-pagebar, .plain-pb { display: none !important; }
  body { padding-top: 0 !important; padding-bottom: 0 !important; }
}

@supports (padding: max(0px)) {
  .page-hud .hud-inner { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  #pager { bottom: max(12px, env(safe-area-inset-bottom)); }
  body { padding-bottom: calc(var(--pager-h) + env(safe-area-inset-bottom) + 12px); }
}

/* =========================================================
 * 手机端：流畅但仍有「活」的 UI（轻量动画，仅 transform/opacity）
 * ========================================================= */
@media (max-width: 860px) {
  html, body {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* 避免整页被 fixed 层锁死点击/滑动 */
  .page-hud, #pager { pointer-events: none; }
  .page-hud .hud-inner,
  .page-hud .hud-bar,
  .page-hud .hud-drawer,
  #pager > * { pointer-events: auto; }

  .hero.site-page-on,
  main > .sec.site-page-on {
    contain: layout style; /* 不 paint，减少滚动卡顿 */
  }

  /* 首页星图：小一点、慢转（GPU transform） */
  .hero-starmap-par {
    width: min(168vw, 720px);
    height: min(168vw, 720px);
  }
  .hero-starmap-orb {
    animation-duration: 220s, 12s !important;
  }
  .hero-starmap-img { opacity: .82; filter: saturate(.88) contrast(.9) brightness(1.02); }
  .hero-starmap-glow { opacity: .4; }
  .hero-starmap-sweep { display: none; }
  .hero-starmap-stars i:nth-child(n+48) { display: none; }
  .hero-ring { opacity: .38; filter: brightness(.9) saturate(.65) contrast(.8); mix-blend-mode: overlay; }
  .hero-starmap-vail {
    background:
      radial-gradient(ellipse 55% 42% at 50% 40%, rgba(10, 8, 6, .28) 0%, rgba(10, 8, 6, .12) 50%, transparent 72%),
      radial-gradient(ellipse 75% 70% at 50% 50%, transparent 30%, rgba(12, 10, 7, .35) 75%, rgba(12, 10, 7, .72) 100%),
      linear-gradient(180deg, rgba(12, 10, 7, .4) 0%, transparent 16%, transparent 78%, rgba(12, 10, 7, .55) 100%);
  }
  .hero-starmap-glow { opacity: .55; }
  .hero-starmap-sweep { display: none; }
  .hero-starmap-stars i:nth-child(n+7) { display: none; }
  .hero-ring { opacity: .22; filter: brightness(.9) saturate(.65) contrast(.8); mix-blend-mode: overlay; }
  .hero-ring svg {
    width: min(92vw, 360px) !important;
    height: min(92vw, 360px) !important;
    filter: none !important;
    animation: none !important;
    will-change: transform;
  }
  .hero-sub { letter-spacing: .06em; text-indent: .06em; }
  .hero-quote { letter-spacing: .04em; }

  /* 页中星象：轻量动态 */
  .xj-celestial { height: 150px; margin: 10px 0 16px; }
  .xj-celestial-inner { width: 130px; height: 130px; filter: none !important; }
  .xj-cel-ring,
  .xj-cel-orbit,
  .xj-cel-orbit.o2,
  .xj-cel-taiji,
  .xj-star .dot {
    animation-duration: 48s !important;
  }
  .xj-cel-ring.r2 { animation-duration: 72s !important; }
  .xj-cel-ring.r3 { animation-duration: 96s !important; }
  .xj-cel-orbit { animation-duration: 40s !important; }
  .xj-cel-orbit.o2 { animation-duration: 32s !important; }
  .xj-cel-taiji { animation-duration: 36s !important; }
  .xj-star .dot { animation-duration: 3.2s !important; }
  .xj-cel-glow { animation-duration: 5s !important; opacity: .55; }
  .xj-cel-lines { animation-duration: 80s !important; opacity: .35; }
  .xj-celestial-inner,
  .xj-cel-ring,
  .xj-cel-orbit,
  .xj-cel-taiji,
  .xj-cel-lines { will-change: transform; }

  /* 页末大太极：缩一点、慢转 */
  .xj-big-taiji { min-height: 170px; margin: 18px auto 12px; padding: 10px 4px 12px; }
  .xj-big-taiji-ring {
    opacity: .65 !important;
    animation: xjBigSpin 48s linear infinite !important;
    will-change: transform;
  }
  .xj-big-taiji-orb {
    width: min(72vw, 260px);
    height: min(72vw, 260px);
  }
  .xj-big-taiji-ring svg {
    width: min(72vw, 260px) !important;
    height: min(72vw, 260px) !important;
  }
  .xj-big-taiji-glow {
    display: block;
    opacity: .45;
    animation: xjPulse 6s ease-in-out infinite !important;
  }
  .xj-orb { display: none; }
  .xj-big-taiji.is-follow .xj-big-taiji-ring {
    animation: xjBigSpin 200s linear infinite !important;
    transform: none !important; /* 手机不跟手，只自转 */
  }

  /* HUD 印章轻转 */
  .hud-seal-orb { animation: hudTaijiSpin 70s linear infinite !important; }
  .hud-seal-sweep { display: none; }

  /* 背景：保留极淡动效，不用重叠滤镜 */
  .ui-stage::before { opacity: .8; }
  .ui-stage::after { opacity: .28; }
  .ui-mountain { display: none; }
  .ui-seal-float { display: none; }
  .cosmos::before, .cosmos::after { opacity: .3 !important; }

  /* 阴影简化（可用，但不抖） */
  .hero-title { filter: none !important; text-shadow: none !important; }
  .panel, .yy-card, .eli-card, .sda-card, .lr-men-card {
    box-shadow: 0 4px 12px rgba(0,0,0,.35) !important;
  }

  /* 控件：保留短过渡，点击有反馈 */
  .lr-ptab, .toc-item, .hud-item, .btn, .seg button {
    transition: transform .15s ease, background-color .15s ease, border-color .15s ease !important;
  }
  .btn:active, .lr-ptab:active, .toc-item:active, .hud-btn:active {
    transform: scale(.97);
  }

  /* 粒子仍关（太耗），点击用轻脉冲 */
  .xj-burst, .xj-ring-flash { display: none !important; }
  .xj-celestial.is-bang .xj-celestial-inner,
  .xj-big-taiji.is-bang .xj-big-taiji-ring {
    animation: xjBang .4s cubic-bezier(.2,.8,.2,1) !important;
  }

  /* 分页后隐藏其它板块 */
  body.xj-paged main > .sec:not(.site-page-on),
  body.xj-paged header.hero:not(.site-page-on) {
    display: none !important;
  }
  .tooltip { display: none !important; }
  [data-tip], [title] { -webkit-touch-callout: none; }

  #ssda .sda-grid,
  #gjda .sda-grid,
  #pan .lr-pages,
  #heRes .lr-pages,
  #yyRes .lr-pages {
    content-visibility: visible;
  }
  .cosmos { background-attachment: scroll; }
}

@keyframes xjSpinSlow { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }
/* hero-ring 用自身中心旋转时需覆盖定位 */
@media (max-width: 860px) {
  .hero-ring {
    animation-name: xjHeroSpin;
  }
}
@keyframes xjHeroSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 极弱设备：更慢一点 */
@media (max-width: 860px) and (max-height: 740px) {
  .hero-ring { opacity: .28; animation-duration: 300s !important; }
  .hero-starmap-orb { animation-duration: 300s, 14s !important; }
  .hero-starmap-dust { display: none; }
  .xj-celestial { height: 120px; }
  .xj-celestial-inner { width: 100px; height: 100px; }
  .xj-big-taiji { min-height: 140px; }
  .xj-big-taiji-ring { animation-duration: 260s !important; }
}

/* 页面不可见时暂停（JS 加 class） */
body.xj-hidden-page * {
  animation-play-state: paused !important;
}




/* ===== 手机性能 & 排版修正 ===== */
@media (max-width: 720px) {
  /* 停掉重装饰动画，降 GPU 占用 */
  .zw-tj-orbit, .orbit, .xj-celestial-spin, .xj-ring, .xj-big-spin,
  .xj-star, .xj-twinkle, .xj-breathe {
    animation: none !important;
    will-change: auto !important;
  }
  .panel:hover, .jing-card:hover, .xy-card:hover, .yy-card:hover {
    transform: none !important;
    filter: none !important;
  }
  /* 知识库：单列卡片、筛选可横滑 */
  .jing-grid, .xy-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .jing-card, .xy-card, .panel {
    padding: 12px !important;
    border-radius: 10px !important;
  }
  .zw-subtab button {
    flex: 1 1 44%;
    min-height: 44px;
    padding: 10px 6px;
    font-size: 13px;
  }
  #zwType, #xyLv, #hyPart {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    padding-bottom: 4px;
  }
  #zwType button, #xyLv button, #hyPart button {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 8px 12px;
    white-space: nowrap;
  }
  .sda-toolbar, .xy-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .sda-toolbar input, .xy-toolbar input {
    width: 100%;
    min-height: 44px;
    font-size: 16px; /* 防 iOS 聚焦缩放 */
  }
  /* 安星表横向滑动 */
  .zw108-wrap, .ss-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .zw108-table { min-width: 520px; }
  /* 知识问答、导语压缩 */
  .jing-intro { font-size: 14px !important; line-height: 1.7 !important; }
  .jing-qa { margin-top: 10px; }
  .zw108-block { padding: 10px 12px !important; margin: 10px 0 !important; }
  /* 大盘网格防溢出 */
  .zw-grid, .zw-res, .zw-tj-plate {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  img, canvas { max-width: 100%; height: auto; }
  /* 滚动容器限高，避免整页被撑爆 */
  .jing-grid, .xy-grid { content-visibility: auto; contain-intrinsic-size: 1px 1200px; }
}
/* 触控设备通用：减少合成层 */
@media (hover: none) and (pointer: coarse) {
  .xj-celestial, .xj-mountain, .hero-glow { will-change: auto; }
}