/*  一念 · 雅集·墨骨 (Literati · Ink-Bone) overlay theme.
 *  Toggled by ?theme=yaji (persists via localStorage.yj_theme).
 *  A CSS-only visual re-skin of the classic index.html: every rule
 *  is scoped to .theme-yaji so the legacy shell stays untouched.
 */

html.theme-yaji {
  /* 纸色稍偏亮 + 偏冷，让整体质感更「清亮」而不是老旧牛皮纸 */
  --paper:          #f6efde;
  --paper-bright:   #fdf7e7;
  --paper-dim:      #ebe2c8;
  --paper-deep:     #d8cca9;
  --paper-shade:    #b6a884;

  --ink:            #1b1611;
  --ink-90: rgba(27, 22, 17, 0.92);
  --ink-80: rgba(27, 22, 17, 0.82);
  --ink-70: rgba(27, 22, 17, 0.72);
  --ink-55: rgba(27, 22, 17, 0.55);
  --ink-40: rgba(27, 22, 17, 0.40);
  --ink-25: rgba(27, 22, 17, 0.25);
  --ink-15: rgba(27, 22, 17, 0.15);
  --ink-08: rgba(27, 22, 17, 0.08);
  --ink-04: rgba(27, 22, 17, 0.04);

  --cinnabar:       #8a2a1e;
  --cinnabar-soft:  #a13a2b;
  --cinnabar-ink:   rgba(138, 42, 30, 0.85);
  --jade:           #5d7764;
  --tea-gold:       #a8824a;
  --gold-leaf:      #c8a25c;

  --glass-paper:    rgba(243, 236, 217, 0.88);
  --glass-sheer:    rgba(250, 244, 226, 0.72);
  --glass-wash:     rgba(243, 236, 217, 0.50);

  --body:  'LXGW WenKai', 'LXGW WenKai Screen', 'Noto Serif SC', 'Source Han Serif SC', 'STKaiti', 'KaiTi', serif;
  --seri:  'LXGW WenKai', 'LXGW WenKai Screen', 'Noto Serif SC', 'STKaiti', serif;
  --song:  'LXGW WenKai', 'Noto Serif SC', serif;
  --hand:  'LXGW WenKai', 'STKaiti', serif;
  --brush: 'Ma Shan Zheng', 'Long Cang', 'Zhi Mang Xing', 'STKaiti', serif;
  --roman: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;

  --dur-slow: 680ms;
  --dur-med:  340ms;
  --dur-fast: 180ms;
  --ease:     cubic-bezier(0.35, 0.08, 0.22, 1);

  --shadow-soft:  0 2px 28px rgba(27, 22, 17, 0.05);
  --shadow-lift:  0 20px 60px rgba(27, 22, 17, 0.08);
  --shadow-deep:  0 28px 90px rgba(27, 22, 17, 0.12);
}

html.theme-yaji,
html.theme-yaji body {
  background: var(--paper) !important;
  background-image: none !important;
  color: var(--ink) !important;
  font-family: var(--body) !important;
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

html.theme-yaji body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(110% 70% at 50% 105%, rgba(216, 204, 169, 0.35), transparent 72%),
    radial-gradient(70% 55% at 50% -5%, rgba(250, 244, 226, 0.85), transparent 70%),
    var(--paper);
  pointer-events: none;
}

html.theme-yaji body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url('/assets/stitch/misty-peaks.jpg');
  background-image: image-set(
    url('/assets/stitch/misty-peaks.webp') type('image/webp') 1x,
    url('/assets/stitch/misty-peaks.jpg')  type('image/jpeg') 1x
  );
  background-size: cover;
  background-position: center 65%;
  opacity: 0.08;
  /* filter + mix-blend-mode + mask-image 合起来是一块全屏合成层，
     在低端 Android 上是主要 GPU 杀手之一。WebP 原图已经是淡墨调，
     filter 去掉后视觉差异肉眼无感，但省下一整层重算。 */
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.18) 55%, transparent 82%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.18) 55%, transparent 82%);
  pointer-events: none;
}

/* 关键优化：学堂 / 吾身 Tab 自身已有不透明纸色 + 滚动内容覆盖，整页背景图完全看不到。
   在这两个 tab 激活时直接隐藏 body::after，省掉一整个全屏合成层 —— 对低端机减负明显。
   切回一念（首页）时 body::after 自动恢复。 */
html.theme-yaji body:has(#xuetangPanel.active)::after,
html.theme-yaji body:has(#wodePanel.active)::after {
  display: none;
}
/* :has() 对少数老浏览器不支持；做 JS 兜底的降级 class（由 index.html 的 tab 切换时打上） */
html.theme-yaji body.yj-tab-xuetang::after,
html.theme-yaji body.yj-tab-wode::after {
  display: none;
}

html.theme-yaji.scene-yaji-cover body::after,
html.theme-yaji.scene-yaji-onboarding body::after {
  display: none;
}

html.theme-yaji .smoke {
  background: radial-gradient(ellipse at center,
    rgba(27, 22, 17, 0.08) 0%,
    transparent 70%) !important;
  mix-blend-mode: multiply !important;
  opacity: 0.55 !important;
}
html.theme-yaji .particle {
  background: radial-gradient(circle,
    rgba(27, 22, 17, 0.42) 0%,
    transparent 70%) !important;
  mix-blend-mode: multiply !important;
}
html.theme-yaji .ssr-overlay { display: none !important; }

html.theme-yaji #yjDailyQuote { display: none !important; }

html.theme-yaji ::selection {
  background: var(--ink-15);
  color: var(--ink);
}

html.theme-yaji button,
html.theme-yaji a,
html.theme-yaji [data-tab],
html.theme-yaji .quick-question,
html.theme-yaji .zw-menu-row,
html.theme-yaji .xt-card,
html.theme-yaji .yj-ritual-guide-toggle {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
html.theme-yaji,
html.theme-yaji body {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
html.theme-yaji .question-overlay,
html.theme-yaji .interpretation-panel,
html.theme-yaji .chat-panel,
html.theme-yaji .history-panel,
html.theme-yaji .info-panel,
html.theme-yaji #investorWelcome {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
html.theme-yaji * {
  -webkit-touch-callout: none;
}
html.theme-yaji input,
html.theme-yaji textarea {
  -webkit-touch-callout: default;
  -webkit-user-select: text;
  user-select: text;
}

html.theme-yaji button:focus-visible,
html.theme-yaji a:focus-visible,
html.theme-yaji input:focus-visible,
html.theme-yaji textarea:focus-visible {
  outline: 1px solid var(--ink-55);
  outline-offset: 2px;
}

html.theme-yaji h1,
html.theme-yaji h2,
html.theme-yaji h3,
html.theme-yaji h4,
html.theme-yaji .title,
html.theme-yaji .page-header-title {
  font-family: var(--seri) !important;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--ink) !important;
  text-shadow: none !important;
}

html.theme-yaji p {
  color: var(--ink-80);
  line-height: 1.9;
  letter-spacing: 0.02em;
  font-size: 1rem;
}

/* ── Chrome: top bar, bottom nav, page headers ──────────── */

html.theme-yaji .top-bar-left {
  top: max(16px, env(safe-area-inset-top));
  display: flex;
  gap: 8px;
  padding: 0;
  background: transparent !important;
  z-index: 50;
}

html.theme-yaji .top-bar-btn {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  background: var(--glass-paper) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 0.5px solid var(--ink-15) !important;
  border-radius: 50% !important;
  color: var(--ink) !important;
  font-family: var(--roman) !important;
  font-style: italic;
  font-size: 1.05rem !important;
  line-height: 1;
  box-shadow: var(--shadow-soft) !important;
  transition: background var(--dur-slow) var(--ease),
              opacity var(--dur-slow) var(--ease),
              transform var(--dur-fast) var(--ease) !important;
  animation: none !important;
}
html.theme-yaji .top-bar-btn:hover { background: var(--paper-bright) !important; opacity: 1 !important; }
html.theme-yaji .top-bar-btn:active { transform: scale(0.94) !important; }

/* 原 yj-reset-fab 已下线，由顶栏 restartBtn 接管 */
html.theme-yaji .top-bar-btn svg {
  width: 18px !important; height: 18px !important;
  stroke: var(--ink) !important;
  fill: none !important;
  stroke-width: 1.75 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html.theme-yaji #bottomNav,
html.theme-yaji .bottom-nav {
  background: var(--glass-paper) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-top: 0.5px solid var(--ink-15) !important;
  box-shadow: 0 -6px 40px rgba(27, 22, 17, 0.04) !important;
  border-radius: 22px 22px 0 0 !important;
  padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
  z-index: 200 !important;
  pointer-events: auto !important;
}
html.theme-yaji #bottomNav [data-tab],
html.theme-yaji .bottom-nav [data-tab],
html.theme-yaji .bottom-nav-item {
  pointer-events: auto !important;
  cursor: pointer !important;
}

html.theme-yaji .bottom-nav-item .nav-label,
html.theme-yaji .bottom-nav-item .nav-glyph,
html.theme-yaji #bottomNav [data-tab],
html.theme-yaji .bottom-nav [data-tab] {
  color: var(--ink-80) !important;
  font-family: var(--body) !important;
  font-weight: 500;
  letter-spacing: 0.14em;
}
html.theme-yaji .bottom-nav-item .nav-icon {
  stroke: var(--ink-80) !important;
  fill: none !important;
}
html.theme-yaji .bottom-nav-item.active .nav-label,
html.theme-yaji .bottom-nav-item.active .nav-glyph,
html.theme-yaji #bottomNav [data-tab].active,
html.theme-yaji .bottom-nav [data-tab].active {
  color: var(--gold-leaf) !important;
  font-weight: 700;
}
html.theme-yaji .bottom-nav-item.active .nav-icon {
  stroke: var(--gold-leaf) !important;
  filter: drop-shadow(0 0 5px rgba(200, 162, 92, 0.3));
}
html.theme-yaji .nav-icon {
  stroke: currentColor !important;
  fill: none !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}
html.theme-yaji .nav-label {
  font-family: var(--seri) !important;
  letter-spacing: 0.12em;
  font-size: 0.78rem !important;
}

html.theme-yaji .app-page .page-header {
  background: var(--glass-paper) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-bottom: 0.5px solid var(--ink-15) !important;
  box-shadow: var(--shadow-soft) !important;
}
html.theme-yaji .app-page .page-header-title {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
  letter-spacing: 0.3em !important;
  text-shadow: none !important;
}
html.theme-yaji .page-header-btn {
  background: transparent !important;
  border: none !important;
  color: var(--ink) !important;
}

html.theme-yaji .watermark {
  position: fixed !important;
  bottom: calc(106px + env(safe-area-inset-bottom)) !important;
  right: 14px !important;
  left: auto !important;
  color: var(--ink-40) !important;
  font-family: var(--body) !important;
  letter-spacing: 0.22em !important;
  text-shadow: none !important;
  font-size: 0.68rem !important;
  z-index: 1 !important;
  pointer-events: none !important;
  user-select: none;
}

html.theme-yaji #vipToggle,
html.theme-yaji .vip-toggle,
html.theme-yaji #paywallPanel,
html.theme-yaji .paywall-panel {
  display: none !important;
}

html.theme-yaji .yn-bgm-btn,
html.theme-yaji .yn-bgm-btn--hidden {
  position: fixed !important;
  top: calc(14px + env(safe-area-inset-top)) !important;
  right: 14px !important;
  background: var(--glass-paper) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 0.5px solid var(--ink-15) !important;
  color: var(--ink-80) !important;
  font-family: var(--body) !important;
  letter-spacing: 0.2em !important;
  font-size: 0.8rem !important;
  box-shadow: var(--shadow-soft) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
  z-index: 500 !important;
}

html.theme-yaji.scene-guanxiang .top-bar-left,
html.theme-yaji.scene-guanxiang .divination-progress {
  display: none !important;
}
html.theme-yaji.scene-guanxiang .yn-bgm-btn {
  right: auto !important;
  left: 14px !important;
}
html.theme-yaji .yn-bgm-btn--playing {
  color: var(--gold-leaf) !important;
  border-color: rgba(200, 162, 92, 0.3) !important;
}
html.theme-yaji .yn-bgm-btn--playing .yn-bgm-bar {
  background: var(--gold-leaf) !important;
}
html.theme-yaji .yn-bgm-btn--playing,
html.theme-yaji .yn-bgm-btn--paused {
  color: var(--ink) !important;
}
html.theme-yaji .yn-bgm-bar { background: var(--ink) !important; }
html.theme-yaji .yn-bgm-label { color: var(--ink-80) !important; }
html.theme-yaji .yn-bgm-toast {
  background: var(--glass-paper) !important;
  color: var(--ink) !important;
  border: 0.5px solid var(--ink-15) !important;
}

/* ── Cover / welcome scene ──────────────────────────────── */

html.theme-yaji .investor-welcome,
html.theme-yaji #investorWelcome {
  background: var(--paper) !important;
  background-image: none !important;
  color: var(--ink) !important;
  padding: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: center !important;
  animation: yjCoverFadeIn 700ms var(--ease) both !important;
  transform: none !important;
}

@keyframes yjCoverFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

html.theme-yaji .investor-welcome::before,
html.theme-yaji .investor-welcome::after,
html.theme-yaji #investorWelcome::before,
html.theme-yaji #investorWelcome::after {
  display: none !important;
}

html.theme-yaji .investor-welcome.hidden,
html.theme-yaji #investorWelcome.hidden {
  display: none !important;
}

html.theme-yaji.scene-yaji-cover .top-bar-left,
html.theme-yaji.scene-yaji-cover #app,
html.theme-yaji.scene-yaji-cover #bottomNav,
html.theme-yaji.scene-yaji-cover .bottom-nav,
html.theme-yaji.scene-yaji-cover .watermark,
html.theme-yaji.scene-yaji-cover #divinationProgress,
html.theme-yaji.scene-yaji-cover .divination-progress,
html.theme-yaji.scene-yaji-cover #vipToggle,
html.theme-yaji.scene-yaji-cover .vip-toggle,
html.theme-yaji.scene-yaji-cover #shareToast,
html.theme-yaji.scene-yaji-cover #progressToast,
html.theme-yaji.scene-yaji-onboarding .top-bar-left,
html.theme-yaji.scene-yaji-onboarding #app,
html.theme-yaji.scene-yaji-onboarding #bottomNav,
html.theme-yaji.scene-yaji-onboarding .bottom-nav,
html.theme-yaji.scene-yaji-onboarding .watermark,
html.theme-yaji.scene-yaji-onboarding #divinationProgress,
html.theme-yaji.scene-yaji-onboarding .divination-progress,
html.theme-yaji.scene-yaji-onboarding #vipToggle,
html.theme-yaji.scene-yaji-onboarding .vip-toggle,
html.theme-yaji.scene-yaji-onboarding #shareToast,
html.theme-yaji.scene-yaji-onboarding #progressToast,
html.theme-yaji.scene-yaji-onboarding #infoPanel,
html.theme-yaji.scene-yaji-onboarding .info-panel,
html.theme-yaji.scene-yaji-onboarding #historyPanel,
html.theme-yaji.scene-yaji-onboarding .history-panel,
html.theme-yaji.scene-yaji-onboarding #interpPanel,
html.theme-yaji.scene-yaji-onboarding .interpretation-panel,
html.theme-yaji.scene-yaji-onboarding #chatPanel,
html.theme-yaji.scene-yaji-onboarding .chat-panel,
html.theme-yaji.scene-yaji-onboarding #questionOverlay,
html.theme-yaji.scene-yaji-onboarding .question-overlay,
html.theme-yaji.scene-yaji-onboarding #modalOverlay {
  display: none !important;
}

html.theme-yaji.scene-yaji-cover #investorWelcome {
  position: fixed !important;
  inset: 0 !important;
  z-index: 30 !important;
}

html.theme-yaji .welcome-logo-wrapper,
html.theme-yaji .welcome-desc,
html.theme-yaji .investor-version {
  display: none !important;
}

html.theme-yaji .investor-enter-btn,
html.theme-yaji #investorEnterBtn,
html.theme-yaji .question-btn-primary,
html.theme-yaji .onboard-btn {
  position: relative;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  white-space: nowrap !important;
  background-color: rgba(27, 22, 17, 0.44) !important;
  background-image: linear-gradient(135deg, rgba(42, 33, 22, 0.48) 0%, rgba(27, 22, 17, 0.52) 100%) !important;
  border: 0.5px solid rgba(200, 162, 92, 0.38) !important;
  border-radius: 9999px !important;
  padding: 16px 44px !important;
  color: var(--gold-leaf) !important;
  font-family: var(--seri) !important;
  font-size: 1.1rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.32em !important;
  text-indent: 0.32em !important;
  text-shadow: 0 0 12px rgba(200, 162, 92, 0.22) !important;
  box-shadow:
    0 14px 34px rgba(27, 22, 17, 0.2),
    inset 0 1px 0 rgba(240, 220, 170, 0.12),
    inset 0 0 16px rgba(200, 162, 92, 0.08) !important;
  backdrop-filter: blur(10px) saturate(1.1) !important;
  -webkit-backdrop-filter: blur(10px) saturate(1.1) !important;
  transition: background-color var(--dur-slow) var(--ease),
              box-shadow var(--dur-slow) var(--ease),
              color var(--dur-slow) var(--ease),
              transform var(--dur-fast) var(--ease) !important;
  animation: none !important;
}
html.theme-yaji .investor-enter-btn::before,
html.theme-yaji #investorEnterBtn::before,
html.theme-yaji .question-btn-primary::before,
html.theme-yaji .onboard-btn::before {
  content: '';
  position: absolute !important;
  top: 6px; left: 10px; right: 10px; bottom: 6px;
  border: 0.5px solid rgba(200, 162, 92, 0.22);
  border-radius: 9999px;
  pointer-events: none;
  display: block !important;
}
html.theme-yaji .investor-enter-btn::before,
html.theme-yaji .question-btn-primary::before,
html.theme-yaji .onboard-btn::before { display: none !important; }
html.theme-yaji .investor-enter-btn:hover,
html.theme-yaji .question-btn-primary:hover,
html.theme-yaji .onboard-btn:hover {
  background-color: rgba(27, 22, 17, 0.62) !important;
  border-color: rgba(200, 162, 92, 0.58) !important;
  color: #e8caa0 !important;
  box-shadow:
    0 20px 48px rgba(27, 22, 17, 0.28),
    inset 0 1px 0 rgba(240, 220, 170, 0.18),
    inset 0 0 20px rgba(200, 162, 92, 0.14) !important;
}
html.theme-yaji .investor-enter-btn:active,
html.theme-yaji .question-btn-primary:active,
html.theme-yaji .onboard-btn:active {
  transform: scale(0.97) !important;
}

/* ── Injected cover layout (.yj-cover) ──────────────────── */

html.theme-yaji .yj-cover {
  position: relative;
  display: block;
  box-sizing: border-box;
  flex: 0 0 auto;
  min-height: 100dvh;
  width: 100%;
  max-width: 620px;
  padding: clamp(64px, 9vh, 96px) clamp(24px, 6vw, 48px) clamp(40px, 8vh, 72px) !important;
  z-index: 2;
}

html.theme-yaji .yj-cover::before {
  content: '';
  position: absolute;
  /* 2026-05-14: 原 top: 6vh 在某些机型导致顶部出现白板。
     改成 top: -2vh 让山水画从屏幕最顶端略往上溢出，配合下面的 mask 微调，
     上沿融入宣纸背景而不再有"白板"边界感 */
  top: -2vh;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  max-width: 820px;
  aspect-ratio: 1 / 1;
  background-image: url('/assets/stitch/splash-mountain.jpg');
  background-image: image-set(
    url('/assets/stitch/splash-mountain.webp') type('image/webp') 1x,
    url('/assets/stitch/splash-mountain.jpg')  type('image/jpeg') 1x
  );
  background-size: cover;
  /* 焦点稍微再往上一些，让山头出现在视觉中段而不是底端 */
  background-position: center 28%;
  background-repeat: no-repeat;
  opacity: 0.72;
  filter: saturate(0.5) contrast(0.94) sepia(0.08) blur(0.4px);
  mix-blend-mode: normal;
  /* 上沿改用更柔和的渐变，避免硬切；radial 椭圆中心上移到 50% 48% */
  mask-image:
    radial-gradient(ellipse 88% 92% at 50% 48%, rgba(0,0,0,1) 0%, rgba(0,0,0,0.94) 50%, rgba(0,0,0,0.5) 80%, transparent 98%),
    linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.95) 60%, rgba(0,0,0,0.35) 86%, transparent 100%);
  -webkit-mask-image:
    radial-gradient(ellipse 88% 92% at 50% 48%, rgba(0,0,0,1) 0%, rgba(0,0,0,0.94) 50%, rgba(0,0,0,0.5) 80%, transparent 98%),
    linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.95) 60%, rgba(0,0,0,0.35) 86%, transparent 100%);
  mask-composite: intersect;
  -webkit-mask-composite: source-in;
  pointer-events: none;
  z-index: 0;
}
html.theme-yaji .yj-cover > * { position: relative; z-index: 1; }

html.theme-yaji .yj-cranes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
html.theme-yaji .yj-crane {
  position: absolute;
  color: var(--ink);
}
html.theme-yaji .yj-crane svg { display: block; }
html.theme-yaji .yj-crane-wing {
  animation: yjBirdFlap 620ms ease-in-out infinite;
  transform-origin: 12px 8px;
}
@keyframes yjBirdFlap {
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(0.55); }
}

html.theme-yaji .yj-crane--1 {
  top: 10%;
  animation: yjBirdFly1 38s linear infinite;
  transform: scale(0.9);
  opacity: 0.5;
}
html.theme-yaji .yj-crane--1 .yj-crane-wing { animation-duration: 580ms; }

html.theme-yaji .yj-crane--2 {
  top: 15%;
  animation: yjBirdFly2 46s linear infinite;
  animation-delay: -8s;
  transform: scale(0.7);
  opacity: 0.35;
}
html.theme-yaji .yj-crane--2 .yj-crane-wing { animation-duration: 720ms; }

html.theme-yaji .yj-crane--3 {
  top: 19%;
  animation: yjBirdFly1 52s linear infinite;
  animation-delay: -21s;
  transform: scale(0.55);
  opacity: 0.28;
}
html.theme-yaji .yj-crane--3 .yj-crane-wing { animation-duration: 820ms; }

html.theme-yaji .yj-crane--4 {
  top: 24%;
  animation: yjBirdFly2 58s linear infinite;
  animation-delay: -35s;
  transform: scale(0.48);
  opacity: 0.22;
}
html.theme-yaji .yj-crane--4 .yj-crane-wing { animation-duration: 940ms; }

html.theme-yaji .yj-crane--5 {
  top: 12%;
  animation: yjBirdFly1 64s linear infinite;
  animation-delay: -48s;
  transform: scale(0.4);
  opacity: 0.2;
}
html.theme-yaji .yj-crane--5 .yj-crane-wing { animation-duration: 1050ms; }

@keyframes yjBirdFly1 {
  0%   { left: -6%;  margin-top: 0;    }
  30%  { margin-top: -8px; }
  60%  { margin-top: 6px;  }
  100% { left: 106%; margin-top: -2px; }
}
@keyframes yjBirdFly2 {
  0%   { left: -6%;  margin-top: 0;    }
  40%  { margin-top: 6px;  }
  70%  { margin-top: -6px; }
  100% { left: 106%; margin-top: 2px;  }
}

@media (prefers-reduced-motion: reduce) {
  html.theme-yaji .yj-crane { display: none !important; }
}

html.theme-yaji .yj-cover-header {
  text-align: center;
  position: relative;
  display: block;
}
html.theme-yaji .yj-eyebrow {
  display: inline-block;
  font-family: var(--roman);
  font-style: italic;
  font-size: 0.78rem;
  letter-spacing: 0.4em;
  color: var(--ink-55);
  margin-bottom: 18px;
}
html.theme-yaji .yj-eyebrow::before,
html.theme-yaji .yj-eyebrow::after {
  content: '·';
  margin: 0 10px;
  color: var(--ink-25);
}
html.theme-yaji .yj-wordmark {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(4px, 1vh, 10px);
  font-family: var(--brush);
  font-weight: 400;
  color: var(--ink);
  line-height: 1;
  margin: 0 0 clamp(14px, 3vh, 26px);
  text-shadow: 0 1px 0 rgba(27, 22, 17, 0.08);
  animation: none !important;
}
html.theme-yaji .yj-wordmark-char {
  display: block;
  font-family: inherit;
  font-size: clamp(4.4rem, 3.2rem + 5.5vw, 6.8rem);
  letter-spacing: 0;
  line-height: 1;
}

html.theme-yaji .yj-cover-lede {
  margin: 0 auto;
  max-width: 22em;
  font-family: var(--body);
  font-size: clamp(0.92rem, 0.82rem + 0.35vw, 1.02rem);
  line-height: 2.3;
  letter-spacing: 0.06em;
  color: var(--ink-70);
  text-align: center;
  word-break: keep-all;
  overflow-wrap: break-word;
}
html.theme-yaji .yj-cover-lede .yj-line {
  display: inline-block;
  white-space: nowrap;
  padding: 2px 0;
}

html.theme-yaji .yj-cover-learn {
  background: transparent;
  border: none;
  display: block;
  /* iOS HIG: 44x44 最小触控目标；把 padding 提上来并设 min-height */
  margin: clamp(22px, 4vh, 32px) auto 0;
  padding: 13px 18px;
  min-height: 44px;
  font-family: var(--body);
  font-size: 0.9rem;
  letter-spacing: 0.28em;
  color: var(--ink-55);
  cursor: pointer;
  transition: color var(--dur-med) var(--ease);
}
html.theme-yaji .yj-cover-learn:hover { color: var(--ink); }
html.theme-yaji .yj-wordmark-row {
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(10px, 3vw, 22px);
  margin: 0 auto;
}
html.theme-yaji .yj-tagline {
  margin: 6px auto 0;
  max-width: 20em;
  font-family: var(--body);
  font-size: clamp(0.96rem, 0.86rem + 0.4vw, 1.1rem);
  letter-spacing: 0.22em;
  color: var(--ink-80);
  line-height: 1.9;
  text-align: center;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
}
html.theme-yaji .yj-tagline--vertical {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--song);
  font-size: clamp(0.9rem, 0.8rem + 0.4vw, 1.05rem);
  letter-spacing: 0.18em;
  color: var(--ink-70);
  line-height: 1.5;
  max-width: none;
  margin: clamp(12px, 2vh, 20px) 0 0;
  padding-top: 2px;
  align-self: flex-start;
  white-space: nowrap;
  overflow: visible;
  word-break: keep-all;
}
html.theme-yaji .yj-tagline .yj-line {
  display: inline-block;
  white-space: nowrap;
}
html.theme-yaji .yj-tagline .yj-sep {
  display: inline-block;
  margin: 0 0.5em;
  color: var(--ink-40);
  letter-spacing: 0;
}
html.theme-yaji .yj-cover-lede {
  width: min(32rem, 100%);
  margin: 18px auto 0;
  font-family: var(--body);
  font-size: 0.98rem;
  line-height: 2;
  letter-spacing: 0.06em;
  color: var(--ink-70);
  text-align: center;
}

html.theme-yaji .yj-couplet {
  position: absolute;
  right: max(14px, env(safe-area-inset-right));
  top: 64px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--song);
  color: var(--ink-55);
  letter-spacing: 0.55em;
  font-size: 0.95rem;
  line-height: 1.8;
  z-index: 3;
  pointer-events: none;
  user-select: none;
}

html.theme-yaji .yj-hexcrest {
  margin: clamp(26px, 6vh, 44px) 0 clamp(14px, 3vh, 22px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  width: 100%;
}
html.theme-yaji .yj-hexcrest-frame {
  position: relative;
  padding: 24px 32px 20px;
  border: 0.5px solid var(--ink-25);
  border-radius: 2px;
  background: linear-gradient(180deg, var(--paper-bright), var(--paper));
  box-shadow: var(--shadow-soft);
}
html.theme-yaji .yj-hexcrest-frame::before,
html.theme-yaji .yj-hexcrest-frame::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid var(--ink);
}
html.theme-yaji .yj-hexcrest-frame::before {
  top: -4px; left: -4px;
  border-right: none; border-bottom: none;
}
html.theme-yaji .yj-hexcrest-frame::after {
  bottom: -4px; right: -4px;
  border-left: none; border-top: none;
}
html.theme-yaji .yj-hexcrest-lines {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
html.theme-yaji .yj-hexcrest-line {
  width: 108px;
  height: 8px;
  background: var(--ink);
  border-radius: 1px;
  opacity: 0.94;
}
html.theme-yaji .yj-hexcrest-meta {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
  font-family: var(--song);
  letter-spacing: 0.35em;
  color: var(--ink-70);
  font-size: 0.8rem;
}
html.theme-yaji .yj-hexcrest-meta em {
  font-family: var(--roman);
  font-style: italic;
  color: var(--ink-55);
  font-size: 0.9rem;
  letter-spacing: 0;
}

html.theme-yaji .yj-brush-divider {
  display: block;
  width: min(320px, 78vw);
  height: 14px;
  margin-left: auto;
  margin-right: auto;
  margin-top: clamp(22px, 5vh, 38px);
  margin-bottom: clamp(22px, 5vh, 38px);
  opacity: 0.7;
  color: var(--ink);
}

html.theme-yaji .yj-chapters {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: clamp(28px, 6vh, 44px);
}
html.theme-yaji .yj-chapter {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  padding: 24px 22px 20px;
  background: var(--glass-sheer);
  border: 0.5px solid var(--ink-15);
  border-radius: 2px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  text-align: left;
  transition: border-color var(--dur-med) var(--ease),
              transform var(--dur-med) var(--ease);
}
html.theme-yaji .yj-chapter:hover {
  border-color: var(--ink-40);
  transform: translateY(-1px);
}
html.theme-yaji .yj-chapter-numeral {
  position: absolute;
  right: -8px;
  top: -18px;
  font-family: var(--seri);
  font-weight: 900;
  font-size: clamp(6rem, 5rem + 4vw, 8.5rem);
  line-height: 0.85;
  color: var(--ink);
  opacity: 0.06;
  user-select: none;
  pointer-events: none;
}
html.theme-yaji .yj-chapter-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--song);
  font-size: 0.76rem;
  letter-spacing: 0.35em;
  color: var(--ink-55);
  margin-bottom: 10px;
}
html.theme-yaji .yj-chapter-badge em {
  font-family: var(--roman);
  font-style: italic;
  letter-spacing: 0;
  color: var(--ink-40);
}
html.theme-yaji .yj-chapter-badge::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--ink-40);
}
html.theme-yaji .yj-chapter-title {
  margin: 0 0 10px;
  font-family: var(--seri);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.28em;
  color: var(--ink);
}
html.theme-yaji .yj-chapter-body {
  margin: 0;
  font-family: var(--body);
  font-size: 1rem;
  line-height: 2;
  letter-spacing: 0.03em;
  color: var(--ink-80);
}
html.theme-yaji .yj-chapter-body em {
  font-family: var(--song);
  font-style: normal;
  color: var(--cinnabar);
  letter-spacing: 0.1em;
}

html.theme-yaji .yj-cta-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: clamp(56px, 9vh, 88px) auto clamp(28px, 5vh, 44px);
}
html.theme-yaji .yj-cta-stack .investor-enter-btn {
  animation: yjCtaRise 900ms var(--ease) both !important;
}
@keyframes yjCtaRise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
html.theme-yaji .yj-cta-meta {
  font-family: var(--song);
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  color: var(--ink-55);
}

html.theme-yaji .yj-colophon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: clamp(18px, 3vh, 28px);
  font-family: var(--roman);
  font-style: italic;
  color: var(--ink-40);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-align: center;
}
html.theme-yaji .yj-colophon-zh {
  font-family: var(--song);
  font-style: normal;
  letter-spacing: 0.3em;
  color: var(--ink-55);
  font-size: 0.72rem;
}
html.theme-yaji .yj-colophon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: clamp(48px, 8vh, 96px) auto clamp(28px, 5vh, 44px);
  font-family: var(--body);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--ink-40);
  text-align: center;
}
html.theme-yaji .yj-colophon-en {
  font-family: var(--roman);
  font-style: italic;
  letter-spacing: 0.18em;
  font-size: 0.66rem;
  color: var(--ink-25);
}

/* ── Question overlay ──────────────────────────────────── */

html.theme-yaji .question-overlay {
  background-color: var(--paper) !important;
  background-image:
    radial-gradient(90% 55% at 50% 10%, var(--paper-bright) 0%, transparent 65%),
    radial-gradient(60% 40% at 85% 85%, rgba(216, 204, 169, 0.4) 0%, transparent 70%) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  overflow-y: auto;
}
html.theme-yaji .question-overlay::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 680px;
  aspect-ratio: 1 / 1;
  background-image: url('/assets/stitch/splash-mountain.jpg');
  background-image: image-set(
    url('/assets/stitch/splash-mountain.webp') type('image/webp') 1x,
    url('/assets/stitch/splash-mountain.jpg')  type('image/jpeg') 1x
  );
  background-size: contain;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0.22;
  filter: grayscale(1) contrast(0.92) sepia(0.08);
  mix-blend-mode: multiply;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 45%, rgba(0,0,0,0.2) 75%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 45%, rgba(0,0,0,0.2) 75%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
html.theme-yaji .question-overlay > * { position: relative; z-index: 1; }

html.theme-yaji .question-btn-primary[disabled],
html.theme-yaji .question-btn-primary.is-disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  box-shadow: 0 6px 16px rgba(27, 22, 17, 0.1) !important;
  transform: none !important;
}
html.theme-yaji .question-overlay .yj-q-error {
  margin: 10px auto 0;
  color: var(--cinnabar);
  font-family: var(--body);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-align: center;
  min-height: 1.4em;
  animation: yjShake 380ms var(--ease);
}
@keyframes yjShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

html.theme-yaji .question-card {
  position: relative;
  background-color: var(--paper-bright) !important;
  background-image:
    radial-gradient(60% 40% at 12% 4%, rgba(216, 204, 169, 0.14), transparent 70%),
    radial-gradient(50% 30% at 92% 96%, rgba(216, 204, 169, 0.12), transparent 70%),
    linear-gradient(180deg, var(--paper-bright) 0%, var(--paper) 100%) !important;
  border: 0.5px solid var(--ink-15) !important;
  border-radius: 4px !important;
  padding: clamp(28px, 5.5vw, 40px) clamp(22px, 5vw, 32px) clamp(26px, 5vw, 36px) !important;
  max-width: min(440px, 94vw) !important;
  color: var(--ink) !important;
  box-shadow:
    0 22px 60px rgba(27, 22, 17, 0.09),
    inset 0 1px 0 rgba(250, 244, 226, 0.55) !important;
}

html.theme-yaji .yj-letter-corners,
html.theme-yaji .yj-letter-seal,
html.theme-yaji .yj-letter-kicker,
html.theme-yaji .yj-letter-closing {
  display: none !important;
}

html.theme-yaji .yj-q-hint-lead,
html.theme-yaji .yj-q-hint-tail {
  display: inline-block;
  font-family: var(--body);
  letter-spacing: 0.04em;
}
html.theme-yaji .yj-q-hint-lead {
  color: var(--ink-80);
  font-size: 0.96rem;
  line-height: 1.8;
}
html.theme-yaji .yj-q-hint-tail {
  margin-top: 6px;
  color: var(--ink-55);
  font-size: 0.84rem;
  line-height: 1.7;
}

html.theme-yaji .question-title {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
  font-size: clamp(1.5rem, 1.15rem + 1.2vw, 1.95rem) !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  text-shadow: none !important;
  background: none !important;
  -webkit-text-fill-color: var(--ink) !important;
  margin: 0 0 14px !important;
  text-align: center;
}
html.theme-yaji .question-title::after {
  content: '';
  display: block;
  width: 56px;
  height: 1px;
  margin: 14px auto 0;
  background: linear-gradient(to right, transparent, var(--ink-40), transparent);
}

html.theme-yaji .question-subtitle {
  color: var(--ink-70) !important;
  font-family: var(--song) !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.2em !important;
  line-height: 1.9 !important;
  margin: 14px auto 22px !important;
  text-shadow: none !important;
  max-width: 20rem;
}

html.theme-yaji .quick-questions {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 14px !important;
  margin-bottom: 22px !important;
}
@media (min-width: 420px) {
  html.theme-yaji .quick-questions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

html.theme-yaji .quick-question {
  position: relative;
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 16px 18px !important;
  border-radius: 4px !important;
  border: 0.5px solid var(--ink-15) !important;
  background: var(--paper-bright) !important;
  color: var(--ink) !important;
  font-family: var(--body) !important;
  font-size: 1rem !important;
  line-height: 1.55 !important;
  letter-spacing: 0.02em;
  text-align: left !important;
  box-shadow: 0 1px 0 rgba(27, 22, 17, 0.03) !important;
  min-width: 0;
  overflow: hidden;
  transition: border-color var(--dur-med) var(--ease),
              background var(--dur-med) var(--ease),
              box-shadow var(--dur-med) var(--ease),
              transform var(--dur-med) var(--ease) !important;
}
html.theme-yaji .quick-question:hover {
  border-color: var(--ink-40) !important;
  background: linear-gradient(180deg, var(--paper-bright), var(--paper)) !important;
  box-shadow: 0 10px 26px rgba(27, 22, 17, 0.06) !important;
  transform: translateY(-1px) !important;
}
html.theme-yaji .quick-question > span:last-child {
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}
html.theme-yaji .quick-question:hover {
  border-color: var(--ink-40) !important;
  background: linear-gradient(180deg, var(--paper-bright), var(--paper-dim)) !important;
  transform: translateY(-1px) !important;
}

html.theme-yaji .quick-icon,
html.theme-yaji .choice-icon,
html.theme-yaji .paywall-benefit-icon,
html.theme-yaji .save-reading-icon {
  position: relative;
  width: 34px; height: 34px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ink-04) !important;
  border: 0.5px solid var(--ink-15) !important;
  color: var(--ink) !important;
  font-family: inherit !important;
  font-size: 0 !important;
  flex-shrink: 0;
}
html.theme-yaji .quick-icon svg,
html.theme-yaji .choice-icon svg,
html.theme-yaji .paywall-benefit-icon svg,
html.theme-yaji .save-reading-icon svg {
  color: var(--ink);
  stroke: currentColor;
}
html.theme-yaji .quick-icon[data-label]::after { display: none; }

html.theme-yaji .question-divider {
  color: var(--ink-55) !important;
  font-family: var(--song) !important;
  letter-spacing: 0.35em !important;
  font-size: 0.78rem !important;
  margin: 18px 0 14px !important;
}
html.theme-yaji .question-divider::before,
html.theme-yaji .question-divider::after {
  height: 1px !important;
  background: linear-gradient(90deg, transparent, var(--ink-25), transparent) !important;
}

html.theme-yaji .question-input,
html.theme-yaji #questionInput {
  background: var(--paper) !important;
  background-image: none !important;
  border: 0.5px solid var(--ink-25) !important;
  color: var(--ink) !important;
  font-family: var(--seri) !important;
  font-size: 1rem !important;
  border-radius: 4px !important;
  text-align: left !important;
  letter-spacing: 0.04em !important;
  line-height: 1.8 !important;
  padding: 14px 16px !important;
  box-shadow: inset 0 1px 3px rgba(27, 22, 17, 0.04) !important;
  min-height: 92px;
}
html.theme-yaji .question-input::placeholder {
  color: var(--ink-40) !important;
  font-family: var(--song) !important;
}

html.theme-yaji .question-btns {
  display: grid !important;
  gap: 10px !important;
  margin-top: 14px !important;
}
html.theme-yaji .question-btn {
  min-height: 52px !important;
  border-radius: 9999px !important;
  font-family: var(--seri) !important;
  font-size: 1rem !important;
  letter-spacing: 0.25em !important;
}
html.theme-yaji .question-btn-skip {
  background: transparent !important;
  border: 0.5px solid var(--ink-25) !important;
  color: var(--ink-70) !important;
  font-family: var(--seri) !important;
  letter-spacing: 0.22em !important;
  text-shadow: none !important;
  box-shadow: none !important;
}
html.theme-yaji .question-btn-skip:hover {
  background: var(--ink-04) !important;
  color: var(--ink) !important;
}

html.theme-yaji .question-tip {
  background: transparent !important;
  border: none !important;
  color: var(--ink-55) !important;
  font-family: var(--song) !important;
  letter-spacing: 0.15em !important;
  text-shadow: none !important;
  margin-top: 10px !important;
  opacity: 1 !important;
  font-size: 0.75rem !important;
}

/* ── Divination ritual (canvas chrome + status) ─────────── */

html.theme-yaji .title {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
  font-weight: 700 !important;
  letter-spacing: 0.45em !important;
  text-shadow: none !important;
  background: none !important;
  -webkit-text-fill-color: var(--ink) !important;
  animation: none !important;
}

html.theme-yaji .question-display {
  background: var(--paper-bright) !important;
  background-image: none !important;
  border: 0.5px solid var(--ink-15) !important;
  border-radius: 6px !important;
  padding: 14px 20px !important;
  color: var(--ink) !important;
  font-family: var(--body) !important;
  letter-spacing: 0.06em !important;
  box-shadow: 0 1px 0 rgba(27, 22, 17, 0.04) !important;
  max-width: min(520px, 92vw);
  margin-left: auto;
  margin-right: auto;
  min-height: 0 !important;
}
html.theme-yaji .question-display-text,
html.theme-yaji #questionDisplayText {
  color: #000 !important;
  font-family: var(--body) !important;
  font-size: 1.15rem !important;
  font-weight: 600 !important;
  line-height: 1.7 !important;
  letter-spacing: 0.04em !important;
  text-align: center !important;
  text-shadow: none !important;
  -webkit-text-fill-color: #000 !important;
}

html.theme-yaji .yj-daily-quote-card {
  width: min(340px, 92vw);
  margin-top: 14px;
  padding: 16px 18px 18px;
  background: linear-gradient(180deg, var(--paper-bright) 0%, var(--glass-sheer) 100%);
  border: 0.5px solid var(--ink-15);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}
html.theme-yaji .yj-daily-quote-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.28), transparent 44%);
  pointer-events: none;
}
html.theme-yaji .yj-daily-quote-head,
html.theme-yaji .yj-daily-quote-card > * {
  position: relative;
  z-index: 1;
}
html.theme-yaji .yj-daily-quote-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
html.theme-yaji .yj-daily-quote-kicker {
  font-family: var(--roman);
  font-size: 0.72rem;
  font-style: italic;
  letter-spacing: 0.18em;
  color: var(--cinnabar);
}
html.theme-yaji .yj-daily-quote-date {
  font-family: var(--song);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  color: var(--ink-55);
}
html.theme-yaji .yj-daily-quote-text {
  margin: 0;
  font-family: var(--seri);
  font-size: 1.02rem;
  line-height: 1.95;
  letter-spacing: 0.08em;
  color: var(--ink);
}
html.theme-yaji .yj-daily-quote-source {
  margin-top: 10px;
  font-family: var(--song);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--ink-55);
}
html.theme-yaji .yj-daily-quote-reflection {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 0.5px solid var(--ink-08);
  font-family: var(--body);
  font-size: 0.84rem;
  line-height: 1.85;
  letter-spacing: 0.04em;
  color: var(--ink-70);
}

html.theme-yaji .divination-progress {
  color: var(--ink-80) !important;
  font-family: var(--seri) !important;
  letter-spacing: 0.28em !important;
  font-size: 0.82rem !important;
  background: none !important;
  text-shadow: none !important;
}
html.theme-yaji .progress-text,
html.theme-yaji .progress-yao-num,
html.theme-yaji .progress-action {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
}
html.theme-yaji .progress-yao-num {
  font-family: var(--roman) !important;
  font-style: italic;
  font-size: 1.35rem !important;
  margin: 0 4px;
}
html.theme-yaji .progress-dot {
  background: var(--ink-15) !important;
  box-shadow: none !important;
}
html.theme-yaji .progress-dot.current {
  background: var(--ink) !important;
  box-shadow: 0 0 12px var(--ink-25) !important;
}

html.theme-yaji .status-text,
html.theme-yaji #statusText {
  color: var(--ink-70) !important;
  font-family: var(--song) !important;
  letter-spacing: 0.28em !important;
  text-shadow: none !important;
}

html.theme-yaji .divination-progress,
html.theme-yaji #divinationProgress,
html.theme-yaji .gesture-hint,
html.theme-yaji .first-time-hint,
html.theme-yaji .status-text,
html.theme-yaji #statusText {
  display: none !important;
}

html.theme-yaji .yj-ritual-guide-body .gesture-hint,
html.theme-yaji .yj-ritual-guide-body .first-time-hint {
  display: block !important;
}
html.theme-yaji .gesture-hint_keep,
html.theme-yaji .first-time-hint_keep {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
  letter-spacing: 0.2em;
}
html.theme-yaji .hint-tap-text,
html.theme-yaji .gesture-text {
  color: var(--ink) !important;
  font-family: var(--body) !important;
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.28em !important;
}
html.theme-yaji .gesture-arrow-icon svg,
html.theme-yaji .hint-tap-icon svg,
html.theme-yaji .hint-swipe-icon svg {
  stroke: var(--ink) !important;
  stroke-width: 1.8 !important;
}
html.theme-yaji .hint-tap-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
html.theme-yaji .hint-tap-icon::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  opacity: 0.3;
  animation: yjTapPulse 1.6s var(--ease) infinite;
  pointer-events: none;
}
@keyframes yjTapPulse {
  0%   { transform: scale(0.8); opacity: 0.55; }
  70%  { transform: scale(1.8); opacity: 0; }
  100% { transform: scale(0.8); opacity: 0; }
}

html.theme-yaji #app,
html.theme-yaji .app-container {
  /* 关键：顶部必须留够顶栏按钮（i / 历史 / 分享 / 重新起卦 · 共 4 颗 42px）
     再加 safe-area-inset-top 才不会把用户的问题文字压在按钮底下 —— 之前
     用户反馈「看不到问题，要下拉才能看」就是这里留白不足。 */
  padding-top: calc(env(safe-area-inset-top) + 70px) !important;
  padding-bottom: calc(140px + env(safe-area-inset-bottom)) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
html.theme-yaji #app > .title { display: none !important; }
html.theme-yaji #app > .question-display { order: 1; margin-top: 8px !important; margin-bottom: 6px; }
html.theme-yaji #app > .status-text { order: 3; margin: 4px 0 14px; }
html.theme-yaji #app > .yarrow-stage { order: 4; }
html.theme-yaji #app > .progress-dots { order: 5; }
html.theme-yaji #app > .hexagram-display { order: 6; }
html.theme-yaji #app > .yj-ritual-guide { order: 7; margin-bottom: 24px; }

html.theme-yaji .yarrow-stage {
  background: linear-gradient(180deg, var(--paper-bright) 0%, var(--paper) 100%) !important;
  background-image: linear-gradient(180deg, var(--paper-bright) 0%, var(--paper) 100%) !important;
  border: 0.5px solid var(--ink-15) !important;
  border-radius: 12px !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow:
    inset 0 1px 0 rgba(250, 244, 226, 0.6),
    0 20px 50px rgba(27, 22, 17, 0.06),
    0 0 0 0.5px var(--ink-08) !important;
  max-width: min(440px, 94vw) !important;
  height: clamp(300px, 78vw, 440px) !important;
  min-height: 300px !important;
}

html.theme-yaji .progress-dot {
  background: var(--ink-40) !important;
  box-shadow: none !important;
  width: 10px !important;
  height: 10px !important;
  opacity: 0.92 !important;
}
html.theme-yaji .progress-dot.current {
  background: var(--cinnabar) !important;
  box-shadow: 0 0 12px rgba(138, 42, 30, 0.28) !important;
  transform: scale(1.15);
}
html.theme-yaji .progress-dot.done {
  background: var(--ink) !important;
}

html.theme-yaji #bottomNav,
html.theme-yaji .bottom-nav {
  z-index: 900 !important;
}
html.theme-yaji .question-overlay,
html.theme-yaji .interpretation-panel,
html.theme-yaji .chat-panel,
html.theme-yaji .history-panel,
html.theme-yaji .history-detail {
  padding-bottom: calc(100px + env(safe-area-inset-bottom)) !important;
}
html.theme-yaji .yarrow-stage::before { display: none !important; }
html.theme-yaji .yj-register {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: rgba(8, 6, 4, 0.78);
  backdrop-filter: blur(12px) saturate(0.88);
  -webkit-backdrop-filter: blur(12px) saturate(0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: yjIntroIn 460ms var(--ease);
}
html.theme-yaji .yj-register.is-dismissed {
  animation: yjIntroOut 360ms var(--ease) forwards;
}
html.theme-yaji .yj-reg-card {
  width: min(400px, 94vw);
  padding: clamp(28px, 6vw, 40px) clamp(22px, 5vw, 32px);
  background: linear-gradient(180deg, var(--paper-bright), var(--paper));
  border: 0.5px solid var(--ink-25);
  border-radius: 8px;
  text-align: center;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.38),
    0 0 0 6px rgba(200, 162, 92, 0.06),
    inset 0 1px 0 rgba(250, 244, 226, 0.6);
  animation: yjIntroCard 520ms var(--ease);
}
html.theme-yaji .yj-reg-kicker {
  display: block;
  font-family: var(--roman);
  font-style: italic;
  font-size: 0.78rem;
  letter-spacing: 0.35em;
  color: var(--cinnabar);
  margin-bottom: 8px;
}
html.theme-yaji .yj-reg-title {
  margin: 0 0 10px;
  font-family: var(--brush);
  font-weight: 400;
  font-size: 1.8rem;
  letter-spacing: 0.18em;
  color: var(--ink);
}
html.theme-yaji .yj-reg-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  margin: 12px auto 0;
  background: var(--ink-40);
}
html.theme-yaji .yj-reg-sub {
  margin: 14px auto 22px;
  max-width: 20em;
  font-family: var(--body);
  font-size: 0.86rem;
  line-height: 1.7;
  letter-spacing: 0.08em;
  color: var(--ink-55);
}
html.theme-yaji .yj-reg-field-label {
  text-align: left;
  margin-bottom: 8px;
  font-family: var(--body);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--ink-70);
}
html.theme-yaji .yj-reg-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
html.theme-yaji .yj-reg-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  font-size: 1.6rem;
  background: var(--paper);
  border: 0.5px solid var(--ink-15);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 200ms var(--ease), transform 160ms var(--ease), background 200ms var(--ease);
}
html.theme-yaji .yj-reg-cell:hover { border-color: var(--ink-40); background: var(--paper-bright); }
html.theme-yaji .yj-reg-cell.is-on {
  border-color: var(--cinnabar);
  background: var(--paper-bright);
  transform: scale(1.04);
  box-shadow: 0 6px 16px rgba(138, 42, 30, 0.14);
}
html.theme-yaji .yj-reg-name-row {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}
html.theme-yaji .yj-reg-name {
  flex: 1;
  padding: 12px 14px;
  background: var(--paper);
  border: 0.5px solid var(--ink-25);
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-align: left;
}
html.theme-yaji .yj-reg-name::placeholder { color: var(--ink-40); }
html.theme-yaji .yj-reg-reroll {
  padding: 0 14px;
  background: transparent;
  border: 0.5px solid var(--ink-25);
  border-radius: 6px;
  color: var(--ink-70);
  font-family: var(--body);
  font-size: 0.86rem;
  letter-spacing: 0.16em;
  cursor: pointer;
  white-space: nowrap;
}
html.theme-yaji .yj-reg-reroll:hover { background: var(--paper-bright); color: var(--ink); }
html.theme-yaji .yj-reg-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 40px;
  background: var(--ink);
  color: var(--gold-leaf);
  border: 0.5px solid rgba(200, 162, 92, 0.42);
  border-radius: 9999px;
  font-family: var(--seri);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(27, 22, 17, 0.22);
  transition: background 220ms var(--ease), transform 160ms var(--ease);
}
html.theme-yaji .yj-reg-submit:hover { background: #2b2218; color: #e8caa0; }
html.theme-yaji .yj-reg-submit:active { transform: scale(0.97); }

html.theme-yaji .yj-ritual-intro {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(8, 6, 4, 0.78);
  backdrop-filter: blur(10px) saturate(0.85);
  -webkit-backdrop-filter: blur(10px) saturate(0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: yjIntroIn 500ms var(--ease);
}
html.theme-yaji .yj-ritual-intro.is-dismissed {
  animation: yjIntroOut 400ms var(--ease) forwards;
}
@keyframes yjIntroIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes yjIntroOut { from { opacity: 1; } to { opacity: 0; } }

html.theme-yaji .yj-intro-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: min(380px, 92vw);
  animation: yjIntroCard 620ms var(--ease);
}
@keyframes yjIntroCard {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

html.theme-yaji .yj-intro-q-card {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  padding: 20px 22px;
  background: linear-gradient(180deg, #faf4e2, #f3ecd9);
  border: 0.5px solid var(--ink-25);
  border-radius: 6px;
  text-align: center;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.45),
    0 0 0 6px rgba(200, 162, 92, 0.08),
    0 0 44px rgba(200, 162, 92, 0.18);
}
html.theme-yaji .yj-intro-q-label {
  display: block;
  font-family: var(--roman);
  font-style: italic;
  font-size: 0.78rem;
  letter-spacing: 0.42em;
  color: var(--cinnabar);
  margin-bottom: 10px;
}
html.theme-yaji .yj-intro-q-text {
  margin: 0;
  font-family: var(--body);
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.8;
  letter-spacing: 0.04em;
  color: #000;
  word-break: break-word;
  overflow-wrap: anywhere;
}

html.theme-yaji .yj-intro-arrow {
  color: var(--gold-leaf);
  line-height: 0;
  animation: yjArrowBob 2s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(200, 162, 92, 0.35));
}
@keyframes yjArrowBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

html.theme-yaji .yj-intro-guide {
  margin: 0;
  font-family: var(--body);
  font-size: 1rem;
  line-height: 2;
  letter-spacing: 0.12em;
  color: rgba(240, 220, 170, 0.92);
  text-align: center;
  max-width: 20em;
}

html.theme-yaji .yj-intro-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 14px 38px;
  background: rgba(27, 22, 17, 0.92);
  border: 0.5px solid rgba(200, 162, 92, 0.44);
  border-radius: 9999px;
  color: var(--gold-leaf);
  font-family: var(--seri);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  cursor: pointer;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35),
              inset 0 1px 0 rgba(240, 220, 170, 0.1);
  transition: background 220ms var(--ease), transform 160ms var(--ease);
}
html.theme-yaji .yj-intro-next:hover {
  background: rgba(43, 34, 24, 0.96);
  border-color: rgba(200, 162, 92, 0.6);
  color: #e8caa0;
}
html.theme-yaji .yj-intro-next:active { transform: scale(0.96); }

html.theme-yaji .yj-taiji {
  position: absolute;
  top: 50%; left: 50%;
  width: 56%;
  max-width: 220px;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
  animation: yjTaijiTurn 120s linear infinite;
}
@keyframes yjTaijiTurn {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
html.theme-yaji .hexagram-display .yao { background: var(--ink) !important; }

html.theme-yaji .yj-ritual-guide {
  margin: clamp(20px, 4vh, 32px) auto 0;
  width: 100%;
  max-width: min(520px, 92vw);
  box-sizing: border-box;
  padding: 0 10px;
}
html.theme-yaji .yj-ritual-guide-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 14px 20px;
  background: var(--glass-sheer);
  border: 0.5px solid var(--ink-15);
  border-radius: 3px;
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  cursor: pointer;
  transition: background var(--dur-med) var(--ease),
              border-color var(--dur-med) var(--ease);
}
html.theme-yaji .yj-ritual-guide-toggle:hover {
  background: var(--paper-bright);
  border-color: var(--ink-40);
}
html.theme-yaji .yj-ritual-guide-kicker {
  font-family: var(--roman);
  font-style: italic;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  color: var(--ink-55);
}
html.theme-yaji .yj-ritual-guide-title {
  font-family: var(--seri);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.3em;
  color: var(--ink);
}
html.theme-yaji .yj-ritual-guide-hint {
  font-family: var(--body);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--ink-55);
  margin-top: 4px;
}
html.theme-yaji .yj-ritual-guide-toggle.is-open .yj-ritual-guide-hint::after {
  content: ' · 收起';
}

html.theme-yaji .yj-ritual-guide-body[hidden] { display: none; }
html.theme-yaji .yj-ritual-guide-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
  padding: 22px 20px;
  background: var(--paper-bright);
  border: 0.5px solid var(--ink-15);
  border-radius: 3px;
  box-shadow: var(--shadow-soft);
  animation: yjFadeIn var(--dur-slow) var(--ease);
}
@keyframes yjFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
html.theme-yaji .yj-step {
  padding-bottom: 14px;
  border-bottom: 0.5px dashed var(--ink-15);
}
html.theme-yaji .yj-step:last-of-type {
  padding-bottom: 0;
  border-bottom: none;
}
html.theme-yaji .yj-step-hd {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
}
html.theme-yaji .yj-step-num {
  font-family: var(--seri);
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: 0.1em;
}
html.theme-yaji .yj-step-en {
  font-family: var(--roman);
  font-style: italic;
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  color: var(--ink-55);
}
html.theme-yaji .yj-step-name {
  flex: 1;
  margin: 0;
  font-family: var(--body);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.2em;
  color: var(--ink);
}
html.theme-yaji .yj-step-gesture {
  font-family: var(--body);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  color: var(--ink-55);
  padding: 2px 8px;
  border: 0.5px solid var(--ink-25);
  border-radius: 9999px;
}
html.theme-yaji .yj-step-brief {
  margin: 0 0 4px;
  font-family: var(--body);
  font-size: 0.94rem;
  line-height: 1.8;
  color: var(--ink-90);
  letter-spacing: 0.04em;
}
html.theme-yaji .yj-step-detail {
  margin: 0;
  font-family: var(--body);
  font-size: 0.86rem;
  line-height: 1.9;
  color: var(--ink-70);
  letter-spacing: 0.04em;
}
html.theme-yaji .yj-ritual-guide-foot {
  margin: 8px 0 0;
  padding-top: 12px;
  border-top: 0.5px solid var(--ink-15);
  font-family: var(--body);
  font-size: 0.82rem;
  line-height: 1.9;
  color: var(--ink-70);
  letter-spacing: 0.06em;
  text-align: center;
}

html.theme-yaji .yj-juce-chrome {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  width: 0; height: 0;
}
html.theme-yaji .yj-juce-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}
html.theme-yaji .yj-juce-ring--outer {
  width: 320px; height: 320px;
  border: 0.5px solid var(--ink-08);
}
html.theme-yaji .yj-juce-ring--inner {
  width: 260px; height: 260px;
  border: 0.5px solid var(--ink-15);
}
html.theme-yaji .yj-juce-ring--core {
  width: 84px; height: 84px;
  border: 0.5px dashed var(--ink-25);
}

html.theme-yaji .yj-gather-pulse {
  position: absolute;
  top: 50%; left: 50%;
  width: 14px; height: 14px;
  transform: translate(-50%, -50%);
  background: rgba(74, 42, 16, 0.55);
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
}
html.theme-yaji .yj-gather-pulse::before,
html.theme-yaji .yj-gather-pulse::after {
  content: '';
  position: absolute;
  inset: -10px;
  border: 1.5px solid rgba(74, 42, 16, 0.55);
  border-radius: 50%;
  animation: yjGatherPulse 1.8s var(--ease) infinite;
}
html.theme-yaji .yj-gather-pulse::after {
  animation-delay: 0.9s;
}
@keyframes yjGatherPulse {
  0%   { transform: scale(0.6); opacity: 0.8; }
  80%  { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(2.4); opacity: 0; }
}
html.theme-yaji .yj-gather-arrow {
  position: absolute;
  left: 50%;
  top: 50%;
  margin-top: 40px;
  transform: translateX(-50%);
  color: var(--cinnabar);
  line-height: 0;
  pointer-events: none;
  z-index: 3;
  animation: yjArrowUp 1.4s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(138, 42, 30, 0.35));
}
@keyframes yjArrowUp {
  0%, 100% { transform: translate(-50%, 0);   opacity: 0.95; }
  50%      { transform: translate(-50%, -10px); opacity: 0.65; }
}
html.theme-yaji .yj-gather-arrow.is-split {
  top: 10%;
  margin-top: 0;
  animation: yjArrowSwipe 1.3s ease-in-out infinite;
}
@keyframes yjArrowSwipe {
  0%, 100% { transform: translate(-50%, 16px); opacity: 0.55; }
  50%      { transform: translate(-50%, -8px);  opacity: 1; }
}
html.theme-yaji .yj-gather-pulse.is-split { display: none !important; }
html.theme-yaji .yj-gather-tip.is-split {
  top: auto;
  bottom: 18px;
  margin-top: 0;
}

html.theme-yaji .yj-gather-tip {
  position: absolute;
  left: 50%;
  top: 50%;
  margin-top: 96px;
  transform: translateX(-50%);
  font-family: var(--body);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--ink);
  background: var(--glass-paper);
  border: 0.5px solid var(--cinnabar);
  border-radius: 9999px;
  padding: 7px 16px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(138, 42, 30, 0.14), var(--shadow-soft);
  pointer-events: none;
  z-index: 3;
}

/* ── Reading / interpretation panel ─────────────────────── */

html.theme-yaji .interpretation-panel {
  background: var(--paper) !important;
  background-image: radial-gradient(90% 55% at 50% 0%, var(--paper-bright), transparent 70%) !important;
  color: var(--ink) !important;
}
html.theme-yaji .interpretation-panel::before { display: none !important; }
html.theme-yaji .yj-interp-hexagram { display: none !important; }

html.theme-yaji .interp-header {
  position: relative;
  text-align: center;
  padding: clamp(36px, 8vw, 64px) 0 clamp(20px, 4vw, 32px);
}
html.theme-yaji .interp-header::before,
html.theme-yaji .interp-header::after {
  content: '';
  display: block;
  width: 72px;
  height: 1px;
  margin: 0 auto;
  background: linear-gradient(to right, transparent, var(--ink-40), transparent);
}
html.theme-yaji .interp-header::before { margin-bottom: clamp(18px, 3vw, 26px); }
html.theme-yaji .interp-header::after  { margin-top: clamp(18px, 3vw, 26px); }
html.theme-yaji .interp-hexagram-visual {
  margin-bottom: clamp(18px, 3vw, 26px);
}
html.theme-yaji .interp-hexagram-name {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
  font-weight: 900;
  font-size: clamp(3rem, 2.2rem + 2.4vw, 4rem) !important;
  letter-spacing: 0.28em !important;
  text-indent: 0.28em;
  line-height: 1 !important;
  text-shadow: none !important;
  background: none !important;
  -webkit-text-fill-color: var(--ink) !important;
}
html.theme-yaji .interp-hexagram-full {
  color: var(--ink-70) !important;
  font-family: var(--body) !important;
  font-size: 1.05rem !important;
  letter-spacing: 0.5em !important;
  text-indent: 0.5em;
  margin-top: 10px !important;
}

html.theme-yaji .yj-interp-hexagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 0 0;
  margin: 0 auto 10px;
  position: relative;
  z-index: 5;
}
html.theme-yaji .yj-hex-line {
  width: 160px;
  height: 9px;
  background: var(--ink);
  border-radius: 1px;
  opacity: 0.95;
}
html.theme-yaji .yj-hex-line--broken {
  display: flex;
  gap: 10px;
  background: transparent;
}
html.theme-yaji .yj-hex-line--broken span {
  flex: 1;
  height: 9px;
  background: var(--ink);
  border-radius: 1px;
  opacity: 0.95;
}

html.theme-yaji .interp-section,
html.theme-yaji .nianxin-section,
html.theme-yaji .info-section {
  position: relative;
  background: var(--glass-sheer) !important;
  background-image: none !important;
  border: 0.5px solid var(--ink-15) !important;
  border-radius: 4px !important;
  color: var(--ink) !important;
  box-shadow: var(--shadow-soft) !important;
  padding: clamp(18px, 4vw, 24px) clamp(18px, 4vw, 26px) !important;
}
html.theme-yaji .interp-section h2,
html.theme-yaji .interp-section h3,
html.theme-yaji .interp-section-title,
html.theme-yaji .info-section h2,
html.theme-yaji .info-section h3 {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
  font-weight: 700;
  letter-spacing: 0.22em !important;
  text-shadow: none !important;
  margin-bottom: 14px !important;
}
html.theme-yaji .interp-section p,
html.theme-yaji .interp-section-content,
html.theme-yaji .info-section-content p {
  color: var(--ink-80) !important;
  font-family: var(--seri) !important;
  line-height: 1.95 !important;
  letter-spacing: 0.02em;
  font-size: 0.97rem;
}
html.theme-yaji .info-section-content .gold,
html.theme-yaji .info-section-content .highlight {
  color: var(--cinnabar) !important;
  font-weight: 700;
}

html.theme-yaji .answer-section {
  background: var(--glass-sheer) !important;
  border: 0.5px solid var(--ink-15) !important;
  border-radius: 4px !important;
  color: var(--ink) !important;
}
html.theme-yaji .answer-question,
html.theme-yaji .answer-direction,
html.theme-yaji .answer-explanation {
  color: var(--ink-90) !important;
  font-family: var(--seri) !important;
}

/* 念心入口卡。雅集主题也沿用墨金深底，与纸色页面形成视觉主角对比。
   HTML 里的 .nianxin-hero 已经定义了完整样式；这里只做 yaji 主题下的必要微调 */
html.theme-yaji .nianxin-entry-card {
  margin: clamp(18px, 5vw, 28px) auto !important;
}
html.theme-yaji .nianxin-hero-title {
  font-family: var(--seri) !important;
}
html.theme-yaji .nianxin-hero-desc {
  font-family: var(--roman) !important;
  font-style: italic;
}
html.theme-yaji .nianxin-hero-cta-row {
  font-family: var(--seri) !important;
}
/* 旧的 .nianxin-entry-title/-desc 专门规则已并入新的 .nianxin-hero-* 样式体系 */
html.theme-yaji .nianxin-entry-arrow {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(200, 162, 92, 0.16);
  border: 0.5px solid rgba(200, 162, 92, 0.3);
}
html.theme-yaji .nianxin-entry-arrow svg {
  stroke: var(--gold-leaf) !important;
  stroke-width: 1.8 !important;
  width: 16px; height: 16px;
}

html.theme-yaji .nianxin-enter-btn {
  background: var(--glass-paper) !important;
  background-image: none !important;
  backdrop-filter: blur(14px) !important;
  border: 0.5px solid var(--ink-25) !important;
  border-radius: 9999px !important;
  color: var(--ink) !important;
  font-family: var(--seri) !important;
  letter-spacing: 0.3em !important;
  animation: none !important;
  box-shadow: var(--shadow-soft) !important;
}

html.theme-yaji .deep-layer-toggle {
  background: transparent !important;
  background-image: none !important;
  border: 0.5px solid var(--ink-15) !important;
  color: var(--ink-70) !important;
  font-family: var(--seri) !important;
  border-radius: 4px !important;
  letter-spacing: 0.18em;
}

html.theme-yaji .chat-panel,
html.theme-yaji .chat-messages,
html.theme-yaji .chat-body,
html.theme-yaji .chat-footer {
  background: var(--paper) !important;
  background-image: none !important;
  color: var(--ink) !important;
}
/* 消息行（.chat-message）只是 flex 容器，本身无可视样式 —— 旧版把 border/background
   写在这里会导致头像 + 气泡外面出现一圈奇怪的方框。
   视觉应该只在 .chat-message-content（真正的气泡）上体现。 */
html.theme-yaji .chat-message,
html.theme-yaji .chat-msg {
  background: transparent !important;
  border: 0 !important;
  color: var(--ink-90) !important;
}
html.theme-yaji .chat-bubble,
html.theme-yaji .chat-message .chat-message-content {
  background: var(--paper-bright) !important;
  color: var(--ink-90) !important;
  border: 0.5px solid var(--ink-15) !important;
  box-shadow: 0 2px 10px rgba(27, 22, 17, 0.05) !important;
}
/* 系统消息气泡左上角切角：沿用米纸色和墨边。 */
html.theme-yaji .chat-message:not(.user) .chat-message-content::before {
  border-right-color: var(--paper-bright) !important;
  border-top-color: var(--paper-bright) !important;
}
/* 用户侧气泡：用墨金金属色调；同时去掉暗色底 */
html.theme-yaji .chat-message.user .chat-message-content {
  background: linear-gradient(135deg, rgba(232, 200, 107, 0.92), rgba(200, 170, 80, 0.92)) !important;
  color: #1b1611 !important;
  border: 0.5px solid rgba(200, 170, 80, 0.4) !important;
}
html.theme-yaji .chat-message.user .chat-message-content::before {
  border-left-color: rgba(232, 200, 107, 0.92) !important;
  border-top-color: rgba(232, 200, 107, 0.92) !important;
}
html.theme-yaji .chat-header {
  background: var(--glass-paper) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-bottom: 0.5px solid var(--ink-15) !important;
}
html.theme-yaji .chat-title,
html.theme-yaji .chat-name {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
  letter-spacing: 0.18em;
}
/* 输入区容器 —— 原深色 #0f0f15 底色在浅色主题下完全违和 */
html.theme-yaji .chat-input-area {
  background: var(--glass-paper) !important;
  backdrop-filter: blur(18px) saturate(1.06) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.06) !important;
  border-top: 0.5px solid var(--ink-15) !important;
}
html.theme-yaji .chat-input-wrapper {
  background: var(--paper-bright) !important;
  border: 0.5px solid var(--ink-15) !important;
  border-radius: 22px !important;
}
html.theme-yaji .chat-input {
  background: transparent !important;
  border: none !important;
  color: var(--ink) !important;
  font-family: var(--seri) !important;
  caret-color: var(--ink) !important;
}
html.theme-yaji .chat-input::placeholder {
  color: var(--ink-40) !important;
}
html.theme-yaji .chat-send-btn {
  background: var(--ink) !important;
  color: var(--paper-bright) !important;
  border-radius: 50% !important;
}
html.theme-yaji .chat-send-btn svg {
  stroke: var(--paper-bright) !important;
  fill: none !important;
}
html.theme-yaji .chat-send-btn:disabled {
  opacity: 0.38 !important;
}
/* 正在回复三点动画：浅色主题下用墨色，深色默认使用金色。 */
html.theme-yaji .chat-message-loading span {
  background: var(--ink-40) !important;
}

html.theme-yaji .nianxin-name,
html.theme-yaji .nianxin-badge,
html.theme-yaji .nianxin-tagline,
html.theme-yaji .deep-layer-toggle,
html.theme-yaji .conclusion-cta-text,
html.theme-yaji .save-reading-title {
  color: var(--ink) !important;
  background: transparent !important;
  background-image: none !important;
}
html.theme-yaji .nianxin-badge {
  background: var(--ink-08) !important;
  border: 0.5px solid var(--ink-15) !important;
}

html.theme-yaji .close-btn,
html.theme-yaji .paywall-close,
html.theme-yaji .info-close,
html.theme-yaji .history-close,
html.theme-yaji .save-reading-close,
html.theme-yaji .privacy-modal-close {
  position: fixed !important;
  top: calc(14px + env(safe-area-inset-top)) !important;
  right: 14px !important;
  width: 44px !important;
  height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--glass-paper) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 0.5px solid var(--ink-25) !important;
  border-radius: 50% !important;
  color: var(--ink) !important;
  font-family: var(--body) !important;
  font-weight: 400 !important;
  font-size: 1.5rem !important;
  line-height: 1 !important;
  box-shadow: 0 4px 14px rgba(27, 22, 17, 0.08) !important;
  z-index: 600 !important;
  cursor: pointer !important;
  touch-action: manipulation;
}
html.theme-yaji .close-btn:hover,
html.theme-yaji .info-close:hover,
html.theme-yaji .history-close:hover,
html.theme-yaji .paywall-close:hover,
html.theme-yaji .save-reading-close:hover,
html.theme-yaji .privacy-modal-close:hover {
  background: var(--paper-bright) !important;
  border-color: var(--ink-40) !important;
  color: var(--ink) !important;
}
html.theme-yaji .close-btn:active,
html.theme-yaji .info-close:active,
html.theme-yaji .history-close:active,
html.theme-yaji .paywall-close:active,
html.theme-yaji .save-reading-close:active,
html.theme-yaji .privacy-modal-close:active {
  transform: scale(0.94);
}

html.theme-yaji .chat-back-btn,
html.theme-yaji .history-detail-back,
html.theme-yaji #chatBackBtn,
html.theme-yaji #historyDetailBack {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--glass-paper) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 0.5px solid var(--ink-25) !important;
  border-radius: 50% !important;
  color: var(--ink) !important;
  font-family: var(--body) !important;
  font-size: 1.3rem !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  box-shadow: 0 4px 14px rgba(27, 22, 17, 0.08) !important;
  cursor: pointer !important;
  touch-action: manipulation;
}
html.theme-yaji .chat-back-btn svg,
html.theme-yaji .history-detail-back svg {
  stroke: var(--ink) !important;
  fill: none !important;
  stroke-width: 2 !important;
  width: 20px;
  height: 20px;
}
html.theme-yaji .chat-back-btn:active,
html.theme-yaji .history-detail-back:active,
html.theme-yaji #chatBackBtn:active,
html.theme-yaji #historyDetailBack:active {
  transform: scale(0.94);
  background: var(--paper-bright) !important;
}

html.theme-yaji .chat-header,
html.theme-yaji .history-detail-header {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 14px 16px !important;
  position: sticky;
  top: 0;
  z-index: 10;
}

html.theme-yaji .interpretation-panel {
  padding-bottom: calc(110px + env(safe-area-inset-bottom)) !important;
}

/* ▇▇▇ 其它全屏/半屏面板的亮色统一 ▇▇▇
   原 classic 主题下它们默认 rgba(10,10,15,0.98) 深底。在雅集主题下必须强制亮色，
   否则打开「关于一念 / 占卜历史 / 某条历史详情 / 天时拦截弹窗 / 隐私政策 / 保存信息」
   等面板时会突然闪暗色背景，和整体纸质感割裂。 */
html.theme-yaji .info-panel,
html.theme-yaji .history-panel,
html.theme-yaji .history-detail,
html.theme-yaji .privacy-modal,
html.theme-yaji .save-reading-section .save-reading-expanded,
html.theme-yaji .retention-modal {
  background: var(--paper) !important;
  background-image: none !important;
  color: var(--ink) !important;
}
html.theme-yaji .info-title,
html.theme-yaji .history-title,
html.theme-yaji .retention-title,
html.theme-yaji .privacy-modal-title,
html.theme-yaji .save-reading-title {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
}
html.theme-yaji .info-tagline,
html.theme-yaji .history-subtitle,
html.theme-yaji .retention-message,
html.theme-yaji .retention-time,
html.theme-yaji .privacy-modal-content,
html.theme-yaji .save-reading-subtitle,
html.theme-yaji .save-reading-text {
  color: var(--ink-55) !important;
}
html.theme-yaji .info-section,
html.theme-yaji .history-item,
html.theme-yaji .history-detail-body,
html.theme-yaji .save-reading-collapsed,
html.theme-yaji .save-reading-expanded {
  background: var(--paper-bright) !important;
  border: 0.5px solid var(--ink-15) !important;
  color: var(--ink-90) !important;
  box-shadow: 0 1px 3px rgba(27, 22, 17, 0.04) !important;
}
html.theme-yaji .info-section-title,
html.theme-yaji .history-item-hexagram,
html.theme-yaji .save-reading-title {
  color: var(--ink) !important;
}
html.theme-yaji .info-section-content,
html.theme-yaji .history-item-question,
html.theme-yaji .history-item-date,
html.theme-yaji .history-item-footer {
  color: var(--ink-80) !important;
}
html.theme-yaji .prob-table th,
html.theme-yaji .prob-table td {
  color: var(--ink-90) !important;
  border-bottom-color: var(--ink-15) !important;
}
html.theme-yaji .prob-table th {
  color: var(--ink) !important;
}
html.theme-yaji .history-action-btn {
  background: transparent !important;
  border: 0.5px solid var(--ink-15) !important;
  color: var(--ink-80) !important;
}
html.theme-yaji .history-action-btn.delete {
  color: var(--cinnabar) !important;
  border-color: rgba(138, 42, 30, 0.3) !important;
}
html.theme-yaji .retention-vip-btn {
  background: var(--ink) !important;
  color: var(--paper-bright) !important;
  border: 0.5px solid var(--ink) !important;
}
html.theme-yaji .save-reading-input {
  background: var(--paper-bright) !important;
  border: 0.5px solid var(--ink-15) !important;
  color: var(--ink) !important;
}
html.theme-yaji .save-reading-submit {
  background: var(--ink) !important;
  color: var(--paper-bright) !important;
  border: none !important;
}
html.theme-yaji .save-reading-collapsed .save-reading-arrow {
  color: var(--ink-55) !important;
}
/* 全局 ::before / ::after 装饰（祥云之类）在纸色主题下多半看不见，隐藏减少 overdraw */
html.theme-yaji .info-panel::before,
html.theme-yaji .info-panel::after,
html.theme-yaji .interp-header::before,
html.theme-yaji .interp-header::after {
  display: none !important;
}

/* ── Xuetang (学堂) ─────────────────────────────────────── */

html.theme-yaji .xt-root {
  --xt-gold: var(--ink);
  --xt-gold-soft: var(--ink-70);
  --xt-gold-faint: var(--ink-40);
  --xt-gold-hair: var(--ink-15);
  --xt-bg: var(--paper);
  --xt-bg-card: var(--glass-sheer);
  --xt-bg-card-strong: var(--paper-bright);
  --xt-text: var(--ink);
  --xt-text-soft: var(--ink-80);
  --xt-text-dim: var(--ink-55);
  --xt-border: var(--ink-15);
  --xt-serif: var(--seri);
  background: var(--paper) !important;
  color: var(--ink) !important;
  font-family: var(--seri) !important;
}
html.theme-yaji .xt-card,
html.theme-yaji .xt-card-featured,
html.theme-yaji .xt-card-lecture {
  background: var(--glass-sheer) !important;
  background-image: none !important;
  border: 0.5px solid var(--ink-15) !important;
  border-radius: 4px !important;
  color: var(--ink) !important;
  box-shadow: var(--shadow-soft) !important;
  transition: border-color var(--dur-med) var(--ease),
              background var(--dur-med) var(--ease),
              transform var(--dur-med) var(--ease) !important;
}
html.theme-yaji .xt-card:hover,
html.theme-yaji .xt-card-featured:hover,
html.theme-yaji .xt-card-lecture:hover {
  border-color: var(--ink-40) !important;
  background: var(--paper-bright) !important;
  transform: translateY(-1px);
}
html.theme-yaji .xt-card-title,
html.theme-yaji .xt-lecture-title,
html.theme-yaji .xt-article-title {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
  font-weight: 700;
  letter-spacing: 0.14em;
}
html.theme-yaji .xt-card-excerpt,
html.theme-yaji .xt-article-p {
  color: var(--ink-80) !important;
  font-family: var(--body) !important;
  font-size: 0.98rem !important;
  line-height: 1.95 !important;
  letter-spacing: 0.03em;
}
html.theme-yaji .xt-cat-btn {
  background: transparent !important;
  border: 0.5px solid var(--ink-15) !important;
  color: var(--ink-70) !important;
  border-radius: 9999px !important;
  font-family: var(--seri) !important;
  letter-spacing: 0.18em;
}
html.theme-yaji .xt-cat-btn.active,
html.theme-yaji .xt-cat-btn[aria-selected="true"] {
  background: var(--ink) !important;
  color: var(--paper-bright) !important;
  border-color: var(--ink) !important;
}

html.theme-yaji .xt-hero {
  background: linear-gradient(180deg, var(--paper-bright) 0%, var(--paper) 100%) !important;
  background-image: linear-gradient(180deg, var(--paper-bright) 0%, var(--paper) 100%) !important;
  border-bottom: 0.5px solid var(--ink-15) !important;
}
html.theme-yaji .xt-hero-zh {
  color: var(--ink) !important;
  border-left-color: var(--ink) !important;
  letter-spacing: 0.3em !important;
}
html.theme-yaji .xt-hero-en {
  color: var(--ink-55) !important;
  font-family: var(--roman) !important;
}
html.theme-yaji .xt-cat-wrap {
  background: var(--glass-paper) !important;
  border-bottom: 0.5px solid var(--ink-15) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  -webkit-mask-image: linear-gradient(to right, #000 0%, #000 86%, transparent 100%);
          mask-image: linear-gradient(to right, #000 0%, #000 86%, transparent 100%);
}
html.theme-yaji .xt-featured-badge,
html.theme-yaji .xt-card-tag {
  background: var(--ink-08) !important;
  color: var(--ink) !important;
  border: 0.5px solid var(--ink-15) !important;
}
html.theme-yaji .xt-author-name {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
}
html.theme-yaji .xt-card-date,
html.theme-yaji .xt-meta,
html.theme-yaji .xt-stat {
  color: var(--ink-55) !important;
  font-family: var(--roman) !important;
}
/* ▇▇▇ 学堂内所有弹出面板（文章 / 视频 / 每日一语 / 收藏详情）
       统一切到亮色主题。之前只覆盖了 .xt-article-wrap —— 外层 .xt-overlay
       依然是 #08080c 深色，导致「打开文章背景还是暗色」的视觉割裂。
       现在从 overlay 根开始，整条链路都强制纸色 + 墨字 ▇▇▇ */
html.theme-yaji .xt-overlay,
html.theme-yaji .xt-article-overlay,
html.theme-yaji .xt-video-overlay,
html.theme-yaji .xt-daily-overlay {
  --xt-bg: var(--paper);
  --xt-text: var(--ink);
  --xt-text-soft: var(--ink-80);
  --xt-text-dim: var(--ink-55);
  --xt-bg-card: var(--glass-sheer);
  --xt-gold: var(--ink);
  --xt-gold-soft: var(--ink-70);
  --xt-gold-faint: var(--ink-40);
  --xt-gold-hair: var(--ink-15);
  background: var(--paper) !important;
  color: var(--ink) !important;
}
html.theme-yaji .xt-article-wrap,
html.theme-yaji .xt-article-panel,
html.theme-yaji .xt-article-body,
html.theme-yaji .xt-video-wrap,
html.theme-yaji .xt-video-body,
html.theme-yaji .xt-daily-wrap,
html.theme-yaji .xt-daily-body {
  background: var(--paper) !important;
  color: var(--ink) !important;
}
html.theme-yaji .xt-article-panel .xt-article-title,
html.theme-yaji .xt-article-panel h1,
html.theme-yaji .xt-article-panel h2,
html.theme-yaji .xt-article-panel h3,
html.theme-yaji .xt-overlay h1,
html.theme-yaji .xt-overlay h2,
html.theme-yaji .xt-overlay h3 {
  color: var(--ink) !important;
}
html.theme-yaji .xt-overlay p,
html.theme-yaji .xt-overlay .xt-article-body,
html.theme-yaji .xt-overlay .xt-article-body p,
html.theme-yaji .xt-overlay .xt-article-content p {
  color: var(--ink-90) !important;
}
html.theme-yaji .xt-overlay .xt-article-meta,
html.theme-yaji .xt-overlay .xt-article-author,
html.theme-yaji .xt-overlay .xt-article-date,
html.theme-yaji .xt-overlay .xt-article-read-time,
html.theme-yaji .xt-overlay .xt-video-meta {
  color: var(--ink-55) !important;
  font-family: var(--roman) !important;
  font-style: italic;
}
/* overlay 顶栏 back 按钮 */
html.theme-yaji .xt-overlay .xt-overlay-back,
html.theme-yaji .xt-overlay .xt-back-btn {
  color: var(--ink) !important;
  background: var(--glass-paper) !important;
  border: 0.5px solid var(--ink-15) !important;
}
html.theme-yaji .xt-overlay .xt-overlay-back svg,
html.theme-yaji .xt-overlay .xt-back-btn svg {
  stroke: var(--ink) !important;
}

/* ─── 学堂 article 详情页：顶部导航栏亮色化 ─────────────────────
   v6 bug fix: 默认的 .xt-article-header 背景是 rgba(8,8,12,0.92) 近黑，
   在 yaji 亮色主题下没有 override，导致顶部整条黑、返回按钮看不见 */
html.theme-yaji .xt-article-header,
html.theme-yaji .xt-video-overlay .xt-article-header {
  background: rgba(253, 247, 231, 0.94) !important;
  backdrop-filter: blur(14px) saturate(120%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(120%) !important;
  border-bottom: 0.5px solid var(--ink-15) !important;
}
html.theme-yaji .xt-header-btn {
  color: var(--ink-80) !important;
  background: transparent !important;
}
html.theme-yaji .xt-header-btn:hover {
  color: var(--ink) !important;
  background: rgba(27, 22, 17, 0.04) !important;
}
html.theme-yaji .xt-header-btn:active {
  background: rgba(27, 22, 17, 0.08) !important;
}
html.theme-yaji .xt-header-btn svg {
  stroke: var(--ink-80) !important;
  fill: none !important;
}
html.theme-yaji .xt-header-btn.xt-heart-btn.active,
html.theme-yaji .xt-header-btn.xt-heart-btn.active svg {
  color: var(--cinnabar) !important;
  stroke: var(--cinnabar) !important;
  fill: var(--cinnabar) !important;
}
/* overlay 进度条（阅读进度） */
html.theme-yaji .xt-read-progress {
  background: var(--ink-15) !important;
}
html.theme-yaji .xt-read-progress-bar {
  background: var(--ink) !important;
}
/* featured badge / tags / read-more 按钮等小块 */
html.theme-yaji .xt-article-featured-pill,
html.theme-yaji .xt-overlay .xt-tag,
html.theme-yaji .xt-overlay .xt-article-tag {
  background: var(--ink-08) !important;
  border: 0.5px solid var(--ink-15) !important;
  color: var(--ink) !important;
}

/* ── Ziwo (吾身) ────────────────────────────────────────── */

html.theme-yaji .zw-root {
  --zw-gold: var(--ink);
  --zw-gold-soft: var(--ink-70);
  --zw-gold-faint: var(--ink-40);
  --zw-gold-hair: var(--ink-15);
  --zw-bg: var(--paper);
  --zw-bg-card: var(--glass-sheer);
  --zw-text: var(--ink);
  --zw-text-soft: var(--ink-80);
  --zw-text-dim: var(--ink-55);
  --zw-border: var(--ink-15);
  --zw-serif: var(--seri);
  background: var(--paper) !important;
  color: var(--ink) !important;
  font-family: var(--seri) !important;
}
html.theme-yaji .zw-card,
html.theme-yaji .zw-card-list,
html.theme-yaji .zw-faxiang-grid {
  background: var(--glass-sheer) !important;
  background-image: none !important;
  border: 0.5px solid var(--ink-15) !important;
  border-radius: 4px !important;
  color: var(--ink) !important;
  box-shadow: var(--shadow-soft) !important;
}
html.theme-yaji .zw-name,
html.theme-yaji .zw-card-title,
html.theme-yaji .zw-menu-label {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
  font-weight: 700;
  letter-spacing: 0.18em;
}
html.theme-yaji .zw-avatar {
  border: 0.5px solid var(--ink-25) !important;
  filter: grayscale(0.9) contrast(1.05) !important;
}
html.theme-yaji .zw-menu-row {
  background: transparent !important;
  border: 0.5px solid var(--ink-15) !important;
  border-radius: 4px !important;
  color: var(--ink) !important;
  font-family: var(--seri) !important;
  letter-spacing: 0.12em;
}
html.theme-yaji .zw-menu-row:hover { background: var(--ink-04) !important; }

/* 首次起卦引导条在 yaji 主题下的配色 */
html.theme-yaji .zw-first-banner {
  background: linear-gradient(135deg, rgba(27, 22, 17, 0.04) 0%, rgba(27, 22, 17, 0.01) 100%) !important;
  border: 0.5px solid var(--ink-15) !important;
}
html.theme-yaji .zw-first-banner-text {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
  letter-spacing: 0.08em;
}
html.theme-yaji .zw-first-banner-cta {
  background: var(--ink) !important;
  border: 0.5px solid var(--ink) !important;
  color: var(--paper) !important;
  font-family: var(--seri) !important;
  letter-spacing: 0.16em;
}
html.theme-yaji .zw-first-banner-cta:active {
  background: rgba(27, 22, 17, 0.82) !important;
}

/* 设置 section 在 yaji 主题下的墨金样式 */
html.theme-yaji .zw-settings {
  background: var(--paper-bright) !important;
  border: 0.5px solid var(--ink-15) !important;
}
html.theme-yaji .zw-settings-title {
  color: var(--ink-55) !important;
  font-family: var(--seri) !important;
}
html.theme-yaji .zw-sg-row {
  border-bottom-color: var(--ink-15) !important;
}
html.theme-yaji .zw-sg-icon {
  color: var(--ink-80) !important;
}
html.theme-yaji .zw-sg-label {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
}
html.theme-yaji .zw-sg-hint {
  color: var(--ink-55) !important;
  font-family: var(--roman) !important;
  font-style: italic;
}
html.theme-yaji .zw-sg-value {
  color: var(--ink-55) !important;
  font-family: var(--roman) !important;
}
html.theme-yaji .zw-sg-switch {
  background: var(--ink-15) !important;
}
html.theme-yaji .zw-sg-switch--on {
  background: var(--ink) !important;
}
html.theme-yaji .zw-sg-thumb {
  background: var(--paper-bright);
}
html.theme-yaji .zw-sg-seg {
  background: var(--ink-08) !important;
}
html.theme-yaji .zw-sg-seg-btn {
  color: var(--ink-55) !important;
  font-family: var(--seri) !important;
}
html.theme-yaji .zw-sg-seg-btn--on {
  background: var(--ink) !important;
  color: var(--paper-bright) !important;
}
html.theme-yaji .zw-settings-reset {
  color: var(--ink-55) !important;
  border-color: var(--ink-15) !important;
  font-family: var(--seri) !important;
}

/* Font-size scaling — 由 Settings 控制 */
html[data-font-size="s"] { font-size: 93%; }
html[data-font-size="l"] { font-size: 110%; }

/* 精简动效（由 Settings 打开） —— 与系统 prefers-reduced-motion 等效 */
/* 主题切换瞬间冻结所有 transition，避免几百个属性同时插值导致低端机 freeze */
html.yj-theme-switching,
html.yj-theme-switching *,
html.yj-theme-switching *::before,
html.yj-theme-switching *::after {
  transition: none !important;
  animation-play-state: paused !important;
}

html.yj-reduce-motion *,
html.yj-reduce-motion *::before,
html.yj-reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}
html.yj-reduce-motion .smoke,
html.yj-reduce-motion .particle,
html.yj-reduce-motion .ambient-particle { display: none !important; }

/* 道阶 caption 进度提示 */
html.theme-yaji .yj-rank-progress {
  display: block;
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--ink-55);
  font-family: var(--body);
  letter-spacing: 0.06em;
  font-style: normal;
}

html.theme-yaji .zw-modal-backdrop {
  background: rgba(243, 236, 217, 0.6) !important;
  backdrop-filter: blur(20px) saturate(1.06) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.06) !important;
}

/* 全屏 overlay（占卜历史 / 念心对话 / 收藏）—— 仅亮色主题下重新着色 */
html.theme-yaji .zw-overlay {
  background: var(--paper) !important;
  color: var(--ink) !important;
}
html.theme-yaji .zw-overlay-header {
  background: var(--glass-paper) !important;
  border-bottom: 0.5px solid var(--ink-15) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
html.theme-yaji .zw-overlay-title {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
}
html.theme-yaji .zw-overlay-subtitle {
  color: var(--ink-55) !important;
  font-family: var(--roman) !important;
  font-style: italic;
}
html.theme-yaji .zw-overlay-back {
  color: var(--ink) !important;
}
html.theme-yaji .zw-overlay-back svg { stroke: var(--ink) !important; }
html.theme-yaji .zw-overlay-body {
  background: var(--paper) !important;
  color: var(--ink) !important;
}
html.theme-yaji .zw-card {
  background: var(--paper-bright) !important;
  border: 0.5px solid var(--ink-15) !important;
  color: var(--ink) !important;
  box-shadow: 0 1px 4px rgba(27, 22, 17, 0.04) !important;
}
html.theme-yaji .zw-card-title {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
}
html.theme-yaji .zw-card-subtitle,
html.theme-yaji .zw-card-preview,
html.theme-yaji .zw-card-footer {
  color: var(--ink-55) !important;
}
html.theme-yaji .zw-empty {
  color: var(--ink-55) !important;
}
html.theme-yaji .zw-chats-empty-icon {
  color: var(--ink-40) !important;
}
html.theme-yaji .zw-chats-empty-text {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
}
html.theme-yaji .zw-chats-empty-sub {
  color: var(--ink-55) !important;
}
html.theme-yaji .zw-chats-empty-cta {
  background: var(--ink) !important;
  color: var(--paper-bright) !important;
  border: 0.5px solid var(--ink) !important;
}
html.theme-yaji .zw-modal-card,
html.theme-yaji .zw-welcome-card {
  background: linear-gradient(180deg, var(--paper-bright), var(--paper)) !important;
  border: 0.5px solid var(--ink-15) !important;
  border-radius: 6px !important;
  box-shadow: 0 32px 90px rgba(27, 22, 17, 0.14) !important;
  color: var(--ink) !important;
}
html.theme-yaji .zw-modal-title {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
  font-weight: 700;
  font-size: clamp(1.5rem, 1.2rem + 0.8vw, 1.9rem) !important;
  letter-spacing: 0.26em !important;
  margin-bottom: 6px !important;
}
html.theme-yaji .zw-modal-subtitle,
html.theme-yaji .zw-field-label {
  color: var(--ink-70) !important;
  font-family: var(--song) !important;
  letter-spacing: 0.15em !important;
}

html.theme-yaji .zw-faxiang-grid {
  gap: 10px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  margin-bottom: 18px !important;
}
html.theme-yaji .zw-faxiang-cell {
  background: var(--paper-bright) !important;
  border: 0.5px solid var(--ink-15) !important;
  border-radius: 4px !important;
  color: var(--ink) !important;
  box-shadow: none !important;
  transition: border-color var(--dur-med) var(--ease),
              background var(--dur-med) var(--ease),
              transform var(--dur-med) var(--ease) !important;
}
html.theme-yaji .zw-faxiang-cell:hover,
html.theme-yaji .zw-faxiang-cell--on {
  border-color: var(--ink-55) !important;
  background: var(--paper-bright) !important;
  transform: translateY(-1px) !important;
}

html.theme-yaji .zw-name-input {
  background: var(--paper-bright) !important;
  border: 0.5px solid var(--ink-25) !important;
  border-radius: 4px !important;
  color: var(--ink) !important;
  text-align: left !important;
  letter-spacing: 0.06em !important;
  box-shadow: inset 0 1px 2px rgba(27, 22, 17, 0.04) !important;
}
html.theme-yaji .zw-name-input::placeholder { color: var(--ink-40) !important; }

html.theme-yaji .zw-btn-primary,
html.theme-yaji .zw-btn {
  background: var(--ink) !important;
  color: var(--paper-bright) !important;
  border: none !important;
  border-radius: 9999px !important;
  font-family: var(--seri) !important;
  letter-spacing: 0.22em !important;
  box-shadow: 0 14px 28px rgba(27, 22, 17, 0.12) !important;
}
html.theme-yaji .zw-btn-secondary {
  background: transparent !important;
  color: var(--ink-80) !important;
  border: 0.5px solid var(--ink-25) !important;
  box-shadow: none !important;
}
/* Disabled primary under yaji theme: 纸底边框色收敛，避免看起来像「误触黑按钮」 */
html.theme-yaji .zw-btn-primary[disabled] {
  background: transparent !important;
  color: var(--ink-40) !important;
  border: 0.5px solid var(--ink-15) !important;
  box-shadow: none !important;
}
html.theme-yaji .zw-btn-primary--ready {
  /* 呼吸光在墨金线框上改用细墨环 */
  animation: zwSubmitGlowYaji 2.2s ease-in-out infinite;
}
@keyframes zwSubmitGlowYaji {
  0%, 100% { box-shadow: 0 14px 28px rgba(27, 22, 17, 0.12), 0 0 0 0 rgba(27, 22, 17, 0); }
  50%      { box-shadow: 0 14px 28px rgba(27, 22, 17, 0.18), 0 0 0 4px rgba(27, 22, 17, 0.08); }
}
html.theme-yaji .zw-name-hint {
  color: var(--ink-55) !important;
  font-family: var(--seri) !important;
  letter-spacing: 0.06em;
}
html.theme-yaji .zw-name-hint--warn {
  color: var(--cinnabar) !important;
}

html.theme-yaji .zw-clear-btn {
  background: transparent !important;
  border: 0.5px solid rgba(138, 42, 30, 0.3) !important;
  color: var(--cinnabar) !important;
  font-family: var(--seri) !important;
  border-radius: 4px !important;
  letter-spacing: 0.14em;
}
html.theme-yaji .zw-clear-btn:hover { background: rgba(138, 42, 30, 0.06) !important; }

html.theme-yaji .zw-avatar-wrap { position: relative !important; }
html.theme-yaji .yj-ziwo-root-hidden { display: none !important; }
html.theme-yaji .yj-ziwo-gate {
  max-width: 400px;
  margin: clamp(28px, 6vh, 48px) auto;
  padding: clamp(28px, 6vw, 40px) clamp(22px, 5vw, 32px);
  background: var(--paper-bright);
  border: 0.5px solid var(--ink-15);
  border-radius: 6px;
  text-align: center;
  box-shadow: 0 22px 60px rgba(27, 22, 17, 0.08), inset 0 1px 0 rgba(250, 244, 226, 0.55);
}
html.theme-yaji .yj-ziwo-gate-badge {
  display: inline-block;
  font-family: var(--roman);
  font-style: italic;
  font-size: 0.76rem;
  letter-spacing: 0.32em;
  color: var(--cinnabar);
  padding: 3px 12px;
  border: 0.5px solid rgba(138, 42, 30, 0.35);
  border-radius: 9999px;
  margin-bottom: 14px;
}
html.theme-yaji .yj-ziwo-gate-title {
  margin: 0 0 14px;
  font-family: var(--seri);
  font-weight: 700;
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.8rem);
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  color: var(--ink);
}
html.theme-yaji .yj-ziwo-gate-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 1px;
  margin: 14px auto 0;
  background: linear-gradient(to right, transparent, var(--ink-40), transparent);
}
html.theme-yaji .yj-ziwo-gate-body {
  margin: 16px 0 8px;
  font-family: var(--body);
  font-size: 1rem;
  line-height: 2;
  color: var(--ink-80);
  letter-spacing: 0.06em;
}
html.theme-yaji .yj-ziwo-gate-note {
  margin: 0 0 22px;
  font-family: var(--body);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--ink-55);
}
html.theme-yaji .yj-ziwo-gate-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 40px;
  background: var(--ink);
  color: var(--gold-leaf);
  border: 0.5px solid rgba(200, 162, 92, 0.42);
  border-radius: 9999px;
  font-family: var(--seri);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(27, 22, 17, 0.2);
  transition: background 260ms var(--ease), transform 180ms var(--ease);
}
html.theme-yaji .yj-ziwo-gate-cta:hover { background: #2b2218; color: #e8caa0; }
html.theme-yaji .yj-ziwo-gate-cta:active { transform: scale(0.97); }

html.theme-yaji .yj-ziwo-seal {
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 48px;
  height: 48px;
  background: var(--cinnabar);
  color: var(--paper-bright);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.05;
  letter-spacing: 0;
  transform: rotate(3deg);
  box-shadow: 0 6px 16px rgba(138, 42, 30, 0.28);
  z-index: 10;
  border-radius: 3px;
}
html.theme-yaji .yj-ziwo-seal span { display: block; }
html.theme-yaji .yj-rank-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 10px;
  text-align: center;
}
html.theme-yaji .yj-rank-label {
  font-family: var(--body);
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--ink);
  font-size: 0.95rem;
}
html.theme-yaji .yj-rank-en {
  font-family: var(--roman);
  font-style: italic;
  letter-spacing: 0.2em;
  color: var(--ink-55);
  font-size: 0.72rem;
}

html.theme-yaji .app-page--dark {
  /* 完全不透明纸色，无需整页 backdrop-filter。
     整页 blur(6px) 在移动端滚动时会对整个视口做模糊重绘 —— 是学堂/吾身页面滚动卡顿的主因。
     改为纯色后，每帧滚动无需 GPU 合成大面积模糊层。 */
  background: var(--paper) !important;
  background-image: none !important;
  color: var(--ink) !important;
}
html.theme-yaji #wodePanel.active,
html.theme-yaji #xuetangPanel.active {
  display: flex !important;
  animation: yjTabFadeIn 360ms var(--ease) both;
}
@keyframes yjTabFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

html.theme-yaji .xt-card,
html.theme-yaji .xt-card-featured,
html.theme-yaji .xt-card-lecture,
html.theme-yaji .zw-card,
html.theme-yaji .zw-menu-row {
  animation: yjItemRise 420ms var(--ease) both;
}
html.theme-yaji .xt-card:nth-child(2),
html.theme-yaji .zw-menu-row:nth-child(2) { animation-delay: 40ms; }
html.theme-yaji .xt-card:nth-child(3),
html.theme-yaji .zw-menu-row:nth-child(3) { animation-delay: 80ms; }
html.theme-yaji .xt-card:nth-child(4),
html.theme-yaji .zw-menu-row:nth-child(4) { animation-delay: 120ms; }
html.theme-yaji .xt-card:nth-child(5),
html.theme-yaji .zw-menu-row:nth-child(5) { animation-delay: 160ms; }
html.theme-yaji .xt-card:nth-child(6),
html.theme-yaji .zw-menu-row:nth-child(6) { animation-delay: 200ms; }
@keyframes yjItemRise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  html.theme-yaji *,
  html.theme-yaji *::before,
  html.theme-yaji *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

html.theme-yaji .investor-welcome,
html.theme-yaji .question-overlay,
html.theme-yaji .interpretation-panel,
html.theme-yaji .chat-panel,
html.theme-yaji .history-panel,
html.theme-yaji .history-detail,
html.theme-yaji .info-panel,
html.theme-yaji .privacy-modal {
  will-change: opacity, transform;
}
html.theme-yaji .app-page--dark .page-header-title { color: var(--ink) !important; }

html.theme-yaji .zw-hero {
  background: linear-gradient(180deg, var(--paper-bright) 0%, var(--paper) 100%) !important;
  background-image: linear-gradient(180deg, var(--paper-bright) 0%, var(--paper) 100%) !important;
  border-bottom: 0.5px solid var(--ink-15) !important;
}
html.theme-yaji .zw-hero-zh {
  color: var(--ink) !important;
  border-left-color: var(--ink) !important;
  letter-spacing: 0.3em !important;
}
html.theme-yaji .zw-hero-en,
html.theme-yaji .zw-hero-sub {
  color: var(--ink-55) !important;
  font-family: var(--roman) !important;
}
html.theme-yaji .zw-badge,
html.theme-yaji .zw-tag {
  background: var(--ink-08) !important;
  color: var(--ink) !important;
  border: 0.5px solid var(--ink-15) !important;
}
html.theme-yaji .zw-divider {
  background: linear-gradient(to right, transparent, var(--ink-15), transparent) !important;
}

/* ── Shared modals ──────────────────────────────────────── */

html.theme-yaji .yn-overlay {
  background: rgba(243, 236, 217, 0.82) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
}
html.theme-yaji .yn-overlay-card {
  background: var(--paper-bright) !important;
  background-image: none !important;
  border: 0.5px solid var(--ink-15) !important;
  border-radius: 6px !important;
  box-shadow: var(--shadow-lift) !important;
  color: var(--ink) !important;
}
html.theme-yaji .yn-overlay-title,
html.theme-yaji .yn-overlay-body {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
}
html.theme-yaji .yn-btn-primary {
  background: var(--ink) !important;
  background-image: none !important;
  color: var(--paper-bright) !important;
  border: none !important;
  border-radius: 4px !important;
  font-family: var(--seri) !important;
  letter-spacing: 0.2em;
}
html.theme-yaji .yn-btn-secondary {
  background: transparent !important;
  border: 0.5px solid var(--ink-25) !important;
  color: var(--ink) !important;
  border-radius: 4px !important;
  font-family: var(--seri) !important;
  letter-spacing: 0.2em;
}

html.theme-yaji .history-panel,
html.theme-yaji .history-detail,
html.theme-yaji .info-panel {
  background: var(--paper) !important;
  background-image: radial-gradient(60% 40% at 50% 0%, var(--paper-bright), transparent 70%) !important;
  color: var(--ink) !important;
}
html.theme-yaji .history-header,
html.theme-yaji .history-detail-header {
  background: var(--glass-paper) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-bottom: 0.5px solid var(--ink-15) !important;
}

html.theme-yaji .info-title {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
  font-weight: 900 !important;
  letter-spacing: 0.5em !important;
  font-size: 1.75rem !important;
}
html.theme-yaji .info-tagline {
  color: var(--ink-80) !important;
  font-family: var(--song) !important;
  letter-spacing: 0.14em;
  line-height: 2;
}

html.theme-yaji .prob-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--seri) !important;
}
html.theme-yaji .prob-table th,
html.theme-yaji .prob-table td {
  border-bottom: 0.5px solid var(--ink-15);
  padding: 8px 10px;
  color: var(--ink-90) !important;
}
html.theme-yaji .prob-table th {
  font-weight: 700;
  color: var(--ink) !important;
  letter-spacing: 0.14em;
}
html.theme-yaji .prob-table td.highlight {
  color: var(--cinnabar) !important;
  font-weight: 700;
}

html.theme-yaji .retention-modal,
html.theme-yaji .onboard-card,
html.theme-yaji .paywall-modal {
  background: var(--paper-bright) !important;
  background-image: none !important;
  border: 0.5px solid var(--ink-15) !important;
  border-radius: 6px !important;
  color: var(--ink) !important;
  box-shadow: var(--shadow-lift) !important;
}
html.theme-yaji .onboard-title,
html.theme-yaji .retention-title,
html.theme-yaji .paywall-title {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
  font-weight: 700;
  letter-spacing: 0.3em !important;
}
html.theme-yaji .onboard-subtitle,
html.theme-yaji .retention-message,
html.theme-yaji .paywall-subtitle {
  color: var(--ink-80) !important;
  font-family: var(--song) !important;
  letter-spacing: 0.1em;
}
html.theme-yaji .onboard-step strong {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
}
html.theme-yaji .onboard-step-desc {
  color: var(--ink-70) !important;
  font-family: var(--seri) !important;
}
html.theme-yaji .onboard-step-num {
  color: var(--ink) !important;
  border: 0.5px solid var(--ink-25) !important;
  background: var(--paper) !important;
}
html.theme-yaji .onboard-step-num svg { stroke: var(--ink) !important; }

html.theme-yaji .retention-vip-btn {
  background: var(--ink) !important;
  background-image: none !important;
  color: var(--paper-bright) !important;
  border: none !important;
  border-radius: 9999px !important;
  font-family: var(--seri) !important;
  letter-spacing: 0.24em;
  box-shadow: var(--shadow-soft) !important;
}
html.theme-yaji .retention-btn-secondary {
  background: transparent !important;
  color: var(--ink-70) !important;
  border: 0.5px solid var(--ink-15) !important;
  font-family: var(--seri) !important;
}

html.theme-yaji hr,
html.theme-yaji .yj-mist {
  border: none !important;
  height: 32px;
  background: linear-gradient(to right, transparent, var(--ink-15), transparent) !important;
}

html.theme-yaji .privacy-title,
html.theme-yaji .privacy-section .privacy-title {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
  letter-spacing: 0.2em;
}
html.theme-yaji .privacy-link {
  color: var(--ink-80) !important;
  font-family: var(--seri) !important;
  letter-spacing: 0.1em;
}
html.theme-yaji .clear-data-btn {
  background: transparent !important;
  border: 0.5px solid rgba(138, 42, 30, 0.3) !important;
  color: var(--cinnabar) !important;
  border-radius: 4px !important;
  font-family: var(--seri) !important;
  letter-spacing: 0.14em;
}

html.theme-yaji .privacy-modal {
  background: var(--paper-bright) !important;
  color: var(--ink) !important;
  border: 0.5px solid var(--ink-15) !important;
  border-radius: 6px !important;
}
html.theme-yaji .privacy-modal-title {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
  letter-spacing: 0.24em;
}
html.theme-yaji .privacy-modal-content h4 {
  color: var(--ink) !important;
  font-family: var(--seri) !important;
  letter-spacing: 0.14em;
}
html.theme-yaji .privacy-modal-content p {
  color: var(--ink-80) !important;
  font-family: var(--seri) !important;
}

/* ── Primer block injected into info panel ──────────────── */

html.theme-yaji .yj-primer-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0 8px;
}
html.theme-yaji .yj-primer-step {
  padding: 14px 14px 12px;
  border: 0.5px solid var(--ink-15);
  border-radius: 3px;
  background: var(--paper-bright);
}
html.theme-yaji .yj-primer-step h5 {
  margin: 0 0 4px;
  font-family: var(--seri);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  color: var(--ink);
}
html.theme-yaji .yj-primer-step p {
  margin: 0;
  font-family: var(--seri);
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--ink-80);
}
html.theme-yaji .yj-primer-num {
  font-family: var(--roman);
  font-style: italic;
  color: var(--cinnabar);
  font-size: 0.85rem;
  margin-right: 6px;
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 720px) {
  html.theme-yaji .yj-couplet {
    font-size: 0.88rem;
    letter-spacing: 0.48em;
  }
  html.theme-yaji .yj-chapter-numeral {
    font-size: 6.2rem;
  }
}

@media (max-width: 560px) {
  html.theme-yaji .investor-enter-btn,
  html.theme-yaji .question-btn-primary,
  html.theme-yaji .onboard-btn {
    font-size: 1.02rem !important;
    padding: 14px 32px !important;
    letter-spacing: 0.24em !important;
    text-indent: 0.24em !important;
  }
  html.theme-yaji .yj-wordmark { letter-spacing: 0.3em; }
  html.theme-yaji .yj-tagline { letter-spacing: 0.34em; }
  html.theme-yaji .yj-hexcrest-line { width: 96px; height: 7px; }
  html.theme-yaji .yj-chapter { padding: 22px 20px 20px; }
  html.theme-yaji .yj-chapter-title { font-size: 1.1rem; letter-spacing: 0.24em; }
  html.theme-yaji .yj-chapter-body { font-size: 0.92rem; }
  html.theme-yaji .yj-couplet {
    top: 48px;
    right: 8px;
    font-size: 0.82rem;
  }
  html.theme-yaji .yj-primer-steps { grid-template-columns: 1fr; }

  html.theme-yaji .question-title {
    font-size: 1.9rem !important;
    letter-spacing: 0.26em !important;
  }
  html.theme-yaji .question-card {
    padding: 28px 22px !important;
    border-radius: 4px !important;
  }
  html.theme-yaji .interp-hexagram-name {
    font-size: 2.3rem !important;
  }
}

@media (max-width: 380px) {
  html.theme-yaji .yj-wordmark { font-size: 3rem; letter-spacing: 0.26em; }
  html.theme-yaji .yj-hexcrest-frame { padding: 20px 26px 18px; }
  html.theme-yaji .top-bar-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
  }
}

@media (max-height: 720px) {
  html.theme-yaji .yj-cover { padding-top: clamp(40px, 6vh, 64px) !important; }
  html.theme-yaji .yj-hexcrest { margin: 16px auto 10px; }
  html.theme-yaji .question-card { padding: 22px 20px !important; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html.theme-yaji .top-bar-btn,
  html.theme-yaji #bottomNav,
  html.theme-yaji .bottom-nav,
  html.theme-yaji .question-card,
  html.theme-yaji .xt-card,
  html.theme-yaji .zw-card,
  html.theme-yaji .yj-chapter {
    background: var(--paper-bright) !important;
  }
}

/* v6.7 发热修复：移动端把所有 backdrop-filter 强度降到 blur(6px) — iOS Safari
   在 blur(14px) 全屏层上每帧合成成本 30-40ms，是 iPhone Pro Max 用户持续发热
   的隐形大户。6px 足以保留毛玻璃质感而成本接近 0。 */
@media (max-width: 820px) {
  html.theme-yaji .top-bar-btn,
  html.theme-yaji #bottomNav,
  html.theme-yaji .bottom-nav,
  html.theme-yaji .question-card,
  html.theme-yaji .xt-card,
  html.theme-yaji .zw-card,
  html.theme-yaji .yj-chapter,
  html.theme-yaji .investor-enter-btn {
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
  }
}

/* 学堂/吾身：下方已有 hero 大标题，隐藏顶栏同位标题消除同词双字体冗余 */
html.theme-yaji #xuetangPanel .page-header-title,
html.theme-yaji #wodePanel .page-header-title { display: none; }
