/* ============ 玄机阁 全局样式 ============ */
:root {
  --ink: #0e1220;          /* 墨蓝底 */
  --ink-2: #161c30;
  --ink-3: #1e2640;
  --gold: #d4af37;
  --gold-soft: #e8cf7a;
  --paper: #f3ead8;
  --text: #e8e4d8;
  --text-dim: #9a96a8;
  --red: #c0483c;
  --green: #4caf7d;
  --line: rgba(212, 175, 55, 0.22);
  --radius: 14px;
  --serif: "Noto Serif SC", "Source Han Serif SC", "STZhongsong", "SimSun", serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(212,175,55,0.08), transparent 60%),
    radial-gradient(900px 500px at 0% 100%, rgba(76,90,160,0.12), transparent 60%),
    var(--ink);
  color: var(--text);
  min-height: 100vh;
  letter-spacing: 0.02em;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.gold { color: var(--gold); }
.dim { color: var(--text-dim); font-size: 0.85em; }

/* ============ 开屏加载动画：太极八卦 ============ */
#boot-loader {
  position: fixed; inset: 0; z-index: 999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 30px; background: var(--ink);
  transition: opacity 0.7s ease;
}
#boot-loader.done { opacity: 0; pointer-events: none; }

.bl-stage { position: relative; width: 230px; height: 230px; }

.bl-taiji {
  position: absolute; inset: 56px;
  animation: bl-spin 3.4s cubic-bezier(0.6, 0.1, 0.4, 0.9) infinite;
  filter: drop-shadow(0 0 22px rgba(212, 175, 55, 0.30));
}

.bl-ring {
  position: absolute; inset: 0;
  animation: bl-spin-rev 16s linear infinite;
}
.bl-ring span {
  position: absolute; left: 50%; top: 50%;
  font-size: 21px; color: var(--gold-soft); opacity: 0.85;
  transform: translate(-50%, -50%) rotate(calc(var(--i) * 45deg)) translateY(-100px);
}

.bl-orbit {
  position: absolute; inset: 22px; border-radius: 50%;
  border: 1px solid var(--line);
}

.bl-text {
  color: var(--text-dim); font-size: 13px;
  letter-spacing: 0.45em; text-transform: uppercase; padding-left: 0.45em;
  animation: bl-pulse 1.9s ease-in-out infinite;
}

@keyframes bl-spin { to { transform: rotate(360deg); } }
@keyframes bl-spin-rev { to { transform: rotate(-360deg); } }
@keyframes bl-pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .bl-taiji, .bl-ring, .bl-text { animation: none; }
}

/* ============ 头部 ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 18, 32, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; flex-direction: column; align-items: stretch; padding: 14px 0 0; }
.header-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.header-side { display: flex; align-items: center; gap: 6px; flex: none; }
.header-side .nav-link { font-size: 14px; padding: 7px 14px; }
.logo { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.logo-mark { font-size: 24px; color: var(--gold); }
.logo-text { font-size: 22px; font-weight: 700; color: var(--gold); letter-spacing: 0.15em; white-space: nowrap; }
.logo-sub { font-size: 12px; color: var(--text-dim); letter-spacing: 0.2em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main-nav {
  display: flex; gap: 2px; align-items: center;
  margin-top: 10px; padding: 6px 0;
  border-top: 1px solid rgba(212, 175, 55, 0.10);
  overflow-x: auto; white-space: nowrap;
  scrollbar-width: none;
}
.main-nav::-webkit-scrollbar { display: none; }
.nav-link {
  color: var(--text-dim); text-decoration: none; font-size: 14.5px;
  padding: 7px 13px; border-radius: 8px; transition: all 0.2s;
  flex: none;
}
.nav-link:hover { color: var(--gold-soft); background: rgba(212,175,55,0.08); }
.nav-link.active { color: var(--gold); background: rgba(212,175,55,0.12); }

.tag-free, .tag-pay, .tag-half {
  font-style: normal; font-size: 11px; vertical-align: super;
  padding: 1px 5px; border-radius: 6px; margin-left: 3px; white-space: nowrap;
}
.tag-free { color: var(--green); border: 1px solid rgba(76,175,125,0.5); }
.tag-pay  { color: var(--gold); border: 1px solid rgba(212,175,55,0.5); }
.tag-half { color: #8fb4e8; border: 1px solid rgba(143,180,232,0.5); }

/* ============ 页面切换 ============ */
.page { display: none; padding: 40px 0 70px; }
.page.active { display: block; animation: fadein 0.35s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.page-title { font-size: 30px; color: var(--gold); margin-bottom: 8px; letter-spacing: 0.08em; }
.page-subtitle { color: var(--text-dim); margin-bottom: 26px; line-height: 1.7; }

/* ============ 首页 ============ */
.hero { padding: 70px 0 40px; }
.hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.hero-text h1 { font-size: 44px; line-height: 1.35; letter-spacing: 0.1em; margin-bottom: 18px; }
.hero-desc { color: var(--text-dim); line-height: 1.9; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-bagua { position: relative; width: 260px; height: 260px; flex: none; }
.bagua-ring {
  position: absolute; inset: 0; border: 1px solid var(--line); border-radius: 50%;
  animation: spin 40s linear infinite;
}
.bagua-ring span {
  position: absolute; left: 50%; top: 50%; font-size: 26px; color: var(--gold-soft);
  transform: translate(-50%, -50%) rotate(calc(var(--i) * 45deg)) translateY(-112px);
}
.bagua-ring span:nth-child(1) { --i: 0; } .bagua-ring span:nth-child(2) { --i: 1; }
.bagua-ring span:nth-child(3) { --i: 2; } .bagua-ring span:nth-child(4) { --i: 3; }
.bagua-ring span:nth-child(5) { --i: 4; } .bagua-ring span:nth-child(6) { --i: 5; }
.bagua-ring span:nth-child(7) { --i: 6; } .bagua-ring span:nth-child(8) { --i: 7; }
.bagua-core {
  position: absolute; inset: 70px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%; font-size: 56px; color: var(--gold);
  background: radial-gradient(circle, rgba(212,175,55,0.12), transparent 70%);
}
@keyframes spin { to { transform: rotate(360deg); } }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin: 30px 0 60px; }
.feature-card {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 20px; cursor: pointer; transition: all 0.25s;
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.feature-icon { font-size: 30px; margin-bottom: 14px; color: var(--gold); }
.feature-icon svg { width: 38px; height: 38px; display: block; }
.feature-card:hover .feature-icon svg { filter: drop-shadow(0 0 8px rgba(212,175,55,0.45)); }

.hero-eyebrow {
  font-size: 12px; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--gold-soft); opacity: 0.85; margin-bottom: 14px;
}
.feature-card h3 { font-size: 18px; color: var(--gold-soft); margin-bottom: 10px; }
.feature-card p { font-size: 14px; color: var(--text-dim); line-height: 1.8; }

/* ============ 按钮 ============ */
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 10px; font-size: 16px;
  font-family: inherit; letter-spacing: 0.1em; cursor: pointer; text-decoration: none;
  border: 1px solid transparent; transition: all 0.2s; text-align: center;
}
.btn-gold { background: linear-gradient(135deg, #d4af37, #b8912a); color: #1a1408; font-weight: 700; }
.btn-gold:hover { filter: brightness(1.1); box-shadow: 0 6px 18px rgba(212,175,55,0.3); }
.btn-outline { background: transparent; color: var(--gold); border-color: var(--gold); }
.btn-outline:hover { background: rgba(212,175,55,0.1); }
.btn-wide { display: block; width: 100%; margin-top: 18px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============ 卡片与表单 ============ */
.card {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; margin-bottom: 24px;
}
.center-card { text-align: center; padding: 46px 26px; }
.center-card p { color: var(--text-dim); margin-bottom: 18px; line-height: 1.8; }

.form-row { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.form-row label { flex: 1; min-width: 220px; font-size: 14px; color: var(--text-dim); display: flex; flex-direction: column; gap: 7px; }
input, select {
  font-family: inherit; font-size: 16px; color: var(--text);
  background: var(--ink-3); border: 1px solid var(--line); border-radius: 8px;
  padding: 11px 12px; outline: none; transition: border-color 0.2s;
  color-scheme: dark;
}
input:focus, select:focus { border-color: var(--gold); }

/* ============ 八字结果 ============ */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.pillar {
  background: var(--ink-3); border: 1px solid var(--line); border-radius: 12px;
  text-align: center; padding: 16px 6px;
}
.pillar .p-label { font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
.pillar .p-gan, .pillar .p-zhi { font-size: 30px; line-height: 1.4; font-weight: 700; }
.pillar .p-shen { font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.pillar.day-pillar { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }

.wx-wood { color: #6fbf73; } .wx-fire { color: #e26d5a; } .wx-earth { color: #c9a227; }
.wx-metal { color: #d8d3c8; } .wx-water { color: #6ea8d8; }

.wuxing-bars { margin: 16px 0; }
.wx-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.wx-row .wx-name { width: 60px; font-size: 15px; }
.wx-row .wx-track { flex: 1; height: 12px; background: var(--ink-3); border-radius: 6px; overflow: hidden; }
.wx-row .wx-fill { height: 100%; border-radius: 6px; transition: width 0.6s ease; }
.wx-row .wx-count { width: 34px; text-align: right; color: var(--text-dim); font-size: 14px; }
.wx-fill.wood { background: #6fbf73; } .wx-fill.fire { background: #e26d5a; }
.wx-fill.earth { background: #c9a227; } .wx-fill.metal { background: #d8d3c8; }
.wx-fill.water { background: #6ea8d8; }

.info-line { display: flex; gap: 26px; flex-wrap: wrap; color: var(--text-dim); font-size: 15px; margin: 10px 0 4px; }
.info-line b { color: var(--text); font-weight: 400; }

.analysis-text { line-height: 2; margin-top: 12px; color: var(--text); }
.analysis-text strong { color: var(--gold-soft); }

.section-h { font-size: 20px; color: var(--gold); margin: 4px 0 12px; letter-spacing: 0.06em; }

/* ============ 星座 ============ */
.zodiac-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 26px; }
.zodiac-item {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 10px; text-align: center; cursor: pointer; transition: all 0.2s;
}
.zodiac-item:hover, .zodiac-item.selected { border-color: var(--gold); background: rgba(212,175,55,0.08); }
.zodiac-item .z-icon { font-size: 26px; }
.zodiac-item .z-name { margin-top: 6px; font-size: 15px; }
.zodiac-item .z-date { font-size: 12px; color: var(--text-dim); margin-top: 3px; }

.score-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.score-row .s-name { width: 70px; font-size: 15px; color: var(--text-dim); }
.score-row .stars { color: var(--gold); letter-spacing: 3px; font-size: 16px; }
.score-row .stars .off { color: #3a405c; }

.lucky-chips { display: flex; gap: 12px; flex-wrap: wrap; margin: 14px 0; }
.chip {
  background: var(--ink-3); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 16px; font-size: 14px; color: var(--text);
}
.chip b { color: var(--gold-soft); font-weight: 400; }

/* ============ 摇卦 ============ */
.coin-stage { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 22px 0 4px; flex-wrap: wrap; }
.cast-left { display: flex; flex-direction: column; align-items: center; }

/* ---- 龟壳（传统摇卦器）---- */
.shell-wrap { width: 172px; margin-bottom: -8px; transform-origin: 50% 92%; z-index: 2; }
.shell-wrap svg { display: block; width: 100%; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.45)); }
.shell-wrap.shaking { animation: shell-shake 1.15s cubic-bezier(0.4, 0.1, 0.5, 1); }
@keyframes shell-shake {
  0%   { transform: rotate(0); }
  10%  { transform: rotate(-9deg) translateY(-4px); }
  22%  { transform: rotate(8deg); }
  34%  { transform: rotate(-10deg) translateY(-5px); }
  46%  { transform: rotate(9deg); }
  56%  { transform: rotate(-6deg); }
  72%  { transform: rotate(24deg) translateY(3px); }
  86%  { transform: rotate(16deg); }
  100% { transform: rotate(0); }
}

/* ---- 双面 3D 铜钱 ---- */
.coins { display: flex; gap: 18px; perspective: 900px; margin-top: 10px; }
.coin { width: 78px; height: 78px; position: relative; filter: drop-shadow(0 8px 14px rgba(0,0,0,0.45)); }
.coin-inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 0.28s ease-out; }
.coin .face { position: absolute; inset: 0; backface-visibility: hidden; }
.coin .face svg { display: block; width: 100%; height: 100%; }
.coin .face.back { transform: rotateY(180deg); }
.coin-inner.show-back { transform: rotateY(180deg); }

/* 从龟壳口（底部中央）洒落：--fx 为各钱与壳口的水平位移 */
.coin:nth-child(1) .coin-inner { --fx: 96px; }
.coin:nth-child(2) .coin-inner { --fx: 0px; }
.coin:nth-child(3) .coin-inner { --fx: -96px; }
.coin-inner.pouring { animation: coin-pour 0.95s cubic-bezier(0.28, 0.7, 0.3, 1) both; }
@keyframes coin-pour {
  0%   { transform: translate(var(--fx, 0), -92px) rotateY(0) rotateZ(-24deg) scale(0.42); opacity: 0; }
  10%  { opacity: 1; }
  55%  { transform: translate(calc(var(--fx, 0) * 0.18), -22px) rotateY(680deg) rotateZ(9deg) scale(1.06); }
  76%  { transform: translate(0, 6px) rotateY(960deg) rotateZ(-3deg) scale(0.97); }
  88%  { transform: translate(0, -5px) rotateY(1050deg) scale(1.01); }
  100% { transform: translate(0, 0) rotateY(1080deg) rotateZ(0); }
}
@media (prefers-reduced-motion: reduce) {
  .shell-wrap.shaking { animation: none; }
  .coin-inner.pouring { animation: none; }
}

.lines-built { display: flex; flex-direction: column-reverse; gap: 7px; min-width: 200px; min-height: 130px; justify-content: flex-end; }
.yao { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-dim); }
.yao .bar { display: flex; gap: 10px; width: 120px; }
.yao .seg { height: 12px; border-radius: 3px; background: var(--gold); flex: 1; }
.yao.moving .seg { background: var(--red); box-shadow: 0 0 8px rgba(192,72,60,0.7); }

/* 新爻自下而上生长入位 */
.yao-new { animation: yao-grow 0.65s cubic-bezier(0.2, 0.8, 0.3, 1); }
.yao-new .seg { animation: yao-glow 1.8s ease-out; }
@keyframes yao-grow {
  from { opacity: 0; transform: translateY(16px) scaleX(0.25); }
  to   { opacity: 1; transform: none; }
}
@keyframes yao-glow {
  0%   { box-shadow: 0 0 20px rgba(212, 175, 55, 0.95); }
  100% { box-shadow: none; }
}
.yao.moving.yao-new .seg { animation: yao-glow-moving 1.8s ease-out; }
@keyframes yao-glow-moving {
  0%   { box-shadow: 0 0 20px rgba(192, 72, 60, 0.95); }
  100% { box-shadow: 0 0 8px rgba(192, 72, 60, 0.7); }
}

/* 待成之爻：虚位以待 */
.yao-ghost { opacity: 0.32; }
.yao-ghost .seg {
  background: transparent;
  border: 1px dashed rgba(212, 175, 55, 0.55);
  box-shadow: none;
}
@media (prefers-reduced-motion: reduce) {
  .yao-new, .yao-new .seg, .yao.moving.yao-new .seg { animation: none; }
}

.hex-pair { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; margin: 14px 0; }
.hex-glyph { font-size: 84px; line-height: 1; color: var(--gold); }
.hex-name { font-size: 24px; color: var(--gold-soft); }
.hex-ci { color: var(--text-dim); font-size: 15px; margin-top: 6px; }
.hex-arrow { font-size: 30px; color: var(--text-dim); }
.luck-badge {
  display: inline-block; font-size: 13px; border-radius: 6px; padding: 2px 10px; margin-left: 10px;
  border: 1px solid var(--gold); color: var(--gold); vertical-align: middle;
}

/* ============ 付费遮罩 ============ */
.locked-box { position: relative; overflow: hidden; border-radius: var(--radius); }
.locked-blur { filter: blur(7px); user-select: none; pointer-events: none; opacity: 0.6; }
.locked-cover {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  background: linear-gradient(180deg, rgba(14,18,32,0.35), rgba(14,18,32,0.88));
}
.locked-cover .lock-ic { font-size: 30px; }
.locked-cover p { color: var(--text); }

/* ============ 每日五行能量仪表盘（两站共用） ============ */
.qi-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin-bottom: 6px; }
.qi-date { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-dim); }
.qi-pillar { font-size: 14px; color: var(--gold-soft); letter-spacing: 0.06em; }

.qi-zen {
  font-size: 21px; line-height: 1.6; letter-spacing: 0.03em;
  color: var(--text); margin: 14px 0 20px;
}
.qi-zen::before { content: "「"; color: var(--gold); }
.qi-zen::after { content: "」"; color: var(--gold); }

.qi-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.qi-row .qi-name { width: 210px; font-size: 14px; letter-spacing: 0.04em; }
.qi-row .qi-name small { display: block; color: var(--text-dim); font-size: 11px; letter-spacing: 0.08em; }
.qi-row .qi-track { flex: 1; height: 6px; background: var(--ink-3); border-radius: 3px; overflow: hidden; }
.qi-row .qi-fill { height: 100%; border-radius: 3px; transition: width 0.9s cubic-bezier(0.2, 0.7, 0.3, 1); }
.qi-row .qi-num { width: 36px; text-align: right; font-size: 13px; color: var(--text-dim); }

.qi-email { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.qi-email input { flex: 1; min-width: 220px; }
.qi-email-done { color: var(--green); font-size: 14px; }

/* ============ 报告 ============ */
.report-scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 16px 0; }
.rs-card { background: var(--ink-3); border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-align: center; }
.rs-card .rs-num { font-size: 32px; color: var(--gold); font-weight: 700; }
.rs-card .rs-name { color: var(--text-dim); font-size: 14px; margin-top: 4px; }

.month-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 14px; }
.month-item { background: var(--ink-3); border: 1px solid var(--line); border-radius: 10px; padding: 13px 15px; font-size: 14px; line-height: 1.7; }
.month-item b { color: var(--gold-soft); font-weight: 400; }

/* ============ 价格 ============ */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.price-card {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; position: relative; display: flex; flex-direction: column;
}
.price-card.featured { border-color: var(--gold); box-shadow: 0 0 30px rgba(212,175,55,0.12); }
.price-card .ribbon {
  position: absolute; top: -12px; right: 16px; background: var(--gold); color: #1a1408;
  font-size: 12px; padding: 3px 12px; border-radius: 999px; font-weight: 700;
}
.price-card h3 { color: var(--gold-soft); font-size: 18px; margin-bottom: 10px; }
.price { font-size: 32px; color: var(--gold); margin-bottom: 14px; }
.price span { font-size: 14px; color: var(--text-dim); }
.price.free { color: var(--green); }
.price-card ul { list-style: none; flex: 1; }
.price-card li { font-size: 14px; color: var(--text-dim); padding: 6px 0 6px 20px; position: relative; line-height: 1.5; }
.price-card li::before { content: "✦"; position: absolute; left: 0; color: var(--gold); font-size: 11px; top: 9px; }

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed; inset: 0; z-index: 100; background: rgba(5,7,14,0.75);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: var(--ink-2); border: 1px solid var(--gold); border-radius: 16px;
  width: 380px; max-width: 100%; padding: 30px 28px; position: relative; text-align: center;
  animation: fadein 0.25s ease;
}
.modal-close {
  position: absolute; top: 10px; right: 14px; background: none; border: none;
  color: var(--text-dim); font-size: 26px; cursor: pointer;
}
.modal h3 { color: var(--gold); font-size: 20px; margin-bottom: 8px; }
.pay-price { font-size: 38px; color: var(--gold); margin: 8px 0 16px; }
.pay-qr { background: var(--ink-3); border-radius: 12px; padding: 18px; }
.pay-qr p { color: var(--text-dim); font-size: 13px; margin-top: 10px; }
.qr-grid {
  width: 150px; height: 150px; margin: 0 auto; border-radius: 8px;
  background:
    repeating-linear-gradient(0deg, var(--paper) 0 8px, transparent 8px 16px),
    repeating-linear-gradient(90deg, var(--paper) 0 8px, #2a3050 8px 16px);
  opacity: 0.9;
}
.pay-note { font-size: 12px; color: var(--text-dim); margin-top: 12px; line-height: 1.6; }

/* ============ 合规：免责声明与隐私 ============ */
.legal-block h3 { color: var(--gold-soft); font-size: 17px; margin: 18px 0 8px; }
.legal-block p, .legal-block li { color: var(--text-dim); font-size: 14px; line-height: 1.9; }
.legal-block ul { list-style: none; margin: 6px 0; }
.legal-block li { padding-left: 18px; position: relative; }
.legal-block li::before { content: "·"; position: absolute; left: 4px; color: var(--gold); }
.legal-block strong { color: var(--text); font-weight: 400; }

.disclaimer-inline {
  margin-top: 14px; padding: 10px 14px; border-radius: 8px;
  border: 1px dashed rgba(192, 72, 60, 0.45);
  color: var(--text-dim); font-size: 12.5px; line-height: 1.7;
}
.disclaimer-inline b { color: #d98f85; font-weight: 400; }

.pay-agree {
  display: flex; align-items: flex-start; gap: 8px; text-align: left;
  margin: 14px 0 4px; font-size: 12.5px; color: var(--text-dim); line-height: 1.6;
  cursor: pointer;
}
.pay-agree input { width: 15px; height: 15px; margin-top: 2px; flex: none; accent-color: var(--gold); cursor: pointer; }
.pay-agree a { color: var(--gold-soft); }
#pay-confirm:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============ 账号 · 事件日志 · 卦象回音 ============ */
.acct-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.acct-form { display: flex; flex-direction: column; gap: 12px; }
.acct-err { color: #d98f85; font-size: 13px; }
.acct-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.acct-tools .btn { padding: 9px 18px; font-size: 13px; }
.acct-danger { border-color: rgba(192, 72, 60, 0.55); color: #d98f85; }
.acct-danger:hover { background: rgba(192, 72, 60, 0.12); }

.journal-item { border-top: 1px solid var(--line); padding: 16px 0; }
.journal-item:first-of-type { border-top: none; }
.ji-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.ji-date { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); }
.ji-hex { font-size: 13.5px; color: var(--gold-soft); }
.ji-q { font-size: 15px; line-height: 1.6; margin-bottom: 10px; }
.ji-fb { display: flex; flex-direction: column; gap: 9px; }
.ji-stars { display: flex; align-items: center; gap: 2px; }
.ji-star {
  background: none; border: none; cursor: pointer; padding: 0 2px;
  font-size: 20px; color: #3a405c; transition: color 0.15s, transform 0.15s;
}
.ji-star:hover, .ji-star.on { color: var(--gold); }
.ji-star:hover { transform: scale(1.2); }
.ji-stars.shake { animation: ji-shake 0.4s; }
@keyframes ji-shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }
.ji-fb .btn { align-self: flex-start; padding: 8px 18px; font-size: 13px; }
.ji-fb-done { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 14px; }
.ji-fb-done .stars { color: var(--gold); letter-spacing: 2px; }
.ji-fb-done .stars .off { color: #3a405c; }

.echo-toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 380px; max-width: calc(100vw - 40px);
  background: var(--ink-2); border: 1px solid var(--gold); border-radius: 14px;
  padding: 18px 20px; box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55);
  animation: echo-rise 0.6s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.echo-toast p { font-size: 13.5px; line-height: 1.75; color: var(--text); margin-bottom: 12px; }
.echo-toast b { color: var(--gold-soft); font-weight: 400; }
.echo-actions { display: flex; gap: 8px; align-items: center; }
.echo-actions .btn { padding: 7px 14px; font-size: 12px; }
.echo-close {
  margin-left: auto; background: none; border: none; color: var(--text-dim);
  font-size: 20px; cursor: pointer; line-height: 1;
}
@keyframes echo-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ============ 神谕茶室（多轮对谈） ============ */
.tea-chat { display: flex; flex-direction: column; gap: 12px; max-height: 460px; overflow-y: auto; padding: 6px 2px; }
.tea-msg { max-width: 82%; padding: 12px 16px; border-radius: 14px; font-size: 15px; line-height: 1.85; }
.tea-msg.user { align-self: flex-end; background: rgba(212, 175, 55, 0.12); border: 1px solid rgba(212, 175, 55, 0.3); border-bottom-right-radius: 4px; }
.tea-msg.oracle { align-self: flex-start; background: var(--ink-3); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.tea-msg.oracle strong { color: var(--gold-soft); font-weight: 400; }
.tea-msg.pending { color: var(--text-dim); font-style: italic; }
.tea-input-row { display: flex; gap: 10px; margin-top: 14px; }
.tea-input-row input { flex: 1; }
.tea-rounds { font-size: 12px; letter-spacing: 0.12em; color: var(--text-dim); margin-top: 8px; text-align: right; }
.tea-rounds b { color: var(--gold); font-weight: 400; }
.tea-closed { text-align: center; color: var(--text-dim); padding: 10px; font-size: 14px; }

/* ============ 八字合盘 ============ */
.match-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.match-head { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; margin-bottom: 8px; }
.match-score {
  width: 128px; height: 128px; border-radius: 50%; flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 2px solid var(--gold); background: radial-gradient(circle, rgba(212,175,55,0.10), transparent 70%);
}
.match-score .ms-num { font-size: 42px; color: var(--gold); font-weight: 700; line-height: 1; }
.match-score .ms-cap { font-size: 11px; letter-spacing: 0.18em; color: var(--text-dim); margin-top: 6px; }
.match-verdict { flex: 1; min-width: 220px; font-size: 18px; line-height: 1.8; }
.match-pair { font-size: 13.5px; color: var(--text-dim); margin-top: 6px; }
.match-pair b { color: var(--gold-soft); font-weight: 400; }

/* ============ 十年大运时间轴 ============ */
.dayun-strip { display: flex; gap: 12px; overflow-x: auto; padding: 8px 2px 14px; scrollbar-width: thin; }
.dy-card {
  flex: 0 0 150px; background: var(--ink-3); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 12px; text-align: center;
}
.dy-card .dy-gz { font-size: 24px; line-height: 1.3; }
.dy-card .dy-age { font-size: 11px; letter-spacing: 0.1em; color: var(--text-dim); margin: 6px 0 4px; }
.dy-card .dy-god { font-size: 12px; color: var(--gold-soft); }
.dy-card.dy-now { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset, 0 0 18px rgba(212,175,55,0.18); }
.dy-card.dy-now .dy-age::after { content: " · 当前"; color: var(--gold); }
.dy-detail { margin-top: 6px; }

/* ============ 择日 ============ */
.day-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 6px; }
.day-card { background: var(--ink-3); border: 1px solid var(--line); border-radius: 12px; padding: 16px; position: relative; }
.day-card.best { border-color: var(--gold); }
.day-card .dc-rank {
  position: absolute; top: -10px; left: 14px; background: var(--gold); color: #1a1408;
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 10px;
}
.day-card .dc-date { font-size: 17px; margin-bottom: 2px; }
.day-card .dc-gz { font-size: 13px; color: var(--gold-soft); margin-bottom: 8px; }
.day-card .dc-why { font-size: 13px; color: var(--text-dim); line-height: 1.75; }
.day-card .dc-score { position: absolute; right: 14px; top: 12px; font-size: 20px; color: var(--gold); }

/* ============ 报告分享工具条 ============ */
.share-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 18px; margin-bottom: 18px;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.share-label { font-size: 13px; letter-spacing: 0.15em; color: var(--text-dim); margin-right: 4px; }
.share-btn { padding: 8px 16px !important; font-size: 12.5px !important; }
.share-btn.copied { border-color: var(--green); color: var(--green); }

/* ============ 打印 / 保存 PDF：仅输出报告，转纸面配色 ============ */
@media print {
  body.print-report .site-header,
  body.print-report .site-footer,
  body.print-report #boot-loader,
  body.print-report .echo-toast,
  body.print-report #pay-modal,
  body.print-report .share-bar,
  body.print-report #fortune-gate { display: none !important; }
  body.print-report .page { display: none !important; }
  body.print-report #fortune { display: block !important; padding: 0; }
  body.print-report { background: #fff !important; }
  body.print-report::before, body.print-report::after { display: none !important; }
  body.print-report #fortune, body.print-report #fortune * {
    color: #1d1a12 !important; text-shadow: none !important; box-shadow: none !important;
  }
  body.print-report #fortune .page-title,
  body.print-report #fortune .section-h,
  body.print-report #fortune .rs-num,
  body.print-report #fortune strong,
  body.print-report #fortune b { color: #8a6f2a !important; }
  body.print-report #fortune .card,
  body.print-report #fortune .rs-card,
  body.print-report #fortune .month-item {
    background: #fff !important; border-color: #d9d2bf !important;
  }
  body.print-report #fortune .card { break-inside: avoid; page-break-inside: avoid; }
  body.print-report #fortune .disclaimer-inline { border-color: #c9a9a4 !important; }
}

/* ============ 页脚 ============ */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; text-align: center; color: var(--text-dim); font-size: 14px; line-height: 2; }
.site-footer strong { color: var(--gold-soft); }

/* ============ 英文站：术语释义与文化注解 ============ */
.term {
  border-bottom: 1px dotted var(--gold);
  cursor: help; position: relative; white-space: nowrap;
}
.term::after {
  content: attr(data-tip);
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  width: 300px; max-width: 74vw; z-index: 60;
  background: #23283f; color: var(--text); border: 1px solid var(--gold);
  border-radius: 10px; padding: 10px 13px;
  font-size: 13px; line-height: 1.6; letter-spacing: 0.01em; white-space: normal;
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.term:hover::after { opacity: 1; }

.culture-note {
  background: rgba(212,175,55,0.06); border: 1px solid var(--line);
  border-left: 3px solid var(--gold); border-radius: 8px;
  padding: 13px 16px; margin: 14px 0; font-size: 14px; line-height: 1.75; color: var(--text-dim);
}
.culture-note b { color: var(--gold-soft); font-weight: 400; }
.culture-note .cn-tag { color: var(--gold); font-size: 12px; letter-spacing: 0.12em; display: block; margin-bottom: 4px; }

.lang-switch {
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px;
  color: var(--gold-soft); text-decoration: none; font-size: 14px; white-space: nowrap;
}
.lang-switch:hover { border-color: var(--gold); }

.pillar .p-sub { font-size: 11px; color: var(--text-dim); line-height: 1.5; margin-top: 3px; }

.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.guide-card { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.guide-card h3 { color: var(--gold-soft); font-size: 17px; margin-bottom: 10px; }
.guide-card p { font-size: 14px; color: var(--text-dim); line-height: 1.8; }
.guide-card .zh-chars { font-size: 22px; color: var(--gold); margin-bottom: 8px; }

@media (max-width: 720px) {
  .hero-text h1 { font-size: 32px; }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .header-inner { height: auto; padding: 10px 0; }
}
