/* ============================================================
   通玄 TONGXUAN · 设计系统 base.css
   夜空黛蓝 × 鎏金 × 宣纸 × 朱砂
   ============================================================ */

:root {
  /* —— 墨色（夜空） —— */
  --ink-950: #0a0f1e;
  --ink-900: #0d1426;
  --ink-850: #111a30;
  --ink-800: #16213c;
  --ink-700: #1f2d4e;
  --ink-600: #2b3b62;

  /* —— 鎏金 —— */
  --gold-300: #f0dcae;
  --gold-400: #e3c88d;
  --gold-500: #d4af6a;
  --gold-600: #b8914b;
  --gold-700: #96723a;
  --gold-glow: rgba(212, 175, 106, 0.35);

  /* —— 宣纸 —— */
  --paper-50: #faf7ef;
  --paper-100: #f5f0e2;
  --paper-200: #ede5d0;
  --paper-300: #e0d5b8;
  --paper-ink: #2c2a24;
  --paper-ink-soft: #6b6455;

  /* —— 朱砂 —— */
  --cinnabar: #b8493e;
  --cinnabar-deep: #96352c;

  /* —— 文字（暗底） —— */
  --text-hi: #ede8d8;
  --text-mid: rgba(237, 232, 216, 0.72);
  --text-low: rgba(237, 232, 216, 0.45);

  /* —— 字体 —— */
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  /* —— 布局 —— */
  --page-max: 1200px;
  --nav-h: 72px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  /* —— 动效 —— */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ Reset 补充 ============ */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* 本站自管深浅两套皮肤（观星/袖中天）——声明后 Android Chrome/MIUI
     的「网页强制深色」不再篡改配色（iOS Safari 无此机制不受影响） */
  color-scheme: dark light;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-hi);
  background: var(--ink-950);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg, canvas { display: block; max-width: 100%; }
::selection { background: rgba(212, 175, 106, 0.28); color: var(--gold-300); }

/* 纸纹理（data-uri 噪点） */
.paper-section {
  position: relative;
  background-color: var(--paper-100);
  color: var(--paper-ink);
}
.paper-section::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}
.paper-section > * { position: relative; }

/* ============ 版心与节区 ============ */
.container { width: min(var(--page-max), calc(100% - 48px)); margin-inline: auto; }
.section { padding: 110px 0; }
.section-head { text-align: center; margin-bottom: 64px; }
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-serif);
  font-size: 14px; letter-spacing: 0.42em; text-indent: 0.42em;
  color: var(--gold-600);
}
.section-eyebrow::before, .section-eyebrow::after {
  content: ""; width: 36px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-600));
}
.section-eyebrow::after { transform: scaleX(-1); }
.section-title {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: 0.14em;
  margin-top: 18px;
  line-height: 1.4;
}
.paper-section .section-title { color: var(--paper-ink); }
.section-sub {
  margin-top: 16px;
  font-size: 15.5px;
  color: var(--text-low);
  letter-spacing: 0.06em;
}
.paper-section .section-sub { color: var(--paper-ink-soft); }

/* 菱形分隔饰 */
.diamond-divider {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: 22px auto 0;
}
.diamond-divider::before, .diamond-divider::after {
  content: ""; height: 1px; width: 72px;
  background: linear-gradient(90deg, transparent, currentColor);
  opacity: 0.5;
}
.diamond-divider::after { transform: scaleX(-1); }
.diamond-divider i {
  width: 6px; height: 6px; transform: rotate(45deg);
  background: currentColor; opacity: 0.8;
}

/* ============ 按钮 ============ */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 38px;
  font-size: 16px; letter-spacing: 0.18em; text-indent: 0.18em;
  font-family: var(--font-serif); font-weight: 600;
  border-radius: 999px;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out),
              background 0.35s, color 0.35s, border-color 0.35s;
  overflow: hidden;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-gold {
  color: #241a08;
  background: linear-gradient(135deg, var(--gold-300) 0%, var(--gold-500) 55%, var(--gold-600) 100%);
  box-shadow: 0 8px 28px rgba(212, 175, 106, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(212, 175, 106, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
/* 流光扫过 */
.btn-gold::after {
  content: ""; position: absolute; top: 0; left: -80%;
  width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-24deg);
  transition: left 0.7s var(--ease-out);
}
.btn-gold:hover::after { left: 130%; }

.btn-outline {
  color: var(--gold-400);
  border: 1px solid rgba(212, 175, 106, 0.55);
  background: rgba(212, 175, 106, 0.04);
  backdrop-filter: blur(4px);
}
.btn-outline:hover {
  transform: translateY(-3px);
  border-color: var(--gold-400);
  background: rgba(212, 175, 106, 0.12);
  box-shadow: 0 10px 30px rgba(212, 175, 106, 0.18);
}

.btn-ink {
  color: var(--paper-100);
  background: linear-gradient(150deg, var(--ink-700), var(--ink-900));
  border: 1px solid rgba(212, 175, 106, 0.35);
}
.btn-ink:hover { transform: translateY(-3px); border-color: var(--gold-500); box-shadow: 0 12px 30px rgba(10, 15, 30, 0.5); }

.btn-sm { padding: 10px 26px; font-size: 14px; }

/* ============ 顶部导航 ============ */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background 0.45s var(--ease-soft), box-shadow 0.45s, backdrop-filter 0.45s;
}
.site-nav.scrolled {
  background: rgba(10, 15, 30, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(212, 175, 106, 0.16), 0 12px 32px rgba(5, 8, 18, 0.45);
}
.nav-inner {
  width: min(1360px, calc(100% - 48px));
  margin-inline: auto;
  display: flex; align-items: center; gap: 36px;
}
.nav-logo {
  display: flex; align-items: baseline; gap: 10px;
  margin-right: auto;
  flex-shrink: 0;
}
.nav-logo .logo-zh {
  font-family: var(--font-serif); font-size: 26px; font-weight: 700;
  letter-spacing: 0.12em;
  background: linear-gradient(160deg, var(--gold-300), var(--gold-500) 70%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.nav-logo .logo-en {
  font-size: 11px; letter-spacing: 0.34em;
  color: var(--text-low);
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  position: relative;
  padding: 8px 13px;
  font-size: 15px; letter-spacing: 0.08em;
  color: var(--text-mid);
  transition: color 0.3s;
  white-space: nowrap;
}
.nav-links a::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  width: 0; height: 1.5px;
  background: var(--gold-500);
  transform: translateX(-50%);
  transition: width 0.35s var(--ease-out);
}
.nav-links a:hover, .nav-links a.active { color: var(--gold-300); }
.nav-links a:hover::after, .nav-links a.active::after { width: 60%; }
.nav-cta { flex-shrink: 0; }

/* 汉堡（移动端） */
.nav-burger {
  display: none;
  flex-direction: column; gap: 5px;
  padding: 10px;
}
.nav-burger span {
  width: 22px; height: 1.5px;
  background: var(--gold-400);
  transition: transform 0.35s var(--ease-out), opacity 0.3s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-drawer {
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 99;
  background: rgba(10, 15, 30, 0.96);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(212, 175, 106, 0.18);
  padding: 12px 24px calc(28px + env(safe-area-inset-bottom, 0px));
  display: none;
  flex-direction: column;
  transform: translateY(-8px); opacity: 0;
  transition: transform 0.35s var(--ease-out), opacity 0.35s;
  /* 菜单项多于视口时可滚动，末项（登录/注册）不再被裁出屏幕 */
  max-height: calc(100vh - var(--nav-h));
  max-height: calc(100dvh - var(--nav-h));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.nav-drawer .btn { flex-shrink: 0; }
.nav-drawer.open { transform: translateY(0); opacity: 1; }
.nav-drawer a {
  padding: 13px 6px;
  font-size: 16px; letter-spacing: 0.1em;
  color: var(--text-mid);
  border-bottom: 1px solid rgba(212, 175, 106, 0.08);
}
.nav-drawer a:last-of-type { border-bottom: none; }
.nav-drawer .btn { margin-top: 16px; }

@media (max-width: 1080px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .nav-drawer { display: flex; visibility: hidden; pointer-events: none; }
  .nav-drawer.open { visibility: visible; pointer-events: auto; }
}

/* ============ 页脚 ============ */
.site-footer {
  background: linear-gradient(180deg, var(--ink-950), #070b16);
  border-top: 1px solid rgba(212, 175, 106, 0.14);
  padding: 72px 0 36px;
  color: var(--text-low);
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(237, 232, 216, 0.07);
}
.footer-brand .logo-zh {
  font-family: var(--font-serif); font-size: 30px; font-weight: 700;
  letter-spacing: 0.14em;
  background: linear-gradient(160deg, var(--gold-300), var(--gold-600));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.footer-brand .footer-motto {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-size: 14px; letter-spacing: 0.18em;
  color: var(--text-low);
  line-height: 2.1;
}
.footer-col h4 {
  font-size: 15px; letter-spacing: 0.22em;
  color: var(--gold-500);
  margin-bottom: 18px; font-weight: 600;
}
.footer-col a {
  display: block;
  padding: 5px 0;
  color: var(--text-low);
  letter-spacing: 0.06em;
  transition: color 0.3s, transform 0.3s;
}
.footer-col a:hover { color: var(--gold-300); transform: translateX(4px); }
.footer-note {
  margin-top: 30px;
  text-align: center;
  font-size: 12.5px;
  line-height: 2;
  color: rgba(237, 232, 216, 0.32);
  letter-spacing: 0.05em;
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ============ 入场动效 ============ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

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

/* ============ 徽章 ============ */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 12px;
  font-size: 12px; letter-spacing: 0.14em; text-indent: 0.14em;
  border-radius: 999px;
  font-family: var(--font-serif); font-weight: 600;
}
.badge-free { color: #3d7a52; background: rgba(72, 133, 90, 0.12); border: 1px solid rgba(72, 133, 90, 0.35); }
.badge-flag { color: var(--cinnabar); background: rgba(184, 73, 62, 0.08); border: 1px solid rgba(184, 73, 62, 0.4); }
.badge-gold { color: var(--gold-700); background: rgba(212, 175, 106, 0.12); border: 1px solid rgba(212, 175, 106, 0.45); }

/* ============ 通用工具 ============ */
.text-gold {
  background: linear-gradient(160deg, var(--gold-300) 10%, var(--gold-500) 60%, var(--gold-600));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hide-desktop { display: none !important; }
@media (max-width: 720px) {
  .section { padding: 76px 0; }
  .container { width: calc(100% - 40px); }
  .hide-mobile { display: none !important; }
  .hide-desktop { display: block !important; }
  .section-eyebrow {
    font-size: 12.5px;
    letter-spacing: 0.22em; text-indent: 0.22em;
    white-space: nowrap;
  }
  .section-eyebrow::before, .section-eyebrow::after { width: 22px; }
}

/* ============================================================
   共享组件层（子页通用）：页头 / 拜帖表单卡 / AI 参详面板
   与 bazi.css 中同名规则等值，供新子页直接复用
   ============================================================ */

/* ---------- 子页紧凑页头 ---------- */
.page-hero {
  position: relative;
  min-height: 44vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: calc(var(--nav-h) + 60px) 24px 120px;
  background:
    radial-gradient(ellipse 90% 70% at 50% -20%, var(--ink-600) 0%, transparent 60%),
    linear-gradient(180deg, var(--ink-850) 0%, var(--ink-900) 55%, var(--ink-950) 100%);
}
.page-hero-stars { position: absolute; inset: 0; z-index: 0; }
.page-hero-content { position: relative; z-index: 2; }
.page-hero .section-eyebrow { color: var(--gold-500); animation: pageUp 1s var(--ease-out) 0.1s both; }
.page-hero-title {
  margin-top: 22px;
  font-size: clamp(40px, 6.2vw, 64px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0.18em; text-indent: 0.18em;
  background: linear-gradient(168deg, #f4e3b8 8%, var(--gold-400) 38%, var(--gold-500) 62%, #a8813f 95%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 4px 22px rgba(212, 175, 106, 0.2));
  animation: pageUp 1s var(--ease-out) 0.22s both;
}
.page-hero-sub {
  margin-top: 18px;
  font-size: 14.5px;
  letter-spacing: 0.1em;
  line-height: 2.1;
  color: var(--text-mid);
  max-width: 640px;
  margin-inline: auto;
  animation: pageUp 1s var(--ease-out) 0.34s both;
}
.page-hero-fade {
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: 110px; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(245, 240, 226, 0) 0%, var(--paper-100) 100%);
}
@keyframes pageUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 拜帖卡（庚帖式：深色卡头 + 宣纸卡身） ---------- */
.geng-card {
  max-width: 820px;
  margin-inline: auto;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(184, 145, 75, 0.55);
  background: linear-gradient(175deg, var(--paper-50), var(--paper-100) 85%);
  box-shadow: 0 26px 64px rgba(44, 42, 36, 0.16), 0 3px 10px rgba(44, 42, 36, 0.07);
}
.geng-card::after {
  content: "";
  position: absolute; inset: 8px;
  border: 1px solid rgba(212, 175, 106, 0.3);
  border-radius: calc(var(--radius-lg) - 8px);
  pointer-events: none;
}
.geng-head {
  position: relative;
  padding: 28px 36px 24px;
  text-align: center;
  background:
    radial-gradient(ellipse 130% 120% at 50% -40%, rgba(212, 175, 106, 0.16), transparent 55%),
    linear-gradient(150deg, var(--ink-800), var(--ink-950) 85%);
  border-bottom: 1px solid rgba(212, 175, 106, 0.4);
}
.geng-head-tag {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-serif);
  font-size: 13px; letter-spacing: 0.42em; text-indent: 0.42em;
  color: var(--gold-500);
}
.geng-head-tag::before, .geng-head-tag::after {
  content: ""; width: 44px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-500));
}
.geng-head-tag::after { transform: scaleX(-1); }
.geng-head-note {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: 15px; letter-spacing: 0.2em;
  color: var(--text-mid);
}
.geng-body {
  position: relative;
  padding: 40px 46px 44px;
  display: grid;
  gap: 32px;
}

/* ---------- 表单元件 ---------- */
.field-label {
  display: block;
  font-family: var(--font-serif);
  font-size: 13.5px; font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--gold-700);
  margin-bottom: 12px;
}
.field-label em {
  font-style: normal; font-weight: 400;
  font-family: var(--font-sans);
  font-size: 12px; letter-spacing: 0.06em;
  color: var(--paper-ink-soft);
}
.input-line {
  width: 100%;
  padding: 9px 2px;
  font-family: var(--font-serif);
  font-size: 16.5px; letter-spacing: 0.08em;
  color: var(--paper-ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(44, 42, 36, 0.28);
  border-radius: 0;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.input-line::placeholder {
  font-family: var(--font-sans);
  font-size: 14.5px; letter-spacing: 0.03em;
  color: rgba(107, 100, 85, 0.55);
}
.input-line:focus {
  outline: none;
  border-bottom-color: var(--gold-600);
  box-shadow: 0 1px 0 var(--gold-600);
}
.seg-group { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.seg-btn {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 16px 12px;
  border: 1px solid rgba(44, 42, 36, 0.16);
  border-radius: var(--radius-md);
  background: rgba(250, 247, 239, 0.7);
  transition: border-color 0.35s, background 0.35s, box-shadow 0.35s, transform 0.35s var(--ease-out);
}
.seg-btn:hover { transform: translateY(-2px); border-color: rgba(184, 145, 75, 0.6); }
.seg-big {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  font-family: var(--font-serif);
  font-size: 24px; font-weight: 700;
  color: var(--gold-700);
  border: 1px solid rgba(150, 114, 58, 0.45);
  border-radius: 10px;
  background: rgba(250, 247, 239, 0.8);
  transition: color 0.35s, background 0.35s, border-color 0.35s;
}
.seg-text { display: flex; flex-direction: column; text-align: left; }
.seg-text b {
  font-family: var(--font-serif);
  font-size: 18px; font-weight: 600; letter-spacing: 0.16em;
  color: var(--paper-ink);
  transition: color 0.35s;
}
.seg-text i {
  font-style: normal;
  font-size: 11px; letter-spacing: 0.18em;
  color: var(--paper-ink-soft);
  margin-top: 2px;
  transition: color 0.35s;
}
.seg-btn.active {
  background:
    radial-gradient(ellipse 130% 130% at 50% -30%, rgba(212, 175, 106, 0.18), transparent 60%),
    linear-gradient(150deg, var(--ink-800), var(--ink-950));
  border-color: var(--gold-500);
  box-shadow: 0 10px 26px rgba(13, 20, 38, 0.28), inset 0 1px 0 rgba(212, 175, 106, 0.22);
}
.seg-btn.active .seg-big {
  color: var(--gold-300);
  background: rgba(212, 175, 106, 0.1);
  border-color: rgba(212, 175, 106, 0.55);
}
.seg-btn.active .seg-text b { color: var(--gold-300); }
.seg-btn.active .seg-text i { color: rgba(237, 232, 216, 0.55); }
.cal-tabs {
  display: inline-flex;
  border: 1px solid rgba(150, 114, 58, 0.45);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(250, 247, 239, 0.85);
}
.cal-tab {
  padding: 9px 30px;
  font-family: var(--font-serif);
  font-size: 14.5px; font-weight: 600;
  letter-spacing: 0.18em; text-indent: 0.18em;
  color: var(--paper-ink-soft);
  transition: background 0.35s, color 0.35s;
}
.cal-tab.active {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500) 60%, var(--gold-600));
  color: #241a08;
}
.cal-hint { margin-top: 12px; font-size: 12.5px; letter-spacing: 0.06em; color: var(--paper-ink-soft); }
.date-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.date-grid select, .select-line {
  width: 100%;
  appearance: none; -webkit-appearance: none;
  padding: 12px 30px 12px 14px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  color: var(--paper-ink);
  background-color: rgba(250, 247, 239, 0.9);
  border: 1px solid rgba(44, 42, 36, 0.18);
  border-radius: var(--radius-sm);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2396723a' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 6px;
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.date-grid select:hover, .select-line:hover { border-color: rgba(184, 145, 75, 0.6); }
.date-grid select:focus, .select-line:focus {
  outline: none;
  border-color: var(--gold-600);
  box-shadow: 0 0 0 3px rgba(212, 175, 106, 0.18);
}
.date-grid select.invalid { border-color: var(--cinnabar); }
.field-split { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: end; }
.check-line {
  display: inline-flex; align-items: center; gap: 10px;
  padding-bottom: 8px;
  font-family: var(--font-serif);
  font-size: 14.5px; letter-spacing: 0.08em;
  color: var(--paper-ink);
  cursor: pointer;
  white-space: nowrap;
}
.check-line input { width: 17px; height: 17px; margin: 0; accent-color: var(--gold-600); cursor: pointer; }
.form-error { margin-top: -8px; text-align: center; font-size: 13.5px; letter-spacing: 0.08em; color: var(--cinnabar); }
.form-actions { text-align: center; margin-top: 4px; }
.btn-cast { min-width: 250px; }
.spin-icon { display: none; font-size: 1.05em; line-height: 1; }
.btn.is-loading .spin-icon { display: inline-block; animation: spinRot 1.15s linear infinite; }
@keyframes spinRot { to { transform: rotate(360deg); } }
.btn:disabled { cursor: default; opacity: 0.82; transform: none !important; }
.btn:disabled::after { display: none; }
.seg-btn:focus-visible, .cal-tab:focus-visible, .pick-pill:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 2px;
}

/* ---------- AI 参详（左控右卷） ---------- */
.reading-flow {
  max-width: 1080px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: start;
}
.pick-group { margin-bottom: 28px; }
.pick-label {
  display: block;
  font-family: var(--font-serif);
  font-size: 13.5px; letter-spacing: 0.4em;
  color: var(--gold-600);
  margin-bottom: 13px;
}
.pick-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pick-pill {
  padding: 10px 24px;
  font-family: var(--font-serif);
  font-size: 15px; font-weight: 600;
  letter-spacing: 0.12em; text-indent: 0.12em;
  color: var(--text-mid);
  border: 1px solid rgba(212, 175, 106, 0.3);
  border-radius: 999px;
  background: rgba(22, 33, 60, 0.4);
  transition: color 0.3s, border-color 0.3s, background 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-out);
}
.pick-pill:hover { transform: translateY(-2px); color: var(--gold-300); border-color: rgba(212, 175, 106, 0.6); }
.pick-pill.active {
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500) 60%, var(--gold-600));
  color: #241a08;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(212, 175, 106, 0.28);
}
.pick-pill:disabled { opacity: 0.55; transform: none; cursor: default; }
.btn-reading { width: 100%; margin-top: 6px; }
.pick-note { margin-top: 16px; font-size: 12.5px; line-height: 1.9; letter-spacing: 0.05em; color: var(--text-low); }
.reading-panel {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 440px;
  background: linear-gradient(175deg, var(--paper-50), var(--paper-100) 70%);
  border: 1px solid rgba(212, 175, 106, 0.5);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(5, 8, 18, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  overflow: hidden;
}
.reading-panel::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
}
.reading-head {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 20px 26px;
  border-bottom: 1px dashed rgba(150, 114, 58, 0.35);
}
.reading-seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  font-family: var(--font-serif);
  font-size: 21px; font-weight: 700;
  color: #f8ecd8;
  background: linear-gradient(155deg, var(--cinnabar), var(--cinnabar-deep));
  border-radius: 9px;
  box-shadow: 0 4px 12px rgba(150, 53, 44, 0.35);
}
.reading-meta { display: flex; flex-direction: column; }
.reading-name {
  font-family: var(--font-serif);
  font-size: 17px; font-weight: 600; letter-spacing: 0.1em;
  color: var(--paper-ink);
}
.reading-tag { font-size: 12px; color: var(--paper-ink-soft); letter-spacing: 0.08em; margin-top: 2px; }
.reading-dot {
  margin-left: auto;
  width: 8px; height: 8px; border-radius: 50%;
  background: #48855a;
  box-shadow: 0 0 0 4px rgba(72, 133, 90, 0.18);
  animation: readingDotPulse 2s ease-in-out infinite;
}
@keyframes readingDotPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(72, 133, 90, 0.2); }
  50%      { box-shadow: 0 0 0 7px rgba(72, 133, 90, 0.06); }
}
.reading-body {
  position: relative;
  flex-grow: 1;
  min-height: 300px;
  max-height: 520px;
  overflow-y: auto;
  padding: 26px 30px 30px;
  font-size: 15.5px; line-height: 2.25; letter-spacing: 0.04em;
  color: #3b382f;
  scrollbar-width: thin;
  scrollbar-color: rgba(150, 114, 58, 0.4) transparent;
}
.reading-empty {
  display: block;
  font-family: var(--font-serif);
  letter-spacing: 0.08em;
  color: rgba(107, 100, 85, 0.75);
}
.reading-stream { display: inline; white-space: pre-wrap; }
.reading-stream .book { color: var(--cinnabar); }
.reading-cursor {
  display: inline-block;
  width: 2px; height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.18em;
  background: var(--gold-700);
  animation: readingBlink 0.9s steps(1) infinite;
}
@keyframes readingBlink { 50% { opacity: 0; } }
.reading-empty[hidden],
.reading-cursor[hidden] { display: none; }
.reading-disclaim {
  margin-top: 16px;
  text-align: center;
  font-size: 12.5px; letter-spacing: 0.08em;
  color: var(--text-low);
}

/* ---------- 共享组件响应式 ---------- */
@media (max-width: 960px) {
  .reading-flow { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 720px) {
  .geng-body { padding: 30px 24px 34px; gap: 26px; }
  .seg-group { grid-template-columns: 1fr; }
  .date-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .field-split { grid-template-columns: 1fr; gap: 14px; }
  .reading-body { max-height: 440px; }
}

/* ============================================================
   「AI 深度解读」入口（各术数结果页共用）
   ============================================================ */
.deep-cta {
  position: relative;
  max-width: 900px;
  margin: 72px auto 0;
  padding: 52px 40px 46px;
  text-align: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background:
    radial-gradient(ellipse 120% 100% at 50% -30%, rgba(212, 175, 106, 0.16), transparent 58%),
    linear-gradient(150deg, var(--ink-800), var(--ink-950) 85%);
  border: 1px solid rgba(212, 175, 106, 0.4);
  box-shadow: 0 24px 60px rgba(10, 15, 30, 0.35);
}
.deep-cta::before {                     /* 内衬金线 */
  content: "";
  position: absolute; inset: 9px;
  border: 1px solid rgba(212, 175, 106, 0.22);
  border-radius: calc(var(--radius-lg) - 9px);
  pointer-events: none;
}
.deep-cta-eyebrow {
  font-family: var(--font-serif);
  font-size: 13px; letter-spacing: 0.4em; text-indent: 0.4em;
  color: var(--gold-500);
}
.deep-cta-title {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-hi);
}
.deep-cta-points {
  margin-top: 14px;
  font-size: 13.5px;
  letter-spacing: 0.08em;
  line-height: 2;
  color: var(--text-mid);
}
.deep-cta-points i { font-style: normal; color: rgba(212, 175, 106, 0.55); padding: 0 8px; }
.deep-cta .btn { margin-top: 30px; min-width: 300px; }
.deep-cta-note {
  margin-top: 16px;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--text-low);
}
.deep-cta-motto {
  margin-top: 20px;
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: rgba(212, 175, 106, 0.5);
}
@media (max-width: 720px) {
  .deep-cta { padding: 40px 22px 36px; margin-top: 52px; }
  .deep-cta .btn { min-width: 0; width: 100%; }
}

/* ============================================================
   用户系统共享件：导航用户徽章 / 提示条 / 零散挂点
   ============================================================ */
.nav-user {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 16px 6px 7px;
  border: 1px solid rgba(212, 175, 106, 0.45);
  border-radius: 999px;
  background: rgba(13, 20, 38, 0.55);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-out);
}
.nav-user:hover {
  transform: translateY(-2px);
  border-color: var(--gold-400);
  box-shadow: 0 8px 22px rgba(5, 8, 18, 0.35);
}
.nav-user-seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  font-family: var(--font-serif);
  font-size: 15px; font-weight: 700;
  color: #f8ecd8;
  background: linear-gradient(155deg, var(--cinnabar), var(--cinnabar-deep));
  border-radius: 8px;
  box-shadow: inset 0 0 0 1.5px rgba(248, 236, 216, 0.4);
}
.nav-user-name {
  font-family: var(--font-serif);
  font-size: 14.5px; font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-hi);
  max-width: 96px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.tx-toast {
  position: fixed;
  top: calc(var(--nav-h) + 14px); left: 50%;
  transform: translate(-50%, -12px);
  z-index: 3000;
  padding: 11px 26px;
  font-family: var(--font-serif);
  font-size: 14.5px; letter-spacing: 0.1em;
  color: var(--gold-300);
  background: rgba(13, 20, 38, 0.92);
  border: 1px solid rgba(212, 175, 106, 0.5);
  border-radius: 999px;
  box-shadow: 0 14px 40px rgba(5, 8, 18, 0.45);
  opacity: 0;
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
  pointer-events: none;
  max-width: min(90vw, 560px);
  text-align: center;
}
.tx-toast.show { opacity: 1; transform: translate(-50%, 0); }

.deep-cta-save {
  color: var(--gold-400);
  border-bottom: 1px solid rgba(212, 175, 106, 0.4);
  cursor: pointer;
  transition: color 0.3s;
}
.deep-cta-save:hover { color: var(--gold-300); }
.rd-cost-login {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: 13px; letter-spacing: 0.08em;
  color: var(--gold-700);
  border-bottom: 1px solid rgba(150, 114, 58, 0.4);
}

/* ============================================================
   「完整盘面征象」折叠面板（各技法结果页共用 · JS 注入）
   ------------------------------------------------------------
   结构：details.xj-snapshot > summary.xj-snapshot-head
         （caret + 标题 + 字数徽标 + 复制钮）+ .xj-snapshot-body > pre
   居于纸色结果区内，深浅双肤均走 --paper/--gold/--ink 令牌
   ============================================================ */
.xj-snapshot {
  max-width: 980px;
  margin: 44px auto 0;
  color: var(--paper-ink);
  background: rgba(250, 247, 239, 0.78);
  background-color: var(--paper-50);
  border: 1px solid rgba(44, 42, 36, 0.14);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 10px rgba(44, 42, 36, 0.05);
  overflow: hidden;
}
.xj-snapshot-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 22px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background-color 0.25s;
}
.xj-snapshot-head::-webkit-details-marker { display: none; }
.xj-snapshot-head:hover { background-color: rgba(212, 175, 106, 0.08); }
.xj-snapshot-caret {
  flex-shrink: 0;
  width: 0; height: 0;
  border-left: 6px solid var(--gold-600);
  border-top: 4.5px solid transparent;
  border-bottom: 4.5px solid transparent;
  transition: transform 0.25s var(--ease-out);
}
.xj-snapshot[open] > .xj-snapshot-head .xj-snapshot-caret { transform: rotate(90deg); }
.xj-snapshot-title {
  font-family: var(--font-serif);
  font-size: 15px; font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--paper-ink);
}
.xj-snapshot-count {
  flex-shrink: 0;
  padding: 2px 10px;
  font-size: 11.5px; letter-spacing: 0.06em;
  color: var(--gold-700);
  background: rgba(212, 175, 106, 0.12);
  border: 1px solid rgba(212, 175, 106, 0.45);
  border-radius: 999px;
}
.xj-snapshot-copy {
  flex-shrink: 0;
  margin-left: auto;
  padding: 6px 16px;
  font-family: var(--font-serif);
  font-size: 12.5px; letter-spacing: 0.1em;
  color: var(--gold-700);
  border: 1px solid rgba(150, 114, 58, 0.45);
  border-radius: 999px;
  background: transparent;
  transition: color 0.25s, border-color 0.25s, background-color 0.25s;
}
.xj-snapshot-copy:hover {
  color: var(--paper-ink);
  border-color: var(--gold-600);
  background-color: rgba(212, 175, 106, 0.14);
}
.xj-snapshot-copy.copied {
  color: #3d7a52;
  border-color: rgba(72, 133, 90, 0.5);
  background-color: rgba(72, 133, 90, 0.08);
}
.xj-snapshot-body {
  max-height: 60vh;
  overflow-y: auto;
  padding: 0 22px 20px;
  border-top: 1px dashed rgba(150, 114, 58, 0.35);
  scrollbar-width: thin;
  scrollbar-color: rgba(150, 114, 58, 0.4) transparent;
}
.xj-snapshot-text {
  margin: 16px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Sarasa Mono SC",
               "Noto Sans Mono CJK SC", var(--font-serif), monospace;
  font-size: 12.5px;
  line-height: 1.9;
  letter-spacing: 0.02em;
  color: var(--paper-ink);
}
@media (max-width: 720px) {
  .xj-snapshot { margin-top: 32px; }
  .xj-snapshot-head { padding: 14px 16px; gap: 8px; flex-wrap: wrap; }
  .xj-snapshot-body { padding: 0 16px 16px; max-height: 70vh; }
  .xj-snapshot-text { font-size: 12px; }
}
