/* ═══════════════════════════════════════════════════
   divination-ritual.css — 古典仪式流主题
   道场占卜 · 暗金朱砂 · 焚香祈愿 · 古卷长轴
   ═══════════════════════════════════════════════════ */

/* ── 一、道场主题变量 ── */
.ritual-theme {
  --rt-bg-deep: #0a0a14;
  --rt-bg-mid: #12101e;
  --rt-bg-surface: #1a1128;
  --rt-bg-card: rgba(26, 17, 40, 0.85);
  --rt-bg-card-hover: rgba(36, 24, 56, 0.92);
  --rt-gold: #c9873a;
  --rt-gold-light: #e8a006;
  --rt-gold-dim: #8a5c1e;
  --rt-gold-glow: rgba(201, 135, 58, 0.35);
  --rt-cinnabar: #8b2500;
  --rt-cinnabar-light: #c0392b;
  --rt-bronze: #2d6a4f;
  --rt-incense-purple: #4a2c6e;
  --rt-text-primary: rgba(255, 245, 230, 0.9);
  --rt-text-secondary: rgba(255, 245, 230, 0.6);
  --rt-text-tertiary: rgba(255, 245, 230, 0.35);
  --rt-text-gold: #e8c068;
  --rt-border: rgba(201, 135, 58, 0.15);
  --rt-border-strong: rgba(201, 135, 58, 0.3);
  --rt-parchment: #f5ecd7;
  --rt-parchment-dark: #e8dcc4;
  --rt-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --rt-radius: 16px;
  --rt-font-title: 'Noto Serif SC', 'Songti SC', serif;
  --rt-font-body: 'Noto Serif SC', serif;
}

/* ── 浅色系道场变量（模式选择页+摇卦页用） ── */
.div-page:not(.ritual-theme) {
  --rt-bg-deep: #f7f4ef;
  --rt-bg-mid: #faf8f5;
  --rt-bg-surface: #ffffff;
  --rt-bg-card: rgba(255, 255, 255, 0.75);
  --rt-bg-card-hover: rgba(255, 255, 255, 0.88);
  --rt-gold: #b87d2e;
  --rt-gold-light: #d4950c;
  --rt-gold-dim: #8a5c1e;
  --rt-gold-glow: rgba(180, 125, 46, 0.2);
  --rt-cinnabar: #8b2500;
  --rt-cinnabar-light: #c0392b;
  --rt-bronze: #2d6a4f;
  --rt-incense-purple: #6C5CE7;
  --rt-text-primary: #1a1a2e;
  --rt-text-secondary: #636e83;
  --rt-text-tertiary: #9ba3b5;
  --rt-text-gold: #9a6c1e;
  --rt-border: rgba(0, 0, 0, 0.06);
  --rt-border-strong: rgba(180, 125, 46, 0.25);
  --rt-parchment: #f5ecd7;
  --rt-parchment-dark: #e8dcc4;
  --rt-shadow: 0 2px 20px rgba(0, 0, 0, 0.04), 0 1px 6px rgba(0, 0, 0, 0.03);
  --rt-radius: 16px;
  --rt-font-title: 'Noto Serif SC', 'Songti SC', serif;
  --rt-font-body: 'Noto Serif SC', serif;
}

/* ── 二、道场全局背景（六爻摇卦阶段专用） ── */
.div-page.ritual-theme {
  background: linear-gradient(180deg, var(--rt-bg-deep) 0%, var(--rt-bg-mid) 40%, var(--rt-bg-surface) 100%);
  color: var(--rt-text-primary);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}
/* 道场背景纹理层 */
.div-page.ritual-theme::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(201, 135, 58, 0.04), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(74, 44, 110, 0.06), transparent 50%);
  pointer-events: none;
  z-index: 0;
}
/* 暗纹——祥云回纹图案 */
.div-page.ritual-theme::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.035;
  background-image:
    /* 祥云曲线纹 */
    radial-gradient(ellipse 30px 20px at 25% 20%, rgba(201, 135, 58, 0.4), transparent 70%),
    radial-gradient(ellipse 25px 18px at 75% 35%, rgba(201, 135, 58, 0.3), transparent 70%),
    radial-gradient(ellipse 35px 22px at 50% 55%, rgba(201, 135, 58, 0.35), transparent 70%),
    radial-gradient(ellipse 28px 16px at 15% 70%, rgba(201, 135, 58, 0.3), transparent 70%),
    radial-gradient(ellipse 32px 20px at 85% 80%, rgba(201, 135, 58, 0.35), transparent 70%),
    /* 回纹网格 */
    repeating-linear-gradient(0deg, transparent, transparent 60px, rgba(201, 135, 58, 0.15) 60px, rgba(201, 135, 58, 0.15) 61px),
    repeating-linear-gradient(90deg, transparent, transparent 60px, rgba(201, 135, 58, 0.12) 60px, rgba(201, 135, 58, 0.12) 61px);
  pointer-events: none;
  z-index: 0;
}
/* 山水剪影远景层 */
.div-page.ritual-theme .rt-mountain-silhouette {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background:
    /* 远山 */
    linear-gradient(165deg, transparent 40%, rgba(201, 135, 58, 0.03) 45%, rgba(201, 135, 58, 0.04) 50%, transparent 60%),
    linear-gradient(195deg, transparent 35%, rgba(74, 44, 110, 0.03) 42%, rgba(74, 44, 110, 0.04) 48%, transparent 58%),
    linear-gradient(175deg, transparent 50%, rgba(201, 135, 58, 0.025) 55%, rgba(10, 10, 20, 0.06) 65%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}
/* 金色尘埃微粒层 */
.rt-dust-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.rt-dust {
  position: absolute;
  width: var(--dust-size, 2px);
  height: var(--dust-size, 2px);
  border-radius: 50%;
  background: var(--dust-color, rgba(201, 135, 58, 0.4));
  box-shadow: 0 0 calc(var(--dust-size, 2px) * 2) var(--dust-color, rgba(201, 135, 58, 0.3));
  animation: rtDustFloat var(--dust-dur, 8s) ease-in-out infinite;
  animation-delay: var(--dust-delay, 0s);
  opacity: 0;
}
@keyframes rtDustFloat {
  0% { opacity: 0; transform: translateY(0) translateX(0); }
  15% { opacity: 0.6; }
  50% { opacity: 0.8; transform: translateY(var(--dust-dy, -60px)) translateX(var(--dust-dx, 20px)); }
  85% { opacity: 0.3; }
  100% { opacity: 0; transform: translateY(var(--dust-dy2, -120px)) translateX(var(--dust-dx2, -10px)); }
}

/* ═══════════════════════════════════════════════════
   三、入场过渡动画（第一幕：道场大门）
   ═══════════════════════════════════════════════════ */
.rt-entrance-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--rt-bg-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease;
}
.rt-entrance-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* 道场大门 */
.rt-gate {
  position: relative;
  width: 200px;
  height: 280px;
  perspective: 800px;
}
.rt-gate-door {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(180deg, #2a1a0e 0%, #1a0f06 50%, #2a1a0e 100%);
  border: 2px solid var(--rt-gold-dim);
  transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: left center;
  backface-visibility: hidden;
}
.rt-gate-door.left {
  left: 0;
  transform-origin: left center;
  border-right: 1px solid var(--rt-gold-dim);
  border-radius: 4px 0 0 4px;
}
.rt-gate-door.right {
  right: 0;
  transform-origin: right center;
  border-left: 1px solid var(--rt-gold-dim);
  border-radius: 0 4px 4px 0;
}
/* 门上装饰——铜钉 */
.rt-gate-door::before {
  content: '';
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--rt-gold-light), var(--rt-gold-dim));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transform: translateY(-50%);
}
.rt-gate-door.left::before { right: 10px; }
.rt-gate-door.right::before { left: 10px; }
/* 门上纹饰 */
.rt-gate-door::after {
  content: '☯';
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 28px;
  color: var(--rt-gold-dim);
  opacity: 0.4;
  text-shadow: 0 0 8px rgba(201, 135, 58, 0.3);
}
/* 门打开动画 */
.rt-gate.opening .rt-gate-door.left {
  transform: perspective(800px) rotateY(-85deg);
}
.rt-gate.opening .rt-gate-door.right {
  transform: perspective(800px) rotateY(85deg);
}
/* 门框 */
.rt-gate-frame {
  position: absolute;
  inset: -6px;
  border: 3px solid var(--rt-gold-dim);
  border-radius: 8px;
  pointer-events: none;
}
.rt-gate-frame::before {
  content: '天机问卦';
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--rt-font-title);
  font-size: 16px;
  font-weight: 700;
  color: var(--rt-text-gold);
  letter-spacing: 4px;
  white-space: nowrap;
  text-shadow: 0 0 12px var(--rt-gold-glow);
}
/* 门后光芒 */
.rt-gate-light {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 100%;
  background: radial-gradient(ellipse at center 40%, rgba(201, 135, 58, 0.2), transparent 70%);
  opacity: 0;
  transition: opacity 1.2s ease 0.3s;
}
.rt-gate.opening .rt-gate-light { opacity: 1; }
/* 入场提示 */
.rt-entrance-hint {
  margin-top: 40px;
  font-family: var(--rt-font-title);
  font-size: 14px;
  color: var(--rt-text-tertiary);
  letter-spacing: 3px;
  opacity: 0;
  animation: rtHintFade 2s ease 0.5s forwards;
}
@keyframes rtHintFade {
  0% { opacity: 0; transform: translateY(10px); }
  50% { opacity: 0.7; }
  100% { opacity: 0.5; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════
   四、烛光效果（全局复用）
   ═══════════════════════════════════════════════════ */
.rt-candle-pair {
  position: fixed;
  top: 30%;
  width: 100%;
  pointer-events: none;
  z-index: 1;
}
.rt-candle {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.rt-candle.left { left: 8px; }
.rt-candle.right { right: 8px; }
/* 烛身 */
.rt-candle-body {
  width: 8px;
  height: 40px;
  background: linear-gradient(to bottom, #cc3333, #991111);
  border-radius: 2px 2px 0 0;
  position: relative;
}
/* 烛台 */
.rt-candle-body::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 8px;
  background: linear-gradient(to bottom, var(--rt-gold-dim), #5a3a0a);
  border-radius: 0 0 4px 4px;
}
/* 烛芯 */
.rt-candle-body::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 6px;
  background: #333;
}
/* 火焰 */
.rt-candle-flame {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 18px;
  background: radial-gradient(ellipse at 50% 80%,
    #fff8e1 0%,
    #ffcc02 20%,
    #ff8800 50%,
    #ff4400 70%,
    transparent 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: rtFlicker 0.3s infinite alternate;
  filter: blur(0.5px);
  will-change: transform, opacity;
}
@keyframes rtFlicker {
  0% { transform: translateX(-50%) scaleY(1) scaleX(1) rotate(-1deg); opacity: 1; }
  33% { transform: translateX(-50%) scaleY(1.04) scaleX(0.96) rotate(1deg); opacity: 0.95; }
  66% { transform: translateX(-50%) scaleY(0.97) scaleX(1.02) rotate(-0.5deg); opacity: 1; }
  100% { transform: translateX(-50%) scaleY(0.98) scaleX(1.01) rotate(-1deg); opacity: 0.98; }
}
/* 烛光光晕 */
.rt-candle-glow {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(255, 170, 0, 0.15), transparent 60%);
  animation: rtCandleGlow 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes rtCandleGlow {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.15); }
}

/* ═══════════════════════════════════════════════════
   五、香烟缭绕效果
   ═══════════════════════════════════════════════════ */
.rt-smoke-container {
  position: absolute;
  width: 40px;
  height: 120px;
  pointer-events: none;
  overflow: visible;
}
.rt-smoke-wisp {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 4px;
  height: 60px;
  background: linear-gradient(to top,
    rgba(200, 200, 210, 0.2),
    rgba(200, 200, 210, 0.08),
    transparent);
  border-radius: 50%;
  filter: blur(3px);
  transform-origin: bottom center;
  animation: rtSmokeRise var(--smoke-dur, 4s) ease-out infinite;
  animation-delay: var(--smoke-delay, 0s);
}
@keyframes rtSmokeRise {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(0) scaleX(1) rotate(0deg);
  }
  20% {
    opacity: 0.4;
    transform: translateX(calc(-50% + 4px)) translateY(-20px) scaleX(1.3) rotate(5deg);
  }
  50% {
    opacity: 0.25;
    transform: translateX(calc(-50% - 6px)) translateY(-50px) scaleX(2) rotate(-3deg);
  }
  80% {
    opacity: 0.1;
    transform: translateX(calc(-50% + 8px)) translateY(-85px) scaleX(3) rotate(4deg);
  }
  100% {
    opacity: 0;
    transform: translateX(calc(-50% - 2px)) translateY(-110px) scaleX(4) rotate(-2deg);
  }
}

/* ═══════════════════════════════════════════════════
   六、焚香场景（第二幕：输入区重构）
   ═══════════════════════════════════════════════════ */
.rt-incense-scene {
  position: relative;
  padding: 20px 16px;
  text-align: center;
}
/* 香炉 */
.rt-censer {
  position: relative;
  width: 80px;
  height: 70px;
  margin: 0 auto 24px;
}
.rt-censer-body {
  width: 80px;
  height: 50px;
  background: linear-gradient(180deg, #5a3a0a 0%, var(--rt-gold-dim) 40%, #3a2206 100%);
  border-radius: 4px 4px 16px 16px;
  position: relative;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.5),
    inset 0 2px 4px rgba(255, 200, 50, 0.15);
  margin-top: 20px;
}
/* 香炉耳朵 */
.rt-censer-body::before,
.rt-censer-body::after {
  content: '';
  position: absolute;
  top: 8px;
  width: 10px;
  height: 20px;
  background: var(--rt-gold-dim);
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.rt-censer-body::before { left: -8px; }
.rt-censer-body::after { right: -8px; }
/* 香炉口 */
.rt-censer-rim {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  height: 8px;
  background: linear-gradient(to bottom, var(--rt-gold-light), var(--rt-gold-dim));
  border-radius: 4px 4px 0 0;
}
/* 香炉底座 */
.rt-censer-base {
  width: 60px;
  height: 10px;
  background: linear-gradient(to bottom, var(--rt-gold-dim), #3a2206);
  border-radius: 0 0 6px 6px;
  margin: 0 auto;
}
/* 香炉上的烟 */
.rt-censer .rt-smoke-container {
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
}

/* 焚香场景标题 */
.rt-incense-title {
  font-family: var(--rt-font-title);
  font-size: 18px;
  font-weight: 700;
  color: var(--rt-text-gold);
  letter-spacing: 4px;
  margin-bottom: 12px;
  text-shadow: none;
}

/* 签筒式问事类型选择器 */
.rt-qtype-ring {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 0 8px;
}
.rt-qtype-tag {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(180, 125, 46, 0.04);
  border: 1.5px solid rgba(180, 125, 46, 0.1);
  color: var(--rt-text-secondary);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  font-size: 11px;
  font-weight: 600;
  min-width: 52px;
  font-family: var(--rt-font-body);
}
.rt-qtype-tag i { font-size: 18px; color: var(--rt-gold); transition: transform 0.3s; }
.rt-qtype-tag:hover {
  background: rgba(180, 125, 46, 0.08);
  border-color: var(--rt-border-strong);
  transform: translateY(-2px);
}
.rt-qtype-tag.active {
  background: rgba(180, 125, 46, 0.1);
  border-color: var(--rt-gold);
  color: var(--rt-text-gold);
  box-shadow: 0 0 12px var(--rt-gold-glow);
}
.rt-qtype-tag.active i { transform: scale(1.15); color: var(--rt-gold-light); }

/* 宣纸卷轴输入框 */
.rt-scroll-input {
  position: relative;
  margin: 0 auto 20px;
  max-width: 400px;
}
.rt-scroll-textarea {
  width: 100%;
  min-height: 72px;
  padding: 14px 18px;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--rt-text-primary);
  font-family: var(--rt-font-body);
  font-size: 14px;
  line-height: 1.8;
  resize: none;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.rt-scroll-textarea::placeholder {
  color: var(--rt-text-tertiary);
  font-style: italic;
}
.rt-scroll-textarea:focus {
  border-color: var(--rt-gold);
  box-shadow: 0 0 0 3px rgba(180, 125, 46, 0.08), 0 0 20px rgba(180, 125, 46, 0.05);
}
/* 卷轴装饰线 */
.rt-scroll-input::before,
.rt-scroll-input::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(180, 125, 46, 0.15), transparent);
}
.rt-scroll-input::before { top: -4px; }
.rt-scroll-input::after { bottom: -4px; }

/* 焚香祈愿按钮 */
.rt-btn-pray {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  border: 2px solid var(--rt-gold);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(201, 135, 58, 0.15), rgba(201, 135, 58, 0.08));
  color: var(--rt-text-gold);
  font-family: var(--rt-font-title);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 3px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
}
.rt-btn-pray::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--rt-gold), var(--rt-incense-purple), var(--rt-gold));
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
}
.rt-btn-pray:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px var(--rt-gold-glow);
  background: linear-gradient(135deg, rgba(201, 135, 58, 0.25), rgba(201, 135, 58, 0.15));
}
.rt-btn-pray:hover::before { opacity: 0.15; }
.rt-btn-pray:active { transform: translateY(-1px) scale(0.98); }

/* ═══════════════════════════════════════════════════
   七、道场祭坛（第三幕：摇卦舞台重构）
   ═══════════════════════════════════════════════════ */
/* 祭坛容器 */
.rt-altar {
  position: relative;
  width: 340px;
  height: 340px;
  margin: 0 auto;
}
/* 祭坛石台 — 去掉边框 */
.rt-altar-stone {
  position: absolute;
  inset: 40px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 30%, rgba(180, 125, 46, 0.06), transparent 50%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(245, 240, 230, 0.95) 100%);
  border: none;
  box-shadow:
    inset 0 0 20px rgba(255, 255, 255, 0.5);
}
/* 祭坛八卦纹刻 */
.rt-altar-bagua {
  position: absolute;
  inset: 50px;
  border-radius: 50%;
  border: 1.5px dashed rgba(180, 125, 46, 0.08);
  animation: rtBaguaSpin 40s linear infinite;
}
@keyframes rtBaguaSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
/* 八卦符文 */
.rt-bagua-char {
  position: absolute;
  font-size: 14px;
  color: rgba(201, 135, 58, 0.2);
  font-family: var(--rt-font-title);
  transition: color 0.5s, text-shadow 0.5s;
}

/* 六盏铜灯（现为八卦节点容器） */
.rt-lamp {
  position: absolute;
  width: 68px;
  height: 68px;
  transform: translate(-50%, -50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.rt-lamp-base {
  display: none; /* 已替换为八卦SVG */
}
/* 灯内烛芯（已移除） */
.rt-lamp-base::before {
  display: none;
}
/* 铜灯标签 */
.rt-lamp-label {
  position: relative;
  font-size: 10px;
  font-family: var(--rt-font-title);
  font-weight: 700;
  color: var(--rt-text-tertiary);
  letter-spacing: 1px;
  white-space: nowrap;
  transition: color 0.5s;
  margin-top: 2px;
}
/* 铜灯火焰（已移除，不再使用） */
.rt-lamp-flame {
  display: none;
}

/* 铜灯点亮 — 适配八卦节点 */
.rt-lamp.lit .bagua-ring {
  stroke: rgba(201, 135, 58, 0.6);
  filter: drop-shadow(0 0 6px rgba(201,135,58,0.3));
}
.rt-lamp.lit .bagua-bg {
  fill: none;
}
.rt-lamp.lit .bagua-arc {
  stroke: rgba(201, 135, 58, 0.45);
}
.rt-lamp.lit .rt-lamp-label { color: var(--rt-text-gold); }
.rt-lamp.lit .rt-lamp-glow {
  opacity: 1;
}
/* 铜灯光晕 */
.rt-lamp-glow {
  position: absolute;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 170, 0, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}
/* 动爻铜灯——紫色八卦 */
.rt-lamp.lit.is-dong .bagua-ring {
  stroke: rgba(139, 92, 246, 0.6);
  filter: drop-shadow(0 0 6px rgba(139,92,246,0.3));
}
.rt-lamp.lit.is-dong .bagua-bg {
  fill: none;
}
.rt-lamp.lit.is-dong .bagua-arc {
  stroke: rgba(139, 92, 246, 0.45);
}
.rt-lamp.lit.is-dong .rt-lamp-glow {
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15), transparent 60%);
}
.rt-lamp.lit.is-dong .rt-lamp-base {
  display: none;
}
/* 待摇铜灯脉冲 — 八卦环呼吸 */
.rt-lamp.next .bagua-ring {
  animation: rtBaguaPulse 2s ease-in-out infinite;
}
@keyframes rtBaguaPulse {
  0%, 100% { stroke: rgba(180, 125, 46, 0.25); filter: none; }
  50% { stroke: rgba(180, 125, 46, 0.55); filter: drop-shadow(0 0 8px rgba(180,125,46,0.25)); }
}

/* 道场摇卦卡片——浅色透明玻璃 */

/* ═══════════════════════════════════════════════════
   八、竹简爻位进度条（替代线性爻条）
   ═══════════════════════════════════════════════════ */
.rt-bamboo-strip {
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px 14px;
}
.rt-bamboo-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px 10px;
  border-radius: 6px;
  flex: 1;
  max-width: 56px;
  background: rgba(180, 125, 46, 0.03);
  border: 1px solid rgba(180, 125, 46, 0.06);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
}
/* 竹简纹理 */
.rt-bamboo-cell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 5px,
    rgba(180, 125, 46, 0.02) 5px,
    rgba(180, 125, 46, 0.02) 6px
  );
  pointer-events: none;
}
.rt-bamboo-cell.filled {
  background: rgba(180, 125, 46, 0.06);
  border-color: rgba(180, 125, 46, 0.15);
  box-shadow: 0 0 10px rgba(180, 125, 46, 0.06);
}
.rt-bamboo-cell.filled::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(201, 135, 58, 0.05), transparent);
  pointer-events: none;
  animation: rtInkSpread 0.8s ease-out forwards;
}
@keyframes rtInkSpread {
  from { clip-path: circle(0% at 50% 0%); }
  to { clip-path: circle(100% at 50% 50%); }
}
.rt-bamboo-cell.next {
  border-color: rgba(201, 135, 58, 0.25);
  animation: rtBambooNextPulse 2s ease-in-out infinite;
}
@keyframes rtBambooNextPulse {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50% { box-shadow: 0 0 12px rgba(201, 135, 58, 0.12); }
}
.rt-bamboo-label {
  font-size: 9px;
  font-family: var(--rt-font-title);
  font-weight: 700;
  color: var(--rt-text-tertiary);
  letter-spacing: 1px;
  transition: color 0.4s;
}
.rt-bamboo-cell.filled .rt-bamboo-label { color: var(--rt-text-gold); }
.rt-bamboo-cell.next .rt-bamboo-label { color: var(--rt-text-gold); opacity: 0.7; }

/* ═══════════════════════════════════════════════════
   九、古卷展开成卦仪式
   ═══════════════════════════════════════════════════ */
.rt-scroll-reveal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 20, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.rt-scroll-reveal.active {
  opacity: 1;
  pointer-events: auto;
}
/* 古卷主体 */
.rt-scroll-body {
  width: 280px;
  min-height: 200px;
  background: linear-gradient(180deg, var(--rt-parchment), var(--rt-parchment-dark));
  border-radius: 4px;
  position: relative;
  padding: 32px 24px;
  text-align: center;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6);
}
.rt-scroll-reveal.active .rt-scroll-body {
  transform: scaleX(1);
}
/* 卷轴头 */
.rt-scroll-body::before,
.rt-scroll-body::after {
  content: '';
  position: absolute;
  top: -8px;
  bottom: -8px;
  width: 14px;
  background: linear-gradient(180deg, var(--rt-gold-dim), #3a2206, var(--rt-gold-dim));
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.rt-scroll-body::before { left: -8px; }
.rt-scroll-body::after { right: -8px; }
/* 卦名——毛笔书法效果 */
.rt-scroll-gua-name {
  font-family: var(--rt-font-title);
  font-size: 42px;
  font-weight: 900;
  color: #1a0f06;
  letter-spacing: 8px;
  margin-bottom: 12px;
  opacity: 0;
  animation: rtBrushWrite 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards;
}
@keyframes rtBrushWrite {
  0% { opacity: 0; transform: scaleY(0.3); filter: blur(4px); }
  40% { opacity: 0.8; transform: scaleY(1.05); filter: blur(0); }
  100% { opacity: 1; transform: scaleY(1); }
}
.rt-scroll-gua-desc {
  font-family: var(--rt-font-body);
  font-size: 14px;
  color: #5a3a0a;
  opacity: 0;
  animation: rtFadeUp 0.8s ease 1.5s forwards;
}
/* 卦象符号 */
.rt-scroll-symbols {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
  opacity: 0;
  animation: rtFadeUp 0.8s ease 1.2s forwards;
}
.rt-scroll-symbol {
  font-size: 36px;
  color: var(--rt-cinnabar);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
/* 印章——朱砂红底 */
.rt-seal {
  display: inline-block;
  padding: 4px 12px;
  border: 2px solid var(--rt-cinnabar);
  border-radius: 4px;
  color: var(--rt-cinnabar);
  font-family: var(--rt-font-title);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-top: 16px;
  opacity: 0;
  animation: rtSealStamp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 2s forwards;
}
@keyframes rtSealStamp {
  0% { opacity: 0; transform: scale(2) rotate(-5deg); }
  60% { opacity: 1; transform: scale(0.95) rotate(1deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes rtFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════
   十、模式选择页——道场入口
   ═══════════════════════════════════════════════════ */
/* 道场入口头部 */
.rt-portal-header {
  text-align: center;
  padding: 40px 16px 24px;
  position: relative;
}
.rt-portal-gate-icon {
  font-size: 48px;
  color: var(--rt-text-gold);
  margin-bottom: 12px;
  text-shadow: 0 0 20px var(--rt-gold-glow), 0 0 40px rgba(180, 125, 46, 0.1);
  animation: rtGateIconFloat 4s ease-in-out infinite;
  position: relative;
  display: inline-block;
}
/* 太极图外围符文环 */
.rt-portal-gate-icon::before {
  content: '☰ ☱ ☲ ☳ ☴ ☵ ☶ ☷';
  position: absolute;
  inset: -32px;
  font-size: 10px;
  letter-spacing: 6px;
  color: rgba(180, 125, 46, 0.15);
  border-radius: 50%;
  border: 1px dashed rgba(180, 125, 46, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: rtBaguaSpin 30s linear infinite;
  white-space: nowrap;
  word-spacing: 8px;
}
/* 太极图外光环 */
.rt-portal-gate-icon::after {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  border: 1.5px solid rgba(180, 125, 46, 0.1);
  animation: rtGateRingPulse 4s ease-in-out infinite;
}
@keyframes rtGateRingPulse {
  0%, 100% { transform: scale(1); opacity: 0.3; border-color: rgba(180, 125, 46, 0.1); }
  50% { transform: scale(1.1); opacity: 0.6; border-color: rgba(180, 125, 46, 0.2); }
}
@keyframes rtGateIconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.rt-portal-title {
  font-family: var(--rt-font-title);
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #1a1a2e, #3a2a12, #1a1a2e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 4px;
  margin-bottom: 8px;
}
.ritual-theme .rt-portal-title {
  background: linear-gradient(135deg, var(--rt-gold-light), #fff, var(--rt-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.rt-portal-subtitle {
  font-size: 13px;
  color: var(--rt-text-tertiary);
  letter-spacing: 2px;
}
/* 道场分隔线 */
.rt-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 4px 0 16px;
}
.rt-divider-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--rt-gold);
  opacity: 0.5;
}
.rt-divider-line {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(180, 125, 46, 0.2), transparent);
}
.rt-divider-icon {
  font-size: 16px;
  color: var(--rt-gold);
  opacity: 0.5;
}

/* 道场主打卡片——暗金版 + 流光边框 */
.rt-hero-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  margin-bottom: 16px;
  border: 1.5px solid var(--rt-border-strong);
  background: var(--rt-bg-card);
  backdrop-filter: blur(20px);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--rt-shadow);
}
/* 流光边框效果 */
.rt-hero-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 22px;
  background: conic-gradient(from var(--rt-hero-angle, 0deg),
    transparent 0%,
    rgba(180, 125, 46, 0.4) 10%,
    transparent 20%,
    transparent 50%,
    rgba(108, 92, 231, 0.2) 60%,
    transparent 70%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s;
  animation: rtHeroGlow 4s linear infinite;
}
@keyframes rtHeroGlow {
  from { --rt-hero-angle: 0deg; }
  to { --rt-hero-angle: 360deg; }
}
@property --rt-hero-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.rt-hero-card:hover::before { opacity: 1; }
.rt-hero-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 48px var(--rt-gold-glow), 0 0 0 1px var(--rt-border-strong);
  border-color: var(--rt-border-strong);
}
.rt-hero-card:active { transform: translateY(-2px) scale(0.99); }
.rt-hero-card-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 30%, rgba(180, 125, 46, 0.04), transparent 60%);
  pointer-events: none;
}
.rt-hero-card-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(180, 125, 46, 0.04), transparent 60%);
  animation: dms-hero-orb 8s ease-in-out infinite;
}
.rt-hero-card-inner {
  position: relative;
  z-index: 1;
  padding: 24px;
}
.rt-hero-card-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.rt-hero-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 6px 24px var(--rt-gold-glow);
}
.rt-hero-card-info { flex: 1; min-width: 0; }
.rt-hero-card-title {
  font-family: var(--rt-font-title);
  font-size: 20px;
  font-weight: 700;
  color: var(--rt-text-primary);
  margin: 0 0 4px;
}
.rt-hero-card-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
  margin-left: 8px;
}
.rt-hero-card-desc {
  font-size: 13px;
  color: var(--rt-text-secondary);
  line-height: 1.6;
  margin: 6px 0 0;
}
.rt-hero-card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.rt-hero-card-feature {
  font-size: 11px;
  color: var(--rt-text-gold);
  background: rgba(180, 125, 46, 0.06);
  border: 1px solid rgba(180, 125, 46, 0.12);
  border-radius: 20px;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.rt-hero-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--rt-border);
}
.rt-hero-card-quote {
  font-size: 12px;
  color: var(--rt-text-tertiary);
  font-style: italic;
  font-family: var(--rt-font-title);
}
.rt-hero-card-enter {
  font-size: 13px;
  font-weight: 600;
  color: var(--rt-text-gold);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.3s;
}
.rt-hero-card:hover .rt-hero-card-enter { gap: 8px; }

/* 道场子卡——浅色毛玻璃 + 法阵光效 */
.rt-sub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.rt-sub-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 18px 14px;
  cursor: pointer;
  background: var(--rt-bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--rt-border);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--rt-shadow);
}
/* 悬浮法阵光环 */
.rt-sub-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 92, 231, 0.04) 0%, transparent 70%);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s;
  opacity: 0;
  pointer-events: none;
}
.rt-sub-card:hover::after {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}
.rt-sub-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 0 20px rgba(108, 92, 231, 0.04);
  border-color: var(--rt-border-strong);
}
.rt-sub-card:active { transform: translateY(-1px) scale(0.98); }
.rt-sub-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s;
}
.rt-sub-card:hover .rt-sub-card-icon { transform: scale(1.08); }
.rt-sub-card-title {
  font-family: var(--rt-font-title);
  font-size: 14px;
  font-weight: 700;
  color: var(--rt-text-primary);
  margin-bottom: 4px;
}
.rt-sub-card-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}
.rt-sub-card-desc {
  font-size: 11px;
  color: var(--rt-text-tertiary);
  line-height: 1.5;
}

/* 道场信息条——浅色版 */
.rt-info-strip {
  padding: 0 4px;
}
.rt-last-record {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--rt-bg-card);
  border: 1px solid var(--rt-border);
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: var(--rt-shadow);
}
.rt-last-record:hover {
  border-color: var(--rt-border-strong);
  background: var(--rt-bg-card-hover);
}
.rt-last-record-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(201, 135, 58, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rt-gold);
  font-size: 15px;
  flex-shrink: 0;
}
.rt-last-record-body { flex: 1; min-width: 0; }
.rt-last-record-label {
  font-size: 10px;
  color: var(--rt-text-tertiary);
  margin-bottom: 2px;
}
.rt-last-record-text {
  font-size: 12px;
  color: var(--rt-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rt-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}
.rt-stat-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--rt-text-tertiary);
}
.rt-stat-badge strong { color: var(--rt-text-gold); }
.rt-history-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(180, 125, 46, 0.06);
  border: 1px solid var(--rt-border);
  color: var(--rt-text-gold);
  cursor: pointer;
  transition: all 0.3s;
}
.rt-history-btn:hover {
  background: rgba(180, 125, 46, 0.1);
  border-color: var(--rt-border-strong);
}

/* 八字提示——浅色 */
.rt-bazi-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(180, 125, 46, 0.04);
  border: 1px solid rgba(180, 125, 46, 0.1);
}
.rt-bazi-hint i { color: var(--rt-gold); font-size: 15px; flex-shrink: 0; }
.rt-bazi-hint span { font-size: 12px; color: var(--rt-text-secondary); flex: 1; }
.rt-bazi-hint a {
  font-size: 12px;
  color: var(--rt-text-gold);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

/* ── 隐藏原有浅色装饰 ── */
.ritual-theme .div-bagua-deco { display: none; }

/* ═══════════════════════════════════════════════════
   十一、响应式
   ═══════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .rt-sub-grid { grid-template-columns: 1fr; gap: 10px; }
  .rt-sub-card { flex-direction: row; padding: 14px; gap: 12px; text-align: left; }
  .rt-sub-card-icon { margin-bottom: 0; }
  .rt-gate { width: 160px; height: 220px; }
  .rt-altar { width: 280px; height: 280px; }
  /* 移动端烛光缩小而非隐藏 */
  .rt-candle-pair { opacity: 0.5; transform: scale(0.75); transform-origin: top center; }
  .rt-candle.left { left: 2px; }
  .rt-candle.right { right: 2px; }
  /* 门框标题缩小 */
  .rt-gate-frame::before { font-size: 13px; letter-spacing: 2px; }
  /* 结果页深色英雄区缩放 */
  .rt-result-hero-zone { padding-bottom: 20px; }
  .rt-ink-wash-transition { height: 60px; }
  /* 天机卷移动端 */
  .ly-ai-card.rt-tianji-scroll { padding: 18px 14px; }
  .ly-ai-card.rt-tianji-scroll::before,
  .ly-ai-card.rt-tianji-scroll::after { width: 8px; }
}

/* ═══════════════════════════════════════════════════
   十二、通用道场渐入动画
   ═══════════════════════════════════════════════════ */
.rt-fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: rtFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.rt-delay-1 { animation-delay: 0.1s; }
.rt-delay-2 { animation-delay: 0.2s; }
.rt-delay-3 { animation-delay: 0.3s; }
.rt-delay-4 { animation-delay: 0.4s; }
.rt-delay-5 { animation-delay: 0.5s; }
.rt-delay-6 { animation-delay: 0.6s; }

/* 符文旋转装饰 */
.rt-rune-circle {
  position: absolute;
  width: 100%;
  height: 100%;
  animation: rtBaguaSpin 60s linear infinite;
  pointer-events: none;
  opacity: 0.15;
}
.rt-rune-char {
  position: absolute;
  font-family: var(--rt-font-title);
  font-size: 12px;
  color: var(--rt-gold);
}

/* 道场返回按钮 */
.ritual-theme .div-btn-outline {
  border-color: var(--rt-border);
  color: var(--rt-text-secondary);
  background: transparent;
}
.ritual-theme .div-btn-outline:hover {
  border-color: var(--rt-border-strong);
  color: var(--rt-text-gold);
  background: rgba(201, 135, 58, 0.06);
}

/* 道场标题覆盖 */
.ritual-theme .div-header h2 {
  background: linear-gradient(135deg, var(--rt-gold-light), #fff, var(--rt-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ritual-theme .div-header .div-subtitle { color: var(--rt-text-secondary); }
.ritual-theme .div-header-icon {
  box-shadow: 0 6px 24px var(--rt-gold-glow);
}

/* ═══════════════════════════════════════════════════
   十三、香炉余烬闪烁
   ═══════════════════════════════════════════════════ */
.rt-censer-embers {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 12px;
  pointer-events: none;
}
.rt-ember {
  position: absolute;
  width: var(--ember-size, 3px);
  height: var(--ember-size, 3px);
  border-radius: 50%;
  background: var(--ember-color, #ff4400);
  box-shadow: 0 0 4px var(--ember-color, #ff4400), 0 0 8px rgba(255, 68, 0, 0.3);
  animation: rtEmberGlow var(--ember-dur, 2s) ease-in-out infinite;
  animation-delay: var(--ember-delay, 0s);
}
@keyframes rtEmberGlow {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* ═══════════════════════════════════════════════════
   十四、铜灯六芒连线（全亮时显现）
   ═══════════════════════════════════════════════════ */
.rt-lamp-connections {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 1s ease;
}
.rt-lamp-connections.active {
  opacity: 1;
}
.rt-lamp-connections line {
  stroke: rgba(201, 135, 58, 0.15);
  stroke-width: 1;
  stroke-dasharray: 4 4;
  animation: rtConnectionPulse 3s ease-in-out infinite;
}
@keyframes rtConnectionPulse {
  0%, 100% { stroke-opacity: 0.15; }
  50% { stroke-opacity: 0.4; }
}

/* ═══════════════════════════════════════════════════
   十五、摇卦渐进仪式感（6级递进）
   ═══════════════════════════════════════════════════ */
/* 祭坛渐进发光 — 仅box-shadow，无border */
.rt-altar-stone { transition: box-shadow 0.8s ease; }
.div-atmo-1 .rt-altar-stone { box-shadow: 0 0 30px rgba(180, 125, 46, 0.06); }
.div-atmo-2 .rt-altar-stone { box-shadow: 0 0 35px rgba(180, 125, 46, 0.08); }
.div-atmo-3 .rt-altar-stone { box-shadow: 0 0 40px rgba(180, 125, 46, 0.1); }
.div-atmo-4 .rt-altar-stone { box-shadow: 0 0 45px rgba(180, 125, 46, 0.13); }
.div-atmo-5 .rt-altar-stone { box-shadow: 0 0 50px rgba(180, 125, 46, 0.16), 0 0 30px rgba(108, 92, 231, 0.05); }
.div-atmo-6 .rt-altar-stone { box-shadow: 0 0 60px rgba(180, 125, 46, 0.2), 0 0 40px rgba(108, 92, 231, 0.08); }

/* 八卦纹刻渐现 */
.rt-bagua-char { transition: color 0.8s ease, text-shadow 0.8s ease; }
.div-atmo-1 .rt-bagua-char { color: rgba(180, 125, 46, 0.15); }
.div-atmo-2 .rt-bagua-char { color: rgba(180, 125, 46, 0.2); }
.div-atmo-3 .rt-bagua-char { color: rgba(180, 125, 46, 0.25); text-shadow: 0 0 4px rgba(180, 125, 46, 0.06); }
.div-atmo-4 .rt-bagua-char { color: rgba(180, 125, 46, 0.3); text-shadow: 0 0 6px rgba(180, 125, 46, 0.1); }
.div-atmo-5 .rt-bagua-char { color: rgba(180, 125, 46, 0.4); text-shadow: 0 0 8px rgba(180, 125, 46, 0.12); }
.div-atmo-6 .rt-bagua-char { color: rgba(180, 125, 46, 0.55); text-shadow: 0 0 12px rgba(180, 125, 46, 0.18); }

/* 渐进背景亮度 */
.div-atmo-1 .rt-altar-bagua { border-color: rgba(201, 135, 58, 0.1); }
.div-atmo-2 .rt-altar-bagua { border-color: rgba(201, 135, 58, 0.12); }
.div-atmo-3 .rt-altar-bagua { border-color: rgba(201, 135, 58, 0.15); }
.div-atmo-4 .rt-altar-bagua { border-color: rgba(201, 135, 58, 0.18); }
.div-atmo-5 .rt-altar-bagua { border-color: rgba(201, 135, 58, 0.22); animation-duration: 30s; }
.div-atmo-6 .rt-altar-bagua { border-color: rgba(201, 135, 58, 0.28); animation-duration: 20s; }

/* 最后一爻：地面震动 */
.div-atmo-5 .div-shake-stage,
.div-atmo-6 .div-shake-stage {
  animation: rtGroundTremble 0.3s ease-in-out;
}
@keyframes rtGroundTremble {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-2px); }
  40% { transform: translateX(2px); }
  60% { transform: translateX(-1px); }
  80% { transform: translateX(1px); }
}
/* 最后一爻：铜灯火焰同时增大 */
.div-atmo-6 .rt-lamp.lit .rt-lamp-flame {
  width: 12px !important;
  height: 20px !important;
  filter: blur(0.8px) brightness(1.3);
}
.div-atmo-6 .rt-lamp.lit .rt-lamp-glow {
  width: 70px;
  height: 70px;
  opacity: 1 !important;
}

/* ═══════════════════════════════════════════════════
   十六、成卦揭幕增强
   ═══════════════════════════════════════════════════ */
/* 屏幕震动 */
@keyframes rtScreenShake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-3px, -2px); }
  20% { transform: translate(3px, 1px); }
  30% { transform: translate(-2px, 3px); }
  40% { transform: translate(2px, -2px); }
  50% { transform: translate(-1px, 2px); }
  60% { transform: translate(1px, -1px); }
  70% { transform: translate(-2px, 1px); }
  80% { transform: translate(2px, -1px); }
  90% { transform: translate(-1px, 1px); }
}
.rt-screen-shake {
  animation: rtScreenShake 0.5s ease-in-out;
}
/* 墨水飞溅粒子 */
.rt-ink-splash {
  position: absolute;
  width: var(--ink-size, 4px);
  height: var(--ink-size, 4px);
  border-radius: 50%;
  background: #1a0f06;
  box-shadow: 0 0 2px rgba(26, 15, 6, 0.5);
  animation: rtInkBurst var(--ink-dur, 0.6s) cubic-bezier(0.22, 1, 0.36, 1) forwards;
  opacity: 0;
}
@keyframes rtInkBurst {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  60% { opacity: 0.6; transform: translate(var(--ink-x, 30px), var(--ink-y, -20px)) scale(0.5); }
  100% { opacity: 0; transform: translate(calc(var(--ink-x, 30px) * 1.5), calc(var(--ink-y, -20px) * 1.5)) scale(0); }
}
/* 古卷闪电/裂纹预兆 */
.rt-scroll-reveal .rt-crack-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(201, 135, 58, 0.4), transparent 60%);
  animation: rtCrackFlash 0.3s ease-out;
  pointer-events: none;
}
@keyframes rtCrackFlash {
  0% { opacity: 1; }
  100% { opacity: 0; }
}
/* 印章盖章增强振动 */
.rt-seal.stamped {
  animation: rtSealStampEnhanced 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
}
@keyframes rtSealStampEnhanced {
  0% { opacity: 0; transform: scale(3) rotate(-8deg); }
  30% { opacity: 1; transform: scale(0.9) rotate(2deg); }
  50% { transform: scale(1.05) rotate(-1deg); }
  70% { transform: scale(0.98) rotate(0.5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* ═══════════════════════════════════════════════════
   十七、深色→浅色过渡系统
   ═══════════════════════════════════════════════════ */
/* 结果页深色英雄区头部 */
.ly-result-page.rt-result-theme {
  background: var(--rt-bg-deep);
}
.rt-result-hero-zone {
  position: relative;
  background: linear-gradient(180deg, var(--rt-bg-deep) 0%, var(--rt-bg-mid) 60%, var(--rt-bg-surface) 100%);
  padding-bottom: 32px;
}
/* 水墨晕染过渡带 */
.rt-ink-wash-transition {
  position: relative;
  height: 80px;
  background: linear-gradient(180deg,
    var(--rt-bg-surface) 0%,
    rgba(26, 17, 40, 0.6) 20%,
    rgba(245, 236, 215, 0.03) 50%,
    rgba(255, 255, 255, 0.95) 80%,
    #fff 100%);
  overflow: hidden;
}
.rt-ink-wash-transition::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 200px 40px at 30% 40%, rgba(201, 135, 58, 0.08), transparent),
    radial-gradient(ellipse 150px 35px at 70% 60%, rgba(74, 44, 110, 0.05), transparent);
  pointer-events: none;
}
/* 水墨滴落装饰 */
.rt-ink-wash-transition::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background:
    radial-gradient(ellipse 8px 25px at 20% 0%, rgba(26, 17, 40, 0.04), transparent),
    radial-gradient(ellipse 6px 20px at 45% 0%, rgba(26, 17, 40, 0.03), transparent),
    radial-gradient(ellipse 10px 28px at 75% 0%, rgba(26, 17, 40, 0.05), transparent);
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════
   十八、深色英雄区样式覆盖
   ═══════════════════════════════════════════════════ */
.rt-result-hero-zone .ly-section-label {
  color: var(--rt-text-secondary);
}
.rt-result-hero-zone .ly-section-label i {
  color: var(--rt-gold) !important;
}
/* 所问之事——深色版 */
.rt-result-hero-zone .ly-question-card {
  background: var(--rt-bg-card);
  border-color: var(--rt-border);
  backdrop-filter: blur(20px);
}
.rt-result-hero-zone .ly-question-meta span {
  color: var(--rt-text-tertiary);
}
.rt-result-hero-zone .ly-question-type-badge {
  background: rgba(201, 135, 58, 0.1) !important;
  border-color: rgba(201, 135, 58, 0.2) !important;
  color: var(--rt-text-gold) !important;
}
.rt-result-hero-zone .ly-question-text {
  color: var(--rt-text-primary);
}
.rt-result-hero-zone .ly-question-date {
  color: var(--rt-text-tertiary) !important;
}
/* 卦象英雄区——深色版增强 */
.rt-result-hero-zone .ly-hero {
  background: linear-gradient(135deg, rgba(201, 135, 58, 0.06), rgba(74, 44, 110, 0.04));
  border-color: var(--rt-border);
}
.rt-result-hero-zone .ly-hero::before {
  background: radial-gradient(ellipse at 20% 30%, rgba(201, 135, 58, 0.08), transparent 60%);
}
.rt-result-hero-zone .ly-hero-symbols {
  filter: drop-shadow(0 0 12px var(--rt-gold-glow));
}
.rt-result-hero-zone .ly-hero-trigram {
  color: var(--rt-text-gold);
  text-shadow: 0 0 20px var(--rt-gold-glow);
}
.rt-result-hero-zone .ly-hero-name {
  background: linear-gradient(135deg, var(--rt-gold-light), #fff, var(--rt-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 16px var(--rt-gold-glow));
}
.rt-result-hero-zone .ly-hero-desc {
  color: var(--rt-text-secondary);
}
.rt-result-hero-zone .ly-hero-tag {
  background: rgba(201, 135, 58, 0.08);
  border-color: rgba(201, 135, 58, 0.15);
  color: var(--rt-text-gold);
}
.rt-result-hero-zone .ly-hero-guaci {
  color: var(--rt-text-secondary);
  border-color: var(--rt-border);
}
.rt-result-hero-zone .ly-hero-arrow-text {
  color: var(--rt-text-tertiary);
}
.rt-result-hero-zone .ly-hero-changed-name {
  color: var(--rt-text-gold);
}
.rt-result-hero-zone .ly-info-chip {
  background: rgba(201, 135, 58, 0.06);
  border-color: var(--rt-border);
  color: var(--rt-text-secondary);
}

/* 深色导航栏覆盖 */
.rt-result-theme .ly-nav-bar {
  background: rgba(10, 10, 20, 0.85);
  border-color: var(--rt-border);
  backdrop-filter: blur(20px);
}
.rt-result-theme .ly-nav-bar.scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}
.rt-result-theme .ly-nav-pill {
  color: var(--rt-text-tertiary);
}
.rt-result-theme .ly-nav-pill.active {
  background: rgba(201, 135, 58, 0.12);
  color: var(--rt-text-gold);
}
.rt-result-theme .ly-nav-back {
  color: var(--rt-text-secondary);
}

/* ═══════════════════════════════════════════════════
   十九、天机卷——AI断卦区增强
   ═══════════════════════════════════════════════════ */
.ly-ai-card.rt-tianji-scroll {
  position: relative;
  background: linear-gradient(180deg, #faf6ee, #f5ecd7);
  border: 2px solid var(--rt-cinnabar);
  border-radius: 4px;
  padding: 24px 20px;
  box-shadow:
    0 4px 24px rgba(139, 37, 0, 0.08),
    inset 0 0 40px rgba(245, 236, 215, 0.5);
}
/* 卷轴头装饰 */
.ly-ai-card.rt-tianji-scroll::before,
.ly-ai-card.rt-tianji-scroll::after {
  content: '';
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 12px;
  background: linear-gradient(180deg, var(--rt-gold-dim), #3a2206, var(--rt-gold-dim));
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.ly-ai-card.rt-tianji-scroll::before { left: -7px; }
.ly-ai-card.rt-tianji-scroll::after { right: -7px; }
/* 天机卷标题 */
.rt-tianji-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  font-family: var(--rt-font-title);
  font-size: 16px;
  font-weight: 700;
  color: #1a0f06;
  letter-spacing: 3px;
}
.rt-tianji-title i {
  color: var(--rt-cinnabar) !important;
}
/* 天机卷印章 */
.rt-tianji-seal {
  display: inline-block;
  padding: 3px 10px;
  border: 1.5px solid var(--rt-cinnabar);
  border-radius: 3px;
  font-family: var(--rt-font-title);
  font-size: 11px;
  font-weight: 700;
  color: var(--rt-cinnabar);
  letter-spacing: 2px;
  margin-left: 8px;
  transform: rotate(-3deg);
}
/* 天机卷分隔线 */
.rt-tianji-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 37, 0, 0.15), transparent);
  margin: 16px 0;
}
/* 天机卷正文 */
.ly-ai-card.rt-tianji-scroll .div-result-title {
  color: #1a0f06;
}
.ly-ai-card.rt-tianji-scroll .div-result-title i {
  color: var(--rt-cinnabar) !important;
}

/* ═══════════════════════════════════════════════════
   二十、结果页宣纸底纹排盘
   ═══════════════════════════════════════════════════ */
.ly-paipan-wrap.rt-parchment-table {
  background: linear-gradient(180deg, rgba(245, 236, 215, 0.03), rgba(245, 236, 215, 0.06));
  border: 1px solid rgba(201, 135, 58, 0.08);
  border-radius: 12px;
  position: relative;
}
.ly-paipan-wrap.rt-parchment-table::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background-image:
    repeating-linear-gradient(90deg, transparent, transparent 8px, rgba(201, 135, 58, 0.015) 8px, rgba(201, 135, 58, 0.015) 9px);
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════
   二十一、结果页水墨分隔线
   ═══════════════════════════════════════════════════ */
.rt-ink-divider {
  height: 1px;
  margin: 8px 0;
  background: linear-gradient(90deg,
    transparent,
    rgba(201, 135, 58, 0.12) 20%,
    rgba(26, 15, 6, 0.08) 50%,
    rgba(201, 135, 58, 0.12) 80%,
    transparent);
  position: relative;
}
.rt-ink-divider::after {
  content: '◆';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 6px;
  color: rgba(201, 135, 58, 0.3);
}

/* ═══════════════════════════════════════════════════
   二十二、入场动画增强——逐字显现
   ═══════════════════════════════════════════════════ */
.rt-entrance-hint .rt-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px);
  animation: rtCharReveal 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes rtCharReveal {
  to { opacity: 0.5; transform: translateY(0); }
}
/* 入场道场内景渐现 */
.rt-entrance-interior {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 60%,
    rgba(201, 135, 58, 0.03),
    transparent 50%);
  opacity: 0;
  transition: opacity 1.2s ease;
}
.rt-gate.opening ~ .rt-entrance-interior,
.rt-entrance-overlay .rt-entrance-interior.reveal {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════
   二十三、涟漪扩散效果（替代音效）
   ═══════════════════════════════════════════════════ */
.rt-ripple {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid rgba(201, 135, 58, 0.4);
  animation: rtRippleExpand 0.8s ease-out forwards;
  pointer-events: none;
}
@keyframes rtRippleExpand {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(4); opacity: 0; }
}
/* 铜灯点亮光波脉冲 */
.rt-lamp-pulse {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(201, 135, 58, 0.5);
  animation: rtLampLitPulse 0.6s ease-out forwards;
  pointer-events: none;
}
@keyframes rtLampLitPulse {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* ═══════════════════════════════════════════════════
   二十四、底部操作栏深色主题
   ═══════════════════════════════════════════════════ */
.rt-result-theme .ly-bottom-bar {
  background: rgba(10, 10, 20, 0.9);
  border-top-color: var(--rt-border);
  backdrop-filter: blur(24px);
}
.rt-result-theme .ly-bottom-btn {
  color: var(--rt-text-secondary);
  border-color: var(--rt-border);
}
.rt-result-theme .ly-bottom-btn:hover {
  color: var(--rt-text-gold);
  border-color: var(--rt-border-strong);
  background: rgba(201, 135, 58, 0.06);
}
.rt-result-theme .div-disclaimer {
  color: var(--rt-text-tertiary);
}

/* 禁止减弱动画模式 */
@media (prefers-reduced-motion: reduce) {
  .rt-candle-flame, .rt-smoke-wisp, .rt-ember, .rt-dust { animation: none !important; }
  .rt-entrance-overlay { transition: none; }
  .rt-gate-door { transition: none; }
  .rt-scroll-body { transition: none; transform: scaleX(1); }
  .rt-scroll-gua-name { animation: none; opacity: 1; }
  .rt-seal { animation: none; opacity: 1; }
  .rt-bagua-char { transition: none; }
  .rt-altar-bagua { animation: none; }
  .rt-fade-in { animation: none; opacity: 1; transform: none; }
  .rt-screen-shake { animation: none; }
  .rt-ink-splash { animation: none; }
  .rt-ripple, .rt-lamp-pulse { animation: none; }
  .rt-hero-card::before { animation: none; }
  .rt-portal-gate-icon::before { animation: none; }
  .rt-portal-gate-icon::after { animation: none; }
}
