/* ===== styles.css ===== */
/* =========================================================================
   玉山命理 · 青花靛蓝 × 鎏金 × 暖瓷纸
   设计系统 v2 —— 2026-09-30
   原则：
   1) 冷靛蓝 + 暖米纸 = 青花瓷的张力，拒绝 SaaS 蓝
   2) 鎏金只做细线与高光，绝不铺大色块
   3) 朱砂只出现在印章与签号，宁少勿多
   4) 字体：思源宋（标题/经文）+ 思源黑（界面）+ Marcellus（拉丁/数字）
   5) 保留既有全部交互机制：掷杯动画 / 3D 倾斜 / 抽爻 / 全屏抽签面板
   ========================================================================= */

:root {
  /* --- 墨 · 深靛（暗面） --- */
  --ink-950: #04101c;
  --ink-900: #071827;
  --ink-850: #0a2033;
  --ink-800: #0d2840;
  --ink-700: #123550;
  --ink-600: #1a4468;

  /* --- 青 · 靛蓝（主色） --- */
  --indigo-600: #17456e;
  --indigo-500: #1f5c8e;
  --indigo-400: #3a7fb0;
  --indigo-300: #6fa5c8;
  --indigo-200: #a9c8dd;

  /* --- 纸 · 暖瓷（亮面） --- */
  --paper-50: #fdfaf3;
  --paper-100: #f7f2e7;
  --paper-200: #f0e9d9;
  --paper-300: #e4d8c1;
  --paper-400: #d2c2a2;

  /* --- 鎏金 --- */
  --gold-600: #8d6c2d;
  --gold-500: #b08d46;
  --gold-400: #c9a75c;
  --gold-300: #e0c78a;
  --gold-200: #efe3c0;

  /* --- 朱砂（印章专用） --- */
  --seal: #a6392a;
  --seal-deep: #7c2a1f;

  /* --- 五行 --- */
  --wx-metal: #77828e;
  --wx-wood: #3f7d53;
  --wx-water: #1f5c8e;
  --wx-fire: #b8502f;
  --wx-earth: #a9812f;

  /* --- 文字 --- */
  --t-strong: #0a1e2e;
  --t-body: #33465a;
  --t-soft: #5b6f83;
  --t-faint: #8497a8;
  --t-on-ink: #edf2f7;
  --t-on-ink-soft: #a7bccd;
  --t-on-ink-faint: #7a90a4;

  /* --- 线 --- */
  --hairline: rgba(176, 141, 70, 0.34);
  --hairline-strong: rgba(176, 141, 70, 0.62);
  --hairline-ink: rgba(224, 199, 138, 0.3);
  --rule: rgba(10, 30, 46, 0.13);
  --rule-soft: rgba(10, 30, 46, 0.08);

  /* --- 兼容旧变量名（部分内联样式/脚本可能引用） --- */
  --ink: var(--t-strong);
  --surface: var(--paper-100);
  --panel: var(--paper-50);
  --panel-soft: var(--paper-200);
  --line: var(--rule);
  --muted: var(--t-soft);
  --red: var(--indigo-600);
  --red-dark: var(--indigo-600);
  --jade: var(--indigo-500);
  --gold: var(--gold-500);
  --shadow: 0 2px 4px rgba(7, 24, 39, 0.05), 0 22px 48px -20px rgba(7, 24, 39, 0.22);

  /* --- 阴影 --- */
  --shadow-lift: 0 1px 2px rgba(7, 24, 39, 0.04), 0 14px 34px -14px rgba(7, 24, 39, 0.2);
  --shadow-float: 0 2px 4px rgba(7, 24, 39, 0.05), 0 28px 62px -20px rgba(7, 24, 39, 0.32);

  /* --- 字体 --- */
  --font-serif: "Noto Serif TC", "Noto Serif SC", "Songti TC", "Songti SC", "Source Han Serif TC", "Source Han Serif SC", Georgia, serif;
  --font-ui: "Noto Sans SC", "Noto Sans TC", "PingFang SC", "PingFang TC", "Microsoft YaHei", "Microsoft JhengHei", -apple-system, "Segoe UI", sans-serif;
  --font-latin: "Marcellus", "Noto Serif TC", Georgia, serif;

  /* --- 圆角：器物感，刻意收小 --- */
  --r-card: 3px;
  --r-cell: 2px;
  --r-pill: 999px;

  /* --- 纹理 --- */
  --tex-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");

  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  font-family: var(--font-ui);
  font-size: 16px;
  color: var(--t-body);
  background:
    var(--tex-noise),
    radial-gradient(60% 42% at 88% 2%, rgba(31, 92, 142, 0.09), transparent 70%),
    radial-gradient(52% 38% at 4% 78%, rgba(176, 141, 70, 0.09), transparent 68%),
    var(--paper-100);
  background-size: 160px 160px, auto, auto, auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 环境光斑：给整页空气深度（z-index:-1，严禁给 .page-shell 加 z-index） */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  will-change: transform;
}

body::before {
  left: -12vw;
  top: -10vh;
  width: 44vw;
  height: 44vw;
  max-width: 620px;
  max-height: 620px;
  opacity: 0.5;
  background: radial-gradient(circle at 44% 44%, rgba(31, 92, 142, 0.3), transparent 68%);
  animation: depth-drift-a 26s ease-in-out infinite alternate;
}

body::after {
  right: -14vw;
  bottom: -12vh;
  width: 40vw;
  height: 40vw;
  max-width: 560px;
  max-height: 560px;
  opacity: 0.42;
  background: radial-gradient(circle at 56% 56%, rgba(176, 141, 70, 0.26), transparent 68%);
  animation: depth-drift-b 30s ease-in-out infinite alternate;
}

@keyframes depth-drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(6vw, 5vh, 0) scale(1.14); }
}

@keyframes depth-drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.12); }
  to { transform: translate3d(-6vw, -5vh, 0) scale(0.98); }
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

::selection {
  background: rgba(201, 167, 92, 0.32);
  color: var(--t-strong);
}

.page-shell {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

/* =========================================================================
   暗面区块通栏：hero / 灵签 / 易经 / 页脚
   ========================================================================= */
.hero,
.oracle-section,
.yijing-section {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding-inline: max(18px, calc((100vw - 1120px) / 2));
  color: var(--t-on-ink);
  background:
    var(--tex-noise),
    radial-gradient(58% 46% at 84% 6%, rgba(201, 167, 92, 0.11), transparent 62%),
    radial-gradient(52% 44% at 8% 88%, rgba(31, 92, 142, 0.32), transparent 66%),
    linear-gradient(164deg, var(--ink-850) 0%, var(--ink-900) 52%, var(--ink-950) 100%);
  background-size: 160px 160px, auto, auto, auto;
}

.oracle-section,
.yijing-section {
  margin-top: 0;
}

/* =========================================================================
   区块节奏与标题
   ========================================================================= */
.section-head {
  max-width: 62ch;
}

.section-head h2 {
  position: relative;
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  line-height: 1.16;
  letter-spacing: 0.02em;
  color: var(--t-strong);
}

.section-head h2::before {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-bottom: 16px;
  background: linear-gradient(90deg, var(--gold-500), rgba(176, 141, 70, 0));
}

.section-head p {
  margin: 0;
  color: var(--t-soft);
  font-size: 1.02rem;
  line-height: 1.85;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: #7d5e22;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gold-500);
  opacity: 0.75;
}

.eyebrow.dark {
  color: var(--gold-300);
}

.eyebrow.dark::before {
  background: var(--gold-400);
}

/* 菱花分隔线 */
.ink-divider {
  position: relative;
  height: 1px;
  max-width: 1120px;
  margin: 46px auto;
  background: linear-gradient(90deg, transparent, rgba(176, 141, 70, 0.4) 16%, rgba(176, 141, 70, 0.4) 84%, transparent);
}

.ink-divider::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--paper-100);
  border: 1px solid var(--gold-500);
}

.on-ink .ink-divider::after,
.hero ~ .ink-divider::after {
  background: var(--ink-900);
}

/* =========================================================================
   按钮
   ========================================================================= */
.primary-action,
.secondary-action,
.line-action,
.ghost-action {
  min-height: 50px;
  border: 0;
  border-radius: var(--r-pill);
  padding: 0 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.22, 0.68, 0.28, 1), box-shadow 0.2s ease, background 0.2s ease, filter 0.2s ease;
}

.primary-action {
  color: var(--paper-50);
  background: linear-gradient(180deg, var(--indigo-500), var(--indigo-600) 78%);
  box-shadow:
    inset 0 0 0 1px rgba(201, 167, 92, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 12px 26px -10px rgba(10, 30, 46, 0.55);
}

.primary-action:hover {
  background: linear-gradient(180deg, #26689c, var(--indigo-600) 78%);
  box-shadow:
    inset 0 0 0 1px rgba(224, 199, 138, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 16px 32px -10px rgba(10, 30, 46, 0.6);
  transform: translateY(-1px);
}

.primary-action:active {
  transform: translateY(1px);
}

.primary-action:disabled {
  cursor: progress;
  opacity: 0.76;
  transform: translateY(2px);
  filter: saturate(0.7);
}

.secondary-action {
  color: #fff;
  background: linear-gradient(180deg, #21a45c, #158240 82%);
  box-shadow: 0 10px 22px -10px rgba(9, 92, 48, 0.6);
}

.secondary-action:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.line-action {
  color: #fff;
  background: linear-gradient(180deg, #0ec257, #039e46 82%);
  box-shadow: 0 10px 22px -10px rgba(3, 118, 55, 0.55);
}

.line-action:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.ghost-action {
  color: var(--t-soft);
  background: transparent;
  border: 1px solid var(--rule);
}

.ghost-action:hover {
  color: var(--t-strong);
  border-color: var(--hairline-strong);
  background: rgba(176, 141, 70, 0.06);
}

.primary-action:focus,
.secondary-action:focus,
.line-action:focus,
.ghost-action:focus,
.hero-contact-button:focus,
.oracle-back:focus,
.time-gua-summary:focus,
.tool-entry:focus,
.yijing-entry:focus,
.oracle-card:focus {
  outline: 2px solid var(--gold-400);
  outline-offset: 3px;
}

/* =========================================================================
   HERO · 墨靛舞台 + 活罗盘
   ========================================================================= */
.hero {
  perspective: 1500px;
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(320px, 0.8fr);
  align-items: center;
  gap: clamp(22px, 3vw, 40px);
  min-height: 86svh;
  padding-top: clamp(30px, 5vh, 62px);
  padding-bottom: clamp(40px, 6vh, 78px);
}

/* 三步流程：通栏一行 */
.hero > .ink-steps {
  grid-column: 1 / -1;
  margin-top: clamp(2px, 1.4vh, 14px);
}

.hero-copy {
  position: relative;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 54px);
  overflow: hidden;
  border-radius: var(--r-card);
  color: var(--t-on-ink);
  background:
    radial-gradient(120% 92% at 84% 10%, rgba(201, 167, 92, 0.14), transparent 56%),
    radial-gradient(88% 120% at 6% 98%, rgba(31, 92, 142, 0.4), transparent 62%),
    linear-gradient(158deg, #0c2338 0%, #081826 56%, #050f1a 100%);
  box-shadow:
    inset 0 1px 0 rgba(224, 199, 138, 0.16),
    inset 0 0 0 1px rgba(224, 199, 138, 0.07),
    0 34px 78px -26px rgba(2, 8, 16, 0.8);
}

/* 纸尘颗粒 */
.hero-copy::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background-image: var(--tex-noise);
  background-size: 160px 160px;
  opacity: 0.05;
  mix-blend-mode: overlay;
}

/* 随倾斜滑动的高光带 */
.hero-copy::before {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.5;
  background: linear-gradient(112deg, rgba(224, 199, 138, 0) 40%, rgba(224, 199, 138, 0.1) 49%, rgba(224, 199, 138, 0) 58%);
  transform: translateX(calc(var(--hero-tilt-x, 0) * 3.4%));
  transition: transform 0.55s cubic-bezier(0.22, 0.68, 0.28, 1);
}

.hero-copy > *:not(.hero-stage):not(.hero-frame) {
  position: relative;
  z-index: 4;
}

/* --- 装裱角线 --- */
.hero-frame {
  position: absolute;
  inset: 13px;
  z-index: 3;
  pointer-events: none;
}

.hero-frame::before,
.hero-frame::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(224, 199, 138, 0.42);
}

.hero-frame::before {
  left: 0;
  top: 0;
  border-right: 0;
  border-bottom: 0;
}

.hero-frame::after {
  right: 0;
  bottom: 0;
  border-left: 0;
  border-top: 0;
}

/* --- 活罗盘舞台 --- */
.hero-stage {
  position: absolute;
  right: clamp(-60px, -4vw, -10px);
  top: 50%;
  width: min(52vw, 560px);
  aspect-ratio: 1 / 1;
  transform: translateY(-50%);
  z-index: 1;
  pointer-events: none;
}

.hero-stage::before {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 46%, rgba(201, 167, 92, 0.22), rgba(201, 167, 92, 0.05) 46%, transparent 72%);
  filter: blur(14px);
}

.hero-bagua-video {
  position: absolute;
  inset: 11%;
  width: 78%;
  height: 78%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
  opacity: 0.58;
  mix-blend-mode: screen;
  filter: sepia(0.5) saturate(1.5) hue-rotate(-16deg) brightness(0.9) contrast(1.04);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 55%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 50%, #000 55%, transparent 72%);
  transform: perspective(900px) rotateX(14deg) rotateY(-7deg);
  animation: hero-plate-float 9s ease-in-out infinite;
  will-change: transform;
}

@keyframes hero-plate-float {
  0%,
  100% {
    transform: perspective(900px) rotateX(14deg) rotateY(-7deg) translateY(-7px);
  }

  50% {
    transform: perspective(900px) rotateX(8deg) rotateY(5deg) translateY(7px) scale(1.03);
  }
}

/* 罗盘外环：地支刻度 SVG */
.hero-ring {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0.85;
  animation: hero-ring-turn 140s linear infinite;
  transform-origin: 50% 50%;
}

@keyframes hero-ring-turn {
  to { transform: rotate(360deg); }
}

/* --- 文案 --- */
.language-switch {
  align-self: flex-start;
  display: inline-flex;
  gap: 4px;
  margin-bottom: 26px;
  padding: 4px;
  border: 1px solid rgba(224, 199, 138, 0.28);
  border-radius: var(--r-pill);
  background: rgba(7, 24, 39, 0.5);
}

.lang-btn {
  min-width: 44px;
  min-height: 32px;
  border: 0;
  border-radius: var(--r-pill);
  color: var(--t-on-ink-faint);
  background: transparent;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 500;
  transition: color 0.18s ease, background 0.18s ease;
}

.lang-btn:hover {
  color: var(--gold-300);
}

.lang-btn.is-active {
  color: var(--ink-900);
  background: linear-gradient(180deg, var(--gold-300), var(--gold-400));
}

.hero .eyebrow {
  color: var(--gold-300);
  letter-spacing: 0.2em;
}

.hero .eyebrow::before {
  background: var(--gold-400);
}

h1 {
  margin: 0;
  max-width: 8.6em;
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 6.6vw, 5.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.03em;
  color: #f6f1e4;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(201, 167, 92, 0.18);
}

.hero-text {
  max-width: 30em;
  margin: 24px 0 0;
  color: var(--t-on-ink-soft);
  font-size: 1.05rem;
  line-height: 1.9;
}

/* --- 信任条 --- */
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.hero-trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--t-on-ink-faint);
  font-size: 0.84rem;
  letter-spacing: 0.02em;
}

.hero-trust li::before {
  content: "";
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
  background: var(--gold-400);
  flex: 0 0 auto;
}

/* --- 联系按钮 --- */
.hero-contact {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.hero-contact-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-contact-button {
  min-height: 50px;
  min-width: 138px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--r-pill);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 9px 22px;
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.hero-contact-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.hero-contact-button span {
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.03em;
}

.hero-contact-button small {
  color: rgba(255, 252, 244, 0.72);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

.hero-whatsapp {
  background: linear-gradient(180deg, #1f9e57, #11713c 82%);
  box-shadow: 0 12px 26px -12px rgba(6, 70, 36, 0.9);
}

.hero-line {
  background: linear-gradient(180deg, #0ec257, #039e46 82%);
  box-shadow: 0 12px 26px -12px rgba(3, 92, 43, 0.9);
}

/* --- 三步流程 --- */
.ink-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.ink-step {
  counter-increment: step;
  position: relative;
  padding: 20px 20px 18px;
  border: 1px solid var(--hairline-ink);
  border-radius: var(--r-card);
  background: rgba(7, 24, 39, 0.42);
}

.ink-step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 10px;
  color: var(--gold-400);
  font-family: var(--font-latin);
  font-size: 1.5rem;
  line-height: 1;
}

.ink-step strong {
  display: block;
  margin-bottom: 5px;
  color: var(--t-on-ink);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.ink-step span {
  color: var(--t-on-ink-faint);
  font-size: 0.86rem;
  line-height: 1.7;
}

/* =========================================================================
   3D 倾斜（保留原 JS 接口）
   ========================================================================= */
html.has-depth .hero-copy,
html.has-depth .calculator {
  transition: transform 0.55s cubic-bezier(0.22, 0.68, 0.28, 1), box-shadow 0.55s ease;
  will-change: transform;
}

html.has-depth .hero-copy {
  transform:
    perspective(1500px)
    rotateX(calc(var(--hero-tilt-y, 0) * -1deg))
    rotateY(calc(var(--hero-tilt-x, 0) * 1deg));
}

html.has-depth .calculator {
  transform:
    perspective(1500px)
    rotateX(calc(var(--calc-tilt-y, 0) * -1deg))
    rotateY(calc(var(--calc-tilt-x, 0) * 1deg));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 34px 72px -22px rgba(2, 10, 20, 0.55);
}

/* =========================================================================
   测算表单 · 白瓷牌
   ========================================================================= */
.calculator,
.result-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(253, 250, 243, 0.97) 40%),
    var(--paper-50);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    var(--shadow-float);
}

.calculator {
  position: relative;
  padding: 30px;
}

/* 白瓷牌装裱内线 */
.calculator::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(176, 141, 70, 0.16);
  border-radius: 2px;
  pointer-events: none;
}

/* --- 太极徽记 --- */
.brand-mark {
  position: relative;
  width: 72px;
  height: 72px;
  margin-bottom: 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  overflow: hidden;
  perspective: 420px;
  background: radial-gradient(circle at 50% 26%, var(--paper-50), var(--paper-200) 62%, var(--paper-300));
  box-shadow:
    inset 0 2px 6px rgba(10, 30, 46, 0.14),
    inset 0 -4px 10px rgba(255, 255, 255, 0.9);
}

.brand-ring {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  pointer-events: none;
}

.brand-coin {
  position: relative;
  width: 50px;
  height: 50px;
  transform-style: preserve-3d;
  animation: brand-coin-turn 9s ease-in-out infinite alternate;
}

@keyframes brand-coin-turn {
  from { transform: rotateX(21deg) rotateY(-30deg); }
  to { transform: rotateX(13deg) rotateY(30deg); }
}

.brand-coin-core,
.brand-coin-face {
  position: absolute;
  display: block;
  border-radius: 50%;
}

.brand-coin-core {
  inset: -1px;
  background: radial-gradient(circle at 40% 34%, var(--indigo-400), var(--ink-800) 74%);
  transform: translateZ(-4px);
}

.brand-coin-face {
  inset: 0;
}

.brand-taiji {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-taiji-rotor {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: brand-taiji-spin 7s linear infinite;
}

@keyframes brand-taiji-spin {
  to { transform: rotate(360deg); }
}

/* --- 表单 --- */
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--t-soft);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.field input,
.field select {
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: var(--r-cell);
  padding: 0 13px;
  color: var(--t-strong);
  background: #fffdf8;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gold-500) 50%),
    linear-gradient(135deg, var(--gold-500) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.field input:hover,
.field select:hover {
  border-color: var(--hairline-strong);
}

.field input:focus,
.field select:focus {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(201, 167, 92, 0.18);
  outline: none;
}

.form-note {
  margin: 16px 0 18px;
  color: var(--t-faint);
  font-size: 0.88rem;
  line-height: 1.7;
}

.calculator .primary-action {
  width: 100%;
}

/* =========================================================================
   结果区 · 宣纸长卷
   ========================================================================= */
.result-section {
  padding: clamp(44px, 7vh, 76px) 0 10px;
}

.empty-state {
  max-width: 52ch;
  padding: 34px 0 6px;
}

.empty-state h2 {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.6vw, 2.2rem);
  font-weight: 700;
  color: var(--t-strong);
  letter-spacing: 0.02em;
}

.empty-state p {
  margin: 0;
  color: var(--t-soft);
  line-height: 1.9;
}

.is-hidden {
  display: none !important;
}

.result-card {
  position: relative;
  padding: clamp(24px, 3.4vw, 42px);
}

.result-card::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(176, 141, 70, 0.18);
  border-radius: 2px;
  pointer-events: none;
}

.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}

.result-kicker {
  margin: 0 0 8px;
  color: var(--gold-600);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
}

.result-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 4.4vw, 2.7rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--t-strong);
}

/* --- 朱砂印 --- */
.magnetic-code {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  min-width: 62px;
  min-height: 62px;
  padding: 8px 10px;
  border-radius: var(--r-cell);
  color: #f7f0e4;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.14), transparent 46%),
    linear-gradient(160deg, var(--seal), var(--seal-deep));
  box-shadow:
    inset 0 0 0 1px rgba(247, 240, 228, 0.34),
    inset 0 0 14px rgba(60, 12, 6, 0.4),
    0 8px 20px -8px rgba(124, 42, 31, 0.6);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.25;
  text-align: center;
  transform: rotate(-2.4deg);
  animation: seal-stamp 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3) 0.12s both;
}

@keyframes seal-stamp {
  0% {
    opacity: 0;
    transform: rotate(-9deg) scale(1.5);
    filter: blur(2px);
  }

  70% {
    opacity: 1;
    filter: blur(0);
  }

  100% {
    opacity: 1;
    transform: rotate(-2.4deg) scale(1);
  }
}

/* --- 本命卦 / 流年卦 --- */
.gua-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

.gua-row > div {
  display: grid;
  gap: 5px;
  padding: 16px 18px;
  border: 1px solid var(--rule);
  border-left: 2px solid var(--gold-500);
  border-radius: var(--r-cell);
  background: rgba(255, 253, 248, 0.72);
}

.gua-row span {
  color: var(--t-soft);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

.gua-row strong {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--t-strong);
  letter-spacing: 0.04em;
}

/* --- 四柱 --- */
.bazi-block {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.bazi-block > div {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 18px 10px 16px;
  border: 1px solid var(--rule);
  border-radius: var(--r-cell);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(250, 246, 236, 0.6));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.bazi-block span {
  color: var(--gold-600);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
}

.bazi-block strong {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--t-strong);
  letter-spacing: 0.06em;
}

.lunar-date-line {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--rule);
  color: var(--t-soft);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
}

/* --- 简批段落 --- */
.reading-block {
  padding: 22px 0 2px;
  border-top: 1px solid var(--rule-soft);
  margin-top: 20px;
}

.reading-block h3 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--t-strong);
}

.reading-block h3::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 10px;
  transform: rotate(45deg) translateY(-1px);
  background: var(--gold-500);
}

.reading-block p,
.tips-list {
  margin: 0;
  color: var(--t-body);
  line-height: 1.92;
}

.tips-list {
  padding-left: 0;
  list-style: none;
}

.tips-list li {
  position: relative;
  padding-left: 20px;
}

.tips-list li + li {
  margin-top: 8px;
}

.tips-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 6px;
  height: 1px;
  background: var(--gold-500);
}

/* --- 五行气场 --- */
.element-block {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid var(--rule);
  border-radius: var(--r-cell);
  background: rgba(255, 253, 248, 0.66);
}

.element-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.element-head p {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--t-strong);
  letter-spacing: 0.04em;
}

.element-head span {
  display: block;
  color: var(--t-faint);
  font-size: 0.82rem;
}

.element-head strong {
  color: var(--gold-600);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  white-space: nowrap;
}

.element-bars {
  display: grid;
  gap: 11px;
  margin-top: 18px;
}

.element-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.element-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--r-cell);
  border: 1px solid var(--hairline);
  color: var(--gold-600);
  font-family: var(--font-serif);
  font-size: 0.92rem;
  font-weight: 700;
}

.element-meter {
  height: 7px;
  border-radius: var(--r-pill);
  background: rgba(10, 30, 46, 0.08);
  overflow: hidden;
}

.element-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  animation: meter-fill 1.1s cubic-bezier(0.22, 0.68, 0.28, 1) both;
}

@keyframes meter-fill {
  from { transform: scaleX(0); transform-origin: left; }
  to { transform: scaleX(1); transform-origin: left; }
}

.element-row strong {
  color: var(--t-soft);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
}

.element-metal .element-meter span { background: linear-gradient(90deg, #97a2ad, var(--wx-metal)); }
.element-wood .element-meter span { background: linear-gradient(90deg, #4f9066, var(--wx-wood)); }
.element-water .element-meter span { background: linear-gradient(90deg, #3a7fb0, var(--wx-water)); }
.element-fire .element-meter span { background: linear-gradient(90deg, #c96a45, var(--wx-fire)); }
.element-earth .element-meter span { background: linear-gradient(90deg, #c09a44, var(--wx-earth)); }

/* --- 重点月份 --- */
.month-block {
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid var(--rule);
  border-radius: var(--r-cell);
  background: rgba(255, 253, 248, 0.66);
}

.month-block p {
  margin: 0 0 12px;
  color: var(--t-soft);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
}

.month-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.month-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  color: var(--gold-600);
  background: rgba(201, 167, 92, 0.08);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* --- 转化请柬 --- */
.lead-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  margin-top: 28px;
  padding: clamp(22px, 3vw, 34px);
  overflow: hidden;
  border: 1px solid var(--hairline-ink);
  border-radius: var(--r-card);
  color: var(--t-on-ink);
  background:
    var(--tex-noise),
    radial-gradient(70% 90% at 88% 12%, rgba(201, 167, 92, 0.15), transparent 58%),
    linear-gradient(158deg, #0c2338, #071827 62%, #050f1a);
  background-size: 160px 160px, auto, auto;
  box-shadow: inset 0 1px 0 rgba(224, 199, 138, 0.16), 0 20px 44px -20px rgba(2, 10, 20, 0.6);
}

.lead-box::after {
  content: "缘";
  position: absolute;
  right: -8px;
  bottom: -34px;
  color: rgba(224, 199, 138, 0.07);
  font-family: var(--font-serif);
  font-size: 9rem;
  line-height: 1;
  pointer-events: none;
}

.lead-contact {
  position: relative;
  z-index: 1;
  max-width: 46ch;
}

.lead-box h3 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.6vw, 1.6rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #f6f1e4;
}

.lead-box p {
  margin: 0 0 18px;
  color: var(--t-on-ink-soft);
  font-size: 0.94rem;
  line-height: 1.85;
}

.lead-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lead-box .line-qr {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  margin: 0;
  text-align: center;
}

.line-qr img {
  display: block;
  width: 108px;
  height: 108px;
  padding: 6px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-cell);
  background: var(--paper-50);
  box-shadow: 0 10px 24px -10px rgba(2, 10, 20, 0.7);
}

.line-qr img:not(.line-qr-working) {
  filter: contrast(1.05);
}

.line-qr figcaption {
  margin-top: 9px;
  color: var(--t-on-ink-faint);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

/* =========================================================================
   趣味测算
   ========================================================================= */
.tools-section {
  padding: clamp(44px, 7vh, 72px) 0 10px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.tool-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 22px 20px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(253, 250, 243, 0.95) 46%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), var(--shadow-lift);
  text-align: left;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.22, 0.68, 0.28, 1), box-shadow 0.22s ease, border-color 0.22s ease;
}

.tool-entry:hover {
  transform: translateY(-3px);
  border-color: var(--hairline-strong);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), var(--shadow-float);
}

.tool-entry-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  color: var(--gold-600);
  background: radial-gradient(circle at 50% 30%, var(--paper-50), var(--paper-200));
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  transition: transform 0.3s ease;
}

.tool-entry:hover .tool-entry-mark {
  transform: rotate(-6deg) scale(1.05);
}

.tool-entry-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.tool-entry-copy strong {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--t-strong);
  letter-spacing: 0.03em;
}

.tool-entry-copy span {
  color: var(--t-soft);
  font-size: 0.86rem;
  line-height: 1.65;
}

.tool-entry-open {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  color: var(--gold-600);
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.tool-entry:hover .tool-entry-open {
  background: rgba(201, 167, 92, 0.12);
}

.tool-panel {
  position: relative;
  margin-top: 20px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(253, 250, 243, 0.96) 42%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), var(--shadow-float);
}

.tool-panel.is-hidden {
  display: none;
}

.tool-panel::before {
  position: absolute;
  right: 22px;
  top: 12px;
  color: rgba(176, 141, 70, 0.14);
  font-family: var(--font-serif);
  font-size: 7rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

#ziwei-panel::before {
  content: "紫";
}

#tarot-panel::before {
  content: "塔";
}

.tool-panel > * {
  position: relative;
  z-index: 1;
}

.tools-section.is-detail-open .tools-grid {
  display: none;
}

.tools-section.is-detail-open .tool-panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 22px max(18px, calc((100vw - 760px) / 2)) 40px;
  background:
    var(--tex-noise),
    radial-gradient(52% 40% at 88% 4%, rgba(201, 167, 92, 0.1), transparent 66%),
    var(--paper-100);
  background-size: 160px 160px, auto, auto;
}

.tool-panel form {
  margin-top: 18px;
}

.tool-panel form .primary-action {
  margin-top: 16px;
}

.oracle-back {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 0 16px;
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
  color: var(--t-soft);
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.86rem;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.oracle-back::before {
  content: "←";
  color: var(--gold-500);
}

.oracle-back:hover {
  color: var(--t-strong);
  border-color: var(--hairline-strong);
}

/* --- 紫微结果 --- */
.ziwei-result,
.tarot-result {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}

.ziwei-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.ziwei-meta > div {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: var(--r-cell);
  background: rgba(255, 253, 248, 0.72);
}

.ziwei-meta span {
  color: var(--t-soft);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

.ziwei-meta strong {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--t-strong);
}

.pattern-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.pattern-chip {
  display: grid;
  gap: 6px;
  padding: 15px 17px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-cell);
  background: rgba(201, 167, 92, 0.06);
}

.pattern-chip strong {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--gold-600);
  letter-spacing: 0.03em;
}

.pattern-chip span {
  color: var(--t-body);
  font-size: 0.9rem;
  line-height: 1.72;
}

.ziwei-palace-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.palace-card {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 13px;
  border: 1px solid var(--rule);
  border-radius: var(--r-cell);
  background: rgba(255, 255, 255, 0.62);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.palace-card:hover {
  border-color: var(--hairline);
}

.palace-card.is-soul {
  border-color: var(--hairline-strong);
  background: linear-gradient(165deg, rgba(201, 167, 92, 0.12), rgba(201, 167, 92, 0.03)), rgba(255, 253, 248, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.palace-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.palace-card-head strong {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--t-strong);
}

.palace-card-head span {
  color: var(--t-faint);
  font-size: 0.8rem;
}

.palace-body-tag {
  justify-self: start;
  padding: 2px 9px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  color: var(--gold-600);
  font-size: 0.72rem;
}

.palace-stars {
  margin: 0;
  color: var(--t-strong);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.55;
}

.palace-minor {
  margin: 0;
  color: var(--t-faint);
  font-size: 0.78rem;
  line-height: 1.55;
}

.key-palace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.key-palace {
  display: grid;
  gap: 5px;
  padding: 13px 15px;
  border: 1px solid var(--rule);
  border-radius: var(--r-cell);
  background: rgba(255, 253, 248, 0.72);
}

.key-palace strong {
  font-size: 0.94rem;
  color: var(--t-strong);
}

.key-palace span {
  color: var(--t-soft);
  font-size: 0.88rem;
  line-height: 1.55;
}

.life-detail {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.life-para {
  display: grid;
  gap: 5px;
  padding: 13px 16px;
  border: 1px solid var(--rule);
  border-radius: var(--r-cell);
  background: rgba(255, 253, 248, 0.72);
}

.life-para strong {
  font-size: 0.92rem;
  color: var(--gold-600);
  letter-spacing: 0.04em;
}

.life-para p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.8;
}

.life-para.is-note {
  background: rgba(10, 30, 46, 0.035);
  border-style: dashed;
}

.mutagen-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.mutagen-card {
  display: grid;
  gap: 7px;
  padding: 13px 16px;
  border: 1px solid var(--rule);
  border-radius: var(--r-cell);
  background: rgba(255, 253, 248, 0.72);
}

.mutagen-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mutagen-tag {
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: rgba(31, 92, 142, 0.1);
  color: var(--indigo-600);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.mutagen-card-head strong {
  font-size: 0.92rem;
  color: var(--t-strong);
}

.mutagen-card p {
  margin: 0;
  color: var(--t-body);
  font-size: 0.86rem;
  line-height: 1.7;
}

/* 四化：禄权科忌（简繁两种类名都要覆盖） */
.mutagen-card.is-禄,
.mutagen-card.is-祿 {
  border-color: rgba(176, 141, 70, 0.5);
  background: rgba(201, 167, 92, 0.08);
}

.mutagen-card.is-禄 .mutagen-tag,
.mutagen-card.is-祿 .mutagen-tag {
  background: rgba(176, 141, 70, 0.16);
  color: var(--gold-600);
}

.mutagen-card.is-权,
.mutagen-card.is-權 {
  border-color: rgba(166, 57, 42, 0.38);
  background: rgba(166, 57, 42, 0.05);
}

.mutagen-card.is-权 .mutagen-tag,
.mutagen-card.is-權 .mutagen-tag {
  background: rgba(166, 57, 42, 0.12);
  color: var(--seal);
}

.mutagen-card.is-科 {
  border-color: rgba(31, 92, 142, 0.4);
  background: rgba(31, 92, 142, 0.05);
}

.mutagen-card.is-忌 {
  border-color: rgba(90, 104, 118, 0.4);
  background: rgba(90, 104, 118, 0.05);
}

.mutagen-card.is-忌 .mutagen-tag {
  background: rgba(90, 104, 118, 0.14);
  color: var(--t-soft);
}

.palace-details {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.palace-detail {
  border: 1px solid var(--rule);
  border-radius: var(--r-cell);
  background: rgba(255, 253, 248, 0.72);
  overflow: hidden;
}

.palace-detail summary {
  padding: 13px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--t-strong);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 9px;
  transition: background 0.18s ease;
}

.palace-detail summary::-webkit-details-marker {
  display: none;
}

.palace-detail summary::before {
  content: "◆";
  color: var(--gold-500);
  font-size: 0.6rem;
  transition: transform 0.2s ease;
}

.palace-detail[open] summary::before {
  transform: rotate(90deg);
}

.palace-detail summary:hover {
  background: rgba(201, 167, 92, 0.05);
}

.palace-detail-body {
  display: grid;
  gap: 10px;
  padding: 4px 16px 16px;
  border-top: 1px dashed var(--rule);
  padding-top: 13px;
}

/* --- 塔罗 --- */
.tarot-cards {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.tarot-cards:has(.tarot-card:nth-child(2)) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tarot-card {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 20px 17px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: linear-gradient(172deg, rgba(255, 255, 255, 0.8), rgba(250, 246, 236, 0.65) 58%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), var(--shadow-lift);
}

.tarot-card.is-reversed {
  border-style: dashed;
  background: linear-gradient(188deg, rgba(240, 233, 217, 0.8), rgba(250, 246, 236, 0.65) 58%);
}

.tarot-card-no {
  justify-self: start;
  padding: 3px 11px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  color: var(--gold-600);
  font-family: var(--font-latin);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.tarot-card strong {
  font-family: var(--font-serif);
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--t-strong);
}

.tarot-card-position {
  color: var(--t-faint);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.tarot-card-keywords {
  margin: 0;
  color: var(--indigo-600);
  font-size: 0.88rem;
  line-height: 1.65;
}

.tarot-card-symbol,
.tarot-card-detail,
.tarot-card-domain,
.tarot-card-advice {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.75;
}

.tarot-card-symbol {
  color: var(--t-soft);
  border-left: 2px solid var(--hairline);
  padding-left: 11px;
}

.tarot-card-detail {
  color: var(--t-body);
  font-size: 0.9rem;
}

.tarot-card-domain {
  color: var(--t-body);
  background: rgba(10, 30, 46, 0.035);
  border-radius: var(--r-cell);
  padding: 9px 12px;
}

.tarot-card-advice {
  color: var(--gold-600);
  font-weight: 500;
}

.tarot-card-img {
  width: 100%;
  max-width: 172px;
  justify-self: center;
  border: 1px solid var(--hairline);
  border-radius: var(--r-cell);
  box-shadow: 0 12px 26px -12px rgba(7, 24, 39, 0.45);
  transition: transform 0.3s ease;
}

.tarot-card-img.is-flipped {
  transform: rotate(180deg);
}

.tools-disclaimer {
  margin-top: 16px;
  color: var(--t-faint);
  font-size: 0.8rem;
}

.lead-actions .tools-disclaimer {
  flex-basis: 100%;
}

/* =========================================================================
   灵签 · 墨面仪式
   ========================================================================= */
.oracle-section {
  padding: clamp(48px, 8vh, 84px) 0 clamp(48px, 8vh, 84px);
}

.oracle-section .section-head h2 {
  color: #f6f1e4;
}

.oracle-section .section-head p {
  color: var(--t-on-ink-soft);
}

.oracle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.oracle-card {
  position: relative;
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--hairline-ink);
  border-radius: var(--r-card);
  overflow: hidden;
  color: var(--t-on-ink);
  background: var(--ink-850);
  cursor: pointer;
  text-align: left;
  transition: transform 0.24s cubic-bezier(0.22, 0.68, 0.28, 1), border-color 0.24s ease, box-shadow 0.24s ease;
}

.oracle-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(178deg, rgba(7, 24, 39, 0.1) 22%, rgba(7, 24, 39, 0.86) 74%),
    linear-gradient(115deg, rgba(12, 35, 56, 0.55), rgba(12, 35, 56, 0) 46%),
    var(--oracle-card-image);
  background-position: center, center, var(--oracle-card-pos, 50% 32%);
  background-size: cover, cover, cover;
  background-repeat: no-repeat;
  filter: saturate(0.82) contrast(1.04);
  transition: transform 0.4s ease, filter 0.3s ease;
}

.oracle-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(224, 199, 138, 0.12);
  border-radius: inherit;
  pointer-events: none;
}

.oracle-card:hover {
  transform: translateY(-3px);
  border-color: rgba(224, 199, 138, 0.5);
  box-shadow: 0 18px 40px -18px rgba(2, 10, 20, 0.8);
}

.oracle-card:hover::before {
  transform: scale(1.04);
  filter: saturate(1) contrast(1.06);
}

.oracle-card strong {
  position: relative;
  z-index: 1;
  font-family: var(--font-serif);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #f6f1e4;
  text-shadow: 0 2px 12px rgba(2, 10, 20, 0.8);
}

.oracle-card span {
  position: relative;
  z-index: 1;
  color: rgba(237, 242, 247, 0.72);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}

.oracle-card.is-active {
  border-color: var(--gold-400);
  box-shadow:
    inset 0 0 0 1px rgba(224, 199, 138, 0.28),
    0 18px 40px -18px rgba(2, 10, 20, 0.8);
}

.oracle-card.is-active::after {
  border-color: rgba(224, 199, 138, 0.4);
}

body.oracle-open {
  overflow: hidden;
}

.oracle-panel {
  position: relative;
  margin-top: 20px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--hairline-ink);
  border-radius: var(--r-card);
  background: rgba(7, 24, 39, 0.5);
  box-shadow: inset 0 1px 0 rgba(224, 199, 138, 0.1);
}

.oracle-section.is-detail-open .oracle-panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: block;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  padding: 22px max(18px, calc((100vw - 760px) / 2)) 40px;
  background:
    var(--tex-noise),
    radial-gradient(52% 40% at 88% 4%, rgba(201, 167, 92, 0.1), transparent 66%),
    linear-gradient(164deg, var(--ink-850), var(--ink-900) 56%, var(--ink-950));
  background-size: 160px 160px, auto, auto;
}

.oracle-section.is-detail-open .oracle-back {
  border-color: rgba(224, 199, 138, 0.3);
  color: var(--t-on-ink-soft);
  background: rgba(7, 24, 39, 0.5);
}

.oracle-section.is-detail-open .oracle-back:hover {
  color: var(--gold-300);
  border-color: rgba(224, 199, 138, 0.55);
}

.oracle-hero-image {
  width: 100%;
  max-width: min(100%, 470px);
  height: clamp(340px, 46vw, 620px);
  margin: 0 auto 26px;
  border: 1px solid var(--hairline-ink);
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--ink-850);
  box-shadow: 0 24px 52px -22px rgba(2, 10, 20, 0.8);
}

.oracle-section.is-detail-open .oracle-hero-image {
  max-width: min(100%, 560px);
  height: clamp(380px, 50vw, 660px);
}

.oracle-hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.oracle-ritual {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.ritual-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--r-cell);
  border: 1px solid rgba(224, 199, 138, 0.36);
  color: var(--gold-300);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.08), transparent 46%),
    linear-gradient(165deg, var(--seal), var(--seal-deep));
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
}

.oracle-ritual h3 {
  margin: 0 0 5px;
  font-family: var(--font-serif);
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f6f1e4;
}

.oracle-ritual p {
  margin: 0;
  color: var(--t-on-ink-soft);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* --- 筊杯 --- */
.cup-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
  perspective: 900px;
}

.cup-row span {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px dashed rgba(224, 199, 138, 0.26);
  border-radius: var(--r-cell);
  color: var(--t-on-ink-faint);
  background: rgba(7, 24, 39, 0.4);
  font-size: 0.88rem;
}

.cup-row span::before {
  content: "";
  width: 22px;
  height: 13px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 18px 18px;
  opacity: 0.55;
}

/* --- 抽签按钮 --- */
.oracle-draw {
  position: relative;
  width: 100%;
  margin-bottom: 14px;
  padding-left: 52px;
}

.oracle-draw::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 50%;
  width: 12px;
  height: 28px;
  border-radius: 6px 6px 3px 3px;
  background: rgba(224, 199, 138, 0.75);
  box-shadow:
    5px -5px 0 -2px rgba(224, 199, 138, 0.75),
    -5px -3px 0 -2px rgba(224, 199, 138, 0.75);
  transform: translateY(-50%) rotate(-8deg);
}

.oracle-status {
  margin: 0;
  color: var(--t-on-ink-soft);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* --- 签文揭晓：墨中亮纸 --- */
.oracle-result {
  margin-top: 22px;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  color: var(--t-body);
  background:
    var(--tex-noise),
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(253, 250, 243, 0.98) 42%);
  background-size: 160px 160px, auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 24px 52px -20px rgba(2, 10, 20, 0.6);
}

.oracle-result .result-kicker {
  color: var(--gold-600);
}

.oracle-result h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.03em;
  color: var(--t-strong);
}

.oracle-poem {
  margin: 18px 0;
  padding: 16px 20px;
  border-left: 2px solid var(--gold-500);
  background: rgba(201, 167, 92, 0.07);
  color: var(--t-strong);
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 2;
  letter-spacing: 0.05em;
}

.oracle-plain-label {
  margin: 20px 0 7px;
  color: var(--gold-600);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
}

.oracle-plain {
  margin: 0 0 14px;
  color: var(--t-strong);
  line-height: 1.92;
}

.oracle-result > p:not(.oracle-poem):not(.oracle-plain):not(.oracle-plain-label) {
  color: var(--t-body);
  line-height: 1.9;
}

.oracle-result .lead-actions a,
.oracle-result .lead-actions button {
  min-height: 46px;
}

/* =========================================================================
   易经抽签
   ========================================================================= */
.yijing-section {
  padding: clamp(40px, 7vh, 72px) 0 clamp(52px, 8vh, 88px);
}

.yijing-section .section-head h2 {
  color: #f6f1e4;
}

.yijing-section .section-head p {
  color: var(--t-on-ink-soft);
}

.yijing-entry {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 30px;
  padding: 22px 24px;
  border: 1px solid var(--hairline-ink);
  border-radius: var(--r-card);
  background: rgba(7, 24, 39, 0.5);
  text-align: left;
  cursor: pointer;
  transition: transform 0.24s cubic-bezier(0.22, 0.68, 0.28, 1), border-color 0.24s ease;
}

.yijing-entry:hover {
  transform: translateY(-3px);
  border-color: rgba(224, 199, 138, 0.5);
}

.yijing-entry-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(224, 199, 138, 0.36);
  border-radius: 50%;
  color: var(--gold-300);
  background: rgba(201, 167, 92, 0.08);
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
}

.yijing-entry-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.yijing-entry-copy strong {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f6f1e4;
}

.yijing-entry-copy span {
  color: var(--t-on-ink-faint);
  font-size: 0.88rem;
  line-height: 1.65;
}

.yijing-entry-open {
  padding: 9px 16px;
  border: 1px solid rgba(224, 199, 138, 0.4);
  border-radius: var(--r-pill);
  color: var(--gold-300);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.yijing-panel {
  position: relative;
  display: none;
  margin-top: 20px;
  padding: clamp(22px, 3vw, 34px);
  overflow: hidden;
  border: 1px solid var(--hairline-ink);
  border-radius: var(--r-card);
  background: rgba(7, 24, 39, 0.5);
}

.yijing-panel::before {
  content: "易";
  position: absolute;
  right: 18px;
  top: 6px;
  color: rgba(224, 199, 138, 0.06);
  font-family: var(--font-serif);
  font-size: 8rem;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.yijing-panel > * {
  position: relative;
  z-index: 1;
}

.yijing-section.is-detail-open .yijing-entry {
  display: none;
}

.yijing-section.is-detail-open .yijing-panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: block;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  padding: 22px max(18px, calc((100vw - 760px) / 2)) 40px;
  background:
    var(--tex-noise),
    radial-gradient(52% 40% at 88% 4%, rgba(201, 167, 92, 0.1), transparent 66%),
    linear-gradient(164deg, var(--ink-850), var(--ink-900) 56%, var(--ink-950));
  background-size: 160px 160px, auto, auto;
}

body.yijing-open {
  overflow: hidden;
}

.yijing-oracle-visual {
  display: grid;
  place-items: center;
  height: min(46vw, 280px);
  margin: 6px 0 4px;
  overflow: hidden;
  transition: height 0.5s ease, opacity 0.5s ease, margin 0.5s ease;
}

.yijing-oracle-video {
  width: min(74vw, 300px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  pointer-events: none;
  opacity: 0.7;
  mix-blend-mode: screen;
  filter: sepia(0.5) saturate(1.5) hue-rotate(-16deg) brightness(1.02);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 55%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 50%, #000 55%, transparent 72%);
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.yijing-panel.is-drawing .yijing-oracle-video {
  transform: scale(1.16);
  opacity: 0.95;
  animation: yijing-oracle-pulse 1.6s ease-in-out infinite;
}

@keyframes yijing-oracle-pulse {
  0%,
  100% {
    filter: sepia(0.5) saturate(1.5) hue-rotate(-16deg) brightness(1.02) drop-shadow(0 0 0 rgba(201, 167, 92, 0));
  }

  50% {
    filter: sepia(0.5) saturate(1.5) hue-rotate(-16deg) brightness(1.02) drop-shadow(0 0 20px rgba(201, 167, 92, 0.45));
  }
}

.yijing-panel.is-revealed .yijing-oracle-visual {
  height: 0;
  margin: 0;
  opacity: 0;
}

.yijing-result {
  margin-top: 22px;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  color: var(--t-body);
  background:
    var(--tex-noise),
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(253, 250, 243, 0.98) 42%);
  background-size: 160px 160px, auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 24px 52px -20px rgba(2, 10, 20, 0.6);
}

.yijing-result .result-kicker {
  color: var(--gold-600);
}

.yijing-result h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.03em;
  color: var(--t-strong);
}

.yijing-result-top {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 8px 0 4px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}

.yijing-symbol {
  width: 112px;
  flex: 0 0 auto;
  display: grid;
  gap: 6px;
}

.yijing-result-nature {
  margin: 0;
  color: var(--t-body);
  font-size: 0.94rem;
  line-height: 1.85;
}

.yijing-result.is-drawing #yijing-symbol {
  opacity: 0.35;
}

/* --- 卦象阅读（时间卦 / 易经共用） --- */
.gua-reading {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.gua-reading > div {
  padding-top: 16px;
  border-top: 1px solid var(--rule-soft);
}

.gua-reading h3 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--t-strong);
}

.gua-reading h3::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 10px;
  transform: rotate(45deg) translateY(-1px);
  background: var(--gold-500);
}

.gua-reading p {
  margin: 0;
  color: var(--t-body);
  line-height: 1.88;
}

.gua-classic {
  font-family: var(--font-serif);
  font-size: 1.04rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.92;
  color: var(--t-strong);
}

.gua-note {
  margin-top: 9px;
  padding-left: 12px;
  border-left: 2px solid var(--hairline);
  color: var(--t-soft);
  font-size: 0.9rem;
}

.gua-reading .time-gua-overview {
  grid-column: 1 / -1;
}

.gua-reading .time-gua-overview p {
  font-size: 0.96rem;
  color: var(--t-body);
}

/* --- 爻画 --- */
.yao {
  min-height: 10px;
  display: flex;
  justify-content: center;
  gap: 7px;
}

.yao i {
  display: block;
  height: 10px;
  border-radius: 1px;
}

.yao.yang i {
  width: 100%;
  background: linear-gradient(180deg, var(--gold-400), var(--gold-600));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.yao.yin i {
  width: calc(50% - 4px);
  background: linear-gradient(180deg, var(--gold-400), var(--gold-600));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.yijing-symbol .yao i {
  height: 11px;
}

/* =========================================================================
   时间卦
   ========================================================================= */
.time-gua-section {
  padding: clamp(44px, 7vh, 72px) 0 20px;
}

.time-gua-card {
  margin-top: 30px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(253, 250, 243, 0.96) 42%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), var(--shadow-lift);
  overflow: hidden;
}

.time-gua-summary {
  width: 100%;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
}

.time-gua-summary:hover {
  background: rgba(201, 167, 92, 0.05);
}

.time-gua-symbol {
  width: 96px;
  display: grid;
  gap: 5px;
}

.time-gua-summary-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.time-gua-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-600);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--seal);
  box-shadow: 0 0 0 0 rgba(166, 57, 42, 0.5);
  animation: live-pulse 2.2s ease-out infinite;
}

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(166, 57, 42, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(166, 57, 42, 0); }
  100% { box-shadow: 0 0 0 0 rgba(166, 57, 42, 0); }
}

.time-gua-summary-copy strong {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--t-strong);
}

.time-gua-summary-copy > span:last-child {
  color: var(--t-soft);
  font-size: 0.88rem;
}

.time-gua-open {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  color: var(--gold-600);
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.88rem;
  white-space: nowrap;
}

.time-gua-open::after {
  content: "↓";
  margin-left: 8px;
  color: var(--gold-500);
}

.time-gua-details {
  padding: 0 24px 26px;
  border-top: 1px solid var(--rule-soft);
}

.time-gua-meta {
  display: grid;
  grid-template-columns: 2fr repeat(3, minmax(100px, 1fr));
  gap: 10px;
  padding: 20px 0;
}

.time-gua-meta > div,
.gua-detail-block {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--rule);
  border-radius: var(--r-cell);
  background: rgba(255, 253, 248, 0.8);
}

.time-gua-meta span,
.gua-detail-block > span {
  display: block;
  margin-bottom: 6px;
  color: var(--t-soft);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
}

.time-gua-meta strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 1rem;
  font-weight: 600;
  color: var(--t-strong);
}

.time-gua-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.gua-detail-block {
  background: #fffdf8;
}

.gua-detail-block.changed {
  border-color: var(--hairline-strong);
  background: rgba(201, 167, 92, 0.07);
}

.gua-detail-block strong {
  display: block;
  margin-bottom: 5px;
  font-family: var(--font-serif);
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--t-strong);
  letter-spacing: 0.05em;
}

.gua-detail-block p {
  margin: 0;
  color: var(--t-soft);
  font-size: 0.86rem;
  line-height: 1.6;
}

.gua-detail-arrow {
  color: var(--gold-500);
  font-size: 1.6rem;
  text-align: center;
}

.time-gua-calculation {
  margin: 20px 0 0;
  color: var(--t-faint);
  font-size: 0.82rem;
  line-height: 1.65;
}

.time-gua-refresh {
  margin-top: 14px;
}

/* =========================================================================
   页脚
   ========================================================================= */
.site-footer {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: clamp(40px, 7vh, 70px);
  padding: 34px max(18px, calc((100vw - 1120px) / 2)) 40px;
  color: var(--t-on-ink-faint);
  font-size: 0.86rem;
  line-height: 1.8;
  border-top: 1px solid rgba(224, 199, 138, 0.16);
  background: linear-gradient(180deg, var(--ink-900), var(--ink-950));
}

.site-footer p {
  margin: 0 0 6px;
  max-width: 72ch;
}

/* =========================================================================
   移动端悬浮 CTA
   ========================================================================= */
.ink-cta-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: none;
  gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(7, 24, 39, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(224, 199, 138, 0.2);
  transform: translateY(110%);
  transition: transform 0.34s cubic-bezier(0.22, 0.68, 0.28, 1);
}

.ink-cta-bar.is-visible {
  transform: translateY(0);
}

.ink-cta-bar a {
  flex: 1;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.ink-cta-bar .ink-cta-wa {
  background: linear-gradient(180deg, #1f9e57, #11713c);
}

.ink-cta-bar .ink-cta-line {
  background: linear-gradient(180deg, #0ec257, #039e46);
}

/* =========================================================================
   滚动显现
   ========================================================================= */
html.ink-js .ink-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.22, 0.68, 0.28, 1), transform 0.7s cubic-bezier(0.22, 0.68, 0.28, 1);
  transition-delay: var(--d, 0s);
}

html.ink-js .ink-reveal.is-in {
  opacity: 1;
  transform: none;
}

/* =========================================================================
   响应式
   ========================================================================= */
@media (max-width: 1100px) {
  .hero-stage {
    width: min(56vw, 480px);
    right: -50px;
    opacity: 0.9;
  }
}

@media (max-width: 900px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }

  .ziwei-palace-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pattern-chips {
    grid-template-columns: 1fr;
  }

  .ink-steps {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    right: -90px;
    width: 74vw;
    opacity: 0.5;
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100% - 28px, 680px);
  }

  .hero,
  .oracle-section,
  .yijing-section {
    padding-inline: max(14px, calc((100vw - 680px) / 2));
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 22px;
    padding-bottom: 34px;
  }

  .hero-copy {
    min-height: 0;
    padding: 30px 24px 32px;
  }

  .hero-stage {
    right: -70px;
    top: -6%;
    width: 76vw;
    opacity: 0.4;
    transform: none;
  }

  h1 {
    max-width: none;
  }

  .hero-trust {
    gap: 8px 16px;
  }

  .oracle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-section,
  .tools-section,
  .time-gua-section {
    padding-top: 40px;
  }

  .time-gua-summary {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .time-gua-symbol {
    width: 80px;
  }

  .time-gua-symbol .yao.yang i {
    width: 80px;
  }

  .time-gua-symbol .yao.yin i {
    width: 36px;
  }

  .time-gua-open {
    grid-column: 2;
    justify-self: start;
  }

  .time-gua-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer {
    padding-bottom: 96px;
  }
}

@media (max-width: 620px) {
  .ziwei-palace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ziwei-meta {
    grid-template-columns: 1fr;
  }

  .key-palace-grid {
    grid-template-columns: 1fr;
  }

  .tarot-cards:has(.tarot-card:nth-child(2)) {
    grid-template-columns: 1fr;
  }

  .mutagen-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 22px, 460px);
  }

  .hero,
  .oracle-section,
  .yijing-section {
    padding-inline: max(12px, calc((100vw - 460px) / 2));
  }

  .hero-copy,
  .calculator,
  .result-card,
  .tool-panel,
  .oracle-panel,
  .yijing-panel {
    padding: 22px 18px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .gua-row,
  .bazi-block {
    grid-template-columns: 1fr 1fr;
  }

  .bazi-block {
    gap: 8px;
  }

  .oracle-grid {
    grid-template-columns: 1fr;
  }

  .oracle-card {
    min-height: 124px;
  }

  .cup-row {
    grid-template-columns: 1fr;
  }

  .cup-row span {
    min-height: 52px;
  }

  .result-head,
  .lead-box,
  .element-head {
    flex-direction: column;
    align-items: stretch;
  }

  .lead-box {
    gap: 20px;
  }

  .lead-box .line-qr {
    align-self: center;
  }

  .lead-actions {
    flex-direction: column;
  }

  .lead-actions a,
  .lead-actions button,
  .hero-contact-buttons a {
    width: 100%;
  }

  .yijing-entry {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .yijing-entry-open {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .time-gua-summary {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px 18px;
  }

  .time-gua-symbol {
    justify-self: center;
  }

  .time-gua-open {
    grid-column: auto;
    justify-self: stretch;
    justify-content: center;
  }

  .time-gua-details {
    padding: 0 18px 20px;
  }

  .time-gua-meta,
  .time-gua-pair,
  .gua-reading {
    grid-template-columns: 1fr;
  }

  .gua-detail-arrow {
    transform: rotate(90deg);
  }

  .oracle-hero-image {
    height: clamp(300px, 118vw, 520px);
  }

  .magnetic-code {
    min-width: 54px;
    min-height: 54px;
    font-size: 0.95rem;
  }

  .ink-cta-bar {
    display: flex;
  }
}

/* 平板以下才显示悬浮 CTA */
@media (min-width: 561px) {
  .ink-cta-bar {
    display: none !important;
  }
}

/* =========================================================================
   动效保护
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-bagua-video,
  .brand-taiji-rotor,
  .brand-coin,
  .hero-ring,
  .live-dot,
  body::before,
  body::after {
    animation: none !important;
  }

  .hero-bagua-video {
    transform: none;
    opacity: 0.5;
  }

  .magnetic-code,
  .element-meter span,
  .oracle-result:not(.is-hidden),
  .oracle-status.is-pulsing,
  .oracle-draw.is-throwing::before {
    animation: none !important;
  }

  .cup-row::after,
  .cup-row span,
  .cup-row span::before,
  .cup-row span::after {
    animation: none !important;
  }

  .cup-row.is-tossing span:not(.is-tossing) {
    opacity: 1;
  }

  .yijing-panel.is-drawing .yijing-oracle-video {
    animation: none;
  }

  html.ink-js .ink-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* 灵签揭晓动效 */
.oracle-result:not(.is-hidden) {
  animation: oracle-result-in 0.62s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

@keyframes oracle-result-in {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.oracle-status.is-pulsing {
  animation: cup-status-pulse 0.72s ease-out both;
}

@keyframes cup-status-pulse {
  0% {
    opacity: 0.15;
    transform: translateY(5px);
  }

  55% {
    opacity: 1;
    transform: translateY(0);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.oracle-draw.is-throwing::before {
  animation: cup-tube-shake 0.52s ease-in-out;
}

@keyframes cup-tube-shake {
  0%,
  100% {
    transform: translateY(-50%) rotate(-8deg);
  }

  25% {
    transform: translateY(-50%) rotate(-24deg);
  }

  50% {
    transform: translateY(-50%) rotate(5deg);
  }

  75% {
    transform: translateY(-50%) rotate(-15deg);
  }
}

/* ===== 掷杯完整动效（沿用原机制，按新配色重制） ===== */
.cup-row.is-tossing span:not(.is-tossing) {
  opacity: 0.6;
}

.cup-row.is-tossing {
  animation: cup-row-impact 0.44s cubic-bezier(0.36, 0.07, 0.19, 0.97) 0.3s both;
}

@keyframes cup-row-impact {
  0%,
  100% {
    transform: translate(0, 0);
  }

  22% {
    transform: translate(-3px, 1px);
  }

  46% {
    transform: translate(3px, -1px);
  }

  68% {
    transform: translate(-2px, 1px);
  }

  86% {
    transform: translate(1px, 0);
  }
}

.cup-row span.is-tossing {
  animation: cup-slot-receive 0.78s cubic-bezier(0.3, 0.85, 0.4, 1) both;
}

.cup-row span.is-tossing::before {
  opacity: 1;
  transform-origin: 50% 50%;
  animation: cup-toss 0.78s cubic-bezier(0.34, 0.9, 0.4, 1) both;
}

.cup-row span.is-tossing::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 34px;
  height: 9px;
  margin-left: -17px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, rgba(201, 167, 92, 0.5), rgba(201, 167, 92, 0.14) 55%, transparent 78%);
  animation: cup-impact-dust 0.78s ease-out both;
}

@keyframes cup-toss {
  0% {
    transform: translate(-32px, -54px) rotate(-215deg) scale(0.84);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  34% {
    transform: translate(-9px, -13px) rotate(-96deg) scale(0.94, 1.06);
  }

  46% {
    transform: translate(0, 11px) rotate(5deg) scale(1.18, 0.72);
  }

  56% {
    transform: translate(0, -18px) rotate(-12deg) scale(0.93, 1.13);
  }

  68% {
    transform: translate(0, 6px) rotate(7deg) scale(1.09, 0.89);
  }

  79% {
    transform: translate(0, -9px) rotate(-4deg) scale(0.98, 1.05);
  }

  89% {
    transform: translate(0, 2px) rotate(2deg) scale(1.02, 0.98);
  }

  100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
    opacity: 1;
  }
}

@keyframes cup-slot-receive {
  0%,
  40% {
    transform: translateY(-7px) scale(0.98);
  }

  48% {
    transform: translateY(4px) scale(1.032);
  }

  58% {
    transform: translateY(-2px) scale(1.006);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes cup-impact-dust {
  0%,
  42% {
    opacity: 0;
    transform: scale(0.3, 0.4);
  }

  50% {
    opacity: 0.95;
    transform: scale(1.2, 1.15);
  }

  70% {
    opacity: 0.5;
    transform: scale(1.85, 0.82);
  }

  100% {
    opacity: 0;
    transform: scale(2.5, 0.5);
  }
}

/* 圣杯落定：鎏金 */
.cup-row span.is-sheng {
  color: #fdfaf3;
  border-color: rgba(201, 167, 92, 0.85);
  background: linear-gradient(180deg, #c9a75c, #a9812f 62%, #8d6c2d);
  animation:
    cup-sheng-land 0.72s cubic-bezier(0.2, 0.8, 0.3, 1) both,
    cup-sheng-halo 2.4s ease-out 0.5s infinite;
}

.cup-row span.is-sheng::before {
  content: "";
  display: block;
  width: 26px;
  height: 15px;
  border: 2px solid rgba(253, 250, 243, 0.94);
  border-top: 0;
  border-radius: 0 0 20px 20px;
  opacity: 1;
  animation: none;
  transform: translateY(-1px);
  filter: drop-shadow(0 0 6px rgba(255, 250, 235, 0.55));
}

.cup-row span.is-sheng::after {
  content: "圣";
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  color: #7c5a1c;
  background: radial-gradient(circle at 50% 32%, #fffdf6, #efe3c0 72%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(90, 66, 18, 0.32);
  animation: cup-seal-pop 0.52s cubic-bezier(0.2, 0.9, 0.3, 1.35) 0.1s both;
}

@keyframes cup-sheng-land {
  0% { transform: scale(0.94); }
  38% { transform: scale(1.05); }
  68% { transform: scale(0.992); }
  100% { transform: scale(1); }
}

@keyframes cup-sheng-halo {
  0% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.36),
      0 0 0 0 rgba(201, 167, 92, 0.55),
      0 12px 26px rgba(124, 90, 28, 0.32);
  }

  72% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.36),
      0 0 0 17px rgba(201, 167, 92, 0),
      0 12px 26px rgba(124, 90, 28, 0.32);
  }

  100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.36),
      0 0 0 0 rgba(201, 167, 92, 0),
      0 12px 26px rgba(124, 90, 28, 0.32);
  }
}

@keyframes cup-seal-pop {
  0% {
    transform: scale(0.2) rotate(-30deg);
    opacity: 0;
  }

  62% {
    transform: scale(1.18) rotate(7deg);
    opacity: 1;
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* 笑杯：翻面摇晃 */
.cup-row span.is-xiao {
  color: #5d4a2a;
  border-color: rgba(141, 108, 45, 0.6);
  background: linear-gradient(180deg, #f7f2e7, #e4d8c1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 10px 22px rgba(120, 92, 36, 0.18);
  animation: cup-xiao-shake 0.62s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.cup-row span.is-xiao::before {
  content: "";
  display: block;
  width: 26px;
  height: 15px;
  border: 2px solid rgba(120, 92, 36, 0.85);
  border-top: 0;
  border-radius: 0 0 20px 20px;
  opacity: 1;
  animation: none;
  transform-origin: 50% 50%;
  transform: rotate(180deg);
}

.cup-row span.is-xiao::after {
  content: "笑";
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  color: #6b5322;
  background: radial-gradient(circle at 50% 32%, #fdfaf3, #e0c78a 74%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(94, 70, 22, 0.26);
  animation: cup-seal-pop 0.52s cubic-bezier(0.2, 0.9, 0.3, 1.35) 0.1s both;
}

@keyframes cup-xiao-shake {
  0% {
    transform: translateX(0) scale(0.95);
  }

  18% {
    transform: translateX(-7px) rotate(-1.6deg) scale(1);
  }

  36% {
    transform: translateX(6px) rotate(1.6deg) scale(1.012);
  }

  54% {
    transform: translateX(-5px) rotate(-1.1deg) scale(1);
  }

  74% {
    transform: translateX(4px) rotate(0.7deg);
  }

  100% {
    transform: translateX(0) rotate(0) scale(1);
  }
}

/* 三杯功成 */
.cup-row.is-complete span {
  animation: cup-complete-wave 0.9s cubic-bezier(0.3, 0.8, 0.3, 1) both;
}

.cup-row.is-complete span:nth-child(2) {
  animation-delay: 0.11s;
}

.cup-row.is-complete span:nth-child(3) {
  animation-delay: 0.22s;
}

@keyframes cup-complete-wave {
  0% {
    transform: translateY(0) scale(1);
  }

  34% {
    transform: translateY(-9px) scale(1.07);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.4),
      0 0 0 11px rgba(201, 167, 92, 0.2),
      0 20px 34px rgba(124, 90, 28, 0.3);
  }

  68% {
    transform: translateY(2px) scale(0.988);
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

.cup-row::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 12px;
  border: 1px solid rgba(201, 167, 92, 0.55);
  opacity: 0;
  pointer-events: none;
}

.cup-row.is-complete::after {
  animation: cup-row-burst 1s ease-out both;
}

@keyframes cup-row-burst {
  0% {
    opacity: 0.95;
    transform: scale(0.965);
    box-shadow: inset 0 0 0 0 rgba(201, 167, 92, 0.4);
  }

  100% {
    opacity: 0;
    transform: scale(1.045);
    box-shadow: inset 0 0 0 26px rgba(201, 167, 92, 0);
  }
}

.primary-action:disabled {
  box-shadow:
    inset 0 0 0 1px rgba(201, 167, 92, 0.3),
    0 8px 18px -8px rgba(10, 30, 46, 0.5);
}

/* ===== ink2.css ===== */
/* =========================================================================
   ink2.css —— 第二轮修订层 · 2026-09-30（r3：灵签区块还原旧版紧凑卡片）
   于 styles.css 之后加载，只做增量覆盖，不改动原文件。

   本轮解决（用户反馈）：
   1) 主页六大灵签恢复旧版样式：浅色区块 + 横向紧凑卡片（左文右小图）
      —— 挂轴大卡弃用（太大、hover 缩放让人觉得卡）
   2) 保留前一轮成果：
      · 灵签面板默认隐藏，点卡片后二级窗口打开
      · 圣杯单杯舞台（一次只显示一支筊杯 + 三枚进度点）
      · 首屏 / 易经区块的祥云、星点、点击金涟漪
      · 详情神像画轴装裱
   ========================================================================= */

/* ---------------------------------------------------------------------
   0) 公共：暗面区块的层级基础（让装饰伪元素垫在内容之下）
   --------------------------------------------------------------------- */
.hero > *:not(.hero-stage):not(.hero-frame) {
  position: relative;
  z-index: 2;
}

.yijing-section > .section-head,
.yijing-section > .yijing-entry {
  position: relative;
  z-index: 2;
}

/* ---------------------------------------------------------------------
   1) 背景炫酷化（仅 hero / yijing；灵签区块已还原浅色，不再加暗面装饰）
   --------------------------------------------------------------------- */
.hero::before {
  content: "";
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: -12%;
  height: 78%;
  z-index: 0;
  pointer-events: none;
  background: url("assets/ink-clouds.webp") center 62% / cover no-repeat;
  opacity: 0.42;
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.55) 42%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.55) 42%, #000 100%);
  animation: ink-cloud-drift 64s ease-in-out infinite alternate;
  will-change: transform;
}

.yijing-section::before {
  content: "";
  position: absolute;
  right: -8%;
  top: -6%;
  width: 62%;
  height: 58%;
  z-index: 0;
  pointer-events: none;
  background: url("assets/ink-clouds.webp") center / cover no-repeat;
  opacity: 0.2;
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(72% 72% at 62% 38%, #000 0%, transparent 76%);
  mask-image: radial-gradient(72% 72% at 62% 38%, #000 0%, transparent 76%);
  animation: ink-cloud-drift 88s ease-in-out infinite alternate-reverse;
}

.hero::after,
.yijing-section::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 18%, rgba(239, 227, 192, 0.9), transparent 100%),
    radial-gradient(1.2px 1.2px at 28% 62%, rgba(224, 199, 138, 0.75), transparent 100%),
    radial-gradient(1.8px 1.8px at 46% 28%, rgba(239, 227, 192, 0.65), transparent 100%),
    radial-gradient(1.1px 1.1px at 64% 76%, rgba(224, 199, 138, 0.7), transparent 100%),
    radial-gradient(1.7px 1.7px at 78% 34%, rgba(239, 227, 192, 0.8), transparent 100%),
    radial-gradient(1.3px 1.3px at 88% 68%, rgba(224, 199, 138, 0.6), transparent 100%),
    radial-gradient(1.4px 1.4px at 8% 84%, rgba(239, 227, 192, 0.55), transparent 100%),
    radial-gradient(1.5px 1.5px at 56% 8%, rgba(224, 199, 138, 0.7), transparent 100%),
    radial-gradient(1.2px 1.2px at 36% 90%, rgba(239, 227, 192, 0.5), transparent 100%),
    radial-gradient(1.9px 1.9px at 94% 14%, rgba(239, 227, 192, 0.7), transparent 100%);
  background-repeat: no-repeat;
  opacity: 0.5;
  animation: ink-star-twinkle 7s ease-in-out infinite;
}

.yijing-section::after {
  opacity: 0.34;
  animation-delay: -3.4s;
}

@keyframes ink-star-twinkle {
  0%, 100% { opacity: 0.28; }
  42% { opacity: 0.62; }
  68% { opacity: 0.4; }
}

@keyframes ink-cloud-drift {
  0% { transform: translate3d(-1.6%, 0.6%, 0) scale(1.02); }
  100% { transform: translate3d(1.8%, -1%, 0) scale(1.06); }
}

/* ---------------------------------------------------------------------
   2) 灵签区块：还原旧版浅色（退出暗面通栏）
   --------------------------------------------------------------------- */
.oracle-section {
  width: auto;
  margin-left: 0;
  margin: 10px 0 52px;
  padding-inline: 0;
  padding-top: 8px;
  overflow: visible;
  color: var(--t-body);
  background: none;
  background-image: none;
}

/* 卸掉暗面装饰 */
.oracle-section::before,
.oracle-section::after {
  content: none;
  animation: none;
}

.oracle-section .ink-sweep {
  display: none;
}

.oracle-section .section-head h2 {
  color: var(--t-strong);
}

.oracle-section .section-head p {
  color: var(--t-soft);
}

.oracle-section .eyebrow.dark {
  color: #7d5e22;
}

.oracle-section .eyebrow.dark::before {
  background: var(--gold-500);
}

/* ---------------------------------------------------------------------
   3) 灵签卡：旧版横向紧凑卡片（左文右小图）
   --------------------------------------------------------------------- */
.oracle-section .oracle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.oracle-section .oracle-card {
  aspect-ratio: auto;
  position: relative;
  min-height: 128px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 20px 136px 20px 18px;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  color: var(--t-strong);
  text-align: left;
  cursor: pointer;
  background:
    linear-gradient(135deg, rgba(232, 242, 253, 0.95), transparent 46%),
    #fbfdff;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* 右侧小图（cover + 神像面部焦点，由 --oracle-card-pos 提供） */
.oracle-section .oracle-card::before {
  position: absolute;
  inset: auto;
  right: 14px;
  top: 50%;
  width: 110px;
  height: 84px;
  border-radius: 8px;
  background-color: #e8f1fd;
  background-image: var(--oracle-card-image);
  background-position: var(--oracle-card-pos, 50% 32%);
  background-size: cover;
  background-repeat: no-repeat;
  box-shadow: 0 10px 22px rgba(23, 58, 104, 0.12);
  transform: translateY(-50%);
  filter: none;
  transition: none;
}

/* 角落装饰圆 */
.oracle-section .oracle-card::after {
  content: "";
  position: absolute;
  inset: auto;
  right: -20px;
  bottom: -24px;
  width: 82px;
  height: 82px;
  border: 1px solid rgba(28, 79, 138, 0.2);
  border-radius: 50%;
  background: none;
  box-shadow: none;
  pointer-events: none;
}

.oracle-section .oracle-card strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 6px;
  padding: 0;
  border: 0;
  font-family: "Noto Serif TC", "Noto Serif SC", "Songti SC", SimSun, serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--t-strong);
  text-shadow: none;
}

.oracle-section .oracle-card span {
  position: relative;
  z-index: 1;
  display: block;
  color: var(--t-soft);
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  line-height: 1.5;
  text-shadow: none;
}

.oracle-section .oracle-card:hover {
  transform: none;
  border-color: rgba(28, 79, 138, 0.4);
  box-shadow: 0 14px 30px rgba(23, 58, 104, 0.12);
}

.oracle-section .oracle-card:hover::before {
  transform: translateY(-50%);
  filter: none;
}

.oracle-section .oracle-card.is-active {
  border-color: rgba(28, 79, 138, 0.72);
  background:
    linear-gradient(135deg, rgba(23, 85, 122, 0.12), transparent 52%),
    #eaf2fd;
  box-shadow: var(--shadow);
}

.oracle-section .oracle-card.is-active::after {
  border-color: rgba(28, 79, 138, 0.34);
}

/* ---------------------------------------------------------------------
   4) 二级窗口：主页不显示灵签面板，点卡片后全屏打开（旧版浅色底）
   --------------------------------------------------------------------- */
.oracle-section .oracle-panel {
  display: none;
}

.oracle-section.is-detail-open .oracle-panel {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 60;
  margin: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 0;
  border-radius: 0;
  padding: 22px max(18px, calc((100vw - 760px) / 2)) 34px;
  color: var(--t-body);
  background:
    linear-gradient(90deg, rgba(28, 79, 138, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(28, 79, 138, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 85% 10%, rgba(28, 79, 138, 0.18), transparent 28%),
    var(--paper-100);
  background-size: 28px 28px, 28px 28px, auto, auto;
  animation: ink-panel-in 0.36s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

/* 右上角大字水印（旧版元素） */
.oracle-section.is-detail-open .oracle-panel::before {
  content: "签";
  position: absolute;
  left: auto;
  right: 22px;
  top: 18px;
  bottom: auto;
  width: auto;
  height: auto;
  z-index: 0;
  opacity: 1;
  pointer-events: none;
  background: none;
  mix-blend-mode: normal;
  -webkit-mask-image: none;
  mask-image: none;
  color: rgba(28, 79, 138, 0.08);
  font-size: 8rem;
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
}

.oracle-section.is-detail-open .oracle-panel > *:not(.oracle-back) {
  position: relative;
  z-index: 1;
}

@keyframes ink-panel-in {
  from { opacity: 0; transform: translateY(12px) scale(0.995); }
  to { opacity: 1; transform: none; }
}

/* 返回按钮：旧版浅色胶囊 + 吸顶 */
.oracle-section .oracle-back {
  position: sticky;
  top: 14px;
  z-index: 6;
  min-height: 42px;
  margin: 0 0 18px;
  padding: 0 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--t-strong);
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 24px -14px rgba(23, 58, 104, 0.35);
  cursor: pointer;
}

.oracle-section .oracle-back::before {
  content: "‹";
  margin-right: 7px;
  color: var(--indigo-600);
  font-size: 1.3rem;
  line-height: 0;
}

.oracle-section .oracle-back:hover {
  color: var(--indigo-600);
  border-color: rgba(28, 79, 138, 0.5);
  background: #ffffff;
}

/* 详情神像：画轴装裱（保留，浅底上像一幅真挂轴） */
.oracle-section .oracle-hero-image {
  position: relative;
  padding: 16px 18px;
  border: 1px solid rgba(224, 199, 138, 0.3);
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(201, 167, 92, 0.08), transparent 30%),
    linear-gradient(180deg, #14395a, #0a2033);
  box-shadow:
    inset 0 0 0 1px rgba(224, 199, 138, 0.12),
    0 26px 56px -26px rgba(2, 10, 20, 0.55);
}

.oracle-section .oracle-hero-image img {
  border: 1px solid rgba(224, 199, 138, 0.18);
  background: rgba(4, 16, 28, 0.5);
}

.oracle-section .oracle-hero-image::before,
.oracle-section .oracle-hero-image::after {
  content: "";
  position: absolute;
  left: -7px;
  right: -7px;
  height: 11px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--gold-600), var(--gold-300) 46%, var(--gold-500) 78%, var(--gold-600));
  box-shadow: 0 3px 10px rgba(2, 10, 20, 0.4);
}

.oracle-section .oracle-hero-image::before { top: -6px; }
.oracle-section .oracle-hero-image::after { bottom: -6px; }

/* 仪式说明：浅色文字 */
.oracle-section .oracle-ritual h3 {
  color: var(--t-strong);
}

.oracle-section .oracle-ritual p {
  color: var(--t-soft);
}

.oracle-section .ritual-mark {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.18), transparent 28%),
    var(--red);
  font-family: var(--font-ui);
  font-size: 1.35rem;
  font-weight: 600;
  box-shadow: 0 12px 24px rgba(23, 85, 122, 0.22);
}

/* ---------------------------------------------------------------------
   5) 圣杯单杯舞台（保留机制，浅色化）
   --------------------------------------------------------------------- */
.oracle-section .cup-row {
  display: block;
  position: relative;
  min-height: 132px;
  margin: 8px 0 16px;
  padding: 30px 0 18px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background:
    radial-gradient(58% 78% at 50% 62%, rgba(28, 79, 138, 0.07), transparent 72%),
    var(--paper-50);
  overflow: hidden;
}

/* 顶部三枚进度点 */
.oracle-section .cup-row::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 58px;
  height: 8px;
  background:
    radial-gradient(circle 3px at 5px 4px, var(--ink-dot1, rgba(141, 108, 45, 0.3)), transparent 3.6px),
    radial-gradient(circle 3px at 29px 4px, var(--ink-dot2, rgba(141, 108, 45, 0.3)), transparent 3.6px),
    radial-gradient(circle 3px at 53px 4px, var(--ink-dot3, rgba(141, 108, 45, 0.3)), transparent 3.6px);
}

.oracle-section .cup-row[data-cup-progress="1"] { --ink-dot1: var(--gold-600); }
.oracle-section .cup-row[data-cup-progress="2"] { --ink-dot1: var(--gold-600); --ink-dot2: var(--gold-600); }
.oracle-section .cup-row[data-cup-progress="3"] {
  --ink-dot1: var(--gold-600);
  --ink-dot2: var(--gold-600);
  --ink-dot3: var(--gold-600);
}

/* 三支杯叠放，仅当前杯可见（data-cup-active 由 ink.js 维护） */
.oracle-section .cup-row span {
  position: absolute;
  inset: 30px 0 14px;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--t-strong);
  font-family: var(--font-serif);
  font-size: 1.06rem;
  letter-spacing: 0.16em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.oracle-section .cup-row span::before {
  width: 40px;
  height: 25px;
  border-width: 3px;
  border-radius: 0 0 30px 30px;
  opacity: 0.7;
}

.oracle-section .cup-row[data-cup-active="0"] span:nth-child(1),
.oracle-section .cup-row[data-cup-active="1"] span:nth-child(2),
.oracle-section .cup-row[data-cup-active="2"] span:nth-child(3) {
  opacity: 1;
}

.oracle-section .cup-row.is-tossing span:not(.is-tossing) {
  opacity: 0;
}

/* 圣筊 / 笑筊落定徽章：浅底上用深色胶囊更醒目 */
.oracle-section .cup-row span.is-sheng {
  color: #fff;
  background: var(--indigo-500);
  border-radius: 999px;
  box-shadow: 0 10px 22px -8px rgba(23, 58, 104, 0.45);
  animation: none;
}

.oracle-section .cup-row span.is-sheng::before {
  content: "圣";
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  opacity: 1;
}

.oracle-section .cup-row span.is-xiao {
  color: #fff;
  background: var(--seal);
  border-radius: 999px;
  box-shadow: 0 10px 22px -8px rgba(124, 42, 31, 0.4);
  animation: none;
}

.oracle-section .cup-row span.is-xiao::before {
  content: "笑";
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  opacity: 1;
}

/* 卸掉 v2 遗留的金印伪元素（与新徽章重复）；掷杯尘埃效果用的是 is-tossing::after，不受影响 */
.oracle-section .cup-row span.is-sheng::after,
.oracle-section .cup-row span.is-xiao::after {
  content: none;
  animation: none;
}

/* 三杯功成：舞台金波 */
.oracle-section .cup-row.is-complete {
  border-color: rgba(141, 108, 45, 0.55);
  box-shadow: 0 0 30px -8px rgba(176, 141, 70, 0.45);
}

/* ---------------------------------------------------------------------
   6) 抽签按钮 / 状态行（浅色化）
   --------------------------------------------------------------------- */
.oracle-section .oracle-draw {
  margin-bottom: 12px;
  padding-left: 46px;
}

.oracle-section .oracle-draw::before {
  left: 20px;
  background: #cfe2f8;
  box-shadow:
    5px -5px 0 -2px #cfe2f8,
    -5px -3px 0 -2px #cfe2f8;
}

.oracle-section .oracle-status {
  color: var(--t-soft);
}

.oracle-section .oracle-result {
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

/* ---------------------------------------------------------------------
   7) 响应式
   --------------------------------------------------------------------- */
@media (max-width: 820px) {
  .oracle-section .oracle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .oracle-section .oracle-card {
    padding-right: 112px;
  }

  .oracle-section .oracle-card::before {
    width: 88px;
    height: 68px;
  }

  .oracle-section .cup-row {
    min-height: 116px;
    padding: 26px 0 14px;
  }

  .oracle-section .cup-row span {
    inset: 26px 0 12px;
    font-size: 0.98rem;
    gap: 12px;
  }

  .oracle-section .cup-row span::before {
    width: 34px;
    height: 21px;
    border-width: 2.5px;
  }
}

@media (max-width: 560px) {
  .oracle-section .oracle-grid {
    grid-template-columns: 1fr;
  }

  .oracle-section .oracle-card {
    min-height: 118px;
    padding-right: 118px;
  }

  .oracle-section .oracle-card::before {
    width: 92px;
    height: 70px;
  }

  .oracle-section.is-detail-open .oracle-panel {
    padding: 20px max(16px, calc((100vw - 560px) / 2)) 34px;
  }

  .oracle-section .oracle-hero-image {
    padding: 12px 13px;
  }
}

/* ---------------------------------------------------------------------
   8) 动效关怀：跟随系统减弱动效
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .yijing-section::before,
  .hero::after,
  .yijing-section::after {
    animation: none !important;
  }

  .oracle-section .cup-row span {
    transition: none;
  }
}

/* ===== ink2-perf.css ===== */
/* =========================================================================
   ink2-perf.css —— 性能修订 · 2026-09-30
   只做减法：去掉滚动时的持续重绘 / 全页混合 / 离屏视频解码
   观感目标：祥云、星点、罗盘、光斑都在，但不再拖累滚动
   ========================================================================= */

/* 1) 混合模式收敛：把 blend 关在各自区块内部，
      避免大面积 mix-blend-mode 把整页变成 backdrop root（滚动卡顿主因） */
.hero,
.yijing-section {
  isolation: isolate;
}

/* 2) 祥云：改用「预乘发光图 + 普通叠加」，去掉 mix-blend-mode 与逐帧位移 */
.hero::before {
  background-image: url("assets/ink-clouds-glow.webp");
  background-position: center 62%;
  background-size: cover;
  mix-blend-mode: normal;
  opacity: 1;
  animation: none;
  will-change: auto;
}

.yijing-section::before {
  background-image: url("assets/ink-clouds-glow.webp");
  background-position: center;
  background-size: cover;
  mix-blend-mode: normal;
  opacity: 0.9;
  animation: none;
  will-change: auto;
}

/* 3) 星点：透明度动画交给合成层处理，不触发重绘 */
.hero::after,
.yijing-section::after {
  will-change: opacity;
}

/* 4) 环境光斑：radial-gradient 本身就是柔边，去掉 80px 大模糊 */
body::before {
  filter: none;
  background: radial-gradient(circle at 44% 44%,
    rgba(31, 92, 142, 0.30), rgba(31, 92, 142, 0.13) 40%,
    rgba(31, 92, 142, 0.04) 62%, transparent 78%);
}

body::after {
  filter: none;
  background: radial-gradient(circle at 56% 56%,
    rgba(176, 141, 70, 0.26), rgba(176, 141, 70, 0.11) 40%,
    rgba(176, 141, 70, 0.03) 62%, transparent 78%);
}

/* 5) 悬浮 CTA / 返回按钮：backdrop-filter 每帧重新模糊背景 → 改实色 */
.ink-cta-bar {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: rgba(6, 20, 34, 0.97);
}

.oracle-section .oracle-back {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: rgba(255, 255, 255, 0.97);
}

/* 6) 3D 倾斜：去掉常驻 will-change（两张大图层不再常驻显存） */
html.has-depth .hero-copy,
html.has-depth .calculator {
  will-change: auto;
}

/* 7) 罗盘视频：滤镜链 5 项精简为 3 项（保留金色调） */
.hero-bagua-video {
  filter: sepia(0.5) saturate(1.45) hue-rotate(-15deg);
}

.yijing-oracle-video {
  filter: sepia(0.5) saturate(1.5) hue-rotate(-16deg);
}

/* 8) 易经理盘脉冲：去掉逐帧 drop-shadow，改用透明度呼吸 */
@keyframes yijing-oracle-pulse {
  0%, 100% { opacity: 0.86; }
  50% { opacity: 1; }
}

/* ===== ink2-edit.css ===== */
/* =========================================================================
   ink2-edit.css —— 内容修订 · 2026-09-30
   1) 隐藏「输入生辰，开启命盘解析」空状态（JS 仍引用该节点，故隐藏而非删除）
   2) 隐藏「更多趣味测算」标题区（#tools-title 仍被 aria-labelledby 引用，同理隐藏）
   3) 三个测算入口图标换成线描 SVG：八卦 / 北斗七星 / 神秘之眼
   ========================================================================= */

.result-section .empty-state {
  display: none;
}

.tools-section .section-head {
  display: none;
}

.tools-section .tools-grid {
  margin-top: 0;
}

.tool-entry-mark {
  font-size: 0;
}

.tool-entry-mark svg {
  display: block;
  width: 30px;
  height: 30px;
}

/* ===== ink2-r6.css ===== */
/* =========================================================================
   ink2-r6.css —— 易经区块还原浅色 · 2026-09-30
   与灵签区块同一节奏：浅色卡 + 浅色抽签浮层，退出深色通栏
   （罗盘视频恢复原版 invert+multiply，浅底显示为深色线描）
   ========================================================================= */

/* ---- 区块壳：退出深色通栏 ---- */
.yijing-section {
  width: auto;
  margin-left: 0;
  margin: 10px 0 52px;
  padding: 30px 0 6px;
  overflow: visible;
  color: var(--t-body);
  background: none;
  background-image: none;
  isolation: isolate;
}

/* 卸掉深色装饰：祥云 / 星点 */
.yijing-section::before,
.yijing-section::after {
  content: none;
  animation: none;
  will-change: auto;
}

.yijing-section .section-head h2 {
  color: var(--t-strong);
}

.yijing-section .section-head p {
  color: var(--t-soft);
}

.yijing-section .eyebrow.dark {
  color: #7d5e22;
}

.yijing-section .eyebrow.dark::before {
  background: var(--gold-500);
}

/* ---- 入口卡（爻）---- */
.yijing-section .yijing-entry {
  margin-top: 18px;
  padding: 18px 20px;
  gap: 16px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper-50);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.yijing-section .yijing-entry:hover {
  transform: translateY(-2px);
  border-color: rgba(28, 79, 138, 0.6);
  box-shadow: var(--shadow);
}

.yijing-section .yijing-entry-mark {
  width: 48px;
  height: 48px;
  border: 0;
  color: var(--t-strong);
  background: linear-gradient(150deg, rgba(28, 79, 138, 0.14), rgba(23, 85, 122, 0.12));
  font-size: 1.35rem;
  font-weight: 600;
}

.yijing-section .yijing-entry-copy strong {
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--t-strong);
}

.yijing-section .yijing-entry-copy span {
  color: var(--t-soft);
  font-size: 0.88rem;
}

.yijing-section .yijing-entry-open {
  padding: 8px 14px;
  border: 1px solid rgba(28, 79, 138, 0.55);
  border-radius: 999px;
  color: #2f6ea8;
  font-size: 0.86rem;
  letter-spacing: 0;
  white-space: nowrap;
}

/* ---- 抽签浮层（浅色）---- */
.yijing-section .yijing-panel {
  margin-top: 0;
  padding: 24px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper-50);
  box-shadow: var(--shadow);
  color: var(--t-body);
}

.yijing-section .yijing-panel::before {
  right: 22px;
  top: 18px;
  color: rgba(28, 79, 138, 0.08);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.yijing-section.is-detail-open .yijing-panel {
  position: fixed;
  inset: 0;
  z-index: 60;
  margin: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 0;
  border-radius: 0;
  padding: 22px max(18px, calc((100vw - 760px) / 2)) 34px;
  background:
    linear-gradient(90deg, rgba(28, 79, 138, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(28, 79, 138, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 85% 10%, rgba(28, 79, 138, 0.18), transparent 28%),
    var(--paper-100);
  background-size: 28px 28px, 28px 28px, auto, auto;
  animation: ink-panel-in 0.36s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

/* ---- 浮层内组件：浅色化 ---- */
.yijing-section .oracle-back {
  position: sticky;
  top: 14px;
  z-index: 6;
  min-height: 42px;
  margin: 0 0 18px;
  padding: 0 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--t-strong);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 10px 24px -14px rgba(23, 58, 104, 0.35);
  cursor: pointer;
}

.yijing-section .oracle-back::before {
  content: "‹";
  margin-right: 7px;
  color: var(--indigo-600);
  font-size: 1.3rem;
  line-height: 0;
}

.yijing-section .oracle-back:hover {
  color: var(--indigo-600);
  border-color: rgba(28, 79, 138, 0.5);
  background: #ffffff;
}

.yijing-section .oracle-ritual h3 {
  color: var(--t-strong);
}

.yijing-section .oracle-ritual p {
  color: var(--t-soft);
}

.yijing-section .ritual-mark {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.18), transparent 28%),
    var(--red);
  font-family: var(--font-ui);
  font-size: 1.35rem;
  font-weight: 600;
  box-shadow: 0 12px 24px rgba(23, 85, 122, 0.22);
}

.yijing-section .oracle-status {
  color: var(--t-soft);
}

.yijing-section .oracle-draw {
  margin-bottom: 12px;
  padding-left: 46px;
}

.yijing-section .oracle-draw::before {
  left: 20px;
  background: #cfe2f8;
  box-shadow:
    5px -5px 0 -2px #cfe2f8,
    -5px -3px 0 -2px #cfe2f8;
}

/* 罗盘视频：恢复原版 invert+multiply（浅底显示深色线描） */
.yijing-section .yijing-oracle-video {
  opacity: 0.55;
  filter: invert(1);
  mix-blend-mode: multiply;
}

/* ---- 响应式 ---- */
@media (max-width: 560px) {
  .yijing-section .yijing-oracle-visual {
    height: min(62vw, 240px);
  }

  .yijing-section .yijing-oracle-video {
    width: min(84vw, 260px);
  }

  .yijing-section.is-detail-open .yijing-panel {
    padding: 20px max(16px, calc((100vw - 560px) / 2)) 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .yijing-section .yijing-panel {
    animation: none;
  }
}

/* ---------------------------------------------------------------------
   补丁（r7）：浮层被 isolation 关进区块内部的问题
   perf 层给 .yijing-section 加了 isolation: isolate（性能优化，必须保留），
   但它同时创建了层叠上下文 —— 全屏抽签浮层（position:fixed; z-index:60）
   从此只在本区块内部参与层叠，导致 DOM 靠后的「时间卦象」「页脚」
   反而画在浮层之上（用户看到的「此刻的时间卦象」透出就是这个问题）。
   修法：浮层打开时（body.yijing-open 由 app.js 维护）临时提升整个区块的
   z-index，让浮层重新盖住后续所有兄弟区块；平时不提升，滚动零影响。
   注：灵签浮层所在的 .oracle-section 没有 isolation，不存在此问题。
   --------------------------------------------------------------------- */
body.yijing-open .yijing-section {
  z-index: 70;
}

/* ===== ink2-r9.css ===== */
/* =====================================================================
   ink2-r9.css — 第九轮修订 · 圣杯三槽进度 + 揭晓按钮 + 出签动画
   修订层必须放站点根目录（url() 相对本 CSS 自身位置解析）
   ===================================================================== */

/* 1) 三槽进度：取代旧的顶部小圆点 */
.oracle-section .cup-row::before {
  content: none;
}

.oracle-section .cup-slots {
  position: absolute;
  top: 9px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 14px;
  pointer-events: none;
  z-index: 2;
}

.oracle-section .cup-slot {
  min-width: 58px;
  height: 32px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper-50);
  color: var(--t-soft);
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-style: normal;
  letter-spacing: 0.1em;
  box-shadow: 0 1px 0 rgba(28, 79, 138, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* 掷杯中：小幅颠簸 */
.oracle-section .cup-slot.is-tossing {
  color: var(--indigo-500);
  border-color: rgba(28, 79, 138, 0.45);
  animation: r9-slot-toss 0.78s ease-in-out infinite;
}

@keyframes r9-slot-toss {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  30% { transform: translateY(-5px) rotate(-5deg); }
  60% { transform: translateY(2px) rotate(4deg); }
}

/* 圣杯落定：靛蓝金边，放大一点 */
.oracle-section .cup-slot.is-sheng {
  background: var(--indigo-500);
  border-color: rgba(176, 141, 70, 0.8);
  color: #fff;
  transform: scale(1.08);
  box-shadow:
    0 6px 16px -6px rgba(23, 58, 104, 0.5),
    0 0 0 3px rgba(176, 141, 70, 0.16);
}

/* 笑杯落定：朱砂 */
.oracle-section .cup-slot.is-xiao {
  background: var(--seal);
  border-color: rgba(124, 42, 31, 0.55);
  color: #fff;
  transform: scale(1.02);
  box-shadow: 0 6px 16px -6px rgba(124, 42, 31, 0.45);
}

/* 三杯功成：三槽按序呼吸金光 */
.oracle-section .cup-row.is-complete .cup-slot.is-sheng {
  animation: r9-slot-glow 1.5s ease-in-out infinite;
}
.oracle-section .cup-row.is-complete .cup-slot.is-sheng:nth-child(2) { animation-delay: 0.22s; }
.oracle-section .cup-row.is-complete .cup-slot.is-sheng:nth-child(3) { animation-delay: 0.44s; }

@keyframes r9-slot-glow {
  0%, 100% {
    box-shadow: 0 6px 16px -6px rgba(23, 58, 104, 0.5), 0 0 0 3px rgba(176, 141, 70, 0.16);
  }
  50% {
    box-shadow: 0 8px 24px -6px rgba(176, 141, 70, 0.7), 0 0 0 5px rgba(176, 141, 70, 0.34);
  }
}

/* 2) 舞台加高，给三槽留出位置 */
.oracle-section .cup-row {
  min-height: 150px;
  padding: 48px 0 18px;
}
.oracle-section .cup-row span {
  inset: 46px 0 14px;
}

/* 3) 「点击查看灵签」按钮：鎏金流光 */
.oracle-section .oracle-draw.is-reveal {
  background: linear-gradient(115deg, #8f6c1e 0%, #c9a44a 28%, #ecd28c 50%, #c9a44a 72%, #8f6c1e 100%);
  background-size: 220% 100%;
  color: #fff;
  animation: r9-sheen 2.6s linear infinite;
  box-shadow: 0 14px 28px -10px rgba(176, 141, 70, 0.8);
}

@keyframes r9-sheen {
  0% { background-position: 0% 0; }
  100% { background-position: 220% 0; }
}

/* 4) 灵签揭晓动画：金光迸发 + 卡片弹出 + 流光扫过 */
.oracle-section .oracle-result {
  position: relative;
  overflow: hidden;
}

.oracle-section .oracle-result.is-revealing {
  animation: r9-pop 0.72s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes r9-pop {
  0% { opacity: 0; transform: scale(0.9) translateY(20px); }
  55% { opacity: 1; transform: scale(1.02) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.oracle-section .oracle-result.is-revealing::after {
  content: "";
  position: absolute;
  inset: -30%;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(236, 210, 140, 0.55), rgba(236, 210, 140, 0) 72%);
  animation: r9-flash 1.05s ease-out forwards;
}

@keyframes r9-flash {
  0% { opacity: 0; transform: scale(0.35); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.7); }
}

.oracle-section .oracle-result.is-revealing::before {
  content: "";
  position: absolute;
  top: -10%;
  bottom: -10%;
  width: 34%;
  left: -45%;
  pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(255, 238, 190, 0.6), transparent);
  transform: skewX(-18deg);
  animation: r9-sweep 0.95s 0.18s ease-out forwards;
  opacity: 0;
}

@keyframes r9-sweep {
  0% { left: -45%; opacity: 0; }
  18% { opacity: 1; }
  100% { left: 120%; opacity: 0; }
}

/* 5) 响应式 */
@media (max-width: 820px) {
  .oracle-section .cup-row {
    min-height: 138px;
    padding: 42px 0 14px;
  }
  .oracle-section .cup-row span {
    inset: 40px 0 12px;
  }
  .oracle-section .cup-slot {
    min-width: 50px;
    height: 28px;
    font-size: 0.92rem;
    padding: 0 10px;
  }
}

/* 6) 动效关怀 */
@media (prefers-reduced-motion: reduce) {
  .oracle-section .cup-slot,
  .oracle-section .cup-slot.is-tossing,
  .oracle-section .cup-row.is-complete .cup-slot.is-sheng,
  .oracle-section .oracle-draw.is-reveal,
  .oracle-section .oracle-result.is-revealing,
  .oracle-section .oracle-result.is-revealing::after,
  .oracle-section .oracle-result.is-revealing::before {
    animation: none !important;
  }
}

/* ===== ink2-r10.css ===== */
/* =====================================================================
   ink2-r10.css — 第十轮修订 · 传统筊杯图标（手绘 SVG）
   形制依据：国立台湾历史博物馆藏「木製筊杯組」/ 国家文化记忆库藏品描述
   —— 一副两片、新月形、中央圆凸两端尖椎；平面为阳面、凸面为阴面。
        圣筊 = 一阴一阳（一正一反）；笑筊 = 两阳面（两个平面朝上）。
   本层替代 ink2.css 里用 content:"圣" 塞进圆圈的写法（那套没有做居中，
   文字被行盒顶偏，故视觉上「圣」不在圈心）。
   修订层必须放站点根目录（url() 相对本 CSS 自身位置解析）。
   ===================================================================== */

/* ---------- 1. 舞台徽章：文字圆 → 传统筊杯图标 ---------- */
.oracle-section .cup-row span.is-sheng::before {
  content: "";
  display: block;
  width: 52px;
  height: 27px;
  border: 0;
  border-radius: 0;
  opacity: 1;
  transform: none;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2046%2024%22%20width%3D%2246%22%20height%3D%2224%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22g%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220.22%22%20y2%3D%221%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23f9ecc4%22%2F%3E%3Cstop%20offset%3D%22.45%22%20stop-color%3D%22%23e2c479%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23ab8324%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Cg%20fill%3D%22url%28%23g%29%22%20stroke%3D%22%238a6415%22%20stroke-width%3D%221%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M1%2016.5%20Q10%2010.5%2019%2016.5%20Q10%20-0.5%201%2016.5%20Z%22%2F%3E%3Cpath%20d%3D%22M27%207.5%20Q36%2013.5%2045%207.5%20Q36%2024.5%2027%207.5%20Z%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%238a6415%22%20stroke-width%3D%22.8%22%20stroke-linecap%3D%22round%22%20opacity%3D%22.5%22%3E%3Cpath%20d%3D%22M1%2016.5%20Q10%2010.5%2019%2016.5%20Q10%20-0.5%201%2016.5%20Z%22%20transform%3D%22translate%2810%2012%29%20scale%28.62%29%20translate%28-10%20-12%29%22%2F%3E%3Cpath%20d%3D%22M27%207.5%20Q36%2013.5%2045%207.5%20Q36%2024.5%2027%207.5%20Z%22%20transform%3D%22translate%2836%2012%29%20scale%28.62%29%20translate%28-36%20-12%29%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") center / contain no-repeat;
  filter: drop-shadow(0 1px 3px rgba(6, 22, 40, 0.35));
  animation: none;
}

.oracle-section .cup-row span.is-xiao::before {
  content: "";
  display: block;
  width: 52px;
  height: 27px;
  border: 0;
  border-radius: 0;
  opacity: 1;
  transform: none;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2046%2024%22%20width%3D%2246%22%20height%3D%2224%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22g%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220.22%22%20y2%3D%221%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23fff6de%22%2F%3E%3Cstop%20offset%3D%22.45%22%20stop-color%3D%22%23f0dca8%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23d0ae63%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Cg%20fill%3D%22url%28%23g%29%22%20stroke%3D%22%239c7a26%22%20stroke-width%3D%221%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M1%207.5%20Q10%2013.5%2019%207.5%20Q10%2024.5%201%207.5%20Z%22%2F%3E%3Cpath%20d%3D%22M27%207.5%20Q36%2013.5%2045%207.5%20Q36%2024.5%2027%207.5%20Z%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%238a6415%22%20stroke-width%3D%22.8%22%20stroke-linecap%3D%22round%22%20opacity%3D%22.5%22%3E%3Cpath%20d%3D%22M1%207.5%20Q10%2013.5%2019%207.5%20Q10%2024.5%201%207.5%20Z%22%20transform%3D%22translate%2810%2012%29%20scale%28.62%29%20translate%28-10%20-12%29%22%2F%3E%3Cpath%20d%3D%22M27%207.5%20Q36%2013.5%2045%207.5%20Q36%2024.5%2027%207.5%20Z%22%20transform%3D%22translate%2836%2012%29%20scale%28.62%29%20translate%28-36%20-12%29%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") center / contain no-repeat;
  filter: drop-shadow(0 1px 3px rgba(6, 22, 40, 0.35));
  animation: none;
}

/* 徽章里图标与「圣杯 / 笑杯」二字之间的呼吸感 */
.oracle-section .cup-row span.is-sheng,
.oracle-section .cup-row span.is-xiao {
  gap: 12px;
}

/* ---------- 2. 三槽：结果也用筊杯图标（1/2/3 数字保留在待掷状态） ---------- */
.oracle-section .cup-slot {
  min-width: 66px;
  height: 34px;
  padding: 0 12px;
}

.oracle-section .cup-slot.is-sheng::before,
.oracle-section .cup-slot.is-xiao::before {
  content: "";
  display: block;
  width: 40px;
  height: 21px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.oracle-section .cup-slot.is-sheng::before {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2046%2024%22%20width%3D%2246%22%20height%3D%2224%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22g%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220.22%22%20y2%3D%221%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23f9ecc4%22%2F%3E%3Cstop%20offset%3D%22.45%22%20stop-color%3D%22%23e2c479%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23ab8324%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Cg%20fill%3D%22url%28%23g%29%22%20stroke%3D%22%238a6415%22%20stroke-width%3D%221%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M1%2016.5%20Q10%2010.5%2019%2016.5%20Q10%20-0.5%201%2016.5%20Z%22%2F%3E%3Cpath%20d%3D%22M27%207.5%20Q36%2013.5%2045%207.5%20Q36%2024.5%2027%207.5%20Z%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%238a6415%22%20stroke-width%3D%22.8%22%20stroke-linecap%3D%22round%22%20opacity%3D%22.5%22%3E%3Cpath%20d%3D%22M1%2016.5%20Q10%2010.5%2019%2016.5%20Q10%20-0.5%201%2016.5%20Z%22%20transform%3D%22translate%2810%2012%29%20scale%28.62%29%20translate%28-10%20-12%29%22%2F%3E%3Cpath%20d%3D%22M27%207.5%20Q36%2013.5%2045%207.5%20Q36%2024.5%2027%207.5%20Z%22%20transform%3D%22translate%2836%2012%29%20scale%28.62%29%20translate%28-36%20-12%29%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
}

.oracle-section .cup-slot.is-xiao::before {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2046%2024%22%20width%3D%2246%22%20height%3D%2224%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22g%22%20x1%3D%220%22%20y1%3D%220%22%20x2%3D%220.22%22%20y2%3D%221%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23fff6de%22%2F%3E%3Cstop%20offset%3D%22.45%22%20stop-color%3D%22%23f0dca8%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23d0ae63%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3Cg%20fill%3D%22url%28%23g%29%22%20stroke%3D%22%239c7a26%22%20stroke-width%3D%221%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M1%207.5%20Q10%2013.5%2019%207.5%20Q10%2024.5%201%207.5%20Z%22%2F%3E%3Cpath%20d%3D%22M27%207.5%20Q36%2013.5%2045%207.5%20Q36%2024.5%2027%207.5%20Z%22%2F%3E%3C%2Fg%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%238a6415%22%20stroke-width%3D%22.8%22%20stroke-linecap%3D%22round%22%20opacity%3D%22.5%22%3E%3Cpath%20d%3D%22M1%207.5%20Q10%2013.5%2019%207.5%20Q10%2024.5%201%207.5%20Z%22%20transform%3D%22translate%2810%2012%29%20scale%28.62%29%20translate%28-10%20-12%29%22%2F%3E%3Cpath%20d%3D%22M27%207.5%20Q36%2013.5%2045%207.5%20Q36%2024.5%2027%207.5%20Z%22%20transform%3D%22translate%2836%2012%29%20scale%28.62%29%20translate%28-36%20-12%29%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
}

/* ---------- 3. 移动端 ---------- */
@media (max-width: 820px) {
  .oracle-section .cup-row span.is-sheng::before,
  .oracle-section .cup-row span.is-xiao::before {
    width: 44px;
    height: 23px;
  }

  .oracle-section .cup-slot {
    min-width: 60px;
    height: 32px;
  }

  .oracle-section .cup-slot.is-sheng::before,
  .oracle-section .cup-slot.is-xiao::before {
    width: 34px;
    height: 18px;
  }
}

/* ---------- 4. 高对比兜底 ---------- */
@media (prefers-contrast: more) {
  .oracle-section .cup-row span.is-sheng::before,
  .oracle-section .cup-row span.is-xiao::before {
    filter: drop-shadow(0 0 0.6px rgba(255, 255, 255, 0.9)) drop-shadow(0 1px 3px rgba(6, 22, 40, 0.5));
  }
}
