/* ============================================================
   问易 Web 版 · 墨夜鎏金设计系统
   忠实还原冻结原型 wenyi-ui-prototype（墨夜为骨、鎏金为衣、朱砂为印、宣白为文）
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&family=Cinzel:wght@400;500;600&display=swap");

/* 小篆 · 全字库说文解字（台湾政府开放资料，tools/subset_seal.py 子集化，仅含背景经文用字） */
@font-face {
  font-family: "WenYi Seal";
  src: url("../assets/fonts/ebas927.subset.woff") format("woff");
  font-display: swap;
}

:root {
  /* 墨夜骨 */
  --wony-background: #0E0C14;
  --wony-foreground: #ECE6D8;
  /* 砚面 / 浮层 */
  --wony-card: #16131F;
  --wony-popover: #1C1826;
  /* 鎏金签 */
  --wony-primary: #C9A24B;
  --wony-primary-foreground: #0E0C14;
  /* 灰宣次 */
  --wony-muted-foreground: #B9B2A4;
  /* 线与环 */
  --wony-border: rgba(201, 162, 75, 0.22);
  --wony-input: rgba(201, 162, 75, 0.30);
  /* 圆角 */
  --wony-radius-sm: 4px;
  --wony-radius-md: 12px;
  --wony-radius-lg: 16px;
  /* 辅助色 */
  --wony-zhu: #C2453A;      /* 朱砂 */
  --wony-yu: #5B8C7A;       /* 玉青 */
  --wony-qingtong: #6E5A2E; /* 青铜 */
  --wony-lijin: #DCAF5E;    /* 亮鎏金 */
  --wony-xingbai: #D8DEEA;  /* 星白 */
  /* 字体 */
  --wony-font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --wony-font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", sans-serif;
  --wony-font-latin: "Cinzel", "Noto Serif SC", serif;
  /* 爻格几何 */
  --wony-yao-h: 16px;
  --wony-yao-gap: 6px;
  --wony-yao-row-gap: 8px;
  --pointer-x: 50%;
  --pointer-y: 42%;
  --parallax-x: 0px;
  --parallax-y: 0px;

  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--wony-background);
  color: var(--wony-foreground);
  font-family: var(--wony-font-sans);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(201, 162, 75, 0.3); color: var(--wony-foreground); }

/* 细 scrollbar（桌面） */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--wony-background); }
::-webkit-scrollbar-thumb { background: rgba(201,162,75,0.25); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(201,162,75,0.4); }

/* ============================================================
   氛围底：纸纹 + 光晕 + 暗角 + 浮金尘
   ============================================================ */
.wony-paper-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-color: var(--wony-background);
  background-image:
    radial-gradient(120% 80% at 50% -10%, rgba(201,162,75,0.07) 0%, transparent 55%),
    radial-gradient(80% 70% at 80% 20%, rgba(91,140,122,0.07) 0%, transparent 58%),
    radial-gradient(90% 60% at 50% 110%, rgba(0,0,0,0.5) 0%, transparent 60%),
    repeating-linear-gradient(0deg, rgba(236,230,216,0.012) 0 1px, transparent 1px 3px);
}
.oracle-field {
  position: fixed; inset: -10%; z-index: 0; pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(201,162,75,0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,162,75,0.09) 1px, transparent 1px);
  background-size: 72px 72px, 72px 72px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.75) 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.75) 0%, transparent 70%);
  transition: opacity 0.3s ease;
}
/* 竖排经文 · 交替明暗 · 小篆 · 仅首页可见（visibility 保留布局，窗帘物理的丈量不失效） */
.scripture-columns {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  display: flex; justify-content: center; gap: clamp(1.2rem, 3.5vw, 3.2rem);
  padding: 0 2vw;
  overflow: hidden;
}
body:not(.at-home) .scripture-columns { visibility: hidden; }
.scripture-columns .col {
  writing-mode: vertical-rl;
  font-family: "WenYi Seal", var(--wony-font-serif);
  font-size: clamp(0.44rem, 0.68vw, 0.57rem);
  letter-spacing: 0.38em;
  line-height: 1;
  color: var(--wony-lijin);
  white-space: nowrap;
  opacity: 0.07;
  animation: scripture-breathe 7s ease-in-out infinite;
  text-shadow: 0 0 6px rgba(220,175,94,0.3);
}
/* 窗帘物理：逐字 span，鼠标抚过时横向摆动 */
.scripture-columns .col .sc-ch {
  display: inline-block;
  font-style: normal;
}
@keyframes scripture-breathe {
  0%, 100% { opacity: 0.05; text-shadow: 0 0 4px rgba(220,175,94,0.15); }
  50%      { opacity: 0.78; text-shadow: 0 0 16px rgba(220,175,94,0.8), 0 0 36px rgba(220,175,94,0.38); }
}
@media (prefers-reduced-motion: reduce) {
  .scripture-columns .col { animation: none; opacity: 0.10; }
}

/* 暗角 */
.wony-vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(4,3,8,0.55) 100%);
}
/* 浮金尘 canvas */
#dust-canvas {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
}
/* 火花漫天 canvas（非首页氛围层，绘制与否由 JS 按视图控制） */
#spark-canvas {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
}
/* 烟雾 canvas —— 全局禁用：用户要求所有页面都不要烟雾背景，
   仪式页背景由黑洞视频独占。display:none 让 initSmoke 的 rAF 绘制变为空操作，零开销。
   ponytail: 若日后需要恢复某页烟雾，把此规则删掉或改成 body.at-xxx 作用域即可。 */
#smoke-canvas {
  display: none;
}
/* ponytail: 仪式页由成片视频独占背景，避免全局粒子与烟雾重复叠加。 */
body.at-ritual #dust-canvas,
body.at-ritual #spark-canvas,
body.at-ritual > #smoke-canvas {
  visibility: hidden;
}

/* 结果页 · 一次性天机 · 风吹散（!important 压过 .result-anim 的入场动画） */
.scatter-gone {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: none !important;
  animation: none !important;
}
/* 焚烬升天（!important 压过 .result-anim 入场动画）：
   段落先泛起金红火光（如被香火点燃），字迹松散上浮、模糊淡去；
   金烬粒子由 JS 叠加 canvas 绘制（.ember-burst-canvas） */
.burn-away {
  /* both：延迟期间也填充第 0 帧（完全可见），否则错峰点燃的段落
     会先退回 .result-anim 的透明基态，闪没一下再出现 */
  animation: burn-away 1.45s cubic-bezier(0.4, 0, 0.6, 1) both !important;
  animation-delay: var(--b-delay, 0s) !important;
  will-change: transform, opacity, filter;
}
@keyframes burn-away {
  0%   { opacity: 1;    transform: none; filter: none; }
  22%  { opacity: 1;    transform: translateY(-2px);
         filter: sepia(0.9) hue-rotate(-28deg) saturate(3.2) brightness(1.9) drop-shadow(0 0 14px rgba(255,150,60,0.6)); }
  45%  { opacity: 0.8;  transform: translateY(-10px) scale(1.01);
         filter: sepia(1) hue-rotate(-18deg) saturate(2.4) brightness(1.5) blur(1px) drop-shadow(0 0 10px rgba(240,180,90,0.4)); }
  75%  { opacity: 0.32; transform: translateY(-26px) scale(1.02); letter-spacing: 0.06em;
         filter: sepia(1) saturate(1.2) brightness(1.15) blur(3px); }
  100% { opacity: 0;    transform: translateY(-48px) scale(1.03);
         filter: sepia(1) brightness(1) blur(7px); }
}
/* 金烬升腾的全屏叠加层 */
.ember-burst-canvas {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .burn-away { animation-duration: 0.01s !important; }
}

/* 分段天机：六卷逐一窥探，阅后即焚 */
.tianji-ord {
  text-align: center;
  font-family: var(--wony-font-serif); font-size: 12px;
  color: rgba(220,175,94,0.55);
  letter-spacing: 0.5em; text-indent: 0.5em;
  margin-bottom: 20px;
}
.tianji-nav { text-align: center; margin-top: 36px; }
.tianji-next { min-width: 220px; }
.tianji-next:disabled { opacity: 0.4; cursor: wait; }
.tianji-hint {
  margin-top: 10px;
  color: rgba(185,178,164,0.4); font-size: 11px;
  letter-spacing: 0.24em; text-indent: 0.24em;
}

/* ============================================================
   布局骨架
   ============================================================ */
.app { position: relative; z-index: 2; }

.view { display: none; }
.view.active { display: block; animation: view-in 0.6s ease both; }
@keyframes view-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

/* ============================================================
   通用器物
   ============================================================ */
/* 鎏金粉线（两端虚中间实） */
.gold-line {
  border: 0; height: 1px; margin: 26px 0;
  background: linear-gradient(90deg, transparent 0%, rgba(201,162,75,0.15) 12%, rgba(201,162,75,0.55) 50%, rgba(201,162,75,0.15) 88%, transparent 100%);
}
.gold-line.double { position: relative; height: 4px; }
.gold-line.double::before, .gold-line.double::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(201,162,75,0.15) 12%, rgba(201,162,75,0.5) 50%, rgba(201,162,75,0.15) 88%, transparent 100%);
}
.gold-line.double::before { top: 0; }
.gold-line.double::after { bottom: 0; opacity: 0.45; }

/* 分层小标题 */
.section-title {
  font-family: var(--wony-font-serif);
  font-weight: 500;
  color: var(--wony-primary);
  font-size: 15px;
  letter-spacing: 0.14em;
  display: flex; align-items: center; gap: 10px;
}
.section-title::before {
  content: ""; display: inline-block;
  width: 6px; height: 6px;
  background: var(--wony-primary);
  transform: rotate(45deg);
  opacity: 0.8;
  flex: none;
}

/* 典籍原文 / 今译 */
.classic {
  font-family: var(--wony-font-serif);
  font-weight: 400;
  color: var(--wony-foreground);
  font-size: 17px;
  line-height: 2.05;
  letter-spacing: 0.02em;
}
.translate {
  font-family: var(--wony-font-sans);
  color: var(--wony-muted-foreground);
  font-size: 14px;
  line-height: 1.85;
}
.caption {
  font-family: var(--wony-font-sans);
  color: var(--wony-muted-foreground);
  font-size: 12px;
  letter-spacing: 0.08em;
}

/* 卡片（砚面 + 鎏金细边 + 符箓角线） */
.card {
  position: relative;
  background-color: var(--wony-card);
  background-image:
    radial-gradient(120% 100% at 30% 20%, rgba(201,162,75,0.05) 0%, transparent 55%),
    radial-gradient(100% 80% at 70% 90%, rgba(110,90,46,0.06) 0%, transparent 60%);
  border: 1px solid var(--wony-border);
  border-radius: var(--wony-radius-md);
  padding: 20px;
}
.card.frame::before, .card.frame::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 1px solid var(--wony-primary); opacity: 0.4; pointer-events: none;
}
.card.frame::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.card.frame::after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.card:hover, .method-card:hover, .domain-chip:hover, .btn-ghost:hover {
  box-shadow:
    0 0 0 1px rgba(220,175,94,0.05),
    0 16px 36px rgba(0,0,0,0.18),
    inset 0 0 28px rgba(201,162,75,0.035);
}

/* 朱砂印 */
.seal {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--wony-zhu);
  border: 1.5px solid var(--wony-zhu);
  background: rgba(194,69,58,0.08);
  font-family: var(--wony-font-serif);
  letter-spacing: 0.18em;
  border-radius: var(--wony-radius-sm);
}

/* chip */
.chip {
  display: inline-flex; align-items: center; justify-content: center;
  height: 28px; padding: 0 14px;
  border-radius: 9999px;
  font-family: var(--wony-font-sans); font-size: 12px;
  letter-spacing: 0.1em; white-space: nowrap;
}

/* ============================================================
   六爻图
   ============================================================ */
.yao-stack { display: flex; flex-direction: column; gap: var(--wony-yao-row-gap); position: relative; }
.yao-row { display: grid; grid-template-columns: 1fr 20px; align-items: center; gap: 10px; position: relative; }
.yao-bar { width: 100%; height: var(--wony-yao-h); background: var(--wony-foreground);
  box-shadow: inset 0 1px 0 rgba(201,162,75,0.4), inset 0 -1px 0 rgba(201,162,75,0.4); }
.yao-yin { display: flex; width: 100%; gap: var(--wony-yao-gap); }
.yao-yin > span { flex: 1; height: var(--wony-yao-h); background: var(--wony-foreground);
  box-shadow: inset 0 1px 0 rgba(201,162,75,0.4), inset 0 -1px 0 rgba(201,162,75,0.4); }
.yao-pos { font-family: var(--wony-font-serif); color: var(--wony-muted-foreground); font-size: 12px; text-align: center; }
.yao-row.bian .yao-bar, .yao-row.bian .yao-yin > span { background: var(--wony-lijin); animation: bian-pulse 2.6s ease-in-out infinite; }
.yao-bian-mark {
  position: absolute; right: -8px; top: 50%; transform: translateY(-50%) translateX(100%);
  font-family: var(--wony-font-serif); color: var(--wony-zhu); font-size: 11px;
  border: 1px solid rgba(194,69,58,0.6); border-radius: var(--wony-radius-sm);
  padding: 1px 5px; line-height: 1.4; background: rgba(194,69,58,0.08);
}
@keyframes bian-pulse {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(201,162,75,0.4), inset 0 -1px 0 rgba(201,162,75,0.4), 0 0 0 0 rgba(220,175,94,0); }
  50% { box-shadow: inset 0 1px 0 rgba(201,162,75,0.4), inset 0 -1px 0 rgba(201,162,75,0.4), 0 0 12px 1px rgba(220,175,94,0.5); }
}
@media (prefers-reduced-motion: reduce) {
  .yao-row.bian .yao-bar, .yao-row.bian .yao-yin > span { animation: none; }
}

/* 迷你六爻（变卦用） */
.yao-stack.mini { --wony-yao-h: 7px; --wony-yao-gap: 3px; --wony-yao-row-gap: 4px; }
.yao-stack.mini .yao-row { grid-template-columns: 1fr; gap: 0; }

/* ============================================================
   起卦页
   ============================================================ */
.home-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.home-inner { width: 100%; max-width: 560px; padding: 48px 24px; text-align: center; }

.brand-seal {
  width: 52px; height: 52px; margin: 0 auto 26px;
  font-size: 22px; font-weight: 600;
}
.home-title {
  font-family: var(--wony-font-serif);
  font-weight: 700;
  font-size: 56px;
  letter-spacing: 0.32em;
  text-indent: 0.32em; /* 视觉居中补偿 */
  color: var(--wony-foreground);
  line-height: 1.2;
}
.home-sub {
  margin-top: 16px;
  font-family: var(--wony-font-serif);
  color: var(--wony-primary);
  font-size: 15px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
}
.home-ritual {
  margin-top: 10px;
  color: var(--wony-muted-foreground);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.question-box { margin-top: 44px; text-align: left; }
.field-label {
  font-family: var(--wony-font-serif);
  color: var(--wony-primary);
  font-size: 14px;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
  display: block;
}
.question-input {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  background: var(--wony-popover);
  border: 1px solid var(--wony-input);
  border-radius: var(--wony-radius-md);
  padding: 14px 16px;
  color: var(--wony-foreground);
  font-family: var(--wony-font-serif);
  font-size: 16px;
  line-height: 1.7;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.question-input::placeholder { color: rgba(185,178,164,0.45); }
.question-input:focus {
  border-color: var(--wony-primary);
  box-shadow: 0 0 0 3px rgba(201,162,75,0.12);
}
.model-settings {
  padding: 16px;
  border: 1px solid var(--wony-border);
  border-radius: var(--wony-radius-md);
  background: rgba(22,19,31,0.72);
}
.model-settings summary { cursor: pointer; margin-bottom: 0; }
.model-settings[open] summary { margin-bottom: 10px; }
.model-note, .model-status {
  color: var(--wony-muted-foreground);
  font-size: 12px;
  line-height: 1.7;
}
.model-input {
  width: 100%;
  min-height: 42px;
  margin: 8px 0 14px;
  border: 1px solid var(--wony-input);
  border-radius: var(--wony-radius-md);
  background: var(--wony-popover);
  color: var(--wony-foreground);
  font-family: var(--wony-font-sans);
  font-size: 14px;
  padding: 10px 12px;
  outline: none;
}
.model-input::placeholder { color: rgba(185,178,164,0.42); }
.model-input:focus { border-color: var(--wony-primary); box-shadow: 0 0 0 3px rgba(201,162,75,0.12); }
.model-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 2px; }
.model-clear, .model-save {
  width: auto;
  min-height: 40px;
  margin-top: 0;
  padding: 0 16px;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
}
.model-status { margin-top: 10px; }

.domain-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.domain-chip {
  height: 38px; padding: 0 18px;
  border-radius: var(--wony-radius-md);
  border: 1px solid var(--wony-border);
  background: transparent;
  color: var(--wony-muted-foreground);
  font-family: var(--wony-font-sans); font-size: 14px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.22s;
}
.domain-chip:hover { border-color: rgba(201,162,75,0.5); color: var(--wony-foreground); }
.domain-chip.active {
  color: var(--wony-primary);
  border-color: var(--wony-primary);
  background: rgba(201,162,75,0.1);
}

/* 筮法选择卡 */
.method-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.method-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--wony-border);
  border-radius: var(--wony-radius-md);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: all 0.22s;
}
.method-card:hover { border-color: rgba(201,162,75,0.5); }
.method-card.active {
  border-color: var(--wony-primary);
  background: rgba(201,162,75,0.08);
  box-shadow: 0 0 16px rgba(201,162,75,0.12);
}
.method-name { font-family: var(--wony-font-serif); font-size: 16px; font-weight: 600; color: var(--wony-foreground); letter-spacing: 0.08em; }
.method-card.active .method-name { color: var(--wony-primary); }
.method-desc { font-size: 12px; color: var(--wony-muted-foreground); letter-spacing: 0.04em; }

.btn-primary {
  margin-top: 44px;
  width: 100%;
  min-height: 54px;
  border: none; border-radius: var(--wony-radius-md);
  background: linear-gradient(180deg, var(--wony-lijin) 0%, var(--wony-primary) 100%);
  color: var(--wony-primary-foreground);
  font-family: var(--wony-font-serif);
  font-size: 18px; font-weight: 600;
  letter-spacing: 0.3em; text-indent: 0.3em;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  box-shadow: 0 4px 20px rgba(201,162,75,0.25);
}
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 6px 26px rgba(201,162,75,0.35); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.home-note { margin-top: 22px; color: rgba(185,178,164,0.55); font-size: 12px; letter-spacing: 0.06em; }

/* ============================================================
   筮法仪式页
   ============================================================ */
.cast-head { text-align: center; }
.cast-step {
  font-family: var(--wony-font-latin);
  color: var(--wony-primary);
  font-size: 14px;
  letter-spacing: 0.28em;
}
.cast-hint { margin-top: 8px; color: var(--wony-muted-foreground); font-size: 13px; letter-spacing: 0.08em; }

.cast-hex-area { display: flex; justify-content: center; margin: 34px 0 8px; }
.cast-hex { width: 240px; }
.cast-hex .yao-row { opacity: 0; transform: translateY(6px); }
.cast-hex .yao-row.show { opacity: 1; transform: none; transition: opacity 0.5s ease, transform 0.5s ease; }
.cast-hex .yao-row.placeholder .yao-bar,
.cast-hex .yao-row.placeholder .yao-yin > span { background: rgba(236,230,216,0.07); box-shadow: none; }
.cast-hex .yao-row.placeholder .yao-pos { opacity: 0.25; }

.coins-area { display: flex; justify-content: center; gap: 34px; margin: 40px 0 14px; perspective: 900px; }
.coin-slot { position: relative; width: 92px; height: 92px; }
.coin {
  width: 92px; height: 92px;
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
}
.coin .face {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.55));
}
.coin .face.back  { background-image: url("../assets/coins/coin-back.png"); }   /* 背（阳面）*/
.coin .face.front { background-image: url("../assets/coins/coin-front.png"); transform: rotateY(180deg); } /* 字（阴面）*/
/* 铜钱下方柔光投影 */
.coin-shadow {
  position: absolute; left: 50%; bottom: -16px;
  width: 74px; height: 16px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(201,162,75,0.32) 0%, rgba(201,162,75,0.08) 55%, transparent 75%);
  border-radius: 50%;
  transition: opacity 0.3s, transform 0.3s;
}
.coin-slot.airborne .coin-shadow { opacity: 0.35; transform: translateX(-50%) scale(0.7); }
/* 落定金光扩散环 */
.land-ring {
  position: absolute; left: 50%; top: 50%;
  width: 92px; height: 92px;
  border: 1.5px solid rgba(220,175,94,0.7);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  pointer-events: none;
  animation: land-ring 0.7s ease-out forwards;
}
@keyframes land-ring {
  0% { opacity: 0.9; transform: translate(-50%, -50%) scale(0.6); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.9); }
}
/* 落定金屑粒子 */
.spark {
  position: absolute; left: 50%; top: 50%;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--wony-lijin);
  box-shadow: 0 0 6px 1px rgba(220,175,94,0.8);
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .land-ring { animation: none; opacity: 0; }
}

.cast-verdict {
  text-align: center;
  min-height: 32px;
  font-family: var(--wony-font-serif);
  font-size: 16px;
  color: var(--wony-foreground);
  letter-spacing: 0.06em;
}
.cast-verdict .bian-tag { color: var(--wony-zhu); font-size: 13px; border: 1px solid rgba(194,69,58,0.6); border-radius: var(--wony-radius-sm); padding: 1px 6px; margin-left: 8px; }

.btn-cast {
  display: block; margin: 26px auto 0;
  min-width: 220px; min-height: 52px;
  border: 1px solid var(--wony-primary);
  border-radius: var(--wony-radius-md);
  background: rgba(201,162,75,0.08);
  color: var(--wony-primary);
  font-family: var(--wony-font-serif);
  font-size: 17px; font-weight: 500;
  letter-spacing: 0.28em; text-indent: 0.28em;
  cursor: pointer;
  transition: all 0.22s;
}
.btn-cast:hover { background: rgba(201,162,75,0.16); box-shadow: 0 0 18px rgba(201,162,75,0.2); }
.btn-cast:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================================
   静心仪式（焚香 · 默祷 · 三请）
   ============================================================ */
/* -- 仪式页背景：用户提供的完整烟雾视频 -- */
#view-ritual {
  position: relative;
  background: #07090a;
  overflow: hidden;
  isolation: isolate;
}
.ritual-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.ritual-background-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(1) contrast(1.08) saturate(0.82);
  pointer-events: none;
}
/* 黑色压暗层：叠加在视频之上、::after 聚焦遮罩之下，统一控制视频亮度。
   调亮调暗只改这一个 opacity。当前 0.4 = 压暗 40%（原0.2不够，再加20）。 */
.ritual-video-dim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  pointer-events: none;
}
.ritual-atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 48%, rgba(4,7,8,0.5) 0%, rgba(4,7,8,0.28) 36%, rgba(4,7,8,0.16) 66%, rgba(4,7,8,0.32) 100%),
    linear-gradient(180deg, rgba(4,7,8,0.15) 0%, transparent 42%, rgba(4,7,8,0.35) 100%);
  pointer-events: none;
}
.ritual-wrap {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 24px; text-align: center;
}
/* —— 香炉场景：抠图香体 + 火星脉动 + Qoder 原始 canvas 青烟 —— */
.incense-scene { position: relative; width: 170px; height: 300px; margin-bottom: 10px; }
.incense-img {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  height: 205px; width: auto;
  filter: drop-shadow(0 0 14px rgba(229,110,77,0.22));
}
/* 三支香：两侧略短、向外微倾，如插在香炉中 */
.incense-img.i-left {
  height: 188px; left: calc(50% - 30px);
  transform: translateX(-50%) rotate(-7deg); transform-origin: bottom center;
  opacity: 0.92;
}
.incense-img.i-right {
  height: 188px; left: calc(50% + 30px);
  transform: translateX(-50%) rotate(7deg); transform-origin: bottom center;
  opacity: 0.92;
}
/* 烟画布向上、向两侧外扩，烟飘出香景范围也不会被边界切断 */
.smoke-canvas {
  position: absolute; left: -70px; top: -110px;
  width: calc(100% + 140px); height: calc(100% + 110px);
  pointer-events: none;
}
.ember-glow { /* 香头火星：小而亮的星点，不规则明暗闪烁（非大光球） */
  position: absolute; left: 50%; top: 131px; transform: translate(-50%, -50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,214,150,0.95) 0%, rgba(255,120,60,0.55) 32%, rgba(229,72,77,0.18) 58%, transparent 74%);
  animation: ember-flicker 1.7s ease-in-out infinite;
  pointer-events: none;
}
.ember-glow.e-left  { left: calc(50% - 50px); top: 146px; width: 12px; height: 12px; animation-delay: 0.7s; animation-duration: 2.1s; }
.ember-glow.e-right { left: calc(50% + 50px); top: 146px; width: 12px; height: 12px; animation-delay: 1.3s; animation-duration: 1.9s; }
@keyframes ember-flicker { /* 不等距关键帧模拟炭火芯的无序呼吸 */
  0%, 100% { opacity: 0.5;  transform: translate(-50%, -50%) scale(0.88); }
  17%      { opacity: 0.95; transform: translate(-50%, -50%) scale(1.08); }
  31%      { opacity: 0.62; transform: translate(-50%, -50%) scale(0.94); }
  49%      { opacity: 1;    transform: translate(-50%, -50%) scale(1.18); }
  68%      { opacity: 0.7;  transform: translate(-50%, -50%) scale(0.98); }
  84%      { opacity: 0.88; transform: translate(-50%, -50%) scale(1.06); }
}

/* —— 呼吸引导：同心涟漪 + 光晕 orb + 吸呼同步 —— */
.breath-guide {
  position: relative; width: 150px; height: 150px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 26px;
}
/* 呼吸金环：吸气时金弧沿环渐满，屏息含光，呼气渐空（JS 驱动 dashoffset） */
.breath-ring {
  position: absolute; inset: 0; width: 100%; height: 100%;
  transform: rotate(-90deg);
}
.breath-ring .ring-base {
  fill: none; stroke: rgba(201,162,75,0.16); stroke-width: 1;
}
.breath-ring .ring-arc {
  fill: none; stroke: var(--wony-lijin); stroke-width: 2.5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(220,175,94,0.55));
  transition: opacity 0.6s ease;
}
.breath-label {
  position: relative; z-index: 2;
  font-family: var(--wony-font-serif); font-size: 15px; letter-spacing: 0.3em; text-indent: 0.3em;
  color: var(--wony-foreground);
  text-shadow: 0 0 12px rgba(14,12,20,0.9);
}
.ritual-stage {
  font-family: var(--wony-font-serif); font-weight: 600;
  font-size: 30px; letter-spacing: 0.4em; text-indent: 0.4em;
  color: var(--wony-foreground);
  transition: opacity 0.5s;
}
.ritual-sub { margin-top: 12px; color: var(--wony-muted-foreground); font-size: 14px; letter-spacing: 0.1em; transition: opacity 0.5s; }
.ritual-enter { margin-top: 44px; min-width: 200px; opacity: 0; pointer-events: none; transition: opacity 0.6s; }
.ritual-enter.show { opacity: 1; pointer-events: auto; }
.ritual-skip { margin-top: 18px; background: none; border: none; color: rgba(185,178,164,0.45); font-size: 12px; letter-spacing: 0.1em; cursor: pointer; }
.ritual-skip:hover { color: var(--wony-muted-foreground); }
@media (prefers-reduced-motion: reduce) {
  .ember-glow { animation: none; }
}

/* ============================================================
   揲蓍法（蓍草策数）
   ============================================================ */
.yarrow-area { text-align: center; margin: 36px 0 14px; }
.yarrow-visual { position: relative; width: 250px; height: 190px; margin: 0 auto 10px; perspective: 800px; }
.yarrow-visual::before { /* 背后暖光晕，使蓍草融入场景 */
  content: ""; position: absolute; left: 50%; top: 55%; transform: translate(-50%, -50%);
  width: 180px; height: 150px; border-radius: 50%;
  background:
    radial-gradient(circle, rgba(220,175,94,0.18) 0%, rgba(201,162,75,0.05) 55%, transparent 76%);
  pointer-events: none;
}
.yarrow-visual::after {
  content: ""; position: absolute; left: 50%; bottom: 20px;
  width: 170px; height: 24px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.5), transparent 72%);
  pointer-events: none;
}
.yarrow-bundle {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,0.52));
}
.yarrow-bundle.split {
  filter: drop-shadow(0 16px 24px rgba(0,0,0,0.56));
}
.yarrow-stalk {
  position: absolute;
  left: 50%; bottom: 28px;
  width: var(--w, 3px); height: var(--h, 118px);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255,246,194,0.7), rgba(183,140,54,0.96) 34%, rgba(82,110,80,0.95) 74%, rgba(37,50,39,0.92)),
    linear-gradient(180deg, rgba(255,255,255,0.42), transparent 26%, rgba(0,0,0,0.18));
  box-shadow:
    inset 0 0 0 1px rgba(255,236,180,0.08),
    0 0 9px rgba(201,162,75,0.15);
  transform-origin: 50% 96%;
  transform:
    translateX(var(--x, 0px))
    translateY(var(--y, 0px))
    rotate(var(--r, 0deg))
    rotateX(var(--rx, 0deg));
  opacity: 0.96;
  will-change: transform, opacity;
}
.yarrow-stalk::before {
  content: ""; position: absolute; left: 50%; top: -5px;
  width: 6px; height: 9px; border-radius: 50% 50% 42% 42%;
  transform: translateX(-50%);
  background: rgba(220,175,94,0.76);
  box-shadow: 0 0 8px rgba(220,175,94,0.26);
}
.yarrow-stalk.removed {
  opacity: 0;
  pointer-events: none;
}
.yarrow-glint {
  position: absolute;
  width: 5px; height: 5px; border-radius: 50%;
  left: 50%; top: 46%;
  background: rgba(245,227,176,0.9);
  box-shadow: 0 0 12px 3px rgba(220,175,94,0.45);
  pointer-events: none;
  animation: yarrow-glint 0.72s ease-out forwards;
}
@keyframes yarrow-glint {
  from { opacity: 0.9; transform: translate(-50%, -50%) scale(0.8); }
  to { opacity: 0; transform: translate(var(--gx, 40px), var(--gy, -30px)) scale(0.2); }
}
.yarrow-count { font-family: var(--wony-font-latin); color: var(--wony-primary); }
.yarrow-count #yarrow-count { font-size: 44px; font-weight: 600; }
.yarrow-unit { font-size: 14px; margin-left: 6px; color: var(--wony-muted-foreground); font-family: var(--wony-font-serif); }
.yarrow-changes { display: flex; justify-content: center; gap: 18px; margin-top: 16px; }
.ychange {
  font-family: var(--wony-font-serif); font-size: 13px; letter-spacing: 0.1em;
  color: rgba(185,178,164,0.35);
  padding: 4px 12px; border-radius: 9999px;
  border: 1px solid transparent;
  transition: all 0.4s;
}
.ychange.active { color: var(--wony-primary); border-color: rgba(201,162,75,0.5); background: rgba(201,162,75,0.08); }
.ychange.done { color: var(--wony-lijin); }

/* ============================================================
   解读页
   ============================================================ */
.result-hero { text-align: center; }
.result-ord { font-family: var(--wony-font-latin); color: var(--wony-primary); font-size: 14px; letter-spacing: 0.3em; }
.result-name {
  margin-top: 10px;
  font-family: var(--wony-font-serif);
  font-weight: 700;
  color: var(--wony-foreground);
  font-size: 40px;
  letter-spacing: 0.12em;
  line-height: 1.3;
}
.result-duanyu {
  margin-top: 12px;
  font-family: var(--wony-font-serif);
  font-weight: 500;
  color: var(--wony-primary);
  font-size: 18px;
  letter-spacing: 0.06em;
}
.result-tags { margin-top: 16px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.source-strip {
  margin: 16px auto 0;
  max-width: 520px;
  padding: 9px 14px;
  border-top: 1px solid rgba(201,162,75,0.22);
  border-bottom: 1px solid rgba(201,162,75,0.14);
  color: rgba(236,230,216,0.72);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.08em;
}
.tag-nature { color: var(--wony-primary); border: 1px solid rgba(201,162,75,0.55); background: rgba(201,162,75,0.08); }
.tag-shishi-tong { color: var(--wony-primary); border: 1px solid rgba(201,162,75,0.55); background: rgba(201,162,75,0.1); }
.tag-shishi-he { color: var(--wony-yu); border: 1px solid rgba(91,140,122,0.55); background: rgba(91,140,122,0.1); }
.tag-shishi-bian { color: var(--wony-zhu); border: 1px solid rgba(194,69,58,0.55); background: rgba(194,69,58,0.1); }
.tag-shishi-dai, .tag-shishi-zhi { color: var(--wony-muted-foreground); border: 1px solid rgba(185,178,164,0.4); background: rgba(185,178,164,0.08); }

.result-hex { display: flex; justify-content: center; }
.result-hex .yao-stack { width: 240px; }

.section { margin-top: 6px; }
.section .classic { margin-top: 14px; }
.section .translate { margin-top: 10px; }
.section .sub-block { margin-top: 18px; }
.section .sub-block + .sub-block { margin-top: 22px; }
.yao-line-name { font-family: var(--wony-font-serif); color: var(--wony-lijin); font-size: 15px; letter-spacing: 0.08em; display: flex; align-items: center; gap: 8px; }
.yao-line-name .bian-mark { font-size: 11px; color: var(--wony-zhu); border: 1px solid rgba(194,69,58,0.6); border-radius: var(--wony-radius-sm); padding: 0 5px; }
.transform-note { margin-top: 8px; color: var(--wony-lijin); font-size: 13px; font-family: var(--wony-font-serif); letter-spacing: 0.04em; }

/* 六域映照 */
.domain-result-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.conclusion-card {
  margin-top: 18px;
  background:
    linear-gradient(135deg, rgba(201,162,75,0.14), transparent 34%),
    linear-gradient(180deg, rgba(28,24,38,0.95), rgba(14,12,20,0.88));
  border-color: rgba(201,162,75,0.34);
  box-shadow: 0 18px 42px rgba(0,0,0,0.28), inset 0 0 0 1px rgba(236,230,216,0.03);
}
.verdict-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.verdict-kicker {
  font-family: var(--wony-font-serif);
  color: var(--wony-primary);
  font-size: 13px;
  letter-spacing: 0.28em;
}
.verdict-domain {
  color: var(--wony-muted-foreground);
  font-size: 12px;
  letter-spacing: 0.16em;
}
.verdict-body {
  margin-top: 14px;
  color: var(--wony-foreground);
  font-family: var(--wony-font-serif);
  font-size: 16px;
  line-height: 2;
}
.verdict-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 10px;
  margin-top: 16px;
}
.verdict-cell {
  padding: 12px 14px;
  border: 1px solid rgba(201,162,75,0.18);
  border-radius: var(--wony-radius-sm);
  background: rgba(14,12,20,0.42);
}
.verdict-cell span {
  display: block;
  color: var(--wony-primary);
  font-size: 11px;
  letter-spacing: 0.18em;
}
.verdict-cell b {
  display: block;
  margin-top: 6px;
  color: rgba(236,230,216,0.86);
  font-size: 12px;
  line-height: 1.65;
  font-weight: 400;
}
.verdict-boundary {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px dashed rgba(201,162,75,0.2);
  color: rgba(185,178,164,0.78);
  font-size: 12px;
  line-height: 1.7;
}
.suggest-row { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.suggest { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: var(--wony-radius-sm); font-size: 12px; white-space: nowrap; }
.suggest-yi { color: var(--wony-primary); border: 1px solid rgba(201,162,75,0.5); background: rgba(201,162,75,0.08); }
.suggest-jie { color: var(--wony-zhu); border: 1px solid rgba(194,69,58,0.5); background: rgba(194,69,58,0.08); }

/* 变卦 */
.bian-row { display: flex; align-items: center; gap: 20px; margin-top: 16px; }
.bian-row .yao-stack.mini { width: 80px; flex: none; }
.bian-name { font-family: var(--wony-font-serif); font-weight: 500; color: var(--wony-primary); font-size: 17px; letter-spacing: 0.05em; }
.bian-desc { margin-top: 8px; font-size: 13px; line-height: 1.75; }

/* 卦象关联 */
.relations-grid { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.relation-item {
  background: rgba(28,24,38,0.5);
  border: 1px solid rgba(201,162,75,0.14);
  border-radius: var(--wony-radius-md);
  padding: 14px 16px;
}
.relation-label { font-size: 12px; color: var(--wony-muted-foreground); letter-spacing: 0.08em; }
.relation-value { margin-top: 6px; font-family: var(--wony-font-serif); color: var(--wony-foreground); font-size: 16px; letter-spacing: 0.04em; }
.relation-value .seq { color: var(--wony-primary); font-size: 13px; margin-left: 6px; }
.relation-sub { margin-top: 4px; font-size: 12px; color: var(--wony-muted-foreground); }
@media (max-width: 480px) { .relations-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .verdict-grid { grid-template-columns: 1fr; } }

/* 建议卡 */
.advice-card .advice-text { font-family: var(--wony-font-serif); font-size: 15px; line-height: 1.95; color: var(--wony-foreground); }
/* 吉凶等级徽章（上上签/上签/中签/下签/下下签，五色分层） */
.grade-badge {
  margin-top: 14px;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-radius: var(--wony-radius-md);
  border: 1px solid;
  flex-wrap: wrap;
}
.grade-badge .grade-mark {
  font-family: var(--wony-font-serif); font-size: 20px; font-weight: 700;
  letter-spacing: 0.08em; line-height: 1;
}
.grade-badge .grade-judge {
  font-family: var(--wony-font-sans); font-size: 13px; font-weight: 500;
  padding: 3px 10px; border-radius: 999px; letter-spacing: 0.1em;
}
.grade-badge .grade-basis {
  font-family: var(--wony-font-serif); font-size: 13px; line-height: 1.7;
  color: var(--wony-muted-foreground); flex: 1; min-width: 120px;
}
/* 上上签：金红大吉 */
.grade-supreme { background: linear-gradient(135deg, rgba(201,162,75,0.18), rgba(201,80,60,0.10)); border-color: rgba(201,162,75,0.55); }
.grade-supreme .grade-mark { color: #d4a84a; }
.grade-supreme .grade-judge { background: rgba(201,162,75,0.22); color: #e8c878; }
/* 上签：吉，青金 */
.grade-good { background: linear-gradient(135deg, rgba(120,170,110,0.14), rgba(201,162,75,0.08)); border-color: rgba(120,170,110,0.45); }
.grade-good .grade-mark { color: #8dbf7a; }
.grade-good .grade-judge { background: rgba(120,170,110,0.20); color: #a8d098; }
/* 中签：平，灰 */
.grade-neutral { background: rgba(150,150,160,0.10); border-color: rgba(150,150,160,0.38); }
.grade-neutral .grade-mark { color: #b8b8c0; }
.grade-neutral .grade-judge { background: rgba(150,150,160,0.18); color: #c8c8d0; }
/* 下签：有险，橙 */
.grade-bad { background: linear-gradient(135deg, rgba(200,130,50,0.16), rgba(200,90,50,0.10)); border-color: rgba(200,130,50,0.48); }
.grade-bad .grade-mark { color: #d99a4a; }
.grade-bad .grade-judge { background: rgba(200,130,50,0.22); color: #e8b46a; }
/* 下下签：凶，暗红 */
.grade-worst { background: linear-gradient(135deg, rgba(160,50,50,0.20), rgba(120,30,30,0.12)); border-color: rgba(160,50,50,0.55); }
.grade-worst .grade-mark { color: #c75450; }
.grade-worst .grade-judge { background: rgba(160,50,50,0.28); color: #e0807c; }
/* 白话提要（口语化，醒目易读） */
.plain-card {
  margin-top: 14px;
  background: linear-gradient(135deg, rgba(201,162,75,0.10) 0%, rgba(201,162,75,0.04) 100%);
  border: 1px solid rgba(201,162,75,0.35);
  border-left: 3px solid var(--wony-primary);
  border-radius: var(--wony-radius-md);
  padding: 18px 20px;
}
.plain-label {
  display: inline-block;
  font-family: var(--wony-font-sans); font-size: 12px; font-weight: 500;
  color: var(--wony-primary); letter-spacing: 0.14em;
  margin-bottom: 10px;
}
.plain-text { font-family: var(--wony-font-sans); font-size: 16px; line-height: 1.9; color: var(--wony-foreground); }
.advice-classic { margin-top: 14px; font-family: var(--wony-font-serif); font-size: 13px; line-height: 1.8; color: var(--wony-muted-foreground); }

/* 追问解惑 */
.ask-hint { margin-top: 12px; font-size: 13px; color: var(--wony-muted-foreground); line-height: 1.7; }
.ask-row { display: flex; gap: 10px; margin-top: 14px; }
.ask-input {
  flex: 1; min-width: 0;
  background: var(--wony-popover);
  border: 1px solid var(--wony-input);
  border-radius: var(--wony-radius-md);
  padding: 12px 14px;
  color: var(--wony-foreground);
  font-family: var(--wony-font-sans); font-size: 14px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.ask-input::placeholder { color: rgba(185,178,164,0.4); }
.ask-input:focus { border-color: var(--wony-primary); box-shadow: 0 0 0 3px rgba(201,162,75,0.12); }
.btn-ask {
  flex: none;
  min-height: 46px; padding: 0 22px;
  border: 1px solid var(--wony-primary);
  border-radius: var(--wony-radius-md);
  background: rgba(201,162,75,0.1);
  color: var(--wony-primary);
  font-family: var(--wony-font-serif); font-size: 15px; font-weight: 500;
  letter-spacing: 0.2em; text-indent: 0.2em;
  cursor: pointer;
  transition: all 0.22s;
}
.btn-ask:hover { background: rgba(201,162,75,0.18); box-shadow: 0 0 16px rgba(201,162,75,0.2); }
.ask-card {
  margin-top: 16px;
  background: linear-gradient(135deg, rgba(28,24,38,0.9) 0%, rgba(22,19,31,0.9) 100%);
  border: 1px solid rgba(201,162,75,0.3);
  border-radius: var(--wony-radius-md);
  padding: 18px 20px;
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.ask-card.show { opacity: 1; transform: translateY(0); }
.ask-echo { font-family: var(--wony-font-serif); font-size: 14px; color: var(--wony-lijin); letter-spacing: 0.04em; }
.ask-fallback { margin-top: 10px; font-size: 13px; line-height: 1.7; color: var(--wony-muted-foreground); }
.ask-lead { margin-top: 10px; font-size: 14px; line-height: 1.8; color: var(--wony-foreground); }
.ask-key { color: var(--wony-primary); font-weight: 600; font-family: var(--wony-font-serif); }
.ask-steps { margin: 12px 0 0; padding-left: 20px; }
.ask-steps li { font-size: 14px; line-height: 1.9; color: var(--wony-foreground); margin-bottom: 8px; }
.ask-steps li::marker { color: var(--wony-primary); font-family: var(--wony-font-serif); }
.ask-xiang { margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(201,162,75,0.25); font-family: var(--wony-font-serif); font-size: 13px; line-height: 1.8; color: var(--wony-muted-foreground); }
.ask-loading { margin-top: 12px; font-family: var(--wony-font-serif); font-size: 14px; color: var(--wony-primary); letter-spacing: 0.06em; }
.ask-dots::after { content: ""; animation: ask-dots 1.4s steps(4, end) infinite; }
@keyframes ask-dots {
  0% { content: ""; } 25% { content: "·"; } 50% { content: "··"; } 75% { content: "···"; } 100% { content: ""; }
}
.ask-llm-text { margin-top: 12px; font-size: 15px; line-height: 1.95; color: var(--wony-foreground); white-space: pre-wrap; }
.ask-llm-text:empty { display: none; }

/* 操作 */
.actions { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 6px; }
.btn-ghost {
  min-height: 50px;
  border: 1px solid var(--wony-border);
  border-radius: var(--wony-radius-md);
  background: transparent;
  color: var(--wony-foreground);
  font-family: var(--wony-font-sans); font-size: 15px;
  letter-spacing: 0.2em; text-indent: 0.2em;
  cursor: pointer;
  transition: all 0.22s;
}
.btn-ghost:hover { border-color: rgba(201,162,75,0.5); background: rgba(201,162,75,0.06); }
.btn-ghost.primary {
  border-color: var(--wony-primary);
  color: var(--wony-primary);
  background: rgba(201,162,75,0.08);
  font-family: var(--wony-font-serif); font-weight: 500;
}
.btn-ghost.primary:hover { background: rgba(201,162,75,0.16); }

/* 免责 */
.disclaimer { text-align: center; }
.disclaimer p { font-size: 12px; color: rgba(185,178,164,0.7); line-height: 1.8; }
.disclaimer .source-note { margin-top: 8px; font-size: 11px; color: rgba(185,178,164,0.5); }

/* 加载 */
.loading {
  position: fixed; inset: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--wony-background);
  transition: opacity 0.6s;
}
.loading.hide { opacity: 0; pointer-events: none; }
.loading .taiji { font-size: 40px; color: var(--wony-primary); animation: spin-slow 6s linear infinite; }
@keyframes spin-slow { to { transform: rotate(360deg); } }
.loading p { margin-top: 18px; color: var(--wony-muted-foreground); font-size: 13px; letter-spacing: 0.2em; }
@media (prefers-reduced-motion: reduce) { .loading .taiji { animation: none; } }

/* ============================================================
   动效增强（惊艳层）
   ============================================================ */

/* —— 起卦页：标题逐字 + 印章 + CTA 呼吸 —— */
.home-title .ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(18px);
  animation: ch-in 0.8s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes ch-in { to { opacity: 1; transform: translateY(0); } }
.taiji-wrap {
  width: 100px; height: 100px;
  margin: 0 auto 28px;
  animation: seal-stamp 0.8s cubic-bezier(0.3, 1.4, 0.5, 1) 0.1s both;
}
.taiji-img {
  width: 100%; height: 100%;
  object-fit: contain;
  animation: taiji-spin 40s linear infinite;
  filter: drop-shadow(0 0 22px rgba(201,162,75,0.28));
}
@keyframes taiji-spin { to { transform: rotate(360deg); } }
@keyframes seal-stamp {
  0% { opacity: 0; transform: scale(1.8) rotate(-14deg); }
  60% { opacity: 1; transform: scale(0.94) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
.btn-primary { animation: cta-breathe 3.2s ease-in-out infinite; }
@keyframes cta-breathe {
  0%, 100% { box-shadow: 0 4px 20px rgba(201,162,75,0.22); }
  50% { box-shadow: 0 6px 32px rgba(201,162,75,0.45); }
}

/* —— 筮法页：成爻鎏金扫光 —— */
.cast-hex .yao-row.show .yao-bar,
.cast-hex .yao-row.show .yao-yin > span {
  position: relative; overflow: hidden;
}
.cast-hex .yao-row.show .yao-bar::after,
.cast-hex .yao-row.show .yao-yin > span::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,236,180,0.85) 50%, transparent 80%);
  transform: translateX(-120%);
  animation: yao-shimmer 0.9s ease-out 0.1s forwards;
}
@keyframes yao-shimmer { to { transform: translateX(120%); } }

/* —— 解读页：卦名鎏金流光 —— */
.result-name {
  background: linear-gradient(100deg, var(--wony-foreground) 30%, var(--wony-lijin) 48%, #F5E3B0 52%, var(--wony-foreground) 70%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: name-shimmer 5s ease-in-out infinite;
}
@keyframes name-shimmer {
  0%, 100% { background-position: 120% 0; }
  50% { background-position: -20% 0; }
}

/* —— 解读页：六爻自下而上画出 —— */
.result-hex .yao-row {
  opacity: 0;
  transform: scaleX(0.3);
  transform-origin: center;
  animation: yao-draw 0.55s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes yao-draw { to { opacity: 1; transform: scaleX(1); } }

/* —— 解读页：分层渐次入场 —— */
.result-anim {
  opacity: 0;
  transform: translateY(16px);
  animation: rise-in 0.65s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes rise-in { to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .oracle-field, .cursor-aura { transition: none; }
  .yarrow-glint { animation: none; display: none; }
  .btn-primary, .result-name,
  .home-title .ch, .taiji-wrap, .taiji-img,
  .result-hex .yao-row, .result-anim,
  .cast-hex .yao-row.show .yao-bar::after,
  .cast-hex .yao-row.show .yao-yin > span::after { animation: none; }
  .home-title .ch, .result-hex .yao-row, .result-anim { opacity: 1; transform: none; }
}

/* ============================================================
   音效开关（右上浮动）
   ============================================================ */
.audio-toggle {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 14px);
  right: calc(env(safe-area-inset-right) + 16px);
  z-index: 100;
  width: 38px; height: 38px;
  border: 1px solid rgba(201, 162, 75, 0.42);
  border-radius: 50%;
  background: rgba(14, 12, 20, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--wenyi-gold, #C9A24B);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  transition: border-color .25s, transform .2s, background .25s;
  -webkit-tap-highlight-color: transparent;
}
.audio-toggle:hover { border-color: rgba(201, 162, 75, 0.75); transform: scale(1.06); }
.audio-toggle:active { transform: scale(0.94); }
.audio-toggle .audio-off { display: none; }
.audio-toggle.muted .audio-on { display: none; }
.audio-toggle.muted .audio-off { display: inline; }
.audio-toggle.muted { opacity: 0.5; }
@media (prefers-reduced-motion: reduce) {
  .audio-toggle { transition: none; }
  .audio-toggle:hover, .audio-toggle:active { transform: none; }
}

/* ============================================================
   我的占卜入口 + 到期提醒角标
   ============================================================ */
.home-collect-entry {
  margin-top: 12px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
}
.collect-count { font-size: 12px; color: var(--wenyi-gold, #C9A24B); opacity: 0.7; }
.remind-badge {
  position: absolute; top: -4px; right: 10px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 9px; background: #C9484B; color: #fff;
  font-size: 10px; line-height: 16px; text-align: center;
  box-shadow: 0 0 8px rgba(201,72,75,0.6);
  animation: remind-pulse 1.8s ease-in-out infinite;
}
@keyframes remind-pulse { 0%,100%{transform:scale(1);} 50%{transform:scale(1.18);} }
@media (prefers-reduced-motion: reduce) { .remind-badge { animation: none; } }

/* ============================================================
   我的占卜视图
   ============================================================ */
.collection-wrap { padding-top: 20px; padding-bottom: 48px; }
.collection-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.collection-back { padding: 6px 14px; }
.collection-title {
  font-family: "Noto Serif SC", serif;
  color: var(--wenyi-gold, #C9A24B);
  font-size: 22px; letter-spacing: 4px; font-weight: 500;
}
.collection-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.stat-chip {
  flex: 1; min-width: 100px;
  background: rgba(201,162,75,0.06);
  border: 1px solid rgba(201,162,75,0.22);
  border-radius: 10px; padding: 10px 12px; text-align: center;
}
.stat-chip .stat-val {
  font-size: 22px; color: var(--wenyi-gold, #C9A24B);
  font-family: "Noto Serif SC", serif; font-weight: 600; line-height: 1.2;
}
.stat-chip .stat-lbl { font-size: 11px; opacity: 0.6; margin-top: 2px; }
.collection-empty {
  text-align: center; padding: 60px 20px;
  color: rgba(236,230,216,0.45);
  font-family: "Noto Serif SC", serif;
}
.collect-item {
  border: 1px solid rgba(201,162,75,0.2); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 12px;
  background: rgba(14,12,20,0.5); transition: border-color .25s; cursor: pointer;
}
.collect-item:hover { border-color: rgba(201,162,75,0.5); }
.collect-item.due { border-color: rgba(201,72,75,0.55); }
.collect-item-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.collect-item-name { font-family:"Noto Serif SC",serif; font-size: 19px; color: var(--wenyi-gold,#C9A24B); }
.collect-item-seq { font-size: 11px; opacity: 0.5; }
.collect-item-q { font-size: 13px; opacity: 0.7; margin-bottom: 8px; line-height: 1.5; }
.collect-item-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11px; opacity: 0.55; align-items: center; }
.verify-status { font-size: 11px; padding: 2px 8px; border-radius: 8px; border: 1px solid rgba(201,162,75,0.3); }
.verify-status.fulfilled { color: #6FB58E; border-color: rgba(111,181,142,0.5); }
.verify-status.partial { color: #C9A24B; border-color: rgba(201,162,75,0.5); }
.verify-status.unfulfilled { color: #C9484B; border-color: rgba(201,72,75,0.5); }
.verify-status.due { color: #E89A4B; border-color: rgba(232,154,75,0.6); background: rgba(232,154,75,0.08); }

/* 应验回填弹层 */
.verify-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.66);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.verify-modal-card {
  background: rgba(22,19,32,0.92); border: 1px solid rgba(201,162,75,0.4);
  border-radius: 16px; padding: 24px; max-width: 380px; width: 100%;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.verify-modal-card h3 {
  font-family:"Noto Serif SC",serif; color: var(--wenyi-gold,#C9A24B);
  font-size: 18px; margin-bottom: 6px; letter-spacing: 2px;
}
.verify-modal-card .vm-sub { font-size: 12px; opacity: 0.6; margin-bottom: 16px; }
.verify-choices { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.verify-choice {
  flex: 1; min-width: 90px; padding: 12px 8px; border-radius: 10px;
  border: 1px solid rgba(201,162,75,0.3); background: rgba(201,162,75,0.05);
  color: var(--wenyi-gold,#C9A24B); font-family:"Noto Serif SC",serif; font-size: 14px;
  cursor: pointer; text-align: center; transition: all .2s;
}
.verify-choice:hover { border-color: rgba(201,162,75,0.7); background: rgba(201,162,75,0.12); }
.verify-choice.sel { border-color: var(--wenyi-gold,#C9A24B); background: rgba(201,162,75,0.18); }
.verify-choice.fulfilled.sel { color:#6FB58E; border-color:#6FB58E; background: rgba(111,181,142,0.15); }
.verify-choice.unfulfilled.sel { color:#C9484B; border-color:#C9484B; background: rgba(201,72,75,0.15); }
.verify-note-input {
  width: 100%; box-sizing: border-box;
  background: rgba(14,12,20,0.6); border: 1px solid rgba(201,162,75,0.25);
  border-radius: 8px; color: rgba(236,230,216,0.9);
  padding: 10px 12px; font-size: 13px; font-family: inherit;
  resize: vertical; min-height: 60px; margin-bottom: 14px;
}
.verify-expected-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 12px; opacity: 0.8; flex-wrap: wrap; }
.verify-expected-row input[type=date] {
  background: rgba(14,12,20,0.6); border:1px solid rgba(201,162,75,0.25);
  border-radius: 6px; color: rgba(236,230,216,0.9); padding: 6px 8px; font-size: 12px;
  color-scheme: dark;
}
.verify-actions { display: flex; gap: 10px; justify-content: flex-end; }
.verify-actions .btn-ghost { padding: 8px 16px; }
.verify-actions .btn-primary { padding: 8px 18px; }

/* 结果页收藏按钮 */
.result-actions-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn-collected { opacity: 0.55; }

/* ============================================================
   每日宜忌卡（日活入口）
   ============================================================ */
.daily-card {
  width: 100%;
  max-width: 420px;
  margin: 18px auto 6px;
  border: 1px solid rgba(201,162,75,0.28);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(201,162,75,0.07), rgba(14,12,20,0.4));
  padding: 16px 18px;
  box-sizing: border-box;
}
.daily-date-row {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px; flex-wrap: wrap; gap: 6px;
}
.daily-date {
  font-family: "Noto Serif SC", serif;
  color: var(--wenyi-gold, #C9A24B);
  font-size: 15px; letter-spacing: 1px;
}
.daily-ganzhi { font-size: 12px; opacity: 0.6; }
.daily-jieqi-badge {
  font-size: 11px; padding: 3px 10px; border-radius: 10px;
  border: 1px solid rgba(201,162,75,0.4); color: var(--wenyi-gold,#C9A24B);
}
.daily-yiji-row { display: flex; gap: 14px; margin-bottom: 12px; }
.daily-yiji-col { flex: 1; }
.daily-yiji-label { font-size: 11px; opacity: 0.55; margin-bottom: 4px; letter-spacing: 2px; }
.daily-yiji-label.yi { color: #6FB58E; }
.daily-yiji-label.ji { color: #C9484B; }
.daily-yiji-val { font-family:"Noto Serif SC",serif; font-size: 14px; color: rgba(236,230,216,0.92); }
.daily-jieqi-hex {
  display: flex; align-items: center; gap: 10px;
  padding-top: 10px; border-top: 1px solid rgba(201,162,75,0.15);
  font-size: 12px; opacity: 0.78; flex-wrap: wrap;
}
.daily-jieqi-hex .jh-name {
  font-family:"Noto Serif SC",serif; color: var(--wenyi-gold,#C9A24B);
  font-size: 16px; margin: 0 2px;
}
.daily-toggle {
  margin-left: auto; cursor: pointer; color: var(--wenyi-gold,#C9A24B);
  font-size: 11px; opacity: 0.7; user-select: none;
}
.daily-toggle:hover { opacity: 1; }
.daily-hourly {
  display: none; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid rgba(201,162,75,0.15);
  flex-wrap: wrap; gap: 4px 10px;
}
.daily-hourly.show { display: flex; }
.hourly-item {
  font-size: 11px; opacity: 0.72; white-space: nowrap;
}
.hourly-item .hi-name { color: var(--wenyi-gold,#C9A24B); font-family:"Noto Serif SC",serif; }

/* ============================================================
   卦运档案（趋势/同问演化/热力图）
   ============================================================ */
.profile-section { margin-bottom: 18px; }
.profile-list-title {
  font-family: "Noto Serif SC", serif;
  color: var(--wenyi-gold, #C9A24B);
  font-size: 15px; letter-spacing: 3px;
  margin: 18px 0 12px; opacity: 0.85;
  border-top: 1px solid rgba(201,162,75,0.18);
  padding-top: 14px;
}
.profile-block {
  border: 1px solid rgba(201,162,75,0.18);
  border-radius: 12px;
  padding: 14px 16px; margin-bottom: 12px;
  background: rgba(14,12,20,0.4);
}
.profile-block-title {
  font-family: "Noto Serif SC", serif;
  color: var(--wenyi-gold,#C9A24B); font-size: 14px;
  letter-spacing: 2px; margin-bottom: 10px;
}
.profile-block-sub { font-size: 11px; opacity: 0.55; margin-bottom: 10px; }

/* 卦运趋势线 */
.trend-svg { width: 100%; height: 60px; display: block; }
.trend-empty { font-size: 12px; opacity: 0.45; text-align: center; padding: 16px; }

/* 同问演化 */
.evo-group { margin-bottom: 14px; }
.evo-q { font-size: 13px; color: rgba(236,230,216,0.85); margin-bottom: 6px; }
.evo-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.evo-node {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 8px;
  border: 1px solid rgba(201,162,75,0.3);
  font-family:"Noto Serif SC",serif; font-size: 13px;
  color: var(--wenyi-gold,#C9A24B);
}
.evo-node .evo-date { font-size: 10px; opacity: 0.5; }
.evo-arrow { color: rgba(201,162,75,0.5); font-size: 12px; }

/* 卦象热力图 */
.heatmap-wrap { overflow-x: auto; padding-bottom: 4px; }
.heatmap {
  display: grid;
  grid-template-rows: repeat(7, 12px);
  grid-auto-flow: column;
  grid-auto-columns: 12px;
  gap: 3px;
  min-width: 100%;
}
.hm-cell { width: 12px; height: 12px; border-radius: 2px; background: rgba(201,162,75,0.06); }
.hm-cell.l1 { background: rgba(201,162,75,0.35); }
.hm-cell.l2 { background: rgba(201,162,75,0.6); }
.hm-cell.l3 { background: rgba(201,162,75,0.9); }
.hm-legend { display: flex; align-items: center; gap: 4px; font-size: 10px; opacity: 0.5; margin-top: 8px; justify-content: flex-end; }
.hm-legend .hm-cell { width: 10px; height: 10px; }
.hm-streak {
  display: inline-block; margin-left: 8px;
  font-size: 12px; color: var(--wenyi-gold,#C9A24B);
}
@media (prefers-reduced-motion: reduce) { .remind-badge { animation: none; } }

/* ============================================================
   师承占语 + 古籍印证（E）
   ============================================================ */
.oracle-section { text-align: center; padding: 6px 4px; }
.oracle-text {
  font-family: "Noto Serif SC", serif;
  color: var(--wenyi-gold, #C9A24B);
  font-size: 15px; line-height: 1.9; letter-spacing: 1px;
  opacity: 0.92;
}
.classics-section { padding: 4px 0; }
.classics-item {
  display: flex; gap: 8px; padding: 6px 0;
  border-bottom: 1px dashed rgba(201,162,75,0.12);
  font-size: 13px; line-height: 1.7;
}
.classics-item:last-child { border-bottom: none; }
.classics-src {
  flex-shrink: 0; color: var(--wenyi-gold, #C9A24B);
  font-family: "Noto Serif SC", serif; opacity: 0.8; white-space: nowrap;
}
.classics-txt { color: rgba(236,230,216,0.78); }
.disclaimer .dao-disclaimer {
  font-family: "Noto Serif SC", serif;
  color: var(--wenyi-gold, #C9A24B);
  font-size: 14px; letter-spacing: 2px; text-align: center;
  margin-bottom: 8px; opacity: 0.88;
}
.home-authority {
  font-size: 10px; letter-spacing: 1px; opacity: 0.4;
  text-align: center; margin-top: 10px;
  font-family: "Noto Serif SC", serif;
}

/* ============================================================
   F：古风提示浮层 + 仪式净手锁定态
   ============================================================ */
.wenyi-toast {
  position: fixed; left: 50%; bottom: 80px;
  transform: translateX(-50%) translateY(20px);
  z-index: 300;
  max-width: 88%; padding: 14px 20px;
  background: rgba(22,19,32,0.94);
  border: 1px solid rgba(201,162,75,0.5);
  border-radius: 12px;
  color: var(--wenyi-gold, #C9A24B);
  font-family: "Noto Serif SC", serif;
  font-size: 14px; line-height: 1.7; letter-spacing: 1px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  opacity: 0; pointer-events: none;
  transition: opacity .35s, transform .35s;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.wenyi-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (prefers-reduced-motion: reduce) { .wenyi-toast { transition: none; } }

/* 跳过按钮净手锁定态（3秒禁用） */
.ritual-skip.ritual-locking { opacity: 0.25; pointer-events: none; }
.ritual-skip.ritual-locking::after {
  content: "（净手中…）"; display: block; font-size: 11px; opacity: 0.7;
}
}
