:root {
  --bg: #090613;
  --bg-soft: #15102b;
  --panel: rgba(26, 18, 49, 0.82);
  --panel-border: rgba(212, 175, 55, 0.4);
  --gold: #d4af37;
  --gold-soft: #f1d27d;
  --purple: #8b5cf6;
  --purple-deep: #4c1d95;
  --text: #f5efff;
  --muted: #bfa9e7;
  --danger: #ff6b6b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --font-magic: "Kaiti SC", "STKaiti", "KaiTi", "Ma Shan Zheng", "Noto Serif SC", serif;
  --font-body: "Songti SC", "SimSun", "Noto Serif SC", "PingFang SC", serif;
}

body.night {
  --bg: #05030b;
  --bg-soft: #0b0817;
  --panel: rgba(15, 11, 29, 0.9);
  --gold: #b78d25;
  --gold-soft: #dcb25a;
  --muted: #9d88ca;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(139, 92, 246, 0.18), transparent 38%),
    radial-gradient(circle at 20% 80%, rgba(212, 175, 55, 0.09), transparent 25%),
    linear-gradient(180deg, var(--bg), var(--bg-soft));
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 10% 15%, rgba(255, 196, 84, 0.12), transparent 16%),
    radial-gradient(circle at 90% 20%, rgba(255, 196, 84, 0.08), transparent 14%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0, rgba(255,255,255,0.02) 2px, transparent 2px, transparent 12px);
  opacity: 0.6;
}

#rune-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 48px 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold-soft);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: 12px;
}

h1,
h2,
h3 {
  font-family: var(--font-magic);
  letter-spacing: 0.06em;
  margin: 0;
}

h1 {
  font-size: clamp(34px, 5vw, 58px);
  text-shadow: 0 0 18px rgba(212, 175, 55, 0.35);
}

h2 {
  font-size: clamp(28px, 3vw, 42px);
}

.page-shell {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto 60px;
}

.view {
  display: none;
  padding-top: 28px;
}

.view.active {
  display: block;
}

.scroll-panel {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.15)),
    var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 30px;
  backdrop-filter: blur(12px);
}

.scroll-panel::before,
.scroll-panel::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(212,175,55,0.1), rgba(212,175,55,0.65), rgba(212,175,55,0.1));
  opacity: 0.7;
}

.scroll-panel::before { top: 12px; }
.scroll-panel::after { bottom: 12px; }

/* ============ 首页首屏（第二十六轮 D19 重构 · 与小程序端 D18 对齐）============
   层级：① 一句话说清做什么 → ② 一个主行动 → ③ 结果预告 → ④ 每日内容 → ⑤ 二级入口 ＋ 尾部
   依据：`方案.md` 的「🎯 首屏设计规范」（爆火小程序的极简首屏共性 —— 一个动作、先说回报、去噪点）。 */

/* ① 一句话说清做什么（不是品牌名，是一句人话） */
.hero {
  padding: 44px 0 30px;
  text-align: center;
}

.hero-h1 {
  margin: 0;
  font-family: var(--font-magic);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.34;
  letter-spacing: 2px;
  color: var(--text);
}

.hero-sub {
  margin: 14px 0 0;
  font-size: 15px;
  letter-spacing: 1px;
  color: var(--muted);
}

/* ② 一个主行动：全页唯一的大按钮 */
.main-cta {
  margin: 0 auto 34px;
  max-width: 560px;
}

.main-btn {
  display: block;
  width: 100%;
  padding: 26px 0;
  text-align: center;
  cursor: pointer;
  font: inherit;
  border: 1px solid rgba(241, 210, 125, 0.45);
  border-radius: 24px;
  background: linear-gradient(135deg, #8b5cf6, #6d3fd6);
  box-shadow: 0 14px 44px rgba(139, 92, 246, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.main-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 52px rgba(139, 92, 246, 0.45);
}

.main-btn-text {
  display: block;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #fff;
}

.main-btn-sub {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
}

/* 完整版降为次级文字入口：不再是并列的第二个按钮 */
.main-alt {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 10px 0;
  text-align: center;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  color: var(--muted);
  border: none;
  background: none;
  transition: color 0.25s ease;
}

.main-alt:hover {
  color: var(--gold-soft);
}

/* ③ 结果预告（抓手） */
.preview-card {
  margin-bottom: 26px;
}

.preview-title {
  margin: 0 0 14px;
  font-family: var(--font-magic);
  font-size: 19px;
  letter-spacing: 1px;
  color: var(--gold-soft);
}

.preview-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.preview-list li {
  margin: 8px 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
}

.preview-note {
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

/* ⑤ 尾部：关于 ＋ 合规提示 */
.hall-foot {
  margin-top: 30px;
  text-align: center;
}

.foot-link {
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--gold-soft);
  border: none;
  background: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.foot-note {
  margin: 12px auto 0;
  max-width: 460px;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--muted);
  opacity: 0.75;
}

/* 卷轴印章 壹/贰/叁/肆/伍 已删（D15 批次二）；保留此规则仅作兜底：
   避免旧缓存里的 HTML 仍带着印章时，它以一个无样式的方块出现在卷轴上 */
.scroll-seal { display: none; }

.slip-level,
.result-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(212,175,55,0.35);
  border-radius: 999px;
  color: var(--gold-soft);
  background: rgba(212,175,55,0.08);
  font-size: 13px;
}

/* ---------- 关于本馆 ---------- */
.about-section {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px dashed rgba(255, 255, 255, 0.14);
  text-align: left;
}

.about-section h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color: var(--gold-soft);
}

.about-section p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--text);
}

.about-list {
  margin: 0 0 10px;
  padding-left: 4px;
  list-style: none;
}

.about-list li {
  padding: 7px 0 7px 16px;
  position: relative;
  font-size: 14px;
  color: var(--text);
}

.about-list li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--gold);
}

.about-list b {
  color: var(--gold-soft);
  font-weight: 700;
}

.about-note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  opacity: 0.85;
}

.changelog {
  margin: 0;
  padding: 0;
  list-style: none;
}

.changelog li {
  display: flex;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.changelog li:last-child {
  border-bottom: none;
}

.chg-ver {
  flex: 0 0 auto;
  align-self: flex-start;
  min-width: 46px;
  padding: 3px 8px;
  border-radius: 999px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
}

.changelog p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}

.scroll-icon::after,
.compass-icon::after {
  content: "禁";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-magic);
  font-size: 26px;
  color: rgba(255,255,255,0.6);
}

.history-panel {
  margin-top: 24px;
}

/* 主页底部广告位 */
.ad-slot {
  position: relative;
  margin-top: 22px;
  padding: 18px 20px 16px;
  border: 1px dashed rgba(212, 175, 55, 0.35);
  border-radius: 14px;
  background: rgba(212, 175, 55, 0.04);
  text-align: center;
}
.ad-tag {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: #1a0e2e;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.35);
}
.ad-title {
  margin: 6px 0 6px;
  font-family: var(--font-magic);
  font-size: 21px;
  font-weight: 700;
  color: var(--gold-soft);
  letter-spacing: 1px;
}
.ad-sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

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

.history-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 12px;
}

.history-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
}

.history-list li.history-clickable {
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.history-list li.history-clickable:hover {
  background: rgba(212, 175, 55, 0.07);
  border-color: rgba(212, 175, 55, 0.4);
}

.history-del {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  align-self: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 107, 107, 0.12);
  color: rgba(255, 170, 170, 0.8);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.history-del:hover {
  background: rgba(255, 107, 107, 0.3);
  color: #fff;
}

.history-list strong {
  color: var(--text);
}

.back-button {
  margin-bottom: 18px;
}

/* ---------- 浮动返回大厅按钮 ---------- */
.float-home {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.5);
  background: rgba(24, 14, 46, 0.92);
  color: var(--gold-soft);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.float-home span {
  font-size: 10px;
  letter-spacing: 1px;
}

.float-home:hover {
  transform: translateY(-2px);
  background: rgba(44, 26, 84, 0.95);
}

.ritual-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.ritual-tip {
  color: var(--muted);
  line-height: 1.9;
  margin: 14px 0 24px;
}

.fun-note {
  margin: 18px auto 0;
  max-width: 460px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--muted);
  opacity: 0.75;
}

.conf-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.8;
}

.fate-blurb {
  margin: 14px 0 0;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--gold-soft);
  background: rgba(212, 175, 55, 0.08);
  border: 1px dashed rgba(212, 175, 55, 0.35);
  border-radius: 12px;
  text-align: center;
}

.storage-warn {
  max-width: 720px;
  margin: 12px auto -6px;
  padding: 10px 16px;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  color: var(--text);
  background: rgba(224, 147, 147, 0.12);
  border: 1px solid rgba(224, 147, 147, 0.4);
  border-radius: 12px;
}

.share-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.share-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #8b5cf6;
  cursor: pointer;
}

/* 结果图预览浮层 */
.share-preview {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 4, 18, 0.82);
  backdrop-filter: blur(4px);
}

.share-preview-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: min(560px, 92vw);
  max-height: 92vh;
  overflow-y: auto;
  padding: 20px;
  background: linear-gradient(180deg, rgba(88, 51, 163, 0.5), rgba(25, 14, 52, 0.95));
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.share-preview-box img {
  display: block;
  width: 100%;
  max-width: 340px;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.share-preview-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 340px;
}

.share-preview-actions a,
.share-preview-actions button {
  flex: 1;
  justify-content: center;
  align-items: center;
  display: inline-flex;
  text-decoration: none;
}

.share-preview-tip {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.8;
  text-align: center;
}

.input-label {
  display: block;
  margin-bottom: 10px;
  color: var(--gold-soft);
}

.parchment-textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid rgba(212,175,55,0.35);
  background:
    linear-gradient(180deg, rgba(255,244,214,0.03), rgba(0,0,0,0.18)),
    rgba(12, 8, 26, 0.94);
  color: var(--text);
  font-size: 15px;
  line-height: 1.8;
  font-family: "Courier New", monospace;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.35);
}

.parchment-textarea:focus {
  outline: none;
  border-color: rgba(241, 210, 125, 0.9);
  box-shadow: 0 0 0 4px rgba(212,175,55,0.12), inset 0 0 30px rgba(0,0,0,0.35);
}

.action-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.action-row.center {
  justify-content: center;
}

.primary-button,
.ghost-button {
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-body);
  transition: 0.25s ease;
}

.primary-button {
  border: none;
  color: #1a0f33;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
  padding: 12px 22px;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(212,175,55,0.28);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(212,175,55,0.36);
}

.ghost-button {
  border: 1px solid rgba(212,175,55,0.35);
  background: transparent;
  color: var(--gold-soft);
  padding: 11px 18px;
}

.ghost-button.small {
  padding: 8px 12px;
  font-size: 13px;
}

.ghost-button:hover {
  background: rgba(212,175,55,0.08);
}

.casting-stage {
  position: relative;
  margin-top: 28px;
  min-height: 280px;
  border-radius: 24px;
  border: 1px dashed rgba(212,175,55,0.25);
  background: radial-gradient(circle at center, rgba(139,92,246,0.12), transparent 60%);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.casting-stage.casting .crystal-orb {
  animation: orbSpin 2.8s linear infinite, orbPulse 1.4s ease-in-out infinite alternate;
}

.casting-stage.casting .rune-stream {
  opacity: 1;
  animation: runeFlow 2.2s linear infinite;
}

.crystal-orb {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(255,255,255,0.9), rgba(167,139,250,0.85), rgba(76,29,149,1) 70%, #120725 100%);
  box-shadow: 0 0 48px rgba(139,92,246,0.55), inset 0 0 40px rgba(255,255,255,0.15);
}

.rune-stream {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background:
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(212,175,55,0.5) 28px 30px, transparent 30px 58px),
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(255,255,255,0.12) 28px 30px, transparent 30px 58px);
  mix-blend-mode: screen;
}

.casting-whisper {
  position: absolute;
  bottom: 24px;
  color: var(--gold-soft);
  letter-spacing: 0.16em;
}

.casting-stage.casting {
  cursor: pointer;
}

.casting-hint {
  position: absolute;
  bottom: 4px;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.7;
  letter-spacing: 0.08em;
}

.result-scroll,
.fortune-slip,
.buff-box,
.hidden {
  display: none;
}

/* .hidden 是工具类：必须能压过其后定义的组件 display（如 .test-progress{display:grid}） */
.hidden {
  display: none !important;
}

.result-scroll {
  margin-top: 28px;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.18));
  border: 1px solid rgba(212,175,55,0.3);
  animation: scrollReveal 0.8s ease forwards;
}

.result-scroll.show,
.fortune-slip.show,
.buff-box.show {
  display: block;
}

.result-section + .result-section {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.result-section h3 {
  font-size: 30px;
  margin: 14px 0 8px;
  color: var(--gold-soft);
}

.result-section p,
.fortune-slip p {
  color: var(--muted);
  line-height: 1.9;
  margin: 10px 0;
}

.result-section ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--text);
  line-height: 1.9;
}

.verdict {
  text-align: center;
}

.verdict h3 {
  font-size: clamp(28px, 4vw, 42px);
}

.fortune-slip {
  margin-top: 28px;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(212,175,55,0.1), rgba(76,29,149,0.16));
  border: 1px solid rgba(212,175,55,0.35);
  text-align: center;
  animation: slipReveal 0.7s ease;
}

.fortune-slip h3 {
  font-size: 34px;
  margin: 18px 0;
  color: var(--gold-soft);
}

.chant-box {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed rgba(255,255,255,0.2);
  color: var(--muted);
}

.chant-box code {
  display: block;
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(0,0,0,0.35);
  color: #ffd96f;
  font-size: 15px;
  word-break: break-all;
}

.buff-box {
  margin-top: 20px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.32);
  color: #ffd3d3;
}

.buff-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: rgba(255, 211, 211, 0.55);
}

.fortune-daily-note {
  margin: 12px auto 0;
  max-width: 360px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--gold-soft);
  font-size: 13px;
  text-align: center;
}

/* ---------- 摇签仪式动画 ---------- */
.fortune-drawing {
  margin-top: 28px;
  padding: 34px 0 28px;
  text-align: center;
}

.slip-canister {
  display: inline-block;
  font-size: 60px;
  line-height: 1;
  transform-origin: bottom center;
  animation: canisterShake 0.45s ease-in-out infinite;
  filter: drop-shadow(0 8px 18px rgba(212, 175, 55, 0.25));
}

@keyframes canisterShake {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  20% { transform: rotate(-9deg) translateY(-2px); }
  45% { transform: rotate(8deg) translateY(1px); }
  70% { transform: rotate(-6deg) translateY(-1px); }
  85% { transform: rotate(5deg) translateY(1px); }
}

.drawing-text {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 2px;
  animation: drawingPulse 1.2s ease-in-out infinite;
}

@keyframes drawingPulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* ---------- 心语正文与「适合 / 留意」 ---------- */
.fortune-advice {
  margin-top: 20px;
  display: grid;
  gap: 10px;
  text-align: left;
}

.advice-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.advice-row span {
  flex: 0 0 auto;
  /* 标签由「宜 / 忌」改为「适合 / 留意」（D11 合规改写），两字放不进 26px 圆，
     所以由固定圆形改为**胶囊**：min-width 保底 26px，两字时靠 padding 自动撑开 */
  min-width: 26px;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.advice-row p {
  margin: 0;
  font-size: 14px;
  color: var(--text);
}

.advice-yi span { background: rgba(74, 222, 128, 0.18); color: #6ee7a0; }
.advice-yi { border-color: rgba(74, 222, 128, 0.22); }
.advice-ji span { background: rgba(248, 113, 113, 0.18); color: #fca5a5; }
.advice-ji { border-color: rgba(248, 113, 113, 0.22); }

@media (max-width: 480px) {
  .slip-canister { font-size: 52px; }

  /* 移动端拇指热区：按钮与选项增大点击面积，避免误触 */
  .primary-button,
  .ghost-button,
  .share-btn {
    min-height: 46px;
    padding: 12px 18px;
  }

  .test-option {
    padding: 15px 16px;
    min-height: 52px;
  }

  .rune-dot {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .history-del {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }
}

.candle-group {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.candle {
  position: absolute;
  top: 70px;
  width: 14px;
  height: 62px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,217,111,0.9), rgba(139,92,246,0.2));
  opacity: 0.8;
  filter: blur(0.4px);
}

.candle::before {
  content: "";
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 28px;
  border-radius: 50% 50% 40% 40%;
  background: radial-gradient(circle at 50% 60%, rgba(255,255,255,0.9), rgba(255,196,84,0.85), rgba(255,107,107,0.2) 70%, transparent 75%);
  filter: blur(0.6px);
  animation: flameSway 1.6s ease-in-out infinite alternate;
}

.candle-left { left: 34px; }
.candle-right { right: 34px; }

.parchment-textarea.compact {
  min-height: 120px;
}

.parchment-textarea.mini {
  min-height: 90px;
  font-size: 14px;
}

/* ---------- 人格测试 ---------- */
.test-progress {
  margin: 22px 0 6px;
  display: grid;
  gap: 8px;
}

.test-progress span {
  font-size: 14px;
  color: var(--muted);
}

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.6);
  transition: width 0.35s ease;
}

.test-question {
  margin: 18px 0 10px;
}

.test-question h3 {
  font-family: var(--font-magic);
  font-size: clamp(22px, 3.4vw, 30px);
  color: var(--gold-soft);
  line-height: 1.5;
  margin-bottom: 20px;
}

.test-options {
  display: grid;
  gap: 12px;
}

.test-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  transition: 0.2s ease;
}

.test-option:hover {
  border-color: rgba(212, 175, 55, 0.5);
  background: rgba(212, 175, 55, 0.08);
  transform: translateX(4px);
}

.test-option.chosen {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.14);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.25);
}

.option-sigil {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  /* 序号用正文数字字体，不用国风花体：1/2/3/4 要一眼看清，别再让人「认字」 */
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  color: var(--gold-soft);
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: rgba(0, 0, 0, 0.25);
}

.ghost-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.fate-seal {
  width: 96px;
  height: 96px;
  flex: none;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-family: var(--font-magic);
  font-size: 56px;
  color: var(--gold-soft);
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.22), rgba(139,92,246,0.35), rgba(30,14,60,0.95) 78%);
  border: 2px double rgba(212,175,55,0.65);
  box-shadow: 0 0 30px rgba(212,175,55,0.3), inset 0 0 20px rgba(0, 0, 0, 0.5);
  animation: sealGlow 3s ease-in-out infinite;
}

@keyframes sealGlow {
  0%, 100% { box-shadow: 0 0 22px rgba(212,175,55,0.24), inset 0 0 20px rgba(0, 0, 0, 0.5); }
  50% { box-shadow: 0 0 40px rgba(212,175,55,0.46), inset 0 0 26px rgba(0, 0, 0, 0.5); }
}

.fate-slogan {
  font-family: var(--font-magic);
  font-size: clamp(19px, 2.8vw, 26px);
  color: var(--gold-soft);
  line-height: 1.7;
  margin: 8px 0 14px;
  text-align: center;
}

.fate-verdict {
  color: var(--text);
  line-height: 2;
  margin-bottom: 6px;
}

.fate-profile {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.profile-row {
  display: grid;
  grid-template-columns: 120px 1fr 34px;
  align-items: center;
  gap: 12px;
}

.profile-name {
  font-size: 14px;
  color: var(--gold-soft);
}

.profile-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.profile-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.9), rgba(212, 175, 55, 0.9));
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.4);
  transition: width 0.6s ease;
}

.profile-val {
  font-family: "Courier New", monospace;
  color: var(--muted);
  text-align: right;
}

/* ---------- 准确性体系：置信度徽章 / 卦象依据 / 反馈 ---------- */
.band-badge {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  font-family: var(--font-magic);
  font-size: 20px;
  letter-spacing: 0.08em;
  border: 1px solid;
  margin-bottom: 14px;
}

.band-badge.good {
  color: #ffe9a8;
  background: rgba(212, 175, 55, 0.16);
  border-color: rgba(241, 210, 125, 0.7);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.35);
}

.band-badge.mid {
  color: #d6c7ff;
  background: rgba(139, 92, 246, 0.16);
  border-color: rgba(167, 139, 250, 0.6);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.3);
}

.band-badge.bad {
  color: #ffd3d3;
  background: rgba(255, 107, 107, 0.14);
  border-color: rgba(255, 107, 107, 0.55);
  box-shadow: 0 0 14px rgba(255, 107, 107, 0.3);
}

.advice-list {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--text);
  line-height: 2;
}

.advice-list li::marker {
  color: var(--gold);
}

.empty-text {
  color: var(--muted);
  text-align: center;
  padding: 18px 0 4px;
}

@keyframes orbSpin {
  from { transform: rotate(0deg) scale(1); }
  to { transform: rotate(360deg) scale(1.04); }
}

@keyframes orbPulse {
  from { box-shadow: 0 0 38px rgba(139,92,246,0.45), inset 0 0 40px rgba(255,255,255,0.15); }
  to { box-shadow: 0 0 68px rgba(212,175,55,0.42), inset 0 0 55px rgba(255,255,255,0.25); }
}

@keyframes runeFlow {
  from { transform: translateY(0); }
  to { transform: translateY(20px); }
}

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

@keyframes slipReveal {
  from { opacity: 0; transform: rotateX(-20deg) scale(0.95); }
  to { opacity: 1; transform: rotateX(0deg) scale(1); }
}

@keyframes flameSway {
  from { transform: translateX(-50%) skewX(-6deg) scaleY(1); opacity: 0.95; }
  to { transform: translateX(-50%) skewX(6deg) scaleY(1.08); opacity: 1; }
}

@media (max-width: 768px) {
  .topbar {
    padding: 24px 20px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .page-shell {
    width: min(100% - 32px, 1180px);
  }

  .scroll-panel {
    padding: 24px 18px;
  }

  .candle {
    display: none;
  }
}

/* ================= PRD v1.0：人格推演新增样式 ================= */

/* 符文进度 */
.rune-track {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.rune-dot {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--font-magic);
  font-size: 14px;
  font-style: normal;
  color: rgba(191, 169, 231, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  transition: 0.3s ease;
}

.rune-dot.lit {
  color: var(--gold-soft);
  border-color: rgba(212, 175, 55, 0.6);
  background: rgba(212, 175, 55, 0.1);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

.rune-dot.done {
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.5), rgba(139, 92, 246, 0.4));
  color: #1a0f33;
  border-color: transparent;
}

/* 人格头部 */
.fate-head {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 14px;
}

.fate-head h3.fate-name {
  font-size: clamp(30px, 5vw, 44px);
  color: var(--gold-soft);
  margin: 4px 0;
}

.fate-gua {
  color: var(--muted);
  letter-spacing: 0.18em;
  font-size: 14px;
  margin: 0;
}

.fate-subline {
  color: var(--gold-soft);
  text-align: center;
  margin: 4px 0 14px;
  font-size: 15px;
  letter-spacing: 0.06em;
}

.share-invite {
  color: var(--muted);
  text-align: center;
  margin: 0 0 12px;
}

/* 雷达图 */
.radar-wrap {
  display: grid;
  place-items: center;
  margin-top: 14px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.radar-svg {
  width: 100%;
  height: auto;
  display: block;
}

.radar-grid {
  fill: none;
  stroke: rgba(212, 175, 55, 0.16);
  stroke-width: 1;
}

.radar-axis {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
}

.radar-label {
  fill: var(--muted);
  font-size: 13px;
  text-anchor: middle;
  font-family: var(--font-body);
}

.radar-data {
  fill: url(#radar-grad) rgba(139, 92, 246, 0.38);
  stroke: var(--gold-soft);
  stroke-width: 2;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.45));
  transform-box: fill-box;
  transform-origin: center;
  animation: radarGrow 0.9s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
}

.radar-dot {
  fill: var(--gold-soft);
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 0.5;
}

@keyframes radarGrow {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* 优势 / 短板 */
.good-list li::marker {
  color: #7fd17f;
}

.bad-list li::marker {
  color: #e09393;
}

/* 今日「适合 / 留意」 */
.yi-ji {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.yi,
.ji {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.yi > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(127, 209, 127, 0.14);
  border: 1px solid rgba(127, 209, 127, 0.5);
  color: #a8d5a2;
  font-family: var(--font-magic);
  font-size: 18px;
}

.ji > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(224, 147, 147, 0.14);
  border: 1px solid rgba(224, 147, 147, 0.5);
  color: #e09393;
  font-family: var(--font-magic);
  font-size: 18px;
}

.yi ul,
.ji ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.9;
}

/* 人规彩蛋 */
.egg-box {
  margin-top: 20px;
  padding: 18px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.16), rgba(212, 175, 55, 0.1)),
    rgba(12, 8, 26, 0.6);
  border: 1px solid rgba(212, 175, 55, 0.45);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.4);
}

.egg-box strong {
  color: var(--gold-soft);
  letter-spacing: 0.1em;
}

.egg-box ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.9;
}

.egg-box li::marker {
  color: var(--gold);
}

/* 分享 */
.share-actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.share-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
}

.share-btn-icon {
  font-size: 16px;
  line-height: 1;
}

.share-note {
  color: var(--muted);
  font-size: 13px;
  margin: 12px 0 0;
  text-align: center;
}

/* 速测结果页的升级入口 */
.upgrade-card {
  margin: 18px 0 0;
  padding: 16px 18px;
  border: 1px dashed rgba(212, 175, 55, 0.4);
  border-radius: 16px;
  background: rgba(212, 175, 55, 0.06);
  text-align: center;
}

.upgrade-text {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text);
}

.share-more {
  margin-top: 12px;
}

@media (max-width: 480px) {
  .share-actions {
    flex-direction: column;
  }
}

/* 灵签等级 */
.slip-level.lv-上上 {
  color: #ffe9a8;
  border-color: rgba(241, 210, 125, 0.7);
  background: rgba(212, 175, 55, 0.14);
}

.slip-level.lv-上吉 {
  color: #f1d27d;
  border-color: rgba(212, 175, 55, 0.45);
  background: rgba(212, 175, 55, 0.08);
}

.slip-level.lv-中平 {
  color: var(--muted);
  border-color: rgba(191, 169, 231, 0.4);
  background: rgba(139, 92, 246, 0.08);
}

.slip-level.lv-下凶 {
  color: #ffd3d3;
  border-color: rgba(255, 107, 107, 0.55);
  background: rgba(255, 107, 107, 0.12);
}

/* =====================================================================
   柔雾主题 / 设置面板 / 共情版留白
   ---------------------------------------------------------------------
   本节全部为「追加」，不改动上方任何既有规则，老用户（默认深色 / body.night）零影响。
   一、body.mist        柔雾浅色主题：低饱和粉紫 + 浅茶米，正文与次要文字均达 WCAG AA（≥4.5:1）
   二、.settings-*      设置面板：文案风格 / 海报模板 / 主题配色（卡片式，含可选抽屉形态）
   三、body.style-soft  共情版结果页留白 + .empathy-note 共情批注 + .fate-tags 人格标签
   四、移动端与动效偏好适配
   备注：mist 与 night 同为 body 上的主题类，应互斥；若同时挂载，本节在后，柔雾变量优先。
   ===================================================================== */

/* ---------- 一、柔雾主题 body.mist ---------- */

/* 1.1 主题变量覆写
   语义反转说明：浅底上 --gold-soft 由「亮金文字色」反转为「深茶金文字色」（对浅底 4.8~5.6:1，达 AA），
   --gold 保留为「暖茶金装饰色」，仅用于描边 / 徽章底 / 渐变 / 按钮底，不用于正文文字。 */
body.mist {
  --bg: #f7f4f9;                              /* 雾紫白 */
  --bg-soft: #efe9f2;                         /* 浅雾紫 */
  --panel: rgba(255, 253, 255, 0.88);         /* 面板：近白微紫 */
  --panel-border: rgba(141, 128, 163, 0.34);  /* 灰紫描边 */
  --gold: #c9a97a;                            /* 暖茶金（装饰） */
  --gold-soft: #7d5f31;                       /* 深茶金（文字，AA） */
  --purple: #a99bc0;                          /* 低饱和粉紫 */
  --purple-deep: #6f6288;                     /* 深灰紫（浅底可读的紫） */
  --text: #4a4257;                            /* 灰紫正文 7.9~9.3:1 */
  --muted: #6a6180;                           /* 次要文字 4.8~5.7:1 */
  --danger: #b04a45;                          /* 深砖红 5.3:1 */
  --shadow: 0 18px 48px rgba(74, 66, 87, 0.14);
  color-scheme: light;                        /* 原生控件 / 滚动条同步转浅色 */
}

/* 1.2 页面底色、叠加层与粒子背景 */
/* 支持 :has() 的浏览器同步 html 根底色，避免移动端橡皮筋回弹露出深底；不支持时 body 已覆盖可视区 */
html:has(body.mist) {
  background: linear-gradient(180deg, #f7f4f9, #efe9f2);
}

body.mist {
  background:
    radial-gradient(circle at 14% 16%, rgba(169, 155, 192, 0.26), transparent 44%),
    radial-gradient(circle at 86% 10%, rgba(232, 223, 211, 0.7), transparent 40%),
    radial-gradient(circle at 50% 98%, rgba(201, 169, 122, 0.18), transparent 48%),
    linear-gradient(180deg, var(--bg), var(--bg-soft));
}

/* 原叠加层是「暖金光斑 + 白色斜纹」，浅底上会发灰，改为雾紫光斑 + 极淡灰紫斜纹 */
body.mist::before {
  background:
    radial-gradient(circle at 10% 15%, rgba(201, 169, 122, 0.18), transparent 18%),
    radial-gradient(circle at 90% 22%, rgba(169, 155, 192, 0.16), transparent 16%),
    repeating-linear-gradient(45deg, rgba(74, 66, 87, 0.025) 0, rgba(74, 66, 87, 0.025) 2px, transparent 2px, transparent 12px);
  opacity: 0.7;
}

/* 符文粒子为金/紫亮色，浅底上易刺眼：仅降透明度，不改 JS */
body.mist #rune-canvas {
  opacity: 0.3;
}

body.mist .candle-group {
  opacity: 0.45;
}

body.mist .candle {
  background: linear-gradient(180deg, rgba(201, 169, 122, 0.75), rgba(169, 155, 192, 0.25));
}

body.mist ::selection {
  background: rgba(169, 155, 192, 0.4);
  color: #3a3346;
}

/* 1.3 标题、卷轴面板、器物卡 */
body.mist h1 {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
}

body.mist .scroll-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(232, 223, 211, 0.3)),
    var(--panel);
  border-color: rgba(141, 128, 163, 0.3);
}

/* 卷轴上下两道金线：改为柔和茶金，降低存在感 */
body.mist .scroll-panel::before,
body.mist .scroll-panel::after {
  background: linear-gradient(90deg, rgba(201, 169, 122, 0.08), rgba(201, 169, 122, 0.55), rgba(201, 169, 122, 0.08));
  opacity: 0.6;
}

body.mist .scroll-seal {
  background: radial-gradient(circle, #e8d7bd, #cdbfd8);
  border-color: rgba(255, 255, 255, 0.85);
  color: #463c56;                            /* 7.4:1 */
  box-shadow: 0 6px 18px rgba(111, 98, 136, 0.22);
}

/* 首页首屏（D19）：浅底上主按钮保持紫底白字（对比 7.1:1），次级入口与提示转灰紫 */
body.mist .main-btn {
  background: linear-gradient(135deg, #8b5cf6, #6d3fd6);
  border-color: rgba(165, 132, 90, 0.45);
  box-shadow: 0 12px 34px rgba(139, 92, 246, 0.28);
}

body.mist .main-alt {
  color: #6a6180;
}

body.mist .main-alt:hover {
  color: #7d5f31;
}

body.mist .preview-title {
  color: #7d5f31;
}

body.mist .foot-link {
  color: #7d5f31;
}

/* 1.4 徽章、标签、置信度与各类提示文字 */
body.mist .slip-level,
body.mist .result-label {
  color: var(--gold-soft);
  background: rgba(201, 169, 122, 0.16);
  border-color: rgba(165, 132, 90, 0.45);
}

body.mist .slip-level.lv-上上 {
  color: #7a5a1f;                              /* 5.1:1 */
  background: #f3e6cd;
  border-color: rgba(165, 132, 90, 0.6);
}

body.mist .slip-level.lv-上吉 {
  color: var(--gold-soft);
  background: rgba(201, 169, 122, 0.18);
  border-color: rgba(165, 132, 90, 0.45);
}

body.mist .slip-level.lv-中平 {
  color: #5f5672;                              /* 6.5:1 */
  background: #eee8f3;
  border-color: rgba(141, 128, 163, 0.45);
}

body.mist .slip-level.lv-下凶 {
  color: #a03f3a;                              /* 5.9:1 */
  background: #f6e2e0;
  border-color: rgba(176, 74, 69, 0.45);
}

body.mist .band-badge.good {
  color: #7a5a1f;
  background: #f3e6cd;
  border-color: rgba(165, 132, 90, 0.6);
  box-shadow: 0 4px 14px rgba(201, 169, 122, 0.3);
}

body.mist .band-badge.mid {
  color: #5d5180;                              /* 5.8:1 */
  background: #ece6f4;
  border-color: rgba(141, 128, 163, 0.5);
  box-shadow: 0 4px 14px rgba(169, 155, 192, 0.28);
}

body.mist .band-badge.bad {
  color: #a03f3a;
  background: #f6e2e0;
  border-color: rgba(176, 74, 69, 0.45);
  box-shadow: 0 4px 14px rgba(176, 74, 69, 0.18);
}

/* 浅底上「靠 opacity 压暗」的提示文字会掉到 4.5:1 以下，一律取消衰减并给达标色 */
body.mist .fun-note,
body.mist .conf-note,
body.mist .share-preview-tip,
body.mist .buff-hint,
body.mist .drawing-text {
  opacity: 1;
}

body.mist .fun-note,
body.mist .conf-note {
  color: #5f5672;                              /* 6.5:1 */
}

body.mist .share-preview-tip,
body.mist .drawing-text,
body.mist .share-note {
  color: var(--muted);
}

body.mist .share-toggle {
  color: var(--muted);
}

body.mist .share-toggle input {
  accent-color: #8d80a3;
}

body.mist .fate-blurb {
  color: var(--gold-soft);
  background: rgba(201, 169, 122, 0.14);
  border-color: rgba(165, 132, 90, 0.4);
}

body.mist .fortune-daily-note {
  color: var(--gold-soft);
  background: rgba(201, 169, 122, 0.16);
  border-color: rgba(165, 132, 90, 0.45);
}

body.mist .storage-warn {
  color: #8f3a35;                              /* 6.5:1 */
  background: #fbeceb;
  border-color: rgba(176, 74, 69, 0.4);
}

/* 1.5 按钮、输入区、广告位 */
body.mist .primary-button {
  color: #3d2b12;                              /* 深茶字，落在茶金底上 6.1:1 */
  background: linear-gradient(90deg, #e3cda6, var(--gold));
  box-shadow: 0 8px 20px rgba(165, 132, 90, 0.28);
}

body.mist .primary-button:hover {
  box-shadow: 0 12px 26px rgba(165, 132, 90, 0.36);
}

body.mist .ghost-button {
  border-color: rgba(141, 128, 163, 0.45);
  background: rgba(255, 255, 255, 0.5);
  color: var(--gold-soft);
}

body.mist .ghost-button:hover {
  background: rgba(201, 169, 122, 0.16);
  border-color: rgba(165, 132, 90, 0.6);
}

body.mist .parchment-textarea {
  background: linear-gradient(180deg, #fffefc, #f7f2ea);
  border-color: rgba(165, 132, 90, 0.4);
  color: var(--text);
  box-shadow: inset 0 0 24px rgba(201, 169, 122, 0.16);
}

body.mist .parchment-textarea:focus {
  border-color: rgba(165, 132, 90, 0.85);
  box-shadow: 0 0 0 4px rgba(201, 169, 122, 0.2), inset 0 0 24px rgba(201, 169, 122, 0.16);
}

body.mist .ad-slot {
  border-color: rgba(165, 132, 90, 0.4);
  background: rgba(201, 169, 122, 0.1);
}

body.mist .ad-tag {
  background: linear-gradient(135deg, #e3cda6, var(--gold));
  color: #3f2d12;                              /* 5.9:1 */
  box-shadow: 0 2px 8px rgba(165, 132, 90, 0.3);
}

/* 1.6 答题流程、进度、符文 */
body.mist .casting-stage {
  border-color: rgba(141, 128, 163, 0.35);
  background: radial-gradient(circle at center, rgba(169, 155, 192, 0.2), transparent 62%);
}

body.mist .crystal-orb {
  box-shadow: 0 0 40px rgba(169, 155, 192, 0.55), inset 0 0 34px rgba(255, 255, 255, 0.35);
}

/* 符流原为 screen 叠加（浅底上等于消失），改 multiply 让纹理可见但不脏 */
body.mist .rune-stream {
  mix-blend-mode: multiply;
  opacity: 0.16;
  background:
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(165, 132, 90, 0.4) 28px 30px, transparent 30px 58px),
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(141, 128, 163, 0.3) 28px 30px, transparent 30px 58px);
}

body.mist .test-option {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(141, 128, 163, 0.28);
}

body.mist .test-option:hover {
  background: rgba(201, 169, 122, 0.14);
  border-color: rgba(165, 132, 90, 0.55);
}

body.mist .test-option.chosen {
  background: rgba(201, 169, 122, 0.2);
  border-color: #a5845a;
  box-shadow: 0 4px 16px rgba(165, 132, 90, 0.22);
}

body.mist .option-sigil {
  color: var(--gold-soft);                     /* 5.2:1 */
  background: #f4efe8;
  border-color: rgba(165, 132, 90, 0.5);
}

body.mist .progress-track,
body.mist .profile-track {
  background: rgba(74, 66, 87, 0.12);
}

body.mist .progress-track i {
  box-shadow: 0 0 8px rgba(201, 169, 122, 0.5);
}

body.mist .profile-track i {
  background: linear-gradient(90deg, rgba(169, 155, 192, 0.95), rgba(201, 169, 122, 0.95));
  box-shadow: 0 0 8px rgba(169, 155, 192, 0.35);
}

/* 未点亮符文原为亮紫 40% 透明（浅底不可见），改灰紫实色 4.8:1 */
body.mist .rune-dot {
  color: #756b88;
  border-color: rgba(141, 128, 163, 0.32);
  background: rgba(255, 255, 255, 0.6);
}

body.mist .rune-dot.lit {
  color: var(--gold-soft);
  border-color: rgba(165, 132, 90, 0.6);
  background: rgba(201, 169, 122, 0.18);
  box-shadow: 0 0 10px rgba(201, 169, 122, 0.4);
}

body.mist .rune-dot.done {
  background: linear-gradient(180deg, #e3cda6, #cbb2d8);
  color: #3d2b12;                              /* 8.0:1 */
}

/* 1.7 结果区、心语区、「适合 / 留意」、彩蛋 */
body.mist .result-scroll {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(232, 223, 211, 0.34));
  border-color: rgba(165, 132, 90, 0.35);
}

body.mist .result-section + .result-section {
  border-top-color: rgba(74, 66, 87, 0.12);
}

body.mist .fate-seal {
  color: var(--gold-soft);
  background: radial-gradient(circle at 32% 28%, #fffdfa, rgba(201, 169, 122, 0.4), rgba(169, 155, 192, 0.42) 78%);
  border-color: rgba(165, 132, 90, 0.6);
  box-shadow: 0 8px 24px rgba(169, 155, 192, 0.35), inset 0 0 18px rgba(255, 255, 255, 0.6);
}

body.mist .fortune-slip {
  background: linear-gradient(180deg, rgba(201, 169, 122, 0.18), rgba(169, 155, 192, 0.2));
  border-color: rgba(165, 132, 90, 0.4);
}

body.mist .slip-canister {
  filter: drop-shadow(0 6px 14px rgba(165, 132, 90, 0.25));
}

body.mist .chant-box {
  border-top-color: rgba(74, 66, 87, 0.16);
}

body.mist .chant-box code {
  background: #f2ece3;
  color: #7d5f31;                              /* 5.0:1 */
}

body.mist .advice-row {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(141, 128, 163, 0.24);
}

body.mist .advice-yi {
  border-color: rgba(53, 107, 71, 0.28);
}

body.mist .advice-yi span {
  background: #eaf3ec;
  color: #356b47;                              /* 5.5:1 */
}

body.mist .advice-ji {
  border-color: rgba(176, 74, 69, 0.28);
}

body.mist .advice-ji span {
  background: #fbeceb;
  color: #a94a45;                              /* 4.9:1 */
}

/* Buff 提示原为浅粉字，浅底会整块消失，改深砖红 */
body.mist .buff-box {
  background: #fbeceb;
  border-color: rgba(176, 74, 69, 0.35);
  color: #a03f3a;                              /* 5.9:1 */
}

body.mist .buff-hint {
  color: #96524d;                              /* 4.6:1 */
}

body.mist .yi,
body.mist .ji {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(141, 128, 163, 0.24);
}

body.mist .yi > span {
  background: #eaf3ec;
  border-color: rgba(53, 107, 71, 0.4);
  color: #356b47;
}

body.mist .ji > span {
  background: #fbeceb;
  border-color: rgba(176, 74, 69, 0.4);
  color: #a94a45;
}

body.mist .egg-box {
  background:
    linear-gradient(135deg, rgba(169, 155, 192, 0.22), rgba(201, 169, 122, 0.18)),
    #fdfbfe;
  border-color: rgba(165, 132, 90, 0.45);
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.6);
}

/* 项目符号 / marker 原为亮色，浅底改用可辨的茶金与深绿深红 */
body.mist .advice-list li::marker,
body.mist .egg-box li::marker,
body.mist .about-list li::before {
  color: #a5845a;
}

body.mist .good-list li::marker {
  color: #4f8a5b;
}

body.mist .bad-list li::marker {
  color: #b56a6a;
}

/* 1.8 关于本馆、历史留痕、浮动按钮、浮层 */
body.mist .about-section {
  border-top-color: rgba(74, 66, 87, 0.16);
}

body.mist .changelog li {
  border-bottom-color: rgba(74, 66, 87, 0.12);
}

body.mist .chg-ver {
  color: #7d5f31;                              /* 5.4:1 */
  background: rgba(201, 169, 122, 0.18);
  border-color: rgba(165, 132, 90, 0.45);
}

body.mist .history-list li {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(141, 128, 163, 0.24);
}

body.mist .history-list li.history-clickable:hover {
  background: rgba(201, 169, 122, 0.14);
  border-color: rgba(165, 132, 90, 0.5);
}

body.mist .history-del {
  background: #f9e6e4;
  color: #a4453f;                              /* 5.0:1 */
}

body.mist .history-del:hover {
  background: #f0cfcc;
  color: #7d2f2a;
}

body.mist .float-home {
  background: rgba(255, 253, 255, 0.94);
  border-color: rgba(165, 132, 90, 0.5);
  color: var(--gold-soft);                     /* 5.8:1 */
  box-shadow: 0 8px 22px rgba(74, 66, 87, 0.18);
}

body.mist .float-home:hover {
  background: #fffdfa;
}

body.mist .share-preview {
  background: rgba(74, 66, 87, 0.5);
}

body.mist .share-preview-box {
  background: linear-gradient(180deg, #fffefd, #f1ebf5);
  border-color: rgba(165, 132, 90, 0.4);
  box-shadow: 0 20px 60px rgba(74, 66, 87, 0.28);
}

body.mist .share-preview-box img {
  border-color: rgba(165, 132, 90, 0.35);
}

/* 1.9 雷达图（浅底描边与文字） */
body.mist .radar-grid {
  stroke: rgba(141, 128, 163, 0.32);
}

body.mist .radar-axis {
  stroke: rgba(74, 66, 87, 0.18);
}

body.mist .radar-label {
  fill: #5f5672;                               /* 6.5:1 */
}

body.mist .radar-data {
  fill: rgba(169, 155, 192, 0.45);
  stroke: #a5845a;
  filter: drop-shadow(0 0 6px rgba(165, 132, 90, 0.35));
}

body.mist .radar-dot {
  fill: #7d5f31;
  stroke: #fffdfd;
  stroke-width: 1;
}

/* ---------- 二、设置面板 ---------- */
/* 说明：面板自成一套局部变量（--sp-*），深色主题取亮金/暗紫，body.mist 下整体换为茶金/灰紫，
   因此只需覆写变量即可适配主题，无需重复写每个子元素。 */
.settings-panel {
  --sp-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.16));
  --sp-line: rgba(212, 175, 55, 0.24);
  --sp-chip-bg: rgba(255, 255, 255, 0.04);
  --sp-chip-border: rgba(191, 169, 231, 0.32);
  --sp-chip-text: var(--muted);
  --sp-chip-hover-bg: rgba(212, 175, 55, 0.1);
  --sp-chip-active-bg: rgba(212, 175, 55, 0.16);
  --sp-chip-active-border: var(--gold-soft);
  --sp-chip-active-text: var(--gold-soft);
  --sp-glow: 0 0 18px rgba(212, 175, 55, 0.25);
  position: relative;
  margin-top: 24px;
  padding: 22px 24px 18px;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background: var(--sp-surface), var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  text-align: left;
}

/* 展开时的轻落场（.hidden 仍由既有规则控制显隐） */
.settings-panel:not(.hidden) {
  animation: settingsIn 0.3s ease;
}

@keyframes settingsIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 标题行：左标题 + 右收起/展开 */
.settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--sp-line);
}

.settings-title {
  margin: 0;
  font-family: var(--font-magic);
  font-size: 22px;
  letter-spacing: 0.08em;
  color: var(--gold-soft);
}

.settings-sub {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
}

.settings-toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.settings-toggle::after {
  content: "▾";
  font-size: 11px;
  line-height: 1;
  transition: transform 0.25s ease;
}

.settings-panel.collapsed .settings-toggle::after {
  transform: rotate(-90deg);
}

/* 可折叠主体 */
.settings-body {
  display: grid;
  gap: 20px;
  padding-top: 20px;
}

.settings-panel.collapsed .settings-body {
  display: none;
}

/* 单组设置 */
.settings-group {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  display: grid;
  gap: 10px;
}

.settings-group + .settings-group {
  padding-top: 18px;
  border-top: 1px dashed var(--sp-line);
}

/* 组标题 */
.settings-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-family: var(--font-magic);
  font-size: 16px;
  letter-spacing: 0.12em;
  color: var(--gold-soft);
}

.settings-label::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

/* 选项容器：桌面横向换行，移动端竖排（见第四节） */
.settings-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* 单个选项按钮：未选中态 */
.settings-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 16px;
  border: 1px solid var(--sp-chip-border);
  border-radius: 999px;
  background: var(--sp-chip-bg);
  color: var(--sp-chip-text);
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.settings-option:hover {
  background: var(--sp-chip-hover-bg);
  border-color: var(--gold);
  transform: translateY(-1px);
}

/* 选中态：金色描边 + 微光 + 加粗，与未选中态区分明显 */
.settings-option.active {
  background: var(--sp-chip-active-bg);
  border-color: var(--sp-chip-active-border);
  color: var(--sp-chip-active-text);
  box-shadow: var(--sp-glow);
  font-weight: 700;
}

.settings-option:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
}

.settings-option[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

/* 选项前的单选圆点（选中时点亮） */
.settings-dot {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--sp-chip-border);
  background: transparent;
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.settings-option.active .settings-dot {
  border-color: var(--sp-chip-active-border);
  background: radial-gradient(circle, var(--sp-chip-active-border) 0 42%, transparent 48%);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

/* 组下方小字说明 */
.settings-hint {
  margin: 2px 0 0;
  padding-left: 2px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}

/* 面板底部操作行（可选：恢复默认） */
.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px dashed var(--sp-line);
}

/* 可选形态：底部抽屉（给 .settings-panel 再加 .as-drawer，并配一个 .settings-scrim 遮罩） */
.settings-scrim {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(8, 4, 18, 0.6);
  backdrop-filter: blur(3px);
}

.settings-panel.as-drawer {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 901;
  width: min(680px, 100%);
  max-height: 82vh;
  margin: 0;
  overflow-y: auto;
  border-radius: 22px 22px 0 0;
  transform: translateX(-50%);
  animation: settingsDrawerUp 0.32s cubic-bezier(0.2, 0.8, 0.3, 1);
}

@keyframes settingsDrawerUp {
  from { transform: translate(-50%, 26px); opacity: 0.3; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* 顶栏按钮组（设置入口与深夜模式并排） */
.topbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* 柔雾主题下的设置面板：只换局部变量 */
body.mist .settings-panel {
  --sp-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(232, 223, 211, 0.3));
  --sp-line: rgba(141, 128, 163, 0.28);
  --sp-chip-bg: rgba(255, 255, 255, 0.62);
  --sp-chip-border: rgba(141, 128, 163, 0.42);   /* 非文字对比 3.6:1 */
  --sp-chip-text: #5f5672;                        /* 6.5:1 */
  --sp-chip-hover-bg: rgba(201, 169, 122, 0.16);
  --sp-chip-active-bg: rgba(201, 169, 122, 0.2);
  --sp-chip-active-border: #a5845a;               /* 非文字对比 3.4:1 */
  --sp-chip-active-text: #6b4f22;                 /* 6.5:1 */
  --sp-glow: 0 4px 16px rgba(165, 132, 90, 0.22);
  border-color: rgba(141, 128, 163, 0.3);
}

body.mist .settings-label::before {
  background: #a5845a;
  box-shadow: 0 0 8px rgba(201, 169, 122, 0.5);
}

body.mist .settings-option.active .settings-dot {
  box-shadow: 0 0 8px rgba(201, 169, 122, 0.6);
}

body.mist .settings-scrim {
  background: rgba(74, 66, 87, 0.42);
}

/* ---------- 三、共情版结果页留白 body.style-soft ---------- */
/* 只放大间距与行高，不改配色；与 body.mist 叠加时同样生效 */
body.style-soft .result-scroll {
  padding: 30px 26px;
}

body.style-soft .result-section + .result-section {
  margin-top: 34px;
  padding-top: 30px;
}

body.style-soft .result-label {
  margin-bottom: 8px;
}

body.style-soft .result-section h3 {
  margin: 18px 0 12px;
}

body.style-soft .result-section p {
  margin: 14px 0;
  line-height: 2;
}

body.style-soft .result-section ul {
  margin: 16px 0 0;
  line-height: 2;
}

body.style-soft .band-badge {
  margin-bottom: 18px;
}

/* 卦象解读：更疏朗、字号略增 */
body.style-soft .fate-verdict {
  margin: 20px 0 14px;
  font-size: 17px;
  line-height: 2.05;
  letter-spacing: 0.015em;
}

body.style-soft .fate-slogan {
  margin: 12px 0 22px;
  line-height: 1.85;
}

body.style-soft .fate-subline {
  margin: 8px 0 20px;
}

body.style-soft .fate-tags {
  margin: 22px 0 10px;
  gap: 12px;
}

body.style-soft .fate-tag {
  padding: 8px 16px;
  font-size: 13.5px;
}

/* 优势/短板/指引：条目间距加大 */
body.style-soft .advice-list {
  margin: 16px 0 0;
  line-height: 2;
}

body.style-soft .advice-list li {
  padding: 8px 0;
}

body.style-soft .yi-ji {
  gap: 16px;
  margin-top: 18px;
}

body.style-soft .yi,
body.style-soft .ji {
  padding: 18px 20px;
}

body.style-soft .egg-box {
  margin-top: 28px;
  padding: 22px;
}

body.style-soft .fate-blurb {
  margin: 24px 0 0;
  padding: 14px 18px;
  line-height: 1.9;
}

body.style-soft .share-actions {
  margin-top: 20px;
}

body.style-soft .fun-note {
  margin-top: 28px;
}

/* 共情批注专用块：柔和左边框 + 浅色底 + 大留白，与 .fun-note 的居中小字明显区分 */
.empathy-note {
  --en-border: rgba(167, 139, 250, 0.6);
  --en-bg: linear-gradient(135deg, rgba(139, 92, 246, 0.14), rgba(212, 175, 55, 0.08));
  --en-text: var(--text);
  --en-title: var(--gold-soft);
  margin: 18px 0 6px;
  padding: 16px 18px 16px 20px;
  border-left: 3px solid var(--en-border);
  border-radius: 6px 18px 18px 6px;
  background: var(--en-bg);
  color: var(--en-text);
  font-size: 15px;
  line-height: 2;
  letter-spacing: 0.02em;
  text-align: left;
}

.empathy-note-title {
  display: block;
  margin: 0 0 8px;
  font-family: var(--font-magic);
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--en-title);
}

.empathy-note p {
  margin: 0 0 10px;
  color: var(--en-text);
  line-height: 2;
}

.empathy-note p:last-child {
  margin-bottom: 0;
}

/* 批注内的轻声强调：不上色刺眼，只用茶金/亮金点缀 */
.empathy-note em {
  font-style: normal;
  color: var(--en-title);
}

body.style-soft .empathy-note {
  margin: 26px 0 8px;
  padding: 20px 22px 20px 24px;
}

body.style-soft .empathy-note p {
  line-height: 2.1;
}

body.mist .empathy-note {
  --en-border: rgba(141, 128, 163, 0.65);
  --en-bg: linear-gradient(135deg, rgba(169, 155, 192, 0.18), rgba(232, 223, 211, 0.42));
  --en-text: #55496a;                            /* 7.3:1 */
  --en-title: #7d5f31;                           /* 5.4:1 */
}

/* 人格标签胶囊行 */
.fate-tags {
  --ft-border: rgba(167, 139, 250, 0.42);
  --ft-bg: rgba(139, 92, 246, 0.12);
  --ft-text: var(--muted);
  --ft-gold-border: rgba(212, 175, 55, 0.4);
  --ft-gold-bg: rgba(212, 175, 55, 0.1);
  --ft-gold-text: var(--gold-soft);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 8px;
  padding: 0;
  list-style: none;
}

.fate-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--ft-border);
  border-radius: 999px;
  background: var(--ft-bg);
  color: var(--ft-text);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0.06em;
  cursor: default;
  transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.fate-tag::before {
  content: "✦";
  font-size: 10px;
  color: var(--gold);
}

.fate-tag:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.18);
}

/* 金色变体：用于主人格 / 置信度类标签 */
.fate-tag.gold {
  border-color: var(--ft-gold-border);
  background: var(--ft-gold-bg);
  color: var(--ft-gold-text);
}

.fate-tag.gold::before {
  color: var(--gold-soft);
}

body.mist .fate-tags {
  --ft-border: rgba(141, 128, 163, 0.5);
  --ft-bg: rgba(169, 155, 192, 0.16);
  --ft-text: #6a5b86;                            /* 5.5:1 */
  --ft-gold-border: rgba(165, 132, 90, 0.55);
  --ft-gold-bg: rgba(201, 169, 122, 0.18);
  --ft-gold-text: #7d5f31;                       /* 5.4:1 */
}

body.mist .fate-tag::before {
  color: #a5845a;
}

body.mist .fate-tag:hover {
  box-shadow: 0 4px 14px rgba(111, 98, 136, 0.16);
}

/* ---------- 四、移动端与动效偏好 ---------- */
@media (max-width: 768px) {
  .settings-panel {
    padding: 20px 18px 16px;
  }

  .topbar-actions {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .settings-panel {
    margin-top: 18px;
    padding: 18px 16px 14px;
    border-radius: 18px;
  }

  /* 标题行竖排，收起按钮靠右，避免挤压标题 */
  .settings-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .settings-toggle {
    align-self: flex-end;
  }

  .settings-body {
    gap: 18px;
    padding-top: 18px;
  }

  /* 整组竖排 + 46px 拇指热区 */
  .settings-options {
    flex-direction: column;
    gap: 10px;
  }

  .settings-option {
    width: 100%;
    min-height: 46px;
    padding: 12px 16px;
    justify-content: flex-start;
    font-size: 15px;
  }

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

  .settings-actions .ghost-button {
    width: 100%;
    justify-content: center;
  }

  .settings-panel.as-drawer {
    max-height: 86vh;
    border-radius: 18px 18px 0 0;
  }

  .fate-tags {
    gap: 8px;
  }

  .fate-tag {
    min-height: 34px;
    font-size: 12.5px;
  }

  body.style-soft .result-scroll {
    padding: 26px 18px;
  }

  body.style-soft .empathy-note {
    padding: 18px 16px 18px 18px;
  }
}

/* 尊重系统「减弱动效」偏好 */
@media (prefers-reduced-motion: reduce) {
  .settings-panel:not(.hidden),
  .settings-panel.as-drawer {
    animation: none;
  }

  .settings-option,
  .settings-toggle::after,
  .fate-tag {
    transition: none;
  }
}

/* ================= v2.0 卦象体系新增样式 ================= */

/* 八轴星盘：标签更密，字号略收 */
.radar-label {
  font-size: 11px;
}

/* 八维只留大白话：标签用关键词（开创/亲和/…），不出现卦名与「象·」这类八卦字眼 */
.radar-label {
  fill: var(--text);
  font-size: 12px;
  font-weight: 600;
}

/* 图更好看：网格整体更淡，最外圈略亮，形成层次、不与数据多边形抢视线 */
.radar-grid {
  stroke: rgba(212, 175, 55, 0.12);
}

.radar-grid:nth-of-type(4) {
  stroke: rgba(212, 175, 55, 0.35);
  stroke-width: 1.2;
}

.radar-data {
  stroke-width: 2.5;
}

/* 雷达图下的一句说明：回答「这八项是什么」，同时防误解为运势 */
.radar-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* 八维说明清单：每维一行「象·关键词 —— 日常镜头」（八维可懂 B 案） */
.dim-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dim-list li {
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}

.dim-list li b {
  display: inline-block;
  min-width: 84px;
  color: var(--gold-soft);
  font-weight: 600;
}

/* ---------- 结果页：卦象头部 ---------- */
.gua-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

/* 卦名注解（大白话）：替代原来 34px 的传统卦名 —— 那句「雷水解」对用户等于没信息 */
.gua-gloss {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
}

.gua-meta {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ---------- 上下卦两栏 ---------- */
.gua-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 4px 0 18px;
}

.gua-chip {
  padding: 14px 16px;
  border: 1px dashed rgba(212, 175, 55, 0.35);
  border-radius: 14px;
  background: rgba(139, 92, 246, 0.1);
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}

.gua-chip b {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-magic);
  font-size: 16px;
  letter-spacing: 0.1em;
  color: var(--gold-soft);
}

.gua-chip span {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 10px;
  font-size: 11px;
  border-radius: 999px;
  border: 1px solid rgba(191, 169, 231, 0.4);
  color: var(--muted);
}

/* ---------- 卦辞 / 象辞 ---------- */
.classic-box {
  margin: 0 0 16px;
  padding: 16px 18px;
  border-left: 3px solid rgba(212, 175, 55, 0.6);
  border-radius: 6px 16px 16px 6px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(139, 92, 246, 0.08));
}

.classic-label {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--muted);
  opacity: 0.85;
}

.classic-text {
  margin: 4px 0 12px;
  font-family: var(--font-magic);
  font-size: 17px;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: var(--text);
}

.classic-text:last-child {
  margin-bottom: 0;
}

/* ---------- 内在 / 对外 段落 ---------- */
.gua-block {
  margin: 0;
  font-size: 15px;
  line-height: 2;
  color: var(--text);
}

/* ---------- 心法彩蛋 ---------- */
.kongjing-box {
  margin: 18px 0 6px;
  padding: 16px 18px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.08), transparent);
}

.kongjing-label {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 10px;
  font-size: 11px;
  letter-spacing: 0.16em;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  color: var(--gold-soft);
}

.kongjing-text {
  margin: 0 0 8px;
  font-family: var(--font-magic);
  font-size: 18px;
  line-height: 1.9;
  letter-spacing: 0.06em;
  color: var(--gold-soft);
}

.kongjing-source {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.85;
}

.kongjing-note {
  margin: 0;
  font-size: 14px;
  line-height: 1.95;
  color: var(--text);
}

/* ---------- 纯卦彩蛋 ---------- */
.pure-box {
  margin: 16px 0 0;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.9;
  border-radius: 12px;
  border: 1px dashed rgba(191, 169, 231, 0.5);
  background: rgba(139, 92, 246, 0.1);
  color: var(--muted);
}

/* ---------- 答题页：内外提示 ---------- */
.scope-note {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--muted);
  opacity: 0.85;
}

/* ---------- 心语四态 ---------- */
.slip-level.st-畅 {
  color: #f1d27d;
  border-color: rgba(241, 210, 125, 0.6);
}

.slip-level.st-平 {
  color: #bfa9e7;
  border-color: rgba(191, 169, 231, 0.5);
}

.slip-level.st-蓄 {
  color: #8fc7b8;
  border-color: rgba(143, 199, 184, 0.5);
}

.slip-level.st-转 {
  color: #d5a5a5;
  border-color: rgba(213, 165, 165, 0.55);
}

/* ---------- 柔雾主题适配 ---------- */

body.mist .gua-chip {
  background: rgba(169, 155, 192, 0.14);
  border-color: rgba(141, 128, 163, 0.4);
}

body.mist .gua-chip b {
  color: #7d5f31;
}

body.mist .classic-box {
  border-left-color: rgba(165, 132, 90, 0.7);
  background: linear-gradient(135deg, rgba(201, 169, 122, 0.16), rgba(169, 155, 192, 0.12));
}

body.mist .classic-text {
  color: #4a4257;
}

body.mist .kongjing-box {
  border-color: rgba(141, 128, 163, 0.4);
  background: linear-gradient(180deg, rgba(201, 169, 122, 0.16), transparent);
}

body.mist .kongjing-text {
  color: #7d5f31;
}

body.mist .kongjing-label {
  color: #6b4f22;
  border-color: rgba(165, 132, 90, 0.6);
}

body.mist .pure-box {
  background: rgba(169, 155, 192, 0.16);
  border-color: rgba(141, 128, 163, 0.45);
  color: #55496a;
}

body.mist .gua-block {
  color: #4a4257;
}

body.mist .slip-level.st-畅 {
  color: #8a6a1f;
}

body.mist .slip-level.st-平 {
  color: #6f6288;
}

body.mist .slip-level.st-蓄 {
  color: #3f6f61;
}

body.mist .slip-level.st-转 {
  color: #8a5252;
}

@media (max-width: 480px) {
  .gua-head {
    gap: 12px;
  }

  .gua-pair {
    grid-template-columns: 1fr;
  }
}

/* ================= v2.1 可读性优化：白话层与分层折叠 ================= */

/* ---------- 首屏：白话标签 + 卦名 ---------- */
.result-hero {
  text-align: center;
  margin-bottom: 16px;
}

.hero-plain {
  margin: 0 0 12px;
  font-family: var(--font-magic);
  font-size: 40px;
  line-height: 1.3;
  letter-spacing: 0.1em;
  color: var(--gold-soft);
}

.result-hero .gua-head {
  justify-content: center;
  text-align: left;
}

/* ---------- 一句话结论 ---------- */
.summary-box {
  margin: 0 0 16px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(212, 175, 55, 0.1));
}

.summary-label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.summary-box p {
  margin: 0;
  font-size: 16px;
  line-height: 1.95;
  color: var(--text);
}

/* ---------- 折叠块（details / summary） ---------- */
.fold {
  margin: 14px 0 0;
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 16px;
  background: rgba(139, 92, 246, 0.07);
  overflow: hidden;
}

.fold > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 14px 18px;
  cursor: pointer;
  font-family: var(--font-magic);
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--gold-soft);
  list-style: none;
}

.fold > summary::-webkit-details-marker {
  display: none;
}

.fold > summary::after {
  content: "＋";
  flex: none;
  font-size: 14px;
  opacity: 0.85;
}

.fold[open] > summary::after {
  content: "－";
}

.fold[open] > summary {
  border-bottom: 1px dashed rgba(212, 175, 55, 0.24);
}

.fold-body {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
}

.fold-label {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
  opacity: 0.85;
}

/* ---------- 文言 / 白话对照 ---------- */
.classic-plain {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
}

.classic-plain:last-child {
  margin-bottom: 0;
}

/* 文言原文的语境注解（仅少数卦有） */
.classic-note {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px dashed rgba(212, 175, 55, 0.25);
  font-size: 12px;
  line-height: 1.85;
  color: var(--muted);
  opacity: 0.9;
}

body.mist .classic-note {
  border-top-color: rgba(141, 128, 163, 0.3);
  color: #6a6180;
}

/* ---------- 分析正文（保留 \n 分段） ---------- */
.gua-analysis {
  margin: 0;
  font-size: 15px;
  line-height: 2;
  color: var(--text);
  white-space: pre-line;
}

/* ---------- 柔雾主题适配 ---------- */
body.mist .hero-plain {
  color: #7d5f31;
}

body.mist .summary-box {
  border-color: rgba(141, 128, 163, 0.4);
  background: linear-gradient(135deg, rgba(169, 155, 192, 0.2), rgba(201, 169, 122, 0.16));
}

body.mist .summary-box p,
body.mist .gua-analysis {
  color: #4a4257;
}

body.mist .fold {
  border-color: rgba(141, 128, 163, 0.35);
  background: rgba(169, 155, 192, 0.1);
}

body.mist .fold > summary {
  color: #7d5f31;
}

body.mist .fold[open] > summary {
  border-bottom-color: rgba(141, 128, 163, 0.3);
}

body.mist .classic-plain,
body.mist .fold-label,
body.mist .summary-label {
  color: #6a6180;
}

@media (max-width: 480px) {
  .hero-plain {
    font-size: 31px;
  }

  .fold > summary {
    font-size: 15px;
    padding: 13px 16px;
  }

  .fold-body {
    padding: 14px 16px;
  }
}

/* ================= v2.3 今日心语升为主线（首屏状态卡 + 成图） ================= */

/* 首屏第一眼：今日心语状态卡（整卡可点，移动端热区天然达标） */
.heart-status-card {
  display: grid;
  gap: 8px;
  width: 100%;
  margin-bottom: 18px;
  padding: 20px 22px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  color: var(--text);
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.14), rgba(139, 92, 246, 0.12));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.heart-status-card:hover:not(:disabled) {
  transform: translateY(-3px);
  border-color: rgba(241, 210, 125, 0.85);
  box-shadow: 0 18px 40px rgba(139, 92, 246, 0.28);
}

.heart-status-card:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
}

.hs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hs-label {
  font-family: var(--font-magic);
  font-size: 15px;
  letter-spacing: 0.16em;
  color: var(--gold-soft);
}

.hs-badge {
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid rgba(191, 169, 231, 0.35);
}

.hs-badge.state-畅 {
  color: #f1d27d;
  border-color: rgba(241, 210, 125, 0.6);
}

.hs-badge.state-平 {
  color: #bfa9e7;
  border-color: rgba(191, 169, 231, 0.5);
}

.hs-badge.state-蓄 {
  color: #8fc7b8;
  border-color: rgba(143, 199, 184, 0.5);
}

.hs-badge.state-转 {
  color: #d5a5a5;
  border-color: rgba(213, 165, 165, 0.55);
}

.hs-main {
  font-family: var(--font-magic);
  font-size: 22px;
  line-height: 1.5;
  color: var(--gold-soft);
}

.heart-status-card.is-done .hs-main {
  font-size: 20px;
}

.hs-sub {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.hs-cta {
  margin-top: 2px;
  font-size: 13px;
  color: var(--gold-soft);
}

/* 柔雾主题适配 */
body.mist .heart-status-card {
  border-color: rgba(165, 132, 90, 0.5);
  background: linear-gradient(135deg, rgba(201, 169, 122, 0.2), rgba(169, 155, 192, 0.16));
  box-shadow: 0 10px 26px rgba(74, 66, 87, 0.12);
}

body.mist .hs-label,
body.mist .hs-main,
body.mist .hs-cta {
  color: #7d5f31;
}

body.mist .hs-badge {
  color: #6a6180;
  border-color: rgba(141, 128, 163, 0.4);
}

body.mist .hs-badge.state-畅 {
  color: #8a6a1f;
}

body.mist .hs-badge.state-平 {
  color: #6f6288;
}

body.mist .hs-badge.state-蓄 {
  color: #3f6f61;
}

body.mist .hs-badge.state-转 {
  color: #8a5252;
}

body.mist .hs-sub {
  color: #6a6180;
}
