/* 灵算台 · 全局视觉（深墨底 + 金色点缀 + 水墨风 · 移动端优先 390px）
   动画只动 transform/opacity；prefers-reduced-motion 全量降级 */
@property --angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

:root {
  --bg: #0a0a0e;
  --bg1: #101218;
  --bg2: #161a22;
  --line: rgba(212, 175, 55, 0.28);
  --line-dim: rgba(212, 175, 55, 0.14);
  --gold: #d4af37;
  --gold-hi: #f0d78c;
  --red: #b03a2e;
  --tx: #e8e6df;
  --tx-dim: #9a978a;
  --serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --radius: 14px;
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--tx);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-tap-highlight-color: transparent;
}
button { font-family: inherit; }
img, svg { vertical-align: middle; }
::selection { background: rgba(212, 175, 55, 0.3); }
:focus-visible { outline: 2px solid rgba(212, 175, 55, 0.7); outline-offset: 2px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #262b36; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* 水墨晕染背景（径向墨晕，静态无动画） */
.lz-ink {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(640px 460px at 88% -6%, rgba(212, 175, 55, 0.07), transparent 62%),
    radial-gradient(520px 420px at -8% 12%, rgba(96, 118, 156, 0.10), transparent 60%),
    radial-gradient(760px 520px at 50% 118%, rgba(212, 175, 55, 0.05), transparent 62%),
    radial-gradient(420px 360px at 70% 62%, rgba(38, 43, 54, 0.6), transparent 70%);
}
#lz-particles { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.lz-app { position: relative; z-index: 1; max-width: 960px; margin: 0 auto; padding: 0 16px 64px; }

/* ---------- 首页 ---------- */
.lz-hero { text-align: center; padding: 56px 8px 34px; }
.lz-taiji { width: 92px; height: 92px; margin: 0 auto 22px; animation: lz-spin 60s linear infinite; }
.lz-taiji svg { display: block; width: 100%; height: 100%; }
.lz-title {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 600;
  letter-spacing: 0.3em;
  padding-left: 0.3em;
  background: linear-gradient(180deg, #f0d78c, #d4af37 62%, #b8912c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lz-subtitle {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: 0; font-size: 13.5px; color: var(--tx-dim); letter-spacing: 0.2em;
}
.lz-subtitle::before, .lz-subtitle::after {
  content: ""; width: 36px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line));
}
.lz-subtitle::after { background: linear-gradient(90deg, var(--line), transparent); }

.lz-schools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 10px 0 36px;
}
.lz-footer-note {
  margin: 0; text-align: center;
  font-size: 11px; letter-spacing: 0.16em; color: #565a63;
}

/* ---------- 流派卡片（流光边框 / 悬浮光影 / 按下反馈） ---------- */
.lz-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 26px 12px 20px;
  min-height: 172px;
  border-radius: var(--radius);
  border: 1px solid rgba(212, 175, 55, 0.20);
  background: linear-gradient(180deg, rgba(24, 28, 38, 0.85), rgba(16, 18, 24, 0.92));
  color: var(--tx);
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.lz-card:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 22px rgba(212, 175, 55, 0.10);
}
.lz-card:active { transform: scale(0.97); }

/* ① 流光边框：conic-gradient 旋转描边 */
.lz-card::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--angle, 0deg),
    transparent 0 28%, var(--gold) 50%, var(--gold-hi) 56%, transparent 64% 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.lz-card:hover::before, .lz-card:focus-visible::before, .lz-card.selected::before {
  opacity: 1;
  animation: lz-angle 3s linear infinite;
}
/* ⑤ 悬浮光影：radial 光斑跟随光标（--mx/--my 由 JS 写入，各卡独立） */
.lz-card::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%),
    rgba(240, 215, 140, 0.11), transparent 62%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.lz-card:hover::after { opacity: 1; }

.lz-card-icon { display: flex; align-items: center; justify-content: center; min-height: 40px; font-size: 36px; line-height: 1; color: var(--gold); }
.lz-card-icon svg { width: 40px; height: 40px; }
.lz-card-name { font-family: var(--serif); font-size: 18px; letter-spacing: 0.14em; color: var(--gold-hi); }
.lz-card-tag { font-size: 12px; letter-spacing: 0.04em; color: var(--gold); opacity: 0.85; }
.lz-card-desc { font-size: 11.5px; line-height: 1.7; color: var(--tx-dim); }

/* 即将上线 / 禁用态 */
.lz-card-soon {
  position: absolute; top: 10px; right: 10px;
  font-size: 10px; letter-spacing: 0.14em;
  color: var(--red);
  border: 1px solid rgba(176, 58, 46, 0.5);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(176, 58, 46, 0.08);
}
.lz-card:disabled { opacity: 0.55; cursor: default; }
.lz-card:disabled:hover { transform: none; border-color: rgba(212, 175, 55, 0.20); box-shadow: none; }
.lz-card:disabled::before, .lz-card:disabled::after { display: none; }

.lz-empty {
  grid-column: 1 / -1;
  padding: 40px 20px;
  border-style: dashed;
  color: var(--tx-dim);
  font-size: 14px;
  letter-spacing: 0.1em;
  cursor: default;
}

/* ---------- 顶栏 / 返回 ---------- */
.lz-topbar { display: flex; align-items: center; gap: 12px; padding: 18px 0 6px; }
.lz-back {
  min-width: 44px; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg1); color: var(--gold);
  font-size: 22px; line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.lz-back:hover { border-color: var(--gold); }
.lz-back:active { transform: scale(0.94); }
.lz-topbar-title { font-family: var(--serif); font-size: 15px; letter-spacing: 0.1em; color: var(--tx); }

.lz-page-head { text-align: center; padding: 12px 0 4px; }
.lz-school-icon-lg { display: flex; justify-content: center; font-size: 44px; color: var(--gold); min-height: 52px; align-items: center; }
.lz-school-icon-lg svg { width: 52px; height: 52px; }
.lz-school-name-lg { margin: 8px 0 6px; font-family: var(--serif); font-size: 26px; letter-spacing: 0.14em; color: var(--gold-hi); }
.lz-school-desc { margin: 0 auto; max-width: 460px; font-size: 13px; color: var(--tx-dim); }

/* ---------- 表单 ---------- */
.lz-form { display: flex; flex-direction: column; gap: 20px; max-width: 520px; margin: 0 auto; padding: 22px 0 8px; }
.lz-field { display: flex; flex-direction: column; gap: 8px; }
.lz-label { font-size: 14px; letter-spacing: 0.08em; color: var(--tx); }
.lz-req { color: var(--red); }
.lz-help { font-size: 12px; color: var(--tx-dim); line-height: 1.6; }
.lz-field-error { display: none; font-size: 12px; color: var(--red); }
.lz-field-error.show { display: block; }

.lz-input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 12px;
  background: var(--bg1);
  color: var(--tx);
  font-size: 16px;
  font-family: var(--sans);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.lz-input::placeholder { color: #6b6f7a; }
.lz-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.14); }
.lz-input.invalid { border-color: var(--red); }
input[type="datetime-local"], input[type="date"], input[type="number"] { color-scheme: dark; }
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }

.lz-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23d4af37' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.lz-select option { background: var(--bg1); color: var(--tx); }

.lz-radios { display: flex; flex-wrap: wrap; gap: 10px; }
.lz-radio-pill { flex: 1 1 auto; min-width: 88px; }
.lz-radio-pill input { position: absolute; opacity: 0; pointer-events: none; }
.lz-radio-pill span {
  display: flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 16px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 12px;
  background: var(--bg1);
  color: var(--tx-dim);
  font-size: 15px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.lz-radio-pill input:checked + span {
  color: #1a1608;
  background: linear-gradient(160deg, #e2c25c, #b8912c);
  border-color: transparent;
  font-weight: 600;
}
.lz-radio-pill input:focus-visible + span { outline: 2px solid var(--gold-hi); outline-offset: 2px; }

/* ---------- 铜钱摇卦 ---------- */
.lz-coins {
  display: flex; flex-direction: column; gap: 16px;
  padding: 18px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(22, 26, 34, 0.6), rgba(16, 18, 24, 0.6));
}
.lz-coin-stage {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  min-height: 84px;
  perspective: 620px;
}
.lz-coin { width: 64px; height: 64px; }
.lz-coin svg { width: 100%; height: 100%; display: block; }
.lz-coin.flipping { animation: lz-coin-flip 0.9s cubic-bezier(0.3, 0.6, 0.4, 1); }

.lz-yao-slots { display: flex; flex-direction: column-reverse; gap: 6px; }
.lz-yao-slot {
  min-height: 34px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 4px 12px;
  border: 1px dashed rgba(212, 175, 55, 0.18);
  border-radius: 10px;
  color: var(--tx-dim);
  font-size: 12px;
}
.lz-yao-slot.filled { border-style: solid; color: var(--tx); }
.lz-yao-line { display: flex; align-items: center; gap: 6px; }
.lz-yao-bar { height: 5px; width: 34px; border-radius: 3px; background: var(--gold-hi); box-shadow: 0 0 8px rgba(240, 215, 140, 0.35); }
.lz-yao-bar.broken { width: 14px; }
.lz-yao-tag { font-size: 11px; color: var(--tx-dim); }
.lz-yao-tag.move { color: var(--red); }
.lz-coins-actions { display: flex; gap: 12px; }

/* ---------- 按钮 ---------- */
.lz-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  border: 1px solid transparent; border-radius: 13px;
  font-size: 16px; font-weight: 600; letter-spacing: 0.14em;
  color: #211a06;
  background: linear-gradient(160deg, #e6c663 0%, #d4af37 45%, #b8912c 100%);
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.18);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}
.lz-btn:hover { filter: brightness(1.06); box-shadow: 0 8px 22px rgba(212, 175, 55, 0.26); }
.lz-btn:active { transform: scale(0.97); }
.lz-btn:disabled { opacity: 0.45; filter: none; cursor: default; }
.lz-btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--gold);
  box-shadow: none;
}
.lz-btn.ghost:hover { border-color: var(--gold); background: rgba(212, 175, 55, 0.06); }

/* ---------- ② 旋转罗盘加载层 ---------- */
.lz-compass-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  background: rgba(10, 10, 14, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.28s ease;
}
.lz-compass-overlay.on { opacity: 1; }
.lz-compass-overlay[hidden] { display: none; }
.lz-compass { position: relative; width: 260px; height: 260px; animation: lz-spin 16s linear infinite; }
.lz-compass-halo {
  position: absolute; inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.22), transparent 65%);
  animation: lz-breathe 3s ease-in-out infinite;
}
.lz-compass-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 30px rgba(212, 175, 55, 0.08), 0 0 40px rgba(212, 175, 55, 0.10);
  animation: lz-breathe 3s ease-in-out infinite;
}
.lz-ring { position: absolute; inset: 0; }
.lz-ring span {
  position: absolute; left: 50%; top: 50%;
  width: 22px; height: 22px; margin: -11px 0 0 -11px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 13px;
}
.lz-ring-outer span { color: var(--tx-dim); }
.lz-ring-inner { animation: lz-rot-rev 11s linear infinite; }
.lz-ring-inner span { color: var(--gold); font-size: 14px; }
.lz-compass-center {
  position: absolute; inset: 0; margin: auto;
  width: 96px; height: 96px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: radial-gradient(circle, rgba(212, 175, 55, 0.16), rgba(10, 10, 14, 0.4));
  display: flex; align-items: center; justify-content: center;
  padding: 11px;
}
.lz-compass-center svg { width: 100%; height: 100%; animation: lz-spin 60s linear infinite reverse; }
.lz-needle {
  position: absolute; left: 50%; top: 50%;
  width: 4px; height: 100px; margin: -100px 0 0 -2px;
  transform-origin: 50% 100%;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, rgba(212, 175, 55, 0));
  animation: lz-needle 4s ease-in-out infinite;
}
.lz-compass-text {
  margin: 0;
  font-family: var(--serif);
  font-size: 14px; letter-spacing: 0.3em;
  color: var(--tx-dim);
  animation: lz-fade 2.4s ease-in-out infinite;
}

/* ---------- 结果页 ---------- */
.lz-result { padding-top: 8px; }
.lz-meta-card {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 16px 14px;
  border: 1px solid var(--line-dim);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(22, 26, 34, 0.7), rgba(16, 18, 24, 0.8));
}
.lz-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line-dim);
  border-radius: 999px;
  background: var(--bg1);
  color: var(--tx-dim);
  font-size: 12.5px;
}
.lz-chip b { color: var(--gold-hi); font-weight: 500; }

.lz-block-title {
  display: flex; align-items: center; gap: 10px;
  margin: 28px 2px 12px;
  font-family: var(--serif);
  font-size: 17px; font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--gold-hi);
}
.lz-block-title::before { content: ""; width: 14px; height: 1px; background: var(--gold); opacity: 0.6; }
.lz-chart-body {
  padding: 16px 12px;
  border: 1px solid var(--line-dim);
  border-radius: var(--radius);
  background: var(--bg1);
}

/* ---------- 解读卡片 ---------- */
.lz-reading { display: flex; flex-direction: column; gap: 14px; }
.lz-reading-card {
  position: relative;
  padding: 16px;
  border: 1px solid var(--line-dim);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(22, 26, 34, 0.75), rgba(16, 18, 24, 0.8));
}
.lz-reading-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.lz-reading-title { font-family: var(--serif); font-size: 15.5px; letter-spacing: 0.1em; color: var(--gold-hi); }
.lz-reading-html { font-size: 14.5px; line-height: 1.85; color: var(--tx); }
.lz-reading-html p { margin: 0.45em 0; }
.lz-reading-source { margin-top: 10px; text-align: right; font-family: var(--serif); font-size: 12px; color: var(--tx-dim); }

.lz-badge {
  display: inline-flex; align-items: center;
  min-height: 24px; padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  font-family: var(--sans);
}
.lz-badge.ji { color: #211a06; background: linear-gradient(160deg, #e6c663, #b8912c); }
.lz-badge.xiong { color: #fff; background: linear-gradient(160deg, #c14b3d, #8c2a20); }
.lz-badge.ping { color: var(--gold-hi); border: 1px solid var(--line); }
.lz-badge.tip { color: #211a06; background: linear-gradient(160deg, #e6c663, #b8912c); }
.lz-badge.warn { color: #fff; background: linear-gradient(160deg, #c14b3d, #8c2a20); }

/* lead：大字总断金卡 */
.lz-reading-card.lead {
  padding: 22px 16px;
  border-color: rgba(212, 175, 55, 0.4);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.12), rgba(16, 18, 24, 0.85));
}
.lz-reading-card.lead .lz-reading-html {
  font-family: var(--serif);
  font-size: 20px; line-height: 1.8;
  color: var(--gold-hi);
}
.lz-num { font-family: var(--serif); font-weight: 600; color: var(--gold-hi); }

/* classical：古籍感 */
.lz-reading-card.classical { border-left: 2px solid var(--gold); }
.lz-reading-card.classical .lz-reading-html { font-family: var(--serif); font-size: 15px; color: #d9d4c5; }
.lz-reading-card.classical .lz-reading-html::before { content: "「"; color: var(--gold); }
.lz-reading-card.classical .lz-reading-html::after { content: "」"; color: var(--gold); }

/* case：案例卡 */
.lz-reading-card.case { border-style: dashed; border-color: rgba(212, 175, 55, 0.3); }

/* tip / warn：徽标色区分 */
.lz-reading-card.tip { border-left: 2px solid var(--gold); }
.lz-reading-card.warn { border-left: 2px solid var(--red); }
.lz-reading-card.warn .lz-reading-title { color: #e0a89f; }

/* ---------- 出处折叠面板 ---------- */
.lz-sources {
  margin-top: 22px;
  border: 1px solid var(--line-dim);
  border-radius: var(--radius);
  background: var(--bg1);
  overflow: hidden;
}
.lz-sources summary {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 44px; padding: 12px 16px;
  font-size: 14px; letter-spacing: 0.06em;
  color: var(--tx);
  cursor: pointer;
  -webkit-user-select: none; user-select: none;
}
.lz-sources summary::-webkit-details-marker { display: none; }
.lz-sources summary::after { content: "▾"; color: var(--gold); transition: transform 0.25s ease; }
.lz-sources[open] summary::after { transform: rotate(180deg); }
.lz-sources-body { display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow: auto; padding: 4px 14px 16px; }
.lz-source {
  padding: 12px;
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.05);
}
.lz-source-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.lz-source-name { font-family: var(--serif); font-size: 13.5px; color: var(--gold-hi); }
.lz-source-chapter { font-size: 12px; color: var(--tx-dim); }
.lz-source-quote {
  margin: 8px 0 0;
  padding-left: 10px;
  border-left: 2px solid rgba(212, 175, 55, 0.35);
  font-family: var(--serif);
  font-size: 13px; line-height: 1.8;
  color: #cfcabd;
}

.lz-disclaimer {
  max-width: 560px; margin: 26px auto 0;
  text-align: center;
  font-size: 11.5px; line-height: 1.8;
  color: #6f7360;
}
.lz-result-actions { display: flex; gap: 12px; margin-top: 22px; }
.lz-result-actions .lz-btn { flex: 1; }

/* ---------- 术数结构类（契约约定，术数队只管用） ---------- */
.lz-grid6 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.lz-grid12 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.lz-cell {
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  min-height: 66px; padding: 10px 6px;
  border: 1px solid var(--line-dim);
  border-radius: 12px;
  background: var(--bg1);
  text-align: center;
  overflow: hidden;
}
.lz-cell.active {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.14), rgba(212, 175, 55, 0.04));
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.25);
}
.lz-cell-head { font-size: 12px; color: var(--tx-dim); letter-spacing: 0.06em; }
.lz-cell-main { font-family: var(--serif); font-size: 20px; color: var(--gold-hi); }
.lz-cell-sub { font-size: 11.5px; color: var(--tx-dim); }
.lz-cell-tag {
  display: inline-block; align-self: center;
  padding: 1px 8px;
  border: 1px solid var(--line-dim);
  border-radius: 999px;
  font-size: 10.5px;
  color: var(--gold);
}

.lz-pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.lz-pillar {
  padding: 14px 6px 12px;
  border: 1px solid var(--line-dim);
  border-radius: 12px;
  background: var(--bg1);
  text-align: center;
  overflow: hidden;
}
.lz-pillar-head { font-size: 12px; color: var(--tx-dim); margin-bottom: 8px; letter-spacing: 0.08em; }
.lz-gan { display: block; font-family: var(--serif); font-size: 28px; line-height: 1.3; color: var(--gold-hi); }
.lz-zhi { display: block; font-family: var(--serif); font-size: 24px; line-height: 1.3; color: var(--tx); }
.lz-pillar-sub { display: block; margin-top: 8px; font-size: 10.5px; line-height: 1.6; color: var(--tx-dim); white-space: pre-line; }

.lz-bagua { display: flex; flex-direction: column; align-items: center; padding: 6px 0; }
.lz-gua-name {
  margin-bottom: 10px;
  font-family: var(--serif);
  font-size: 22px; letter-spacing: 0.24em;
  color: var(--gold);
}
.lz-yao {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 30px;
  font-family: var(--serif);
  font-size: 21px; letter-spacing: 0.35em;
  color: var(--gold-hi);
}
.lz-yao.move { color: var(--red); text-shadow: 0 0 10px rgba(176, 58, 46, 0.5); }
.lz-yao .yao-label { font-family: var(--sans); font-size: 11px; letter-spacing: 0.08em; color: var(--tx-dim); }
.lz-yao.move .yao-label { color: var(--red); }

.lz-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lz-table th, .lz-table td { padding: 9px 6px; text-align: center; border: 1px solid var(--line-dim); }
.lz-table th {
  background: rgba(212, 175, 55, 0.08);
  font-family: var(--serif); font-weight: 500; letter-spacing: 0.08em;
  color: var(--gold-hi);
}
.lz-table td { color: var(--tx); }
.lz-table tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }

.lz-tag {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid var(--line-dim);
  border-radius: 999px;
  font-size: 11px;
  color: var(--gold);
}

/* 通用兜底：未预见的自由结构 */
.lz-chart-body p, .lz-chart-body div, .lz-reading-html p, .lz-reading-html div { margin: 0.4em 0; }
.lz-chart-body strong, .lz-reading-html strong { color: var(--gold-hi); font-weight: 600; }
.lz-chart-body em, .lz-reading-html em { color: var(--gold); font-style: normal; }
.lz-chart-body ul, .lz-reading-html ul { margin: 0.5em 0; padding-left: 1.4em; }
.lz-chart-body h4, .lz-reading-html h4 { margin: 0.6em 0 0.3em; font-family: var(--serif); color: var(--gold-hi); font-weight: 600; }

/* ---------- 古法风水罗盘页（罗盘模块自带星宿背景，这里只包容器） ---------- */
.lz-fengshui-wrap {
  position: relative;
  margin: 16px -16px 0;
  min-height: 540px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 18px;
  background: #05060a;
  overflow: hidden;
}
.lz-fengshui-mount { position: relative; width: 100%; min-height: 540px; }
.lz-fengshui-note { text-align: center; font-size: 11.5px; color: #6f7360; padding: 14px 16px 0; }

/* ---------- 空态 / 404 ---------- */
.lz-notice {
  margin-top: 44px; padding: 44px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(16, 18, 24, 0.6);
}
.lz-notice-icon { font-size: 40px; color: var(--gold); opacity: 0.8; }
.lz-notice-title { margin: 14px 0 8px; font-family: var(--serif); font-size: 19px; letter-spacing: 0.12em; color: var(--gold-hi); }
.lz-notice-msg { margin: 0 auto 22px; max-width: 380px; font-size: 13px; line-height: 1.8; color: var(--tx-dim); }

/* ---------- ③④⑦ 显现 / 脉冲 / 上浮 ---------- */
.reveal { opacity: 0; transform: translateY(20px); }
.reveal.in { animation: lz-rise 0.65s cubic-bezier(0.22, 0.7, 0.32, 1) forwards; }
.reveal.in .rise { animation: lz-rise 0.7s cubic-bezier(0.22, 0.7, 0.32, 1) both; }
.reveal.in .rise.pulse {
  animation:
    lz-rise 0.7s cubic-bezier(0.22, 0.7, 0.32, 1) both,
    lz-pulse 2.6s ease-in-out 1s infinite;
}
.pulse { position: relative; display: inline-block; animation: lz-pulse 2.6s ease-in-out infinite; }
.pulse::before {
  content: "";
  position: absolute; inset: -7px -5px;
  border-radius: 12px;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.28);
  opacity: 0;
  animation: lz-glow 2.6s ease-in-out infinite;
  pointer-events: none;
}

/* ---------- 轻提示 ---------- */
.lz-toast {
  position: fixed; left: 50%; bottom: 46px;
  z-index: 200;
  max-width: 86vw;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(22, 26, 34, 0.96);
  color: var(--tx);
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.lz-toast.on { opacity: 1; transform: translate(-50%, 0); }
.lz-toast.err { border-color: rgba(176, 58, 46, 0.7); color: #f0b7ae; }

/* 自测页角标（tools/test-visual.html 用） */
.lz-test-banner {
  position: fixed; top: 10px; right: 12px; z-index: 300;
  padding: 4px 12px;
  border: 1px solid var(--line-dim);
  border-radius: 999px;
  background: rgba(16, 18, 24, 0.88);
  font-size: 11px; letter-spacing: 0.1em;
  color: var(--tx-dim);
}

/* ---------- keyframes（只动 transform/opacity） ---------- */
@keyframes lz-spin { to { transform: rotate(360deg); } }
@keyframes lz-rot-rev { to { transform: rotate(-360deg); } }
@keyframes lz-angle { to { --angle: 360deg; } }
@keyframes lz-breathe { 0%, 100% { opacity: 0.5; transform: scale(0.98); } 50% { opacity: 1; transform: scale(1.04); } }
@keyframes lz-needle { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(10deg); } }
@keyframes lz-fade { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes lz-coin-flip { 0% { transform: rotateX(0deg); } 100% { transform: rotateX(720deg); } }
@keyframes lz-rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes lz-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.09); } }
@keyframes lz-glow { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }

/* ---------- 断点 ---------- */
@media (min-width: 640px) {
  .lz-schools { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .lz-hero { padding: 72px 8px 44px; }
  .lz-fengshui-wrap { margin: 20px 0 0; }
  .lz-reading-card { padding: 20px; }
}
@media (min-width: 960px) {
  .lz-schools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lz-card { min-height: 184px; }
}

/* ---------- 动效降级：prefers-reduced-motion 全部静态 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .pulse::before { display: none; }
}
