/* ==========================================================================
   玄阵万卜 · 易境 —— 黑金流动性主题
   基调：深空黑 · 鎏金色 · 流动光；五行色仅作辅助点缀
   ========================================================================== */

:root {
  --bg: #0a0a0d;
  --bg-2: #111117;
  --bg-3: #17171f;
  --surface: rgba(22, 22, 30, 0.78);
  --surface-solid: #15151c;
  --gold: #d9b64a;
  --gold-2: #eecb7e;
  --gold-3: #f7dfa0;
  --gold-soft: rgba(224, 186, 82, 0.20);
  --gold-mid: rgba(224, 186, 82, 0.40);
  --gold-glow: rgba(224, 186, 82, 0.52);
  --text: #f5f2e8;
  --text-2: #d6d2c4;
  --text-3: #9e9a8e;
  --text-4: #6f6c62;
  --line: rgba(212, 175, 55, 0.18);
  --line-2: rgba(212, 175, 55, 0.08);
  --wx: var(--gold);
  --wx-soft: var(--gold-soft);
  --shadow-s: 0 1px 4px rgba(0,0,0,0.4);
  --shadow-m: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-l: 0 22px 70px rgba(0,0,0,0.55);
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --r: 12px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

body {
  background:
    radial-gradient(circle at 50% 34%, rgba(226,186,90,0.12), transparent 48%),
    radial-gradient(circle at 16% 16%, rgba(226,186,90,0.06), transparent 36%),
    radial-gradient(circle at 84% 80%, rgba(196,160,60,0.05), transparent 40%),
    linear-gradient(180deg, #0c0c10 0%, #12121a 52%, #0c0c10 100%);
  display: flex; flex-direction: column;
}

#flow-bg {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
}

/* ---------------- 顶部 ---------------- */
.topbar {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  padding: 18px 26px 8px; position: relative; z-index: 5;
}
.brand { display: flex; align-items: baseline; gap: 12px; }
.brand h1 {
  font-family: var(--serif); font-size: 27px; font-weight: 600; margin: 0;
  letter-spacing: 6px; color: var(--gold);
  text-shadow: 0 0 18px rgba(212,175,55,0.28);
}
.brand .sub {
  font-family: var(--serif); font-size: 12px; color: var(--text-3); letter-spacing: 2px;
}
.topbar .tools { display: flex; gap: 8px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(20, 20, 26, 0.65); color: var(--text-2); cursor: pointer;
  display: grid; place-items: center; font-size: 15px; transition: all .22s;
  backdrop-filter: blur(6px);
}
.icon-btn:hover {
  border-color: var(--gold); color: var(--gold); transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(212,175,55,0.18);
}
.icon-btn.off { color: var(--text-4); opacity: .55; }
.icon-btn.listening {
  border-color: var(--gold); color: var(--gold); animation: pulse 1.2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,55,.35); }
  50% { box-shadow: 0 0 0 10px rgba(212,175,55,0); }
}

/* ---------------- 舞台 ---------------- */
.stage {
  flex: 1 1 auto; position: relative; display: grid; place-items: center; min-height: 0;
}
.stage-core { position: relative; display: grid; place-items: center; }

.stage-title {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: flex; gap: 4px; pointer-events: none;
  font-family: var(--serif); font-size: 30px; letter-spacing: 0; color: var(--gold);
  text-shadow: 0 0 22px rgba(212,175,55,.55), 0 0 8px rgba(212,175,55,.35);
  opacity: 0;
}
.stage-title span { display: block; transform: translateY(10px); opacity: 0; }
.stage.reveal .stage-title { opacity: 1; transition: opacity 1s .7s; }
.stage.reveal .stage-title span {
  opacity: 1; transform: none;
  transition: opacity 1.1s .9s, transform 1.1s .9s cubic-bezier(.22, .61, .36, 1);
}
.stage.reveal .stage-title span:nth-child(2) { transition-delay: 1.15s; }
.stage-title.hidden { opacity: 0 !important; transition: opacity .5s; }

#bagua {
  width: min(560px, 84vw); height: min(560px, 84vw); max-height: 74vh;
  opacity: 0; transform: scale(.82);
  transition: opacity 1.6s cubic-bezier(.22, .61, .36, 1), transform 1.8s cubic-bezier(.22, .61, .36, 1);
  filter: drop-shadow(0 0 26px rgba(212,175,55,0.18));
}
.stage.reveal #bagua { opacity: 1; transform: scale(1); }

.stage-hint {
  position: absolute; bottom: 26px; left: 0; right: 0; text-align: center;
  font-family: var(--serif); font-size: 13px; color: var(--text-3); letter-spacing: 3px;
  transition: opacity .6s;
}
body[data-module] .stage-hint { opacity: 0; }

/* 进入卦象总览（第一屏） */
.enter-btn {
  position: absolute; bottom: 86px; left: 50%; transform: translateX(-50%);
  padding: 12px 42px; border-radius: 30px;
  border: 1px solid rgba(212,175,55,.55); background: rgba(212,175,55,.1);
  color: var(--gold); font-family: var(--serif); font-size: 15px; letter-spacing: 4px;
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.enter-btn:hover { background: rgba(212,175,55,.22); box-shadow: 0 0 22px rgba(212,175,55,.25); }
body[data-module] .enter-btn { opacity: 0; pointer-events: none; }

/* ---------------- 面板（从太极点展开） ---------------- */
#panel {
  position: fixed; inset: 0; z-index: 20; display: none;
  background: rgba(10, 10, 13, 0.94);
  backdrop-filter: blur(10px);
  clip-path: circle(0% at 50% 46%);
  transition: clip-path .72s cubic-bezier(.22, .61, .36, 1);
  overflow-y: auto; overscroll-behavior: contain;
}
#panel.open { display: block; }
#panel.shown { clip-path: circle(140% at 50% 46%); }
.panel-inner {
  max-width: 940px; margin: 0 auto; padding: 34px 26px 90px;
  opacity: 0; transform: translateY(14px); transition: all .5s .18s;
}
#panel.shown .panel-inner { opacity: 1; transform: none; }

.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px;
}
.panel-title h2 {
  font-family: var(--serif); font-size: 24px; margin: 0; letter-spacing: 3px; font-weight: 600;
  color: var(--gold);
  text-shadow: 0 0 14px rgba(212,175,55,0.22);
}
.panel-pos { font-family: var(--serif); font-size: 12px; color: var(--text-3); letter-spacing: 2px; }
.panel-guide {
  font-family: var(--serif); font-size: 13px; color: var(--text-3); line-height: 1.9;
  padding: 14px 0 4px; letter-spacing: .5px;
}

/* ---------------- 通用控件 ---------------- */
.btn-main, .btn-sub, .btn-ghost {
  font-family: var(--serif); cursor: pointer; border-radius: var(--r);
  transition: all .22s; letter-spacing: 2px; font-size: 14px;
}
.btn-main {
  padding: 11px 30px; border: 1px solid var(--gold);
  background: linear-gradient(135deg, #eccb7c, #d4a63c);
  color: #141005;
  box-shadow: 0 0 16px rgba(226,186,90,0.22);
}
.btn-main:hover {
  background: linear-gradient(135deg, #f6dd9c, #e0b44e);
  box-shadow: 0 0 28px rgba(240,205,110,0.34);
  transform: translateY(-1px);
}
.btn-sub {
  padding: 10px 22px; border: 1px solid var(--line-2);
  background: rgba(22,22,30,0.72); color: var(--text-2);
}
.btn-sub:hover {
  border-color: var(--gold); color: var(--gold); background: rgba(212,175,55,0.08);
  box-shadow: 0 0 14px rgba(212,175,55,0.12);
}
.btn-ghost {
  padding: 7px 14px; border: none; background: transparent; color: var(--text-3); font-size: 13px;
}
.btn-ghost:hover { color: var(--gold); }

.input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: rgba(20, 20, 26, 0.72); color: var(--text); font-family: var(--sans); font-size: 14px;
  transition: all .2s; outline: none;
}
.input:focus {
  border-color: var(--gold); background: rgba(22,22,30,0.9);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.12);
}
.input::placeholder { color: var(--text-4); }
.input.sm { padding: 9px 12px; font-size: 13px; }
select.input { cursor: pointer; }

.row { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.row.two > * { flex: 1 1 calc(50% - 5px); }
.row.three > * { flex: 1 1 calc(33.33% - 7px); }
.row.center { justify-content: center; }

.step-card {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px;
  padding: 24px; margin-top: 16px; box-shadow: var(--shadow-s);
  backdrop-filter: blur(6px);
}
.lead { font-family: var(--serif); font-size: 16px; color: var(--text); margin: 0 0 16px; letter-spacing: 1px; }
.hint { font-size: 12px; color: var(--text-3); line-height: 1.8; margin: 10px 0 0; letter-spacing: .4px; }
.hint.center { text-align: center; }

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; margin-bottom: 16px; }
.seg button {
  padding: 8px 20px; border: none; background: transparent; cursor: pointer;
  font-family: var(--serif); font-size: 13px; color: var(--text-3); transition: all .2s; letter-spacing: 1px;
}
.seg button.on { background: var(--gold); color: #120f05; }

/* ---------------- AI 解读区 ---------------- */
.ai-out { margin-top: 20px; }
.ai-loading {
  text-align: center; color: var(--text-3); font-size: 13px; letter-spacing: 2px;
  padding: 30px 0;
}
.ai-loading::after {
  content: '…'; display: inline-block; width: 20px; animation: dots 1.4s steps(4,end) infinite;
}
@keyframes dots { 0% { content: ''; } 25% { content: '·'; } 50% { content: '··'; } 75% { content: '···'; } }

.ai-stream { white-space: pre-wrap; line-height: 1.9; color: var(--text-2); min-height: 80px; }

.ai-blocks { animation: fadeUp .4s ease-out; }
.ai-h {
  font-family: var(--serif); font-size: 15px; margin: 22px 0 10px;
  letter-spacing: 3px; color: var(--gold); font-weight: 600;
}
.ai-brief .ai-h:first-child { margin-top: 0; }
.ai-p { font-size: 14px; line-height: 1.95; color: var(--text-2); margin: 8px 0; }
.ai-quote {
  border-left: 2px solid var(--gold); padding: 10px 16px; margin: 12px 0;
  background: rgba(212,175,55,0.06); color: var(--text);
  font-family: var(--serif); font-size: 15px; line-height: 1.9; letter-spacing: 1px;
  position: relative;
}
.aq-label { display: inline-block; margin-right: 8px; padding: 1px 7px; border-radius: 4px;
  background: var(--gold); color: #120f05; font-size: 11px; }

.ai-detail { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.ai-ribbon {
  display: inline-block; padding: 3px 12px; border-radius: 20px;
  background: linear-gradient(90deg, var(--gold-2), var(--gold));
  color: #120f05; font-size: 12px; letter-spacing: 2px;
  margin-bottom: 14px; box-shadow: 0 0 12px rgba(212,175,55,0.22);
}
.ai-detail-wrap { margin-top: 18px; }

.ai-src {
  font-size: 11px; color: var(--text-4); margin-top: 18px; letter-spacing: .5px;
}

/* ---------------- 付费解锁面板 ---------------- */
.paywall {
  position: relative;
  border-radius: 18px; overflow: hidden;
  background: linear-gradient(135deg, rgba(22,22,30,0.95), rgba(18,18,24,0.98));
  border: 1px solid var(--line);
  box-shadow: 0 18px 60px rgba(0,0,0,0.6), inset 0 0 40px rgba(212,175,55,0.04);
}
.paywall::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(212,175,55,0.08) 45%, transparent 60%);
  background-size: 200% 100%;
  animation: sheen 3.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sheen {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.pw-glow {
  position: absolute; top: -60px; left: 50%; transform: translateX(-50%);
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.18), transparent 70%);
  pointer-events: none;
}
.pw-inner { position: relative; padding: 26px 22px 28px; text-align: center; }
.pw-lock { font-size: 32px; margin-bottom: 8px; filter: drop-shadow(0 0 10px rgba(212,175,55,0.3)); }
.paywall h4 { font-family: var(--serif); font-size: 18px; margin: 0 0 8px; letter-spacing: 3px; color: var(--gold); }
.pw-desc { font-size: 13px; color: var(--text-3); line-height: 1.8; margin: 0 0 16px; }

.pw-products {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px;
  margin-bottom: 16px;
}
.pw-product {
  background: rgba(20,20,26,0.85); border: 1px solid var(--line-2); border-radius: 12px;
  padding: 12px 10px; cursor: pointer; transition: all .22s;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.pw-product:hover {
  border-color: var(--gold); background: rgba(212,175,55,0.08);
  transform: translateY(-2px); box-shadow: 0 0 18px rgba(212,175,55,0.12);
}
.pw-product.busy { opacity: .6; pointer-events: none; }
.pwp-name { font-family: var(--serif); font-size: 13px; color: var(--text); letter-spacing: 1px; }
.pwp-price { font-size: 20px; color: var(--gold-2); font-weight: 600; }
.pwp-desc { font-size: 11px; color: var(--text-3); }

.pw-code-row { display: flex; gap: 8px; justify-content: center; margin-bottom: 10px; }
.pw-input {
  width: 190px; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 8px;
  background: rgba(20,20,26,0.9); color: var(--text); font-size: 13px; letter-spacing: 1px;
  text-transform: uppercase;
}
.pw-input:focus { border-color: var(--gold); outline: none; }
.pw-btn {
  padding: 9px 18px; border: 1px solid var(--gold); border-radius: 8px;
  background: rgba(212,175,55,0.12); color: var(--gold); font-size: 13px; cursor: pointer;
  transition: all .2s;
}
.pw-btn:hover { background: var(--gold); color: #120f05; }
.pw-hint { font-size: 11px; color: var(--text-4); margin: 0 0 4px; }
.pw-demo {
  display: block; font-size: 11px; color: var(--gold-2); letter-spacing: 1px;
  background: rgba(212,175,55,0.08); padding: 6px 10px; border-radius: 6px;
  word-break: break-all; margin-bottom: 8px;
}
.pw-error { color: #d68a8a; font-size: 12px; min-height: 18px; margin: 0; opacity: 0; transition: opacity .2s; }

/* ---------------- 六爻 ---------------- */
.casting { text-align: center; padding: 40px 24px; }
.cast-title { font-family: var(--serif); font-size: 15px; color: var(--text-3); letter-spacing: 3px; margin-bottom: 22px; }
.cast-yao { display: flex; flex-direction: column-reverse; gap: 8px; align-items: center; }
.cast-item {
  display: flex; align-items: center; gap: 14px; padding: 7px 18px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--line-2);
  animation: coinDrop .5s cubic-bezier(.34, 1.3, .64, 1); font-family: var(--serif);
}
.cast-item.moving { border-color: var(--gold); color: var(--gold); background: rgba(212,175,55,0.08); }
@keyframes coinDrop {
  0% { opacity: 0; transform: translateY(-26px) rotate(-14deg) scale(.7); }
  100% { opacity: 1; transform: none; }
}
.ci-idx { color: var(--text-4); font-size: 12px; }
.ci-mark { font-size: 20px; letter-spacing: 2px; }
.ci-type { font-size: 13px; }

.coin-picker { display: grid; gap: 10px; }
.coin-item { border: 1px solid var(--line-2); border-radius: var(--r); padding: 10px 14px; background: var(--surface); }
.coin-item.done { border-color: var(--gold); background: rgba(212,175,55,0.08); }
.ci-label { font-family: var(--serif); font-size: 13px; color: var(--text-2); display: block; margin-bottom: 7px; }
.ci-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.ci-btns button {
  padding: 6px 12px; font-size: 12px; border: 1px solid var(--line-2); background: var(--surface-solid);
  border-radius: 6px; cursor: pointer; font-family: var(--serif); color: var(--text-2); transition: all .18s;
}
.ci-btns button:hover { border-color: var(--gold); color: var(--gold); }
.ci-btns button.on { background: var(--gold); color: #120f05; border-color: var(--gold); }

.gua-card { margin-top: 18px; }
.gua-fig { display: flex; align-items: flex-end; justify-content: center; gap: 30px; padding: 12px 0; }
.gf-col { text-align: center; }
.gf-title { font-family: var(--serif); font-size: 12px; color: var(--text-4); letter-spacing: 2px; }
.gf-name { font-family: var(--serif); font-size: 26px; margin: 4px 0 2px; letter-spacing: 3px; color: var(--gold); }
.gf-sub { font-size: 12px; color: var(--text-3); margin-bottom: 12px; }
.gf-arrow { font-family: var(--serif); font-size: 18px; color: var(--text-4); padding-bottom: 60px; }
.gf-yao { display: flex; flex-direction: column-reverse; gap: 9px; }
.yao-row { display: flex; align-items: center; gap: 10px; justify-content: center; position: relative; }
.yao { display: inline-block; width: 92px; height: 11px; background: var(--gold); border-radius: 2px; }
.yao.yin { background: transparent; display: flex; justify-content: space-between; }
.yao.yin i { display: block; width: 40%; height: 11px; background: var(--gold); border-radius: 2px; }
.yao-row.small .yao { width: 62px; height: 8px; }
.yao-row.small .yao.yin i { height: 8px; }
.yao-tag { font-size: 11px; color: var(--text-4); width: 30px; text-align: left; }
.yao-mov { color: var(--gold-2); font-size: 17px; font-weight: 700; }
.yao-badge {
  font-size: 10px; padding: 1px 5px; border-radius: 3px; font-family: var(--serif);
}
.yao-badge.shi { background: var(--gold); color: #120f05; }
.yao-badge.ying { border: 1px solid var(--gold); color: var(--gold); }

.yao-table { margin-top: 20px; border: 1px solid var(--line-2); border-radius: 12px; padding: 16px; background: var(--surface); }
.yao-table h4 { font-family: var(--serif); margin: 0 0 12px; font-size: 15px; letter-spacing: 2px; color: var(--gold); }
.yao-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.yao-table th { font-weight: 500; color: var(--text-4); font-size: 12px; padding: 6px 4px; text-align: center; border-bottom: 1px solid var(--line-2); }
.yao-table td { padding: 8px 4px; text-align: center; border-bottom: 1px solid var(--line-2); color: var(--text-2); }
.yao-table tr.mov td { background: rgba(212,175,55,0.06); color: var(--gold-2); }
.yao-table b { color: var(--gold-2); }
.yao-table i { color: var(--text-4); font-style: normal; }
.meta { font-size: 12px; color: var(--text-4); margin: 12px 0 0; }

/* ---------------- 奇门 ---------------- */
.qm-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.qm-ju { font-family: var(--serif); font-size: 22px; letter-spacing: 3px; color: var(--gold); }
.qm-meta { font-size: 12px; color: var(--text-4); }
.qm-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; max-width: 620px;
}
.qm-cell {
  aspect-ratio: 1 / .92; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px;
  background: var(--surface); cursor: pointer; transition: all .24s;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; position: relative;
}
.qm-cell:hover { border-color: var(--gold); background: rgba(212,175,55,0.06); transform: translateY(-2px); box-shadow: 0 0 18px rgba(212,175,55,0.1); }
.qm-cell.center { cursor: default; background: rgba(212,175,55,0.08); }
.qm-cell.center:hover { transform: none; box-shadow: none; }
.qm-cell.zhifu { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold), 0 0 12px rgba(212,175,55,0.14); }
.qc-top { position: absolute; top: 8px; left: 10px; right: 10px; display: flex; justify-content: space-between; font-size: 11px; }
.qc-num { color: var(--text-4); }
.qc-god { font-family: var(--serif); }
.qc-god.good { color: #7fd4a0; }
.qc-god.bad { color: #d68a8a; }
.qc-star { font-family: var(--serif); font-size: 15px; margin-top: 10px; color: var(--text); }
.qc-door { font-family: var(--serif); font-size: 15px; }
.qc-door.good { color: #7fd4a0; }
.qc-door.bad { color: #d68a8a; }
.qc-qiyi { display: flex; gap: 8px; font-family: var(--serif); font-size: 13px; margin-top: 2px; }
.qc-qiyi .tp { color: var(--gold-2); }
.qc-qiyi .dp { color: var(--text-4); }
.qc-name { position: absolute; bottom: 7px; font-size: 10px; color: var(--text-4); letter-spacing: 1px; }
.qm-detail {
  margin-top: 16px; border: 1px solid var(--line-2); border-radius: 12px; padding: 18px;
  background: var(--surface); box-shadow: var(--shadow-s);
  animation: fadeUp .4s cubic-bezier(.22, .61, .36, 1);
}
.qm-detail h4 { font-family: var(--serif); margin: 0 0 12px; font-size: 16px; letter-spacing: 2px; color: var(--gold); }
.qm-detail p { font-size: 14px; line-height: 1.9; color: var(--text-2); margin: 6px 0; }
.qm-detail b { color: var(--text); }
.qm-detail .tag {
  display: inline-block; margin: 8px 8px 0 0; padding: 3px 10px; border-radius: 20px;
  background: rgba(212,175,55,0.1); color: var(--gold); font-size: 12px;
}
.qm-detail .tag.warn { background: rgba(214,138,138,0.1); color: #d68a8a; }

/* ---------------- 合盘 ---------------- */
.person-form { border: 1px solid var(--line-2); border-radius: 12px; padding: 16px; margin-bottom: 12px; background: var(--surface); }
.person-form h4 { font-family: var(--serif); margin: 0 0 12px; font-size: 15px; letter-spacing: 2px; color: var(--gold); }
.hp-ring { margin: 18px auto 0; max-width: 340px; }
.ring-svg { width: 100%; height: auto; }
.ring-gz { font-family: var(--serif); font-size: 15px; text-anchor: middle; dominant-baseline: middle; fill: var(--text-2); }
.ring-gz.out { fill: var(--text-3); font-size: 14px; }
.ring-score { font-family: var(--serif); font-size: 30px; text-anchor: middle; fill: var(--gold); font-weight: 600; }
.ring-level { font-family: var(--serif); font-size: 12px; text-anchor: middle; fill: var(--text-3); letter-spacing: 2px; }
.ring-legend { display: flex; justify-content: center; gap: 20px; font-size: 12px; color: var(--text-3); margin-top: 4px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.dot.in { background: var(--text-2); }
.dot.out { background: var(--text-4); }

.hp-bars, .hp-items { margin-top: 18px; }
.wx-bars h4 { font-family: var(--serif); font-size: 14px; margin: 0 0 10px; letter-spacing: 2px; color: var(--gold); }
.wx-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.wxr-name { width: 20px; font-family: var(--serif); font-size: 13px; color: var(--text-2); }
.wxr-bar { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.wxr-bar i { display: block; height: 7px; border-radius: 4px; transition: width .8s cubic-bezier(.22,.61,.36,1); }
.wxr-num { width: 74px; font-size: 11px; color: var(--text-4); text-align: right; }

.hpi { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.hpi-name { width: 92px; font-family: var(--serif); font-size: 13px; color: var(--text-2); }
.hpi-bar { flex: 1; height: 6px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.hpi-bar i { display: block; height: 100%; border-radius: 4px; transition: width 1s cubic-bezier(.22,.61,.36,1); }
.hpi-score { width: 34px; text-align: right; font-size: 13px; color: var(--text-3); }

.result-card {
  margin-top: 18px; border: 1px solid var(--line-2); border-radius: 14px; padding: 24px;
  background: var(--surface); text-align: center;
}
.hp-score { margin: 10px auto 18px; width: 130px; height: 130px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle, rgba(212,175,55,0.18), transparent 72%);
  border: 1px solid var(--line-2); box-shadow: 0 0 24px rgba(212,175,55,0.1);
}
.hps-num { font-family: var(--serif); font-size: 42px; color: var(--gold); line-height: 1; }
.hps-label { font-family: var(--serif); font-size: 13px; color: var(--text-3); letter-spacing: 2px; margin-top: 4px; }

/* ---------------- 灵签 ---------------- */
.sign-stage { text-align: center; }
.sign-tube { margin: 22px auto 6px; width: 96px; height: 150px; position: relative; }
.st-body {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 78px; height: 112px; border-radius: 8px 8px 12px 12px;
  background: linear-gradient(160deg, #b8955c, #8a6a3a);
  border: 1px solid rgba(212,175,55,0.25);
  display: grid; place-items: center; box-shadow: var(--shadow-m);
}
.st-text { font-family: var(--serif); font-size: 30px; color: rgba(18,15,5,.95); letter-spacing: 2px; }
.st-sticks {
  position: absolute; bottom: 84px; left: 50%; transform: translateX(-50%);
  width: 46px; height: 66px;
  background:
    linear-gradient(90deg, #d4af37 0 3px, transparent 3px 8px, #c8a050 8px 11px, transparent 11px 16px, #d4af37 16px 19px, transparent 19px 24px, #c8a050 24px 27px, transparent 27px 32px, #d4af37 32px 35px, transparent 35px 40px, #c8a050 40px 43px, transparent 43px 46px);
  border-radius: 3px 3px 0 0;
}
.sign-tube.shaking { animation: shake .42s ease-in-out infinite; }
@keyframes shake {
  0%, 100% { transform: rotate(-7deg); }
  50% { transform: rotate(7deg); }
}

.sign-card {
  margin-top: 20px; border: 1px solid var(--line-2); border-radius: 14px; padding: 26px;
  background: var(--surface); box-shadow: var(--shadow-m);
  opacity: 0; transform: translateY(-40px) scale(.9);
  transition: all .8s cubic-bezier(.34, 1.2, .64, 1);
}
.sign-card.drop { opacity: 1; transform: none; }
.sc-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.sc-id { font-family: var(--serif); font-size: 15px; color: var(--text-3); }
.sc-level { font-family: var(--serif); font-size: 15px; padding: 2px 12px; border-radius: 20px; }
.sign-card.shangshang .sc-level { background: rgba(212,175,55,0.14); color: var(--gold-2); }
.sign-card.shangji .sc-level { background: rgba(212,175,55,0.12); color: var(--gold); }
.sign-card.zhongji .sc-level { background: rgba(127,212,160,0.12); color: #7fd4a0; }
.sign-card.zhongping .sc-level { background: rgba(255,255,255,0.05); color: var(--text-3); }
.sign-card.xiaxia .sc-level { background: rgba(214,138,138,0.12); color: #d68a8a; }
.sc-title { font-family: var(--serif); font-size: 22px; letter-spacing: 3px; color: var(--gold); }

.sc-verse {
  margin: 20px 0; padding: 18px 0; text-align: center;
  border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
  font-family: var(--serif); font-size: 19px; line-height: 2.2; letter-spacing: 4px; color: var(--text);
}
.sc-jie { display: flex; gap: 12px; margin-bottom: 18px; }
.sc-jie .label {
  flex: 0 0 auto; font-family: var(--serif); font-size: 12px; color: #120f05;
  background: var(--gold); padding: 2px 8px; border-radius: 4px; height: fit-content; letter-spacing: 1px;
}
.sc-jie p { margin: 0; font-size: 14px; line-height: 1.95; color: var(--text-2); }
.sc-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.sci { display: flex; gap: 8px; font-size: 13px; padding: 7px 12px; background: rgba(20,20,26,0.5); border-radius: 8px; border: 1px solid var(--line-2); }
.sci-k { font-family: var(--serif); color: var(--text-3); flex: 0 0 auto; }
.sci-v { color: var(--text-2); }

/* ---------------- 起名 ---------------- */
.chart-mini {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; font-size: 12px; color: var(--text-3);
}
.chart-mini span { padding: 4px 10px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px; }

.wx-pie { display: flex; align-items: center; gap: 22px; margin-top: 18px; flex-wrap: wrap; }
.wx-pie svg { width: 168px; height: 168px; flex: 0 0 auto; }
.pie-day { font-family: var(--serif); font-size: 26px; fill: var(--gold); }
.pie-wx { font-family: var(--serif); font-size: 11px; fill: var(--text-3); }
.pie-legend { display: grid; grid-template-columns: repeat(2, auto); gap: 6px 16px; font-size: 12px; color: var(--text-3); }
.pie-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; }

.name-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 10px; margin-top: 20px; }
.name-item {
  border: 1px solid var(--line-2); border-radius: 12px; padding: 14px; background: var(--surface);
  cursor: pointer; transition: all .26s; animation: namePop .5s backwards cubic-bezier(.34,1.3,.64,1);
}
.name-item:hover { border-color: var(--gold); background: rgba(212,175,55,0.06); transform: translateY(-3px); box-shadow: 0 0 18px rgba(212,175,55,0.1); }
@keyframes namePop { 0% { opacity: 0; transform: scale(.6) translateY(16px); } 100% { opacity: 1; transform: none; } }
.ni-name { font-family: var(--serif); font-size: 21px; letter-spacing: 3px; margin-bottom: 8px; color: var(--text); }
.ni-score { position: relative; height: 5px; background: var(--line-2); border-radius: 4px; overflow: hidden; margin-bottom: 9px; }
.ni-score i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); border-radius: 4px; transition: width .9s; }
.ni-score b { position: absolute; right: 0; top: -18px; font-size: 12px; color: var(--text-3); font-weight: 400; }
.ni-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 7px; }
.ni-tags span { font-size: 11px; padding: 1px 7px; background: var(--surface-solid); border-radius: 4px; color: var(--text-3); }
.ni-high { font-size: 11px; color: var(--gold); }

.name-detail {
  margin-top: 20px; border: 1px solid var(--line-2); border-radius: 14px; padding: 22px;
  background: var(--surface); box-shadow: var(--shadow-s); animation: fadeUp .4s;
}
.name-detail h3 { font-family: var(--serif); font-size: 26px; margin: 0 0 12px; letter-spacing: 4px; color: var(--gold); }
.name-detail h3 small { font-size: 12px; color: var(--text-3); margin-left: 12px; letter-spacing: 1px; }
.nd-src { font-family: var(--serif); font-size: 14px; color: var(--text-2); background: rgba(20,20,26,0.7); padding: 12px 16px; border-radius: 8px; line-height: 1.9; }

/* ---------------- 万年历 ---------------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.cal-title { font-family: var(--serif); font-size: 20px; letter-spacing: 3px; color: var(--gold); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 14px; }
.cal-grid > div { text-align: center; font-size: 12px; color: var(--text-3); padding: 6px 0; }
.cal-grid button {
  aspect-ratio: 1; border: 1px solid transparent; border-radius: 50%; background: transparent;
  color: var(--text-2); font-size: 14px; cursor: pointer; transition: all .18s;
  display: grid; place-items: center; padding: 0;
}
.cal-grid button:hover { background: rgba(212,175,55,0.08); border-color: var(--line); }
.cal-grid button.today { background: var(--gold); color: #120f05; font-weight: 600; }
.cal-grid button.selected { border-color: var(--gold); background: rgba(212,175,55,0.1); }
.cal-grid button.term { color: var(--gold-2); font-size: 11px; }
.cal-detail { margin-top: 18px; border: 1px solid var(--line-2); border-radius: 14px; padding: 20px; background: var(--surface); }
.cal-detail h4 { font-family: var(--serif); font-size: 16px; margin: 0 0 10px; letter-spacing: 2px; color: var(--gold); }
.cal-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; font-size: 13px; color: var(--text-2); }
.cal-meta b { color: var(--gold); font-weight: 400; }
.cdt-row { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.cdt-row:last-child { border-bottom: none; }
.cdt-row span { color: var(--text-3); }
.cdt-row b { color: var(--text); font-weight: 500; }
.cdt-query { margin-top: 14px; }
.cdt-query select { width: auto; }

/* ---------------- 弹窗 / Toast / 历史 ---------------- */
#modal {
  position: fixed; inset: 0; z-index: 100; display: none; place-items: center;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
}
#modal.open { display: grid; }
.modal-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 26px; max-width: 520px; width: 90%; max-height: 80vh; overflow-y: auto;
  box-shadow: var(--shadow-l); animation: popIn .35s cubic-bezier(.34,1.3,.64,1);
}
.modal-card h3 { font-family: var(--serif); font-size: 20px; margin: 0 0 16px; letter-spacing: 3px; color: var(--gold); }
.modal-card input {
  width: 100%; padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: rgba(20,20,26,0.9); color: var(--text); font-size: 13px;
}
.modal-card input:focus { border-color: var(--gold); outline: none; }
.modal-card code {
  background: rgba(212,175,55,0.1); color: var(--gold-2);
  padding: 1px 6px; border-radius: 4px; font-size: 12px;
}
.modal-card .seg { margin-top: 10px; }
.sw { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.sw input { width: 16px; height: 16px; accent-color: var(--gold); cursor: pointer; }
@keyframes popIn { 0% { opacity: 0; transform: scale(.92) translateY(10px); } 100% { opacity: 1; transform: none; } }

/* ---------------- 登录弹窗（i18n） ---------------- */
.login-card h3 { letter-spacing: 2px; }
.lg-code-row { display: flex; gap: 8px; align-items: center; }
.lg-code-row input { flex: 1; margin-bottom: 10px; }
.lg-code-row .btn-sub { flex: 0 0 auto; white-space: nowrap; padding: 9px 14px; }
.lg-err { color: #d68a8a; font-size: 12px; min-height: 16px; margin: 0 0 6px; }
#btn-login { transition: all .2s; }

/* ---------------- 语言选择菜单（i18n） ---------------- */
.lang-card { max-width: 360px; }
.lang-opt {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  width: 100%; padding: 12px 14px; margin-bottom: 8px;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: rgba(20,20,26,0.65); color: var(--text-2); cursor: pointer;
  font-family: var(--serif); font-size: 14px; transition: all .2s;
}
.lang-opt:hover { border-color: var(--gold); color: var(--gold); }
.lang-opt.on { border-color: var(--gold); background: rgba(212,175,55,0.12); color: var(--gold); }
.lo-native { font-size: 16px; }
.lo-name { font-size: 12px; color: var(--text-4); }

#toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: rgba(22,22,30,0.92); color: var(--gold-2); padding: 10px 22px; border-radius: 30px;
  border: 1px solid var(--line); font-size: 13px; letter-spacing: 1px;
  opacity: 0; pointer-events: none; transition: all .3s; z-index: 200;
  backdrop-filter: blur(6px);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.hist-list { max-height: 300px; overflow-y: auto; margin-bottom: 16px; }
.hist-item { display: flex; gap: 10px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.hi-mod { font-family: var(--serif); color: var(--gold); min-width: 52px; }
.hi-title { flex: 1; color: var(--text-2); }
.hi-time { color: var(--text-4); white-space: nowrap; }

/* ---------------- 底部命令栏（第二屏：卦象总览） ----------------
 * 默认隐藏在屏幕下方，点八卦阵或「进入卦象总览」滑出。 */
.cmdbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  padding: 16px 18px max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(10,10,13,0.97), rgba(10,10,13,0.85));
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line-2);
  transform: translateY(110%);
  transition: transform .45s cubic-bezier(.22, .61, .36, 1);
}
.cmdbar.shown { transform: translateY(0); }

/* 卦象总览：模块卡片网格 */
.dock {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  max-width: 860px; margin: 0 auto 14px;
}
.dock-card {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 12px 6px; border-radius: 12px; border: 1px solid var(--line-2);
  background: rgba(20,20,26,0.65); color: var(--text-3); cursor: pointer;
  font-family: var(--serif); transition: all .2s;
}
.dock-card:hover { border-color: var(--gold); background: rgba(212,175,55,0.08); transform: translateY(-2px); }
.dc-gua { font-size: 20px; color: var(--gold); text-shadow: 0 0 12px rgba(212,175,55,.4); line-height: 1.2; }
.dc-label { font-size: 12px; color: var(--text-4); letter-spacing: 1px; }
.dc-name { font-size: 13px; color: var(--text-2); letter-spacing: 2px; }
.dc-sub { font-size: 11px; color: var(--text-4); }
.cmd-wrap { display: flex; gap: 8px; max-width: 720px; margin: 0 auto; }
#cmd-input {
  flex: 1; padding: 11px 16px; border-radius: 24px; border: 1px solid var(--line-2);
  background: rgba(20,20,26,0.72); color: var(--text); font-size: 14px; outline: none;
}
#cmd-input:focus { border-color: var(--gold); box-shadow: 0 0 12px rgba(212,175,55,0.1); }
#btn-cmd {
  padding: 11px 22px; border-radius: 24px; border: 1px solid var(--gold);
  background: linear-gradient(135deg, rgba(212,175,55,0.9), rgba(180,140,40,0.9));
  color: #120f05; font-family: var(--serif); font-size: 14px; letter-spacing: 2px; cursor: pointer;
  transition: all .2s;
}
#btn-cmd:hover { box-shadow: 0 0 20px rgba(212,175,55,0.25); transform: translateY(-1px); }

/* ---------------- 财运卦 ---------------- */
.kv { display: flex; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.kv .k { flex: 0 0 72px; color: var(--text-4); font-family: var(--serif); }
.kv .v { flex: 1; color: var(--text-2); line-height: 1.7; }

/* ---------------- 幸运号码 ---------------- */
.lk-group { margin: 12px 0 6px; }
.lk-name {
  display: inline-block; font-size: 12px; color: #120f05; background: var(--gold);
  border-radius: 4px; padding: 2px 10px; margin-bottom: 8px; font-family: var(--serif);
}
.lk-balls { display: flex; flex-wrap: wrap; gap: 8px; }
.lk-ball {
  width: 34px; height: 34px; line-height: 34px; text-align: center; border-radius: 50%;
  font-size: 15px; font-weight: 600; color: #f5f2e8;
  background: linear-gradient(145deg, rgba(212,175,55,0.22), rgba(212,175,55,0.08));
  border: 1px solid rgba(212,175,55,0.45); font-family: var(--serif); font-style: normal;
}
select.input { appearance: auto; }

/* ---------------- 动画 ---------------- */
@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: none; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 640px) {
  .brand .sub { display: none; }
  .topbar { padding: 14px 16px 6px; }
  .panel-inner { padding: 22px 16px 100px; }
  .panel-head { flex-wrap: wrap; }
  .qm-grid { gap: 6px; }
  .name-list { grid-template-columns: 1fr 1fr; }
  .cal-grid { gap: 3px; }
  .cal-grid button { font-size: 12px; }
  .dock { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .dock-card { padding: 10px 4px; }
  .dc-name { font-size: 12px; }
  .dc-sub { display: none; }
}

/* ---------------- 充值中心弹窗（H5） ---------------- */
.recharge-card h3 { letter-spacing: 2px; }
.plan-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.plan-opt {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: rgba(20,20,26,0.65); color: var(--text-2); cursor: pointer;
  font-family: var(--serif); font-size: 14px; transition: all .2s;
}
.plan-opt:hover { border-color: var(--gold); background: rgba(212,175,55,0.08); }
.po-name { flex: 0 0 auto; font-weight: 500; color: var(--text); }
.po-desc { flex: 1; font-size: 12px; color: var(--text-4); text-align: left; }
.po-price { font-size: 16px; color: var(--gold); font-weight: 500; }

/* ==========================================================================
 * 批九 · H5 补齐四模块面板样式（八字 / 紫微 / 大六壬 / 每日一卦）
 * ========================================================================== */
.sec-t { font-size: 13px; color: var(--gold); font-family: var(--serif); letter-spacing: 1px; margin: 10px 0 6px; }

/* 八字：四柱表 */
.bz-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; font-family: var(--serif); }
.bz-table th, .bz-table td { padding: 7px 4px; text-align: center; border: 1px solid var(--line-2); font-size: 13px; }
.bz-table th { color: var(--text-4); font-weight: 400; background: rgba(212,175,55,0.06); }
.bz-table td { color: var(--text-2); }
.bz-table td.bz-gan { color: var(--gold); font-size: 15px; font-weight: 500; }
.bz-table td.bz-zhi { font-size: 15px; }
.bz-table td.bz-shen { font-size: 12px; color: var(--text-4); }
.bz-table td.bz-cang { font-size: 11px; color: var(--text-4); }
.bz-wx { display: flex; flex-direction: column; gap: 5px; margin: 10px 0; }
.bz-wx-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); }
.bz-wx-item span { flex: 0 0 22px; }
.bz-wx-item i { height: 6px; background: linear-gradient(90deg, var(--gold), #e8b64c); border-radius: 3px; transition: width .6s; }
.bz-wx-item b { flex: 0 0 44px; text-align: right; font-weight: 400; }
.bz-dayun, .bz-ss, .lr-sec, .zw-list { margin: 8px 0; }
.dy-item, .ss-item { display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  margin: 4px 4px 0 0; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 10px; font-size: 12px; }
.dy-item b, .ss-item b { color: var(--gold); font-family: var(--serif); }
.dy-item small, .ss-item small { color: var(--text-4); }

/* 紫微：十二宫 */
.zw-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px;
  border: 1px solid var(--line-2); border-radius: 10px; margin-bottom: 6px; font-size: 13px; }
.zw-top { flex: 0 0 64px; display: flex; gap: 6px; font-family: var(--serif); }
.zw-top b { color: var(--text-2); }
.zw-top span { color: var(--text-4); }
.zw-stars { flex: 1; color: var(--gold); }

/* 大六壬：三传 / 四课 / 天将 */
.lr-3c { display: flex; gap: 10px; }
.lr-c { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 10px 4px;
  border: 1px solid var(--line-2); border-radius: 12px; font-family: var(--serif); }
.lr-c b { color: var(--gold); font-size: 18px; }
.lr-c span { color: var(--text-3); font-size: 13px; }
.lr-ke { display: flex; align-items: center; gap: 6px; padding: 5px 0; font-size: 13px; font-family: var(--serif); }
.lr-ke span { color: var(--text-4); flex: 0 0 44px; font-size: 12px; }
.lr-ke b { color: var(--text-2); }
.lr-ke i { color: var(--text-4); font-style: normal; font-size: 11px; }
.lr-tj { margin-top: 4px; }

/* 每日一卦 */
.gua-trigram { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.gt-label { font-size: 12px; color: var(--text-4); }
.gt-val { font-family: var(--serif); font-size: 26px; color: var(--gold); }
.daily-box .kv .k { flex-basis: 64px; }

/* ===== 文字飘落层（结果前奏，2026-09-05） ===== */
.rain-layer {
  position: fixed; left: 0; top: 0; right: 0; bottom: 0;
  z-index: 1200;
  background: radial-gradient(ellipse at 50% 30%, rgba(10,10,13,0.86), rgba(10,10,13,0.98));
  backdrop-filter: blur(2px);
  transition: opacity 0.32s ease;
  cursor: pointer;
}
.rain-canvas { display: block; width: 100%; height: 100%; }
.rain-hint {
  position: absolute; bottom: 8vh; left: 0; right: 0;
  text-align: center;
  color: rgba(245,242,232,0.4);
  font-size: 13px;
  letter-spacing: 4px;
  animation: rainHintPulse 1.6s ease-in-out infinite;
}
@keyframes rainHintPulse { 0%,100% { opacity: .35; } 50% { opacity: .9; } }

/* ===== 风水罗盘（2026-09-05） ===== */
.lp-layer {
  position: fixed; inset: 0; z-index: 1100;
  background: radial-gradient(ellipse at 50% 40%, #12121a, #0a0a0d 75%);
  display: flex; flex-direction: column; align-items: center;
  padding: max(12px, env(safe-area-inset-top)) 12px 20px;
  overflow-y: auto;                       /* 手机：纵向滚动，杜绝重叠 */
  -webkit-overflow-scrolling: touch;
}
.lp-locate-state { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.lp-head {
  width: 100%; max-width: 640px;
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 4px 10px;
}
.lp-title { color: var(--gold-3); font-size: 17px; letter-spacing: 2px; font-family: var(--serif); }
.lp-close {
  background: none; border: 1px solid var(--line); color: var(--text-3);
  font-size: 13px; padding: 6px 14px; border-radius: 20px; cursor: pointer;
}
.lp-close:hover { color: var(--text); border-color: var(--gold-mid); }
.lp-stage {
  position: relative; width: min(92vw, 560px); height: min(92vw, 560px);
  touch-action: none; user-select: none;
}
.lp-disk { display: block; border-radius: 50%; cursor: grab;
  box-shadow: 0 0 40px rgba(212,175,55,0.10), inset 0 0 30px rgba(0,0,0,0.5);
  transition: transform 0.05s linear; }
.lp-disk:active { cursor: grabbing; }
.lp-fixed { position: absolute; inset: 0; pointer-events: none; }
.lp-north {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  color: #e0533d; font-size: 18px; letter-spacing: 1px; z-index: 3;
  text-shadow: 0 0 8px rgba(224,83,61,0.6);
}
.lp-cross { position: absolute; inset: 0; opacity: 0.55;
  background:
    linear-gradient(#0000 0, #0000 calc(50% - 0.5px), rgba(238,203,126,0.5) 50%, #0000 calc(50% + 0.5px), #0000 100%),
    linear-gradient(90deg, #0000 0, #0000 calc(50% - 0.5px), rgba(238,203,126,0.5) 50%, #0000 calc(50% + 0.5px), #0000 100%); }
.lp-pool {
  position: absolute; left: 50%; top: 50%; width: 7%; height: 7%;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: #f3ead1; border: 2px solid #c8a552;
}
.lp-needle {
  position: absolute; left: 50%; top: 6%; width: 2px; height: 88%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #d9483a 0 50%, #2b2b35 50% 100%);
}
.lp-readout {
  margin-top: 16px; text-align: center;
  background: rgba(20,20,30,0.8); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 26px;
}
.lp-readout .big { color: var(--gold-3); font-size: 20px; letter-spacing: 3px; }
.lp-readout .sub { color: var(--text-3); font-size: 12px; margin-top: 4px; letter-spacing: 1px; }
.lp-tip { margin-top: 10px; color: var(--text-4); font-size: 11px; letter-spacing: 1px; }
.btn-lp {
  margin-top: 14px;
  border: 1px solid var(--gold-mid); background: rgba(212,175,55,0.06);
  color: var(--gold-2); padding: 10px 30px; border-radius: 22px;
  font-size: 15px; letter-spacing: 2px; cursor: pointer;
  transition: all .2s;
}
.btn-lp:hover { background: rgba(212,175,55,0.16); color: var(--gold-3); }

/* ===== 罗盘解读层（2026-09-05） ===== */
.lp-reading {
  width: min(92vw, 560px); margin-top: 12px; text-align: left;
  background: rgba(20,20,30,0.82); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 16px;
  flex: 0 0 auto;
}
@media (max-width: 560px) {
  .lp-r-head { font-size: 16px; }
  .lp-r-brief { font-size: 14.5px; line-height: 1.8; }
  .lp-r-detail { font-size: 14px; line-height: 1.9; }
  .lp-dir { font-size: 27px !important; }
  .lp-reading { padding: 14px 18px; }
  .lp-tip { font-size: 12px; }
}
.lp-r-head { color: var(--gold-3); font-size: 15px; font-weight: 600; letter-spacing: .5px; line-height: 1.5; }
.lp-r-head .lp-r-ico { margin-right: 4px; }
.lp-r-brief { color: var(--text-2); font-size: 13px; line-height: 1.7; margin-top: 6px; }
.lp-r-more {
  margin-top: 8px; background: none; border: 1px solid var(--line);
  color: var(--gold-2); font-size: 12px; padding: 4px 14px; border-radius: 14px; cursor: pointer;
}
.lp-r-more:hover { background: rgba(212,175,55,0.10); }
.lp-r-detail {
  display: none; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line-2);
  color: var(--text-2); font-size: 13px; line-height: 1.85; max-height: 220px; overflow: auto;
}
.lp-r-detail.open { display: block; }

/* ===== 三清观背景（2026-09-05 v2：真实图版，SVG 剪影被真实图替换） ===== */
.bg-scene {
  position: fixed; left: 0; top: 0; right: 0; bottom: 0;
  z-index: 0; pointer-events: none; overflow: hidden;
  background:
    url('../img/bg/temple-hd.jpg') center 78% / cover no-repeat;
  opacity: 0.96;
  filter: brightness(0.98) contrast(1.02) saturate(1.04);
  transform: scale(1.05);           /* 视差预留：平移不露边 */
  will-change: transform;
}
.bg-scene.ink { background-image: url('../img/bg/temple-ink.jpg'); }
.bg-scene svg { display: none; }

/* 顶部天光 / 月华：为八卦阵与标题营造主光源 */
.bg-scene::before {
  content: ''; position: absolute; left: 0; right: 0; top: -8vh; height: 58vh;
  background:
    radial-gradient(ellipse at 50% 8%, rgba(240,214,140,0.16) 0%, rgba(232,200,122,0.05) 42%, rgba(10,10,13,0) 72%);
  pointer-events: none;
}

/* 渐变压暗：顶部与四周深，保留建筑区细节，保证 UI 可读 */
.bg-scene::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(10,10,13,0.55) 0%, rgba(10,10,13,0.22) 46%, rgba(10,10,13,0.85) 100%),
    linear-gradient(180deg, rgba(10,10,13,0.72) 0%, rgba(10,10,13,0) 26%, rgba(10,10,13,0.35) 74%, #0a0a0d 100%);
}
/* 两屏内容置于背景之上 */
#stage, #cmdbar { position: relative; z-index: 1; }
/* 展开面板/弹层高于背景 */
#panel, #modal { position: relative; z-index: 20; }
@media (prefers-reduced-motion: no-preference) {
  .bg-scene { animation: bgBreath 16s ease-in-out infinite; }
  @keyframes bgBreath {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; }
  }
}

/* ===== 罗盘缩放（2026-09-05 49 层阅读用） ===== */
.lp-view {
  width: min(96vw, 620px);
  max-height: 66vh;                        /* 桌面限高滚动；手机由整页滚动接管 */
  overflow: auto;
  border-radius: 50%;
  flex: 0 0 auto;
}
.lp-stage { transition: transform .25s ease; transform-origin: center center; }
.lp-zoom {
  display: inline-flex; gap: 6px; margin-left: 8px;
}
.lp-zoom button {
  background: rgba(212,175,55,0.08); color: var(--gold-2);
  border: 1px solid var(--line); border-radius: 6px;
  min-width: 26px; height: 26px; font-size: 13px; cursor: pointer; line-height: 1;
}
.lp-zoom button:hover { background: rgba(212,175,55,0.18); }
.lp-stage.zoomed { box-shadow: none; }

/* ===== 罗盘 3D/定位升级（2026-09-05） ===== */
.lp-locate {
  background: linear-gradient(135deg, rgba(238,203,126,0.22), rgba(212,175,55,0.10));
  border: 1px solid var(--gold-mid); color: var(--gold-3);
  font-size: 12px; padding: 5px 12px; border-radius: 14px; cursor: pointer; margin-right: 6px;
  white-space: nowrap;
}
.lp-locate:hover { background: rgba(212,175,55,0.22); }
.lp-locate.on { color: #ffd98a; box-shadow: 0 0 10px rgba(238,203,126,0.35); }
.lp-quick {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  width: min(92vw, 560px); margin-top: 8px;
}
.lp-quick button {
  background: rgba(212,175,55,0.07); color: var(--text-2);
  border: 1px solid var(--line); font-size: 11px;
  padding: 3px 0; width: 60px; border-radius: 12px; cursor: pointer;
}
.lp-quick button:hover { color: var(--gold-2); border-color: var(--gold-mid); background: rgba(212,175,55,0.14); }
.lp-readout .lp-dir {
  color: #f7dfa0; font-size: 24px; letter-spacing: 4px; font-weight: 600;
  text-shadow: 0 0 14px rgba(238,203,126,0.35); margin-bottom: 4px;
}
.lp-readout .big { font-size: 15px; letter-spacing: 2px; }
.lp-view { position: relative; }
/* 盘体 3D 外壳 */
.lp-stage {
  border-radius: 50%;
  transform-origin: center;
}
.lp-disk {
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.55));
}

/* ==========================================================================
 * 墨道赛博（2026-09-05 重构）
 * 哲学：道法自然 / 知白守黑 / 虚实相生 / 动为阳静为阴
 * 色彩：墨黑 #070612 为底 · 暗紫 · 古铜金 · 朱砂微点缀 · 拒绝高饱和
 * ========================================================================== */
body[data-vm] {
  background: #070612;
  font-family: "Songti SC", "STSong", "Noto Serif SC", "Microsoft YaHei", serif;
}
.vm-bg {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(138,123,184,0.10), transparent 46%),
    radial-gradient(ellipse at 82% 96%, rgba(212,175,55,0.05), transparent 38%),
    radial-gradient(ellipse at 8% 88%, rgba(138,123,184,0.05), transparent 30%),
    #070612;
}
/* 噪点颗粒 */
.vm-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(240,238,230,0.05) 1px, transparent 1.4px);
  background-size: 5px 5px;
  opacity: 0.35;
}

/* ---------- 卦符缓落 ---------- */
#gua-rain { position: fixed; inset: 0; z-index: -2; pointer-events: none; }

/* ---------- 入口层（3D 太极） ---------- */
.vm-splash {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(17,14,30,0.5), rgba(7,6,18,0.94) 62%, #070612 100%),
    #070612;                                   /* 实底：不透出下层任何内容 */
  transition: opacity .7s ease, filter .7s ease;
}
.vm-splash:not(.fade) { filter: none; }
.vm-splash.fade { opacity: 0; filter: blur(14px); pointer-events: none; }
.vm-splash-inner { text-align: center; width: 100%; padding-bottom: 4vh; }
.vm-3d-wrap { width: min(74vw, 340px); height: min(58vh, 360px); margin: 0 auto; cursor: pointer; }
.vm-logo {
  margin: 2vh 0 0.4vh; font-weight: 400; letter-spacing: 14px; font-size: clamp(26px, 6vw, 40px);
  color: #e9e4d4; text-indent: 14px;
  text-shadow: 0 0 24px rgba(212,175,55,0.18);
}
.vm-sub { color: rgba(224,216,196,0.45); font-size: 13px; letter-spacing: 6px; }
.vm-enter {
  margin-top: 18px; color: rgba(212,175,55,0.72); font-size: 12px; letter-spacing: 5px;
  animation: vmBreathe 3.2s ease-in-out infinite;
}
@keyframes vmBreathe { 0%,100%{opacity:.5} 50%{opacity:1} }

/* ---------- 主页 ---------- */
.vm-home {
  min-height: 100vh; padding: 20px 18px 40px;
  opacity: 0; transform: translateY(8px);
  transition: opacity .8s ease .1s, transform .8s ease .1s;
}
.vm-home.in { opacity: 1; transform: none; }
.vm-head {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 760px; margin: 0 auto 26px; padding-bottom: 14px;
  border-bottom: 1px solid rgba(212,175,55,0.12);
}
.vm-brand { letter-spacing: 8px; font-size: 17px; color: rgba(233,228,212,0.9); }
.vm-tools { display: flex; gap: 8px; }
/* 墨道工具钮：细字胶囊，去 emoji */
.vm-tool {
  width: 32px; height: 32px; line-height: 1;
  background: transparent; border: 1px solid rgba(212,175,55,0.16);
  color: rgba(224,216,194,0.62);
  font-family: "Songti SC","STSong",serif; font-size: 13px; letter-spacing: 1px;
  border-radius: 9px; cursor: pointer;
  transition: color .3s ease, border-color .3s ease, background .3s ease, transform .3s ease;
}
.vm-tool:hover { color: #e8c87a; border-color: rgba(212,175,55,0.42); background: rgba(212,175,55,0.05); }
.vm-brand { cursor: pointer; }
.vm-brand:hover { color: #e8c87a; }

/* ---------- 玻璃卡片网格 ---------- */
.vm-grid {
  max-width: 760px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 14px;
}
.vm-card {
  position: relative; text-align: left; cursor: pointer;
  padding: 18px 16px 14px; border-radius: 16px;
  background: linear-gradient(150deg, rgba(255,255,255,0.055), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.28);
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
  overflow: hidden;
}
.vm-card::before {               /* 柔和炁光晕（近处渐亮） */
  content: ''; position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(ellipse at 30% 0%, rgba(212,175,55,0.10), transparent 62%);
  transition: opacity .5s ease;
}
.vm-card:hover::before, .vm-card:active::before { opacity: 1; }
.vm-card:hover { transform: translateY(-3px); border-color: rgba(212,175,55,0.34); box-shadow: 0 14px 30px rgba(0,0,0,0.4); }
.vc-gua { font-size: 26px; line-height: 1; color: rgba(212,175,55,0.85); }
.vc-name { display: block; margin-top: 10px; font-size: 15px; letter-spacing: 2px; color: #ede8da; }
.vc-sub  { display: block; margin-top: 5px; font-size: 11px; color: rgba(220,213,195,0.45); letter-spacing: 1px; }

.vm-note { text-align: center; margin-top: 40px; font-size: 11px; letter-spacing: 2px; color: rgba(220,213,195,0.28); }

/* ---------- 深度解读付费墙 ---------- */
.ai-detail .deep-lock { text-align: center; padding: 10px 6px 16px; }
.dl-preview { color: rgba(220,213,195,0.55); font-size: 13px; line-height: 1.9; margin-bottom: 16px; }
.dl-btn {
  border: 1px solid rgba(212,175,55,0.5); color: #0a0812;
  background: linear-gradient(135deg, #d9b866, #b9933e);
  padding: 11px 30px; border-radius: 26px; font-size: 15px; letter-spacing: 1px; cursor: pointer;
  box-shadow: 0 4px 18px rgba(212,175,55,0.22);
}
.dl-btn:hover { background: linear-gradient(135deg, #eccb7e, #c9a454); }
.dl-hint { color: rgba(220,213,195,0.32); font-size: 11px; margin-top: 10px; letter-spacing: 1px; }
/* ==========================================================================
 * 公网分享引导层（2026-09-05 Phase 1）
 * 深空黑+鎏金延续：首访 CTA / 示例引导卡 / 使用指南弹层 / 页脚隐私说明
 * ========================================================================== */
.vm-guide { width: auto; padding: 0 9px; font-size: 12px; letter-spacing: 1px; }
.vm-foot { max-width: 760px; margin: 0 auto; }
.vm-privacy {
  text-align: center; margin: 8px auto 0; max-width: 760px;
  font-size: 11px; letter-spacing: 1px; color: rgba(220,213,195,0.20);
}

/* ---------- 首访 CTA ---------- */
.vm-hero {
  max-width: 760px; margin: 0 auto 22px; text-align: center;
  padding: 30px 16px 26px;
  border: 1px solid rgba(212,175,55,0.14); border-radius: 20px;
  background:
    radial-gradient(ellipse at 50% -40%, rgba(212,175,55,0.16), transparent 60%),
    linear-gradient(160deg, rgba(255,255,255,0.045), rgba(255,255,255,0.01));
  backdrop-filter: blur(10px);
}
.vm-cta {
  border: 1px solid rgba(212,175,55,0.62); color: #0a0812;
  background: linear-gradient(135deg, #d9b866, #b9933e);
  padding: 13px 38px; border-radius: 30px;
  font-family: "Songti SC","STSong",serif; font-size: 17px; letter-spacing: 3px; cursor: pointer;
  box-shadow: 0 6px 24px rgba(212,175,55,0.26);
  transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
}
.vm-cta:hover { transform: translateY(-2px); background: linear-gradient(135deg, #eccb7e, #c9a454); box-shadow: 0 10px 30px rgba(212,175,55,0.34); }
.vm-cta-sub { margin: 14px 0 0; font-size: 12px; letter-spacing: 2px; color: rgba(224,216,196,0.5); }

/* ---------- 首访示例引导卡 ---------- */
.vm-quick { max-width: 760px; margin: 0 auto 22px; }
.vm-quick-title {
  text-align: center; margin: 0 0 12px; font-size: 13px; letter-spacing: 4px;
  color: rgba(212,175,55,0.75); text-indent: 4px;
}
.vm-quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px; }
.vm-quick-card {
  display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  padding: 13px 14px; border-radius: 14px;
  background: linear-gradient(150deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.07);
  color: #ede8da; font-family: "Songti SC","STSong",serif;
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.vm-quick-card:hover, .vm-quick-card:active {
  transform: translateY(-2px); border-color: rgba(212,175,55,0.36);
  box-shadow: 0 10px 22px rgba(0,0,0,0.32);
}
.vq-gua { font-size: 20px; line-height: 1; color: rgba(212,175,55,0.85); }
.vq-name { font-size: 14px; letter-spacing: 2px; }

/* ---------- 使用指南弹层 ---------- */
.guide-card { max-width: 460px; }
.guide-steps { list-style: none; margin: 0; padding: 0; }
.guide-steps li {
  display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px;
  font-size: 14px; line-height: 1.7; color: var(--text-2);
}
.guide-steps b {
  flex: 0 0 auto; width: 22px; height: 22px; line-height: 22px; text-align: center;
  border-radius: 50%; border: 1px solid rgba(212,175,55,0.5);
  color: var(--gold); font-weight: 400; font-family: var(--serif); font-size: 13px;
  background: rgba(212,175,55,0.07);
}
.guide-trust {
  margin: 14px 0 8px; padding: 8px 12px; text-align: center;
  border: 1px dashed rgba(212,175,55,0.35); border-radius: 10px;
  color: rgba(212,175,55,0.8); font-size: 12px; letter-spacing: 1px;
}
.guide-disc {
  margin: 10px 0 4px; font-size: 11px; line-height: 1.7;
  color: var(--text-4); border-top: 1px solid var(--line-2); padding-top: 10px;
}
