/* ============================================
   WuXing Insights — 主样式
   东方神秘美学：深色星空 + 金色点缀 + 五行色彩
   ============================================ */
:root {
  --bg-deep: #0a0a14;
  --bg-card: #14141f;
  --bg-card2: #1a1a28;
  --gold: #c9a227;
  --gold-light: #e6c85c;
  --text: #e8e6e0;
  --text-dim: #a8a5ae;
  /* 朱砂红：装饰用（边框/底色，3:1 即可达标）
     注意：#c1440e 在深色卡片上仅 3.57:1，作正文文字不达 WCAG AA，
     文字场景请改用 --vermilion-text（7.89:1） */
  --vermilion: #c1440e;
  --vermilion-text: #e8967a;
  --ink: #0a0a14;
  --wx-wood: #4a9d5f;
  --wx-fire: #d1542c;
  --wx-earth: #c9a227;
  --wx-metal: #b8c4cc;
  --wx-water: #3d6b9e;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0,0,0,.45);
  --font-display: 'Cormorant Garamond', 'Noto Serif SC', serif;
  --font-body: 'Inter', 'Noto Sans SC', -apple-system, sans-serif;
  --font-cn: 'Noto Serif SC', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ---------- 星空背景 ---------- */
.starfield {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 70% -10%, rgba(61,107,158,.14), transparent),
    radial-gradient(ellipse 60% 40% at 20% 110%, rgba(201,162,39,.10), transparent),
    var(--bg-deep);
}
.stars { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

::selection { background: rgba(201,162,39,.35); }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 5%;
  background: rgba(10,10,20,.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(201,162,39,.18);
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo .bagua {
  width: 38px; height: 38px; border-radius: 50%;
  background: conic-gradient(from 45deg,
    var(--wx-wood) 0 45deg, var(--bg-deep) 45deg 90deg,
    var(--wx-fire) 90deg 135deg, var(--bg-deep) 135deg 180deg,
    var(--wx-earth) 180deg 225deg, var(--bg-deep) 225deg 270deg,
    var(--wx-metal) 270deg 315deg, var(--bg-deep) 315deg 360deg);
  border: 2px solid var(--gold);
  position: relative;
}
.nav-logo .bagua::after {
  content: '☯'; position: absolute; inset: 0;
  display: grid; place-items: center; font-size: 18px;
  background: var(--bg-deep); border-radius: 50%; margin: 7px;
}
.nav-logo .brand { font-family: var(--font-display); font-size: 22px; color: var(--gold-light); letter-spacing: .5px; }
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a {
  color: var(--text-dim); text-decoration: none; font-size: 14px;
  letter-spacing: .3px; transition: color .25s;
}
@media (max-width: 1080px) {
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 13px; }
}
.nav-links a:hover { color: var(--gold-light); }
.nav-links a.cta {
  color: var(--bg-deep); background: linear-gradient(135deg, var(--gold), var(--gold-light));
  padding: 8px 20px; border-radius: 999px; font-weight: 600;
  box-shadow: 0 4px 18px rgba(201,162,39,.35);
}
.nav-links a.cta:hover { filter: brightness(1.1); color: var(--bg-deep); }

/* ---------- 通用容器 ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.section { padding: 90px 0; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 110px 24px 80px; position: relative; }
.hero .cn-title {
  font-family: var(--font-cn); font-size: 15px; letter-spacing: 14px;
  color: var(--gold); margin-bottom: 18px; text-indent: 14px;
  animation: fadeUp 1.2s ease both;
}
.hero h1 {
  font-family: var(--font-display); font-size: clamp(38px, 6vw, 68px);
  font-weight: 500; line-height: 1.15; margin-bottom: 22px;
  background: linear-gradient(120deg, #fff 30%, var(--gold-light) 70%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: fadeUp 1.2s .15s ease both;
}
.hero .sub {
  max-width: 640px; margin: 0 auto 36px; color: var(--text-dim);
  font-size: 18px; animation: fadeUp 1.2s .3s ease both;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; animation: fadeUp 1.2s .45s ease both; }
.btn {
  display: inline-block; padding: 14px 34px; border-radius: 999px;
  font-size: 16px; font-weight: 600; text-decoration: none; letter-spacing: .3px;
  transition: transform .22s, box-shadow .22s, filter .22s; cursor: pointer; border: none;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--bg-deep); box-shadow: 0 6px 26px rgba(201,162,39,.4);
}
.btn-gold:hover { transform: translateY(-3px); box-shadow: 0 10px 34px rgba(201,162,39,.5); }
.btn-ghost { border: 1px solid rgba(201,162,39,.45); color: var(--gold-light); background: transparent; }
.btn-ghost:hover { background: rgba(201,162,39,.1); transform: translateY(-3px); }

/* 五行旋转装饰 */
.wuxing-orbit { display: flex; justify-content: center; gap: 34px; margin-top: 58px; flex-wrap: wrap; }
.wuxing-orbit .wx {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  animation: float 5s ease-in-out infinite;
}
.wuxing-orbit .wx:nth-child(2) { animation-delay: .6s; }
.wuxing-orbit .wx:nth-child(3) { animation-delay: 1.2s; }
.wuxing-orbit .wx:nth-child(4) { animation-delay: 1.8s; }
.wuxing-orbit .wx:nth-child(5) { animation-delay: 2.4s; }
.wx-circle {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-cn); font-size: 26px; font-weight: 600;
  background: var(--bg-card); border: 2px solid;
}
.wx-name { font-size: 12px; color: var(--text-dim); letter-spacing: 2px; text-transform: uppercase; }

/* ---------- 板块标题 ---------- */
.sec-head { text-align: center; margin-bottom: 54px; }
.sec-head .cn { font-family: var(--font-cn); color: var(--gold); letter-spacing: 8px; font-size: 14px; text-indent: 8px; margin-bottom: 8px; }
.sec-head h2 { font-family: var(--font-display); font-size: clamp(30px, 4vw, 44px); font-weight: 500; }
.sec-head p { color: var(--text-dim); max-width: 560px; margin: 12px auto 0; }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.card {
  background: var(--bg-card); border: 1px solid rgba(201,162,39,.16);
  border-radius: var(--radius); padding: 34px 28px;
  transition: transform .28s, border-color .28s, box-shadow .28s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0; transition: opacity .3s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(201,162,39,.4); box-shadow: var(--shadow); }
.card:hover::before { opacity: 1; }
.card .icon { font-size: 34px; margin-bottom: 16px; }
.card h3 { font-family: var(--font-display); font-size: 22px; font-weight: 600; margin-bottom: 10px; color: var(--gold-light); }
.card p { color: var(--text-dim); font-size: 15px; }

/* ---------- 计算器表单 ---------- */
.calc-wrap {
  max-width: 720px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid rgba(201,162,39,.22);
  border-radius: 18px; padding: 46px 42px; box-shadow: var(--shadow);
}
.calc-wrap .form-cn-title { text-align: center; font-family: var(--font-cn); color: var(--gold); letter-spacing: 10px; text-indent: 10px; font-size: 14px; margin-bottom: 6px; }
.calc-wrap h2 { text-align: center; font-family: var(--font-display); font-size: 30px; font-weight: 500; margin-bottom: 8px; }
.calc-wrap .hint { text-align: center; color: var(--text-dim); font-size: 14px; margin-bottom: 32px; }
.form-row { margin-bottom: 22px; }
.form-row label { display: block; font-size: 14px; color: var(--gold-light); margin-bottom: 8px; letter-spacing: .4px; font-weight: 600; }
.form-row label .zh { color: var(--text-dim); font-weight: 400; font-size: 12.5px; margin-left: 6px; }
.form-row input, .form-row select {
  width: 100%; padding: 13px 16px; border-radius: 10px;
  background: var(--bg-deep); border: 1px solid rgba(201,162,39,.25);
  color: var(--text); font-size: 15px; font-family: var(--font-body);
  transition: border-color .25s, box-shadow .25s;
}
.form-row input:focus, .form-row select:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,39,.15);
}
.form-row select option { background: var(--bg-deep); }
.radio-group { display: flex; gap: 12px; }
.radio-group label {
  flex: 1; text-align: center; padding: 12px; border-radius: 10px;
  border: 1px solid rgba(201,162,39,.25); cursor: pointer; color: var(--text-dim);
  transition: all .2s; font-weight: 500;
}
/* 单选框：不能 display:none（会移出 tab 序列，违反 WCAG 2.1.1），
   改为视觉隐藏但保留可聚焦性 */
.radio-group input {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}
.radio-group label:has(input:checked) {
  border-color: var(--gold); background: rgba(201,162,39,.12); color: var(--gold-light);
}
/* 键盘聚焦时给出与鼠标悬停等价的可见指示（WCAG 2.4.7） */
.radio-group label:has(input:focus-visible) {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
}
.calc-submit { width: 100%; padding: 16px; font-size: 17px; margin-top: 8px; }
.calc-note { text-align: center; font-size: 12.5px; color: var(--text-dim); margin-top: 18px; }

/* 加载动画 */
.loading { text-align: center; padding: 60px 0; display: none; }
.loading.show { display: block; }
.loading .bagua-spin {
  width: 54px; height: 54px; margin: 0 auto 20px; border-radius: 50%;
  border: 3px solid transparent; border-top-color: var(--gold);
  animation: spin 1.1s linear infinite;
}
.loading .bagua-spin::after { content: '☯'; display: grid; place-items: center; height: 100%; font-size: 24px; }
.loading p { color: var(--text-dim); letter-spacing: 1px; }

/* ---------- 报告展示 ---------- */
.report-body { max-width: 860px; margin: 0 auto; }
.report-hero {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 30px;
  background: linear-gradient(135deg, rgba(201,162,39,.08), rgba(61,107,158,.08));
  border: 1px solid rgba(201,162,39,.25); border-radius: 16px;
  padding: 40px; margin-bottom: 34px;
}
.report-hero h2 { font-family: var(--font-display); font-size: 26px; font-weight: 500; margin: 12px 0; }
.report-hero p { color: var(--text-dim); font-size: 15px; }
.report-element-badge {
  display: inline-block; padding: 5px 18px; border: 1px solid; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; letter-spacing: 2px;
}
.report-hero-side { display: flex; flex-direction: column; gap: 14px; }
.fact {
  background: rgba(10,10,20,.5); border-radius: 10px; padding: 12px 16px;
  border: 1px solid rgba(201,162,39,.14);
}
.fact span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--text-dim); }
.fact b { display: block; font-size: 16px; color: var(--gold-light); margin: 2px 0; }
.fact small { color: var(--text-dim); font-size: 12.5px; }

/* 十神签名标签（v3.3 深度报告个性化） */
.god-sig { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.sig-chip {
  font-size: 12.5px; padding: 5px 12px; border-radius: 999px;
  background: rgba(201,162,39,.09); border: 1px solid rgba(201,162,39,.28);
  color: var(--text-dim); white-space: nowrap;
}
.sig-chip b { color: var(--gold-light); font-weight: 600; }
body.parchment .sig-chip { background: rgba(160,130,60,.10); border-color: rgba(160,130,60,.30); }
body.parchment .sig-chip b { color: #8c6a1f; }

.report-section {
  background: var(--bg-card); border: 1px solid rgba(201,162,39,.16);
  border-radius: var(--radius); padding: 34px 36px; margin-bottom: 24px;
}
.report-section h3 { font-family: var(--font-display); font-size: 22px; font-weight: 600; margin-bottom: 18px; color: var(--gold-light); }
.report-para { color: var(--text); font-size: 15.5px; margin-bottom: 14px; }
.report-para.muted, .muted { color: var(--text-dim); font-size: 14px; }

/* 五行分布条 */
.wx-dist { display: flex; flex-direction: column; gap: 12px; margin: 20px 0; }
.wx-row { display: grid; grid-template-columns: 130px 1fr 48px; align-items: center; gap: 14px; }
.wx-name { font-size: 14px; color: var(--text); }
.wx-name b { color: var(--gold-light); margin-left: 4px; }
.wx-track { height: 12px; background: rgba(255,255,255,.06); border-radius: 6px; overflow: hidden; }
.wx-fill { height: 100%; border-radius: 6px; transition: width 1s ease; }
.wx-pct { text-align: right; font-size: 13px; color: var(--text-dim); }

/* 四柱 */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.pillar-row {
  background: rgba(10,10,20,.55); border: 1px solid rgba(201,162,39,.2);
  border-radius: 10px; padding: 18px 16px; text-align: center;
}
.pillar-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-dim); }
.pillar-gz {
  font-family: var(--font-cn); font-size: 30px; font-weight: 600; color: var(--gold-light);
  margin: 8px 0; letter-spacing: 4px;
}
.pillar-wx { display: block; font-size: 12px; color: var(--text-dim); font-family: var(--font-body); letter-spacing: 1px; margin-top: 2px; }
.pillar-note { font-size: 12px; color: var(--text-dim); line-height: 1.5; }

/* 性格标签 */
.trait-list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.trait-list li {
  padding: 7px 18px; border-radius: 999px; font-size: 13.5px;
  border: 1px solid rgba(201,162,39,.35); color: var(--gold-light); background: rgba(201,162,39,.08);
}

/* 大运 */
.dayun { display: flex; flex-wrap: wrap; gap: 12px; }
.dy-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: rgba(10,10,20,.55); border: 1px solid; border-radius: 10px;
  padding: 12px 14px; min-width: 86px;
}
.dy-gz { font-family: var(--font-cn); font-size: 21px; font-weight: 600; color: var(--gold-light); }
.dy-age, .dy-year { font-size: 11.5px; color: var(--text-dim); }

/* 喜用神卡片 */
.lucky-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 18px; }
.lucky-card { background: rgba(10,10,20,.55); border-radius: 10px; padding: 22px; border: 1px solid rgba(201,162,39,.18); }
.lucky-card h4 { font-family: var(--font-display); font-size: 18px; color: var(--gold-light); margin-bottom: 10px; }
.lucky-card p { color: var(--text-dim); font-size: 14px; }

/* 锁定遮罩 */
.locked-veil { position: relative; margin-top: 10px; }
.locked-inner {
  text-align: center; padding: 50px 30px;
  background: linear-gradient(180deg, rgba(20,20,31,.2), rgba(20,20,31,.97) 85%);
  border-radius: 0 0 var(--radius) var(--radius);
}
.locked-icon { font-size: 40px; margin-bottom: 14px; }
.locked-inner h3 { font-family: var(--font-display); font-size: 24px; color: var(--gold-light); margin-bottom: 10px; }
.locked-inner p { color: var(--text-dim); font-size: 14px; max-width: 440px; margin: 0 auto 24px; }

/* 注册弹窗 */
.modal-mask {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(5,5,10,.82); backdrop-filter: blur(6px);
  display: none; place-items: center; padding: 20px;
}
.modal-mask.show { display: grid; }
.modal {
  background: var(--bg-card2); border: 1px solid rgba(201,162,39,.35);
  border-radius: 18px; padding: 44px 40px; max-width: 460px; width: 100%;
  box-shadow: var(--shadow); position: relative;
  animation: pop .35s ease;
}
.modal .close { position: absolute; top: 14px; right: 18px; background: none; border: none; color: var(--text-dim); font-size: 22px; cursor: pointer; }
.modal h3 { font-family: var(--font-display); font-size: 26px; color: var(--gold-light); text-align: center; margin-bottom: 6px; }
.modal .m-sub { text-align: center; color: var(--text-dim); font-size: 13.5px; margin-bottom: 26px; }
.modal .btn { width: 100%; text-align: center; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid rgba(201,162,39,.18);
  padding: 56px 0 40px; margin-top: 90px;
  background: linear-gradient(180deg, transparent, rgba(201,162,39,.03));
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 34px; margin-bottom: 36px; }
.footer-grid h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 2px; color: var(--gold); margin-bottom: 14px; }
.footer-grid a { display: block; color: var(--text-dim); text-decoration: none; font-size: 14px; margin-bottom: 9px; transition: color .2s; }
.footer-grid a:hover { color: var(--gold-light); }
.footer-grid .about-text { color: var(--text-dim); font-size: 14px; max-width: 320px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.06); padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  color: var(--text-dim); font-size: 12.5px;
}
.entertainment-note {
  background: rgba(193,68,14,.08); border: 1px solid rgba(193,68,14,.25);
  border-radius: 8px; padding: 10px 16px; font-size: 12px; color: var(--text-dim);
  margin-bottom: 20px; text-align: center;
}

/* ---------- 博客 ---------- */
.post-card {
  display: block; text-decoration: none;
  background: var(--bg-card); border: 1px solid rgba(201,162,39,.16);
  border-radius: var(--radius); padding: 30px;
  transition: transform .25s, border-color .25s;
}
.post-card:hover { transform: translateY(-5px); border-color: rgba(201,162,39,.4); }
.post-card .cat { font-size: 11.5px; text-transform: uppercase; letter-spacing: 2px; color: var(--gold); }
.post-card h3 { font-family: var(--font-display); font-size: 21px; color: var(--text); margin: 8px 0 10px; font-weight: 600; }
.post-card p { color: var(--text-dim); font-size: 14.5px; }
.post-card .meta { margin-top: 14px; font-size: 12.5px; color: var(--text-dim); }
.article-body { max-width: 760px; margin: 0 auto; }
.article-body h2 { font-family: var(--font-display); font-size: 28px; font-weight: 600; margin: 40px 0 16px; color: var(--gold-light); }
.article-body h3 { font-family: var(--font-display); font-size: 21px; font-weight: 600; margin: 30px 0 12px; }
.article-body p { margin-bottom: 16px; color: var(--text); font-size: 16px; }
.article-body ul, .article-body ol { margin: 0 0 16px 24px; color: var(--text); }
.article-head { text-align: center; margin-bottom: 40px; }
.article-head .cat { color: var(--gold); text-transform: uppercase; letter-spacing: 3px; font-size: 12.5px; }
.article-head h1 { font-family: var(--font-display); font-size: clamp(30px, 4.5vw, 44px); font-weight: 500; margin: 12px 0; }
.article-head .meta { color: var(--text-dim); font-size: 13.5px; }

/* ---------- 法律页 ---------- */
.legal-body { max-width: 760px; margin: 0 auto; }
.legal-body h1 { font-family: var(--font-display); font-size: 36px; font-weight: 500; margin-bottom: 30px; color: var(--gold-light); }
.legal-body h2 { font-family: var(--font-display); font-size: 22px; font-weight: 600; margin: 34px 0 12px; color: var(--gold-light); }
.legal-body p, .legal-body li { color: var(--text); font-size: 15px; margin-bottom: 14px; }
.legal-body ul { margin-left: 22px; }

/* ---------- 通用动画 ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
/* 渐进增强：仅在 JS 可用时才把 .reveal 初始隐藏。
   若直接写 .reveal{opacity:0}，一旦 JS 加载失败（网络/CDN 被拦/脚本报错），
   整页内容将永远不可见 —— 对用户和爬虫都是灾难。
   html.js 由 head.ejs 的内联脚本同步添加。 */
.js .reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
/* 兜底：JS 可用但 IntersectionObserver 不被支持时也要显示内容 */
.no-io .reveal { opacity: 1; transform: none; }

/* ---------- 羊皮纸阅读模式（长报告护眼） ---------- */
.reading-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(201,162,39,.1); border: 1px solid rgba(201,162,39,.3);
  color: var(--gold-light); border-radius: 999px; padding: 8px 20px;
  font-size: 13.5px; cursor: pointer; letter-spacing: .4px;
  transition: all .25s; margin-bottom: 22px; font-family: inherit;
}
.reading-toggle:hover { background: rgba(201,162,39,.18); }

body.parchment {
  background: #f5f0e6;
  color: #3a2f1d;
}
body.parchment .starfield { background: radial-gradient(ellipse 60% 40% at 70% -10%, rgba(201,162,39,.08), transparent), #f5f0e6; }
body.parchment .nav { background: rgba(245,240,230,.92); border-bottom-color: rgba(160,130,60,.35); }
body.parchment .nav-links a { color: #6b5c3e; }
body.parchment .nav-links a:hover, body.parchment .nav-logo .brand { color: #8c6a1f; }
body.parchment .report-body .report-hero { background: #fbf8f1; border-color: rgba(160,130,60,.35); }
body.parchment .report-body .report-hero p { color: #5c4f33; }
body.parchment .report-body .fact { background: #f2ecdd; border-color: rgba(160,130,60,.25); }
body.parchment .report-body .fact span { color: #8a7a58; }
body.parchment .report-body .fact b { color: #8c6a1f; }
body.parchment .report-body .fact small { color: #8a7a58; }
body.parchment .report-body .report-section { background: #fbf8f1; border-color: rgba(160,130,60,.28); }
body.parchment .report-body .report-para { color: #443a26; }
body.parchment .report-body .muted { color: #7a6c4e; }
body.parchment .report-body .wx-track { background: rgba(60,47,26,.1); }
body.parchment .report-body .wx-name, body.parchment .report-body .wx-pct { color: #5c4f33; }
body.parchment .report-body .wx-name b { color: #8c6a1f; }
body.parchment .report-body .pillar-row { background: #f2ecdd; border-color: rgba(160,130,60,.3); }
body.parchment .report-body .pillar-gz { color: #8c6a1f; }
body.parchment .report-body .pillar-wx, body.parchment .report-body .pillar-note, body.parchment .report-body .pillar-label { color: #8a7a58; }
body.parchment .report-body .trait-list li { border-color: rgba(140,106,31,.4); color: #8c6a1f; background: rgba(201,162,39,.1); }
body.parchment .report-body .dy-item { background: #f2ecdd; border-color: rgba(160,130,60,.3); }
body.parchment .report-body .dy-gz { color: #8c6a1f; }
body.parchment .report-body .dy-age, body.parchment .report-body .dy-year { color: #8a7a58; }
body.parchment .report-body .lucky-card { background: #f2ecdd; border-color: rgba(160,130,60,.25); }
body.parchment .report-body .lucky-card p { color: #6b5c3e; }
body.parchment .report-body h3 { color: #8c6a1f; }
body.parchment .site-footer { background: linear-gradient(180deg, transparent, rgba(201,162,39,.06)); }
body.parchment .entertainment-note { background: rgba(193,68,14,.06); border-color: rgba(193,68,14,.3); color: #7a4a30; }
body.parchment .footer-bottom, body.parchment .footer-grid .about-text { color: #8a7a58; }
body.parchment .stars { display: none; }
body.parchment .reading-toggle { background: rgba(140,106,31,.1); border-color: rgba(140,106,31,.4); color: #8c6a1f; }
body.parchment .report-element-badge { filter: brightness(.75); }
body.parchment .report-body .report-hero h2 span { filter: brightness(.7); }
body.parchment .report-body .report-para b { filter: brightness(.75); }

/* ---------- 移动端汉堡菜单 ---------- */
.nav-burger { display: none; background: none; border: 1px solid rgba(201,162,39,.35); color: var(--gold-light); width: 42px; height: 42px; border-radius: 10px; font-size: 20px; cursor: pointer; }
.nav-mobile {
  display: none; flex-direction: column; gap: 4px; padding: 14px 5% 20px;
  background: rgba(10,10,20,.96); border-bottom: 1px solid rgba(201,162,39,.2);
  backdrop-filter: blur(14px);
}
.nav-mobile.open { display: flex; }
.nav-mobile a { color: var(--text); text-decoration: none; padding: 12px 6px; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 16px; }
.nav-mobile a:last-child { border: none; }
.nav-mobile a.cta-mobile { color: var(--gold-light); font-weight: 600; }

/* ---------- 响应式 ---------- */
/* 通用栅格：桌面双列 / 手机单列（禁止在模板里写死 grid-template-columns，否则无法响应式） */
.product-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; align-items: start; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid-2.asym { grid-template-columns: 1.4fr 1fr; }
.form-grid-2.tight { gap: 10px; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-burger { display: grid; place-items: center; }
  .report-hero { grid-template-columns: 1fr; padding: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .calc-wrap { padding: 32px 24px; }
  .section { padding: 60px 0; }
  .hero { padding: 80px 20px 60px; }
  /* 商品详情页：双列 → 单列（图卡在上，信息在下） */
  .product-grid { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 560px) {
  .wx-row { grid-template-columns: 96px 1fr 42px; }
  .footer-grid { grid-template-columns: 1fr; }
  .report-section { padding: 24px 20px; }
  /* 表单内双列（国家/州、城市/邮编等）→ 单列堆叠，输入框不再被挤压 */
  .form-grid-2, .form-grid-2.asym { grid-template-columns: 1fr; gap: 10px; }
}

/* ---------- 后台专用样式（中文） ---------- */
.admin-body { background: #f5f6fa; color: #1f2329; font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif; }
.admin-layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-side {
  background: #14141f; color: #e8e6e0; padding: 24px 0;
  position: sticky; top: 0; height: 100vh;
}
.admin-side .logo { text-align: center; font-size: 19px; color: #e6c85c; font-weight: 700; padding: 10px 0 24px; letter-spacing: 2px; border-bottom: 1px solid rgba(201,162,39,.25); margin-bottom: 18px; }
.admin-side .logo small { display: block; font-size: 11px; color: #9a97a0; font-weight: 400; margin-top: 4px; letter-spacing: 1px; }
.admin-menu a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 26px; color: #b9b6c0; text-decoration: none; font-size: 15px;
  transition: all .2s; border-left: 3px solid transparent;
}
.admin-menu a:hover { color: #fff; background: rgba(255,255,255,.05); }
.admin-menu a.active { color: #e6c85c; border-left-color: #e6c85c; background: rgba(201,162,39,.1); }
.admin-main { padding: 30px 34px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; flex-wrap: wrap; gap: 14px; }
.admin-top h1 { font-size: 24px; font-weight: 600; }
.admin-actions { display: flex; gap: 12px; }
.a-btn {
  display: inline-block; padding: 9px 20px; border-radius: 8px; text-decoration: none;
  font-size: 14.5px; font-weight: 500; border: none; cursor: pointer; transition: all .2s;
  font-family: inherit;
}
.a-btn-gold { background: #c9a227; color: #fff; }
.a-btn-gold:hover { background: #b8931f; }
.a-btn-ghost { background: #fff; color: #444; border: 1px solid #d5d8e0; }
.a-btn-ghost:hover { border-color: #c9a227; color: #a8861d; }
.a-btn-danger { background: #fff; color: #d0453a; border: 1px solid #f0c4c0; }
.a-btn-danger:hover { background: #fdf1f0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 30px; }
.stat-card { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 2px 10px rgba(30,35,60,.06); }
.stat-card .num { font-size: 32px; font-weight: 700; color: #1f2329; }
.stat-card .lbl { font-size: 13.5px; color: #7a7e89; margin-top: 4px; }
.stat-card .delta { font-size: 12px; color: #1a9d5f; margin-top: 6px; }
.a-panel { background: #fff; border-radius: 12px; padding: 26px; box-shadow: 0 2px 10px rgba(30,35,60,.06); margin-bottom: 24px; }
.a-panel h2 { font-size: 18px; font-weight: 600; margin-bottom: 18px; }
.a-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.a-table th { text-align: left; padding: 11px 12px; background: #f7f8fb; color: #7a7e89; font-weight: 500; font-size: 13px; }
.a-table td { padding: 12px; border-bottom: 1px solid #f0f1f5; }
.a-table tr:hover td { background: #fafbf5; }
.a-form .f-row { margin-bottom: 18px; }
.a-form label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 7px; color: #3c4152; }
.a-form input[type=text], .a-form input[type=email], .a-form input[type=password], .a-form input[type=number], .a-form select, .a-form textarea {
  width: 100%; padding: 10px 14px; border: 1px solid #d5d8e0; border-radius: 8px;
  font-size: 15px; font-family: inherit; transition: border-color .2s;
}
.a-form textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.a-form input:focus, .a-form textarea:focus, .a-form select:focus { outline: none; border-color: #c9a227; box-shadow: 0 0 0 3px rgba(201,162,39,.12); }
.a-form .check-row { display: flex; align-items: center; gap: 8px; }
.a-form .check-row input { width: auto; }
.tag { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 12.5px; }
.tag-green { background: #e8f7ef; color: #1a9d5f; }
.tag-gray { background: #f0f1f5; color: #7a7e89; }
.tag-gold { background: #faf3df; color: #a8861d; }
.a-pager { display: flex; gap: 8px; margin-top: 18px; justify-content: center; }
.a-pager a, .a-pager span { padding: 7px 14px; border-radius: 7px; text-decoration: none; font-size: 14px; background: #fff; color: #444; border: 1px solid #e3e5ec; }
.a-pager .cur { background: #c9a227; color: #fff; border-color: #c9a227; }
.alert { padding: 14px 18px; border-radius: 9px; margin-bottom: 20px; font-size: 14.5px; }
.alert-ok { background: #e8f7ef; color: #14724a; border: 1px solid #b8e6d2; }
.admin-login-page { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #14141f, #1c1c2e); }
.admin-login-box { background: #fff; border-radius: 16px; padding: 44px 40px; width: 380px; max-width: 92vw; }
.admin-login-box h1 { font-size: 22px; text-align: center; margin-bottom: 6px; }
.admin-login-box .sub { text-align: center; color: #7a7e89; font-size: 13.5px; margin-bottom: 28px; }
.admin-login-box .err { background: #fdf1f0; color: #c5382d; padding: 10px 14px; border-radius: 8px; font-size: 13.5px; margin-bottom: 16px; text-align: center; }
.admin-login-box .btn-full { width: 100%; padding: 12px; font-size: 16px; border-radius: 9px; background: #c9a227; color: #fff; border: none; cursor: pointer; font-weight: 600; margin-top: 8px; }
.admin-login-box .btn-full:hover { background: #b8931f; }
.empty-tip { text-align: center; color: #9a97a0; padding: 44px 0; font-size: 14px; }
/* 后台双列表单字段（手机上单列） */
.a-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; padding: 12px 0; }
  .admin-side .logo { border: none; margin-bottom: 6px; padding: 6px 0 10px; }
  .admin-menu a { padding: 9px 18px; font-size: 14px; }
  .admin-main { padding: 18px 14px; }
  .a-grid-2 { grid-template-columns: 1fr; gap: 0; }
}

/* 前后台公共 */
.wx-legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 18px 0; }
.wx-chip { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-dim); }
.wx-dot { width: 10px; height: 10px; border-radius: 50%; }

/* ============================================
   Cookie 同意横幅 + 分享按钮（获客/合规模块）
   ============================================ */
/* ---------- Cookie 同意横幅 ---------- */
.cookie-consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 500;
  transform: translateY(110%);
  transition: transform .4s ease;
  padding: 0 16px 16px;
  pointer-events: none;
}
.cookie-consent.show { transform: translateY(0); pointer-events: auto; }
.cookie-box {
  max-width: 760px; margin: 0 auto;
  background: rgba(20,20,31,.97);
  border: 1px solid rgba(201,162,39,.28);
  border-radius: 14px;
  padding: 18px 22px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.cookie-text b { color: var(--gold-light); font-size: 14.5px; }
.cookie-text p { color: var(--text-dim); font-size: 12.5px; margin-top: 3px; line-height: 1.6; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
/* 触摸目标 ≥ 44px（WCAG 2.5.5 AAA / 2.5.8 AA；Apple HIG 建议 44pt） */
.cc-btn {
  padding: 12px 18px; min-height: 44px; border-radius: 8px; font-size: 13px; cursor: pointer;
  border: 1px solid transparent; font-family: inherit; transition: all .2s;
}
.cc-ghost { background: transparent; color: var(--text-dim); border-color: rgba(168,165,174,.35); }
.cc-ghost:hover { color: var(--text); border-color: rgba(168,165,174,.6); }
.cc-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #1a1410; font-weight: 600;
}
.cc-gold:hover { filter: brightness(1.06); }
@media (max-width: 640px) {
  .cookie-box { flex-direction: column; align-items: stretch; text-align: center; }
  .cookie-actions { justify-content: center; }
}

/* ---------- 结果区分享栏 ---------- */
.share-bar {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap;
  margin: 26px auto 10px; padding: 14px 18px;
  background: rgba(10,10,20,.45);
  border: 1px solid rgba(201,162,39,.18);
  border-radius: 12px;
  max-width: 560px;
}
.share-bar .share-label { font-size: 13px; color: var(--text-dim); letter-spacing: .5px; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; min-height: 44px; border-radius: 8px; font-size: 13px; cursor: pointer;
  border: 1px solid rgba(168,165,174,.3); background: rgba(20,20,31,.8);
  color: var(--text); text-decoration: none; font-family: inherit; transition: all .2s;
}
.share-btn:hover { border-color: var(--gold); color: var(--gold-light); transform: translateY(-1px); }
.share-btn.copied { border-color: #4a9d5f; color: #4a9d5f; }

/* ============================================
   无障碍 / 触摸目标 / 动效偏好（WCAG 2.1 AA）
   ============================================ */

/* 仅供屏幕阅读器读取的内容（WCAG 1.1.1 / 4.1.3） */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* 跳转主内容链接：键盘用户首个可聚焦元素，聚焦后才可见（WCAG 2.4.1） */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 1000;
  padding: 10px 18px; border-radius: 8px;
  background: var(--gold); color: #1a1410;
  font-size: 14px; font-weight: 600; text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* 主内容区获得程序化聚焦时不显示焦点环（避免跳转后突兀的蓝色/白色描边） */
main:focus { outline: none; }

/* 全站统一可见焦点指示（WCAG 2.4.7） */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
  border-radius: 4px;
}

/* 复选框行：放大点击区并保证与标签垂直对齐（WCAG 2.5.5） */
.checkbox-row {
  display: flex; align-items: flex-start; gap: 10px;
  min-height: 44px;
}
.checkbox-row input[type="checkbox"] {
  width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto;
  accent-color: var(--gold); cursor: pointer;
}
.checkbox-row label { cursor: pointer; font-size: 14px; line-height: 1.5; }

/* 表单内联错误提示（替代 alert()，WCAG 3.3.1 / 3.3.3） */
.field-error {
  display: block; margin-top: 6px;
  font-size: 12.5px; color: #ff9d7a; line-height: 1.5;
}
.form-row input[aria-invalid="true"] { border-color: #ff9d7a; }

/* 外观像链接但语义是按钮（如 Cookie 设置）— 保证触摸目标 ≥ 44px（WCAG 2.5.5） */
.linklike {
  display: inline-block; background: none; border: none; padding: 8px 0;
  color: var(--text-dim); font-family: inherit; font-size: 14px;
  text-align: left; text-decoration: underline; cursor: pointer;
}
.linklike:hover { color: var(--gold-light); }

/* Cookie 横幅关闭按钮：触摸目标 ≥ 44×44（WCAG 2.5.5 AAA / 2.5.8 AA） */
.cc-close {
  position: absolute; top: 6px; right: 8px;
  width: 44px; height: 44px;
  background: none; border: none; cursor: pointer;
  color: var(--text-dim); font-size: 22px; line-height: 1;
  border-radius: 8px;
}
.cc-close:hover { color: var(--text); }
.cookie-box { position: relative; }

/* 弹窗关闭按钮同样放大触摸区域 */
.modal .close {
  width: 44px; height: 44px; line-height: 1;
  display: grid; place-items: center; border-radius: 8px;
  top: 8px; right: 10px;
}
.nav-burger { width: 44px; height: 44px; }

/* 尊重用户「减少动态效果」系统偏好（WCAG 2.3.3） */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  /* 加载指示器需要保留动画，否则用户以为卡死 */
  .loading .bagua-spin { animation-duration: 1.1s !important; animation-iteration-count: infinite !important; }
}

/* 强制颜色模式（Windows 高对比度）下保留焦点与边框可辨识性 */
@media (forced-colors: active) {
  a:focus-visible, button:focus-visible, input:focus-visible,
  select:focus-visible, [tabindex]:focus-visible {
    outline: 3px solid CanvasText;
  }
  .radio-group label { border: 1px solid CanvasText; }
}
