/* ============================================================
   玄门密钥 · 暗色玄学风设计系统
   底色玄黑 · 朱砂为骨 · 金色为缀 · 五行色各司其位
   ============================================================ */
:root {
  --bg-0: #0a0b10;
  --bg-1: #10121a;
  --bg-2: #171a24;
  --bg-3: #1e2230;
  --line: rgba(232, 226, 214, 0.12);
  --line-strong: rgba(232, 226, 214, 0.22);
  --ink: #e8e2d6;
  --ink-dim: #9a9387;
  --ink-faint: #6a645a;
  --zhu: #d64a3a;
  --zhu-deep: #b5462f;
  --gold: #b08d3f;
  --gold-light: #d4b26a;
  --wood: #3f9e6e;
  --fire: #d64a3a;
  --earth: #b08d3f;
  --metal: #9aa08e;
  --water: #3b6f9e;
  --font-song: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --font-sans: "PingFang SC", "Noto Sans SC", sans-serif;
  --shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-0);
  background-image:
    radial-gradient(ellipse 80% 60% at 20% -10%, rgba(61, 47, 34, 0.25), transparent),
    radial-gradient(ellipse 60% 50% at 100% 20%, rgba(35, 45, 66, 0.22), transparent),
    radial-gradient(ellipse 70% 60% at 50% 110%, rgba(66, 30, 26, 0.18), transparent);
  color: var(--ink);
  font-family: var(--font-song);
  min-height: 100vh;
  overflow-x: hidden;
}

/* 星空粒子背景 */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

/* ---------- 顶部导航 ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 40px;
  background: linear-gradient(180deg, rgba(10, 11, 16, 0.92), rgba(10, 11, 16, 0.55) 70%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
}
.topbar::after {
  content: "";
  position: absolute;
  left: 40px; right: 40px; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--zhu) 70%, transparent);
  opacity: 0.35;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand-seal {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1.5px solid var(--zhu);
  color: var(--zhu);
  font-size: 22px;
  border-radius: 6px;
  box-shadow: 0 0 18px rgba(214, 74, 58, 0.25) inset, 0 0 12px rgba(214, 74, 58, 0.18);
}
.brand-name { font-size: 22px; letter-spacing: 4px; color: var(--ink); }
.brand-sub { font-size: 12px; color: var(--ink-dim); letter-spacing: 2px; }

.nav { display: flex; gap: 6px; }
.nav-link {
  padding: 8px 16px;
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 1px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active {
  color: var(--gold-light);
  border-color: rgba(176, 141, 63, 0.5);
  background: rgba(176, 141, 63, 0.08);
}

/* ---------- 视图切换 ---------- */
.view-container {
  position: relative;
  z-index: 1;
  padding: 110px 48px 60px;
  max-width: 1440px;
  margin: 0 auto;
}
.view { display: none; }
.view.active { display: block; animation: viewIn 0.45s ease; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-hero { text-align: center; margin-bottom: 44px; }
.view-title {
  font-size: 38px;
  letter-spacing: 10px;
  color: var(--ink);
  text-shadow: 0 0 30px rgba(176, 141, 63, 0.2);
}
.view-sub {
  margin-top: 12px;
  font-size: 15px;
  color: var(--ink-dim);
  letter-spacing: 2px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.9;
}

.disclaimer-line {
  margin-top: 36px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 1px;
}

/* ---------- 道 · 总纲 ---------- */
.taiji-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 36px;
  align-items: center;
  margin-bottom: 30px;
}
#taiji-canvas-box { position: relative; }
#taiji-canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 50%, rgba(30, 34, 48, 0.6), rgba(16, 18, 26, 0.85) 70%),
    var(--bg-1);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: block;
}
#taiji-hint {
  position: absolute;
  bottom: 14px; left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 1px;
  background: rgba(10, 11, 16, 0.7);
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  white-space: nowrap;
}

/* 全息卡 */
.hologram-card {
  min-height: 420px;
  border-radius: 16px;
  background: linear-gradient(160deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 34px 30px;
  display: flex;
  align-items: center;
}
.hologram-empty { text-align: center; width: 100%; }
.holo-kicker {
  font-size: 14px;
  color: var(--gold);
  letter-spacing: 6px;
  margin-bottom: 16px;
}
.holo-main {
  font-size: 26px;
  line-height: 1.6;
  letter-spacing: 2px;
  color: var(--ink);
  margin-bottom: 14px;
}
.holo-sub {
  font-size: 14px;
  color: var(--ink-dim);
  line-height: 2;
}
.holo-card-title {
  font-size: 24px;
  letter-spacing: 3px;
  color: var(--ink);
  margin-bottom: 4px;
}
.holo-card-type {
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 3px;
  margin-bottom: 18px;
}
.holo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}
.holo-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.holo-cell .hc-k { font-size: 11px; color: var(--ink-faint); letter-spacing: 1px; margin-bottom: 3px; }
.holo-cell .hc-v { font-size: 14px; color: var(--ink); line-height: 1.5; }
.holo-desc {
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.9;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}

/* 生成链 */
.dao-chain {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 26px 0 10px;
}
.chain-node {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 8px 18px;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
}
.chain-node:hover, .chain-node.active {
  border-color: rgba(214, 74, 58, 0.55);
  background: rgba(214, 74, 58, 0.08);
}
.chain-node .cn-name { font-size: 15px; color: var(--ink); letter-spacing: 2px; }
.chain-node .cn-arrow { color: var(--gold); }
.chain-node .cn-desc {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  background: var(--bg-3);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--ink-dim);
  line-height: 1.8;
  z-index: 10;
  box-shadow: var(--shadow);
}
.chain-node:hover .cn-desc { display: block; }

/* ---------- 经 · 周易 ---------- */
.jing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 30px;
  margin-bottom: 30px;
}
.bagua-net-box { position: relative; }
#bagua-canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: block;
}
.net-legend {
  position: absolute;
  top: 14px; left: 14px;
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--ink-dim);
  background: rgba(10, 11, 16, 0.72);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--line);
}
.lg::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.lg-cuo::before { background: #d4b26a; }
.lg-zong::before { background: #7a8ab0; }
.lg-hu::before { background: #b57a9e; }

/* 单卦详情 */
.hex-detail {
  border-radius: 16px;
  background: linear-gradient(160deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 30px;
  min-height: 420px;
}
.hex-empty { text-align: center; color: var(--ink-faint); font-size: 14px; line-height: 2; padding-top: 90px; }
.hex-head { display: flex; align-items: flex-start; gap: 24px; margin-bottom: 22px; }
.hex-gua { display: grid; gap: 5px; }
.yao-line { display: block; height: 6px; border-radius: 2px; background: var(--ink); }
.yao-line.yao-yin { background: transparent; border-bottom: 6px solid var(--ink); height: 0; padding-bottom: 0; }
.hex-name { font-size: 30px; letter-spacing: 4px; color: var(--ink); }
.hex-pinyin { font-size: 13px; color: var(--ink-faint); letter-spacing: 2px; margin-top: 4px; }
.hex-badges { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.badge {
  font-size: 11px;
  padding: 3px 12px;
  border-radius: 20px;
  letter-spacing: 1px;
  border: 1px solid;
}
.badge-up { color: var(--wood); border-color: rgba(63, 158, 110, 0.5); background: rgba(63, 158, 110, 0.1); }
.badge-down { color: var(--water); border-color: rgba(59, 111, 158, 0.5); background: rgba(59, 111, 158, 0.1); }
.badge-osc { color: var(--gold-light); border-color: rgba(176, 141, 63, 0.5); background: rgba(176, 141, 63, 0.1); }
.badge-src { color: var(--ink-faint); border-color: var(--line); }
.hex-section { margin-bottom: 20px; }
.hex-section-title {
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 3px;
  margin-bottom: 8px;
}
.hex-w { font-size: 17px; color: var(--ink); line-height: 2; }
.hex-b { font-size: 14px; color: var(--ink-dim); line-height: 2; margin-top: 4px; }
.hex-yao-item {
  border-top: 1px dashed var(--line);
  padding: 10px 0;
}
.hex-yao-item .hy-title { font-size: 12px; color: var(--gold-light); letter-spacing: 1px; margin-bottom: 4px; }
.hex-rel { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.rel-chip {
  font-size: 12px;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 3px 10px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.rel-chip:hover { color: var(--gold-light); border-color: rgba(176, 141, 63, 0.5); }

/* 卦列表 */
.jing-reader { margin-top: 10px; }
.reader-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.reader-tabs { display: flex; gap: 8px; }
.tab {
  padding: 6px 14px;
  font-size: 13px;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--gold-light); border-color: rgba(176, 141, 63, 0.5); background: rgba(176, 141, 63, 0.08); }
.gua-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
}
.gua-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.gua-cell:hover { border-color: rgba(176, 141, 63, 0.45); background: rgba(176, 141, 63, 0.06); transform: translateY(-2px); }
.gua-cell.active { border-color: rgba(214, 74, 58, 0.6); background: rgba(214, 74, 58, 0.08); }
.gua-cell .gc-name { font-size: 14px; color: var(--ink); letter-spacing: 2px; }
.gua-cell .gc-num { font-size: 10px; color: var(--ink-faint); }
.gua-cell .gc-mini { display: grid; gap: 2px; width: 14px; }
.gua-cell .gc-mini .yl { display: block; height: 2px; background: var(--ink-dim); }
.gua-cell .gc-mini .yl.yin { background: transparent; border-bottom: 2px solid var(--ink-dim); height: 0; }
.gua-cell .gc-dot { width: 6px; height: 6px; border-radius: 50%; }

/* ---------- 术 · 三式 ---------- */
.shu-tools { max-width: 880px; margin: 0 auto; }
.tool-card {
  border-radius: 18px;
  background: linear-gradient(160deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 36px 38px;
}
.tool-head { margin-bottom: 26px; }
.tool-badge {
  display: inline-block;
  font-size: 11px;
  color: var(--gold-light);
  border: 1px solid rgba(176, 141, 63, 0.5);
  border-radius: 20px;
  padding: 2px 12px;
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.tool-title { font-size: 24px; letter-spacing: 3px; color: var(--ink); margin-bottom: 8px; }
.tool-desc { font-size: 14px; color: var(--ink-dim); line-height: 1.9; }
.qigua-fields {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--ink-dim); letter-spacing: 1px; }
.field input, .field select {
  background: var(--bg-0);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  font-family: var(--font-song);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.field input:focus, .field select:focus { border-color: var(--gold); }
.field input::placeholder { color: var(--ink-faint); }
.field select option { background: var(--bg-3); color: var(--ink); }
.qigua-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  justify-content: center;
}
.btn {
  padding: 10px 30px;
  font-family: var(--font-song);
  font-size: 15px;
  letter-spacing: 3px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--zhu), var(--zhu-deep));
  color: #f6efe2;
  border: 1px solid rgba(214, 74, 58, 0.6);
  box-shadow: 0 4px 18px rgba(214, 74, 58, 0.25);
}
.btn-primary:hover { box-shadow: 0 6px 26px rgba(214, 74, 58, 0.4); }
.btn-ghost {
  background: transparent;
  color: var(--ink-dim);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--gold); }

.qigua-result { margin-top: 26px; }
.qr-empty { text-align: center; color: var(--ink-faint); font-size: 13px; padding: 20px 0; }
.qr-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.qr-card {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  padding: 18px;
  text-align: center;
}
.qr-card .qr-name { font-size: 26px; color: var(--ink); letter-spacing: 4px; margin-bottom: 6px; }
.qr-card .qr-gua { display: grid; gap: 4px; width: 22px; margin: 0 auto 8px; }
.qr-card .qr-tag { font-size: 12px; color: var(--gold); letter-spacing: 2px; margin-bottom: 6px; }
.qr-card .qr-b { font-size: 13px; color: var(--ink-dim); line-height: 1.7; }
.qr-titl { font-size: 12px; color: var(--ink-faint); letter-spacing: 2px; margin-bottom: 10px; }
.qr-ti-guanxi { margin-top: 16px; }
.guanxi-list { display: flex; flex-wrap: wrap; gap: 8px; }
.gx-chip {
  font-size: 12px;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 4px 12px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.gx-chip:hover { color: var(--gold-light); border-color: rgba(176, 141, 63, 0.5); }

/* ---------- 用 · 推演 ---------- */
.yong-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 30px;
  align-items: start;
}
.nianlun-box { position: relative; }
#nianlun-canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: block;
}
.nianlun-side {
  border-radius: 16px;
  background: linear-gradient(160deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 26px;
}
.nl-now {
  border-left: 3px solid var(--zhu);
  padding: 4px 0 4px 18px;
  margin-bottom: 22px;
}
.nl-kicker { font-size: 12px; color: var(--gold); letter-spacing: 3px; margin-bottom: 8px; }
.nl-main { font-size: 24px; color: var(--ink); letter-spacing: 2px; margin-bottom: 6px; }
.nl-sub { font-size: 13px; color: var(--ink-dim); line-height: 1.8; }
.nl-stage-list { margin-bottom: 18px; }
.nl-stage {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.nl-stage:hover, .nl-stage.active { border-color: rgba(176, 141, 63, 0.5); background: rgba(176, 141, 63, 0.06); }
.nl-stage .ns-head { display: flex; justify-content: space-between; align-items: baseline; }
.nl-stage .ns-name { font-size: 15px; color: var(--ink); letter-spacing: 2px; }
.nl-stage .ns-span { font-size: 12px; color: var(--ink-faint); }
.nl-stage .ns-meaning { font-size: 12px; color: var(--ink-dim); margin-top: 5px; }
.nl-jq-detail { display: none; }
.nl-jq-detail.show { display: block; }
.nl-jq-detail {
  border-top: 1px dashed var(--line);
  padding-top: 14px;
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.9;
}
.nl-note {
  border-top: 1px dashed var(--line);
  padding-top: 14px;
  font-size: 12px;
  color: var(--ink-faint);
  line-height: 2;
}

/* ---------- 藏 · 藏书 ---------- */
.cang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.cang-card {
  border-radius: 14px;
  background: linear-gradient(160deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  padding: 26px;
  transition: border-color 0.25s, transform 0.25s;
}
.cang-card:hover { border-color: rgba(176, 141, 63, 0.45); transform: translateY(-3px); }
.cang-card .cc-cat { font-size: 11px; color: var(--gold); letter-spacing: 3px; margin-bottom: 10px; }
.cang-card .cc-title { font-size: 19px; color: var(--ink); letter-spacing: 2px; margin-bottom: 8px; }
.cang-card .cc-sub { font-size: 13px; color: var(--ink-dim); line-height: 1.9; }
.cang-card .cc-items { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.cang-card .cc-item { font-size: 12px; color: var(--ink-faint); line-height: 2; }

/* ---------- 页脚 ---------- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(10, 11, 16, 0.9));
  padding: 40px 48px 24px;
  margin-top: 60px;
}
.footer-cols {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1.2fr 0.9fr;
  gap: 40px;
  max-width: 1440px;
  margin: 0 auto;
}
.f-brand { font-size: 18px; letter-spacing: 4px; color: var(--ink); margin-bottom: 8px; }
.f-quote { font-size: 13px; color: var(--gold); letter-spacing: 1px; }
.f-head { font-size: 12px; color: var(--ink-dim); letter-spacing: 3px; margin-bottom: 8px; }
.f-col p { font-size: 12px; color: var(--ink-faint); line-height: 1.9; }
.f-contact { text-align: left; }
.f-mail { font-size: 12px !important; color: var(--ink-dim) !important; }
.f-mail a { color: var(--gold); text-decoration: none; border-bottom: 1px dashed rgba(176,141,63,.5); padding-bottom: 1px; }
.f-mail a:hover { color: var(--gold-light); }
.f-qr { margin-top: 12px; }
.f-qr-label { display: block; font-size: 11px; color: var(--ink-faint); letter-spacing: 2px; margin-bottom: 8px; }
.f-qr-img {
  width: 88px; height: 88px;
  border-radius: 8px; border: 1px solid rgba(176, 141, 63, 0.4);
  object-fit: cover; display: block;
}
.f-copy {
  text-align: center;
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 2px;
  margin-top: 28px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .taiji-wrap, .jing-layout, .yong-layout { grid-template-columns: 1fr; }
  .hologram-card { min-height: 0; }
  .gua-grid { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 800px) {
  .view-container { padding: 96px 20px 40px; }
  .topbar { padding: 12px 18px; flex-direction: column; gap: 10px; }
  .nav { flex-wrap: wrap; justify-content: center; }
  .qigua-fields { grid-template-columns: 1fr 1fr; }
  .gua-grid { grid-template-columns: repeat(4, 1fr); }
  .qr-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; gap: 24px; }
  .view-title { font-size: 28px; letter-spacing: 6px; }
  .brand-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  #bg-canvas, #taiji-canvas, #bagua-canvas, #nianlun-canvas { display: block; }
}

/* ============================================================
   二期 · 三式 / 藏知识页 / 检索 / 收藏 / 今日一读 / 中英
   ============================================================ */

/* 顶栏工具区 */
.topbar { position: fixed; z-index: 90; }
.topbar-tools { display: flex; align-items: center; gap: 8px; margin-left: 14px; flex-shrink: 0; }
.search-box { position: relative; }
#search-input {
  width: 150px; background: rgba(232,226,214,0.06); border: 1px solid var(--line);
  border-radius: 999px; color: var(--ink); padding: 6px 14px; font-size: 12.5px;
  transition: width 0.3s ease, border-color 0.3s ease;
}
#search-input:focus { width: 210px; outline: none; border-color: var(--gold); background: rgba(232,226,214,0.1); }
#search-input::placeholder { color: var(--ink-faint); }
.search-results {
  position: absolute; top: calc(100% + 8px); right: 0; width: 320px; max-height: 420px;
  overflow-y: auto; background: rgba(15,16,22,0.96); border: 1px solid var(--line);
  border-radius: 12px; backdrop-filter: blur(14px); display: none; z-index: 95;
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
}
.search-results.show { display: block; }
.sr-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-bottom: 1px solid rgba(232,226,214,0.07); color: var(--ink); }
.sr-item:last-child { border-bottom: none; }
.sr-item:hover { background: rgba(176,141,63,0.08); }
.sr-type { font-size: 10.5px; color: var(--gold-light); letter-spacing: 0.1em; }
.sr-item b { font-size: 13.5px; font-weight: 600; }
.sr-item i { font-size: 11.5px; color: var(--ink-faint); font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-empty { padding: 14px; color: var(--ink-faint); font-size: 12.5px; }
.tool-btn {
  font: inherit; background: rgba(232,226,214,0.06); color: var(--ink-faint); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 999px; font-size: 12.5px; cursor: pointer; text-decoration: none;
  transition: color 0.2s, border-color 0.2s; white-space: nowrap;
}
.tool-btn:hover { color: var(--ink); border-color: var(--gold); }
.tool-btn b { color: var(--gold-light); font-weight: 600; }
.today-btn b { color: var(--cinnabar); }

/* 三式 tabs */
.tool-tabs { display: flex; gap: 10px; justify-content: center; margin: -10px 0 34px; flex-wrap: wrap; }
.tool-tab {
  padding: 9px 20px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-faint);
  font-size: 13px; text-decoration: none; transition: all 0.25s ease;
}
.tool-tab:hover { color: var(--ink); border-color: var(--gold); }
.tool-tab.active { background: linear-gradient(135deg, rgba(214,74,58,0.18), rgba(176,141,63,0.14)); color: var(--gold-light); border-color: rgba(176,141,63,0.55); }

/* 奇门盘 */
.qm-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 18px; color: var(--ink-faint); font-size: 13px; }
.qm-meta span { display: inline-flex; align-items: center; gap: 6px; }
.qm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 560px; margin: 0 auto 20px; }
.qm-cell { background: rgba(232,226,214,0.04); border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; min-height: 108px; display: flex; flex-direction: column; justify-content: center; gap: 2px; transition: border-color 0.2s, background 0.2s; }
.qm-cell.qm-ji { border-color: rgba(176,141,63,0.6); background: rgba(176,141,63,0.09); }
.qm-shen { font-size: 10.5px; color: var(--ink-faint); letter-spacing: 0.15em; }
.qm-star { font-size: 13.5px; color: var(--ink); font-weight: 600; }
.qm-gate { font-size: 15px; color: var(--gold-light); font-weight: 700; }
.qm-di { font-size: 13px; color: var(--cinnabar); }
.qm-pal { font-size: 10.5px; color: var(--ink-faint); margin-top: 3px; }
.qm-kicker { font-size: 11px; color: var(--gold-light); letter-spacing: 0.2em; margin: 18px 0 8px; }
.qm-ji-list { display: flex; flex-direction: column; gap: 6px; max-width: 560px; margin: 0 auto; }
.qm-ji-item { padding: 8px 12px; border-left: 2px solid var(--gold); background: rgba(176,141,63,0.07); border-radius: 4px 8px 8px 4px; font-size: 12.5px; color: var(--ink-faint); }
.qm-ji-item b { color: var(--ink); }
.qm-ji-item.highlight { border-left-color: var(--cinnabar); background: rgba(214,74,58,0.08); }
.qm-digits { display: flex; gap: 12px; max-width: 560px; margin: 0 auto; }
.qm-digits::before, .qm-note { display: block; }
.qm-digits { color: var(--cinnabar); font-size: 17px; font-weight: 700; letter-spacing: 0.2em; justify-content: center; }
.qm-note { max-width: 560px; margin: 16px auto 0; font-size: 11.5px; color: var(--ink-faint); text-align: center; }
.tool-tip { color: var(--ink-faint); font-size: 13px; text-align: center; padding: 10px; }

/* 八字盘 */
.bz-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 680px; margin: 0 auto 18px; }
.bz-col { text-align: center; }
.bz-col-name { font-size: 11px; color: var(--gold-light); letter-spacing: 0.25em; margin-bottom: 6px; }
.bz-pillar { background: rgba(232,226,214,0.04); border: 1px solid var(--line); border-radius: 10px; padding: 12px 6px; display: flex; flex-direction: column; gap: 4px; }
.bz-ss { font-size: 10.5px; color: var(--cinnabar); letter-spacing: 0.1em; }
.bz-gz { font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: 0.06em; }
.bz-wx { font-size: 11.5px; color: var(--ink-faint); }
.bz-cang { font-size: 10.5px; color: var(--ink-faint); }
.bz-ny { font-size: 10.5px; color: var(--gold-light); }
.bz-section { max-width: 680px; margin: 0 auto 14px; }
.bz-wx-list { display: flex; flex-direction: column; gap: 7px; }
.bz-wx-bar { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.bz-wx-name { width: 22px; color: var(--ink); }
.bz-wx-track { flex: 1; height: 7px; background: rgba(232,226,214,0.07); border-radius: 99px; overflow: hidden; }
.bz-wx-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--cinnabar)); border-radius: 99px; }
.bz-wx-bar b { width: 18px; text-align: right; color: var(--gold-light); }
.bz-dayun { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.bz-dayun-item { background: rgba(232,226,214,0.04); border: 1px solid var(--line); border-radius: 8px; padding: 7px; text-align: center; }
.dy-no { font-size: 10px; color: var(--ink-faint); display: block; }
.dy-gz { font-size: 13.5px; color: var(--ink); font-weight: 600; }
.dy-ny { font-size: 10px; color: var(--gold-light); display: block; margin-top: 2px; }

/* 藏 · 书架 + 知识页 */
.cang-shelf { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.cc-foot { margin-top: 14px; }
.btn-sm { padding: 5px 14px; font-size: 12px; }
.cang-detail-body { max-width: 860px; margin: 0 auto; }
.md-head { text-align: center; margin-bottom: 30px; }
.md-no { font-size: 11px; color: var(--gold-light); letter-spacing: 0.25em; }
.md-title { font-size: 26px; color: var(--ink); margin: 8px 0 10px; letter-spacing: 0.06em; }
.md-sub { color: var(--ink-faint); font-size: 14px; max-width: 640px; margin: 0 auto 16px; line-height: 1.7; }
.md-sec { margin-bottom: 26px; padding: 20px 22px; background: rgba(232,226,214,0.035); border: 1px solid var(--line); border-radius: 14px; }
.md-h { color: var(--gold-light); font-size: 16px; letter-spacing: 0.08em; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid rgba(232,226,214,0.08); }
.md-para { color: var(--ink-faint); font-size: 13.5px; line-height: 1.9; margin-bottom: 8px; }
.md-steps { margin: 6px 0 0 18px; color: var(--ink-faint); font-size: 13.5px; line-height: 1.9; }
.md-steps li { margin-bottom: 4px; }
.md-table-wrap { margin: 12px 0; overflow-x: auto; }
.md-tb-title { font-size: 12px; color: var(--ink-faint); margin-bottom: 6px; letter-spacing: 0.1em; }
.md-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.md-table th { color: var(--gold-light); text-align: left; padding: 7px 10px; border-bottom: 1px solid rgba(176,141,63,0.35); font-weight: 500; white-space: nowrap; }
.md-table td { color: var(--ink-faint); padding: 7px 10px; border-bottom: 1px solid rgba(232,226,214,0.06); line-height: 1.6; }
.md-table tr:hover td { background: rgba(176,141,63,0.05); }
.md-warn { color: #d89a6a; font-size: 13px; background: rgba(216,154,106,0.08); border-left: 2px solid #d89a6a; padding: 8px 12px; border-radius: 4px 8px 8px 4px; margin-top: 10px; }
.md-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }
.md-foot .disclaimer-line { width: 100%; }
.method-index { display: flex; flex-direction: column; gap: 10px; }
.method-index-item { display: flex; flex-direction: column; gap: 3px; padding: 14px 18px; background: rgba(232,226,214,0.04); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; transition: border-color 0.2s, background 0.2s; }
.method-index-item:hover { border-color: var(--gold); background: rgba(176,141,63,0.07); }
.method-index-item b { color: var(--gold-light); font-size: 12px; letter-spacing: 0.1em; }
.method-index-item span { color: var(--ink); font-size: 16px; font-weight: 600; }
.method-index-item i { color: var(--ink-faint); font-size: 12.5px; font-style: normal; line-height: 1.6; }
.book-list { display: flex; flex-direction: column; gap: 10px; }
.book-item { padding: 14px 18px; background: rgba(232,226,214,0.04); border: 1px solid var(--line); border-radius: 12px; }
.book-item b { color: var(--ink); font-size: 14.5px; }
.book-item p { color: var(--ink-faint); font-size: 12.5px; line-height: 1.8; margin-top: 5px; }

/* 复盘时间线 */
.case-timeline { position: relative; margin: 8px 0 24px; }
.case-item { display: flex; gap: 16px; padding: 12px 0; position: relative; }
.case-item::before { content: ""; position: absolute; left: 52px; top: 0; bottom: 0; width: 1px; background: rgba(232,226,214,0.1); }
.case-item:first-child::before { top: 30px; }
.case-item:last-child::before { bottom: auto; height: 30px; }
.case-date { flex-shrink: 0; width: 44px; text-align: right; color: var(--gold-light); font-weight: 600; font-size: 13.5px; }
.case-body { flex: 1; background: rgba(232,226,214,0.035); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.case-event { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.case-event b { color: var(--ink); font-size: 14px; }
.case-price { color: var(--gold-light); font-size: 12.5px; }
.case-tag { font-size: 10.5px; color: var(--ink-faint); border: 1px solid var(--line); border-radius: 99px; padding: 2px 8px; }
.case-tag.tag-good { color: var(--wood); border-color: rgba(63,158,110,0.5); }
.case-tag.tag-bad { color: var(--cinnabar); border-color: rgba(214,74,58,0.5); }
.case-note { color: var(--ink-faint); font-size: 12.5px; line-height: 1.7; margin-top: 6px; }
.case-lessons { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.case-lesson { display: flex; gap: 10px; font-size: 13px; color: var(--ink-faint); }
.lesson-k { color: var(--cinnabar); font-weight: 600; flex-shrink: 0; }
.case-rule { padding: 14px 18px; border-left: 3px solid var(--cinnabar); background: rgba(214,74,58,0.08); border-radius: 4px 12px 12px 4px; color: var(--ink); font-size: 14.5px; line-height: 1.8; margin-bottom: 18px; }

/* 收藏 */
.fav-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.fav-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; background: rgba(232,226,214,0.04); border: 1px solid var(--line); border-radius: 12px; }
.fav-link { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.fav-link:hover b { color: var(--gold-light); }
.fav-type { font-size: 10.5px; color: var(--gold-light); border: 1px solid rgba(176,141,63,0.4); border-radius: 99px; padding: 2px 8px; }
.fav-link b { font-size: 14.5px; }
.fav-empty { text-align: center; color: var(--ink-faint); padding: 60px 0; font-size: 14px; line-height: 2; }
.fav-toggle {
  font: inherit; background: transparent; border: 1px solid var(--line); color: var(--ink-faint);
  padding: 4px 12px; border-radius: 999px; font-size: 12px; cursor: pointer; transition: all 0.2s;
}
.fav-toggle:hover { color: var(--gold-light); border-color: var(--gold); }
.fav-toggle.on { color: var(--gold-light); border-color: rgba(176,141,63,0.6); background: rgba(176,141,63,0.1); }

/* 响应式 */
@media (max-width: 1080px) {
  .topbar-tools { gap: 6px; }
  #search-input { width: 110px; }
  #search-input:focus { width: 150px; }
  .cang-shelf { grid-template-columns: 1fr; }
  .bz-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; padding-bottom: 8px; }
  .topbar-tools { order: 3; width: 100%; justify-content: center; margin-left: 0; margin-top: 6px; }
  .today-btn { display: none; }
  .qm-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   三期 · 概念网（道·二级视图）
   ============================================================ */
.dao-tabs { display: flex; gap: 10px; justify-content: center; margin: -8px 0 30px; }
.dao-tab { padding: 9px 22px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-faint); font-size: 13.5px; text-decoration: none; transition: all 0.25s; }
.dao-tab:hover { color: var(--ink); border-color: var(--gold); }
.dao-tab.active { background: linear-gradient(135deg, rgba(214,74,58,0.16), rgba(176,141,63,0.12)); color: var(--gold-light); border-color: rgba(176,141,63,0.55); }

.dao-net-wrap { margin-top: 4px; }
.dao-net-head { text-align: center; margin-bottom: 22px; }
.dao-net-sub { color: var(--ink-faint); font-size: 13.5px; line-height: 1.8; max-width: 640px; margin: 0 auto 18px; }
.net-chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.net-chip {
  font: inherit; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(232,226,214,0.05); color: var(--ink-faint); border: 1px solid var(--line);
  padding: 6px 14px; border-radius: 999px; font-size: 12.5px; cursor: pointer; transition: all 0.2s;
}
.net-chip:hover { color: var(--ink); border-color: var(--gold); }
.net-chip.active { color: var(--ink); border-color: var(--chip, var(--gold)); background: rgba(176,141,63,0.1); }
.chip-n { font-size: 10.5px; color: var(--ink-faint); background: rgba(232,226,214,0.08); border-radius: 99px; padding: 1px 7px; }

.dao-net-layout { display: grid; grid-template-columns: 1fr 360px; gap: 18px; align-items: stretch; }
.net-graph {
  background: radial-gradient(ellipse at 50% 40%, rgba(176,141,63,0.05), transparent 70%);
  border: 1px solid var(--line); border-radius: 16px; min-height: 620px; overflow: hidden; position: relative;
}
.net-svg { display: block; width: 100%; height: 100%; cursor: grab; }
.net-svg:active { cursor: grabbing; }
.node-label { font-size: 10px; fill: #cfc9bc; text-anchor: middle; pointer-events: none; opacity: 0.85; font-family: inherit; }
.node-label.big { font-size: 14px; fill: #efe9dc; font-weight: 600; }
.edge-label { font-size: 9.5px; fill: #8b846f; text-anchor: middle; pointer-events: none; }

.net-info { display: flex; flex-direction: column; gap: 12px; }
.net-info-empty { background: rgba(232,226,214,0.03); border: 1px solid var(--line); border-radius: 16px; padding: 34px 26px; text-align: center; }
.net-info-empty .holo-kicker { color: var(--gold-light); font-size: 11px; letter-spacing: 0.3em; margin-bottom: 14px; }
.net-info-empty .holo-main { color: var(--ink); font-size: 19px; letter-spacing: 0.1em; margin-bottom: 12px; }
.net-info-empty .holo-sub { color: var(--ink-faint); font-size: 13px; line-height: 1.9; }
.net-info-head { border-left: 3px solid var(--gold); padding: 4px 0 4px 14px; }
.ni-name { font-size: 24px; color: var(--ink); letter-spacing: 0.06em; }
.ni-layer { font-size: 12px; margin-top: 4px; letter-spacing: 0.12em; }
.ni-desc { color: var(--ink-faint); font-size: 13.5px; line-height: 1.9; padding: 4px 0; }
.ni-link { display: inline-block; color: var(--gold-light); font-size: 13px; text-decoration: none; border: 1px solid rgba(176,141,63,0.4); border-radius: 999px; padding: 5px 14px; margin: 4px 0; transition: all 0.2s; }
.ni-link:hover { background: rgba(176,141,63,0.1); }
.ni-rels { border-top: 1px solid rgba(232,226,214,0.08); padding-top: 12px; }
.ni-rel-title { font-size: 11px; color: var(--gold-light); letter-spacing: 0.25em; margin-bottom: 8px; }
.ni-rel {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  font: inherit; background: rgba(232,226,214,0.04); border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 10px; margin-bottom: 5px; color: var(--ink-faint); font-size: 12.5px; cursor: pointer; transition: all 0.15s;
}
.ni-rel:hover { border-color: var(--gold); color: var(--ink); background: rgba(176,141,63,0.07); }
.nr-dir { color: var(--cinnabar); font-weight: 700; flex-shrink: 0; }
.nr-label { color: var(--gold-light); flex-shrink: 0; }
.nr-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ni-fav { margin-top: 4px; }

.net-legend { display: flex; gap: 18px; justify-content: center; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.ng { font-size: 11.5px; color: var(--ink-faint); display: inline-flex; align-items: center; gap: 6px; }
.ng::before { content: ""; width: 22px; height: 2.5px; border-radius: 99px; display: inline-block; }
.ng-sheng::before { background: #3f9e6e; }
.ng-cheng::before { background: #c9a86a; }
.ng-gui::before { background: #6b7f9e; }
.ng-tui::before { background: #8a6fb5; }
.ng-yuan::before { background: #3b6f9e; }
.ng-hint { font-size: 11px; color: var(--ink-faint); opacity: 0.75; width: 100%; text-align: center; }

@media (max-width: 1080px) {
  .dao-net-layout { grid-template-columns: 1fr; }
  .net-graph { min-height: 460px; }
}

/* 全局：hidden 属性必须生效（避免被 class 的 display 覆盖） */
[hidden] { display: none !important; }

/* ============================================================
   四期 · 经·卦变图谱（力导向 SVG）
   ============================================================ */
#hex-net-svg-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hex-net-svg { display: block; width: 100%; height: 100%; cursor: grab; }
.hex-net-svg:active { cursor: grabbing; }
.hex-num {
  font-size: 9px; fill: #0a0b10; text-anchor: middle;
  dominant-baseline: central; pointer-events: none; font-family: inherit;
}
.hex-node-name {
  font-size: 9.5px; fill: #cfc9bc; text-anchor: middle;
  pointer-events: none; opacity: 0.9; font-family: inherit;
}
.hex-node-name.big { font-size: 13px; fill: #efe9dc; font-weight: 600; }
.hex-edge-label {
  font-size: 9px; fill: #8b846f; text-anchor: middle;
  pointer-events: none; font-family: inherit;
}
.lg-bian::before { background: #8a6fb5; }
.net-legend { flex-wrap: wrap; }
.rel-chip.bian { border-color: rgba(138, 111, 181, 0.5); color: #b79bd6; }

/* ============================================================
   五期 · 互卦簇（16 组可折叠）
   ============================================================ */
.hugua-clusters { margin-bottom: 30px; }
.hc-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.hc-title { font-size: 16px; color: var(--gold); letter-spacing: 2px; }
.hc-sub { font-size: 12px; color: var(--ink-faint); }
.hc-toggle {
  margin-left: auto;
  font: inherit; font-size: 12px; color: var(--gold-light);
  background: rgba(176, 141, 63, 0.1); border: 1px solid rgba(176, 141, 63, 0.4);
  border-radius: 999px; padding: 5px 14px; cursor: pointer; transition: all 0.2s;
}
.hc-toggle:hover { background: rgba(176, 141, 63, 0.2); }
.hc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.hc-card {
  background: rgba(232, 226, 214, 0.03);
  border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; transition: border-color 0.2s;
}
.hc-card:hover { border-color: rgba(176, 141, 63, 0.45); }
.hc-card.open { border-color: rgba(176, 141, 63, 0.45); }
.hc-head {
  display: flex; align-items: center; gap: 10px; width: 100%;
  font: inherit; text-align: left; cursor: pointer;
  background: transparent; border: none; padding: 11px 14px; color: var(--ink-dim);
}
.hc-result { color: var(--gold-light); font-size: 14px; letter-spacing: 1px; flex-shrink: 0; }
.hc-members { flex: 1; font-size: 12px; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-arrow { color: var(--ink-faint); transition: transform 0.25s; font-size: 12px; }
.hc-card.open .hc-arrow { transform: rotate(90deg); }
.hc-body { padding: 2px 14px 14px; }
.hc-desc { font-size: 12.5px; color: var(--ink-faint); line-height: 1.9; margin-bottom: 10px; }
.hc-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.hc-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font: inherit; font-size: 12.5px; color: var(--ink);
  background: rgba(232, 226, 214, 0.06); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px; cursor: pointer; transition: all 0.15s;
}
.hc-chip:hover { border-color: var(--gold); color: var(--gold-light); background: rgba(176, 141, 63, 0.08); }
.hc-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

/* ============================================================
   六期 · 象数图说（道·maps） + 奇门九宫图说
   ============================================================ */
.dao-maps-wrap { margin-bottom: 28px; }
.maps-head { margin-bottom: 16px; }
.maps-sub { font-size: 12.5px; color: var(--ink-faint); line-height: 1.9; margin-bottom: 12px; }
.maps-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.maps-tab, .qm-inner-tab {
  font: inherit; font-size: 13px; color: var(--ink-dim);
  background: rgba(232, 226, 214, 0.04); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 16px; cursor: pointer; transition: all 0.2s;
}
.maps-tab.active, .qm-inner-tab.active {
  color: var(--gold-light); border-color: rgba(176, 141, 63, 0.6);
  background: rgba(176, 141, 63, 0.12);
}
.maps-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; }
.maps-stage {
  background: rgba(232, 226, 214, 0.02); border: 1px solid var(--line);
  border-radius: 16px; min-height: 460px; display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.maps-svg { max-width: 100%; height: auto; }
.maps-svg .map-node { cursor: pointer; pointer-events: all; }
.maps-svg line { pointer-events: none; }
.maps-svg .map-node circle, .maps-svg .map-node rect { transition: all 0.2s; }
.maps-svg .map-node:hover circle { fill: rgba(176, 141, 63, 0.22); stroke: var(--gold); }
.maps-svg .map-node.sel circle { fill: rgba(176, 141, 63, 0.3); stroke: var(--gold); stroke-width: 2; }
.maps-svg .map-node.sel rect { fill: rgba(176, 141, 63, 0.14); stroke: var(--gold); stroke-width: 2; }
.maps-svg .map-node.sel circle[fill] { stroke: var(--gold); stroke-width: 1.5; }
.maps-svg .map-label { pointer-events: none; }
.maps-info {
  background: rgba(232, 226, 214, 0.03); border: 1px solid var(--line);
  border-radius: 16px; padding: 22px; min-height: 460px;
}
.maps-card .maps-gua-head { display: flex; align-items: center; gap: 12px; margin: 8px 0 12px; }
.maps-gua-name { font-size: 22px; color: var(--ink); letter-spacing: 2px; }
.maps-tri { display: inline-flex; flex-direction: column; gap: 3px; }
.tri-line { width: 34px; height: 4px; border-radius: 2px; background: rgba(232, 226, 214, 0.18); }
.tri-line.yang { background: var(--gold); }
.maps-gua-row { font-size: 13px; color: var(--ink-faint); line-height: 2; margin: 2px 0; }
.maps-gua-row b { color: var(--ink-dim); font-weight: 600; }
.maps-link { color: var(--gold); text-decoration: none; border-bottom: 1px dashed rgba(176, 141, 63, 0.5); }
.maps-link:hover { color: var(--gold-light); }
.maps-wx { display: inline-block; width: 26px; height: 26px; border-radius: 50%; color: #10131a; font-size: 13px; text-align: center; line-height: 26px; font-weight: 700; }

/* 奇门九宫图说 */
.qm-inner-tabs { display: flex; gap: 8px; margin-top: 18px; }
.jiugong-panel { margin-top: 18px; }
.jg-head { margin-bottom: 12px; }
.jg-sub { font-size: 12.5px; color: var(--ink-faint); line-height: 1.9; }
.jg-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; }
.jg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 560px; }
.jg-cell {
  font: inherit; text-align: left; cursor: pointer;
  background: rgba(232, 226, 214, 0.03); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 3px;
  min-height: 132px; transition: all 0.18s; position: relative;
}
.jg-cell:hover { border-color: var(--wx, var(--gold)); }
.jg-cell.sel { border-color: var(--wx, var(--gold)); background: rgba(176, 141, 63, 0.08); }
.jg-cell.zf { box-shadow: 0 0 0 2px rgba(232, 226, 214, 0.85) inset; border-color: #e8e2d6; }
.jg-cell.zs { border-color: #3f9e6e; }
.jg-cell.sg { background: rgba(181, 70, 47, 0.22); border-color: #b5462f; }
.jg-num { font-size: 26px; color: var(--wx, var(--gold)); font-family: "Songti SC", serif; line-height: 1; }
.jg-gua { font-size: 16px; color: var(--ink); letter-spacing: 1px; }
.jg-wx { font-size: 11px; color: var(--ink-faint); }
.jg-star { font-size: 12px; color: var(--ink-dim); }
.jg-gate { font-size: 12px; color: var(--gold); }
.jg-plates { font-size: 10.5px; color: var(--ink-faint); line-height: 1.5; }
.jg-info {
  background: rgba(232, 226, 214, 0.03); border: 1px solid var(--line);
  border-radius: 16px; padding: 20px; min-height: 300px;
}

@media (max-width: 1000px) {
  .maps-layout, .jg-layout { grid-template-columns: 1fr; }
}
