/* ============================================================
 * style.css — 灵机妙算 · 深色国风
 * 墨黑 × 鎏金 × 朱红
 * ============================================================ */

:root {
  --bg-0: #0b0910;
  --bg-1: #12101a;
  --bg-2: #1a1725;
  --bg-3: #221e31;
  --card: rgba(28, 24, 40, 0.82);
  --card-solid: #1c1828;
  --line: rgba(212, 175, 106, 0.22);
  --line-soft: rgba(212, 175, 106, 0.12);
  --gold: #d4af6a;
  --gold-bright: #eccd8a;
  --gold-dim: #a8864a;
  --cinnabar: #c13a2e;
  --cinnabar-bright: #e05245;
  --text: #eae4d4;
  --text-dim: #a99f8b;
  --text-faint: #7a7261;
  --green: #5fb878;
  --red: #e05245;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --radius: 14px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background-color: var(--bg-0);
  background-image:
    radial-gradient(ellipse 60% 40% at 50% -5%, rgba(212, 175, 106, 0.10), transparent 60%),
    radial-gradient(ellipse 40% 30% at 90% 30%, rgba(193, 58, 46, 0.07), transparent 60%),
    linear-gradient(180deg, rgba(11, 9, 16, 0.70) 0%, rgba(11, 9, 16, 0.88) 100%),
    url('../images/bg.jpg?v=202608202220');
  background-size: 100% 60%, 60% 50%, cover, cover;
  background-position: 50% 0%, 90% 30%, center, center;
  background-repeat: no-repeat;
  background-attachment: scroll, scroll, fixed, fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
}

/* 小屏幕避免 background-attachment: fixed 造成滚动卡顿 */
@media (max-width: 860px) {
  body { background-attachment: scroll; }
}

::selection { background: rgba(212, 175, 106, 0.35); }

/* ===== 顶栏 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 9, 16, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-badge {
  font-size: 26px;
  color: var(--gold);
  animation: spin-slow 24s linear infinite;
  display: inline-block;
}

@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

.brand-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 4px;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 55%, var(--gold-dim));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--text-faint);
  align-self: flex-end;
  margin-bottom: 3px;
}

.main-nav { display: flex; gap: 6px; }

.main-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.25s;
  letter-spacing: 1px;
}

.main-nav a:hover { color: var(--text); background: rgba(212, 175, 106, 0.08); }

.main-nav a.active {
  color: var(--gold-bright);
  border-color: var(--line);
  background: rgba(212, 175, 106, 0.1);
}

/* ===== 页面容器 ===== */
.page { max-width: 1100px; margin: 0 auto; padding: 28px 24px 80px; }

.view { display: none; }
.view.active { display: block; animation: fade-up 0.5s ease both; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  text-align: center;
  padding: 56px 20px 44px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(212, 175, 106, 0.06), transparent 55%);
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }

.bg-glyph {
  position: absolute;
  font-family: var(--serif);
  color: rgba(212, 175, 106, 0.07);
  font-size: 110px;
  user-select: none;
}
.g1 { top: 8px; left: 6%; font-size: 84px; }
.g2 { bottom: 4px; right: 8%; }
.g3 { top: 30px; right: 20%; font-size: 60px; color: rgba(193, 58, 46, 0.08); }
.g4 { bottom: 30px; left: 24%; font-size: 64px; color: rgba(193, 58, 46, 0.08); }
.g5 { top: 55%; left: 46%; font-size: 46px; }
.g6 { top: 10%; right: 40%; font-size: 38px; }
.g7 { bottom: 16%; right: 30%; font-size: 40px; }
.g8 { bottom: 10%; left: 12%; font-size: 44px; }

.hero-content { position: relative; z-index: 2; }

.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 8px;
  color: var(--gold);
  margin-bottom: 18px;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(30px, 4.6vw, 48px);
  font-weight: 700;
  letter-spacing: 6px;
  margin-bottom: 20px;
}

.hero-title-accent { color: var(--cinnabar-bright); }

.hero-desc {
  max-width: 640px;
  margin: 0 auto 26px;
  color: var(--text-dim);
  font-size: 14.5px;
  letter-spacing: 0.5px;
}

.hero-desc b { color: var(--gold-bright); font-weight: 600; }

.hero-badges { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

.badge {
  font-size: 12px;
  color: var(--gold-bright);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 5px 14px;
  background: rgba(212, 175, 106, 0.06);
  letter-spacing: 1px;
}

/* ===== 表单 ===== */
.form-card {
  margin-top: 26px;
  background: var(--card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: var(--shadow);
}

.form-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--gold-bright);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-title-icon { color: var(--cinnabar-bright); }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field.span-2 { grid-column: span 2; }

.field label {
  font-size: 13.5px;
  color: var(--text);
  letter-spacing: 1px;
  font-weight: 600;
}

.field label em {
  font-style: normal;
  color: var(--text-faint);
  font-weight: 400;
  font-size: 12px;
}

.field-hint { font-size: 12px; color: var(--text-faint); margin-top: 2px; }

select, input[type="date"], input[type="text"] {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--sans);
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

input[type="text"] {
  cursor: text;
  letter-spacing: 1px;
}
input[type="text"]::placeholder { color: var(--text-faint); letter-spacing: 0; }

/* 自定义下拉箭头：让选择框外观一目了然 */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23c9a26a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 6px;
  padding-right: 30px;
}

select:hover, select:focus, input[type="date"]:focus, input[type="text"]:hover, input[type="text"]:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 106, 0.15);
  outline: none;
}

select option { background: var(--bg-2); color: var(--text); }

/* 出生时间：年月日时分 下拉选择组 */
.datetime-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  align-items: end;
}
.sel-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sel-label {
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 1px;
  padding-left: 2px;
  font-weight: 600;
}
.sel-field select {
  width: 100%;
  text-align: center;
  padding: 10px 22px 10px 6px;
  font-size: 14px;
  background-position: right 8px center;
}

/* 出生地点：省市区 三级联动 */
.region-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1.4fr;
  gap: 10px;
  align-items: end;
}

/* 性别 */
.gender-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.gender-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  color: var(--text-dim);
  border-radius: 10px;
  font-size: 14px;
  font-family: var(--sans);
  cursor: pointer;
  transition: all 0.25s;
  letter-spacing: 1px;
}

.gender-btn .g-icon { font-size: 18px; }

.gender-btn.male.active {
  border-color: #4a7fd4;
  color: #9ec2ff;
  background: rgba(74, 127, 212, 0.12);
}

.gender-btn.female.active {
  border-color: #d4578e;
  color: #ffb3d6;
  background: rgba(212, 87, 142, 0.12);
}

/* 开关 */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 12px 16px;
}

.switch-label { display: flex; align-items: center; gap: 6px; font-size: 14px; }

.switch-tip {
  color: var(--gold);
  cursor: help;
  font-size: 13px;
}

.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  inset: 0;
  background: var(--bg-3);
  border: 1px solid var(--line-soft);
  border-radius: 100px;
  transition: all 0.3s;
  cursor: pointer;
}

.slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: var(--text-faint);
  border-radius: 50%;
  transition: all 0.3s;
}

.switch input:checked + .slider {
  background: rgba(212, 175, 106, 0.25);
  border-color: var(--gold);
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
  background: var(--gold-bright);
}

/* 按钮 */
.form-actions { display: flex; gap: 14px; margin-top: 26px; }

.btn-primary {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  font-size: 16px;
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: 4px;
  color: #1a1308;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 60%, #b8945a);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 8px 24px rgba(212, 175, 106, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(212, 175, 106, 0.35);
}

.btn-primary:active { transform: none; }

.btn-icon { font-size: 18px; }

.btn-ghost {
  padding: 0 26px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-dim);
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s;
  font-family: var(--sans);
}

.btn-ghost:hover { color: var(--text); border-color: var(--gold); }

.form-note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
  letter-spacing: 1px;
}

/* ===== 加载动画 ===== */
.loading {
  text-align: center;
  padding: 70px 20px;
}

.loading-wheel {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--gold);
  border-right-color: var(--cinnabar);
  animation: spin 1.2s linear infinite;
}

.loading-wheel span {
  font-size: 32px;
  color: var(--gold);
  animation: spin-slow 8s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text { font-size: 16px; color: var(--gold-bright); letter-spacing: 2px; font-family: var(--serif); }
.loading-sub { font-size: 12.5px; color: var(--text-faint); margin-top: 8px; letter-spacing: 1px; }

/* ===== 结果区通用 ===== */
.result { margin-top: 28px; }

.result-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.card-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.card-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.section-tag {
  font-size: 11px;
  color: var(--cinnabar-bright);
  border: 1px solid rgba(193, 58, 46, 0.4);
  padding: 2px 10px;
  border-radius: 100px;
  letter-spacing: 2px;
}

/* 命主信息条 */
.master-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(90deg, rgba(212, 175, 106, 0.08), transparent);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  margin-bottom: 20px;
}

.master-info { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.master-day {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  color: var(--gold-bright);
}

.master-meta { font-size: 13px; color: var(--text-dim); }
.master-meta b { color: var(--text); font-weight: 600; }
.master-name {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--gold-bright);
  letter-spacing: 2px;
  font-weight: 700;
}

.tags { display: flex; gap: 8px; flex-wrap: wrap; }

.tag {
  font-size: 12px;
  color: var(--gold-bright);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 3px 12px;
  background: rgba(212, 175, 106, 0.06);
}

/* ===== 四柱命盘 ===== */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.pillar {
  text-align: center;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 16px 10px;
  background: linear-gradient(180deg, rgba(212, 175, 106, 0.05), transparent);
  position: relative;
  transition: all 0.25s;
}

.pillar:hover { border-color: var(--gold); transform: translateY(-3px); }

.pillar.day { border-color: rgba(193, 58, 46, 0.5); background: linear-gradient(180deg, rgba(193, 58, 46, 0.1), transparent); }

.pillar-label {
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.pillar-day-label {
  color: var(--cinnabar-bright);
  font-weight: 700;
}

.pillar-shishen {
  font-size: 12px;
  color: var(--gold);
  margin-bottom: 4px;
  letter-spacing: 1px;
  min-height: 18px;
}

.pillar-gan {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 700;
  line-height: 1.1;
}

.pillar-zhi {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 700;
  line-height: 1.1;
  color: #cfd6e4;
}

.pillar-nayin { font-size: 11px; color: var(--text-faint); margin-top: 8px; letter-spacing: 1px; }

.pillar-canggan { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line-soft); }

.cg-item { font-size: 11px; color: var(--text-dim); display: flex; justify-content: center; gap: 6px; }
.cg-item .cg-ss { color: var(--text-faint); }

.pillar-shensha {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}

.shensha-chip {
  font-size: 10px;
  color: var(--cinnabar-bright);
  border: 1px solid rgba(193, 58, 46, 0.35);
  border-radius: 100px;
  padding: 1px 8px;
  background: rgba(193, 58, 46, 0.06);
}

/* 时间信息条 */
.time-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.time-chip {
  font-size: 12px;
  color: var(--text-dim);
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 6px 12px;
}

.time-chip b { color: var(--gold-bright); font-weight: 600; }

/* ===== 五行 ===== */
.wuxing-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.wx-item { text-align: center; }

.wx-name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.wx-bar-bg {
  height: 10px;
  background: var(--bg-3);
  border-radius: 100px;
  overflow: hidden;
  margin: 6px 0;
}

.wx-bar {
  height: 100%;
  border-radius: 100px;
  transition: width 0.8s ease;
}

.wx-pct { font-size: 13px; color: var(--text-dim); }

.wx-mark { font-size: 10px; color: var(--cinnabar-bright); margin-left: 2px; }

.wx-dominant { font-size: 13px; color: var(--text-dim); }
.wx-dominant b { color: var(--gold-bright); }

/* ===== 解读文案 ===== */
.interpret p {
  font-size: 14.5px;
  color: var(--text-dim);
  line-height: 2;
  text-align: justify;
  text-indent: 2em;
  margin-bottom: 10px;
}

.interpret p:last-child { margin-bottom: 0; }

.interpret b { color: var(--gold-bright); font-weight: 600; }

.interpret-greet {
  text-indent: 0 !important;
  color: var(--gold) !important;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ===== 大运 ===== */
.dayun-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.dayun-table th {
  text-align: left;
  color: var(--text-faint);
  font-weight: 500;
  font-size: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  letter-spacing: 1px;
}

.dayun-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(212, 175, 106, 0.07);
  color: var(--text-dim);
}

.dayun-table tr:last-child td { border-bottom: none; }

.dayun-table tr:hover td { background: rgba(212, 175, 106, 0.04); }

.dayun-gz {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  color: var(--gold-bright);
}

.dayun-verdict {
  font-size: 12.5px;
  padding: 2px 10px;
  border-radius: 100px;
  white-space: nowrap;
}

.v-use { color: var(--green); border: 1px solid rgba(95, 184, 120, 0.4); background: rgba(95, 184, 120, 0.08); }
.v-ji { color: var(--red); border: 1px solid rgba(224, 82, 69, 0.4); background: rgba(224, 82, 69, 0.08); }
.v-mid { color: var(--gold); border: 1px solid var(--line); background: rgba(212, 175, 106, 0.08); }

.qi-note {
  font-size: 12.5px;
  color: var(--text-faint);
  margin-bottom: 14px;
  padding: 10px 14px;
  background: var(--bg-2);
  border-radius: 8px;
  border: 1px solid var(--line-soft);
}

/* ===== 流年 ===== */
.liunian-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.ln-item {
  text-align: center;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 12px 6px;
  transition: all 0.25s;
  background: var(--bg-2);
}

.ln-item:hover { border-color: var(--gold); transform: translateY(-2px); }

.ln-item.current {
  border-color: var(--cinnabar);
  background: rgba(193, 58, 46, 0.1);
}

.ln-year { font-size: 11px; color: var(--text-faint); }
.ln-item.current .ln-year { color: var(--cinnabar-bright); }

.ln-gz { font-family: var(--serif); font-size: 22px; font-weight: 700; margin: 4px 0; color: var(--text); }

.ln-ss { font-size: 11px; color: var(--gold); }

.ln-now { font-size: 10px; color: var(--cinnabar-bright); letter-spacing: 2px; margin-top: 3px; }

/* ===== 板块页通用 ===== */
.view-head { text-align: center; padding: 40px 0 26px; }

.view-title {
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: 6px;
  color: var(--gold-bright);
  margin-bottom: 10px;
}

.view-desc { font-size: 13.5px; color: var(--text-faint); letter-spacing: 1px; }

/* ===== 今日宜忌 ===== */
.almanac-card {
  max-width: 780px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 30px 34px;
  box-shadow: var(--shadow);
}

.almanac-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 20px;
}

.almanac-date { font-family: var(--serif); font-size: 20px; letter-spacing: 2px; color: var(--text); }
.almanac-date b { color: var(--gold-bright); }

.almanac-gz {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gz-chip {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--gold-bright);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 12px;
  background: rgba(212, 175, 106, 0.06);
}

.almanac-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }

.almanac-col h3 {
  font-size: 14px;
  letter-spacing: 3px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.almanac-col.yi h3 { color: var(--green); }
.almanac-col.ji h3 { color: var(--red); }

.almanac-col ul { list-style: none; }

.almanac-col li {
  font-size: 13.5px;
  color: var(--text-dim);
  padding: 7px 0;
  padding-left: 18px;
  position: relative;
}

.almanac-col.yi li::before { content: "◆"; position: absolute; left: 0; top: 7px; font-size: 9px; color: var(--green); }
.almanac-col.ji li::before { content: "◇"; position: absolute; left: 0; top: 7px; font-size: 9px; color: var(--red); }

.almanac-chong {
  margin-top: 22px;
  padding: 14px 18px;
  background: var(--bg-2);
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--text-dim);
  line-height: 2;
}

.almanac-chong b { color: var(--gold-bright); }

/* ===== 灵签 ===== */
.lottery-card {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 44px 34px;
  box-shadow: var(--shadow);
}

.lottery-cylinder {
  position: relative;
  width: 150px;
  height: 180px;
  margin: 0 auto 30px;
}

.cylinder-body {
  position: absolute;
  inset: 10px 10px 34px;
  background: linear-gradient(160deg, var(--bg-3), var(--bg-2) 70%);
  border: 1px solid var(--line);
  border-radius: 46% 46% 12% 12% / 30% 30% 8% 8%;
  box-shadow: inset 0 -10px 24px rgba(0,0,0,0.4), 0 12px 30px rgba(0,0,0,0.35);
}

.stick {
  position: absolute;
  bottom: 22px;
  font-size: 30px;
  color: var(--gold);
  font-weight: 200;
  transform-origin: bottom center;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.stick.s1 { left: 30px; transform: rotate(-14deg); }
.stick.s2 { left: 48px; transform: rotate(-8deg); }
.stick.s3 { left: 66px; transform: rotate(-2deg); }
.stick.s4 { left: 84px; transform: rotate(4deg); }
.stick.s5 { left: 102px; transform: rotate(10deg); }
.stick.s6 { left: 40px; transform: rotate(-11deg); bottom: 14px; }
.stick.s7 { left: 58px; transform: rotate(-5deg); bottom: 12px; }
.stick.s8 { left: 76px; transform: rotate(1deg); bottom: 12px; }
.stick.s9 { left: 94px; transform: rotate(7deg); bottom: 14px; }

.cylinder-base {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  text-align: center;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--gold);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 4px 0 2px;
  background: var(--bg-3);
  letter-spacing: 4px;
}

.lottery-card .btn-primary { margin-top: 8px; }

.lottery-result { margin-top: 28px; text-align: left; }

.qian-card {
  background: linear-gradient(180deg, rgba(212, 175, 106, 0.07), transparent);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 26px;
}

.qian-level { font-size: 12px; letter-spacing: 3px; margin-bottom: 8px; }
.lv-shang { color: var(--gold-bright); }
.lv-zhong { color: #9fd0f0; }
.lv-xia { color: var(--text-faint); }

.qian-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text);
  margin-bottom: 14px;
}

.qian-poem {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--gold-bright);
  line-height: 2.2;
  margin-bottom: 14px;
  white-space: pre-line;
}

.qian-desc { font-size: 13.5px; color: var(--text-dim); line-height: 2; text-align: justify; }

.qian-anim { animation: qian-pop 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }

@keyframes qian-pop {
  from { opacity: 0; transform: translateY(26px) scale(0.94); }
  to { opacity: 1; transform: none; }
}

/* ===== 页脚 ===== */
.site-footer {
  border-top: 1px solid var(--line-soft);
  text-align: center;
  padding: 34px 24px 40px;
  background: rgba(11, 9, 16, 0.6);
}

.footer-brand {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 4px;
  color: var(--gold);
  margin-bottom: 12px;
}

.footer-note { font-size: 12px; color: var(--text-faint); line-height: 2; max-width: 640px; margin: 0 auto 12px; }

.footer-copy { font-size: 11px; color: #5c564a; letter-spacing: 1px; }

/* ===== 通用工具 ===== */
.hidden { display: none !important; }

.fade-in { animation: fade-up 0.45s ease both; }

/* ===== 响应式 ===== */
@media (max-width: 860px) {
  .form-grid { grid-template-columns: 1fr; }
  .field.span-2 { grid-column: span 1; }
  .datetime-row { grid-template-columns: repeat(3, 1fr); }
  .region-row { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .wuxing-grid { grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .liunian-grid { grid-template-columns: repeat(3, 1fr); }
  .almanac-grid { grid-template-columns: 1fr; }
  .hero { padding: 40px 14px 32px; }
}

@media (max-width: 520px) {
  .header-inner { flex-direction: column; gap: 8px; padding: 10px 16px; }
  .brand-sub { display: none; }
  .main-nav a { font-size: 13px; padding: 6px 10px; }
  .form-card { padding: 20px 16px; }
  .hero-title { font-size: 26px; letter-spacing: 3px; }
}

/* ============================================================
 * AI 深度推演
 * ============================================================ */

/* --- 顶栏 AI 设置按钮 --- */
.ai-gear {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(212, 175, 106, 0.16), rgba(212, 175, 106, 0.06));
  border: 1px solid var(--line);
  color: var(--gold-bright);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-family: var(--sans);
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}
.ai-gear:hover {
  background: linear-gradient(135deg, rgba(212, 175, 106, 0.28), rgba(212, 175, 106, 0.1));
  box-shadow: 0 0 0 3px rgba(212, 175, 106, 0.15);
}
.ai-gear-icon { font-size: 14px; }

/* --- 解读卡片内 AI 面板 --- */
.ai-panel {
  margin-top: 18px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(212, 175, 106, 0.06), rgba(212, 175, 106, 0.015));
}
.ai-panel-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.ai-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 55%, var(--gold-dim));
  color: #1a1410;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}
.ai-panel-title { font-size: 14.5px; font-weight: 600; color: var(--text); }
.ai-panel-sub { font-size: 12px; color: var(--text-faint); flex: 1 1 auto; }
.btn-ai {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 55%, var(--gold-dim));
  color: #1a1410;
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.25s, filter 0.25s;
  box-shadow: 0 4px 14px rgba(212, 175, 106, 0.25);
}
.btn-ai:hover { filter: brightness(1.08); box-shadow: 0 6px 18px rgba(212, 175, 106, 0.35); }
.btn-ai:active { transform: scale(0.97); }
.btn-ai:disabled { opacity: 0.55; cursor: wait; filter: none; }

/* --- AI 生成状态 --- */
.ai-status {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
}
.ai-status .spin {
  width: 16px; height: 16px;
  border: 2px solid var(--line);
  border-top-color: var(--gold-bright);
  border-radius: 50%;
  animation: ai-spin 0.9s linear infinite;
}
@keyframes ai-spin { to { transform: rotate(360deg); } }

/* --- AI 输出区 --- */
.ai-output {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(11, 9, 16, 0.55);
  border: 1px solid var(--line-soft);
  font-size: 14.5px;
  line-height: 2;
  color: var(--text-dim);
  text-align: justify;
  max-height: 620px;
  overflow-y: auto;
}
.ai-output.typing::after {
  content: '▍';
  color: var(--gold-bright);
  animation: ai-blink 0.85s step-end infinite;
  margin-left: 2px;
}
@keyframes ai-blink { 50% { opacity: 0; } }
.ai-output p { margin-bottom: 10px; text-indent: 0; }
.ai-output p:last-child { margin-bottom: 0; }
.ai-output b { color: var(--gold-bright); font-weight: 600; }
.ai-output h4.ai-h {
  font-size: 15px;
  color: var(--gold-bright);
  margin: 14px 0 6px;
  padding-left: 10px;
  border-left: 3px solid var(--gold-dim);
  text-indent: 0;
}
.ai-output h5.ai-h {
  font-size: 14px;
  color: var(--gold);
  margin: 10px 0 4px;
  text-indent: 0;
}
.ai-output ul { margin: 6px 0 10px 1.2em; padding: 0; }
.ai-output li { margin-bottom: 4px; }
.ai-output blockquote {
  margin: 10px 0;
  padding: 8px 14px;
  border-left: 3px solid var(--line);
  background: rgba(212, 175, 106, 0.05);
  color: var(--text-dim);
  border-radius: 0 8px 8px 0;
}
.ai-err {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(224, 82, 69, 0.08);
  border: 1px solid rgba(224, 82, 69, 0.35);
  color: #e88a80;
  font-size: 13px;
  line-height: 1.8;
}
.ai-err b { color: #f0a89f; }

/* --- 模态弹窗 --- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6, 5, 10, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(212, 175, 106, 0.08);
  animation: modal-in 0.3s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 12px;
  border-bottom: 1px solid var(--line-soft);
}
.modal-title { font-size: 16px; font-weight: 600; color: var(--gold-bright); }
.modal-close {
  background: none;
  border: 1px solid var(--line-soft);
  color: var(--text-dim);
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}
.modal-close:hover { color: var(--text); border-color: var(--gold); }
.modal-body { padding: 16px 22px 22px; }
.ai-modal-sub { font-size: 12.5px; color: var(--text-faint); line-height: 1.8; margin-bottom: 14px; }

.ai-field-label {
  display: block;
  font-size: 12.5px;
  color: var(--text-dim);
  margin: 14px 0 6px;
}
.ai-field-label em { font-style: normal; color: var(--text-faint); font-size: 11.5px; }

.modal-body input[type="text"], .modal-body input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-0);
  border: 1px solid var(--line-soft);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-family: var(--sans);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.modal-body input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 106, 0.15);
  outline: none;
}
.modal-body input::placeholder { color: var(--text-faint); }

/* --- 服务商卡片 --- */
.ai-provider-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.ai-provider {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  background: var(--bg-0);
  border: 1px solid var(--line-soft);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: var(--sans);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}
.ai-provider:hover { border-color: var(--line); }
.ai-provider.active {
  border-color: var(--gold);
  background: rgba(212, 175, 106, 0.09);
  box-shadow: 0 0 0 3px rgba(212, 175, 106, 0.12);
}
.ai-provider .p-name { font-weight: 600; }
.ai-provider .p-tag {
  font-size: 11px;
  color: #7ecf8a;
  border: 1px solid rgba(126, 207, 138, 0.4);
  border-radius: 999px;
  padding: 1px 8px;
}
.ai-provider .p-tag.paid { color: var(--gold-dim); border-color: var(--line); }

.ai-note {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--gold-dim);
  line-height: 1.9;
  border-radius: 8px;
  background: rgba(212, 175, 106, 0.05);
  padding: 8px 12px;
}
.ai-ollama-status {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.8;
  border-radius: 8px;
  padding: 8px 12px;
}
.ai-ollama-status.ok {
  color: #7ecf8a;
  background: rgba(126, 207, 138, 0.07);
  border: 1px solid rgba(126, 207, 138, 0.25);
}
.ai-ollama-status.miss {
  color: var(--text-faint);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.modal-actions .btn-primary, .modal-actions .btn-ghost { flex: 1; justify-content: center; }

.ai-test-result {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.8;
}
.ai-test-result.ok {
  color: #7ecf8a;
  background: rgba(126, 207, 138, 0.07);
  border: 1px solid rgba(126, 207, 138, 0.25);
}
.ai-test-result.fail {
  color: #e88a80;
  background: rgba(224, 82, 69, 0.08);
  border: 1px solid rgba(224, 82, 69, 0.35);
}
.p-badge {
  display: inline-block;
  font-size: 10px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 4px;
  color: #0e1410;
  background: linear-gradient(135deg, var(--gold), #f4d58c);
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}
.ai-builtin-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #9fd8b0;
  border: 1px solid rgba(106, 213, 141, 0.35);
  background: rgba(106, 213, 141, 0.08);
}
.ai-builtin-note b { color: #c8f0d3; }
.ai-adv {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  padding: 4px 14px 14px;
}
.ai-adv summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--text-dim);
  padding: 10px 0;
  user-select: none;
  list-style: none;
}
.ai-adv summary::-webkit-details-marker { display: none; }
.ai-adv summary::before { content: '▸ '; color: var(--gold); }
.ai-adv[open] summary::before { content: '▾ '; }
.ai-adv summary:hover { color: var(--gold); }
.ai-adv .ai-field-label { margin-top: 12px; }
.ai-adv .modal-actions { margin-top: 14px; }

@media (max-width: 640px) {
  .ai-provider-list { grid-template-columns: 1fr; }
  .ai-panel-head { flex-direction: column; align-items: flex-start; }
  .btn-ai { width: 100%; justify-content: center; }
}

/* ===== 时柱速查（五鼠遁 · 随时分下拉实时联动） ===== */
.hour-guide {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(212, 175, 106, 0.28);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(212, 175, 106, 0.07), rgba(212, 175, 106, 0.03));
}
.hg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 10px;
}
.hg-title { font-size: 13px; color: var(--text-dim); letter-spacing: 0.5px; }
.hg-daygan { color: var(--gold-bright); font-size: 15px; padding: 0 2px; }
.hg-koujue { font-size: 11px; color: var(--text-faint); }
.hg-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.hg-item {
  text-align: center;
  padding: 7px 2px 6px;
  border: 1px solid rgba(212, 175, 106, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  cursor: default;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.hg-sc { display: block; font-size: 12px; color: var(--text-dim); }
.hg-range { display: block; font-size: 10px; color: var(--text-faint); margin: 2px 0 3px; }
.hg-gz { display: block; font-size: 16px; font-weight: 700; letter-spacing: 1px; color: var(--gold); }
.hg-item.active {
  border-color: var(--gold-bright);
  background: rgba(212, 175, 106, 0.18);
  box-shadow: 0 0 12px rgba(212, 175, 106, 0.25), inset 0 0 8px rgba(212, 175, 106, 0.08);
}
.hg-item.active .hg-gz { color: #fff; }
.hg-item.active .hg-sc { color: var(--gold-bright); }
.hg-foot {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.hg-now { color: var(--gold-bright); font-size: 14px; }
.hg-shift { color: var(--gold); margin-left: 6px; }
.hg-shift b { color: var(--gold-bright); }
@media (max-width: 620px) {
  .hg-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
 * 在线即时算命问答（浮动按钮 + 面板）
 * 豆包风：大圆角、大留白、头像、悬浮输入、欢迎区
 * ============================================================ */
.chat-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 55%, var(--gold-dim));
  color: #1a1308;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(212, 175, 106, 0.28), 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s, box-shadow 0.25s;
  user-select: none;
  font-family: var(--serif);
}
.chat-fab:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 40px rgba(212, 175, 106, 0.35), 0 6px 16px rgba(0, 0, 0, 0.3);
}
.chat-fab-icon {
  font-size: 22px;
  animation: chatFabSpin 16s linear infinite;
  display: inline-block;
}
@keyframes chatFabSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.chat-fab-label {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
}
.chat-fab.hidden { display: none; }

.chat-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 310;
  width: 480px;
  max-width: calc(100vw - 32px);
  height: 720px;
  max-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, #181324 0%, #13101c 55%, #0f0c15 100%);
  border: 1px solid rgba(212, 175, 106, 0.18);
  border-radius: 26px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(212, 175, 106, 0.06);
  opacity: 0;
  transform: translateY(28px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}
.chat-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* --- 顶栏 --- */
.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(212, 175, 106, 0.1);
  background: linear-gradient(180deg, rgba(212, 175, 106, 0.07), transparent);
  flex-shrink: 0;
}
.chat-head-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.chat-head-text { min-width: 0; }
.chat-head-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: 1.5px;
  line-height: 1.3;
}
.chat-head-sub {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 2px;
  letter-spacing: 0.5px;
}
.chat-head-tag {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-dim);
  background: rgba(212, 175, 106, 0.06);
  margin-left: 8px;
  white-space: nowrap;
}
.chat-head-tag.on {
  color: #7ecf8a;
  border-color: rgba(126, 207, 138, 0.4);
  background: rgba(126, 207, 138, 0.1);
}
.chat-head-actions { display: flex; gap: 6px; }
.chat-head-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.chat-head-btn:hover {
  color: var(--gold-bright);
  background: rgba(212, 175, 106, 0.12);
  border-color: rgba(212, 175, 106, 0.2);
}

/* --- 头像 --- */
.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.chat-avatar.head-avatar {
  width: 42px;
  height: 42px;
  font-size: 22px;
  background: linear-gradient(135deg, rgba(212, 175, 106, 0.22), rgba(212, 175, 106, 0.08));
  border: 1px solid rgba(212, 175, 106, 0.25);
  box-shadow: 0 0 16px rgba(212, 175, 106, 0.12);
}
.ai-avatar {
  background: linear-gradient(135deg, rgba(212, 175, 106, 0.2), rgba(212, 175, 106, 0.06));
  border: 1px solid rgba(212, 175, 106, 0.22);
  color: var(--gold-bright);
  font-size: 16px;
}
.user-avatar {
  background: linear-gradient(135deg, rgba(95, 184, 120, 0.2), rgba(95, 184, 120, 0.06));
  border: 1px solid rgba(95, 184, 120, 0.25);
  color: #9ee6b3;
  font-size: 13px;
  font-weight: 600;
}

/* --- 主体区域 --- */
.chat-body {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* --- 欢迎区 --- */
.chat-welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 36px 36px;
  text-align: center;
  animation: fade-up 0.45s ease both;
}
.chat-welcome-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  background: linear-gradient(135deg, rgba(212, 175, 106, 0.18), rgba(212, 175, 106, 0.05));
  border: 1px solid rgba(212, 175, 106, 0.2);
  box-shadow: 0 12px 40px rgba(212, 175, 106, 0.12);
  margin-bottom: 22px;
}
.chat-welcome-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}
.chat-welcome-desc {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.8;
  max-width: 340px;
  margin-bottom: 28px;
}
.chat-welcome-chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 360px;
}
.chat-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 106, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 13.5px;
  font-family: var(--sans);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.chat-chip:hover {
  color: var(--gold-bright);
  border-color: rgba(212, 175, 106, 0.45);
  background: rgba(212, 175, 106, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(212, 175, 106, 0.12);
}
.chat-chip .chip-icon { font-size: 16px; line-height: 1; }
.chat-chip .chip-label { line-height: 1; }

/* --- 消息列表 --- */
.chat-msg-list {
  flex: 1;
  overflow-y: auto;
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scroll-behavior: smooth;
}
.chat-msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 92%;
  animation: msg-in 0.3s ease both;
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.chat-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.chat-ai { align-self: flex-start; }
.chat-bubble {
  padding: 13px 17px;
  border-radius: 18px;
  font-size: 14.5px;
  line-height: 1.75;
  word-break: break-word;
  border: 1px solid transparent;
}
.chat-user .chat-bubble {
  background: linear-gradient(135deg, rgba(212, 175, 106, 0.22), rgba(212, 175, 106, 0.12));
  border-color: rgba(212, 175, 106, 0.25);
  color: var(--text);
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.chat-ai .chat-bubble {
  background: rgba(28, 24, 40, 0.92);
  border-color: rgba(212, 175, 106, 0.14);
  color: var(--text);
  border-bottom-left-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
.chat-bubble p { margin: 0 0 8px; }
.chat-bubble p:last-child { margin-bottom: 0; }
.chat-bubble b, .chat-bubble strong { color: var(--gold-bright); font-weight: 600; }
.chat-bubble ul { margin: 8px 0 10px 20px; }
.chat-bubble li { margin: 4px 0; }
.chat-bubble h4, .chat-bubble h5 {
  color: var(--gold-bright);
  font-family: var(--serif);
  margin: 12px 0 8px;
  font-size: 15.5px;
}
.chat-bubble blockquote {
  margin: 8px 0;
  padding: 6px 14px;
  border-left: 3px solid var(--gold-dim);
  background: rgba(212, 175, 106, 0.05);
  color: var(--text-dim);
  font-size: 13.5px;
  border-radius: 0 10px 10px 0;
}
.chat-msg.typing .chat-bubble::after {
  content: '▍';
  color: var(--gold-bright);
  animation: chatBlink 0.85s step-end infinite;
  margin-left: 2px;
}
@keyframes chatBlink { 50% { opacity: 0; } }

/* --- 输入区 --- */
.chat-input-wrap {
  flex-shrink: 0;
  padding: 14px 18px 18px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.35), transparent 80%);
}
.chat-input-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-input-box {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 8px 8px 8px 16px;
  border-radius: 22px;
  border: 1px solid rgba(212, 175, 106, 0.18);
  background: rgba(20, 17, 30, 0.95);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.chat-input-box:focus-within {
  border-color: rgba(212, 175, 106, 0.4);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(212, 175, 106, 0.08);
}
.chat-input {
  flex: 1;
  resize: none;
  min-height: 28px;
  max-height: 120px;
  padding: 8px 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  outline: none;
}
.chat-input::placeholder { color: var(--text-faint); }
.chat-send {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 60%, var(--gold-dim));
  color: #1a1308;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(212, 175, 106, 0.25);
}
.chat-send svg { margin-left: 1px; }
.chat-send:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(212, 175, 106, 0.35);
}
.chat-send.chat-stop {
  background: linear-gradient(135deg, var(--cinnabar), var(--cinnabar-bright));
  color: #fff;
}
.chat-send.hidden { display: none; }
.chat-input-tip {
  text-align: center;
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.5px;
}

/* --- 响应式 --- */
@media (max-width: 640px) {
  .chat-fab { right: 16px; bottom: 16px; padding: 12px 18px; }
  .chat-fab-label { font-size: 14px; }
  .chat-panel {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    max-width: none;
    max-height: none;
    border-radius: 20px;
  }
  .chat-head { padding: 14px 16px; }
  .chat-head-title { font-size: 16px; }
  .chat-welcome { padding: 24px; }
  .chat-welcome-chips { grid-template-columns: 1fr; max-width: 280px; }
  .chat-msg-list { padding: 16px; gap: 14px; }
  .chat-msg { max-width: 95%; }
  .chat-bubble { padding: 11px 14px; font-size: 14px; }
  .chat-input-wrap { padding: 12px 14px 14px; }
}

/* ============================================================
 * 生命密码测算页面
 * ============================================================ */

/* --- 命数大圆 --- */
.lc-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.lc-hero-number {
  position: relative;
  width: 130px;
  height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lc-hero-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: radial-gradient(circle, rgba(212, 175, 106, 0.15), transparent 70%);
  animation: lc-glow 3s ease-in-out infinite alternate;
}
.lc-hero-ring::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 106, 0.15);
}
@keyframes lc-glow {
  from { box-shadow: 0 0 20px rgba(212, 175, 106, 0.15); }
  to { box-shadow: 0 0 40px rgba(212, 175, 106, 0.3); }
}
.lc-hero-num {
  font-family: var(--serif);
  font-size: 68px;
  font-weight: 700;
  color: var(--gold-bright);
  line-height: 1;
  z-index: 2;
  text-shadow: 0 0 24px rgba(212, 175, 106, 0.4);
}
.lc-hero-label {
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 4px;
  margin-top: 4px;
  z-index: 2;
}
.lc-hero-info { flex: 1; min-width: 200px; }
.lc-hero-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 3px;
  margin-bottom: 8px;
}
.lc-hero-keyword {
  font-size: 15px;
  color: var(--gold-bright);
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.lc-hero-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.lc-meta-chip {
  font-size: 12px;
  color: var(--text-dim);
  border: 1px solid var(--line-soft);
  border-radius: 100px;
  padding: 4px 14px;
  background: var(--bg-2);
}
.lc-meta-chip b { color: var(--gold-bright); font-weight: 600; }

/* --- 推演过程 --- */
.lc-date-display {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--text-dim);
  margin-bottom: 16px;
  letter-spacing: 1px;
}
.lc-steps {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.lc-steps-birthday { margin-bottom: 0; }
.lc-step-label {
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 2px;
  margin-right: 6px;
}
.lc-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  font-size: 16px;
  color: var(--text-dim);
  font-family: var(--serif);
  font-weight: 600;
  transition: all 0.2s;
}
.lc-step.final {
  background: linear-gradient(135deg, rgba(212, 175, 106, 0.25), rgba(212, 175, 106, 0.1));
  border-color: var(--gold);
  color: var(--gold-bright);
  font-size: 22px;
  min-width: 52px;
  height: 44px;
  box-shadow: 0 0 16px rgba(212, 175, 106, 0.2);
}
.lc-step.master {
  background: linear-gradient(135deg, rgba(193, 58, 46, 0.2), rgba(212, 175, 106, 0.15));
  border-color: var(--cinnabar);
  color: var(--cinnabar-bright);
}
.lc-step-arrow {
  color: var(--text-faint);
  font-size: 14px;
}
.lc-master-note {
  margin-top: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(193, 58, 46, 0.08), rgba(212, 175, 106, 0.06));
  border: 1px solid rgba(193, 58, 46, 0.25);
  border-radius: 12px;
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 2;
}
.lc-master-note b { color: var(--cinnabar-bright); }

/* --- 九宫图 --- */
.lc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 360px;
  margin: 0 auto 24px;
}
.lc-grid-cell {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--bg-2);
  transition: all 0.3s;
}
.lc-grid-cell.active {
  border-color: var(--cell-color, var(--gold));
  background: linear-gradient(135deg, color-mix(in srgb, var(--cell-color) 12%, transparent), transparent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--cell-color) 15%, transparent);
}
.lc-grid-num {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-faint);
  line-height: 1;
}
.lc-grid-cell.active .lc-grid-num {
  color: var(--cell-color, var(--gold-bright));
}
.lc-grid-dots {
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 2px;
  line-height: 1;
}
.lc-grid-empty {
  color: var(--text-faint);
  font-size: 14px;
}

/* --- 连线 --- */
.lc-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lc-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--bg-2);
}
.lc-line.full {
  border-color: rgba(95, 184, 120, 0.35);
  background: rgba(95, 184, 120, 0.06);
}
.lc-line.partial {
  border-color: rgba(212, 175, 106, 0.3);
  background: rgba(212, 175, 106, 0.05);
}
.lc-line-icon { font-size: 16px; color: var(--gold); flex-shrink: 0; line-height: 1.7; }
.lc-line.full .lc-line-icon { color: var(--green); }
.lc-line-body { flex: 1; }
.lc-line-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.lc-line-nums {
  font-size: 12px;
  color: var(--text-faint);
  font-weight: 400;
  margin-left: 6px;
}
.lc-line-desc {
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.7;
}
.lc-missing {
  margin-top: 4px;
  padding: 10px 14px;
  border: 1px dashed var(--line-soft);
  border-radius: 10px;
  font-size: 12px;
  color: var(--text-faint);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.lc-missing-label { color: var(--text-dim); }
.lc-missing-tag {
  padding: 2px 10px;
  border-radius: 100px;
  background: rgba(193, 58, 46, 0.08);
  border: 1px solid rgba(193, 58, 46, 0.2);
  color: #e88a80;
  font-size: 11.5px;
}

/* --- 特质标签 --- */
.lc-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.lc-trait {
  font-size: 13px;
  color: var(--gold-bright);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 5px 14px;
  background: rgba(212, 175, 106, 0.06);
  letter-spacing: 1px;
}

/* --- 解读分区 --- */
.lc-sections {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
}
.lc-section-h {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--gold-bright);
  margin-bottom: 8px;
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.lc-section-h::before {
  content: '▸';
  color: var(--cinnabar-bright);
}
.lc-section-p {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.9;
  text-align: justify;
}

/* --- 建言 --- */
.lc-advice {
  font-size: 14.5px;
  color: var(--text-dim);
  line-height: 2;
  text-align: justify;
}
.lc-advice p { margin-bottom: 12px; text-indent: 2em; }
.lc-advice p:last-child { margin-bottom: 0; }
.lc-advice-master {
  padding: 12px 16px;
  background: rgba(193, 58, 46, 0.06);
  border-left: 3px solid var(--cinnabar);
  border-radius: 0 10px 10px 0;
  text-indent: 0 !important;
}
.lc-advice-master b { color: var(--cinnabar-bright); }
.lc-shadow {
  margin-top: 18px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  font-size: 13px;
}
.lc-shadow-label { color: var(--text-faint); letter-spacing: 1px; }
.lc-shadow-text { color: var(--text-dim); }

/* --- 星座 --- */
.lc-zodiac {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.lc-zodiac-element {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--gold-bright);
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(212, 175, 106, 0.06);
}
.lc-zodiac-traits {
  font-size: 14px;
  color: var(--text-dim);
  letter-spacing: 1px;
}

/* --- 生命密码专属表单 --- */
.lc-form-card {
  margin-top: 26px;
  background: var(--card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: var(--shadow);
}
.lc-form-title {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--gold-bright);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lc-date-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-width: 480px;
}
.lc-loading {
  text-align: center;
  padding: 70px 20px;
}
.lc-loading .loading-wheel { margin-bottom: 22px; }

/* --- 响应式 --- */
@media (max-width: 760px) {
  .lc-hero { flex-direction: column; text-align: center; }
  .lc-hero-info { width: 100%; }
  .lc-hero-meta { justify-content: center; }
  .lc-sections { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .lc-form-card { padding: 20px 16px; }
  .lc-date-row { grid-template-columns: 1fr; }
  .lc-grid { max-width: 280px; }
  .lc-hero-num { font-size: 56px; }
}

/* ============================================================
 * 生命密码 · 三角九宫完整版样式（v2）
 * ============================================================ */

/* 结果卡片（补齐此前缺失定义） */
.lc-result-card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

/* --- 公历/农历切换 --- */
.lc-mode-toggle {
  display: inline-flex;
  gap: 4px;
  background: rgba(212, 175, 106, 0.06);
  border: 1px solid var(--line-soft);
  border-radius: 100px;
  padding: 4px;
  margin: 14px 0 20px;
}
.lc-mode-btn {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 13.5px;
  padding: 7px 22px;
  border-radius: 100px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.25s;
}
.lc-mode-btn:hover { color: var(--text); }
.lc-mode-btn.active {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #1c1212;
  font-weight: 700;
}
.lc-lunar-extra { margin-top: 10px; }

/* --- 伴侣生日开关 --- */
.lc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  margin: 6px 0 14px;
  user-select: none;
}
.lc-toggle input { display: none; }
.lc-toggle-slider {
  position: relative;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 100px;
  transition: all 0.25s ease;
}
.lc-toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: var(--text-dim);
  border-radius: 50%;
  transition: all 0.25s ease;
}
.lc-toggle input:checked + .lc-toggle-slider {
  background: rgba(193, 58, 46, 0.18);
  border-color: rgba(193, 58, 46, 0.55);
}
.lc-toggle input:checked + .lc-toggle-slider::after {
  transform: translateX(20px);
  background: var(--cinnabar-bright);
}
.lc-toggle-label {
  font-size: 13.5px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  transition: color 0.25s;
}
.lc-toggle input:checked ~ .lc-toggle-label { color: var(--text); }
.lc-partner-fields {
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.3s ease, margin 0.3s ease;
  max-height: 200px;
  opacity: 1;
}
.lc-partner-fields.hidden {
  max-height: 0;
  opacity: 0;
  margin: 0;
}
.lc-partner-fields .lc-date-row { margin-bottom: 0; }
.lc-partner-field .field-hint { margin-top: 8px; }

.lc-leap-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  background: rgba(193, 58, 46, 0.08);
  border: 1px solid rgba(193, 58, 46, 0.3);
  padding: 6px 14px;
  border-radius: 100px;
}
.lc-leap-wrap input { accent-color: var(--cinnabar-bright); }

/* --- 徽章与组合 --- */
.lc-master-badge {
  display: inline-block;
  margin-left: 10px;
  font-size: 11px;
  color: var(--cinnabar-bright);
  border: 1px solid rgba(193, 58, 46, 0.5);
  padding: 2px 10px;
  border-radius: 100px;
  vertical-align: middle;
}
.lc-talent-combo {
  margin: 10px 0 0;
  padding: 10px 14px;
  background: rgba(212, 175, 106, 0.07);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.8;
}
.lc-talent-combo b { color: var(--gold-bright); }
.lc-talent-shadow { display: block; color: var(--text-faint); }

/* --- 三角盘 SVG --- */
.lc-triangle-wrap {
  display: flex;
  justify-content: center;
  padding: 8px 0 4px;
}
.lc-triangle-svg {
  width: 100%;
  max-width: 560px;
  height: auto;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
}
.lc-soul-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
}
.lc-soul-block {
  background: rgba(212, 175, 106, 0.05);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 14px 16px;
}
.lc-soul-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: 1px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dot-gold { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); display: inline-block; }
.dot-blue { width: 8px; height: 8px; border-radius: 50%; background: #5a8fd4; display: inline-block; }
.lc-soul-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.lc-soul-note {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 10px;
  line-height: 1.8;
}
.lc-numbadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 700;
  color: var(--nb, var(--gold));
  border: 1.5px solid var(--nb, var(--gold));
  background: color-mix(in srgb, var(--nb, var(--gold)) 12%, transparent);
  font-family: Georgia, "Songti SC", serif;
}
.lc-outerchip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12.5px;
  color: #9cc0ea;
  border: 1px solid rgba(90, 143, 212, 0.4);
  background: rgba(90, 143, 212, 0.1);
  padding: 3px 10px;
  border-radius: 100px;
}

/* --- 联合数字 --- */
.lc-dual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.lc-dual-card {
  background: rgba(212, 175, 106, 0.04);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 13px 15px;
  transition: border-color 0.25s, transform 0.25s;
}
.lc-dual-card:hover { border-color: var(--line); transform: translateY(-2px); }
.lc-dual-zero { border-style: dashed; background: rgba(90, 143, 212, 0.04); }
.lc-dual-head { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; }
.lc-dual-num {
  font-family: Georgia, "Songti SC", serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--gold-bright);
  min-width: 34px;
}
.lc-dual-zone {
  font-size: 10.5px;
  color: var(--text-faint);
  border: 1px solid var(--line-soft);
  padding: 1px 8px;
  border-radius: 100px;
}
.lc-dual-gist {
  flex: 1;
  text-align: right;
  font-size: 12px;
  color: var(--text-dim);
}
.lc-dual-t { font-size: 13px; color: var(--text-dim); line-height: 1.7; }
.lc-dual-s { font-size: 12px; color: var(--text-faint); line-height: 1.7; margin-top: 3px; }

/* --- 先天遗传分区 --- */
.lc-zone-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.lc-zone-col {
  background: rgba(212, 175, 106, 0.04);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 16px;
}
.lc-zone-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.lc-zone-text {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.lc-zone-num {
  font-size: 12px;
  color: var(--text-dim);
  background: rgba(212, 175, 106, 0.08);
  border: 1px solid var(--line-soft);
  padding: 4px 9px;
  border-radius: 6px;
  line-height: 1.6;
}
.lc-zone-num b { color: var(--gold-bright); margin-right: 4px; }

/* --- 后天外在人格 --- */
.lc-ext-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.lc-ext-col {
  background: rgba(90, 143, 212, 0.05);
  border: 1px solid rgba(90, 143, 212, 0.2);
  border-radius: 10px;
  padding: 16px;
}
.lc-ext-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #9cc0ea;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.lc-ext-title span { display: block; font-size: 11.5px; color: var(--text-faint); font-weight: 400; margin-top: 2px; }
.lc-ext-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 9px;
  line-height: 1.6;
}

/* --- 无 5 连线 --- */
.lc-nofive {
  margin-top: 14px;
  padding: 12px 16px;
  background: rgba(193, 58, 46, 0.08);
  border: 1px solid rgba(193, 58, 46, 0.3);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.8;
}
.lc-nofive b { color: var(--cinnabar-bright); }

/* --- 流年 --- */
.lc-year-list { display: grid; gap: 10px; }
.lc-year-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: rgba(212, 175, 106, 0.04);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 13px 16px;
}
.lc-year-item.current {
  background: rgba(193, 58, 46, 0.09);
  border-color: rgba(193, 58, 46, 0.45);
  box-shadow: 0 0 0 1px rgba(193, 58, 46, 0.15);
}
.lc-year-num {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, "Songti SC", serif;
  font-size: 21px;
  font-weight: 700;
  color: var(--gold-bright);
  border: 1.5px solid var(--gold);
  background: rgba(212, 175, 106, 0.12);
}
.lc-year-item.current .lc-year-num {
  color: #fff;
  border-color: var(--cinnabar-bright);
  background: var(--cinnabar);
}
.lc-year-body { flex: 1; }
.lc-year-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.lc-year-name span { color: var(--gold-dim); font-weight: 400; margin-left: 6px; font-size: 12px; }
.lc-year-desc { font-size: 12.5px; color: var(--text-dim); line-height: 1.8; }

/* --- 免责说明 --- */
.lc-disclaimer p {
  font-size: 13px;
  color: var(--text-faint);
  line-height: 2;
  text-indent: 2em;
}

/* --- 生命密码响应式 --- */
@media (max-width: 760px) {
  .lc-soul-legend, .lc-zone-grid, .lc-ext-grid { grid-template-columns: 1fr; }
  .lc-dual-grid { grid-template-columns: 1fr; }
  .lc-result-card { padding: 20px 16px; }
}
@media (max-width: 480px) {
  .lc-mode-btn { padding: 6px 14px; font-size: 12.5px; }
  .lc-year-item { flex-direction: column; }
}

/* ============================================================
 * 生命密码 · PDF 版新增模块样式（v3）
 * ============================================================ */

/* --- 伴侣生日选填标注 --- */
.field-opt {
  font-style: normal;
  font-size: 12px;
  color: var(--text-faint);
  font-weight: 400;
  letter-spacing: 0.5px;
}

/* --- 三位联合密码卡片 --- */
.lc-trio-grid { grid-template-columns: repeat(2, 1fr); }
.lc-trio-card {
  background: rgba(212, 175, 106, 0.04);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 16px 18px;
  transition: border-color 0.25s, background 0.25s;
}
.lc-trio-card:hover { border-color: rgba(212, 175, 106, 0.35); background: rgba(212, 175, 106, 0.07); }
.lc-trio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.lc-trio-num {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--gold-bright);
}
.lc-trio-zone {
  font-family: Georgia, var(--serif);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--gold-dim);
  background: rgba(212, 175, 106, 0.08);
  border: 1px solid var(--line-soft);
  padding: 3px 10px;
  border-radius: 100px;
}
.lc-trio-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--cinnabar-bright);
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.lc-trio-t { font-size: 13px; color: var(--text); line-height: 1.9; }
.lc-trio-s {
  font-size: 12.5px;
  color: var(--gold);
  line-height: 1.8;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line-soft);
}

/* --- 内心 / 潜意识密码 --- */
.lc-secret-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.lc-secret-col {
  background: rgba(90, 143, 212, 0.05);
  border: 1px solid rgba(90, 143, 212, 0.18);
  border-radius: 12px;
  padding: 18px 20px;
}
.lc-secret-title {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: 2px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lc-secret-num {
  font-size: 13px;
  color: #5a8fd4;
  background: rgba(90, 143, 212, 0.12);
  border-radius: 100px;
  padding: 2px 12px;
  letter-spacing: 1px;
}
.lc-secret-p { font-size: 13px; color: var(--text); line-height: 2; }
.lc-secret-formula {
  margin-top: 12px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  letter-spacing: 0.5px;
  line-height: 1.8;
}

/* --- 外心密码 --- */
.lc-outer-banner {
  background: linear-gradient(135deg, rgba(212, 175, 106, 0.1), rgba(90, 143, 212, 0.08));
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 20px 22px;
}
.lc-outer-formula {
  font-size: 14px;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.lc-outer-root {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--gold-bright);
}
.lc-outer-type {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--cinnabar-bright);
  letter-spacing: 3px;
  margin: 8px 0 6px;
}
.lc-outer-desc { font-size: 13.5px; color: var(--text); line-height: 2; }
.lc-outer-world {
  margin-top: 12px;
  background: rgba(212, 175, 106, 0.05);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.9;
}
.lc-outer-world-tag {
  display: inline-block;
  font-size: 12px;
  color: var(--gold-bright);
  letter-spacing: 1px;
  margin-bottom: 6px;
  font-weight: 600;
}

/* --- 晚年密码 --- */
.lc-late-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.lc-late-banner span {
  font-family: var(--serif);
  font-size: 14px;
  color: var(--text-dim);
  background: rgba(212, 175, 106, 0.06);
  border: 1px solid var(--line-soft);
  padding: 6px 14px;
  border-radius: 100px;
  letter-spacing: 1px;
}
.lc-late-banner .lc-late-key {
  color: var(--gold-bright);
  border-color: rgba(212, 175, 106, 0.4);
  font-weight: 700;
  font-size: 16px;
}
.lc-late-banner .lc-late-root {
  color: var(--red);
  border-color: rgba(224, 82, 69, 0.35);
  font-weight: 700;
}
.lc-late-banner .lc-late-sub {
  font-size: 12px;
  opacity: 0.75;
}
.lc-late-text {
  font-size: 14px;
  color: var(--text);
  line-height: 2;
  padding: 14px 18px;
  background: rgba(212, 175, 106, 0.04);
  border-radius: 10px;
  border-left: 3px solid var(--cinnabar);
}

/* --- 婚姻结合密码 --- */
.lc-marriage-empty {
  text-align: center;
  padding: 22px 18px;
  background: rgba(212, 175, 106, 0.04);
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.lc-marriage-empty p { font-size: 14px; color: var(--text); line-height: 2; }
.lc-marriage-hint { font-size: 12.5px !important; color: var(--text-dim); }
.lc-marriage-banner { display: flex; justify-content: center; margin: 6px 0 18px; }
.lc-marriage-pair {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.lc-marriage-person, .lc-marriage-sum {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 86px;
  padding: 14px 10px;
  border-radius: 12px;
  background: rgba(90, 143, 212, 0.08);
  border: 1px solid rgba(90, 143, 212, 0.25);
}
.lc-marriage-person b, .lc-marriage-sum b {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.1;
  color: #5a8fd4;
}
.lc-marriage-sum b { color: var(--cinnabar-bright); }
.lc-marriage-person em, .lc-marriage-sum em {
  font-style: normal;
  font-size: 11.5px;
  color: var(--text-dim);
  letter-spacing: 1px;
}
.lc-marriage-plus { font-family: var(--serif); font-size: 24px; color: var(--gold); }
.lc-marriage-body {
  background: rgba(193, 58, 46, 0.06);
  border: 1px solid rgba(193, 58, 46, 0.2);
  border-radius: 12px;
  padding: 18px 22px;
}
.lc-marriage-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--cinnabar-bright);
  letter-spacing: 2px;
  margin-bottom: 8px;
}
.lc-marriage-body p { font-size: 13.5px; color: var(--text); line-height: 2; }

/* --- 家庭密码 --- */
.lc-family-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.lc-family-key {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--gold-bright);
  background: rgba(212, 175, 106, 0.08);
  border: 1px solid var(--line);
  padding: 4px 16px;
  border-radius: 10px;
  letter-spacing: 2px;
}
.lc-family-label { font-size: 14px; color: var(--text-dim); letter-spacing: 1px; }
.lc-family-text {
  font-size: 14px;
  color: var(--text);
  line-height: 2;
  padding: 14px 18px;
  background: rgba(212, 175, 106, 0.04);
  border-radius: 10px;
  border-left: 3px solid var(--gold);
}

/* --- 五行性格与行业 --- */
.lc-element-banner {
  background: linear-gradient(135deg, rgba(95, 184, 120, 0.08), rgba(212, 175, 106, 0.08));
  border: 1px solid rgba(95, 184, 120, 0.25);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 14px;
}
.lc-element-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.lc-element-nums { font-size: 12.5px; color: var(--text-dim); margin-bottom: 8px; letter-spacing: 1px; }
.lc-element-banner p { font-size: 13.5px; color: var(--text); line-height: 2; }
.lc-element-count, .lc-element-career {
  font-size: 13px;
  color: var(--text-dim);
  margin: 10px 0;
  line-height: 2;
}
.lc-ec-label { color: var(--gold); font-weight: 600; letter-spacing: 1px; }
.lc-ec-chip {
  display: inline-block;
  font-size: 12.5px;
  padding: 3px 12px;
  margin: 3px 4px 3px 0;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-soft);
  color: var(--text-dim);
}
.lc-ec-chip.has {
  color: var(--gold-bright);
  border-color: rgba(212, 175, 106, 0.4);
  background: rgba(212, 175, 106, 0.08);
}
.lc-element-career p { font-size: 13px; color: var(--text); line-height: 2; }
.lc-chain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.lc-chain-col {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 16px 18px;
}
.lc-chain-title {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.lc-chain-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.lc-chain-badge {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-bright);
  background: rgba(212, 175, 106, 0.1);
  border: 1px solid var(--line-soft);
  padding: 2px 10px;
  border-radius: 6px;
}
.lc-chain-arrow {
  font-size: 12px;
  color: var(--green);
  background: rgba(95, 184, 120, 0.12);
  padding: 1px 7px;
  border-radius: 100px;
  font-weight: 700;
}
.lc-chain-arrow.kill { color: var(--cinnabar-bright); background: rgba(193, 58, 46, 0.12); }
.lc-chain-reason { font-size: 12px; color: var(--text-faint); line-height: 1.7; flex-basis: 100%; margin-left: 34px; }
.lc-element-excess {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 2;
  padding: 12px 16px;
  background: rgba(193, 58, 46, 0.05);
  border-radius: 10px;
  border-left: 3px solid rgba(193, 58, 46, 0.5);
}

/* --- 推演步骤补充说明 --- */
.lc-step-note { font-size: 12.5px; color: var(--text-dim); margin-left: 10px; }

/* --- v3 响应式 --- */
@media (max-width: 760px) {
  .lc-trio-grid, .lc-secret-grid, .lc-chain-grid { grid-template-columns: 1fr; }
}


