/* 玄枢 · 视觉系统 v2 */
:root {
  --ink: #0d0c0a;
  --ink-deep: #080706;
  --card: #16130f;
  --card-hi: #1d1914;
  --gold: #b08d57;
  --gold-2: #d8b97f;
  --gold-3: #f2dfb8;
  --cinnabar: #b24b39;
  --paper: #f0e9db;
  --paper-2: #cabfae;
  --muted: #8a8172;
  --line: rgba(176, 141, 87, .24);
  --line-2: rgba(240, 233, 219, .075);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, sans-serif;
  --maxw: 1120px;
  --shadow-lg: 0 40px 90px -50px rgba(0, 0, 0, .95);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--paper);
  font-family: var(--sans);
  line-height: 1.7;
  background:
    radial-gradient(1100px 560px at 76% -6%, rgba(176, 141, 87, .16), transparent 60%),
    radial-gradient(760px 480px at 6% 12%, rgba(178, 75, 57, .08), transparent 58%),
    radial-gradient(900px 700px at 50% 112%, rgba(176, 141, 87, .07), transparent 60%),
    var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .03;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: rgba(216, 185, 127, .28); color: #fff; }

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: .05em; margin: 0; }
p { margin: 0; }
button { font-family: inherit; }

/* ---------------- 导航 ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 15px clamp(20px, 4vw, 54px);
  background: rgba(10, 9, 8, .72);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--line-2);
}
.nav::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(176, 141, 87, .45), transparent);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--gold-2);
  background: radial-gradient(circle at 30% 25%, rgba(176, 141, 87, .22), transparent 65%);
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-text { font-family: var(--serif); font-size: 21px; letter-spacing: .22em; line-height: 1; color: var(--paper); }
.brand-text em {
  display: block; margin-top: 5px;
  font-family: var(--sans); font-style: normal; font-size: 8.5px;
  letter-spacing: .46em; color: var(--gold);
}
.nav-links { display: flex; gap: 30px; margin-left: auto; font-size: 13.5px; letter-spacing: .18em; color: var(--paper-2); }
.nav-links a { position: relative; padding: 5px 0; transition: color .2s; }
.nav-links a::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
  transform: translateX(-50%); transition: width .3s var(--ease);
}
.nav-links a:hover { color: var(--gold-3); }
.nav-links a:hover::after { width: 130%; }
.nav-cta {
  padding: 9px 20px; font-size: 13px; letter-spacing: .1em; color: var(--gold-2);
  background: rgba(176, 141, 87, .06); border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer; transition: .25s;
}
.nav-cta:hover { background: rgba(176, 141, 87, .14); border-color: var(--gold); color: var(--gold-3); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 6vw, 88px) clamp(20px, 4vw, 54px) clamp(32px, 4vw, 56px);
  overflow: hidden;
}
.hero-glow {
  position: absolute; right: 2%; top: -6%;
  width: 46vw; height: 46vw; max-width: 660px; max-height: 660px;
  background: radial-gradient(closest-side, rgba(176, 141, 87, .2), transparent 70%);
  filter: blur(20px); pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); gap: clamp(24px, 4vw, 48px); align-items: center; }
.hero-copy { position: relative; z-index: 2; max-width: 620px; }
.hero-copy > * { animation: rise .9s var(--ease) both; }
.hero-copy > *:nth-child(1) { animation-delay: .04s; }
.hero-copy > *:nth-child(2) { animation-delay: .12s; }
.hero-copy > *:nth-child(3) { animation-delay: .2s; }
.hero-copy > *:nth-child(4) { animation-delay: .28s; }
.hero-copy > *:nth-child(5) { animation-delay: .36s; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 11.5px; letter-spacing: .4em; color: var(--gold); margin: 0;
}
.eyebrow-line { width: 34px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.hero h1 {
  margin-top: 22px;
  font-size: clamp(36px, 5.2vw, 68px);
  line-height: 1.18;
  letter-spacing: .08em;
  background: linear-gradient(180deg, #f8f1e3 4%, #e6d2a8 52%, #b9975f 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 18px 42px rgba(0, 0, 0, .5));
}
.lead { margin-top: 26px; max-width: 520px; font-size: 15px; color: var(--paper-2); }
.pc-only { display: inline; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 38px 0 0; padding: 0; list-style: none; }
.hero-meta li {
  font-size: 11.5px; letter-spacing: .16em; color: var(--muted);
  padding: 6px 13px; border: 1px solid var(--line-2); border-radius: 999px;
  background: rgba(255, 255, 255, .02);
}

/* 罗盘主视觉 */
.hero-visual { position: relative; display: flex; align-items: center; justify-content: center; min-height: 460px; }
.hero-visual::before {
  content: ""; position: absolute; width: 74%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(176, 141, 87, .2), transparent 66%);
  filter: blur(18px);
}
.orbit { position: relative; width: min(100%, 520px); height: auto; overflow: visible; animation: fade-scale 1.2s var(--ease) both .2s; }
.o-ring-faint { fill: none; stroke: rgba(176, 141, 87, .22); stroke-width: 1; }
.o-ring { fill: none; stroke: rgba(176, 141, 87, .55); stroke-width: 1; }
.o-dash { fill: none; stroke: rgba(216, 185, 127, .5); stroke-width: 1; stroke-dasharray: 2 11; }
.spin { transform-origin: 300px 300px; animation: spin 120s linear infinite; }
.spin-rev { transform-origin: 300px 300px; animation: spin 180s linear infinite reverse; }
.o-branches text { font-family: var(--serif); font-size: 21px; fill: #d6c092; opacity: .95; }
.o-core { fill: url(#coreGrad); }
.o-core-line { fill: none; stroke: rgba(176, 141, 87, .4); }
.o-mark line { stroke: rgba(216, 185, 127, .55); stroke-width: 2.4; stroke-linecap: round; }
.core {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; pointer-events: none;
}
.core-label { font-size: 9.5px; letter-spacing: .52em; color: var(--gold); opacity: .8; padding-left: .52em; }
.core-main {
  font-family: var(--serif); font-size: clamp(34px, 4.2vw, 56px);
  letter-spacing: .16em; padding-left: .16em;
  color: var(--gold-3);
  text-shadow: 0 0 34px rgba(216, 185, 127, .45);
  margin: 14px 0 8px;
}
.core-sub { font-size: 8.5px; letter-spacing: .34em; color: var(--muted); padding-left: .34em; }
.core-rule { width: 46px; height: 1px; background: linear-gradient(90deg, transparent, rgba(176, 141, 87, .7), transparent); margin: 4px 0; }

/* ---------------- 按钮 ---------------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 30px; border-radius: 999px;
  font-size: 14px; letter-spacing: .14em; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .18s, box-shadow .25s, background .25s, border-color .25s, color .25s;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn-primary {
  color: #20180f;
  background: linear-gradient(135deg, #f0d9ae, #d8b97f 45%, #b08d57);
  box-shadow: 0 14px 34px -16px rgba(216, 185, 127, .9), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.btn-primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, .5) 45%, transparent 70%);
  transform: translateX(-130%); transition: transform .7s var(--ease);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -16px rgba(216, 185, 127, .95); }
.btn-primary:hover::after { transform: translateX(130%); }
.btn-ghost { color: var(--paper); border-color: var(--line); background: rgba(255, 255, 255, .015); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-3); background: rgba(176, 141, 87, .08); }
.btn-block { width: 100%; margin-top: 26px; padding: 16px; font-size: 15px; }

/* ---------------- 主面板 ---------------- */
.stage { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 4vw, 54px) clamp(40px, 7vw, 80px); }
.panel {
  position: relative;
  max-width: 900px; margin: 0 auto;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(31, 27, 22, .96), rgba(19, 16, 12, .98));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .05), inset 0 0 70px rgba(0, 0, 0, .35);
  overflow: hidden;
}
.panel::before {
  content: ""; position: absolute; top: 0; left: 8%; right: 8%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216, 185, 127, .7), transparent);
}
.tabs { display: flex; gap: 6px; padding: 12px; background: rgba(0, 0, 0, .26); border-bottom: 1px solid var(--line-2); }
.tab {
  flex: 1; padding: 14px 12px; border-radius: 13px;
  border: 1px solid transparent; background: transparent;
  color: var(--muted); font-size: 14px; letter-spacing: .14em;
  cursor: pointer; transition: .25s;
}
.tab:hover { color: var(--paper-2); background: rgba(255, 255, 255, .03); }
.tab.is-active {
  color: var(--gold-3);
  background: linear-gradient(180deg, rgba(176, 141, 87, .2), rgba(176, 141, 87, .05));
  border-color: rgba(176, 141, 87, .38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 8px 20px -14px rgba(216, 185, 127, .8);
}
.tab-panel { display: none; padding: clamp(24px, 4vw, 40px); }
.tab-panel.is-active { display: block; animation: fade-up .5s var(--ease) both; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { margin-bottom: 22px; }
.field > label {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; letter-spacing: .18em; color: var(--paper-2); margin-bottom: 10px;
}
.field > label::before {
  content: ""; width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 9px rgba(216, 185, 127, .7);
}
.req { color: #d98a7a; font-size: 11px; letter-spacing: .08em; }
.opt { color: var(--muted); font-size: 11px; }

/* 分段控件 */
.segmented {
  display: inline-flex; gap: 4px; padding: 4px;
  border-radius: 14px; background: rgba(0, 0, 0, .34); border: 1px solid var(--line-2);
}
.seg {
  padding: 10px 20px; border: 1px solid transparent; border-radius: 10px;
  background: transparent; color: var(--muted); font-size: 13.5px; letter-spacing: .12em;
  cursor: pointer; transition: .22s;
}
.seg:hover { color: var(--paper-2); }
.seg.is-active {
  color: #22190f; font-weight: 600;
  background: linear-gradient(135deg, #eed6a8, #c9a86e);
  box-shadow: 0 8px 20px -10px rgba(216, 185, 127, .9);
}
.segmented-sm .seg { padding: 8px 16px; font-size: 13px; }

/* 输入控件 */
.date-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ctrl {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 12px; border-radius: 12px;
  background: rgba(0, 0, 0, .32); border: 1px solid var(--line-2);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.ctrl:focus-within {
  border-color: rgba(216, 185, 127, .7); background: rgba(176, 141, 87, .07);
  box-shadow: 0 0 0 3px rgba(176, 141, 87, .1);
}
.ctrl input {
  width: 64px; padding: 13px 0; border: none; outline: none; background: transparent;
  color: var(--paper); font-size: 16px; font-family: var(--sans); text-align: center;
}
.ctrl input::placeholder { color: #5c564d; }
.ctrl input::-webkit-outer-spin-button, .ctrl input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ctrl input[type=number] { -moz-appearance: textfield; }
.ctrl .unit { color: var(--muted); font-size: 12px; }
select {
  width: 100%; padding: 14px; border-radius: 12px;
  background-color: rgba(0, 0, 0, .32); border: 1px solid var(--line-2);
  color: var(--paper); font-size: 14px; font-family: var(--sans); outline: none;
  appearance: none; transition: .2s;
  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='%23b08d57' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
select:focus { border-color: rgba(216, 185, 127, .7); box-shadow: 0 0 0 3px rgba(176, 141, 87, .1); }
select option { background: #1d1914; color: var(--paper); }
.leap { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--paper-2); cursor: pointer; padding-left: 4px; }
input[type=checkbox] { accent-color: var(--gold); width: 15px; height: 15px; cursor: pointer; }
.check { display: inline-flex; align-items: center; gap: 9px; margin-top: 2px; font-size: 14px; color: var(--paper-2); cursor: pointer; }
.hint { margin-top: 10px; font-size: 12.5px; line-height: 1.75; color: var(--muted); }
.field-hint { margin-top: 7px; font-size: 11.5px; letter-spacing: .06em; color: var(--muted); }
.time-select { width: min(320px, 100%); }
.err {
  margin-top: 16px; padding: 11px 14px; border-radius: 11px;
  font-size: 13px; color: #e8a99c;
  background: rgba(178, 75, 57, .12); border: 1px solid rgba(178, 75, 57, .32);
}

/* 四柱输入 */
.pillar-inputs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.pillar-col { padding: 14px 12px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .16); }
.pillar-col h4 { font-family: var(--sans); font-size: 12.5px; letter-spacing: .18em; color: var(--gold); margin-bottom: 10px; }
.pillar-col select { margin-bottom: 8px; padding: 10px 12px; }

/* 合盘 */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.person {
  margin: 0; padding: 20px; border-radius: 16px;
  border: 1px solid var(--line-2); background: rgba(0, 0, 0, .16);
}
.person legend { padding: 0 8px; font-family: var(--serif); font-size: 15px; letter-spacing: .18em; color: var(--gold-2); }
.mini-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.mini-row.mini-time { grid-template-columns: repeat(2, 1fr); }
.mini-row input {
  width: 100%; padding: 12px 8px; text-align: center;
  font-size: 15px; font-family: var(--sans);
  background: rgba(0, 0, 0, .3); border: 1px solid var(--line-2); border-radius: 10px;
  color: var(--paper); outline: none; transition: .2s;
}
.mini-row input:focus { border-color: rgba(216, 185, 127, .7); box-shadow: 0 0 0 3px rgba(176, 141, 87, .1); }
.mini-row input::-webkit-outer-spin-button, .mini-row input::-webkit-inner-spin-button { -webkit-appearance: none; }
.person .segmented { width: 100%; }
.person .seg { flex: 1; }

/* ---------------- 结果 ---------------- */
.result { max-width: 900px; margin: 28px auto 0; animation: fade-up .55s var(--ease) both; }
.result-card {
  position: relative; overflow: hidden;
  padding: clamp(24px, 4vw, 40px);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(31, 27, 22, .96), rgba(19, 16, 12, .98));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.result-card::before {
  content: ""; position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216, 185, 127, .65), transparent);
}
.result-card + .result-card { margin-top: 24px; }
.result-head { padding-bottom: 22px; margin-bottom: 28px; border-bottom: 1px solid var(--line-2); }
.result-head h2 { font-size: 27px; letter-spacing: .14em; color: var(--gold-2); }
.result-head .sub { margin-top: 9px; font-size: 13px; line-height: 1.9; color: var(--paper-2); }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag {
  padding: 5px 12px; border-radius: 999px;
  font-size: 12px; letter-spacing: .08em; color: var(--paper-2);
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .02);
}
.tag strong { color: var(--gold-3); font-weight: 600; }

.pillar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pillar {
  position: relative; overflow: hidden; text-align: center;
  padding: 20px 10px 18px; border-radius: 16px;
  border: 1px solid var(--line-2);
  background: radial-gradient(130% 80% at 50% -10%, rgba(176, 141, 87, .12), transparent 70%), rgba(0, 0, 0, .18);
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.pillar::before {
  content: ""; position: absolute; top: 0; left: 15%; right: 15%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216, 185, 127, .6), transparent);
}
.pillar:hover { transform: translateY(-4px); border-color: var(--line); box-shadow: 0 18px 34px -24px rgba(0, 0, 0, .9); }
.pillar .plabel { font-size: 11.5px; letter-spacing: .24em; color: var(--muted); }
.pillar .shishen { margin-top: 6px; min-height: 18px; font-size: 12px; letter-spacing: .08em; color: var(--gold); }
.pillar .char { font-family: var(--serif); line-height: 1.16; }
.pillar .char span { display: block; font-size: 44px; }
.pillar .elem { margin-top: 3px; font-size: 10px; letter-spacing: .2em; opacity: .65; }
.pillar .hidden { margin-top: 7px; font-size: 12px; color: var(--muted); }
.pillar .nayin { margin-top: 9px; font-size: 12px; letter-spacing: .06em; color: var(--paper-2); }

[data-elem="木"] { color: #79b58a; }
[data-elem="火"] { color: #e07a68; }
[data-elem="土"] { color: #d2a868; }
[data-elem="金"] { color: #e3ddce; }
[data-elem="水"] { color: #7fb0d4; }

.block { margin-top: 34px; }
.block h3 {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px; font-size: 17px; letter-spacing: .2em; color: var(--gold-2);
}
.block h3::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }

.wx-list { display: grid; gap: 12px; }
.wx-item { display: grid; grid-template-columns: 34px 1fr 56px; align-items: center; gap: 12px; font-size: 13px; }
.wx-bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .05); overflow: hidden; }
.wx-bar i { display: block; height: 100%; border-radius: 999px; opacity: .9; transition: width .9s var(--ease); }
.wx-item .pc { text-align: right; color: var(--paper-2); font-variant-numeric: tabular-nums; }
.strength-box {
  margin-top: 20px; padding: 16px 18px;
  border-radius: 4px 12px 12px 4px;
  border: 1px solid var(--line-2); border-left: 2px solid rgba(216, 185, 127, .6);
  background: linear-gradient(90deg, rgba(176, 141, 87, .08), rgba(0, 0, 0, .16));
  font-size: 13.5px; color: var(--paper-2);
}
.strength-box strong { color: var(--gold-3); font-weight: 600; }

.dayun-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: thin; }
.dayun-scroll::-webkit-scrollbar { height: 6px; }
.dayun-scroll::-webkit-scrollbar-thumb { background: rgba(176, 141, 87, .4); border-radius: 999px; }
.dy {
  flex: 0 0 auto; min-width: 92px; padding: 14px 10px; text-align: center;
  border-radius: 14px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(0, 0, 0, .18));
  transition: transform .25s var(--ease), border-color .25s;
}
.dy:hover { transform: translateY(-3px); border-color: var(--line); }
.dy .age { font-size: 11px; letter-spacing: .04em; color: var(--muted); }
.dy .gz { margin-top: 4px; font-family: var(--serif); font-size: 25px; }
.liunian-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ln {
  padding: 7px 13px; border-radius: 999px; font-size: 12.5px;
  border: 1px solid var(--line-2); color: var(--paper-2); background: rgba(255, 255, 255, .02);
}
.ln b { margin-left: 5px; font-family: var(--serif); font-size: 14px; font-weight: 500; color: var(--paper); }
.disclaimer {
  margin-top: 30px; padding-top: 18px;
  border-top: 1px solid var(--line-2);
  font-size: 12px; line-height: 1.85; color: var(--muted);
}

/* 合盘结果 */
.score-ring { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.ring-wrap { position: relative; flex: 0 0 auto; width: 136px; height: 136px; }
.ring-wrap svg { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 8; }
.ring-fg { fill: none; stroke-width: 8; stroke-linecap: round; stroke-dasharray: 339.3; transition: stroke-dashoffset 1.2s var(--ease); }
.ring-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-num b { font-family: var(--serif); font-size: 38px; line-height: 1; color: var(--gold-2); }
.ring-num span { margin-top: 5px; font-size: 10.5px; letter-spacing: .2em; color: var(--muted); }
.score-text h3 { font-size: 22px; letter-spacing: .1em; color: var(--gold-2); margin-bottom: 7px; }
.score-text p { font-size: 14px; color: var(--paper-2); }
.duo-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; }
.mini-chart { padding: 18px; border-radius: 16px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .16); }
.mini-chart h4 { margin-bottom: 12px; font-family: var(--sans); font-size: 12.5px; letter-spacing: .16em; color: var(--gold); }
.mini-chart .four { display: flex; justify-content: space-between; font-family: var(--serif); font-size: 20px; }
.mini-chart .four > span { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.mini-chart .four em { margin-top: 3px; font-family: var(--sans); font-style: normal; font-size: 10px; letter-spacing: .12em; color: var(--muted); }
.notes { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.notes li { position: relative; padding-left: 18px; font-size: 13.5px; color: var(--paper-2); }
.notes li::before { content: "◇"; position: absolute; left: 0; top: 4px; font-size: 10px; color: var(--gold); }

/* ---------------- 关于 ---------------- */
.about { position: relative; z-index: 2; padding: clamp(40px, 7vw, 88px) clamp(20px, 4vw, 54px); border-top: 1px solid var(--line-2); }
.about-inner { max-width: var(--maxw); margin: 0 auto; }
.about h2 { margin-bottom: 18px; font-size: 28px; letter-spacing: .16em; color: var(--gold-2); }
.about > .about-inner > p { max-width: 720px; font-size: 14.5px; color: var(--paper-2); }
.about-grid { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 34px 0 26px; }
.about-grid > div {
  position: relative; padding: 24px 22px; border-radius: 16px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .02);
  counter-increment: step; transition: transform .25s var(--ease), border-color .25s, background .25s;
}
.about-grid > div::before {
  content: "0" counter(step); position: absolute; top: 14px; right: 18px;
  font-family: var(--serif); font-size: 30px; color: rgba(176, 141, 87, .22);
}
.about-grid > div:hover { transform: translateY(-4px); border-color: var(--line); background: rgba(176, 141, 87, .04); }
.about-grid h4 { margin-bottom: 8px; font-size: 15px; letter-spacing: .14em; color: var(--paper); }
.about-grid p { font-size: 13px; line-height: 1.8; color: var(--muted); }

.foot { position: relative; z-index: 2; padding: 26px; text-align: center; border-top: 1px solid var(--line-2); }
.foot-inner { font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.dot-sep { margin: 0 8px; opacity: .5; }

/* ---------------- 弹窗 ---------------- */
.modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0, 0, 0, .68); backdrop-filter: blur(8px); }
.modal-card {
  position: relative; width: min(430px, 100%); padding: 32px;
  border-radius: 20px; border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card-hi), var(--card));
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9);
  animation: fade-up .35s var(--ease) both;
}
.modal-card h3 { margin-bottom: 12px; font-size: 20px; letter-spacing: .1em; color: var(--gold-2); }
.modal-card p { font-size: 13.5px; color: var(--paper-2); }
.modal-close { position: absolute; top: 10px; right: 14px; border: none; background: none; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.modal-close:hover { color: var(--paper); }

/* ---------------- 动效 ---------------- */
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes fade-scale { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .85s var(--ease), transform .85s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual {
    position: absolute; right: -6%; top: 50%; transform: translateY(-50%);
    width: 58vw; min-height: 0; opacity: .14; z-index: 0; pointer-events: none;
  }
  .hero-visual::before { display: none; }
  .hero-copy { max-width: none; }
}

@media (max-width: 760px) {
  .nav { gap: 12px; }
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .hero { padding-top: 42px; }
  .hero-visual { display: none; }
  .hero h1 { letter-spacing: .06em; }
  .pc-only { display: none; }
  .hero-actions .btn { flex: 1; }
  .grid-2 { grid-template-columns: 1fr; gap: 0; }
  .pillar-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pillar-inputs { grid-template-columns: repeat(2, 1fr); }
  .pillar .char span { font-size: 34px; }
  .duo, .duo-charts, .about-grid { grid-template-columns: 1fr; }
  .tabs { padding: 8px; }
  .tab { padding: 12px 6px; font-size: 13px; letter-spacing: .08em; }
  .score-ring { gap: 18px; }
  .hero-meta { margin-top: 28px; }
}

/* ---------------- 表单分区与出生地点 ---------------- */
.panel { overflow: visible; }
.tabs { border-radius: 25px 25px 0 0; }

.form-section { padding: 22px 0 6px; margin-top: 18px; border-top: 1px dashed var(--line-2); }
.form-section:first-child { padding-top: 0; margin-top: 0; border-top: none; }
.form-title {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 7px; font-size: 21px; letter-spacing: .16em; color: var(--paper);
}
.form-title::before {
  content: ""; width: 3px; height: 20px; border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-2), rgba(176, 141, 87, .2));
}
.form-sub { margin: 0 0 15px; font-size: 12.5px; color: var(--muted); }

.loc-picker {
  margin-top: 15px; padding: 18px;
  border-radius: 16px; border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, .18);
  animation: fade-up .3s var(--ease) both;
}
.loc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.loc-grid-3 { grid-template-columns: repeat(3, 1fr); }
.combo-toggle:disabled { opacity: .35; cursor: not-allowed; }
.loc-field label { display: block; margin-bottom: 7px; font-size: 12px; letter-spacing: .14em; color: var(--paper-2); }
.combo { position: relative; }
.combo input {
  width: 100%; padding: 14px 78px 14px 14px; border-radius: 12px;
  background-color: rgba(0, 0, 0, .32); border: 1px solid var(--line-2);
  color: var(--paper); font-size: 14px; font-family: var(--sans); outline: none; transition: .2s;
}
.combo input:focus { border-color: rgba(216, 185, 127, .7); box-shadow: 0 0 0 3px rgba(176, 141, 87, .1); }
.combo input:disabled { opacity: .55; cursor: not-allowed; }
.combo input::placeholder { color: #5c564d; font-size: 13px; }
.combo-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: none; border-radius: 9px;
  background: none; color: var(--gold); font-size: 12px; cursor: pointer; transition: .2s;
}
.combo-toggle:hover { background: rgba(176, 141, 87, .12); }
.combo-clear {
  position: absolute; right: 42px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%; background: rgba(255, 255, 255, .08);
  color: var(--muted); font-size: 14px; line-height: 1; cursor: pointer; transition: .2s;
}
.combo-clear:hover { background: rgba(217, 117, 103, .22); color: #efc0b8; }
.combo-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30;
  max-height: 260px; overflow-y: auto; padding: 6px;
  border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(180deg, #211c16, #171310);
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .95);
}
.combo-item {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border: none; border-radius: 9px; background: none;
  color: var(--paper-2); font-size: 13.5px; text-align: left; cursor: pointer;
}
.combo-item:hover { background: rgba(176, 141, 87, .12); color: var(--gold-3); }
.combo-item em { font-style: normal; font-size: 11px; color: var(--muted); }
.combo-empty { padding: 16px; text-align: center; font-size: 12.5px; color: var(--muted); }
.loc-selected { margin-top: 12px; font-size: 13px; color: var(--gold-2); }
.check-solar { margin-top: 12px; }

@media (max-width: 760px) {
  .loc-grid { grid-template-columns: 1fr; }
  .form-title { font-size: 19px; }
}

/* ---------------- 账号、命盘记录与提示 ---------------- */
.nav-user { position: relative; display: flex; align-items: center; }
.user-chip { position: relative; }
.chip-btn {
  display: flex; align-items: center; gap: 9px; padding: 6px 14px 6px 6px;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(176, 141, 87, .06);
  color: var(--paper); cursor: pointer; transition: .2s;
}
.chip-btn:hover { border-color: var(--gold); background: rgba(176, 141, 87, .12); }
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #eed6a8, #b08d57); color: #20180f;
  font-family: var(--serif); font-size: 14px;
}
.chip-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; letter-spacing: .06em; }
.chev { font-size: 10px; color: var(--muted); }
.user-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; min-width: 170px; padding: 8px;
  border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card-hi), var(--card));
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .9);
  animation: fade-up .2s var(--ease) both;
}
.user-menu button {
  display: block; width: 100%; padding: 10px 12px; border: none; border-radius: 9px;
  background: none; color: var(--paper-2); font-size: 13px; text-align: left;
  letter-spacing: .06em; cursor: pointer;
}
.user-menu button:hover { background: rgba(176, 141, 87, .1); color: var(--gold-3); }

.auth-card { width: min(660px, 100%); padding: 38px 42px 34px; }
.auth-card h3 { margin-bottom: 6px; font-size: 30px; letter-spacing: .16em; }
.auth-back {
  display: inline-block; margin-top: 8px; padding: 0; border: none; background: none;
  color: var(--muted); font-size: 12.5px; letter-spacing: .08em; cursor: pointer;
}
.auth-back:hover { color: var(--gold-3); }
.auth-sub { margin-top: 14px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.auth-tabs {
  display: flex; gap: 30px; margin: 26px 0 28px; padding: 0;
  border: none; border-bottom: 1px solid var(--line-2); border-radius: 0; background: none;
}
.auth-tab {
  flex: 0 0 auto; padding: 0 0 12px; border: none; border-radius: 0; background: none;
  color: var(--muted); font-size: 14px; letter-spacing: .1em; cursor: pointer; transition: .2s;
  border-bottom: 2px solid transparent;
}
.auth-tab.is-active { color: var(--gold-3); font-weight: 600; background: none; border-bottom-color: var(--gold-2); }
.auth-field { margin-bottom: 18px; }
.auth-label-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.auth-label-row label { font-size: 13px; letter-spacing: .08em; color: var(--paper-2); }
.auth-help {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line);
  color: var(--muted); font-size: 11px; cursor: help;
}
.auth-field > input, .auth-input-wrap input {
  width: 100%; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, .3); color: var(--paper); font-size: 14px;
  font-family: var(--sans); outline: none; transition: .2s;
}
.auth-field > input:focus, .auth-input-wrap input:focus {
  border-color: rgba(216, 185, 127, .7); box-shadow: 0 0 0 3px rgba(176, 141, 87, .1);
}
.auth-input-wrap { position: relative; }
.auth-input-wrap input { padding-right: 54px; }
.auth-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border: none; border-radius: 8px; background: none; color: var(--muted); cursor: pointer;
}
.auth-eye svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.auth-eye:hover, .auth-eye.is-visible { color: var(--gold-2); }
.auth-consent { display: flex; align-items: flex-start; width: 100%; margin: 4px 0 16px; font-size: 12px; line-height: 1.7; }
.auth-consent input { flex: 0 0 auto; width: 17px; height: 17px; margin: 2px 0 0; accent-color: #c9a86e; }
#authRememberWrap { margin: 4px 0 18px; }
.auth-forgot-tip { margin: 0 0 18px; font-size: 12.5px; line-height: 1.8; color: var(--paper-2); }
.auth-submit { margin-top: 8px; padding: 15px; font-size: 15px; letter-spacing: .12em; }
.auth-recovery-note {
  margin-top: 14px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid rgba(216, 185, 127, .38); background: rgba(176, 141, 87, .08);
  font-size: 12.5px; line-height: 1.8; color: var(--gold-3);
}
.field-sm { margin-bottom: 14px; }
.field-sm label { display: block; margin-bottom: 7px; font-size: 12px; letter-spacing: .16em; color: var(--paper-2); }
.field-sm input {
  width: 100%; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, .32); color: var(--paper); font-size: 14px;
  font-family: var(--sans); outline: none; transition: .2s;
}
.field-sm input:focus { border-color: rgba(216, 185, 127, .7); box-shadow: 0 0 0 3px rgba(176, 141, 87, .1); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 64px; }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  padding: 5px 8px; border: none; border-radius: 7px; background: rgba(176, 141, 87, .1);
  color: var(--gold-2); font-size: 11.5px; cursor: pointer;
}
.check-sm { font-size: 12.5px; margin-top: 2px; }
.auth-tip { margin-top: 14px; text-align: center; font-size: 11.5px; color: var(--muted); }
.auth-forgot-tip { margin: 0 0 14px; font-size: 12px; line-height: 1.75; color: var(--paper-2); }

.save-btn {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 7px 14px;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(176, 141, 87, .07);
  color: var(--gold-2); font-size: 12.5px; letter-spacing: .08em; cursor: pointer; transition: .2s;
}
.save-btn:hover { background: rgba(176, 141, 87, .16); border-color: var(--gold); color: var(--gold-3); }
.save-btn.is-saved { color: var(--muted); border-color: var(--line-2); background: rgba(255, 255, 255, .02); cursor: default; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.result-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line-2);
}
.result-topbar .result-actions { margin-top: 0; }
.result-topbar-label { font-size: 11px; letter-spacing: .18em; color: var(--muted); }
.save-btn-primary {
  border-color: transparent; font-weight: 600;
  background: linear-gradient(135deg, #eed6a8, #c9a86e); color: #22190f;
}
.save-btn-primary:hover { background: linear-gradient(135deg, #f7e6c2, #d5b47c); color: #22190f; }
.save-btn-primary.is-saved { background: rgba(255, 255, 255, .04); color: var(--muted); font-weight: 400; }

/* 结果内页签 */
.rtabs {
  display: flex; gap: 2px; margin: 0 0 26px;
  border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: thin;
}
.rtab {
  position: relative; flex: 0 0 auto; padding: 11px 16px; border: none; background: none;
  color: var(--muted); font-size: 13.5px; letter-spacing: .14em; cursor: pointer; transition: .2s;
}
.rtab:hover { color: var(--gold-2); }
.rtab.is-active { color: var(--gold-2); }
.rtab.is-active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px;
  border-radius: 2px; background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
}
.rpanel { display: none; }
.rpanel.is-active { display: block; animation: fade-up .35s var(--ease) both; }

/* 专业细盘 */
.detail-block { margin-top: 34px; }
.detail-block:first-child { margin-top: 0; }
.detail-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.detail-title h3 { font-size: 19px; letter-spacing: .18em; color: var(--gold-2); }
.detail-title span { font-size: 11.5px; letter-spacing: .12em; color: var(--muted); }
.detail-overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.ov-item { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .16); }
.ov-item span { display: block; font-size: 11px; letter-spacing: .16em; color: var(--muted); }
.ov-item b { display: block; margin-top: 3px; font-family: var(--serif); font-size: 17px; color: var(--gold-3); font-weight: 500; }
.detail-scroll { overflow-x: auto; border: 1px solid var(--line-2); border-radius: 14px; background: rgba(0, 0, 0, .14); scrollbar-width: thin; }
.detail-table { width: 100%; border-collapse: collapse; min-width: 600px; font-size: 12.5px; }
.detail-table th, .detail-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); text-align: center; vertical-align: middle; }
.detail-table th:last-child, .detail-table td:last-child { border-right: none; }
.detail-table tr:last-child th, .detail-table tr:last-child td { border-bottom: none; }
.detail-table thead th { font-weight: 500; font-size: 12px; letter-spacing: .14em; color: var(--gold); background: rgba(176, 141, 87, .06); }
.detail-table .rowhead { width: 72px; text-align: left; font-weight: 400; color: var(--muted); white-space: nowrap; background: rgba(255, 255, 255, .015); }
.detail-table .gz-big { font-family: var(--serif); font-size: 20px; }
.detail-table em { display: inline-block; margin: 0 4px 0 1px; font-style: normal; font-size: 10.5px; color: var(--muted); }
.detail-table .dim { color: var(--muted); }
.detail-table .warn { color: #e0a05a; font-weight: 500; }
.detail-table .ss {
  display: inline-block; margin: 2px; padding: 2px 7px; border-radius: 999px;
  border: 1px solid var(--line-2); font-size: 10.5px; color: var(--gold-2);
}
.detail-table.compact { min-width: 760px; }
.detail-table.compact td { padding: 9px 10px; }
.detail-table.compact b { display: block; font-family: var(--serif); font-size: 16px; font-weight: 500; color: var(--paper); }
.detail-table.compact em { display: block; margin: 2px 0 0; white-space: nowrap; }
.detail-sub { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 24px 0 12px; }
.detail-sub h4 { font-size: 14.5px; letter-spacing: .18em; color: var(--gold-2); }
.detail-sub span { font-size: 11px; color: var(--muted); }
.rel-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.rel-tag { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .02); font-size: 12px; color: var(--paper-2); }
.detail-note { margin-top: 12px; font-size: 11.5px; line-height: 1.8; color: var(--muted); }

/* 基础排盘 · 古籍检索与 AI 解读 */
.study-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.study-head h3 { font-size: 18px; letter-spacing: .16em; color: var(--gold-2); }
.study-head span { font-size: 11px; color: var(--muted); }
.study-tabs {
  display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 18px;
  border: 1px solid var(--line-2); border-radius: 12px; background: rgba(0, 0, 0, .18);
}
.study-tab {
  padding: 8px 18px; border: none; border-radius: 9px; background: none;
  color: var(--muted); font-size: 12.5px; letter-spacing: .1em; cursor: pointer; transition: .2s;
}
.study-tab:hover { color: var(--gold-2); }
.study-tab.is-active { color: #22190f; font-weight: 600; background: linear-gradient(135deg, #eed6a8, #c9a86e); }
.study-panel { display: none; }
.study-panel.is-active { display: block; animation: fade-up .3s var(--ease) both; }
.classic-source { display: block; margin-top: 8px; font-size: 11px; font-style: normal; color: var(--muted); letter-spacing: .04em; }
.ai-intro { margin-bottom: 16px; font-size: 12px; line-height: 1.8; color: var(--muted); }
.ai-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.ai-card {
  padding: 16px; border-radius: 14px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(0, 0, 0, .14));
}
.ai-card h4 { margin-bottom: 8px; font-size: 13px; letter-spacing: .14em; color: var(--gold-2); }
.ai-card p { font-size: 13px; line-height: 1.9; color: var(--paper-2); }

/* 古籍参详 */
.classic-tabs {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin;
  padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid var(--line-2);
}
.ctab {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; border: 1px solid transparent;
  background: none; color: var(--muted); font-size: 12.5px; letter-spacing: .08em; cursor: pointer; transition: .2s;
}
.ctab:hover { color: var(--gold-2); }
.ctab.is-active { color: #22190f; font-weight: 600; background: linear-gradient(135deg, #eed6a8, #c9a86e); }
.classic-hint { margin-bottom: 18px; font-size: 11.5px; color: var(--muted); }
.classic-panel {
  display: none; padding: 20px; border-radius: 16px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(0, 0, 0, .16));
}
.classic-panel.is-active { display: block; animation: fade-up .3s var(--ease) both; }
.classic-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.classic-head h4 { font-size: 18px; letter-spacing: .16em; color: var(--gold-2); }
.classic-head span { font-size: 11.5px; letter-spacing: .08em; color: var(--muted); }
.classic-note { margin-bottom: 16px; font-size: 11px; color: var(--muted); }
.cv-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.cv-tab {
  padding: 6px 13px; border-radius: 8px; border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, .2); color: var(--muted); font-size: 12px; cursor: pointer; transition: .2s;
}
.cv-tab.is-active { color: var(--gold-3); border-color: rgba(176, 141, 87, .55); background: rgba(176, 141, 87, .12); }
.cv-panel { display: none; }
.cv-panel.is-active { display: block; }
.classic-sec { padding: 14px 0; border-top: 1px dashed rgba(240, 233, 219, .08); }
.classic-sec:first-child { padding-top: 0; border-top: none; }
.classic-sec h5 { margin-bottom: 8px; font-family: var(--sans); font-size: 12.5px; letter-spacing: .16em; color: var(--gold); }
.classic-sec p { font-size: 13.5px; line-height: 1.95; color: var(--paper-2); }
.classic-sec blockquote {
  margin: 0; padding: 12px 16px; border-left: 2px solid rgba(216, 185, 127, .5);
  border-radius: 0 10px 10px 0; background: rgba(176, 141, 87, .07);
  font-family: var(--serif); font-size: 14px; line-height: 2; color: var(--paper);
}
.classic-para {
  margin: 0 0 10px; font-family: var(--serif); font-size: 13.5px; line-height: 2;
  color: var(--paper-2); text-align: justify;
}
.classic-para:last-child { margin-bottom: 0; }

/* 深度解读：外部 AI / 付费咨询 */
.deep-wrap { animation: fade-up .3s var(--ease) both; }
.deep-intro {
  margin-bottom: 14px; padding: 12px 14px; border-radius: 11px;
  border: 1px solid var(--line-2); background: rgba(176, 141, 87, .06);
  font-size: 12px; line-height: 1.8; color: var(--paper-2);
}
.deep-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.deep-card {
  padding: 20px; border-radius: 16px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(0, 0, 0, .16));
}
.deep-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.deep-card-head h4 { font-size: 16px; letter-spacing: .14em; color: var(--gold-2); }
.deep-card-head span { font-size: 10.5px; color: var(--muted); letter-spacing: .06em; }
.deep-form { display: grid; gap: 9px; margin-bottom: 12px; }
.deep-field { display: grid; gap: 5px; font-size: 11px; letter-spacing: .06em; color: var(--muted); }
.deep-field input, .deep-field select {
  width: 100%; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, .24); color: var(--paper); font-size: 12.5px; outline: none;
}
.deep-field input:focus, .deep-field select:focus { border-color: rgba(216, 185, 127, .55); }
.deep-actions { display: flex; gap: 8px; margin-bottom: 10px; }
.deep-run {
  padding: 10px 18px; border: none; border-radius: 9px;
  background: linear-gradient(135deg, #eed6a8, #c9a86e); color: #22190f;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; cursor: pointer;
}
.deep-run:disabled { opacity: .62; cursor: wait; }
.deep-clear {
  padding: 10px 14px; border-radius: 9px; border: 1px solid var(--line-2);
  background: none; color: var(--muted); font-size: 12.5px; cursor: pointer;
}
.deep-clear:hover { color: var(--gold-3); border-color: var(--gold); }
.deep-note { margin-top: 10px; font-size: 11px; line-height: 1.8; color: var(--muted); }
.deep-note b { color: var(--gold-3); }
.deep-lead { margin-bottom: 12px; font-size: 12px; line-height: 1.85; color: var(--paper-2); }
.plan-list { display: grid; gap: 9px; margin-bottom: 10px; }
.plan-card { padding: 12px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .18); }
.plan-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.plan-top h5 { font-size: 13.5px; letter-spacing: .08em; color: var(--gold-2); }
.plan-top b { flex: 0 0 auto; font-family: var(--serif); font-size: 16px; color: var(--gold-3); }
.plan-card p { margin: 6px 0 9px; font-size: 11.5px; line-height: 1.75; color: var(--muted); }
.plan-btn {
  width: 100%; padding: 8px; border-radius: 8px; border: 1px solid rgba(216, 185, 127, .45);
  background: rgba(176, 141, 87, .1); color: var(--gold-3); font-size: 12px;
  letter-spacing: .08em; cursor: pointer; transition: .2s;
}
.plan-btn:hover { background: rgba(176, 141, 87, .2); }
.ticket-box {
  margin-top: 12px; padding: 14px; border-radius: 12px;
  border: 1px solid rgba(216, 185, 127, .35); background: rgba(176, 141, 87, .08);
}
.ticket-label { font-size: 10.5px; letter-spacing: .14em; color: var(--muted); }
.ticket-code { margin: 3px 0; font-family: var(--serif); font-size: 22px; letter-spacing: .12em; color: var(--gold-3); }
.ticket-meta { font-size: 11px; color: var(--muted); line-height: 1.7; }
.ticket-actions { margin-top: 8px; }
.ticket-actions button {
  padding: 7px 14px; border-radius: 8px; border: 1px solid rgba(216, 185, 127, .45);
  background: rgba(0, 0, 0, .18); color: var(--gold-3); font-size: 12px; cursor: pointer;
}
.ai-output {
  margin-top: 12px; padding: 16px; border-radius: 12px; max-height: 560px; overflow: auto;
  border: 1px solid var(--line-2); background: rgba(0, 0, 0, .22);
}
.ai-output-head { margin-bottom: 10px; font-size: 12.5px; letter-spacing: .14em; color: var(--gold-2); }
.ai-output p { margin-bottom: 10px; font-size: 13px; line-height: 1.95; color: var(--paper-2); }
.ai-loading { color: var(--gold-3); }
.ai-error { color: #e3a08a; }

.drawer { position: fixed; inset: 0; z-index: 95; display: flex; justify-content: flex-end; }
.drawer-mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .62); backdrop-filter: blur(4px); opacity: 0; transition: opacity .28s var(--ease); }
.drawer-panel {
  position: relative; width: min(460px, 92vw); height: 100%; padding: 26px 24px; overflow-y: auto;
  background: linear-gradient(180deg, #1d1914, #14110d); border-left: 1px solid var(--line);
  box-shadow: -30px 0 70px -30px rgba(0, 0, 0, .9);
  transform: translateX(100%); transition: transform .32s var(--ease);
}
.drawer.show .drawer-mask { opacity: 1; }
.drawer.show .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.drawer-head h3 { font-size: 22px; letter-spacing: .14em; color: var(--gold-2); }
.drawer-sub { margin-bottom: 16px; font-size: 12px; line-height: 1.7; color: var(--muted); }
.drawer-actions { display: flex; gap: 10px; margin-bottom: 18px; }
.btn-mini {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .02); color: var(--paper-2); font-size: 12.5px; cursor: pointer; transition: .2s;
}
.btn-mini:hover { border-color: var(--gold); color: var(--gold-3); }
.records-list { display: grid; gap: 10px; }
.record {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .18);
}
.record-main b { display: block; font-family: var(--serif); font-size: 16px; letter-spacing: .06em; color: var(--paper); }
.record-main span { display: block; margin-top: 3px; font-size: 12px; color: var(--paper-2); }
.record-main em { display: block; margin-top: 3px; font-style: normal; font-size: 11px; color: var(--muted); }
.record-btns { display: flex; flex: 0 0 auto; gap: 6px; }
.record-btns button {
  padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: none;
  color: var(--paper-2); font-size: 11.5px; cursor: pointer; transition: .2s;
}
.record-btns button:hover { border-color: var(--gold); color: var(--gold-3); }
.record-empty { padding: 36px 18px; text-align: center; font-size: 13px; color: var(--muted); border: 1px dashed var(--line-2); border-radius: 14px; }

.toast {
  position: fixed; left: 50%; bottom: 30px; z-index: 120;
  transform: translate(-50%, 14px); padding: 11px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(29, 25, 20, .96);
  color: var(--gold-3); font-size: 13px; letter-spacing: .06em;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .9); opacity: 0;
  transition: .25s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .chip-name { display: none; }
  .user-menu { right: auto; left: 0; }
  .detail-overview { grid-template-columns: repeat(2, 1fr); }
  .result-actions .save-btn { flex: 1; justify-content: center; }
  .result-topbar .result-actions { width: 100%; }
  .rtab { padding: 10px 12px; }
  .study-tabs { display: flex; width: 100%; }
  .study-tab { flex: 1; padding: 8px 10px; }
  .ai-grid { grid-template-columns: 1fr; }
  .deep-grid { grid-template-columns: 1fr; }
  .deep-card { padding: 16px 14px; }
  .classic-panel { padding: 16px 14px; }
  .classic-sec blockquote { font-size: 13.5px; }
  .auth-card { padding: 26px 20px 24px; }
  .auth-card h3 { font-size: 26px; }
  .auth-tabs { gap: 18px; }
  .auth-tab { font-size: 13px; }
}