/* =====================================================================
   璇玑阁 · 子平八字 —— style.css
   墨色为底，金线为骨，朱砂为魂。
   ===================================================================== */

:root {
  /* 墨色为底，金线为骨，朱砂为魂 */
  --ink: #0f0d0a;
  --ink-2: #17130e;
  --panel-hi: rgba(36, 30, 20, 0.9);
  --panel-lo: rgba(18, 15, 10, 0.94);
  --line: #3f3524;
  --line-bright: #6e5a32;
  --gold: #c2a35c;
  --gold-dim: #8d7440;
  --gold-bright: #e2d0a0;
  --paper: #ebe4d4;
  --paper-dim: #b5ad98;
  --paper-faint: #8c8472;
  --cinnabar: #a84336;
  --cinnabar-bright: #d0604c;
  --jade: #7aab98;
  --c-wood: #7fad72;
  --c-fire: #d4684c;
  --c-earth: #c49a58;
  --c-metal: #d4b870;
  --c-water: #6f9ec4;
  --focus: rgba(194, 163, 92, 0.55);
  --holo-cyan: #c2a35c;
  --holo-cyan-soft: rgba(194, 163, 92, 0.16);
  --holo-amber: #e2d0a0;
  --holo-magenta: #a84336;
  --holo-glass: rgba(36, 30, 20, 0.42);
  --holo-glow: 0 0 18px rgba(194, 163, 92, 0.25), 0 0 40px rgba(194, 163, 92, 0.08);
  --f-kai: "Ma Shan Zheng", "STXingkai", "KaiTi", "STKaiti", serif;
  --f-song: "Noto Serif SC", "Source Han Serif SC", "STZhongsong", "SimSun", serif;
  --f-xw: "ZCOOL XiaoWei", "Noto Serif SC", "KaiTi", serif;
  --f-hud: "Cascadia Code", "Consolas", "SF Mono", "Microsoft YaHei", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-song);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
}
::selection { background: rgba(168, 67, 54, 0.38); color: #f7efe0; }

/* ---------- 星穹背景 ---------- */
.cosmos {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    /* 中心承接星盘藏蓝，向墨底晕开，消掉圆盘硬边 */
    radial-gradient(ellipse 70% 60% at 50% 42%, rgba(10, 22, 58, .55) 0%, rgba(8, 14, 36, .28) 38%, transparent 68%),
    radial-gradient(1200px 700px at 78% -8%, rgba(201, 162, 75, 0.06), transparent 62%),
    radial-gradient(900px 620px at 8% 108%, rgba(176, 59, 46, 0.04), transparent 60%),
    radial-gradient(1400px 900px at 50% 50%, rgba(23, 18, 10, 0.35), transparent 70%),
    linear-gradient(180deg, #0b0a0c 0%, #0a0808 52%, #0d0a08 100%);
}
.cosmos::before { /* 星子 */
  content: ""; position: absolute; inset: 0; opacity: .55;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, rgba(236, 210, 138, .8), transparent 55%),
    radial-gradient(1px 1px at 32% 8%,  rgba(236, 210, 138, .5), transparent 55%),
    radial-gradient(1.4px 1.4px at 68% 22%, rgba(236, 210, 138, .7), transparent 55%),
    radial-gradient(1px 1px at 84% 12%, rgba(236, 210, 138, .5), transparent 55%),
    radial-gradient(1px 1px at 52% 30%, rgba(236, 210, 138, .4), transparent 55%),
    radial-gradient(1.3px 1.3px at 8% 55%, rgba(236, 210, 138, .5), transparent 55%),
    radial-gradient(1px 1px at 90% 48%, rgba(236, 210, 138, .45), transparent 55%),
    radial-gradient(1.2px 1.2px at 72% 72%, rgba(236, 210, 138, .4), transparent 55%),
    radial-gradient(1px 1px at 22% 84%, rgba(236, 210, 138, .5), transparent 55%),
    radial-gradient(1px 1px at 45% 62%, rgba(236, 210, 138, .35), transparent 55%);
}
.cosmos::after { /* 墨晕噪点 */
  content: ""; position: absolute; inset: 0; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}

/* ---------- 通用 ---------- */
a { color: var(--gold-bright); text-decoration: none; }
small { color: var(--paper-faint); font-weight: 400; }
em { font-style: normal; color: var(--gold-bright); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--f-song); font-weight: 700; letter-spacing: .3em; text-indent: .3em;
  border: 1px solid var(--line-bright); background: linear-gradient(180deg, #2a2316, #1a150e);
  color: var(--gold-bright); padding: 12px 26px; cursor: pointer; border-radius: 4px;
  transition: all .25s ease; font-size: 15px;
}
.btn:hover { border-color: var(--gold); box-shadow: 0 0 18px rgba(194, 163, 92, .16); transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(180deg, #8f2d22, #6d2118);
  border-color: #a5442f; color: #f6e8cd; text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.btn-primary:hover { border-color: #d0664a; box-shadow: 0 6px 26px rgba(176, 59, 46, .35); }
.btn-ghost { background: transparent; }
.btn-big { font-size: 17px; padding: 14px 44px; letter-spacing: .5em; text-indent: .5em; }

.seal {
  display: inline-grid; grid-template-columns: repeat(2, 1fr); gap: 1px 4px;
  width: 66px; height: 66px; padding: 7px; align-items: center; justify-items: center;
  background: linear-gradient(160deg, #a33428, #7e241b);
  color: #f3e4c8; font-family: var(--f-kai); font-size: 21px; line-height: 1;
  border-radius: 5px; box-shadow: inset 0 0 8px rgba(0,0,0,.45), 0 4px 14px rgba(0,0,0,.5);
  transform: rotate(-4deg); position: relative;
}
.seal::after { content: ""; position: absolute; inset: 3px; border: 1px solid rgba(243, 228, 200, .55); border-radius: 3px; }
.seal-sm { width: 52px; height: 52px; font-size: 16px; padding: 5px; }

.greek { /* 回纹饰带 */
  height: 12px; opacity: .8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='12' viewBox='0 0 28 12'%3E%3Cpath d='M7 1.5l5 4.5-5 4.5L2 6zM21 1.5l5 4.5-5 4.5L16 6z' fill='none' stroke='%236f5828' stroke-width='1'/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-position: center;
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden; padding: 72px 24px 96px;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

/* ---- 星图 UI 背景（四象星图 · 动效）· 与墨底一体 ---- */
.hero-starmap {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
  animation: xtEnter 1.6s cubic-bezier(.22,.61,.36,1) both;
}
.hero-starmap-par {
  position: absolute; top: 48%; left: 50%;
  width: min(128vw, 1040px); height: min(128vw, 1040px);
  transform: translate(-50%, -50%);
  will-change: auto;
  transition: none;
}
/* 整图：圆外透明；羽化边缘溶入墨底 */
.hero-starmap-orb {
  position: absolute; inset: 0;
  animation:
    xtSpin 140s linear infinite,
    xtBreathOp 9s ease-in-out infinite;
  /* 藏蓝外晕，把圆盘边缘化开 */
  filter:
    drop-shadow(0 0 28px rgba(12, 28, 70, .55))
    drop-shadow(0 0 70px rgba(201, 162, 75, .08));
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 52%, rgba(0,0,0,.92) 62%, rgba(0,0,0,.35) 72%, transparent 82%);
  mask-image: radial-gradient(circle at 50% 50%, #000 52%, rgba(0,0,0,.92) 62%, rgba(0,0,0,.35) 72%, transparent 82%);
}
.hero-starmap-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  user-select: none;
  opacity: .92;
  filter: saturate(.88) contrast(.92) brightness(1.04);
}
/* 光晕与金环同呼吸，压低对比 */
.hero-starmap-glow {
  position: absolute; inset: 2%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 50%,
    transparent 42%,
    rgba(201, 162, 75, .05) 56%,
    rgba(201, 162, 75, .1) 66%,
    transparent 78%
  );
  mix-blend-mode: screen;
  animation: xtGlow 5.5s ease-in-out infinite;
}
.hero-starmap-glow::before {
  content: ""; position: absolute; inset: 4%;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 75, .14);
  box-shadow: 0 0 18px rgba(201, 162, 75, .1), inset 0 0 22px rgba(201, 162, 75, .05);
}
.hero-starmap-glow::after {
  content: ""; position: absolute; inset: 11%;
  border-radius: 50%;
  border: 1px dashed rgba(201, 162, 75, .08);
}
.hero-starmap-sweep {
  position: absolute; inset: 6%;
  border-radius: 50%;
  overflow: hidden;
  mix-blend-mode: screen;
}
.hero-starmap-sweep::before {
  content: ""; position: absolute; top: -20%; bottom: -20%;
  width: 28%;
  left: -30%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(236, 210, 138, .0) 20%,
    rgba(236, 210, 138, .16) 50%,
    rgba(236, 210, 138, .0) 80%,
    transparent 100%
  );
  transform: skewX(-18deg);
  animation: xtSweep 7.5s ease-in-out infinite;
}
/* 整页同调压暗：不再在字后挖一块黑 */
.hero-starmap-vail {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 8, 12, .42) 0%, rgba(8, 8, 12, .12) 22%, rgba(8, 8, 12, .1) 70%, rgba(8, 8, 12, .5) 100%),
    radial-gradient(ellipse 78% 70% at 50% 48%, transparent 40%, rgba(8, 8, 12, .28) 72%, rgba(8, 8, 12, .62) 100%);
}
/* 星点闪烁层：点位来自星图亮斑（叠在旧 UI 之上） */
.hero-starmap-stars {
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.hero-starmap-stars i {
  position: absolute;
  width: 3px; height: 3px;
  margin: -1.5px 0 0 -1.5px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 180, .95) 0%, rgba(236, 210, 138, .55) 45%, transparent 70%);
  box-shadow: 0 0 6px rgba(236, 210, 138, .55), 0 0 14px rgba(201, 162, 75, .25);
  opacity: 0;
  transform: scale(.7);
}
.hero-starmap-stars.on i {
  animation: xtStarTwinkle var(--d, 3.2s) ease-in-out infinite;
  animation-delay: var(--dl, 0s);
}
.hero-starmap-stars i:nth-child(3n) {
  width: 2px; height: 2px; margin: -1px 0 0 -1px;
}
.hero-starmap-stars i:nth-child(5n) {
  width: 4px; height: 4px; margin: -2px 0 0 -2px;
}
@keyframes xtStarTwinkle {
  0%, 100% { opacity: .12; transform: scale(.65); }
  35%      { opacity: calc(.4 + var(--b, .7) * .6); transform: scale(1.15); }
  55%      { opacity: calc(.25 + var(--b, .7) * .4); transform: scale(.9); }
  75%      { opacity: calc(.35 + var(--b, .7) * .55); transform: scale(1.05); }
}

@keyframes xtEnter {
  from { opacity: 0; transform: scale(1.08); filter: blur(6px); }
  to   { opacity: 1; transform: scale(1);    filter: blur(0); }
}
@keyframes xtSpin { to { transform: rotate(360deg); } }
@keyframes xtBreathOp {
  0%, 100% { opacity: .9; filter: saturate(.88) contrast(.92) brightness(1.02); }
  50%      { opacity: 1;  filter: saturate(.94) contrast(.95) brightness(1.08); }
}
@keyframes xtGlow {
  0%, 100% { opacity: .55; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.03); }
}
@keyframes xtSweep {
  0%   { left: -35%; opacity: 0; }
  12%  { opacity: 1; }
  55%  { opacity: .7; }
  100% { left: 110%; opacity: 0; }
}
@keyframes xtTwinkle {
  0%, 100% { opacity: 0; transform: scale(.6); }
  40%      { opacity: .95; transform: scale(1.2); }
  70%      { opacity: .35; transform: scale(.9); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-starmap,
  .hero-starmap-orb,
  .hero-starmap-glow,
  .hero-starmap-sweep::before,
  .hero-starmap-stars i,
  .hero-ring svg {
    animation: none !important;
  }
  .hero-starmap-orb { opacity: .9; }
  .hero-starmap-img { opacity: .75; }
  .hero-starmap-stars i { opacity: .35; transform: scale(.9); }
}

/* 手机端英雄区硬约束：防止 flex 子项把版心撑破 */
@media (max-width: 860px) {
  html, body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: clip !important;
  }
  .hero, .hero-inner, .hero-eyebrow, .hero-title,
  .hero-sub, .hero-quote, .hero-actions {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .hero-sub, .hero-quote, .hero-eyebrow {
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }
  .hero-sub { letter-spacing: 0 !important; text-indent: 0 !important; font-size: 14px !important; padding: 0 10px; }
  .hero-quote { letter-spacing: 0 !important; font-size: 13px !important; padding: 0 10px; }
  .hero-sub .hs-l,
  .hero-sub .hs-r {
    display: block !important;
    line-height: 1.7;
    width: 100% !important;
    max-width: 100% !important;
  }
  .hero-sub .hs-sep { display: none !important; }
  .hero-sub .hs-l { margin-bottom: 2px; }
  .hero-quote .hq-src { display: block !important; margin-top: 2px; }
  .hero-eyebrow span {
    display: block !important;
    letter-spacing: .05em !important;
    text-indent: .05em !important;
    font-size: 12px !important;
  }
  .hero-eyebrow::before,
  .hero-eyebrow::after { display: none !important; }
  .hero-title { font-size: clamp(40px, 12vw, 64px) !important; }
}

/* 原 SVG 罗盘：压进星图同一介质，不再像贴上去的壳 */
.hero-ring {
  position: absolute; top: 48%; left: 50%;
  transform: translate(-50%, -50%);
  opacity: .55; z-index: 1;
  /* 与星盘同径，圆心对齐 */
  width: min(108vw, 860px);
  height: min(108vw, 860px);
  max-width: min(108vw, 860px);
  max-height: min(108vw, 860px);
  pointer-events: none;
  mix-blend-mode: overlay;
  filter: brightness(.95) saturate(.7) contrast(.85);
}

/* 首页已有星图实景背景，撤掉注入的太极/星象小装饰，避免灰斑叠影 */
.hero > .xj-celestial { display: none !important; }
.hero-ring svg {
  display: block; width: min(108vw, 860px) !important;
  height: min(108vw, 860px) !important;
  animation: spin 240s linear infinite;
  overflow: visible;
}
/* 视差容器只做居中，不跟手 */
.hero-starmap-par {
  transition: none !important;
  will-change: auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hero-inner {
  position: relative; z-index: 3;
  max-width: min(920px, 100%);
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 0 8px;
  box-sizing: border-box;
}
/* 字影代替黑色垫板，融进星图 */
.hero-title {
  text-shadow: none;
  filter: drop-shadow(0 2px 18px rgba(8, 10, 24, .55)) drop-shadow(0 0 40px rgba(201, 162, 75, .12));
}
.hero-sub, .hero-quote, .hero-eyebrow {
  text-shadow: 0 1px 10px rgba(8, 10, 24, .65);
}
.hero-eyebrow {
  font-size: 13px; letter-spacing: .5em; text-indent: .5em; color: var(--paper-dim);
  margin-bottom: 20px; display: flex; align-items: center; justify-content: center; gap: 14px;
  flex-wrap: wrap;
  max-width: 100%;
  min-width: 0;
}
.hero-eyebrow::before, .hero-eyebrow::after { content: ""; width: 48px; height: 1px; background: linear-gradient(90deg, transparent, var(--line-bright)); flex: 0 0 auto; }
.hero-eyebrow::after { background: linear-gradient(90deg, var(--line-bright), transparent); }
.hero-title {
  font-family: var(--f-kai); font-weight: 400;
  /* 收敛字号：避免与罗盘/侧栏/分割线重叠 */
  font-size: clamp(48px, 10vw, 96px);
  line-height: 1.2;
  margin: 0 auto;
  padding: 4px 6px 0;
  max-width: 100%;
  word-break: keep-all;
  overflow-wrap: anywhere;
  background: linear-gradient(180deg, #f4e6bf 8%, #d9b96a 46%, #9a7a33 88%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 2px 18px rgba(201,162,75,.25));
}
.hero-divider {
  width: min(220px, 60vw); height: 14px; margin: 14px auto 16px; opacity: .9;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='14' viewBox='0 0 240 14'%3E%3Cpath d='M0 7h92M148 7h92' stroke='%236f5828' stroke-width='1'/%3E%3Cpath d='M120 1l7 6-7 6-7-6zM100 7a4 4 0 1 1 8 0 4 4 0 1 1-8 0M132 7a4 4 0 1 1 8 0 4 4 0 1 1-8 0' fill='none' stroke='%23c9a24b' stroke-width='1'/%3E%3C/svg%3E") center/contain no-repeat;
}
.hero-sub {
  font-size: clamp(14px, 2vw, 18px);
  letter-spacing: .22em; text-indent: .22em;
  color: var(--paper); line-height: 1.7;
  max-width: 100%;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
.hero-sub em { letter-spacing: .08em; }
.hero-sub .hs-l,
.hero-sub .hs-r { display: inline; }
.hero-sub .hs-sep { display: inline; }
.hero-quote .hq-src { display: inline; }
.hero-quote {
  margin-top: 16px; color: var(--paper-dim);
  font-size: clamp(13px, 1.6vw, 15px); letter-spacing: .12em;
  padding: 0 8px; line-height: 1.8;
  max-width: 100%;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  white-space: normal;
}
.hero-actions { margin-top: 32px; }
.hero-cta { font-size: 16px; padding: 14px 40px; }
.hero-seal { margin: 32px auto 0; }
.hero-side {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  font-family: var(--f-xw); font-size: 13px; letter-spacing: .45em; color: var(--paper-faint);
  writing-mode: vertical-rl; padding: 14px 6px; border: 1px solid rgba(107, 85, 40, .35);
  opacity: .75; max-height: 42vh; overflow: hidden;
}
.hero-side.left { left: max(8px, 2vw); }
.hero-side.right { right: max(8px, 2vw); }
.vtitle { line-height: 1.8; }
.hero-scroll { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); color: var(--gold-dim); animation: bob 2.2s ease-in-out infinite; font-size: 14px; }
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

@media (max-width: 860px) {
  .hero { padding: 48px 16px 88px; min-height: calc(100dvh - 60px); }
  .hero-title { font-size: clamp(42px, 14vw, 72px); }
  .hero-eyebrow { font-size: 12px; letter-spacing: .28em; }
  .hero-eyebrow::before, .hero-eyebrow::after { width: 24px; }
  .hero-side { display: none; }
  .hero-ring { opacity: .4; filter: brightness(.9) saturate(.65) contrast(.8); mix-blend-mode: overlay; }
  .hero-ring svg { width: min(120vw, 560px) !important; height: min(120vw, 560px) !important; }
  .hero-sub { letter-spacing: .12em; }
  .hero-starmap-par { width: min(148vw, 720px); height: min(148vw, 720px); }
  .hero-starmap-img { opacity: .82; filter: saturate(.88) contrast(.9) brightness(1.02); }
  .hero-starmap-vail {
    background:
      linear-gradient(180deg, rgba(8,8,12,.48) 0%, rgba(8,8,12,.14) 24%, rgba(8,8,12,.12) 72%, rgba(8,8,12,.55) 100%),
      radial-gradient(ellipse 85% 75% at 50% 46%, transparent 38%, rgba(8,8,12,.3) 75%, rgba(8,8,12,.6) 100%);
  }
  .hero-starmap-orb { animation-duration: 240s, 11s; }
}

/* ---------- 章节 ---------- */
.sec { position: relative; max-width: 1080px; margin: 0 auto; padding: 86px 22px 30px; z-index: 1; }
.sec-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 34px; }
.sec-no {
  font-family: var(--f-kai); font-size: 44px; color: var(--gold); line-height: 1;
  text-shadow: 0 0 24px rgba(201, 162, 75, .3);
}
.sec-head h2 {
  font-family: var(--f-xw); font-weight: 400; font-size: 34px; letter-spacing: .3em; color: var(--paper);
}
.sec-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-bright), transparent); position: relative; top: -8px; }
.sec-line::before { content: "◆"; position: absolute; left: 0; top: -9px; font-size: 10px; color: var(--gold-dim); }
.sec-motto { font-size: 13px; letter-spacing: .3em; color: var(--paper-faint); white-space: nowrap; }

/* ---------- 面板 ---------- */
.panel {
  position: relative; background: linear-gradient(180deg, var(--panel-hi), var(--panel-lo));
  border: 1px solid var(--line); border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35), 0 10px 34px rgba(0, 0, 0, .42);
}
.panel::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(111, 88, 40, .3); border-radius: 2px; pointer-events: none; }
.panel > * { position: relative; }

/* ---------- 起例问命表单 ---------- */
.qmp { padding: 34px 34px 26px; }
.qmp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 24px; }
.field label { display: block; font-size: 14px; letter-spacing: .2em; color: var(--gold); margin-bottom: 8px; }
.field label small { letter-spacing: .05em; margin-left: 6px; }
input[type="text"], input[type="date"], input[type="time"], input[type="number"], select {
  width: 100%; background: #171208; color: var(--paper);
  border: 1px solid var(--line); border-radius: 3px; padding: 11px 12px;
  font-family: var(--f-song); font-size: 15px; letter-spacing: .08em;
  color-scheme: dark; outline: none; transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus { border-color: var(--gold-dim); box-shadow: 0 0 0 3px rgba(201, 162, 75, .12); }
select option { background: #1a150c; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.seg button {
  flex: 1; background: transparent; border: 0; color: var(--paper-dim);
  font-family: var(--f-song); font-size: 14.5px; letter-spacing: .12em; padding: 11px 8px; cursor: pointer;
  transition: all .2s;
}
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: linear-gradient(180deg, #553d17, #3a2a0e); color: var(--gold-bright); }
.seg-sm button { padding: 8px 6px; font-size: 13px; }

.qmp-opts { display: flex; flex-wrap: wrap; gap: 14px 26px; margin-top: 24px; padding-top: 20px; border-top: 1px dashed rgba(111, 88, 40, .45); align-items: center; }
.opt { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14.5px; color: var(--paper-dim); user-select: none; }
.opt > input[type=checkbox] { display: none; }
.opt i {
  width: 34px; height: 18px; border: 1px solid var(--line-bright); border-radius: 10px; position: relative;
  background: #171208; transition: all .2s; flex: none;
}
.opt i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper-faint); transition: all .2s; }
.opt input:checked + i { border-color: var(--gold); background: #2a2210; }
.opt input:checked + i::after { left: 18px; background: var(--gold-bright); box-shadow: 0 0 8px rgba(236, 210, 138, .7); }
.opt b { font-weight: 400; font-size: 12px; color: var(--gold-dim); border: 1px solid rgba(107, 85, 40, .5); padding: 1px 7px; border-radius: 2px; letter-spacing: .1em; }
.opt-label { font-size: 14.5px; color: var(--paper-dim); }
.opt-seg { gap: 12px; }
.qmp-actions { display: flex; gap: 16px; justify-content: center; margin-top: 30px; }
.qmp-fine { margin-top: 22px; text-align: center; font-size: 12.5px; color: var(--paper-faint); letter-spacing: .12em; }

/* ---------- 命盘头部 ---------- */
.chart-head { text-align: center; padding: 30px 22px 26px; margin-bottom: 26px; }
.chart-mingzao { display: flex; align-items: center; justify-content: center; gap: 20px; }
.chart-mingzao .mz {
  font-family: var(--f-kai); font-size: 46px; color: var(--gold-bright);
  text-shadow: 0 0 30px rgba(201, 162, 75, .3); letter-spacing: .1em;
}
.chart-meta { margin-top: 14px; font-size: 14px; color: var(--paper-dim); letter-spacing: .06em; line-height: 2; }
.chart-meta b { color: var(--paper); font-weight: 600; }
.chart-meta .dst-note { color: var(--cinnabar-bright); border: 1px solid rgba(176, 59, 46, .5); border-radius: 2px; padding: 0 6px; font-size: 12px; margin: 0 4px; }
.chart-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.tag {
  font-size: 12.5px; letter-spacing: .12em; color: var(--paper-dim);
  border: 1px solid var(--line-bright); border-radius: 2px; padding: 3px 10px; background: rgba(23, 18, 8, .6);
}
.tag b { color: var(--gold-bright); font-weight: 600; }

/* ---------- 四柱盘 ---------- */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pillar {
  text-align: center; padding: 16px 8px 14px; position: relative;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel-lo));
  border: 1px solid var(--line); border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.35), 0 8px 26px rgba(0,0,0,.4);
  transition: transform .25s ease, box-shadow .25s ease;
}
.pillar:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px rgba(0,0,0,.35), 0 14px 34px rgba(0,0,0,.55); }
.pillar.main { border-color: rgba(176, 59, 46, .65); box-shadow: 0 0 0 1px rgba(176, 59, 46, .3), inset 0 0 40px rgba(176, 59, 46, .07), 0 12px 34px rgba(0,0,0,.5); }
.pillar.main::after {
  content: "日主"; position: absolute; top: -1px; right: -1px; font-size: 11px; letter-spacing: .2em; text-indent: .2em;
  background: linear-gradient(160deg, #a33428, #7e241b); color: #f3e4c8; padding: 3px 9px; border-radius: 0 4px 0 4px;
}
.p-label { font-size: 13px; letter-spacing: .5em; text-indent: .5em; color: var(--paper-dim); }
.p-palace { font-size: 11.5px; color: var(--paper-faint); letter-spacing: .1em; margin-top: 2px; }
.p-tengod { margin-top: 10px; font-size: 14px; color: var(--gold); letter-spacing: .2em; height: 22px; }
.p-tengod.daymaster { color: var(--cinnabar-bright); font-weight: 700; }
.p-char {
  font-family: var(--f-kai); font-size: 58px; line-height: 1.15; width: 74px; height: 74px; margin: 4px auto;
  display: flex; align-items: center; justify-content: center; position: relative; cursor: default;
  text-shadow: 0 0 26px currentColor;
}
.p-char::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(111, 88, 40, .55);
  background: radial-gradient(circle at 50% 38%, rgba(236, 210, 138, .08), rgba(0, 0, 0, .28) 72%);
}
.p-char span { position: relative; }
.p-char.zh { width: 74px; }
.p-hidden { margin-top: 10px; display: flex; flex-direction: column; gap: 3px; min-height: 30px; }
.p-hidden .hg { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13.5px; }
.p-hidden .hg b { font-family: var(--f-kai); font-weight: 400; font-size: 19px; }
.p-hidden .hg em { font-style: normal; font-size: 11.5px; color: var(--paper-dim); letter-spacing: .1em; }
.p-cs { margin-top: 8px; font-size: 11.5px; color: var(--paper-faint); letter-spacing: .15em; }
.p-nayin {
  margin: 10px auto 0; display: inline-block; font-size: 12px; letter-spacing: .2em; text-indent: .2em;
  color: var(--gold-bright); border: 1px solid rgba(107, 85, 40, .55); padding: 2px 10px; border-radius: 2px;
  background: linear-gradient(180deg, rgba(85, 61, 23, .35), rgba(42, 32, 13, .35));
}
.p-stars { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; min-height: 20px; }
.p-stars .ss { font-size: 11px; letter-spacing: .06em; border-radius: 2px; padding: 1px 6px; border: 1px solid; cursor: default; }
.ss.ji2 { color: #dcc9a2; border-color: rgba(111, 88, 40, .6); background: rgba(52, 40, 18, .4); }   /* 吉 */
.ss.xiong { color: #e8a79b; border-color: rgba(176, 59, 46, .55); background: rgba(70, 24, 18, .35); } /* 凶 */
.ss.zhong { color: var(--paper-dim); border-color: rgba(120, 110, 90, .4); background: rgba(40, 36, 28, .4); } /* 中 */
.ss.kong { color: var(--cinnabar-bright); border-color: rgba(212, 79, 63, .6); background: rgba(60, 18, 12, .45); }

/* ---------- 命盘小节 ---------- */
.pan-sub { margin: 52px 0 18px; display: flex; align-items: center; gap: 14px; }
.pan-sub h3 { font-family: var(--f-xw); font-weight: 400; font-size: 23px; letter-spacing: .25em; color: var(--gold-bright); }
.pan-sub .rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-bright), transparent); }
.pan-sub .quote-mini { font-size: 12.5px; color: var(--paper-faint); letter-spacing: .15em; }

/* ---------- 五行 ---------- */
.wx-wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; align-items: stretch; }
.wx-card { padding: 24px 26px; }
.wx-rows { display: flex; flex-direction: column; gap: 13px; margin-top: 6px; }
.wx-row { display: grid; grid-template-columns: 96px 1fr 84px; align-items: center; gap: 12px; }
.wx-row .wx-name { display: flex; align-items: center; gap: 8px; font-size: 15px; letter-spacing: .1em; }
.wx-row .wx-name b { font-family: var(--f-kai); font-weight: 400; font-size: 24px; }
.wx-row .wx-name em { font-style: normal; font-size: 11px; color: var(--paper-faint); letter-spacing: .05em; }
.wx-bar { height: 12px; background: rgba(0, 0, 0, .5); border: 1px solid rgba(111, 88, 40, .35); border-radius: 6px; overflow: hidden; position: relative; }
.wx-bar i { display: block; height: 100%; width: 0; border-radius: 6px; transition: width 1s cubic-bezier(.2, .7, .2, 1); }
.wx-row .wx-val { font-size: 13px; color: var(--paper-dim); text-align: right; letter-spacing: .05em; }
.wx-val b { color: var(--paper); font-size: 15px; }
.wx-foot { margin-top: 16px; font-size: 12.5px; color: var(--paper-faint); line-height: 1.9; }
.wx-wheel { display: flex; align-items: center; justify-content: center; padding: 10px; }
.wx-wheel svg { max-width: 100%; height: auto; }

/* ---------- 旺衰 · 格局 · 用神 ---------- */
.ge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.ge-card { padding: 24px 26px; }
.ge-card.wide { grid-column: 1 / -1; }
.ge-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.ge-title h4 { font-family: var(--f-xw); font-weight: 400; font-size: 19px; letter-spacing: .3em; color: var(--gold); }
.ge-title .en { font-size: 11.5px; color: var(--paper-faint); letter-spacing: .18em; }

.gauge { margin: 14px 0 6px; }
.gauge-track { position: relative; height: 14px; border-radius: 7px; overflow: hidden; border: 1px solid rgba(111, 88, 40, .4);
  background: linear-gradient(90deg, #17233b 0%, #1d2c3a 30%, #24352a 50%, #3a3320 70%, #43281c 100%); }
.gauge-marker { position: absolute; top: -4px; width: 3px; height: 22px; background: var(--gold-bright); box-shadow: 0 0 10px rgba(236, 210, 138, .9); border-radius: 2px; transition: left 1s cubic-bezier(.2, .7, .2, 1); }
.gauge-labels { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--paper-faint); margin-top: 6px; letter-spacing: .15em; }
.gauge-verdict { text-align: center; margin-top: 10px; font-size: 15px; letter-spacing: .2em; color: var(--paper); }
.gauge-verdict b { font-family: var(--f-kai); font-weight: 400; font-size: 26px; color: var(--gold-bright); margin: 0 6px; }
.de-tags { display: flex; gap: 8px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.de-tag { font-size: 12px; letter-spacing: .15em; padding: 3px 10px; border-radius: 2px; border: 1px solid; }
.de-tag.ok { color: #b9d8ac; border-color: rgba(133, 185, 120, .5); background: rgba(38, 56, 30, .4); }
.de-tag.no { color: #cf9f94; border-color: rgba(150, 100, 88, .4); background: rgba(52, 30, 24, .35); }

.ge-name { font-family: var(--f-kai); font-size: 34px; color: var(--gold-bright); text-shadow: 0 0 24px rgba(201, 162, 75, .3); }
.ge-bian { font-size: 12px; color: var(--cinnabar-bright); border: 1px solid rgba(176, 59, 46, .55); padding: 1px 8px; border-radius: 2px; vertical-align: middle; margin-left: 8px; }
.ge-note { margin-top: 10px; font-size: 14px; color: var(--paper-dim); line-height: 2; }
.ge-line { margin-top: 10px; font-size: 13px; color: var(--paper-faint); letter-spacing: .05em; }
.ge-line b { color: var(--gold); font-weight: 600; }

.th-stems { display: flex; gap: 10px; margin: 12px 0 4px; flex-wrap: wrap; }
.th-stem { width: 52px; text-align: center; padding: 8px 0 6px; border: 1px solid rgba(111, 88, 40, .5); border-radius: 3px; background: rgba(23, 18, 8, .55); }
.th-stem b { display: block; font-family: var(--f-kai); font-weight: 400; font-size: 26px; line-height: 1.2; }
.th-stem span { font-size: 10.5px; color: var(--paper-faint); letter-spacing: .1em; }
.th-quote { margin-top: 12px; font-size: 13.5px; color: var(--paper-dim); border-left: 2px solid var(--gold-dim); padding-left: 12px; line-height: 2; }

.ys-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.ys-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 3px; font-size: 14.5px;
  border: 1px solid; cursor: default; letter-spacing: .1em;
}
.ys-chip b { font-family: var(--f-kai); font-weight: 400; font-size: 20px; }
.ys-chip.fav { color: #e9dfc6; border-color: rgba(201, 162, 75, .6); background: linear-gradient(180deg, rgba(85, 61, 23, .4), rgba(42, 32, 13, .4)); }
.ys-chip.avoid { color: #d9a79c; border-color: rgba(176, 59, 46, .5); background: linear-gradient(180deg, rgba(70, 28, 20, .4), rgba(38, 16, 12, .4)); opacity: .92; }
.ys-chip small { color: inherit; opacity: .75; }
.ys-basis { margin-top: 8px; }
.ys-basis li { list-style: none; font-size: 13.5px; color: var(--paper-dim); line-height: 2.1; padding-left: 16px; position: relative; }
.ys-basis li::before { content: "◈"; position: absolute; left: 0; color: var(--gold-dim); font-size: 11px; }
.ys-app { margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(111, 88, 40, .4); display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--paper-dim); }
.ys-app b { color: var(--gold); font-weight: 600; }

/* ---------- 大运 ---------- */
.dy-intro { padding: 18px 24px; margin-bottom: 18px; font-size: 14px; color: var(--paper-dim); line-height: 2.1; }
.dy-intro b { color: var(--gold-bright); font-weight: 600; }
.dy-track { position: relative; display: flex; gap: 14px; overflow-x: auto; padding: 8px 4px 22px; }
.dy-track::before { content: ""; position: absolute; left: 0; right: 0; top: 66px; height: 1px; background: linear-gradient(90deg, transparent, var(--line-bright) 8%, var(--line-bright) 92%, transparent); }
.dy-card {
  min-width: 108px; text-align: center; padding: 14px 8px 12px; position: relative; border-radius: 4px;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel-lo)); border: 1px solid var(--line);
  transition: transform .2s, box-shadow .2s, border-color .2s; flex: none;
}
.dy-card:hover { transform: translateY(-3px); border-color: var(--gold-dim); }
.dy-card.cur { border-color: rgba(176, 59, 46, .7); box-shadow: 0 0 0 1px rgba(176, 59, 46, .25), 0 8px 26px rgba(176, 59, 46, .18); }
.dy-card.cur::after { content: "现行"; position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font-size: 10.5px; letter-spacing: .2em; text-indent: .2em; background: #8f2d22; color: #f3e4c8; padding: 1px 8px; border-radius: 2px; }
.dy-age { font-size: 12px; color: var(--paper-faint); letter-spacing: .05em; }
.dy-gz { font-family: var(--f-kai); font-size: 30px; line-height: 1.5; margin: 4px 0 2px; letter-spacing: .1em; }
.dy-gz span { display: inline-block; }
.dy-tg { font-size: 12px; color: var(--gold); letter-spacing: .2em; }
.dy-year { margin-top: 4px; font-size: 11.5px; color: var(--paper-dim); }
.dy-note { font-size: 10.5px; color: var(--paper-faint); margin-top: 2px; }

/* ---------- 流年 · 流月 ---------- */
.ln-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 13px; }
.ln-card {
  text-align: center; padding: 14px 6px 11px; border-radius: 4px; cursor: pointer; position: relative;
  background: linear-gradient(180deg, var(--panel-hi), var(--panel-lo)); border: 1px solid var(--line);
  transition: transform .18s, border-color .18s;
}
.ln-card:hover { transform: translateY(-3px); border-color: var(--gold-dim); }
.ln-card.sel { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(201, 162, 75, .35), 0 8px 22px rgba(201, 162, 75, .12); }
.ln-card.cur::after { content: "今岁"; position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font-size: 10.5px; letter-spacing: .2em; text-indent: .2em; background: #553d17; color: var(--gold-bright); padding: 1px 8px; border-radius: 2px; border: 1px solid var(--gold-dim); }
.ln-year { font-size: 12px; color: var(--paper-faint); letter-spacing: .1em; }
.ln-gz { font-family: var(--f-kai); font-size: 28px; line-height: 1.5; letter-spacing: .12em; }
.ln-gz span { display: inline-block; }
.ln-meta { font-size: 11.5px; color: var(--paper-dim); margin-top: 2px; }
.ln-tg { font-size: 12px; color: var(--gold); margin-top: 3px; letter-spacing: .15em; }

.ly-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.ly-card { text-align: center; padding: 10px 4px 8px; border-radius: 3px; border: 1px solid var(--line); background: rgba(23, 18, 8, .5); }
.ly-card.cur { border-color: var(--gold); background: linear-gradient(180deg, rgba(85, 61, 23, .4), rgba(30, 24, 10, .5)); }
.ly-jian { font-size: 11px; color: var(--paper-faint); letter-spacing: .1em; }
.ly-gz { font-size: 17px; margin: 3px 0; letter-spacing: .1em; font-weight: 600; }
.ly-tg { font-size: 11px; color: var(--gold-dim); }

/* ---------- 神煞 · 关系 ---------- */
.ss-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ss-table th { font-weight: 600; color: var(--gold); letter-spacing: .2em; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-bright); font-size: 13px; white-space: nowrap; }
.ss-table td { padding: 9px 12px; border-bottom: 1px dashed rgba(111, 88, 40, .3); color: var(--paper-dim); vertical-align: top; }
.ss-table tr:hover td { background: rgba(52, 40, 18, .18); }
.ss-table td b { color: var(--paper); font-weight: 600; }
.jx { font-size: 11.5px; border-radius: 2px; padding: 1px 7px; border: 1px solid; white-space: nowrap; }
.jx.ji { color: #dcc9a2; border-color: rgba(111, 88, 40, .7); }
.jx.xiong { color: #e8a79b; border-color: rgba(176, 59, 46, .6); }
.jx.zhong { color: var(--paper-dim); border-color: rgba(120, 110, 90, .45); }

.rel-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.rel-chip { font-size: 13px; letter-spacing: .06em; padding: 5px 12px; border-radius: 2px; border: 1px solid rgba(111, 88, 40, .5); background: rgba(23, 18, 8, .55); color: var(--paper-dim); }
.rel-chip b { color: var(--gold-bright); font-weight: 600; margin-right: 4px; }
.rel-chip.xiong b { color: var(--cinnabar-bright); }

/* ---------- 古籍要诀 ---------- */
.classics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.classic { padding: 26px 18px 18px; text-align: center; min-height: 300px; display: flex; flex-direction: column; align-items: center; }
.classic::after {
  content: ""; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 46px; height: 46px; opacity: .5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Ccircle cx='24' cy='24' r='22' fill='none' stroke='%236f5828' stroke-width='1.5'/%3E%3Ccircle cx='24' cy='24' r='15' fill='none' stroke='%236f5828' stroke-width='1'/%3E%3Cpath d='M24 12a12 12 0 0 1 0 24 6 6 0 0 1 0-12 6 6 0 0 0 0-12z' fill='%236f5828'/%3E%3C/svg%3E") center/contain no-repeat;
}
.vtext { writing-mode: vertical-rl; letter-spacing: .5em; margin: 0 auto; flex: 1; font-size: 16.5px; color: var(--paper); line-height: 2.4; font-family: var(--f-xw); }
.classic footer { margin-top: 16px; font-size: 12px; color: var(--paper-faint); letter-spacing: .12em; }

/* ---------- 尾注 ---------- */
.foot { margin-top: 100px; position: relative; }
.foot-inner { max-width: 1080px; margin: 0 auto; padding: 40px 22px 56px; text-align: center; }
.foot-motto { font-family: var(--f-xw); font-size: 17px; letter-spacing: .3em; color: var(--gold); margin-top: 14px; }
.foot-fine { font-size: 12.5px; color: var(--paper-faint); margin-top: 12px; letter-spacing: .08em; max-width: 640px; margin-left: auto; margin-right: auto; line-height: 2.1; }

/* ---------- 起盘遮罩 ---------- */
.loading {
  position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  background: rgba(8, 6, 4, .82); backdrop-filter: blur(6px);
}
.load-ring svg { animation: spin 3.2s linear infinite; }
.load-text { font-family: var(--f-xw); font-size: 19px; letter-spacing: .5em; text-indent: .5em; color: var(--gold-bright); text-shadow: 0 0 24px rgba(201, 162, 75, .4); }

/* ---------- 浮层 ---------- */
.tooltip {
  position: fixed; z-index: 99; max-width: 300px; padding: 12px 15px; border-radius: 4px;
  background: linear-gradient(180deg, #241c0f, #171208); border: 1px solid var(--line-bright);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .6), inset 0 0 0 1px rgba(0, 0, 0, .4);
  font-size: 13px; line-height: 1.9; color: var(--paper-dim); pointer-events: none;
}
.tooltip b { color: var(--gold-bright); font-weight: 600; }
.tooltip .tt-name { color: var(--gold-bright); font-weight: 700; letter-spacing: .15em; margin-bottom: 4px; font-size: 14px; }
.toast {
  position: fixed; left: 50%; bottom: 42px; transform: translateX(-50%) translateY(20px); z-index: 99;
  padding: 12px 26px; border-radius: 4px; background: linear-gradient(180deg, #241c0f, #171208);
  border: 1px solid var(--gold-dim); color: var(--gold-bright); font-size: 14px; letter-spacing: .2em;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .6); opacity: 0; transition: all .3s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 显现动画 ---------- */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.rv.in { opacity: 1; transform: none; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0d0a06; }
::-webkit-scrollbar-thumb { background: #3a2f1b; border-radius: 5px; border: 2px solid #0d0a06; }
::-webkit-scrollbar-thumb:hover { background: #55431f; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .qmp-grid { grid-template-columns: repeat(2, 1fr); }
  .wx-wrap, .ge-grid { grid-template-columns: 1fr; }
  .classics { grid-template-columns: repeat(2, 1fr); }
  .ln-grid { grid-template-columns: repeat(3, 1fr); }
  .ly-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-side { display: none; }
}
@media (max-width: 640px) {
  .sec { padding: 64px 14px 20px; }
  .qmp { padding: 24px 16px 20px; }
  .qmp-grid { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .p-char { font-size: 46px; width: 60px; height: 60px; }
  .p-char.zh { width: 60px; }
  .sec-head h2 { font-size: 26px; }
  .sec-no { font-size: 34px; }
  .sec-motto { display: none; }
  .classics { grid-template-columns: 1fr; }
  .classic { min-height: 220px; }
  .vtext { writing-mode: horizontal-tb; letter-spacing: .2em; }
  .ln-grid { grid-template-columns: repeat(2, 1fr); }
  .ly-grid { grid-template-columns: repeat(3, 1fr); }
  .chart-mingzao .mz { font-size: 34px; }
  .ge-name { font-size: 27px; }
  .qmp-actions { flex-direction: column; align-items: stretch; }
}

/* ---------- 命理详解 · 古今同参 ---------- */
.eli { display: block; }
.eli-intro { color: var(--paper-dim); font-size: 14px; line-height: 1.9; margin: 14px 2px 18px; }
.eli-intro b { color: var(--gold-bright); font-weight: 600; }
.eli-card {
  background: var(--panel-lo);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 22px 18px;
  margin-bottom: 18px;
  position: relative;
}
.eli-card::before {
  content: '';
  position: absolute; inset: 4px;
  border: 1px solid rgba(201, 162, 75, 0.12);
  border-radius: 7px; pointer-events: none;
}
.eli-tag {
  display: inline-block;
  font-family: var(--f-kai);
  font-size: 15px; letter-spacing: .3em;
  color: var(--cinnabar-bright);
  border: 1px solid rgba(176, 59, 46, 0.55);
  border-radius: 4px;
  padding: 3px 10px 3px 13px;
  margin-bottom: 12px;
  background: rgba(176, 59, 46, 0.08);
}
.eli-head { font-size: 17px; color: var(--paper); letter-spacing: .08em; margin-bottom: 12px; }
.eli-head b { color: var(--gold-bright); font-weight: 700; }
.eli-gu {
  margin: 10px 0;
  padding: 12px 16px 12px 18px;
  border-left: 3px solid var(--gold-dim);
  background: rgba(201, 162, 75, 0.06);
  border-radius: 0 8px 8px 0;
  font-family: var(--f-kai);
  font-size: 17px; line-height: 2;
  color: var(--paper);
  letter-spacing: .06em;
}
.eli-gu b {
  display: block;
  font-family: var(--f-song);
  font-size: 12.5px; font-weight: 600;
  letter-spacing: .18em;
  color: var(--gold);
  margin-bottom: 4px;
}
.eli-gu2 { font-size: 15.5px; padding: 10px 14px 10px 16px; }
.eli-bai, .eli-guan {
  font-size: 15px; line-height: 2.05;
  color: var(--paper-dim);
  margin: 10px 0 0;
}
.eli-bai b, .eli-guan b { color: var(--gold-bright); }
.eli-k {
  display: inline-block;
  font-size: 12px; letter-spacing: .25em;
  color: var(--jade);
  border: 1px solid rgba(111, 174, 154, 0.45);
  border-radius: 3px;
  padding: 1px 6px 1px 8px;
  margin-right: 10px;
  transform: translateY(-1px);
  background: rgba(111, 174, 154, 0.08);
}
.eli-k2 { color: var(--cinnabar-bright); border-color: rgba(212, 79, 63, 0.45); background: rgba(212, 79, 63, 0.08); }
.eli-guan { color: var(--paper); }
.eli-guan b { color: var(--gold-bright); }
.eli-rels { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 6px; }
@media (min-width: 1000px) { .eli-rels { grid-template-columns: 1fr 1fr; } }
.eli-rel {
  border: 1px dashed var(--line-bright);
  border-radius: 8px;
  padding: 14px 16px 13px;
  background: rgba(13, 10, 6, 0.5);
}
.eli-rel-h {
  font-family: var(--f-kai);
  font-size: 16px; letter-spacing: .12em;
  color: var(--gold-bright);
  margin-bottom: 8px;
}
.eli-rel .eli-gu { font-size: 15.5px; padding: 9px 12px 9px 14px; }
.eli-rel .eli-bai, .eli-rel .eli-guan { font-size: 14px; }
.eli-sum {
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  background: rgba(201, 162, 75, 0.07);
  color: var(--paper);
  font-size: 14.5px; line-height: 2;
}
.eli-sum b { color: var(--cinnabar-bright); font-size: 16px; }
.eli-src {
  margin-top: 4px;
  color: var(--paper-faint);
  font-size: 12.5px; line-height: 1.9;
  letter-spacing: .03em;
}
/* ---------- 总断 · 一言蔽之 ---------- */
.zd-panel { padding: 22px 24px 18px; border: 1px solid var(--line-bright); position: relative; }
.zd-panel::before { content: ''; position: absolute; inset: 5px; border: 1px solid rgba(201, 162, 75, 0.14); border-radius: 6px; pointer-events: none; }
.zd-ganju {
  font-family: var(--f-kai);
  font-size: 19px; line-height: 2; letter-spacing: .05em;
  color: var(--gold-bright);
  text-align: center;
  padding: 6px 8px 16px;
}
.zd-ganju b { color: var(--cinnabar-bright); }
.zd-items { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.zd-item { border: 1px dashed var(--line-bright); border-radius: 8px; padding: 12px 16px 11px; background: rgba(13, 10, 6, 0.5); }
.zd-k { font-family: var(--f-kai); color: var(--gold-bright); letter-spacing: .25em; font-size: 15px; margin-bottom: 6px; }
.zd-item p { font-size: 14px; line-height: 2.05; color: var(--paper-dim); }
.zd-item p b { color: var(--gold-bright); }
.zd-end {
  margin: 18px 10px 2px;
  border: 0;
  text-align: center;
  font-family: var(--f-kai);
  font-size: 16.5px; line-height: 2;
  color: var(--paper);
}
.zd-end b { display: block; font-family: var(--f-song); font-size: 12px; letter-spacing: .25em; color: var(--gold); margin-bottom: 6px; }
.zd-end span { display: block; font-family: var(--f-song); font-size: 13px; color: var(--paper-faint); margin-top: 4px; }
@media (max-width: 760px) { .zd-items { grid-template-columns: 1fr; } .zd-ganju { font-size: 16.5px; } }

/* ---------- 命例存档 ---------- */
.hist-bar { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.hist-hint { font-size: 12.5px; color: var(--paper-faint); letter-spacing: .05em; }
.btn-sm { padding: 7px 18px; font-size: 13px; letter-spacing: .15em; }
#btnHist.on { border-color: var(--gold); color: var(--gold-bright); }
.hist-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-lo);
  overflow: hidden;
  text-align: left;
}
.hist-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--gold); font-size: 13px; letter-spacing: .12em;
}
.hist-clear {
  background: none; cursor: pointer; font-family: inherit;
  border: 1px solid rgba(176, 59, 46, 0.5); color: var(--cinnabar-bright);
  border-radius: 4px; padding: 3px 12px; font-size: 12px; letter-spacing: .1em;
}
.hist-clear:hover { background: rgba(176, 59, 46, 0.12); }
.hist-list { max-height: 320px; overflow-y: auto; }
.hist-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px dashed var(--line);
}
.hist-row:last-child { border-bottom: 0; }
.hist-row:hover { background: rgba(201, 162, 75, 0.05); }
.hist-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-width: 0; }
.hist-name { font-family: var(--f-kai); color: var(--paper); font-size: 15px; }
.hist-sex { font-size: 11px; color: var(--jade); border: 1px solid rgba(111, 174, 154, 0.4); border-radius: 3px; padding: 0 5px; white-space: nowrap; }
.hist-birth, .hist-ge { font-size: 13px; color: var(--paper-dim); white-space: nowrap; }
.hist-gz { font-family: var(--f-kai); font-size: 14px; color: var(--gold-bright); letter-spacing: .15em; white-space: nowrap; }
.hist-ops { display: flex; gap: 8px; flex: none; }
.hist-load, .hist-del {
  background: none; cursor: pointer; font-family: inherit;
  border-radius: 4px; padding: 4px 14px; font-size: 12.5px; letter-spacing: .1em;
}
.hist-load { border: 1px solid var(--gold-dim); color: var(--gold-bright); }
.hist-load:hover { background: rgba(201, 162, 75, 0.12); }
.hist-del { border: 1px solid rgba(176, 59, 46, 0.5); color: var(--cinnabar-bright); }
.hist-del:hover { background: rgba(176, 59, 46, 0.12); }
.hist-empty { padding: 24px; text-align: center; color: var(--paper-faint); font-size: 13.5px; }
@media (max-width: 640px) {
  .hist-row { flex-direction: column; align-items: stretch; }
  .hist-ops { justify-content: flex-end; }
}
/* 总断标题不被 flex 压缩 */
.zd h3, .eli h3 { flex-shrink: 0; white-space: nowrap; }
.zd .quote-mini, .eli .quote-mini { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 总断容器块级化（面板全宽，标题行仿详解章节） */
.zd { display: block; }
/* ---------- 合盘 ---------- */
.he-form { padding: 24px 26px 20px; }
.he-mode { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.he-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.he-person { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px 14px; background: rgba(13, 10, 6, 0.45); }
.he-p-head {
  font-family: var(--f-kai); font-size: 17px; letter-spacing: .3em;
  color: var(--cinnabar-bright);
  display: inline-block;
  border: 1px solid rgba(176, 59, 46, 0.5);
  border-radius: 4px; padding: 2px 10px 2px 13px;
  margin-bottom: 14px; background: rgba(176, 59, 46, 0.08);
}
.he-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.he-grid .opt-wide { grid-column: 1 / -1; }
.he-grid select, .he-grid input {
  width: 100%; background: rgba(20, 15, 8, 0.85); color: var(--paper);
  border: 1px solid var(--line-bright); border-radius: 6px;
  padding: 8px 10px; font-family: var(--f-song); font-size: 14px;
}
.he-grid select:focus, .he-grid input:focus { outline: none; border-color: var(--gold); }
#heRes { margin-top: 40px; }
.he-top { padding: 20px 24px; display: flex; flex-wrap: wrap; gap: 18px 26px; align-items: center; justify-content: space-between; }
.he-charts { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.he-chart { border: 1px solid var(--line-bright); border-radius: 8px; padding: 12px 14px; background: rgba(13, 10, 6, 0.5); }
.he-chart-t { font-family: var(--f-kai); font-size: 16px; color: var(--gold-bright); letter-spacing: .1em; margin-bottom: 8px; }
.he-chart-t i { font-style: normal; font-size: 12px; color: var(--jade); border: 1px solid rgba(111, 174, 154, 0.4); border-radius: 3px; padding: 0 5px; margin-left: 6px; }
.he-pillars { display: flex; gap: 6px; }
.he-pillar { text-align: center; border: 1px dashed var(--line); border-radius: 6px; padding: 5px 8px 4px; }
.he-pillar.he-day { border-style: solid; border-color: var(--gold-dim); background: rgba(201, 162, 75, 0.08); }
.he-pl { display: block; font-size: 11px; color: var(--paper-faint); letter-spacing: .1em; }
.he-pillar b { font-size: 20px; color: var(--paper); letter-spacing: .05em; font-weight: 700; }
.he-meta { margin-top: 8px; font-size: 12px; color: var(--paper-faint); }
.he-vs {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--gold-dim); color: var(--gold-bright);
  font-family: var(--f-kai); font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 25%, rgba(201, 162, 75, 0.18), rgba(13, 10, 6, 0.6));
}
.he-score-wrap { min-width: 220px; flex: 1; max-width: 340px; }
.he-score { font-family: var(--f-kai); color: var(--gold-bright); }
.he-score b { font-size: 52px; line-height: 1; }
.he-score span { font-size: 14px; color: var(--paper-faint); margin-left: 6px; }
.he-band {
  display: inline-block; margin: 6px 0 10px;
  font-family: var(--f-kai); font-size: 18px; letter-spacing: .2em;
  color: var(--cinnabar-bright);
  border: 1px solid rgba(176, 59, 46, 0.55); border-radius: 4px;
  padding: 2px 12px 2px 15px; background: rgba(176, 59, 46, 0.1);
}
.he-bar { height: 8px; border: 1px solid var(--line-bright); border-radius: 4px; background: rgba(13, 10, 6, 0.7); overflow: hidden; }
.he-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright)); transition: width 1.1s ease; }
.he-dims { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.he-dim { padding: 16px 18px 14px; }
.he-dim .eli-gu { font-size: 15px; padding: 9px 12px 9px 14px; }
.he-dim .eli-bai, .he-dim .eli-guan { font-size: 13.5px; }
.he-dim-h {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--f-kai); font-size: 16.5px; letter-spacing: .12em;
  color: var(--gold-bright); margin-bottom: 10px;
}
.he-no {
  font-size: 12.5px; color: var(--paper-dim);
  border: 1px solid var(--line-bright); border-radius: 3px; padding: 0 6px;
}
.he-badge { margin-left: auto; font-size: 13px; letter-spacing: .1em; border-radius: 3px; padding: 1px 8px; }
.b-ji { color: var(--jade); border: 1px solid rgba(111, 174, 154, 0.5); background: rgba(111, 174, 154, 0.1); }
.b-zhong { color: var(--gold); border: 1px solid rgba(201, 162, 75, 0.5); background: rgba(201, 162, 75, 0.08); }
.b-xiong { color: var(--cinnabar-bright); border: 1px solid rgba(212, 79, 63, 0.5); background: rgba(212, 79, 63, 0.1); }
.he-zong { margin-top: 14px; padding: 20px 24px 16px; border: 1px solid var(--line-bright); position: relative; }
.he-zong-k {
  font-family: var(--f-kai); font-size: 16px; letter-spacing: .3em;
  color: var(--cinnabar-bright); margin-bottom: 8px;
}
.he-zong .zd-ganju { font-size: 21px; padding-bottom: 10px; }
.he-zong-t { font-size: 15px; line-height: 2.05; color: var(--paper); text-align: center; }
.he-zong-t2 { font-size: 13px; line-height: 2; color: var(--paper-dim); margin-top: 8px; text-align: center; }
.he-rv { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s ease; }
.he-rv.in { opacity: 1; transform: none; }
@media (max-width: 960px) {
  .he-two { grid-template-columns: 1fr; }
  .he-dims { grid-template-columns: 1fr; }
  .he-top { flex-direction: column; align-items: stretch; }
}
/* ---------- 总断 · 大白话 ---------- */
.zd-plain {
  margin-top: 16px;
  border: 1px dashed var(--gold-dim);
  border-radius: 10px;
  background: rgba(201, 162, 75, 0.05);
  padding: 16px 20px 14px;
}
.zd-plain-k {
  font-family: var(--f-kai);
  font-size: 15.5px; letter-spacing: .3em;
  color: var(--gold-bright);
  margin-bottom: 10px;
}
.zd-plain-p {
  font-size: 14.5px; line-height: 2.1;
  color: var(--paper);
  margin: 8px 0;
  padding-left: 34px;
  position: relative;
}
.zd-plain-p span {
  position: absolute; left: 0; top: 5px;
  font-family: var(--f-kai);
  font-size: 13px; color: var(--jade);
  border: 1px solid rgba(111, 174, 154, 0.45);
  border-radius: 3px; padding: 0 7px;
}
.zd-plain-p b { color: var(--gold-bright); }
.zd-plain-one {
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  background: rgba(176, 59, 46, 0.08);
  font-size: 15.5px; line-height: 2;
  color: var(--paper);
  font-family: var(--f-kai);
  letter-spacing: .04em;
}
.zd-plain-one b { color: var(--cinnabar-bright); font-size: 17px; }
.zd-plain-t {
  margin-top: 8px;
  font-size: 12px; color: var(--paper-faint);
  letter-spacing: .03em;
}
@media (max-width: 640px) { .zd-plain-p { padding-left: 0; padding-top: 26px; } .zd-plain-p span { top: 0; } }
/* ---------- 合盘表单字段（独立于主表单开关用的 .opt） ---------- */
.he-opt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.he-opt .opt-label i { font-style: normal; font-size: 11.5px; color: var(--paper-faint); margin-left: 6px; }
/* ---------- 大白话 · 未来十年 / 神煞 ---------- */
.zd-plain-k2 {
  font-family: var(--f-kai);
  font-size: 14px; letter-spacing: .25em;
  color: var(--jade);
  margin: 14px 0 8px;
}
.zd-plain-lys { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.zd-ly {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 13.5px; line-height: 1.9;
  color: var(--paper-dim);
  border-bottom: 1px dashed rgba(59, 47, 27, 0.6);
  padding: 3px 2px;
}
.zd-ly b { font-family: var(--f-kai); color: var(--gold-bright); white-space: nowrap; font-weight: 700; }
.zd-ly i { font-style: normal; font-size: 11.5px; color: var(--jade); border: 1px solid rgba(111, 174, 154, 0.4); border-radius: 3px; padding: 0 5px; white-space: nowrap; }
.zd-ly span { flex: 1; }
.zd-plain-ss b { color: var(--gold-bright); }
@media (max-width: 760px) { .zd-plain-lys { grid-template-columns: 1fr; } }

/* ---------- 合盘总断 · 大白话 ---------- */
.he-zong-plain {
  margin: 10px auto 0;
  max-width: 860px;
  border: 1px dashed var(--gold-dim);
  border-radius: 8px;
  background: rgba(201, 162, 75, 0.06);
  padding: 10px 16px;
  font-size: 14px; line-height: 2.05;
  color: var(--paper);
  text-align: left;
}
.he-zong-plain b { color: var(--cinnabar-bright); font-family: var(--f-kai); letter-spacing: .1em; }
/* ---------- 神煞 · 排法与讲解（行展开） ---------- */
.ss-row { cursor: pointer; }
.ss-row td { transition: background .2s; }
.ss-row:hover td { background: rgba(201, 162, 75, 0.06); }
.ss-row.open td { background: rgba(201, 162, 75, 0.1); }
.ss-more {
  font-style: normal; font-size: 10.5px; letter-spacing: .15em;
  color: var(--gold); border: 1px solid var(--gold-dim);
  border-radius: 3px; padding: 0 5px; margin-left: 8px;
  transform: translateY(-1px); display: inline-block;
}
.ss-row.open .ss-more { color: var(--cinnabar-bright); border-color: rgba(176, 59, 46, 0.6); }
.ss-detail td {
  background: rgba(13, 10, 6, 0.6);
  border-left: 3px solid var(--gold-dim);
  padding: 14px 18px !important;
}
.ssd-block { font-size: 14px; line-height: 2.05; color: var(--paper-dim); margin-bottom: 6px; }
.ssd-block:last-of-type { margin-bottom: 2px; }
.ssd-k {
  display: inline-block; font-size: 11.5px; letter-spacing: .22em;
  color: var(--jade); border: 1px solid rgba(111, 174, 154, 0.45);
  border-radius: 3px; padding: 0 6px 0 8px; margin-right: 10px;
  transform: translateY(-2px); background: rgba(111, 174, 154, 0.08);
}
.ssd-src { margin-top: 6px; font-size: 12px; color: var(--paper-faint); letter-spacing: .04em; }
/* ---------- 合盘 · 相处状态 ---------- */
.he-state { margin-top: 14px; padding: 20px 24px 18px; }
.he-state-k {
  font-family: var(--f-kai); font-size: 16px; letter-spacing: .3em;
  color: var(--cinnabar-bright); margin-bottom: 14px;
}
.he-bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 22px; margin-bottom: 16px; }
.he-metric span { display: block; font-size: 12.5px; letter-spacing: .15em; color: var(--paper-faint); margin-bottom: 6px; }
.he-metric .he-bar { display: inline-block; width: calc(100% - 44px); vertical-align: middle; }
.he-metric b { display: inline-block; margin-left: 8px; font-family: var(--f-kai); font-size: 18px; color: var(--gold-bright); vertical-align: middle; }
.he-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.he-role { border: 1px dashed var(--line-bright); border-radius: 8px; padding: 12px 15px 11px; background: rgba(13, 10, 6, 0.5); }
.he-role-h { font-size: 13.5px; color: var(--paper); letter-spacing: .05em; margin-bottom: 8px; }
.he-role-tag {
  display: inline-block; font-family: var(--f-kai); font-size: 15px;
  color: var(--gold-bright); letter-spacing: .15em;
  border: 1px solid var(--gold-dim); border-radius: 4px;
  padding: 1px 12px 1px 14px; margin-bottom: 8px; background: rgba(201, 162, 75, 0.08);
}
.he-role p { font-size: 13.5px; line-height: 2; color: var(--paper-dim); }
.he-mode-box { border: 1px solid var(--line-bright); border-radius: 8px; padding: 13px 16px 12px; background: rgba(13, 10, 6, 0.4); }
.he-mode-name {
  display: inline-block; font-family: var(--f-kai); font-size: 16px; letter-spacing: .15em;
  color: var(--cinnabar-bright); border: 1px solid rgba(176, 59, 46, 0.55);
  border-radius: 4px; padding: 2px 12px 2px 14px; margin-bottom: 8px; background: rgba(176, 59, 46, 0.08);
}
.he-mode-box .eli-gu { font-size: 14.5px; padding: 8px 12px 8px 14px; }
.he-mode-box p { font-size: 14px; line-height: 2.05; color: var(--paper); margin-top: 8px; }
.he-mode-box p b { color: var(--gold-bright); }
.he-strength-pair { color: var(--paper-dim) !important; font-size: 13.5px !important; }
.he-advice { list-style: none; margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.he-advice li { position: relative; padding-left: 22px; font-size: 13.5px; line-height: 2.05; color: var(--paper-dim); margin: 4px 0; }
.he-advice li::before { content: '◆'; position: absolute; left: 2px; color: var(--gold-dim); font-size: 11px; top: 3px; }
.he-advice-k {
  font-family: var(--f-kai) !important; color: var(--gold-bright) !important;
  letter-spacing: .25em; font-size: 14.5px !important; margin-bottom: 4px; padding-left: 0 !important;
}
.he-advice-k::before { display: none !important; }
@media (max-width: 900px) { .he-bars { grid-template-columns: 1fr; } .he-roles { grid-template-columns: 1fr; } }
/* =====================================================================
 * 全局细节打磨
 * ===================================================================== */

/* 罗盘针 · 旺衰刻度：朱砂针 + 顶部度数牌 */
.gauge-track { overflow: visible; }
.gauge-marker {
  top: -5px; width: 5px; height: 24px; margin-left: -2px;
  background: linear-gradient(180deg, var(--cinnabar-bright), var(--gold-bright));
  box-shadow: 0 0 12px rgba(212, 79, 63, 0.65);
  border-radius: 3px;
  transition: left 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.gauge-marker::after {
  content: attr(data-pct);
  position: absolute; top: -24px; left: 50%; transform: translateX(-50%);
  font-family: var(--f-kai); font-size: 12px; line-height: 1.6;
  color: var(--cinnabar-bright); white-space: nowrap;
  background: rgba(21, 13, 8, 0.92);
  border: 1px solid rgba(176, 59, 46, 0.55); border-radius: 3px;
  padding: 0 6px;
}
.gauge-marker::before {
  content: ''; position: absolute; bottom: -8px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 7px; height: 7px; border-radius: 1px;
  background: var(--cinnabar-bright);
  box-shadow: 0 0 8px rgba(212, 79, 63, 0.7);
}

/* 面板 hover 微光 */
.panel { transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.panel:hover { border-color: rgba(111, 88, 40, 0.9); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35); }

/* 键盘可达性 */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* 回顶 · 朱砂小章 */
#btnTop {
  position: fixed; right: 26px; bottom: 30px; z-index: 90;
  width: 46px; height: 46px;
  writing-mode: vertical-rl; letter-spacing: 0.3em;
  font-family: var(--f-kai); font-size: 12.5px;
  color: var(--cinnabar-bright);
  background: linear-gradient(160deg, rgba(176, 59, 46, 0.22), rgba(13, 10, 6, 0.92));
  border: 1px solid rgba(176, 59, 46, 0.65); border-radius: 8px;
  cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s, border-color 0.3s, color 0.3s;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
#btnTop.show { opacity: 1; pointer-events: auto; transform: none; }
#btnTop:hover { border-color: var(--gold); color: var(--gold-bright); }

/* ---------- 打印 / 存 PDF ---------- */
@media print {
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .hero, #qiming, .he-form, #loading, #tooltip, #toast, #btnTop,
  .qmp-actions, .hist-bar, .hist-panel, .sec-motto, .ss-more { display: none !important; }
  .rv { opacity: 1 !important; transform: none !important; }
  .panel, .eli-card, .zd-panel, .he-state, .he-zong, .he-top { break-inside: avoid; }
  .sec { padding: 18px 8px 8px; }
  .pan-sub h3 { font-size: 18px; }
}
/* ---------- 姻缘 · 情感 ---------- */
.yy-card {
  background: var(--panel-lo);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 22px 16px;
  margin-bottom: 18px;
  position: relative;
}
.yy-card::before { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(201, 162, 75, 0.12); border-radius: 7px; pointer-events: none; }
.yy-head {
  font-family: var(--f-kai); font-size: 16.5px; letter-spacing: .15em;
  color: var(--gold-bright); margin-bottom: 10px;
}
.yy-meta { font-size: 13.5px; color: var(--paper-dim); margin-bottom: 10px; }
.yy-meta b { color: var(--cinnabar-bright); }
.yy-note { display: block; font-size: 12px; color: var(--paper-faint); margin-top: 6px; letter-spacing: .04em; }
.yy-card .eli-gu .yy-note { font-family: var(--f-song); }
.yy-list { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 4px; }
@media (min-width: 1000px) { .yy-list { grid-template-columns: 1fr 1fr; } }
.yy-item { border: 1px dashed var(--line-bright); border-radius: 8px; padding: 11px 14px 10px; background: rgba(13, 10, 6, 0.5); }
.yy-item-h { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; margin-bottom: 6px; }
.yy-item-h b { font-family: var(--f-kai); font-size: 16px; color: var(--gold-bright); letter-spacing: .08em; }
.yy-tag, .yy-state {
  font-size: 11px; letter-spacing: .15em; border-radius: 3px; padding: 0 6px;
  color: var(--jade); border: 1px solid rgba(111, 174, 154, 0.45); background: rgba(111, 174, 154, 0.08);
}
.yy-state { color: var(--paper-faint); border-color: var(--line-bright); background: none; margin-left: auto; }
.yy-span { font-size: 12px; color: var(--paper-dim); }
.yy-item ul { margin: 0; padding: 0; list-style: none; }
.yy-item li { position: relative; padding-left: 16px; font-size: 13px; line-height: 1.95; color: var(--paper-dim); }
.yy-item li::before { content: '·'; position: absolute; left: 4px; color: var(--gold); }
.yy-item.yy-cur { border-color: rgba(176, 59, 46, 0.6); background: rgba(176, 59, 46, 0.07); }
.yy-item.yy-cur .yy-state { color: var(--cinnabar-bright); border-color: rgba(176, 59, 46, 0.55); }
.yy-item.yy-past { opacity: 0.62; }
.yy-next {
  margin-top: 12px; padding: 10px 14px;
  border: 1px solid var(--line-bright); border-radius: 8px;
  background: rgba(201, 162, 75, 0.07);
  font-size: 14px; line-height: 2; color: var(--paper);
}
.yy-next b { color: var(--cinnabar-bright); }
.yy-plain {
  border: 1px dashed var(--gold-dim); border-radius: 10px;
  background: rgba(201, 162, 75, 0.05);
  padding: 16px 20px 12px; margin-bottom: 18px;
}
.yy-plain .zd-plain-p { margin: 8px 0; }
.yy-plain b { color: var(--gold-bright); }

/* ---------- 合盘 · 情感日常 ---------- */
.he-daily { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.he-daily ul { list-style: none; margin: 0; padding: 0; }
.he-daily li { position: relative; padding-left: 22px; font-size: 13.5px; line-height: 2.05; color: var(--paper-dim); margin: 4px 0; }
.he-daily li::before { content: '❖'; position: absolute; left: 2px; color: var(--jade); font-size: 10px; top: 4px; }
/* ---------- 婚缘预测 · 相遇之缘 / 地点 ---------- */
.yy-geo { font-size: 14px; line-height: 2.05; color: var(--paper); margin: 10px 0; }
.yy-geo b { color: var(--gold-bright); }
.yy-geo-k {
  display: inline-block; font-size: 11.5px; letter-spacing: .22em;
  color: var(--cinnabar-bright); border: 1px solid rgba(212, 79, 63, 0.45);
  border-radius: 3px; padding: 0 6px 0 8px; margin-right: 10px;
  transform: translateY(-2px); background: rgba(212, 79, 63, 0.08);
}
.yy-form .yy-one { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px 14px; background: rgba(13, 10, 6, 0.45); }

/* ---------- 合盘 · 说透行 ---------- */
.yy-shuo { color: var(--paper) !important; }
.yy-shuo .eli-k { color: var(--cinnabar-bright) !important; border-color: rgba(212, 79, 63, 0.45) !important; background: rgba(212, 79, 63, 0.08) !important; }

/* ---------- 合盘总断 · 深白话面板 ---------- */
.he-plain { margin-top: 14px; }
.he-zong-t2 { margin-top: 12px; }
/* 姻缘容器块级化（pan-sub 默认 flex 会把卡片压成竖条） */
.yy { display: block; }
.yy .quote-mini { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* ---------- 姻缘应期 · 白话尾巴 ---------- */
.yy-plain-t {
  display: block;
  font-size: 12.5px; line-height: 1.9;
  color: var(--jade);
  margin-top: 2px;
  letter-spacing: .02em;
}
/* ---------- 格局 · 判定步骤 ---------- */
.ge-steps { margin: 12px 0 4px; border: 1px dashed var(--line-bright); border-radius: 8px; padding: 10px 14px 8px; background: rgba(13, 10, 6, 0.45); }
.ge-step { position: relative; padding-left: 84px; font-size: 13px; line-height: 2; color: var(--paper-dim); margin: 5px 0; }
.ge-step-k {
  position: absolute; left: 0; top: 4px;
  font-family: var(--f-kai); font-size: 12px; letter-spacing: .12em;
  color: var(--gold-bright);
  border: 1px solid var(--gold-dim); border-radius: 3px;
  padding: 0 7px; white-space: nowrap;
  background: rgba(201, 162, 75, 0.07);
}
.ge-step:last-child .ge-step-k { color: var(--cinnabar-bright); border-color: rgba(176, 59, 46, 0.55); background: rgba(176, 59, 46, 0.07); }
@media (max-width: 640px) { .ge-step { padding-left: 0; padding-top: 24px; } .ge-step-k { top: 0; } }
/* =====================================================================
 * 分页导航 · 一板块一页
 * ===================================================================== */
.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 - 24px);
}
.pager-btn {
  font-family: var(--f-kai); font-size: 13.5px; letter-spacing: .2em;
  color: var(--gold); background: none; cursor: pointer;
  border: 1px solid var(--gold-dim); border-radius: 999px;
  padding: 5px 14px; white-space: nowrap;
  transition: color .25s, border-color .25s, background .25s;
}
.pager-btn:hover { color: var(--gold-bright); border-color: var(--gold); background: rgba(201, 162, 75, 0.1); }
.pager-btn[disabled] { opacity: 0.35; cursor: default; pointer-events: none; }
.pager-label {
  font-family: var(--f-kai); font-size: 14px; letter-spacing: .12em;
  color: var(--paper); white-space: nowrap;
  display: flex; align-items: baseline; gap: 8px;
  cursor: pointer;
}
.pager-label b { color: var(--cinnabar-bright); font-size: 15px; }
.pager-idx { font-family: var(--f-song); font-size: 11.5px; color: var(--paper-faint); letter-spacing: .1em; }
.pager-dots { display: flex; gap: 5px; margin: 0 2px; }
.pager-dot {
  width: 7px; height: 7px; border-radius: 50%;
  border: 1px solid var(--gold-dim); background: none;
  cursor: pointer; padding: 0; transition: all .25s;
}
.pager-dot.on { background: var(--cinnabar-bright); border-color: var(--cinnabar-bright); box-shadow: 0 0 6px rgba(212, 79, 63, 0.6); }
@media (max-width: 720px) {
  .pager { gap: 6px; padding: 6px 8px 6px 10px; bottom: 12px; }
  .pager-btn { padding: 4px 10px; font-size: 12.5px; }
  .pager-label { font-size: 12.5px; }
  .pager-idx { display: none; }
  #btnTop { bottom: 74px; }
}
@media print { .pager { display: none !important; } }
/* ---------- 财富等级 ---------- */
.wl { display: block; }
.wl .quote-mini { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-top { padding: 20px 24px; display: flex; gap: 26px; flex-wrap: wrap; align-items: flex-start; }
.wl-left { min-width: 220px; flex: 0 0 240px; }
.wl-score { font-family: var(--f-kai); color: var(--gold-bright); }
.wl-score b { font-size: 54px; line-height: 1; }
.wl-score span { font-size: 14px; color: var(--paper-faint); margin-left: 6px; }
.wl-grade {
  display: inline-block; margin: 8px 0 2px;
  font-family: var(--f-kai); font-size: 20px; letter-spacing: .18em;
  color: var(--cinnabar-bright);
  border: 1px solid rgba(176, 59, 46, 0.55); border-radius: 4px;
  padding: 2px 14px 2px 17px; background: rgba(176, 59, 46, 0.1);
}
.wl-kux { font-size: 13px; color: var(--paper-dim); letter-spacing: .2em; margin: 6px 0 12px; }
.wl-bar { height: 8px; }
.wl-chain {
  margin-top: 14px; padding: 9px 12px;
  border: 1px dashed var(--line-bright); border-radius: 8px;
  font-size: 12.5px; line-height: 1.9; color: var(--paper-dim);
}
.wl-chain b { color: var(--gold-bright); font-size: 13.5px; }
.wl-chain i { font-style: normal; color: var(--cinnabar-bright); font-family: var(--f-kai); margin: 0 3px; }
.wl-factors { flex: 1; min-width: 320px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.wl-f { border: 1px dashed var(--line-bright); border-radius: 8px; padding: 10px 14px 9px; background: rgba(13, 10, 6, 0.5); }
.wl-f-h { display: flex; align-items: baseline; gap: 8px; font-family: var(--f-kai); font-size: 14.5px; letter-spacing: .1em; color: var(--gold-bright); margin-bottom: 6px; }
.wl-f-h .he-no { font-size: 11px; }
.wl-f-v { margin-left: auto; font-family: var(--f-song); font-size: 12.5px; color: var(--paper-dim); }
.wl-f-bar { height: 5px; border: 1px solid var(--line-bright); border-radius: 3px; background: rgba(13, 10, 6, 0.7); overflow: hidden; margin-bottom: 7px; }
.wl-f-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright)); }
.wl-f p { font-size: 12.5px; line-height: 1.95; color: var(--paper-dim); }
.wl-f p b { color: var(--gold-bright); }
.wl-zong { margin-top: 16px; padding: 18px 22px 14px; }
.wl-zong-k { font-family: var(--f-kai); font-size: 15.5px; letter-spacing: .3em; color: var(--cinnabar-bright); margin-bottom: 8px; }
.wl-zong .he-zong-t b { color: var(--cinnabar-bright); }
.wl-plain { margin-top: 12px; }
@media (max-width: 900px) { .wl-factors { grid-template-columns: 1fr; } .wl-left { flex: 1 1 100%; } }
/* ---------- 今日运程 · 择时而行 ---------- */
.dl { display: block; }
.dl-top { padding: 18px 24px 14px; }
.dl-date { font-size: 12.5px; color: var(--paper-faint); letter-spacing: .12em; }
.dl-gz { font-family: var(--f-kai); font-size: 22px; color: var(--paper); margin: 6px 0 10px; letter-spacing: .1em; }
.dl-gz b { font-size: 26px; margin-right: 4px; }
.dl-yiji { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 10px; }
.dl-yiji > div { flex: 1 1 260px; border-radius: 8px; padding: 9px 14px; font-size: 13.5px; line-height: 2; }
.dl-yi { border: 1px solid rgba(133, 185, 120, 0.45); background: rgba(38, 56, 30, 0.3); color: var(--paper); }
.dl-ji { border: 1px solid rgba(212, 79, 63, 0.45); background: rgba(70, 30, 22, 0.3); color: var(--paper); }
.dl-yiji b { font-family: var(--f-kai); font-size: 16px; margin-right: 10px; }
.dl-yi b { color: #b9d8ac; }
.dl-ji b { color: var(--cinnabar-bright); }
.dl-tip {
  font-family: var(--f-kai); font-size: 15px; color: var(--gold-bright);
  padding: 8px 4px; letter-spacing: .04em;
}
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 18px; font-size: 13px; line-height: 2; color: var(--paper-dim); }
.dl-grid b { color: var(--gold-bright); }
.dl-k {
  display: inline-block; font-size: 11.5px; letter-spacing: .2em;
  color: var(--jade); border: 1px solid rgba(111, 174, 154, 0.45);
  border-radius: 3px; padding: 0 6px 0 8px; margin-right: 8px;
  transform: translateY(-1px); background: rgba(111, 174, 154, 0.08);
}
.dl-note { margin-top: 10px; font-size: 11.5px; color: var(--paper-faint); text-align: right; letter-spacing: .05em; }
@media (max-width: 760px) { .dl-grid { grid-template-columns: 1fr; } }
/* ---------- 神煞大全 · 备览 ---------- */
.sda-box { padding: 20px 24px 16px; }
.sda-toolbar { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-bottom: 16px; }
.sda-toolbar input {
  flex: 1 1 220px; min-width: 180px;
  background: rgba(20, 15, 8, 0.85); color: var(--paper);
  border: 1px solid var(--line-bright); border-radius: 999px;
  padding: 8px 18px; font-family: var(--f-song); font-size: 14px;
}
.sda-toolbar input:focus { outline: none; border-color: var(--gold); }
.sda-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.sda-card {
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(13, 10, 6, 0.5);
  padding: 12px 15px 10px; cursor: pointer; position: relative;
  transition: border-color .25s, box-shadow .25s;
}
.sda-card:hover { border-color: var(--gold-dim); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35); }
.sda-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.sda-h b { font-family: var(--f-kai); font-size: 17px; color: var(--gold-bright); letter-spacing: .08em; }
.sda-pai { font-size: 12px; line-height: 1.9; color: var(--paper-faint); margin-bottom: 4px; }
.sda-more { display: none; }
.sda-card.open .sda-more { display: block; }
.sda-more .eli-gu { font-size: 13px; padding: 7px 10px 7px 12px; margin: 6px 0; }
.sda-more .eli-gu b { font-size: 11px; }
.sda-gong { font-size: 12.5px; line-height: 1.95; color: var(--paper-dim); margin: 6px 0; }
.sda-desc { font-size: 12px; line-height: 1.9; color: var(--paper-faint); margin: 4px 0 2px; }
.sda-open {
  display: inline-block; font-size: 11px; letter-spacing: .15em;
  color: var(--gold); margin-top: 6px;
}
.sda-card.open .sda-open { color: var(--cinnabar-bright); }
@media (max-width: 960px) { .sda-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .sda-grid { grid-template-columns: 1fr; } }
/* =====================================================================
 * UI 美化 · 全站精修
 * ===================================================================== */

/* ---------- 神煞大全 · 卡片吉凶色带与浮起 ---------- */
.sda-card {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, rgba(30, 23, 12, 0.55), rgba(13, 10, 6, 0.72));
  transform: translateY(0);
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.sda-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
}
.sda-card:nth-child(3n+1)::before { background: linear-gradient(180deg, var(--cinnabar-bright), transparent); }
.sda-card:nth-child(3n+2)::before { background: linear-gradient(180deg, var(--gold), transparent); }
.sda-card:nth-child(3n+3)::before { background: linear-gradient(180deg, var(--jade), transparent); }
.sda-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45); border-color: var(--gold-dim); }
.sda-card.open { border-color: var(--gold); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }
.sda-open::after { content: ''; }

/* ---------- 面板 · 角花饰（双线描金四角） ---------- */
.panel { position: relative; }
/* 详细角花/联珠由 ui-ornament.css 接管（panel::before/::after） */

/* ---------- 章节号 · 朱砂圆印 ---------- */
.sec-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  font-family: var(--f-kai); font-size: 21px;
  color: #f6d9a8;
  border: 2px solid rgba(176, 59, 46, 0.75);
  background: radial-gradient(circle at 32% 28%, rgba(212, 79, 63, 0.35), rgba(120, 35, 25, 0.55));
  box-shadow: 0 0 14px rgba(176, 59, 46, 0.35), inset 0 0 8px rgba(246, 217, 168, 0.18);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ---------- 分段器 · 描金胶囊 ---------- */
.seg {
  border: 1px solid rgba(111, 88, 40, 0.6);
  border-radius: 999px; padding: 3px;
  background: rgba(13, 10, 6, 0.55);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.4);
}
.seg button { border-radius: 999px !important; transition: all .25s; }

/* ---------- 输入框 · 聚焦光环 ---------- */
.qmp-grid input, .qmp-grid select, .he-grid input, .he-grid select, .sda-toolbar input {
  transition: border-color .25s, box-shadow .25s;
}
.qmp-grid input:focus, .qmp-grid select:focus, .he-grid input:focus, .he-grid select:focus {
  box-shadow: 0 0 0 3px rgba(201, 162, 75, 0.14);
}

/* ---------- 主按钮 · 鎏金呼吸 ---------- */
.btn-primary {
  background: linear-gradient(180deg, #6f5316, #553d17 55%, #453110);
  border: 1px solid #8a6d2f;
  box-shadow: 0 6px 18px rgba(111, 83, 22, 0.35), inset 0 1px 0 rgba(236, 210, 138, 0.25);
  transition: box-shadow .3s, transform .15s, filter .3s;
}
.btn-primary:hover {
  filter: brightness(1.12);
  box-shadow: 0 8px 24px rgba(201, 162, 75, 0.4), inset 0 1px 0 rgba(236, 210, 138, 0.35);
}
.btn-primary:active { transform: translateY(1px); }

/* ---------- 四柱大字 · 底衬光晕 ---------- */
.p-char {
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
  background: radial-gradient(circle at 50% 38%, rgba(236, 210, 138, 0.07), transparent 68%);
  border-radius: 8px;
}
.pillar.main .p-char {
  box-shadow: inset 0 0 0 1px rgba(201, 162, 75, 0.35), 0 0 18px rgba(201, 162, 75, 0.12);
}

/* ---------- 吉凶标签 · 立体感 ---------- */
.jx { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); }

/* ---------- 引文块 · 左侧朱线渐隐 ---------- */
.eli-gu, blockquote.eli-gu {
  border-left: 3px solid transparent;
  border-image: linear-gradient(180deg, var(--cinnabar-bright), rgba(201, 162, 75, 0.15)) 1;
}

/* ---------- 翻页器 · 光泽 ---------- */
.pager {
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(201, 162, 75, 0.12), inset 0 1px 0 rgba(236, 210, 138, 0.08);
}
.pager-dot.on { transform: scale(1.25); }

/* ---------- 卡片标题 · 印章底纹 ---------- */
.he-state-k, .wl-zong-k, .yy-head, .zd-plain-k, .he-zong-k {
  text-shadow: 0 1px 6px rgba(176, 59, 46, 0.3);
}

/* ---------- 滚动显现 · 微弹簧 ---------- */
.rv { transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.18, .8, .26, 1); }
/* ---------- 三典合参 ---------- */
.sc { display: block; }
.sc .quote-mini { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-top { padding: 16px 22px 14px; margin-bottom: 14px; }
.sc-stat { display: inline-block; margin-right: 22px; vertical-align: middle; }
.sc-stat b { font-family: var(--f-kai); font-size: 44px; color: var(--gold-bright); line-height: 1; }
.sc-stat span { font-size: 13px; color: var(--paper-faint); margin-left: 6px; }
.sc-fit { display: inline-block; font-size: 14px; color: var(--paper); vertical-align: middle; }
.sc-fit b { color: var(--cinnabar-bright); font-size: 19px; font-family: var(--f-kai); }
.sc-books { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.sc-book {
  font-size: 12.5px; letter-spacing: .08em; color: var(--paper-dim);
  border: 1px solid var(--gold-dim); border-radius: 999px; padding: 2px 14px;
  background: rgba(201, 162, 75, 0.07);
}
.sc-book b { color: var(--gold-bright); }
.sc-book-head {
  font-family: var(--f-kai); font-size: 16.5px; letter-spacing: .2em;
  color: var(--gold-bright);
  border-left: 3px solid var(--cinnabar-bright);
  padding: 3px 0 3px 12px; margin: 16px 2px 10px;
}
.sc-card { margin-bottom: 12px; }
.sc-card .yy-head { margin-bottom: 8px; }
/* ---------- 财富等级 · 格局分型 ---------- */
.wl-arch {
  margin-top: 12px;
  border: 1px dashed var(--gold-dim);
  border-radius: 8px;
  padding: 8px 12px;
  background: rgba(201, 162, 75, 0.06);
}
.wl-arch b {
  font-family: var(--f-kai); font-size: 15px; letter-spacing: .15em;
  color: var(--gold-bright);
}
.wl-arch p { font-size: 12.5px; line-height: 1.9; color: var(--paper-dim); margin-top: 4px; }
.wl-gq { font-size: 14px; padding: 8px 12px 8px 14px; margin-bottom: 8px; }
.wl-gq b { font-size: 11px; }
.wl-f-v { margin-left: auto; font-family: var(--f-song); font-size: 12px; color: var(--jade); }
.wl-f .wl-f-v { color: var(--jade); }
/* ---------- 格局大全 · 书/类徽章 ---------- */
.sda-book {
  font-size: 10.5px; letter-spacing: .1em;
  color: var(--cinnabar-bright);
  border: 1px solid rgba(212, 79, 63, 0.45);
  border-radius: 3px; padding: 0 5px;
  background: rgba(212, 79, 63, 0.07);
  white-space: nowrap;
}
.sda-cls {
  font-size: 10.5px; letter-spacing: .1em;
  color: var(--jade);
  border: 1px solid rgba(111, 174, 154, 0.45);
  border-radius: 3px; padding: 0 5px;
  background: rgba(111, 174, 154, 0.07);
  white-space: nowrap;
}
.sda-gong b, .sda-desc b {
  font-family: var(--f-kai); font-size: 12px; letter-spacing: .15em;
  color: var(--gold); margin-right: 8px;
}
.sda-toolbar .seg { flex: none; }
.sda-toolbar input { flex: 1 1 160px; }
/* ---------- 三典合参 · 综要 ---------- */
.sc-sum { margin-bottom: 14px; padding: 18px 22px 14px; }
.sc-sum-k {
  font-family: var(--f-kai); font-size: 15.5px; letter-spacing: .28em;
  color: var(--cinnabar-bright); margin-bottom: 12px;
}
.sc-sum-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 14px; }
.sc-sum-item {
  border: 1px dashed var(--line-bright); border-radius: 8px;
  padding: 10px 14px 9px; background: rgba(13, 10, 6, 0.5);
}
.sc-sum-item > b {
  display: inline-block; font-family: var(--f-kai); font-size: 14.5px;
  letter-spacing: .15em; color: var(--gold-bright); margin-bottom: 5px;
}
.sc-sum-item p { font-size: 12.5px; line-height: 1.95; color: var(--paper-dim); }
.sc-sum-item p b { color: var(--gold-bright); }
.sc-sum-one {
  margin-top: 12px; padding: 10px 14px;
  border: 1px solid var(--line-bright); border-radius: 8px;
  background: rgba(201, 162, 75, 0.07);
  font-family: var(--f-kai); font-size: 15px; line-height: 2;
  color: var(--paper); letter-spacing: .03em;
}
.sc-sum-one b { color: var(--cinnabar-bright); font-size: 16.5px; }
@media (max-width: 860px) { .sc-sum-grid { grid-template-columns: 1fr; } }

/* ---------- 大六壬占卜 ---------- */
.lr { display: block; }
.lr .quote-mini { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-form .he-grid { align-items: start; }
.lr-form #lrAsk { grid-column: 1 / -1; }
.lr-form #lrAsk .seg { flex-wrap: wrap; }
/* 六壬「诞生之地」：与主表单同款 field，保证下拉可点可选 */
.lr-form .field label,
.lr-form .lr-city-field label {
  display: block; font-size: 14px; letter-spacing: .2em;
  color: var(--gold); margin-bottom: 8px;
}
.lr-form .field label small,
.lr-form .lr-city-field label small {
  letter-spacing: .05em; margin-left: 6px; color: var(--paper-faint);
}
.lr-form select,
.lr-form .lr-city-field select,
#lrCity {
  width: 100%;
  min-height: 42px;
  background: #171208;
  color: var(--paper);
  border: 1px solid var(--line-bright);
  border-radius: 6px;
  padding: 10px 12px;
  font-family: var(--f-song);
  font-size: 14.5px;
  color-scheme: dark;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 5;
}
.lr-form select:hover,
#lrCity:hover { border-color: var(--gold-dim); }
.lr-form select:focus,
#lrCity:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 75, 0.18);
}
#lrCity option { background: #1a150c; color: var(--paper); }
.lr-form .he-grid { grid-template-columns: 1fr 1fr 1fr; }
.lr-form .lr-city-field { grid-column: span 1; min-width: 0; }
@media (max-width: 860px) {
  .lr-form .he-grid { grid-template-columns: 1fr 1fr; }
}
.lr-top { padding: 16px 22px 14px; margin-bottom: 14px; }
.lr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.lr-gz { font-family: var(--f-kai); font-size: 17px; letter-spacing: .06em; color: var(--paper); }
.lr-gz b { color: var(--gold-bright); font-size: 19px; }
.lr-jiang { font-size: 13.5px; color: var(--paper-dim); letter-spacing: .04em; }
.lr-jiang b { color: var(--cinnabar-bright); font-size: 15px; font-family: var(--f-kai); }
.lr-why {
  margin-top: 10px; font-size: 13.5px; line-height: 1.85; color: var(--paper-dim);
  border-top: 1px solid var(--line); padding-top: 10px;
}
.lr-box-h {
  font-family: var(--f-kai); font-size: 16px; letter-spacing: .18em;
  color: var(--gold-bright); margin-bottom: 14px;
  border-left: 3px solid var(--cinnabar-bright);
  padding: 2px 0 2px 12px;
}
.lr-box-h .eli-k, .lr-box-h .eli-k2 { margin-left: 8px; letter-spacing: .06em; font-size: 13px; }
.lr-plate-box, .lr-sike, .lr-chuan, .lr-jiyao, .lr-qi, .lr-men, .lr-books { margin-bottom: 14px; padding: 18px 22px; }
.lr-plate { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: center; }
.lr-plate-ring {
  position: relative; width: 260px; height: 260px; border-radius: 50%;
  border: 1px solid var(--gold-dim);
  background: radial-gradient(circle at center, rgba(201,162,75,.06) 0%, transparent 70%);
  flex: 0 0 auto;
}
.lr-cell {
  position: absolute; left: 50%; top: 50%;
  width: 44px; height: 40px; margin: -20px 0 0 -22px;
  transform: rotate(calc(var(--i) * 30deg)) translateY(-118px) rotate(calc(var(--i) * -30deg));
  text-align: center; line-height: 1.15;
  border: 1px solid transparent; border-radius: 6px;
}
.lr-cell i {
  display: block; font-style: normal; font-family: var(--f-kai);
  font-size: 16px; color: var(--gold-bright); font-weight: 600;
}
.lr-cell em {
  display: block; font-style: normal; font-size: 11.5px; color: var(--paper-faint);
}
.lr-cell.same i { color: var(--cinnabar-bright); }
.lr-jg-list { display: flex; flex-wrap: wrap; gap: 8px; max-width: 340px; }
.lr-jg {
  display: inline-flex; flex-direction: column; align-items: center;
  min-width: 52px; padding: 6px 8px; border-radius: 8px;
  border: 1px solid var(--line); background: rgba(13,10,6,.55);
  font-size: 12.5px; cursor: help;
}
.lr-jg i { font-style: normal; font-size: 11.5px; color: var(--paper-faint); font-family: var(--f-kai); }
.lr-jg.g { border-color: rgba(143,206,157,.45); color: #8fce9d; }
.lr-jg.x { border-color: rgba(224,122,104,.45); color: #e07a68; }
.lr-jg.z { border-color: var(--line); color: var(--paper-dim); }
.lr-sike-row, .lr-chuan-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.lr-chuan-row { grid-template-columns: repeat(3, 1fr); }
.lr-sike-cell, .lr-chuan-cell {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 10px; text-align: center;
  background: rgba(13,10,6,.55);
}
.lr-sike-cell.zei { border-color: rgba(224,122,104,.55); box-shadow: inset 3px 0 0 var(--cinnabar-bright); }
.lr-sike-cell.ke { border-color: rgba(201,162,75,.45); box-shadow: inset 3px 0 0 var(--gold-dim); }
.lr-sike-no { display: block; font-size: 12px; color: var(--paper-faint); letter-spacing: .12em; margin-bottom: 8px; }
.lr-sike-pair { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.lr-sike-pair b { font-family: var(--f-kai); font-size: 26px; line-height: 1.1; }
.lr-sike-pair i { font-style: normal; font-size: 11.5px; color: var(--paper-dim); }
.lr-chuan-cell.g { border-color: rgba(143,206,157,.5); }
.lr-chuan-cell.x { border-color: rgba(224,122,104,.5); }
.lr-chuan-cell.kong { opacity: .78; }
.lr-chuan-cell.kong .lr-zhi b { text-decoration: line-through; text-decoration-color: rgba(224,122,104,.7); }
.lr-pos { display: block; font-size: 12.5px; letter-spacing: .2em; color: var(--paper-faint); margin-bottom: 6px; }
.lr-zhi b { font-family: var(--f-kai); font-size: 34px; line-height: 1.1; }
.lr-jname { display: block; font-size: 13px; color: var(--gold-bright); margin-top: 4px; }
.lr-jname i { font-style: normal; margin-left: 6px; font-size: 11.5px; color: var(--paper-dim); }
.lr-wx { display: block; font-size: 12px; color: var(--paper-dim); margin-top: 4px; }
.lr-chuan-flow {
  margin-top: 14px; text-align: center;
  font-family: var(--f-kai); font-size: 22px; letter-spacing: .06em;
}
.lr-chuan-flow b { font-size: 26px; }
.lr-arrow {
  display: inline-block; margin: 0 8px; padding: 1px 8px;
  font-size: 12px; color: var(--cinnabar-bright);
  border: 1px solid rgba(176,59,46,.45); border-radius: 999px;
  vertical-align: middle; font-family: inherit;
}
.lr-fine { margin-top: 12px; font-size: 12.5px; color: var(--paper-faint); line-height: 1.8; }
.lr-qi { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }
.lr-qi .lr-box-h { flex: 1 0 100%; margin-bottom: 4px; }
.lr-qi-score {
  display: flex; align-items: baseline; gap: 8px;
  min-width: 100px;
}
.lr-qi-score b {
  font-family: var(--f-kai); font-size: 48px; line-height: 1;
  color: var(--gold-bright);
}
.lr-qi-score span { font-size: 14px; color: var(--cinnabar-bright); letter-spacing: .1em; }
.lr-qi .eli-bai, .lr-qi .eli-guan { flex: 1 1 240px; margin: 0; }
.lr-men-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.lr-men-card {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; background: rgba(13,10,6,.5);
}
.lr-men-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.lr-men-no {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(176,59,46,.85); color: #f5e6c8;
  font-size: 12px; line-height: 22px; text-align: center;
  font-family: var(--f-kai);
}
.lr-men-h b {
  font-family: var(--f-kai); font-size: 15.5px;
  letter-spacing: .12em; color: var(--gold-bright);
}
.lr-men-h i { font-style: normal; font-size: 12px; color: var(--paper-faint); margin-left: auto; letter-spacing: .06em; }
.lr-men-card .eli-gu {
  margin: 0 0 6px; font-size: 13px; line-height: 1.8; color: var(--paper-dim);
}
.lr-men-card .eli-bai, .lr-men-card .eli-guan {
  margin: 0 0 4px; font-size: 13.5px; line-height: 1.85;
}
.lr-plain { margin-bottom: 14px; padding: 18px 22px; }
.lr-books { padding: 18px 22px; }
.lr-books .sc-books { margin-bottom: 10px; }

/* ---------- 大六壬 · 板块分页 / 总结 / 问答 ---------- */
.lr-pagebar {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 12px 0 16px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(13,10,6,.45);
  position: sticky; top: 8px; z-index: 20;
  backdrop-filter: blur(6px);
}
.lr-ptab {
  appearance: none; border: 1px solid var(--line); background: transparent;
  color: var(--paper-dim); font-family: var(--f-kai); font-size: 13px;
  letter-spacing: .08em; padding: 6px 12px; border-radius: 999px;
  cursor: pointer; transition: all .2s;
}
.lr-ptab:hover { color: var(--gold-bright); border-color: var(--gold-dim); }
.lr-ptab.on {
  color: #1a1408; background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  border-color: var(--gold-bright);
}
.lr-page { margin-bottom: 8px; }
.lr-page-h {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
  font-family: var(--f-kai); letter-spacing: .12em;
}
.lr-page-h b { color: var(--gold-bright); font-size: 17px; }
.lr-page-no {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(176,59,46,.88); color: #f5e6c8;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px;
}
.lr-page-foot, .lr-pagefoot {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin: 18px 0 8px; padding: 10px;
  font-family: var(--f-kai); color: var(--paper-dim); letter-spacing: .08em;
}
.lr-quick {
  margin-top: 12px; display: grid; gap: 8px;
  grid-template-columns: auto auto 1fr; align-items: center;
}
.lr-quick > div {
  border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px;
  background: rgba(201,162,75,.05);
}
.lr-quick span { display: block; font-size: 12px; color: var(--paper-faint); margin-bottom: 2px; }
.lr-quick b { font-family: var(--f-kai); font-size: 22px; color: var(--gold-bright); }
.lr-quick i { font-style: normal; font-size: 12.5px; color: var(--cinnabar-bright); margin-left: 6px; }
.lr-quick .lr-quick-chuan { font-size: 18px; letter-spacing: .08em; }
.lr-quick em { font-style: normal; font-family: var(--f-kai); color: var(--paper); line-height: 1.7; font-size: 14px; }
.lr-sum-mini, .lr-sum { margin-top: 12px; padding: 16px 20px; }
.lr-chuan-cell .lr-tips {
  display: block; margin-top: 8px; font-size: 12px; line-height: 1.6;
  color: var(--paper-dim); text-align: left; font-family: var(--f-song);
}
.lr-sike-note {
  display: block; margin-top: 6px; font-size: 12px; color: var(--paper-dim); line-height: 1.5;
}
.lr-qa { margin-bottom: 14px; padding: 18px 22px; }
.lr-qa-form { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 10px; }
.lr-qa-form input {
  flex: 1 1 240px; min-width: 200px;
  background: rgba(0,0,0,.35); border: 1px solid var(--line);
  border-radius: 10px; color: var(--paper);
  padding: 10px 14px; font-family: var(--f-kai); font-size: 14px;
  outline: none;
}
.lr-qa-form input:focus { border-color: var(--gold-dim); box-shadow: 0 0 0 3px rgba(201,162,75,.15); }
.lr-qa-tips { font-size: 12.5px; color: var(--paper-faint); line-height: 1.7; margin-bottom: 8px; }
.lr-qa-res {
  margin-top: 10px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(201,162,75,.06);
}
.lr-qa-q {
  font-family: var(--f-kai); font-size: 15px; color: var(--gold-bright);
  margin-bottom: 6px; letter-spacing: .04em;
}
.lr-qa-tag {
  display: inline-block; font-size: 12px; color: var(--cinnabar-bright);
  border: 1px solid rgba(176,59,46,.4); border-radius: 999px;
  padding: 2px 10px; margin-bottom: 8px;
}
.lr-qa-list {
  margin: 0; padding-left: 1.2em;
  color: var(--paper); font-family: var(--f-kai); line-height: 1.9; font-size: 14px;
}
.lr-qa-list li { margin-bottom: 4px; }
@media (max-width: 860px) {
  .lr-quick { grid-template-columns: 1fr; }
  .lr-pagebar { position: static; }
  .lr-ptab { font-size: 12px; padding: 5px 9px; }
}

/* ---------- 通用口语分页（八字/合盘/婚缘等） ---------- */
.plain-pages { margin-bottom: 6px; }
.plain-pb { position: sticky; top: 6px; z-index: 25; }
#guji .guji-bai {
  margin: 8px 0 0; padding: 8px 12px 4px;
  border-top: 1px dashed var(--line);
  font-family: var(--f-kai); font-size: 13.5px; line-height: 1.8;
  color: var(--paper-dim);
}
#pan .lr-page, #heRes .lr-page, #yyRes .lr-page { margin-bottom: 10px; }
#pan .plainPageLabel, #heRes .plainPageLabel, #yyRes .plainPageLabel,
#gujiPlain .plainPageLabel, #ssda .plainPageLabel, #gjda .plainPageLabel {
  font-family: var(--f-kai); letter-spacing: .08em; color: var(--paper-dim);
}
#ssda .panel.lr-sum, #gjda .panel.lr-sum, #gujiPlain .panel.lr-sum { margin-bottom: 0; }

/* ---------- 全站：一板块一页（同屏只显示一个板块） ---------- */
body {
  /* 为底部翻页器留出空间 */
  padding-bottom: 72px;
}
.hero.site-page-on,
main > .sec.site-page-on {
  min-height: calc(100vh - 72px);
  box-sizing: border-box;
  padding-top: 28px;
  padding-bottom: 48px;
}
/* 默认显示首页，脚本失败时也不至于白屏 */
header.hero { display: block; }
#pager .pager-label .pager-idx { margin-left: 4px; opacity: .75; }
#pager .pager-dots { max-width: 42vw; overflow-x: auto; }
.toc-item { cursor: pointer; }
@media print {
  main > .sec, .hero { display: block !important; page-break-after: always; }
  #pager { display: none !important; }
  body { padding-bottom: 0; }
}

/* ---------- 目录 · 总览 ---------- */
.toc-box { padding: 20px 24px 16px; }
.toc-group { margin-bottom: 16px; }
.toc-group:last-child { margin-bottom: 4px; }
.toc-gk {
  font-family: var(--f-kai); font-size: 15.5px; letter-spacing: .25em;
  color: var(--cinnabar-bright);
  border-left: 3px solid var(--cinnabar-bright);
  padding: 2px 0 2px 12px; margin-bottom: 8px;
}
.toc-item {
  display: flex; align-items: baseline; gap: 12px;
  padding: 8px 12px; margin: 4px 0;
  border: 1px solid var(--line); border-radius: 8px;
  background: rgba(13, 10, 6, 0.5);
  text-decoration: none;
  transition: border-color .25s, background .25s, transform .2s;
}
.toc-item:hover { border-color: var(--gold-dim); background: rgba(201, 162, 75, 0.07); transform: translateX(4px); }
.toc-item b { font-family: var(--f-kai); font-size: 15.5px; color: var(--gold-bright); letter-spacing: .08em; white-space: nowrap; }
.toc-item span { font-size: 12.5px; color: var(--paper-dim); }
@media (max-width: 720px) { .toc-item { flex-direction: column; gap: 3px; } }

/* ---------- 大六壬问答：读库作答 ---------- */
.lr-qa-ex { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 12px; font-size: 12.5px; color: var(--paper-faint); }
.lr-qex {
  cursor: pointer;
  border: 1px solid rgba(201, 162, 75, 0.28);
  background: rgba(201, 162, 75, 0.08);
  color: var(--gold);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12.5px;
  letter-spacing: .04em;
}
.lr-qex:hover { background: rgba(201, 162, 75, 0.16); border-color: var(--gold); }
.lr-qa-box {
  margin: 12px 0;
  padding: 10px 12px;
  border-left: 2px solid rgba(201, 162, 75, 0.35);
  background: rgba(201, 162, 75, 0.05);
  border-radius: 0 8px 8px 0;
}
.lr-qa-box .eli-k, .lr-qa-box .eli-k2 { margin-bottom: 6px; }
.lr-qa-box p { margin: 6px 0 0; font-size: 15px; line-height: 1.9; color: var(--paper); }
.lr-qa-one {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(212, 79, 63, 0.35);
  background: rgba(212, 79, 63, 0.08);
  border-radius: 8px;
  color: var(--cinnabar-bright);
  font-family: var(--f-kai);
  font-size: 15.5px;
  line-height: 1.9;
}
.lr-men-card .eli-gu { margin: 8px 0; font-size: 14.5px; }

/* ---------- 典籍 · 判断法库 ---------- */
.jing-box { margin-bottom: 14px; padding: 18px 22px; }
.jing-intro {
  font-size: 14px; line-height: 1.9; color: var(--paper-dim);
  margin-bottom: 12px; padding: 10px 12px;
  border-left: 2px solid rgba(201,162,75,.35);
  background: rgba(201,162,75,.05);
}
.jing-intro strong { color: var(--gold-bright); font-weight: 600; }
.jing-meta { font-size: 12.5px; color: var(--paper-faint); margin: 8px 0 10px; letter-spacing: .04em; }
.jing-meta b { color: var(--gold); font-family: var(--f-song); }
.jing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.jing-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  background: rgba(0,0,0,.22);
}
.jing-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.jing-h b { color: var(--gold-bright); font-size: 15px; letter-spacing: .06em; }
.jing-type {
  font-size: 11px; letter-spacing: .12em; color: var(--jade);
  border: 1px solid rgba(94,140,116,.4); border-radius: 999px; padding: 1px 8px;
}
.jing-book { font-size: 11px; color: var(--paper-faint); margin-left: auto; letter-spacing: .08em; }
.jing-card .eli-gu { font-size: 14.5px; margin: 8px 0; }
.jing-card .eli-bai, .jing-card .eli-guan { font-size: 13.5px; margin-top: 6px; }
.jing-qa { margin-top: 4px; padding: 14px 16px; }
@media (max-width: 720px) {
  .jing-grid { grid-template-columns: 1fr; }
}

/* ---------- 六壬占断结果（结果/日期/过程/情景） ---------- */
.lr-juguan { margin-bottom: 14px; padding: 18px 22px; }
.lr-result-tone {
  color: var(--cinnabar-bright) !important;
  font-family: var(--f-kai) !important;
  letter-spacing: .12em;
}
.lr-jg-block { margin: 12px 0; }
.lr-jg-tag {
  display: inline-block;
  font-size: 12px; letter-spacing: .22em;
  color: var(--jade);
  border: 1px solid rgba(94,140,116,.4);
  border-radius: 999px; padding: 2px 10px;
  margin-bottom: 8px;
}
.lr-jg-result {
  margin: 0;
  font-family: var(--f-kai);
  font-size: 16.5px; line-height: 1.95;
  color: var(--paper);
  padding: 10px 14px;
  border-left: 3px solid var(--gold-dim);
  background: rgba(201,162,75,.07);
  border-radius: 0 8px 8px 0;
}
.lr-jg-list, .lr-jg-steps, .lr-jg-scenes {
  margin: 0; padding-left: 1.15em;
  color: var(--paper-dim); font-family: var(--f-kai);
  line-height: 1.9; font-size: 14.5px;
}
.lr-jg-list li, .lr-jg-steps li, .lr-jg-scenes li { margin-bottom: 8px; }
.lr-jg-list b, .lr-jg-steps b, .lr-jg-scenes b {
  color: var(--gold-bright); margin-right: 8px; font-family: var(--f-song);
}
.lr-jg-list i, .lr-jg-steps i {
  font-style: normal; color: var(--cinnabar-bright); margin-right: 8px;
  letter-spacing: .06em;
}
.lr-jg-list span, .lr-jg-steps span, .lr-jg-scenes span { color: var(--paper-dim); }

.lr-jg-extra {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--gold);
  letter-spacing: .04em;
  margin-top: 2px;
  opacity: .9;
}

/* ---------- 合盘 · 万物取象 ---------- */
.he-xiang { margin-bottom: 14px; padding: 18px 22px; }
.he-xiang-k {
  font-family: var(--f-kai);
  color: var(--gold-bright);
  letter-spacing: .12em;
  margin-bottom: 10px;
  font-size: 16px;
}
.he-xiang .eli-guan { margin-top: 8px; }

/* ---------- 梅花易数 ---------- */
.mh-form { margin-bottom: 14px; padding: 18px 22px; }
.mh-result, .mh-logic, .mh-advice { margin-bottom: 14px; padding: 18px 22px; }
.mh-tone {
  font-family: var(--f-kai);
  font-size: 28px;
  color: var(--cinnabar-bright);
  letter-spacing: .16em;
  text-align: center;
  margin: 8px 0 12px;
}
.mh-quick {
  display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 12px 0;
  font-family: var(--f-song); font-size: 13px; color: var(--paper-faint);
}
.mh-quick b { color: var(--gold-bright); margin-left: 6px; font-family: var(--f-kai); }

/* ============================================================
   色彩与观感精修（在原墨金朱体系上降噪、提对比、统一焦点）
   ============================================================ */
.panel, .eli-card, .yy-card, .he-dim, .dy-card, .jing-card, .lr-men-card {
  background: linear-gradient(180deg, var(--panel-hi), var(--panel-lo));
  border-color: var(--line);
}
.panel:hover, .jing-card:hover {
  border-color: var(--line-bright);
  box-shadow: 0 0 0 1px rgba(194, 163, 92, .08), 0 8px 24px rgba(0, 0, 0, .22);
}

/* 正文层级：主 / 次 / 弱 —— 弱文字提亮以达舒适对比 */
.eli-bai, .eli-guan, .zd-plain-p, .qmp-fine, .lr-fine {
  color: var(--paper-dim);
}
small, .quote-mini, .sec-motto, .p-hidden .hg em {
  color: var(--paper-faint);
}

/* 焦点环：键盘可见、触控不刺眼 */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.btn:focus-visible { box-shadow: 0 0 0 3px rgba(194, 163, 92, .28); }

input, select {
  background: #1a1510 !important;
  border-color: var(--line) !important;
  color: var(--paper) !important;
}
input:focus, select:focus {
  border-color: var(--gold-dim) !important;
  box-shadow: 0 0 0 3px rgba(194, 163, 92, .16) !important;
}

.seg button.on {
  background: linear-gradient(180deg, #4a3818, #32240e);
  color: var(--gold-bright);
}
.seg button:hover:not(.on) { color: var(--paper); }

.jx.ji, .he-badge.b-ji { color: var(--jade); border-color: rgba(122, 171, 152, .5); }
.jx.xiong, .he-badge.b-xiong { color: var(--cinnabar-bright); }
.jx.zhong, .he-badge.b-zhong { color: var(--paper-dim); }

/* 滚动条与选中 */
::-webkit-scrollbar-track { background: var(--ink-2); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; border: 2px solid var(--ink-2); }
::-webkit-scrollbar-thumb:hover { background: var(--line-bright); }

/* 动效尊重系统设置 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================================
   高级质感 · 墨玉 / 细金 / 朱砂印
   原则：降光晕噪声，用材质与线宽取胜；字重更克制，留白更宽
   ============================================================ */

/* —— 面板：漆器式墨玉 —— */
.panel, .eli-card, .yy-card, .he-dim, .dy-card, .jing-card, .lr-men-card,
.sda-card, .pillar, .he-chart, .wl-top, .lr-top, .mh-result, .mh-logic {
  background:
    linear-gradient(180deg, rgba(40, 34, 24, .55) 0%, rgba(22, 18, 13, .72) 48%, rgba(16, 13, 9, .82) 100%);
  border: 1px solid rgba(110, 90, 50, .42);
  border-radius: 6px;
  box-shadow:
    inset 0 1px 0 rgba(226, 208, 160, .06),
    inset 0 0 0 1px rgba(0, 0, 0, .25),
    0 1px 0 rgba(0, 0, 0, .35),
    0 12px 28px rgba(0, 0, 0, .28);
}
.panel:hover, .jing-card:hover, .sda-card:hover {
  border-color: rgba(194, 163, 92, .5);
  box-shadow:
    inset 0 1px 0 rgba(226, 208, 160, .08),
    0 2px 0 rgba(0, 0, 0, .3),
    0 14px 32px rgba(0, 0, 0, .32);
}

/* —— 章节眉：细线 + 克制字号 —— */
.sec-no {
  font-family: var(--f-kai);
  font-size: 36px;
  line-height: 1;
  color: var(--gold);
  opacity: .92;
  text-shadow: 0 0 12px rgba(194, 163, 92, .12);
  border: 1px solid rgba(168, 67, 54, .45);
  box-shadow: 0 0 0 3px rgba(168, 67, 54, .06);
  background: linear-gradient(160deg, rgba(168, 67, 54, .22), rgba(90, 30, 24, .35));
}
.pan-sub h3, .sec-head h2, .hero-title {
  font-weight: 400;
}
.pan-sub h3 {
  font-size: 21px;
  letter-spacing: .32em;
  text-indent: .08em;
  color: var(--gold-bright);
  text-shadow: none;
}
.sec-head h2 {
  letter-spacing: .36em;
  text-indent: .36em;
}
.hero-title {
  letter-spacing: .18em;
  text-shadow: 0 0 28px rgba(194, 163, 92, .18), 0 2px 8px rgba(0, 0, 0, .45);
}
.sec-line {
  height: 1px !important;
  background: linear-gradient(90deg, rgba(194, 163, 92, .45), rgba(194, 163, 92, .08) 55%, transparent) !important;
}
.sec-line::before {
  content: "" !important;
  width: 5px; height: 5px;
  border: 1px solid rgba(194, 163, 92, .55);
  transform: rotate(45deg);
  background: transparent;
  top: -2px !important;
}

/* —— 按钮：哑光漆面，去掉呼吸大光 —— */
.btn {
  background: linear-gradient(180deg, rgba(48, 40, 26, .95), rgba(24, 20, 13, .98));
  border: 1px solid rgba(110, 90, 50, .55);
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: .36em;
  text-indent: .36em;
  box-shadow: inset 0 1px 0 rgba(226, 208, 160, .08);
}
.btn:hover {
  transform: none;
  border-color: rgba(194, 163, 92, .75);
  box-shadow: inset 0 1px 0 rgba(226, 208, 160, .12), 0 4px 12px rgba(0, 0, 0, .25);
}
.btn-primary {
  background: linear-gradient(180deg, rgba(132, 48, 38, .95), rgba(88, 30, 24, .98));
  border-color: rgba(208, 96, 76, .55);
  color: #f2e6d2;
  text-shadow: none;
}
.btn-primary:hover {
  border-color: rgba(208, 96, 76, .85);
  box-shadow: inset 0 1px 0 rgba(255, 220, 200, .12), 0 4px 14px rgba(0, 0, 0, .3);
}

/* —— 大字格局名：去掉霓虹 —— */
.ge-name, .gauge-verdict b, .mh-tone, .wl-score b, .he-score b, .chart-gz {
  text-shadow: 0 0 18px rgba(194, 163, 92, .12) !important;
}
.load-text { text-shadow: none !important; letter-spacing: .45em; }
.gauge-marker { box-shadow: 0 0 6px rgba(226, 208, 160, .45) !important; }

/* —— 徽章 / 印章：更沉 —— */
.seal {
  background: linear-gradient(160deg, #923528, #6e221a);
  border: 1px solid rgba(246, 230, 200, .18);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, .4), 0 2px 8px rgba(0, 0, 0, .35);
}
.jx, .he-badge {
  border-radius: 3px;
  letter-spacing: .18em;
  box-shadow: none;
}

/* —— 表单：净、稳 —— */
input, select {
  border-radius: 4px !important;
  background: linear-gradient(180deg, rgba(22, 18, 13, .95), rgba(16, 13, 9, .98)) !important;
}
.field label, .opt-label {
  letter-spacing: .22em;
  color: var(--gold);
  opacity: .9;
}
.seg {
  border-radius: 4px;
}
.seg button {
  letter-spacing: .18em;
}
.seg button.on {
  background: linear-gradient(180deg, rgba(74, 56, 24, .9), rgba(50, 36, 14, .95));
  color: var(--gold-bright);
  box-shadow: inset 0 1px 0 rgba(226, 208, 160, .08);
}

/* —— 引文 / 古诀：书卷气 —— */
.eli-gu, blockquote.eli-gu {
  border-left-width: 2px;
  border-left-color: rgba(194, 163, 92, .45);
  background: linear-gradient(90deg, rgba(194, 163, 92, .06), transparent 70%);
  letter-spacing: .08em;
}

/* —— 装饰层降噪（星图/大太极可留，光晕收束） —— */
.hero-starmap-glow { opacity: .75; }
.xj-big-taiji-ring, .xj-celestial-inner { opacity: .82; }
.xj-seal-float { opacity: .35; }

/* —— 分页器更精致 —— */
.pager {
  border: 1px solid rgba(110, 90, 50, .4);
  background: rgba(14, 12, 8, .92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.pager-dot {
  width: 8px; height: 8px;
}
.pager-dot.on {
  background: var(--cinnabar);
  border-color: var(--cinnabar-bright);
  box-shadow: 0 0 4px rgba(168, 67, 54, .45);
}

/* —— 字体节奏：标题疏朗，正文易读 —— */
.eli-bai, .eli-guan, .zd-plain-p {
  letter-spacing: .02em;
  line-height: 1.9;
}
.qmp-fine, .lr-fine, .quote-mini, .sec-motto {
  letter-spacing: .14em;
}

/* ---------- 灵根测试 ---------- */
.lg-top, .lg-items, .lg-sum { margin-bottom: 14px; padding: 18px 22px; }
.lg-score-wrap { text-align: center; margin-bottom: 12px; }
.lg-score b {
  font-family: var(--f-kai); font-size: 52px; color: var(--gold-bright);
  letter-spacing: .06em; text-shadow: 0 0 18px rgba(194,163,92,.14);
}
.lg-score span { color: var(--paper-faint); font-size: 14px; margin-left: 4px; }
.lg-grade {
  font-family: var(--f-xw); font-size: 28px; letter-spacing: .35em; text-indent: .35em;
  color: var(--cinnabar-bright); margin-top: 4px;
}
.lg-kux { font-size: 12px; letter-spacing: .3em; color: var(--paper-faint); margin-top: 4px; }
.lg-bar { max-width: 280px; margin: 12px auto 0; }
.lg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 10px;
}
.lg-card {
  border: 1px solid rgba(110,90,50,.4);
  border-radius: 6px;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(36,30,20,.5), rgba(18,15,10,.7));
}
.lg-card.on {
  border-color: rgba(194,163,92,.55);
  box-shadow: inset 0 1px 0 rgba(226,208,160,.08), 0 8px 22px rgba(0,0,0,.25);
}
.lg-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.lg-h b { color: var(--gold-bright); font-size: 15px; letter-spacing: .08em; }
.lg-w { font-size: 11px; color: var(--gold-dim); letter-spacing: .08em; }
.lg-h .jx { margin-left: auto; }
.lg-card .eli-gu { font-size: 13.5px; margin: 8px 0; }
.lg-card .eli-bai, .lg-card .eli-guan { font-size: 13.5px; margin-top: 6px; }
@media (max-width: 720px) {
  .lg-grid { grid-template-columns: 1fr; }
}

/* ---------- 大运流年详批 ---------- */
.yx-top, .yx-map, .yx-ones, .yx-years { margin-bottom: 14px; padding: 18px 22px; }
.yx-track {
  display: flex; gap: 8px; overflow-x: auto; padding: 8px 2px 12px;
  scroll-snap-type: x proximity;
}
.yx-card {
  flex: 0 0 92px; scroll-snap-align: start;
  border: 1px solid rgba(110,90,50,.4); border-radius: 8px;
  padding: 12px 8px; text-align: center;
  background: linear-gradient(180deg, rgba(36,30,20,.55), rgba(18,15,10,.75));
}
.yx-card.cur { border-color: rgba(194,163,92,.65); box-shadow: 0 0 0 1px rgba(194,163,92,.2); }
.yx-card.g .yx-band { color: var(--jade); }
.yx-card.x .yx-band { color: var(--cinnabar-bright); }
.yx-card.z .yx-band { color: var(--paper-dim); }
.yx-gz { font-family: var(--f-kai); font-size: 22px; color: var(--gold-bright); letter-spacing: .08em; }
.yx-age { font-size: 11px; color: var(--paper-faint); margin-top: 4px; }
.yx-tg { font-size: 13px; color: var(--gold); margin-top: 4px; letter-spacing: .12em; }
.yx-band { font-size: 12px; margin-top: 4px; letter-spacing: .08em; }
.yx-one {
  border: 1px solid rgba(110,90,50,.35);
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 12px;
  background: linear-gradient(180deg, rgba(32,27,18,.45), rgba(16,13,9,.65));
}
.yx-one.cur { border-color: rgba(208,96,76,.5); }
.yx-one-h { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 8px; }
.yx-one-h b { color: var(--gold-bright); font-family: var(--f-xw); font-size: 17px; letter-spacing: .08em; }
.yx-one-h i { font-style: normal; font-size: 12px; color: var(--paper-faint); }
.yx-gz-s { font-family: var(--f-kai); font-size: 20px; color: var(--paper); letter-spacing: .12em; }
.yx-layer { margin-top: 10px; padding-top: 8px; border-top: 1px dashed rgba(110,90,50,.25); }
.yx-school {
  display: inline-block; font-size: 11px; letter-spacing: .18em;
  color: var(--jade); border: 1px solid rgba(122,171,152,.4);
  border-radius: 999px; padding: 1px 8px; margin-right: 8px;
}
.yx-score { font-family: var(--f-song); font-size: 12px; color: var(--paper-faint); }
.yx-score.pos { color: var(--jade); }
.yx-score.neg { color: var(--cinnabar-bright); }
.yx-layer .eli-gu { margin: 6px 0; font-size: 13px; }
.yx-layer .eli-bai { margin-top: 4px; font-size: 13.5px; }

/* ---------- 大运流年 · 互动与总结 ---------- */
.yx-bar { margin-bottom: 14px; padding: 12px 16px; }
.yx-bar-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.yx-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.yx-hint { margin-top: 8px; font-size: 12px; color: var(--paper-faint); letter-spacing: .06em; }
.yx-card { cursor: pointer; font: inherit; color: inherit; }
.yx-card.yx-dim { opacity: .28; filter: grayscale(.4); }
.yx-card:hover { border-color: rgba(194,163,92,.55); }
.yx-item .yx-body { display: none; }
.yx-item.open .yx-body { display: block; }
.yx-item .yx-one-h { position: relative; padding-right: 52px; }
.yx-fold {
  position: absolute; right: 0; top: 2px;
  font-style: normal; font-size: 12px;
  color: var(--gold-dim); letter-spacing: .12em;
  border: 1px solid rgba(110,90,50,.4); border-radius: 999px;
  padding: 2px 8px;
}
.yx-flash { box-shadow: 0 0 0 1px rgba(226,208,160,.45), 0 0 18px rgba(194,163,92,.2) !important; }
.yx-sum { margin-bottom: 14px; padding: 18px 22px; }
.yx-qa { margin-bottom: 14px; padding: 14px 16px; }
.yx-year-track .yx-card { flex-basis: 78px; }
.yx-year-track .yx-gz { font-size: 18px; }

.yx-brief {
  margin: 4px 0 8px;
  font-family: var(--f-kai);
  font-size: 15px;
  line-height: 1.85;
  color: var(--paper);
}
.yx-item { cursor: default; }

/* ---------- 灵根 · 仙侠灵气台 ---------- */
.lg-spirit {
  position: relative;
  margin-bottom: 14px;
  padding: 0;
  overflow: hidden;
  min-height: 280px;
  border: 1px solid rgba(194, 163, 92, .38);
  background:
    radial-gradient(ellipse 70% 55% at 50% 58%, rgba(194, 163, 92, .12), transparent 62%),
    linear-gradient(180deg, rgba(18, 15, 10, .55), rgba(12, 10, 8, .88));
}
.lg-canvas {
  display: block;
  width: 100%;
  height: 300px;
}
.lg-orb-wrap {
  position: absolute;
  left: 50%; top: 46%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.lg-orb {
  position: relative;
  width: 92px; height: 92px;
}
.lg-orb-core {
  position: absolute; inset: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 240, 200, .55), transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(194, 163, 92, .55), rgba(20, 16, 10, .2) 70%);
  box-shadow: 0 0 28px rgba(194, 163, 92, .35), inset 0 0 16px rgba(226, 208, 160, .25);
}
.lg-orb-ring {
  position: absolute; inset: 0;
  border: 1px solid rgba(194, 163, 92, .35);
  border-radius: 50%;
}
.lg-orb-ring.r1 { animation: lgSpin 18s linear infinite; border-style: dashed; }
.lg-orb-ring.r2 { inset: 8px; border-color: rgba(122, 171, 152, .3); animation: lgSpin 26s linear infinite reverse; }
.lg-orb-ring.r3 { inset: -14px; border-color: rgba(208, 96, 76, .18); animation: lgSpin 40s linear infinite; }
.lg-orb-glyph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-kai);
  font-size: 28px;
  color: rgba(226, 208, 160, .85);
  text-shadow: 0 0 12px rgba(194, 163, 92, .5);
  pointer-events: none;
}
@keyframes lgSpin { to { transform: rotate(360deg); } }

.lg-spirit[data-tier="tian"] .lg-orb-core {
  box-shadow: 0 0 40px rgba(226, 208, 160, .55), 0 0 80px rgba(122, 171, 152, .25), inset 0 0 20px rgba(255, 240, 200, .35);
}
.lg-spirit[data-tier="shang"] .lg-orb-core {
  box-shadow: 0 0 34px rgba(226, 208, 160, .45), inset 0 0 18px rgba(255, 240, 200, .28);
}
.lg-spirit[data-tier="xia"] .lg-orb-core,
.lg-spirit[data-tier="fan"] .lg-orb-core {
  box-shadow: 0 0 18px rgba(181, 173, 152, .3), inset 0 0 12px rgba(255, 240, 200, .15);
}

.lg-spirit-ui {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 18px 16px 20px;
  gap: 8px;
  pointer-events: none;
}
.lg-spirit-grade {
  font-family: var(--f-xw);
  font-size: clamp(28px, 6vw, 40px);
  letter-spacing: .4em;
  text-indent: .4em;
  color: var(--gold-bright);
  text-shadow: 0 0 18px rgba(194, 163, 92, .35);
}
.lg-spirit-score {
  font-family: var(--f-song);
  font-size: 13px;
  letter-spacing: .2em;
  color: var(--paper-dim);
}
.lg-spirit-score b {
  font-family: var(--f-kai);
  font-size: 28px;
  color: var(--cinnabar-bright);
  margin: 0 4px;
}
.lg-spirit-hint {
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--paper-faint);
}
.lg-spirit-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  pointer-events: auto;
  margin-top: 4px;
}
.lg-spirit-btns .btn { padding: 10px 18px; font-size: 13px; }
.lg-floats {
  position: absolute;
  left: 0; right: 0; top: 38%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}
.lg-float {
  font-family: var(--f-kai);
  font-size: 16px;
  letter-spacing: .2em;
  color: var(--gold-bright);
  text-shadow: 0 0 12px rgba(194, 163, 92, .45);
  animation: lgFloatUp 2.4s ease-out forwards;
}
@keyframes lgFloatUp {
  0% { opacity: 0; transform: translateY(10px) scale(.96); }
  15% { opacity: 1; }
  80% { opacity: .9; }
  100% { opacity: 0; transform: translateY(-36px) scale(1.05); }
}
.lg-spirit.lg-burst .lg-orb-core {
  animation: lgBurst .55s cubic-bezier(.2,.8,.2,1);
}
@keyframes lgBurst {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); }
  100% { transform: scale(1); }
}
.lg-spirit.lg-gather .lg-orb-ring.r1 { animation-duration: 4s; }
.lg-spirit.lg-gather .lg-orb-ring.r2 { animation-duration: 6s; }

@media (max-width: 720px) {
  .lg-canvas { height: 250px; }
  .lg-orb { width: 76px; height: 76px; }
  .lg-orb-glyph { font-size: 22px; }
  .lg-spirit-grade { letter-spacing: .28em; text-indent: .28em; }
}

@media (prefers-reduced-motion: reduce) {
  .lg-orb-ring, .lg-float, .lg-spirit.lg-burst .lg-orb-core {
    animation: none !important;
  }
}

/* 大六壬可视化 */
.lr-viz-wrap { margin-bottom: 14px; }
#lrViz {
  width: 100%;
  max-width: 960px;
  height: 380px;
  display: block;
  margin: 8px 0;
  border: 1px solid var(--line);
  background: radial-gradient(ellipse at 35% 50%, rgba(40,32,18,.35), rgba(10,8,6,.9));
  border-radius: 3px;
}

/* 六壬立体课盘 */
.lr-viz-tabs {
  display: inline-flex; gap: 8px; margin-left: 18px; vertical-align: middle;
}
.lr-viz-tabs button {
  padding: 6px 14px;
  border: 1px solid var(--line, rgba(201,162,39,.28));
  border-radius: 3px;
  background: transparent;
  color: var(--paper-dim, #a89b86);
  font-family: var(--f-kai, "Ma Shan Zheng", KaiTi, serif);
  font-size: 14px;
  letter-spacing: .16em;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.lr-viz-tabs button:hover {
  color: var(--gold-bright, #f0d78c);
  border-color: rgba(201,162,39,.5);
}
.lr-viz-tabs button.on {
  color: var(--gold-bright, #f0d78c);
  border-color: var(--gold-dim, #c9a227);
  background: rgba(201,162,39,.12);
  box-shadow: 0 0 12px rgba(201,162,39,.18);
}
.lr-viz-stage { margin-top: 6px; }
#lr3d {
  width: 100%;
  max-width: 960px;
  height: 420px;
  display: block;
  margin: 8px 0 4px;
  border: 1px solid var(--line, rgba(201,162,39,.28));
  border-radius: 3px;
  background: radial-gradient(ellipse at 50% 45%, rgba(20,32,48,.55), rgba(7,9,15,.96));
  touch-action: none;
  cursor: grab;
}
#lr3d:active { cursor: grabbing; }
.lr3d-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.lr3d-ops { display: flex; gap: 8px; }
.btn-sm {
  padding: 6px 14px;
  font-family: var(--f-kai, "Ma Shan Zheng", KaiTi, serif);
  font-size: 13px;
  letter-spacing: .14em;
}
@media (max-width: 640px) {
  #lr3d { height: 320px; }
  .lr-viz-tabs { margin-left: 8px; gap: 6px; }
  .lr-viz-tabs button { padding: 5px 10px; font-size: 12px; letter-spacing: .08em; }
}

.lr3d-detail {
  margin-top: 10px; padding: 14px 16px;
  border: 1px solid rgba(201,162,39,.28);
  border-radius: 3px;
  background: rgba(12,14,18,.55);
}
.lr3d-detail-h {
  font-family: var(--f-kai); font-size: 15px; letter-spacing: .16em;
  color: var(--gold-bright); margin-bottom: 10px;
  border-left: 3px solid var(--cinnabar-bright);
  padding: 2px 0 2px 12px;
}
.lr3d-detail-b {
  font-size: 13px; line-height: 1.85; color: var(--paper, #e8e0d0);
  min-height: 3.2em;
}
.lr3d-detail-b .lr3d-gh {
  color: var(--gold-bright); letter-spacing: .08em; font-size: 14px;
}

.lr3d-legend {
  display: flex; flex-wrap: wrap; gap: 10px 16px;
  margin: 8px 0 4px; font-size: 11px; letter-spacing: .12em;
  color: var(--paper-dim, #a89b86);
}
.lr3d-legend .lg::before {
  content: ''; display: inline-block; width: 10px; height: 10px;
  border-radius: 50%; margin-right: 6px; vertical-align: -1px;
}
.lg-gold::before { background: #f0d78c; box-shadow: 0 0 6px #c9a227; }
.lg-red::before { background: #ff6b4a; box-shadow: 0 0 6px #c23b22; }
.lg-jade::before { background: #7aefe6; box-shadow: 0 0 6px #3dcbc0; }
.lg-dim::before { background: transparent; border: 1px solid #c9a227; }
.lr3d-detail-b b.lr3d-gh { display: block; margin-bottom: 4px; }

/* 参考视频式：课局头 + 十二宫信息板 */
.lr3d-meta {
  display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 6px 0 10px;
}
.meta-pill {
  padding: 5px 12px; border-radius: 3px;
  border: 1px solid rgba(201,162,39,.35);
  background: rgba(201,162,39,.08);
  color: var(--gold-bright, #f0d78c);
  font-family: var(--f-kai); font-size: 13px; letter-spacing: .14em;
}
.meta-pill.alert {
  border-color: rgba(194,59,34,.5);
  background: rgba(194,59,34,.12);
  color: var(--cinnabar-bright, #ff6b4a);
}

.lr3d-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 8px 0 12px;
}
.lr3d-cell {
  position: relative;
  min-height: 92px;
  padding: 10px 10px 8px;
  border: 1px solid rgba(201,162,39,.22);
  border-radius: 4px;
  background: linear-gradient(160deg, rgba(18,22,30,.75), rgba(10,12,18,.85));
  cursor: pointer;
  transition: border-color .2s, transform .15s, box-shadow .2s;
}
.lr3d-cell:hover {
  border-color: rgba(240,215,140,.65);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.lr3d-cell.on {
  border-color: var(--gold-bright, #f0d78c);
  box-shadow: 0 0 0 1px rgba(240,215,140,.35), 0 8px 22px rgba(201,162,39,.2);
  background: linear-gradient(160deg, rgba(40,32,18,.7), rgba(18,14,10,.9));
}
.lr3d-cell .c-di {
  font-family: var(--f-kai); font-size: 20px; color: var(--paper, #e8e0d0);
  letter-spacing: .12em;
}
.lr3d-cell .c-tian {
  font-family: var(--f-kai); font-size: 18px; margin-left: 6px;
}
.lr3d-cell .c-tian.jade { color: var(--jade-hi, #7aefe6); }
.lr3d-cell .c-tian.gold { color: var(--gold-bright, #f0d78c); }
.lr3d-cell .c-jiang {
  margin-top: 4px; font-size: 11px; letter-spacing: .12em;
  color: var(--paper-dim, #a89b86);
}
.lr3d-cell .c-chips { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.lr3d-cell .chip {
  font-size: 10px; padding: 1px 6px; border-radius: 2px;
  letter-spacing: .1em;
  border: 1px solid transparent;
}
.chip.jx-g { background: rgba(61,203,192,.16); color: #7aefe6; border-color: rgba(61,203,192,.35); }
.chip.jx-x { background: rgba(194,59,34,.18); color: #ff6b4a; border-color: rgba(194,59,34,.4); }
.chip.jx-z { background: rgba(201,162,39,.12); color: #e8d5a0; border-color: rgba(201,162,39,.3); }
.chip.kong { background: rgba(194,59,34,.22); color: #ffb09a; }
.chip.ma { background: rgba(61,203,192,.18); color: #7aefe6; }
.chip.wang { background: rgba(201,162,39,.15); color: #f0d78c; }
.lr3d-cell.kong-cell { border-color: rgba(194,59,34,.4); }
.lr3d-cell.ma-cell { border-color: rgba(61,203,192,.35); }
.lr3d-cell .c-pos {
  position: absolute; top: 6px; right: 8px;
  font-size: 10px; color: var(--paper-dim, #a89b86); letter-spacing: .12em;
}

.lr3d-detail-h .lr3d-chips { margin-left: 12px; }
.lr3d-detail-h .lr3d-chips .chip { font-size: 11px; margin-right: 4px; }

@media (max-width: 860px) {
  .lr3d-board { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 520px) {
  .lr3d-board { grid-template-columns: repeat(2, 1fr); }
  .lr3d-cell { min-height: 84px; }
}

/* ===== 奇门遁甲（墨金朱砂 · 与主站同源） ===== */
.qm-form .he-grid { grid-template-columns: 1fr 1fr; }
.qm-form .he-grid label:last-child { grid-column: 1 / -1; }
.qm-stage { margin-bottom: 18px; }

.qm-meta {
  display: flex; flex-wrap: wrap; gap: 8px 10px;
  margin: 10px 0 12px;
}
.qm-pill {
  padding: 6px 14px; border-radius: 3px;
  border: 1px solid var(--line-bright);
  background: linear-gradient(180deg, rgba(42,35,22,.55), rgba(26,21,14,.65));
  color: var(--gold-bright);
  font-family: var(--f-kai); font-size: 13px; letter-spacing: .14em;
}
.qm-pill.hi {
  border-color: var(--cinnabar-bright);
  color: var(--cinnabar-bright);
  background: linear-gradient(180deg, rgba(80,30,24,.4), rgba(40,18,14,.5));
  box-shadow: 0 0 12px rgba(208,96,76,.18);
}

.qm-steps {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0 0 14px;
}
.qm-step {
  flex: 1; min-width: 58px;
  text-align: center;
  font-family: var(--f-kai); font-size: 11px; letter-spacing: .16em;
  color: var(--paper-faint);
  padding: 7px 2px;
  border-radius: 3px;
  border: 1px solid transparent;
  opacity: .32;
  transition: all .35s;
}
.qm-step.on {
  opacity: 1;
  color: var(--gold-bright);
  border-color: var(--line-bright);
  background: rgba(194,163,92,.1);
}

.qm-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0 16px;
}
.qm-cell {
  position: relative;
  min-height: 108px;
  padding: 10px 10px 8px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: linear-gradient(165deg, #2a2316, #1a150e);
  cursor: pointer;
  display: flex; flex-direction: column; gap: 2px;
  transition: border-color .2s, transform .18s, box-shadow .2s;
}
.qm-cell:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
}
.qm-cell.on {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 1px rgba(226,208,160,.3), 0 10px 24px rgba(194,163,92,.18);
}
.qm-cell.kong { border-color: rgba(208,96,76,.5); }
.qm-cell.ma { border-color: rgba(122,239,230,.35); }
.qm-cell .c-name {
  font-family: var(--f-kai); font-size: 11px;
  letter-spacing: .14em; color: var(--paper-faint);
}
.qm-cell .c-pair {
  font-family: var(--f-kai); font-size: 17px;
  letter-spacing: .12em;
}
.qm-cell .c-pair .t { color: var(--gold-bright); }
.qm-cell .c-pair .d { color: var(--paper); }
.qm-cell .c-pair i {
  font-style: normal; color: var(--paper-faint);
  margin: 0 4px; font-size: 12px;
}
.qm-cell .c-men {
  font-family: var(--f-kai); font-size: 12px;
  color: var(--cinnabar-bright); letter-spacing: .12em;
}
.qm-cell .c-xing {
  font-size: 11px; color: var(--gold); letter-spacing: .1em;
}
.qm-cell .c-shen {
  font-size: 11px; color: var(--paper-dim); letter-spacing: .1em;
}
.qm-cell .c-foot {
  margin-top: auto;
  display: flex; flex-wrap: wrap; gap: 3px;
}
.qm-chip {
  font-size: 9px; padding: 1px 5px; border-radius: 2px;
  letter-spacing: .1em; border: 1px solid transparent;
}
.qm-chip.wang {
  background: rgba(194,163,92,.16); color: var(--gold-bright);
  border-color: rgba(194,163,92,.35);
}
.qm-chip.x {
  background: rgba(168,67,54,.22); color: var(--cinnabar-bright);
  border-color: rgba(208,96,76,.4);
}
.qm-chip.m {
  background: rgba(122,239,230,.12); color: #7aefe6;
  border-color: rgba(122,239,230,.3);
}

.qm-detail {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(42,35,22,.35), rgba(26,21,14,.5));
  padding: 16px 18px;
}
.qm-detail-h {
  font-family: var(--f-kai); font-size: 16px; letter-spacing: .18em;
  color: var(--gold-bright);
  border-left: 3px solid var(--cinnabar-bright);
  padding: 2px 0 2px 12px;
  margin-bottom: 12px;
}
.qm-detail-h b { margin-left: 10px; color: var(--paper); }
.qm-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.qm-row {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 12px; padding: 8px 0;
  border-bottom: 1px solid rgba(110,90,50,.25);
}
.qm-row .k {
  color: var(--paper-faint); letter-spacing: .14em; flex-shrink: 0;
}
.qm-row .v { color: var(--paper); text-align: right; letter-spacing: .06em; }
.qm-row .v.hi { color: var(--gold-bright); }
.qm-row .v.gold { color: var(--gold); }
.qm-row .v.bad { color: var(--cinnabar-bright); }
.qm-explain {
  margin-top: 14px;
  font-size: 13px; line-height: 1.9;
  color: var(--paper);
  white-space: pre-wrap;
  border-left: 2px solid var(--gold-dim);
  padding: 10px 14px;
  background: rgba(0,0,0,.15);
}

/* 动效（与动态 UI 同源，色随主题） */
@keyframes qmCellIn {
  0%   { opacity: 0; transform: translateY(14px) scale(.92); filter: blur(2px); }
  60%  { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes qmLayerIn {
  0%   { opacity: 0; transform: translateX(-8px); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes qmGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(226,208,160,.25), 0 10px 24px rgba(194,163,92,.18); }
  50%      { box-shadow: 0 0 0 2px rgba(226,208,160,.5), 0 10px 28px rgba(194,163,92,.28); }
}
@keyframes qmSweep {
  0%   { transform: translateY(-110%); opacity: 0; }
  20%  { opacity: .5; }
  100% { transform: translateY(110%); opacity: 0; }
}
@keyframes qmRise {
  0%   { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes qmPop {
  0%   { opacity: 0; transform: scale(.7); }
  70%  { transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}
.qm-cell.anim { animation: qmCellIn .55s cubic-bezier(.2,.8,.3,1) both; }
.qm-cell.on { animation: qmGlow 2.2s ease-in-out infinite; }
.qm-cell .c-name { animation: qmLayerIn .4s .05s both; }
.qm-cell .c-pair { animation: qmLayerIn .4s .12s both; }
.qm-cell .c-men  { animation: qmLayerIn .4s .22s both; }
.qm-cell .c-xing { animation: qmLayerIn .4s .32s both; }
.qm-cell .c-shen { animation: qmLayerIn .4s .42s both; }
.qm-cell .c-foot { animation: qmLayerIn .4s .5s both; }
.qm-chip { animation: qmPop .35s both; }
.qm-board.casting { position: relative; overflow: hidden; }
.qm-board.casting::after {
  content: ''; position: absolute; left: 0; right: 0; height: 36%;
  background: linear-gradient(180deg, transparent, rgba(226,208,160,.16), transparent);
  animation: qmSweep 1.1s linear infinite;
  pointer-events: none;
}
.qm-detail.enter { animation: qmRise .5s cubic-bezier(.2,.8,.3,1) both; }
.qm-row { animation: qmLayerIn .35s both; }
.qm-row:nth-child(2) { animation-delay: .05s; }
.qm-row:nth-child(3) { animation-delay: .1s; }
.qm-row:nth-child(4) { animation-delay: .15s; }
.qm-row:nth-child(5) { animation-delay: .2s; }
.qm-row:nth-child(6) { animation-delay: .25s; }
.qm-row:nth-child(7) { animation-delay: .3s; }
.qm-row:nth-child(8) { animation-delay: .35s; }
.qm-row:nth-child(9) { animation-delay: .4s; }
.qm-row:nth-child(10) { animation-delay: .45s; }
.qm-row:nth-child(11) { animation-delay: .5s; }
.qm-row:nth-child(12) { animation-delay: .55s; }
.qm-explain { animation: qmRise .45s .2s both; }
.qm-step.on { animation: qmPop .35s both; }
.qm-pill { animation: qmPop .4s both; }
.qm-pill.hi { animation: qmPop .4s .12s both; }

@media (max-width: 720px) {
  .qm-form .he-grid { grid-template-columns: 1fr; }
  .qm-board { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .qm-cell { min-height: 92px; padding: 8px 6px 6px; }
  .qm-cell .c-pair { font-size: 14px; }
  .qm-rows { grid-template-columns: 1fr; }
}

/* =========================================================
   全站动态 UI（参考奇门起局动效）—— 进场 / 分层 / 扫光 / 弹入
   ========================================================= */
@keyframes xuiRise {
  0%   { opacity: 0; transform: translateY(22px); filter: blur(1.5px); }
  60%  { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes xuiLayer {
  0%   { opacity: 0; transform: translateX(-10px); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes xuiPop {
  0%   { opacity: 0; transform: scale(.82); }
  70%  { transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes xuiSweep {
  0%   { transform: translateX(-120%) skewX(-12deg); opacity: 0; }
  25%  { opacity: .55; }
  100% { transform: translateX(220%) skewX(-12deg); opacity: 0; }
}
@keyframes xuiGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(226,208,160,.12); }
  50%      { box-shadow: 0 0 0 1px rgba(226,208,160,.35), 0 10px 28px rgba(194,163,92,.16); }
}
@keyframes xuiShine {
  0%   { background-position: -120% 0; }
  100% { background-position: 220% 0; }
}
@keyframes xuiBarGrow {
  0%   { transform: scaleX(0); opacity: .2; }
  100% { transform: scaleX(1); opacity: 1; }
}
@keyframes xuiDotPulse {
  0%, 100% { transform: scale(1); opacity: .55; }
  50%      { transform: scale(1.35); opacity: 1; }
}

/* —— 进场：rv 容器打开后，子元素按序出现 —— */
.rv.in > * {
  animation: xuiRise .7s cubic-bezier(.2,.8,.3,1) both;
}
.rv.in > *:nth-child(1) { animation-delay: 0s; }
.rv.in > *:nth-child(2) { animation-delay: .08s; }
.rv.in > *:nth-child(3) { animation-delay: .16s; }
.rv.in > *:nth-child(4) { animation-delay: .24s; }
.rv.in > *:nth-child(5) { animation-delay: .32s; }
.rv.in > *:nth-child(6) { animation-delay: .40s; }
.rv.in > *:nth-child(7) { animation-delay: .48s; }
.rv.in > *:nth-child(8) { animation-delay: .56s; }
.rv.in > *:nth-child(9) { animation-delay: .64s; }
.rv.in > *:nth-child(n+10) { animation-delay: .72s; }

/* 卡片内更细一层（标题条 / 字段 / 注脚） */
.rv.in .panel,
.rv.in .eli-card,
.rv.in .yy-card,
.rv.in .ge-card,
.rv.in .lr-page.on,
.rv.in .mod-body > * {
  animation: xuiRise .75s cubic-bezier(.2,.8,.3,1) both;
}
.rv.in .panel::after,
.rv.in .eli-card::after,
.rv.in .yy-card::after,
.rv.in .ge-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(226,208,160,.12) 50%, transparent 65%);
  background-size: 220% 100%;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
}
.rv.in .panel:hover::after,
.rv.in .eli-card:hover::after,
.rv.in .yy-card:hover::after,
.rv.in .ge-card:hover::after {
  opacity: 1;
  animation: xuiShine 1.1s ease;
}

/* 板块标题线生长 */
.rv.in .sec-head .sec-line {
  transform-origin: left center;
  animation: xuiBarGrow .9s .15s cubic-bezier(.2,.8,.3,1) both;
}
.rv.in .sec-head .sec-no {
  animation: xuiPop .55s both;
}
.rv.in .sec-head h2 {
  animation: xuiLayer .6s .1s both;
}
.rv.in .sec-head .sec-motto {
  animation: xuiLayer .6s .22s both;
}

/* 目录条 */
.toc-item {
  transition: transform .25s, border-color .25s, background .25s;
}
.rv.in .toc-item {
  animation: xuiRise .55s both;
}
.rv.in .toc-item:nth-child(1) { animation-delay: .05s; }
.rv.in .toc-item:nth-child(2) { animation-delay: .12s; }
.rv.in .toc-item:nth-child(3) { animation-delay: .19s; }
.rv.in .toc-item:nth-child(4) { animation-delay: .26s; }
.rv.in .toc-item:nth-child(5) { animation-delay: .33s; }
.rv.in .toc-item:nth-child(6) { animation-delay: .40s; }

/* 表单 / 按钮微交互 */
.btn, .btn-primary, .btn-ghost, .btn-big, .btn-sm {
  transition: transform .18s, box-shadow .25s, border-color .25s, background .25s, filter .2s;
}
.btn:active, .btn-primary:active, .btn-ghost:active {
  transform: scale(.97);
  filter: brightness(1.08);
}
.btn-primary {
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.18) 50%, transparent 65%);
  background-size: 220% 100%;
  opacity: 0; pointer-events: none;
}
.btn-primary:hover::after {
  opacity: 1;
  animation: xuiShine .9s ease;
}

/* 吉凶徽 / 角标弹入 */
.jx, .he-badge, .qm-chip, .de-tag, .ys-chip, .ss {
  transition: transform .2s, box-shadow .2s;
}
.jx:hover, .he-badge:hover, .de-tag:hover {
  transform: scale(1.06);
}

/* 面板出现时扫光一次 */
.rv.in .panel:first-of-type,
.rv.in .lr-viz-wrap {
  position: relative;
  overflow: hidden;
}
.rv.in .panel:first-of-type::before {
  content: '';
  position: absolute; top: 0; bottom: 0; width: 36%;
  background: linear-gradient(90deg, transparent, rgba(226,208,160,.1), transparent);
  animation: xuiSweep 1.2s .15s ease-out both;
  pointer-events: none;
  z-index: 1;
}

/* 大运/流年卡依次亮起 */
.dy-card, .ln-card, .ly-card {
  transition: transform .22s, box-shadow .25s, border-color .25s;
}
.rv.in .dy-card, .rv.in .ln-card, .rv.in .ly-card {
  animation: xuiPop .5s both;
}
.rv.in .dy-card:nth-child(1), .rv.in .ln-card:nth-child(1), .rv.in .ly-card:nth-child(1) { animation-delay: .05s; }
.rv.in .dy-card:nth-child(2), .rv.in .ln-card:nth-child(2), .rv.in .ly-card:nth-child(2) { animation-delay: .12s; }
.rv.in .dy-card:nth-child(3), .rv.in .ln-card:nth-child(3), .rv.in .ly-card:nth-child(3) { animation-delay: .19s; }
.rv.in .dy-card:nth-child(4), .rv.in .ln-card:nth-child(4), .rv.in .ly-card:nth-child(4) { animation-delay: .26s; }
.rv.in .dy-card:nth-child(5), .rv.in .ln-card:nth-child(5), .rv.in .ly-card:nth-child(5) { animation-delay: .33s; }
.rv.in .dy-card:nth-child(6), .rv.in .ln-card:nth-child(6), .rv.in .ly-card:nth-child(6) { animation-delay: .40s; }
.rv.in .dy-card:nth-child(n+7), .rv.in .ln-card:nth-child(n+7), .rv.in .ly-card:nth-child(n+7) { animation-delay: .48s; }

/* 六壬门卡 / 婚缘卡 */
.lr-men-card, .yy-card, .he-dim, .he-line {
  transition: transform .22s, box-shadow .25s;
}
.rv.in .lr-men-card, .rv.in .he-dim {
  animation: xuiRise .6s both;
}
.rv.in .lr-men-card:nth-child(1), .rv.in .he-dim:nth-child(1) { animation-delay: .06s; }
.rv.in .lr-men-card:nth-child(2), .rv.in .he-dim:nth-child(2) { animation-delay: .14s; }
.rv.in .lr-men-card:nth-child(3), .rv.in .he-dim:nth-child(3) { animation-delay: .22s; }
.rv.in .lr-men-card:nth-child(4), .rv.in .he-dim:nth-child(4) { animation-delay: .30s; }
.rv.in .lr-men-card:nth-child(5), .rv.in .he-dim:nth-child(5) { animation-delay: .38s; }
.rv.in .lr-men-card:nth-child(6), .rv.in .he-dim:nth-child(6) { animation-delay: .46s; }
.rv.in .lr-men-card:nth-child(7), .rv.in .he-dim:nth-child(7) { animation-delay: .54s; }
.rv.in .lr-men-card:nth-child(8), .rv.in .he-dim:nth-child(8) { animation-delay: .62s; }

/* 步骤/进度点（六壬分页、奇门七阶同款视觉） */
.lr-ptab, .lr-page-no {
  transition: color .25s, background .25s, border-color .25s, transform .2s;
}
.lr-ptab:hover { transform: translateY(-1px); }
.lr-ptab.on {
  animation: xuiPop .35s both;
}

/* 五行/格局等小芯片 */
.wx-name, .ge-title h4, .th-stem, .p-char, .p-zh {
  transition: transform .2s, color .2s;
}

/* 打印/减少动态时关闭 */
@media (prefers-reduced-motion: reduce) {
  .rv.in > *,
  .rv.in .panel, .rv.in .eli-card, .rv.in .yy-card, .rv.in .ge-card,
  .rv.in .sec-head .sec-line, .rv.in .sec-head .sec-no,
  .rv.in .sec-head h2, .rv.in .sec-head .sec-motto,
  .rv.in .toc-item, .rv.in .dy-card, .rv.in .ln-card, .rv.in .ly-card,
  .rv.in .lr-men-card, .rv.in .he-dim, .qm-cell.anim, .qm-detail.enter,
  .qm-step.on, .qm-pill {
    animation: none !important;
  }
  .rv { opacity: 1 !important; transform: none !important; }
}

@media print {
  .rv { opacity: 1 !important; transform: none !important; }
}

.xui-result {
  position: relative;
}
.xui-result::before {
  content: '';
  position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(226,208,160,.12), transparent);
  animation: xuiSweep 1.15s ease-out both;
  pointer-events: none;
  z-index: 2;
}

/* ===== 国风星辰排盘 ===== */
.xj-xingpan-wrap {
  margin: 14px 0 22px;
  padding: 16px 18px 12px;
  position: relative;
  overflow: hidden;
}
.xj-xingpan-wrap::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 40%, rgba(194,163,92,.08), transparent 70%),
    linear-gradient(180deg, rgba(20,16,10,.2), transparent);
  pointer-events: none;
}
.xj-xingpan-wrap .lr-box-h { margin-bottom: 10px; }
.xj-xingpan-host {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(24,18,10,.5), rgba(10,8,5,.75));
  box-shadow: inset 0 0 40px rgba(0,0,0,.35);
}
.xj-xingpan {
  display: block;
  width: 100%;
}
.rv.in .xj-xingpan-wrap {
  animation: xuiRise .8s cubic-bezier(.2,.8,.3,1) both;
}
@media (prefers-reduced-motion: reduce) {
  .xj-xingpan-wrap { animation: none !important; }
}

/* ===== 排盘盘面 panviz ===== */
.pv-slot { margin: 10px 0 20px; }
.pv-wrap { display: flex; flex-direction: column; gap: 14px; }
.pv-box {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: linear-gradient(165deg, #2a2316, #1a150e);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.pv-box::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(194,163,92,.08), transparent 70%);
  pointer-events: none;
}
.pv-box-h {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
  font-family: var(--f-kai); font-size: 15px;
  letter-spacing: .18em; color: var(--gold-bright);
}
.pv-box-h i {
  font-style: normal; font-size: 11px;
  color: var(--paper-faint); letter-spacing: .12em;
  margin-left: 4px;
}
.pv-seal {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--cinnabar-bright);
  color: var(--cinnabar-bright);
  display: grid; place-items: center;
  font-size: 13px; flex-shrink: 0;
}
.pv-box-b { position: relative; z-index: 1; }

/* 四柱 */
.pv-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.pv-cols.sm { gap: 6px; }
.pv-col {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 10px 8px;
  text-align: center;
  background: rgba(0,0,0,.18);
}
.pv-col.day {
  border-color: var(--cinnabar-bright);
  box-shadow: 0 0 0 1px rgba(208,96,76,.25), 0 8px 18px rgba(168,67,54,.12);
}
.pv-lab {
  font-family: var(--f-kai); font-size: 11px;
  letter-spacing: .16em; color: var(--paper-faint);
}
.pv-gong {
  font-size: 10px; color: var(--gold-dim); margin: 4px 0;
  letter-spacing: .12em;
}
.pv-tg {
  font-family: var(--f-kai); font-size: 12px;
  color: var(--cinnabar-bright); margin: 4px 0;
  letter-spacing: .12em;
}
.pv-gan, .pv-zhi {
  font-family: var(--f-kai); font-size: 28px;
  line-height: 1.15; letter-spacing: .12em;
}
.pv-zhi { margin-bottom: 6px; }
.pv-hidden {
  margin: 8px 0 6px;
  display: flex; flex-wrap: wrap; gap: 4px; justify-content: center;
}
.pv-hg {
  font-size: 10px;
  background: rgba(194,163,92,.1);
  border: 1px solid rgba(194,163,92,.2);
  border-radius: 2px;
  padding: 2px 5px;
  color: var(--paper-dim);
}
.pv-hg b { margin-right: 3px; }
.pv-ny {
  font-size: 10px; color: var(--paper-faint);
  letter-spacing: .08em; margin: 4px 0;
}
.pv-ssbar {
  display: flex; flex-wrap: wrap; gap: 3px; justify-content: center;
  margin-top: 6px;
}
.pv-ss {
  font-style: normal; font-size: 9px;
  padding: 1px 5px; border-radius: 2px;
  background: rgba(194,163,92,.12); color: var(--gold-bright);
}
.pv-ss.g { background: rgba(93,222,160,.15); color: #5ddea0; }
.pv-ss.x { background: rgba(208,96,76,.18); color: var(--cinnabar-bright); }

/* 大运条 */
.pv-dayun {
  display: flex; gap: 6px; margin-top: 14px;
  overflow-x: auto; padding-bottom: 4px;
}
.pv-dy {
  flex: 0 0 auto; min-width: 64px;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 8px 6px;
  text-align: center;
  font-size: 11px;
}
.pv-dy.on {
  border-color: var(--gold-bright);
  background: rgba(194,163,92,.12);
}
.pv-dy i { display: block; font-style: normal; color: var(--paper-faint); font-size: 10px; }
.pv-dy b {
  display: block; font-family: var(--f-kai);
  font-size: 15px; color: var(--gold-bright); letter-spacing: .1em;
  margin: 3px 0;
}
.pv-dy span { color: var(--paper-dim); font-size: 10px; }

/* 合盘 */
.pv-he {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}
.pv-side-tag {
  text-align: center; font-family: var(--f-kai);
  font-size: 13px; letter-spacing: .2em;
  color: var(--gold-bright); margin-bottom: 8px;
}
.pv-link { text-align: center; min-width: 90px; }
.pv-link-line {
  width: 1px; height: 48px; margin: 0 auto;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
}
.pv-link-core {
  margin: 6px 0;
  font-family: var(--f-kai); font-size: 18px;
  letter-spacing: .12em; color: var(--gold-bright);
}
.pv-link-core i {
  font-style: normal; margin: 0 6px;
  color: var(--cinnabar-bright);
}
.pv-link-note {
  font-size: 10px; color: var(--paper-faint); letter-spacing: .14em;
}

/* 婚缘十二宫环 */
.pv-ring {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}
.pv-ring-it {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 10px 4px;
  text-align: center;
  font-family: var(--f-kai); font-size: 16px;
  color: var(--paper);
  background: rgba(0,0,0,.15);
}
.pv-ring-it.spouse {
  border-color: var(--cinnabar-bright);
  background: rgba(168,67,54,.18);
  color: var(--gold-bright);
}
.pv-ring-it em {
  display: block; font-style: normal;
  font-size: 9px; color: var(--cinnabar-bright);
  letter-spacing: .12em; margin-top: 3px;
}
.pv-tl { display: flex; flex-direction: column; gap: 8px; }
.pv-tl-item {
  display: grid;
  grid-template-columns: 16px 110px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(110,90,50,.25);
}
.pv-tl-item i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); margin-top: 5px;
  box-shadow: 0 0 8px rgba(194,163,92,.5);
}
.pv-tl-item b {
  color: var(--gold-bright); letter-spacing: .1em;
  font-family: var(--f-kai); font-size: 13px;
}
.pv-tl-item span { color: var(--paper-dim); line-height: 1.6; }

/* 梅花卦 */
.pv-hexs {
  display: flex; gap: 18px; justify-content: center; flex-wrap: wrap;
}
.pv-hex { text-align: center; min-width: 90px; }
.pv-hex-n {
  font-family: var(--f-kai); font-size: 15px;
  color: var(--gold-bright); letter-spacing: .16em;
  margin-bottom: 8px;
}
.pv-hex-lines {
  display: flex; flex-direction: column; gap: 6px;
  align-items: center;
}
.pv-yao { display: flex; gap: 8px; }
.pv-yao i {
  display: block; width: 28px; height: 7px;
  background: var(--gold-bright); border-radius: 1px;
}
.pv-yao.yin i {
  background: transparent;
  border: 1px solid var(--cinnabar-bright);
  border-width: 0 0 0 0;
  box-shadow: none;
}
.pv-yao.yin i {
  background: rgba(208,96,76,.55);
}
.pv-yao.yin {
  gap: 10px;
}
.pv-yao.yin i {
  width: 24px;
}
.pv-hex-t {
  margin-top: 8px; font-size: 11px;
  color: var(--paper-faint); letter-spacing: .14em;
}

/* 紫微十二宫 */
.pv-zw {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.pv-zw-cell {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 8px;
  min-height: 72px;
  background: rgba(0,0,0,.16);
}
.pv-zw-cell.ming {
  border-color: var(--gold-bright);
  background: rgba(194,163,92,.1);
}
.pv-zw-cell.body {
  border-color: var(--cinnabar-bright);
}
.pv-zw-h {
  display: flex; justify-content: space-between;
  font-family: var(--f-kai); font-size: 12px;
  letter-spacing: .12em; color: var(--paper);
}
.pv-zw-h i {
  font-style: normal; font-size: 9px;
  color: var(--cinnabar-bright);
}
.pv-zw-h i.m { color: var(--gold-bright); }
.pv-zw-s {
  margin: 6px 0 4px;
  display: flex; flex-wrap: wrap; gap: 3px;
}
.pv-zw-s em {
  font-style: normal; font-size: 10px;
  color: var(--gold-bright);
  background: rgba(194,163,92,.12);
  padding: 1px 4px; border-radius: 2px;
}
.pv-zw-f {
  font-size: 10px; color: var(--paper-faint); letter-spacing: .1em;
}

/* 神煞分布 */
.pv-ssgrid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.pv-ss-col {
  border: 1px solid var(--line);
  border-radius: 3px; padding: 10px 8px;
  background: rgba(0,0,0,.15);
}
.pv-ss-t {
  font-family: var(--f-kai); font-size: 12px;
  letter-spacing: .16em; color: var(--gold-bright);
  margin-bottom: 8px; text-align: center;
}
.pv-ss-it {
  display: flex; justify-content: space-between;
  font-size: 11px; padding: 4px 2px;
  border-bottom: 1px dashed rgba(110,90,50,.2);
}
.pv-ss-it b { color: var(--paper); letter-spacing: .1em; }
.pv-ss-it span { color: var(--paper-faint); }
.pv-ss-it.g b { color: #5ddea0; }
.pv-ss-it.x b { color: var(--cinnabar-bright); }

/* 财富条 */
.pv-wealth-bar {
  height: 10px; border-radius: 5px;
  background: rgba(0,0,0,.35);
  border: 1px solid var(--line);
  overflow: hidden; margin-bottom: 10px;
}
.pv-wealth-bar i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright), var(--cinnabar-bright));
  box-shadow: 0 0 12px rgba(194,163,92,.4);
  animation: xuiBarGrow 1s ease both;
  transform-origin: left center;
}
.pv-wealth-v {
  display: flex; justify-content: space-between;
  font-family: var(--f-kai); letter-spacing: .12em;
}
.pv-wealth-v b { color: var(--gold-bright); font-size: 18px; }
.pv-wealth-v span { color: var(--paper-dim); font-size: 13px; }

/* 进场 */
.pv-anim.in .pv-box {
  animation: xuiRise .75s cubic-bezier(.2,.8,.3,1) both;
}

@media (max-width: 720px) {
  .pv-cols { grid-template-columns: repeat(4, 1fr); gap: 5px; }
  .pv-gan, .pv-zhi { font-size: 22px; }
  .pv-he { grid-template-columns: 1fr; }
  .pv-link { display: none; }
  .pv-zw { grid-template-columns: repeat(3, 1fr); }
  .pv-ssgrid { grid-template-columns: repeat(2, 1fr); }
  .pv-ring { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .pv-anim.in .pv-box, .pv-wealth-bar i { animation: none !important; }
}

.pv-sikes {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; margin-bottom: 14px;
}
.pv-sike {
  border: 1px solid var(--line); border-radius: 3px;
  padding: 10px 6px; text-align: center;
  background: rgba(0,0,0,.16);
}
.pv-sike-n {
  font-family: var(--f-kai); font-size: 11px;
  letter-spacing: .14em; color: var(--paper-faint);
  margin-bottom: 6px;
}
.pv-sike-up, .pv-sike-lo {
  font-family: var(--f-kai); font-size: 22px;
  letter-spacing: .12em;
}
.pv-sike-lo { opacity: .85; margin-top: 2px; }
.pv-sike-j {
  margin-top: 6px; font-size: 10px;
  color: var(--gold-bright); letter-spacing: .12em;
}
.pv-chuans {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap;
}
.pv-chuan {
  min-width: 72px;
  border: 1px solid var(--line);
  border-radius: 3px; padding: 10px 12px;
  text-align: center;
  background: linear-gradient(165deg, rgba(80,30,24,.35), rgba(30,16,12,.5));
}
.pv-chuan.first {
  border-color: var(--cinnabar-bright);
  box-shadow: 0 0 12px rgba(208,96,76,.18);
}
.pv-chuan-n {
  font-family: var(--f-kai); font-size: 11px;
  letter-spacing: .14em; color: var(--cinnabar-bright);
}
.pv-chuan-z {
  font-family: var(--f-kai); font-size: 24px;
  letter-spacing: .12em; margin: 4px 0;
}
.pv-chuan-j { font-size: 10px; color: var(--paper-dim); letter-spacing: .1em; }
.pv-chuan-arrow {
  color: var(--gold); font-size: 18px; opacity: .7;
}
.pv-yao.dong i {
  box-shadow: 0 0 10px rgba(226,208,160,.55);
}
.pv-yao.dong em {
  font-style: normal; font-size: 9px;
  color: var(--cinnabar-bright); margin-left: 4px;
  vertical-align: middle;
}
.pv-hex-q {
  text-align: center; font-family: var(--f-kai);
  font-size: 13px; letter-spacing: .14em;
  color: var(--paper-dim); margin-bottom: 10px;
}
