/* ==========================================================================
   XUANJI · 玄机 —— 组件层
   依赖 tokens.css。浅色纸面 + 细边 + 朱砂强调。
   ========================================================================== */

/* ==========================================================================
   1. 顶栏导航
   --------------------------------------------------------------------------
   固定顶部。滚动前为米灰白实底，滚动后叠加毛玻璃 + 底部细线（.scrolled 由
   ui.js 在 scrollY > 8 时加上），营造「浮起」的高级感。
   ========================================================================== */

header.site {
  position: sticky; top: 0; z-index: 60;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: background var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
header.site.scrolled {
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 12px rgba(26,46,61,.05);
}

header.site .inner {
  width: 100%;
  max-width: var(--maxw); margin: 0 auto;
  /* 内边距与间距走流体 —— 1024px 笔记本自动收紧，1440px 以上舒展，
     使「品牌 + 导航 + 语言/账号」在跨过导航折叠断点后刚好放得下 */
  padding: 12px clamp(16px, 2vw, 28px);
  display: flex; align-items: center; gap: clamp(10px, 1.5vw, 22px);
  min-height: var(--header-h);
}

@media (max-width: 767.98px) {
  header.site .inner { padding: 10px 18px; gap: 12px; }
}

/* ---------- 品牌 ---------- */
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}

/* 品牌 SVG：极简线描小罗盘（深黛青，无金色渐变、无太极） */
.brand .mark-svg {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  flex-shrink: 0;
  color: var(--text);
  transition: color var(--dur) var(--ease);
}
.brand:hover .mark-svg { color: var(--accent); }
.brand .mark-svg svg { display: block; width: 32px; height: 32px; }

/* 文本型徽标（备用） */
.brand .mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: var(--surface);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-size: 15px; font-weight: 700;
  font-family: var(--font-cjk-serif);
  border-radius: 50%;
  flex-shrink: 0;
}

.brand .txt {
  display: flex; flex-direction: column; line-height: 1.1;
  font-weight: 700; font-size: clamp(13px, 1.05vw, 15px);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text);
}
.brand .txt small {
  font-size: 9px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3); margin-top: 3px;
}

/* ---------- 主导航 ---------- */
nav.main {
  display: flex; align-items: center; gap: 2px;
  margin-left: auto;
}

nav.main a {
  position: relative;
  text-decoration: none;
  font-size: clamp(11.5px, .85vw, 12.5px); font-weight: 550;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-2);
  padding: 9px clamp(8px, .8vw, 12px); border-radius: var(--radius-xs);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
  white-space: nowrap;
  min-height: 38px; display: inline-flex; align-items: center;
}
nav.main a:hover { color: var(--text); background: var(--surface-3); }

/* 当前页：朱砂下划线 + 深黛青字（不用填充块，保持干净） */
nav.main a.active {
  color: var(--text);
  font-weight: 650;
}
nav.main a.active::after {
  content: '';
  position: absolute;
  left: clamp(8px, .8vw, 12px); right: clamp(8px, .8vw, 12px);
  bottom: 2px; height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------- 顶栏右侧 ---------- */
.head-right {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}

.lang-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  padding: 7px 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  cursor: pointer; font-family: inherit;
  transition: all var(--dur) var(--ease);
  min-height: 34px;
}
.lang-btn:hover {
  border-color: var(--accent-line); color: var(--accent);
  background: var(--accent-soft);
}

.user-chip {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12.5px; color: var(--text-2);
  background: var(--surface);
  transition: border-color var(--dur) var(--ease);
}
.user-chip:hover { border-color: var(--border-2); }
.user-chip .av {
  width: 25px; height: 25px; border-radius: 50%;
  background: var(--accent);
  color: #FFFEFB; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700;
}

/* 汉堡按钮（移动端）—— 触屏最小点击区 48×48 */
.menu-btn {
  display: none;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-xs);
  width: 44px; height: 44px; cursor: pointer; font-size: 17px;
  margin-left: auto;
  align-items: center; justify-content: center;
}

/* 顶栏折叠：内容断点 1024px
   ------------------------------------------------------------------
   注意这个 1024px 与全站主断点 768px 不同 —— 它不是版式断点，
   而是「内容溢出保护」：品牌 + 8 个导航项 + 语言/账号控件的最小
   可读宽度约 1000px，低于此值横向排布必然相互挤压或被裁切。
   版式的单列/多栏切换一律以 768px 为准（见 tokens.css）。 */
@media (max-width: 1023.98px) {
  .menu-btn { display: inline-flex; }
  nav.main {
    display: flex;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: var(--glass-2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 8px 18px 14px; gap: 2px;
    /* 展开 / 收起用 max-height 做平滑过渡，避免生硬跳转 */
    max-height: 0; overflow: hidden;
    opacity: 0; visibility: hidden;
    transition: max-height .32s var(--ease), opacity .22s var(--ease),
                visibility .32s var(--ease), padding .32s var(--ease);
  }
  nav.main.open {
    max-height: 460px; opacity: 1; visibility: visible;
    padding: 8px 18px 14px;
  }
  nav.main a { padding: 13px 12px; font-size: 13.5px; min-height: 48px; }
  nav.main a.active::after { left: 12px; right: auto; width: 20px; bottom: 8px; }
  header.site .inner { position: relative; flex-wrap: wrap; }
}

@media (max-width: 767.98px) {
  .user-chip .small, #navLogout { display: none; }

  /* 触屏最小点击区 ≥48×48（指令 §六） */
  .menu-btn { width: 48px; height: 48px; font-size: 18px; }
  .lang-btn {
    min-height: 48px; min-width: 48px;
    padding: 10px 14px; font-size: 12px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .user-chip {
    min-height: 48px; padding: 6px 14px 6px 6px;
    display: inline-flex; align-items: center;
  }
  header.site .btn,
  header.site .btn-sm {
    min-height: 48px; padding: 12px 18px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  /* 顶栏更高，容纳 48px 控件而不拥挤 */
  header.site .inner { min-height: 64px; }

  /* 页内小按钮 / 页签同样放大到触屏可点 */
  .btn-sm { min-height: 48px; padding: 12px 18px; }
  .btn-mini { min-height: 48px; padding: 12px 16px; }
  .tabs button,
  .method-tabs button,
  [class*="tabs"] > button { min-height: 48px; padding: 13px 14px; }
  .fb-btn { min-height: 48px; }
  .ghost-link { padding: 12px 0; }

  /* 页脚链接：原本只有 21px 行高，触屏上极难点中。
     用 block + 内边距撑到 48px，同时把 9px 列间距收成 0，避免整体过高。 */
  footer.site .f-col nav { gap: 0; }
  footer.site nav a {
    display: flex; align-items: center;
    min-height: 48px; padding: 4px 0;
  }
  footer.site .f-bottom a,
  footer.site .f-brand .f-note a {
    display: inline-flex; align-items: center;
    min-height: 48px; padding: 4px 0;
  }
}

/* ==========================================================================
   2. 页脚
   --------------------------------------------------------------------------
   深黛青底 + 浅字，不抢页面重心。三栏：品牌 slogan / 快捷导航 / 法务。
   ========================================================================== */

footer.site {
  margin-top: 72px;
  background: var(--text);
  color: rgba(255,254,251,.72);
  padding: 44px 0 26px;
}
footer.site .inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, .8fr) minmax(0, .8fr);
  gap: 40px;
  font-size: 12.5px;
  align-items: start;
}
footer.site .inner > * { min-width: 0; }

footer.site .f-brand {
  display: flex; flex-direction: column; gap: 12px;
}
footer.site .f-brand .brand {
  display: flex; align-items: center; gap: 10px;
  color: #FFFEFB; text-decoration: none;
}
footer.site .f-brand .mark-svg { color: #FFFEFB; opacity: .9; display: grid; place-items: center; width: 30px; height: 30px; }
footer.site .f-brand .mark-svg svg { width: 30px; height: 30px; display: block; }
footer.site .f-brand .brand .txt { color: #FFFEFB; }
footer.site .f-brand .brand .txt b { font-weight: 700; }
footer.site .f-brand .brand .txt small { color: rgba(255,254,251,.45); }
footer.site .f-brand .slogan {
  font-size: 12.5px; line-height: 1.7;
  color: rgba(255,254,251,.58);
  max-width: 320px;
}
footer.site .f-brand .f-note {
  font-size: 11.5px; line-height: 1.6;
  color: rgba(255,254,251,.40);
  max-width: 320px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,254,251,.10);
}

footer.site .f-col h5 {
  margin: 0 0 12px;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: rgba(255,254,251,.42);
  font-family: var(--font);
}
footer.site .f-col nav { display: flex; flex-direction: column; gap: 9px; }
footer.site nav a {
  text-decoration: none; color: rgba(255,254,251,.68);
  font-size: 12.5px; width: fit-content;
  transition: color var(--dur) var(--ease);
}
footer.site nav a:hover { color: #FFFEFB; }

footer.site .f-bottom {
  max-width: var(--maxw); margin: 30px auto 0; padding: 18px 28px 0;
  border-top: 1px solid rgba(255,254,251,.12);
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  font-size: 11.5px; color: rgba(255,254,251,.48);
  line-height: 1.7;
}

@media (max-width: 767.98px) {
  footer.site .inner { grid-template-columns: 1fr 1fr; gap: 26px; }
  footer.site .f-brand { grid-column: 1 / -1; }
}
@media (max-width: 767.98px) {
  footer.site .inner { grid-template-columns: 1fr; padding: 0 18px; }
  footer.site .f-bottom { padding: 18px 18px 0; flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   3. 按钮
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13.5px; font-weight: 600;
  letter-spacing: .03em;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
  min-height: 42px;
  /* 按钮是「内容优先」的 inline-flex：长文案 + nowrap 会顶破容器。
     限死最大宽度，窄屏再放开换行（见下方 768px 断点）。 */
  max-width: 100%;
  min-width: 0;
}

/* 主按钮：低饱和朱砂 —— 全站唯一的高饱和行动色 */
.btn-primary {
  background: var(--accent);
  color: #FFFEFB;
  box-shadow: 0 1px 2px rgba(26,46,61,.10), 0 6px 18px rgba(184,50,39,.20);
}
.btn-primary:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(26,46,61,.12), 0 10px 26px rgba(184,50,39,.26);
}
.btn-primary:active { transform: translateY(1px); box-shadow: 0 1px 2px rgba(26,46,61,.10); }

/* 次按钮：描边（深黛青文字，无填充） */
.btn-outline {
  background: transparent;
  border-color: var(--border-2);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--accent-line);
  color: var(--accent);
  background: var(--accent-soft);
}
.btn-outline:active { transform: translateY(1px); }

/* 幽灵按钮 */
.btn-ghost {
  background: transparent; color: var(--text-2);
  border-color: var(--border);
}
.btn-ghost:hover {
  color: var(--text); border-color: var(--border-2);
  background: var(--surface-3);
}
.btn-ghost:active { transform: translateY(1px); }

/* 纯文字按钮（Hero 次级 CTA） */
.btn-text {
  background: transparent; border: none;
  color: var(--text); padding: 12px 6px;
  text-decoration: underline;
  text-decoration-color: var(--border-2);
  text-underline-offset: 4px;
}
.btn-text:hover { color: var(--accent); text-decoration-color: var(--accent-line); }

.btn-sm { padding: 8px 15px; font-size: 12px; min-height: 34px; }
.btn-lg { padding: 15px 32px; font-size: 15px; min-height: 50px; }

/* 窄屏：按钮取消 nowrap 并收紧内边距。
   手机上的按钮文案经常换行（中英文长度差异大），nowrap 会把
   一行按钮顶出容器造成整页横向滚动。 */
@media (max-width: 767.98px) {
  .btn { white-space: normal; text-align: center; }
  .btn-lg { padding: 14px 22px; font-size: 14.5px; }
}

.btn:disabled, .btn[disabled] {
  opacity: .40; cursor: not-allowed; transform: none !important;
  box-shadow: none !important;
}

/* 小尺寸工具按钮 */
.btn-mini {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 8px 13px; border-radius: var(--radius-xs);
  font-size: 12px; font-family: inherit; cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.btn-mini:hover { border-color: var(--border-2); color: var(--text); background: var(--surface); }

/* ==========================================================================
   4. 卡片 / 玻璃面板
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  position: relative;
}

/* 卡片顶部朱砂细线（装饰） */
.card::before {
  content: '';
  position: absolute; top: 0; left: 24px; right: 24px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
  opacity: .7;
}

.card h2 {
  font-size: 15px; font-weight: 650;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-2);
  margin: 0 0 4px;
  font-family: var(--font);
}
.card h2 + .sub,
.card .sub {
  font-size: 12.5px; color: var(--text-3); margin: 0 0 16px;
}

/* 可交互卡片：hover 上浮 4px + 阴影加深，0.3s */
.card-lift {
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.card-lift:hover {
  transform: translateY(-4px);
  border-color: var(--border-2);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 767.98px) {
  .card { padding: 18px 16px; }
}

/* 空状态
   —— 用精细 SVG 插画替代单字图标。图形本身自带光晕与刻线，
      这里只负责居中、留白与轻微的呼吸动画。 */
.empty-state {
  text-align: center; padding: 40px 20px;
  color: var(--text-3);
}
.empty-state .ic {
  width: 168px; height: 168px; margin: 0 auto 4px;
  display: grid; place-items: center;
  color: var(--text-2); font-size: 20px;
  font-family: var(--font-cjk-serif);
  animation: glyph-breathe 7s ease-in-out infinite;
}
.empty-state .ic > svg { width: 100%; height: 100%; display: block; overflow: visible; }
/* 兼容仍在使用单字图标的旧调用点 */
.empty-state .ic:not(:has(svg)) {
  width: 52px; height: 52px; margin-bottom: 14px;
  border: 1px solid var(--border-2); border-radius: 50%;
  background: var(--surface-2);
}
@keyframes glyph-breathe {
  0%, 100% { opacity: .92; transform: translateY(0) scale(1); }
  50%      { opacity: 1;   transform: translateY(-3px) scale(1.012); }
}
@media (prefers-reduced-motion: reduce) {
  .empty-state .ic { animation: none; }
}
.empty-state p { margin: 0; font-size: 13.5px; }
.empty-state .es-title {
  margin: 2px 0 7px; font-size: 15.5px; font-weight: 600;
  color: var(--text); letter-spacing: -.01em;
}
.empty-state .es-actions { margin-top: 16px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* 图形库通用：所有 SVG 默认继承描边与尺寸 */
svg.xjg { display: block; }
svg.xjg text { font-family: var(--font); }
svg.xjg-hex, svg.xjg-ring, svg.xjg-face, svg.xjg-palm {
  width: 100%; height: auto; max-width: 340px; margin: 0 auto;
}
svg.xjg-divider { width: 100%; max-width: 220px; height: 22px; display: block; margin: 0 auto; }
svg.xjg-band { width: 100%; height: 60px; display: block; }

/* 图解容器：浅色下给 SVG 一个「纸面内凹」的底，让它从卡片上分层出来，
   同时提供四角定位刻线，呼应罗盘的机械感。 */
.chart-frame {
  position: relative;
  padding: 10px 6px 4px;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(169,138,75,.06), transparent 62%),
    linear-gradient(180deg, rgba(26,46,61,.035), rgba(26,46,61,.015));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.75),
    inset 0 0 30px rgba(26,46,61,.045);
  border: 1px solid var(--border);
  overflow: hidden;
}
.chart-frame::before,
.chart-frame::after {
  content: ''; position: absolute; width: 13px; height: 13px;
  border-color: var(--accent-line); border-style: solid; opacity: .55;
  pointer-events: none;
}
.chart-frame::before { left: 9px;  top: 9px;    border-width: 1px 0 0 1px; }
.chart-frame::after  { right: 9px; bottom: 9px; border-width: 0 1px 1px 0; }
.chart-frame svg { margin: 0 auto; }

/* ==========================================================================
   5. 页头
   ========================================================================== */

.page-head { padding: 40px 0 22px; }
.page-head h1 {
  font-size: clamp(26px, 3.6vw, 38px);
  margin: 0 0 8px;
}
.page-head p {
  color: var(--text-2); font-size: 14.5px; margin: 0;
  max-width: 640px;
}
.page-head .eyebrow { display: block; margin-bottom: 12px; }

/* ==========================================================================
   6. 表单
   ========================================================================== */

.field { margin-bottom: 15px; }

.field > label {
  /* 与输入框建立 for 关联后，<label> 本身就是可点击目标，
     按 WCAG 2.5.8 需要 ≥48px 高。用 flex 垂直居中撑开，
     行距靠 margin 收窄补回，视觉上与原来基本一致。 */
  display: flex;
  align-items: center;
  min-height: 48px;
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0;
}
.field > label .req { color: var(--accent); margin-left: 3px; }

/* 兜底：其它位置既关联了输入框、又没走 .field 结构的 label */
label[for] { display: flex; align-items: center; min-height: 48px; }

input[type="text"], input[type="email"], input[type="password"],
input[type="date"], input[type="time"], input[type="number"],
input[type="tel"], select, textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  color: var(--text);
  font-family: inherit; font-size: 14px;
  min-height: 44px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

input::placeholder, textarea::placeholder { color: var(--text-4); }

input:hover, select:hover, textarea:hover { border-color: var(--border-2); }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237A8B94' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
}
select option { background: var(--surface); color: var(--text); }

/* 原生日期/时间控件在浅色下无需反色 */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  cursor: pointer; opacity: .55;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover { opacity: .9; }

/* 勾选框 */
label.check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13.5px; color: var(--text-2);
  cursor: pointer; text-transform: none;
  letter-spacing: 0; font-weight: 400;
}
label.check input[type="checkbox"] {
  width: 17px; height: 17px; flex-shrink: 0; margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}

.hint { font-size: 11.5px; color: var(--text-3); margin-top: 6px; line-height: 1.5; }

/* ==========================================================================
   7. 提示条
   ========================================================================== */

.alert {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  border: 1px solid;
  margin-bottom: 14px;
  line-height: 1.55;
}
.alert-info {
  background: var(--info-soft); border-color: rgba(68,120,174,.24);
  color: #35597F;
}
.alert-err {
  background: var(--high-soft); border-color: rgba(192,69,58,.24);
  color: #96352C;
}
.alert-ok {
  background: var(--good-soft); border-color: rgba(63,143,107,.24);
  color: #2E6B50;
}
.alert-warn {
  background: var(--med-soft); border-color: rgba(179,137,47,.26);
  color: #7E6020;
}

/* ==========================================================================
   8. 徽章 / 药丸标签
   ========================================================================== */

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .03em;
  background: var(--surface-3);
  color: var(--text-2);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.pill-good {
  background: var(--good-soft); color: #2E6B50;
  border-color: rgba(63,143,107,.24);
}
.pill-med {
  background: var(--med-soft); color: #7E6020;
  border-color: rgba(179,137,47,.26);
}
.pill-high {
  background: var(--high-soft); color: #96352C;
  border-color: rgba(192,69,58,.24);
}
.pill-info {
  background: var(--info-soft); color: #35597F;
  border-color: rgba(68,120,174,.24);
}
.pill-accent {
  background: var(--accent-soft); color: var(--accent);
  border-color: var(--accent-line);
}
.pill-gold {
  background: var(--gold-soft); color: #7A6234;
  border-color: rgba(169,138,75,.28);
}

.tag {
  display: inline-block;
  padding: 3px 9px; margin: 0 5px 5px 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 11.5px; font-family: var(--mono);
  color: var(--text-2);
}

/* ==========================================================================
   9. 数据面板（Energy Dashboard 风格）
   ========================================================================== */

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.stat .k {
  font-size: 11px; font-weight: 600;
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--text-3); margin-bottom: 8px;
}
.stat .v {
  font-size: 30px; font-weight: 700;
  letter-spacing: -.02em; line-height: 1;
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
  color: var(--text);
}
.stat .v small { font-size: 14px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
.stat .delta { font-size: 12px; margin-top: 6px; color: var(--text-3); }
.stat.accent { border-color: var(--accent-line); }
.stat.accent .v { color: var(--accent); }
.stat.gold { border-color: rgba(169,138,75,.28); }
.stat.gold .v { color: #7A6234; }

/* ==========================================================================
   10. 表格
   ========================================================================== */

table.tbl {
  width: 100%; border-collapse: collapse; font-size: 13.5px;
}
table.tbl th {
  text-align: left;
  font-size: 11px; font-weight: 600;
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--text-3);
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
}
table.tbl td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-2);
  vertical-align: middle;
}
table.tbl tbody tr:hover { background: rgba(242,244,247,.025); }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl td strong, table.tbl td b { color: var(--text); font-weight: 600; }

/* ==========================================================================
   11. 骨架屏
   ========================================================================== */

.skeleton {
  height: 13px;
  border-radius: 6px;
  margin: 9px 0;
  background: linear-gradient(90deg,
    var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: sk 1.5s ease-in-out infinite;
}
@keyframes sk {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ==========================================================================
   12. 免责声明
   ========================================================================== */

.disclaimer {
  margin-top: 22px; padding: 14px 16px;
  border-left: 2px solid var(--border-2);
  background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 11.5px; color: var(--text-3); line-height: 1.7;
}

/* ==========================================================================
   13. 罗盘可视化（纯 SVG + CSS）
   --------------------------------------------------------------------------
   浅色下不再用辉光，改为「纸面刻印」——细线 + 极淡投影。
   ========================================================================== */

.compass-stage {
  position: relative;
  display: grid; place-items: center;
  aspect-ratio: 1;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

/* 外层极淡光晕 */
.compass-stage::before {
  content: '';
  position: absolute; inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(169,138,75,.07) 0%,
    rgba(169,138,75,.025) 42%,
    transparent 68%);
}

.compass-stage svg { width: 100%; height: auto; display: block; }

/* 罗盘缓慢匀速转动（尊重动效偏好） */
.compass-rotor {
  transform-origin: 50% 50%;
  animation: spin 140s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .compass-rotor { animation: none; }
}

/* 罗盘周围的漂浮标签 */
.compass-label {
  position: absolute;
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .08em;
  color: var(--text-2);
  white-space: nowrap;
}
.compass-label b { color: var(--text); font-weight: 650; }

/* ==========================================================================
   14. 工具入口卡（Core Tools）
   ========================================================================== */

.tool {
  display: block; text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  transition: all var(--dur) var(--ease);
  position: relative; overflow: hidden;
}
.tool:hover {
  border-color: var(--border-2);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
/* 线性 SVG 图标槽（五行辅助色由 .tool 上的 data-el 或内联 style 指定） */
.tool .ic {
  width: 44px; height: 44px; margin-bottom: 14px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--el-earth);
}
.tool .ic svg { width: 26px; height: 26px; display: block; }
.tool .ic:not(:has(svg)) {
  font-family: var(--font-cjk-serif); font-size: 17px;
}
/* 图标槽按五行着色（低饱和辅助色，仅用于区分，不抢主色） */
.tool[data-el="wood"]  .ic { color: #5F8A63; border-color: rgba(123,161,126,.45); background: rgba(123,161,126,.14); }
.tool[data-el="fire"]  .ic { color: #C97F4A; border-color: rgba(226,166,122,.48); background: rgba(226,166,122,.16); }
.tool[data-el="earth"] .ic { color: #A8875F; border-color: rgba(194,166,137,.50); background: rgba(194,166,137,.16); }
.tool[data-el="metal"] .ic { color: #7E7E7E; border-color: rgba(150,150,150,.42); background: rgba(150,150,150,.13); }
.tool[data-el="water"] .ic { color: #5B7E94; border-color: rgba(138,162,178,.48); background: rgba(138,162,178,.15); }
.tool[data-el] .ic svg { color: inherit; }

.tool .nm {
  display: block;
  font-size: 15px; font-weight: 650; color: var(--text);
  margin-bottom: 7px; letter-spacing: -.01em;
  line-height: 1.35;
}
.tool .ds {
  display: block;
  font-size: 12.5px; color: var(--text-3); line-height: 1.62;
}
.tool .ar {
  position: absolute; top: 24px; right: 24px;
  color: var(--text-4); font-size: 15px;
  transition: all var(--dur) var(--ease);
}
.tool:hover .ar { color: var(--accent); transform: translateX(3px); }

/* 高亮版（主推功能） */
.tool.is-accent {
  background: linear-gradient(150deg, rgba(184,50,39,.055), rgba(184,50,39,.015));
  border-color: var(--accent-line);
}
.tool.is-accent .ic {
  border-color: var(--accent-line); color: var(--accent);
  background: var(--accent-soft);
}

/* ==========================================================================
   15. 内容分节（首页模块）
   ========================================================================== */

.section { padding: 60px 0; }
.section-head { text-align: center; margin-bottom: 38px; }
.section-head .eyebrow { display: block; margin-bottom: 12px; }
.section-head h2 { margin: 0 0 10px; }
.section-head p {
  color: var(--text-2); font-size: 15px;
  max-width: 580px; margin: 0 auto;
}

/* 带装饰线的分节标题（Core Tools ———） */
.section-head .deco {
  display: flex; align-items: center; gap: 16px;
  justify-content: center; margin-bottom: 14px;
}
.section-head .deco::before,
.section-head .deco::after {
  content: ''; height: 1px; width: 54px;
  background: linear-gradient(90deg, transparent, var(--border-2));
}
.section-head .deco::after {
  background: linear-gradient(90deg, var(--border-2), transparent);
}

/* ==========================================================================
   16. 标签页
   ========================================================================== */

#tabs, .tabs {
  display: flex; gap: 4px; flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}
#tabs button, .tabs button {
  background: transparent; border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-3);
  padding: 11px 17px;
  font-size: 12.5px; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase;
  cursor: pointer; font-family: inherit;
  transition: all var(--dur) var(--ease);
  margin-bottom: -1px;
}
#tabs button:hover, .tabs button:hover { color: var(--text-2); }
#tabs button.active, .tabs button[aria-selected="true"],
.tabs button.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ==========================================================================
   17. 进度 / 加载遮罩
   ========================================================================== */

.overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(248,246,242,.86);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none; place-items: center; padding: 24px;
}
.overlay.show { display: grid; }

.analyzing {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 34px;
  max-width: 420px; width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.analyzing h3 {
  font-size: 15px; font-weight: 650;
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--accent); margin: 0 0 20px;
  font-family: var(--font);
}
.astep {
  display: flex; align-items: center; gap: 11px;
  font-size: 13px; color: var(--text-3);
  padding: 7px 0; text-align: left;
  transition: color var(--dur) var(--ease);
}
.astep::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--border-2); flex-shrink: 0;
  transition: all var(--dur) var(--ease);
}
.astep.active { color: var(--text); }
.astep.active::before {
  background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft);
  animation: pulse 1.4s ease-in-out infinite;
}
.astep.done { color: var(--text-3); }
.astep.done::before { background: var(--good); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--accent-soft); }
  50%      { box-shadow: 0 0 0 7px rgba(184,50,39,.03); }
}

/* 加载指示：极简罗盘（由 glyphs.js 的 SHG.loadingCompass 生成） */
.spinner,
.compass-spin {
  width: 44px; min-width: 44px; margin: 0 auto 18px;
  color: var(--text-2);
}
.compass-spin svg { width: 100%; height: auto; display: block; }
.compass-spin .cj-rotor { transform-origin: 50% 50%; animation: rot 2.4s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.spin-label {
  margin: 0; text-align: center;
  font-size: 13px; color: var(--text-2); letter-spacing: .01em;
}
@media (prefers-reduced-motion: reduce) {
  .compass-spin .cj-rotor { animation: none; }
  .astep.active::before { animation: none; }
}

/* ==========================================================================
   18. 多语言内容块（中英混排时的衬线强调）
   ========================================================================== */

.term {
  display: inline-flex; align-items: baseline; gap: 6px;
}
.term .zh {
  font-family: var(--font-cjk-serif);
  color: var(--gold-2);
}
.term .en { font-size: .88em; color: var(--text-3); }

/* ==========================================================================
   19. 图片 / 缩略图
   ========================================================================== */

.thumb, .thumbs > * {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

.dropzone {
  border: 1.5px dashed var(--border-2);
  border-radius: var(--radius);
  background: var(--surface);
  display: grid; place-items: center;
  text-align: center; padding: 36px 22px;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.dropzone:hover, .dropzone.over {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.dropzone .icon { font-size: 26px; color: var(--text-2); margin-bottom: 10px; }
.dropzone .main { font-size: 14px; color: var(--text); margin-bottom: 5px; font-weight: 550; }
.dropzone .sub  { font-size: 12px; color: var(--text-3); }

/* ==========================================================================
   20. Cookie 同意条
   ========================================================================== */

.cookie-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  background: var(--glass-2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 24px rgba(26,46,61,.07);
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-2);
}
.cookie-bar a { color: var(--accent); }

/* ==========================================================================
   21. 下拉菜单（账号菜单）
   ========================================================================== */

.dropdown {
  position: relative;
}
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 190px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px;
  box-shadow: var(--shadow-lg);
  display: none;
}
.dropdown-menu.show { display: block; }
.dropdown-menu a {
  display: block; padding: 10px 12px;
  font-size: 13px; text-decoration: none;
  color: var(--text-2); border-radius: var(--radius-xs);
  transition: all var(--dur) var(--ease);
}
.dropdown-menu a:hover {
  background: var(--surface-3); color: var(--text);
}

/* ==========================================================================
   23. 质感层 —— 浅色纸张质感
   --------------------------------------------------------------------------
   浅色主题下的层次不再靠「顶白光 + 底黑影」的深色四层光影，
   而是靠：① 纸白底 + 一像素细边 ② 柔和的纸面投影 ③ 顶部一道极淡受光棱边。
   原则：投影要「柔而浅」，边要「细而暖」，任何单层都不应被明显察觉。
        深色阴影会显脏，浅色阴影才能显净。
   ========================================================================== */

/* ---- 23.1 卡片：纸白底 + 细边 + 柔影 ---- */
.card,
.panel,
.glass {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
/* 顶部一道极淡受光棱边：让平面「立」起来，但不发白 */
.card,
.panel {
  background-image: linear-gradient(180deg,
    rgba(255,255,255,.70) 0%,
    rgba(255,255,255,.18) 40%,
    rgba(26,46,61,.012) 100%);
}
/* 朱砂细顶边：两端渐隐，中间最明显 */
.card::after,
.panel::after {
  content: '';
  position: absolute; left: 20px; right: 20px; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line) 30%, var(--accent-line) 70%, transparent);
  opacity: .8;
  pointer-events: none;
  border-radius: 1px;
}
.card > *, .panel > * { position: relative; z-index: 1; }
/* 需要完全无装饰的卡片可加 .plain 关掉 */
.card.plain::after, .card.plain::before { display: none; }

/* ---- 23.2 悬浮态：抬升 4px + 阴影加深（0.3s） ---- */
.card.hoverable {
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.card.hoverable:hover {
  transform: translateY(-4px);
  border-color: var(--border-2);
  box-shadow: var(--shadow-lg);
}

/* ---- 23.3 按钮：浅色下用实色 + 柔和投影，不做浮雕 ---- */
.btn-primary {
  background-image: none;
  box-shadow: 0 1px 2px rgba(26,46,61,.10), 0 6px 18px rgba(184,50,39,.20);
}
.btn-primary:hover {
  box-shadow: 0 2px 4px rgba(26,46,61,.12), 0 10px 26px rgba(184,50,39,.26);
}
.btn-outline {
  background-image: none;
  box-shadow: none;
}
.btn-outline:hover {
  border-color: var(--accent-line);
  box-shadow: 0 2px 10px rgba(184,50,39,.08);
}

/* ---- 23.4 分区标题的分隔线 ---- */
.rule,
hr.rule {
  height: 1px; border: 0;
  background: linear-gradient(90deg, transparent, var(--border-2) 18%, var(--border-2) 82%, transparent);
}
.rule-deco { display: flex; align-items: center; justify-content: center; margin: 34px 0; }
.rule-deco svg { width: 100%; max-width: 260px; height: 22px; }

/* ---- 23.5 页面顶部的纹样带：给大留白一点肌理 ---- */
.page-band {
  position: relative; height: 60px; margin: -10px 0 6px;
  overflow: hidden; pointer-events: none;
  mask-image: linear-gradient(180deg, transparent, #000 40%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%, transparent);
  opacity: .5;
}
.page-band svg { width: 100%; height: 60px; }

/* ---- 23.6 统计面板 / 指标条：加分隔竖线 ---- */
.metrics .m + .m::before,
.stats .s + .s::before {
  content: ''; display: block; width: 1px; height: 22px;
  background: linear-gradient(180deg, transparent, var(--border-2), transparent);
  margin-right: 26px; flex: none;
}

/* ---- 23.7 表格：斑马纹 + 浅色表头，长表更好读 ---- */
table.tbl thead th,
table.tbl th {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-2);
}
table.tbl tbody tr:nth-child(even) { background: rgba(26,46,61,.018); }
table.tbl tbody tr:hover { background: var(--accent-soft); }

/* ---- 23.8 输入控件：纸白底 + 细边，focus 时朱砂光环 ---- */
input[type="text"], input[type="date"], input[type="time"],
input[type="email"], input[type="password"], input[type="number"],
input[type="tel"], select, textarea {
  background-image: none;
  box-shadow: none;
}
input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ---- 23.9 药丸标签 / 小格子：极淡底 + 细边，不用内高光 ---- */
.pill, .tag, .chip-tag {
  background-image: none;
  box-shadow: none;
}

.pillar, .gua-cell, .dir-cell {
  background-image: linear-gradient(180deg, rgba(255,255,255,.72), rgba(26,46,61,.018));
  box-shadow: none;
}

/* ==========================================================================
   24. 图形标签（卦名 / 图例）
   ========================================================================== */

/* 盘面里的中文标签需要比正文字号略小、字距略宽，才像「器物上的铭文」 */
.xjg text { letter-spacing: .04em; }

/* 卦象卡片：把 CSS 版与 SVG 版统一成同一外框尺寸，切换实现时不跳动 */
.gua-box .xjg-hex { max-width: 300px; }

/* 无 SVG 时的兜底高度，避免布局塌陷 */
.gua-box .hexagram { min-height: 190px; }

/* 图解下方的说明文字 */
.chart-frame + p { margin-top: 2px; }

/* ==========================================================================
   25. 信任卡（全站复用：首页 / 户型图页 / 手相页）
   ========================================================================== */

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 767.98px) { .trust-grid { grid-template-columns: 1fr; } }

.trust-card {
  padding: 22px 22px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.trust-card:hover {
  border-color: var(--border-2);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
/* 顶部线性图标（五行辅助色） */
.trust-card .tc-ic {
  width: 38px; height: 38px; margin-bottom: 14px;
  display: grid; place-items: center;
  color: var(--el-earth);
}
.trust-card .tc-ic svg { width: 28px; height: 28px; display: block; }
.trust-card h4 {
  margin: 0 0 9px;
  font-size: 14.5px;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-family: var(--font);
}
/* 旧版圆点（兼容仍在使用 .dot 的页面） */
.trust-card h4 .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--el-wood);
  flex-shrink: 0;
}
.trust-card h4 .dot.amber { background: var(--el-earth); }
.trust-card h4 .dot.blue  { background: var(--el-water); }
.trust-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.72;
}

/* ==========================================================================
   26. 工具卡网格（六大核心工具）
   ========================================================================== */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 767.98px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767.98px) { .tools-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   27. 横向时间轴（使用流程）
   --------------------------------------------------------------------------
   结构：01 数字圆（位于顶部连接线上）→ 线性图标 → 标题 → 说明
   连接线贯穿整行，从第 1 个圆连到第 3 个圆。
   ========================================================================== */

.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
  padding-top: 4px;
  list-style: none;                    /* 序号由 .tl-no 呈现，去掉 <ol> 默认标号 */
  margin: 0;
}
.timeline > li { list-style: none; }
.timeline .tl-step {
  position: relative;
  padding: 0 26px;
  text-align: center;
}
/* 贯穿式连接线：铺在整行的顶部，圆编号盖在其上 */
.timeline::before {
  content: '';
  position: absolute; left: 16.6%; right: 16.6%; top: 26px;
  height: 1px; background: var(--border-2);
}

.timeline .tl-no {
  width: 44px; height: 44px; margin: 0 auto 18px;
  border-radius: 50%;
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--accent);
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 13.5px; font-weight: 700;
  letter-spacing: 0;                 /* 等宽数字保持紧凑 */
  position: relative; z-index: 2;
  box-shadow: 0 0 0 6px var(--bg);   /* 用底色遮断身后连接线 */
}
.timeline .tl-ic {
  display: grid; place-items: center;
  width: 46px; height: 46px; margin: 0 auto 14px;
  color: var(--text-3);
}
.timeline .tl-ic svg { width: 30px; height: 30px; display: block; }
.timeline h4 { margin: 0 0 8px; font-size: 15px; font-weight: 650; color: var(--text); }
.timeline p { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.7; max-width: 280px; margin-inline: auto; }

@media (max-width: 767.98px) {
  .timeline { grid-template-columns: 1fr; gap: 30px; }
  .timeline::before { display: none; }
  .timeline .tl-step {
    padding: 0; text-align: left; position: relative;
    padding-left: 60px; min-height: 46px;
  }
  /* 左侧竖向轨道 */
  .timeline .tl-step::before {
    content: ''; position: absolute;
    left: 21px; top: 46px; bottom: -30px;
    width: 1px; background: var(--border-2);
  }
  .timeline .tl-step:last-child::before { display: none; }
  .timeline .tl-no {
    position: absolute; left: 0; top: 0; margin: 0;
    box-shadow: 0 0 0 5px var(--bg);
  }
  /* 移动端隐藏装饰图标：避免与说明文字抢位 */
  .timeline .tl-ic { display: none; }
  .timeline h4 { font-size: 14.5px; }
  .timeline p { max-width: none; margin-inline: 0; }
}

/* ==========================================================================
   28. 滚动淡入（.reveal）
   --------------------------------------------------------------------------
   默认可见 —— ui.js 加载后才会把元素「预置为隐藏」再淡入。
   这样即使 JS 失败，内容也永远可见（渐进增强，不会白屏）。
   ========================================================================== */

.reveal.pending {
  opacity: 0;
  transform: translateY(14px);
}
.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .reveal.pending { opacity: 1; transform: none; }
}

/* ==========================================================================
   29. 隐私承诺小字（上传入口旁统一使用）
   ========================================================================== */

.privacy-note {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--text-3);
  line-height: 1.5;
}
.privacy-note svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--good); }

/* ==========================================================================
   30. 首页 Hero 罗盘容器（由 SHG 注入，取代内联 SVG）
   ========================================================================== */

.compass-holder {
  display: grid;
  place-items: center;
  color: var(--text-2);          /* 罗盘线描取容器色；中心朱砂与点睛金由 SHG 内部着色 */
}
.compass-holder svg {
  width: 100%; height: auto;
  max-width: 100%;
}
/* 罗盘内的朱砂中心点保持品牌色，其余线条取容器色 */
@media (max-width: 767.98px) {
  .compass-holder svg { max-width: 380px; }
}

/* 罗盘图注：像仪器铭牌一样标出图上画了什么 */
.compass-caption {
  margin-top: 15px;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--text-3);
}
html[lang="zh"] .compass-caption,
:lang(zh) .compass-caption { font-size: 11.5px; letter-spacing: .16em; }

/* ==========================================================================
   31. FAQ 折叠列表（平滑展开动画）
   ========================================================================== */

.faq-list { max-width: 780px; margin: 0 auto; display: grid; gap: 10px; }

details.faq {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
details.faq:hover { border-color: var(--border-2); }
details.faq[open] {
  border-color: var(--border-2);
  box-shadow: var(--shadow);
}
details.faq summary {
  padding: 17px 20px; cursor: pointer;
  font-size: 14.5px; font-weight: 580; color: var(--text);
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: var(--font);
  min-height: 52px;                     /* ≥48px 点击区 */
  transition: color var(--dur) var(--ease);
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: ''; flex-shrink: 0;
  width: 9px; height: 9px;
  border-right: 1.6px solid var(--text-3);
  border-bottom: 1.6px solid var(--text-3);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
details.faq:hover summary { color: var(--accent); }
details.faq:hover summary::after { border-color: var(--accent); }
details.faq[open] summary::after {
  transform: rotate(225deg) translate(-2px, -2px);
  border-color: var(--accent);
}
details.faq .body {
  padding: 0 20px 18px;
  font-size: 13.5px;
  color: var(--text-2); line-height: 1.78;
}
details.faq .body p { margin: 0; }

details.faq[open] .body {
  animation: faq-open .3s var(--ease);
}
@keyframes faq-open {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  details.faq[open] .body { animation: none; }
  details.faq summary::after { transition: none; }
}

/* ==========================================================================
   32. 结果页底部「推算说明」入口（对应指令 §五）
   ========================================================================== */

.method-note {
  margin: 34px 0 6px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.method-note .mn-t {
  display: block; margin-bottom: 6px;
  font-size: 13px; font-weight: 700;
  letter-spacing: var(--tracking-wide);
  color: var(--text);
  font-family: var(--font);
}
.method-note .mn-t::before {
  content: '§ ';
  color: var(--accent);
  font-family: var(--mono);
}
.method-note .mn-b {
  display: block;
  font-size: 13px; color: var(--text-2); line-height: 1.72;
}


/* ==========================================================================
   33. 移动端触控目标（指令 §六 ≥48×48 px）
   --------------------------------------------------------------------------
   放在文件末尾，确保优先级高于上方各组件自身的 min-height 声明
   （例如 §3 的 .btn-sm { min-height: 34px }）。
   ========================================================================== */

@media (max-width: 767.98px) {
  .btn-sm,
  header.site .btn-sm { min-height: 48px; padding: 12px 18px; }
  .btn-mini { min-height: 48px; padding: 12px 16px; }
  .btn,
  header.site .btn { min-height: 48px; }
  .btn-lg { min-height: 52px; }

  /* 表单控件：文字输入 44px→48px，单选/复选的原生小方块放大到可点尺寸 */
  input[type="text"], input[type="date"], input[type="time"],
  input[type="email"], input[type="password"], input[type="search"],
  input[type="tel"], input[type="number"], input[type="url"],
  select, textarea {
    min-height: 48px;
  }
  input[type="radio"], input[type="checkbox"] {
    width: 24px; height: 24px; flex: none;
  }
  /* 控件所在的行/标签整体撑到 48px，整行可点 */
  label:has(> input[type="radio"]),
  label:has(> input[type="checkbox"]),
  .radio, .check, .opt, .choice, .switch-row {
    min-height: 48px;
    display: flex; align-items: center;
  }

  /* 页脚底部法务链接 */
  footer.site .f-bottom a { min-height: 48px; display: inline-flex; align-items: center; }
}

/* room.html 沿用旧版页脚结构（footer.site > .wrap > .links），
   与新版三栏页脚并存，此处同样按 §六 撑到 48px。 */
@media (max-width: 767.98px) {
  footer.site .wrap .links { gap: 0; flex-direction: column; align-items: flex-start; margin-top: 4px; }
  footer.site .wrap .links a { min-height: 48px; }
}


/* ==========================================================================
   GEO 事实块（首页 #about）
   --------------------------------------------------------------------------
   承载「可被生成式引擎直接引用」的事实清单。刻意保持朴素：
   无装饰、高可读，让内容本身成为主体。
   ========================================================================== */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 16px;
}
.fact {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 17px 19px;
}
.fact h3 {
  font-family: var(--font);
  font-size: 14.5px; font-weight: 650;
  margin: 0 0 7px; letter-spacing: 0;
}
.fact p {
  font-size: 13.4px; line-height: 1.78;
  color: var(--text-2); margin: 0;
}
@media (max-width: 767.98px) {
  .facts-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   屏幕阅读器专用（视觉隐藏，但对读屏软件与爬虫完全可读）
   --------------------------------------------------------------------------
   不用 display:none —— 那样搜索引擎会按「隐藏文本」处理并降权。
   这里用 W3C 推荐的 clip 方案，既视觉隐藏又保持可访问性。
   ========================================================================== */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   双语免责条（P0-⑨）—— 报告类页面底部固定展示
   中英同时呈现，不随语言切换：免责声明同显更稳妥、更显眼。
   ========================================================================== */
.disc-bar {
  margin-top: 46px;
  padding: 24px 0 30px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.disc-bar .db-zh {
  margin: 0 0 6px;
  font-size: 12.9px; line-height: 1.78; color: var(--text-2);
}
.disc-bar .db-en {
  margin: 0;
  font-size: 12.2px; line-height: 1.72; color: var(--text-3);
}
.disc-bar .db-links {
  margin-top: 13px; display: flex; gap: 18px; flex-wrap: wrap;
}
.disc-bar .db-links a {
  font-size: 12.3px; color: var(--accent); text-decoration: none;
  border-bottom: 1px solid rgba(184, 50, 39, .28);
  padding-bottom: 1px;
}
.disc-bar .db-links a:hover { border-bottom-color: var(--accent); }

/* ==========================================================================
   页脚底部固定三条链接（P0-⑪）：隐私政策 / 免责声明 / 用户反馈
   ========================================================================== */
footer.site .f-bottom .f-fixed {
  display: flex; gap: 18px; flex-wrap: wrap;
}
footer.site .f-bottom .f-fixed a {
  color: var(--text-2); text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
footer.site .f-bottom .f-fixed a:hover {
  color: var(--text); border-bottom-color: var(--border-2);
}
@media (max-width: 767.98px) {
  footer.site .f-bottom .f-fixed { gap: 14px; }
}

/* ==========================================================================
   顶栏二级菜单（P1-③「实验性功能」）
   --------------------------------------------------------------------------
   面相手相等实验性功能不再占一级主推位，收进二级菜单。
   桌面为浮层下拉；移动端汉堡菜单内直接平铺展开（不做浮层，避免误触）。
   ========================================================================== */
nav.main .nav-drop { position: relative; display: inline-flex; }
nav.main .nav-drop-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 38px; padding: 9px 12px;
  font: inherit; font-size: 12.5px; font-weight: 550;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-2); background: none; border: 0;
  border-radius: var(--radius-xs); cursor: pointer; white-space: nowrap;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
nav.main .nav-drop-btn:hover,
nav.main .nav-drop.open .nav-drop-btn {
  color: var(--text); background: var(--surface-3);
}
nav.main .caret {
  width: 0; height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  opacity: .5;
  transition: transform .2s ease;
}
nav.main .nav-drop.open .caret { transform: rotate(180deg); }
/* 处于子页时，父项也给出朱砂提示 */
nav.main .nav-drop.on .nav-drop-btn { color: var(--text); }
nav.main .nav-drop.on .nav-drop-btn::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 4px;
  height: 1.5px; background: var(--accent); border-radius: 2px;
}

nav.main .nav-drop-menu {
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(-5px);
  min-width: 196px; padding: 7px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(26, 46, 61, .15);
  display: grid; gap: 2px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 60;
}
nav.main .nav-drop.open .nav-drop-menu {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
nav.main .nav-drop-menu a {
  display: block; padding: 10px 13px; min-height: 40px;
  font-size: 13px; letter-spacing: 0; text-transform: none;
  color: var(--text-2); border-radius: 8px;
}
nav.main .nav-drop-menu a:hover { background: var(--surface-2); color: var(--text); }
nav.main .nav-drop-menu a.active { color: var(--accent); background: var(--accent-soft); }
nav.main .nav-drop-menu a.active::after { display: none; }

/* 抽屉模式下的二级菜单：跟随顶栏折叠断点（1024px） */
@media (max-width: 1023.98px) {
  nav.main .nav-drop { display: block; }
  nav.main .nav-drop-btn {
    width: 100%; justify-content: space-between;
    padding: 13px 12px; min-height: 48px; font-size: 13.5px;
  }
  nav.main .nav-drop.on .nav-drop-btn::after { left: 12px; right: auto; width: 20px; bottom: 8px; }
  nav.main .nav-drop-menu {
    position: static; transform: none; opacity: 1; visibility: visible;
    pointer-events: auto; box-shadow: none; border: 0; background: none;
    min-width: 0; padding: 0 0 4px 14px;
    max-height: 0; overflow: hidden; transition: max-height .22s ease;
  }
  nav.main .nav-drop.open .nav-drop-menu { max-height: 280px; }
  nav.main .nav-drop-menu a { padding: 12px; min-height: 48px; font-size: 13.2px; }
}

/* 触控目标补齐（WCAG 2.5.8）：新增的正文内链接同样要够点 */
@media (max-width: 767.98px) {
  .hero-sample a {
    display: inline-flex; align-items: center;
    min-height: 48px; padding: 4px 0;
  }
  .disc-bar .db-links { flex-direction: column; gap: 2px; }
  .disc-bar .db-links a {
    display: flex; align-items: center;
    min-height: 48px; padding: 4px 0;
  }
}

/* ==========================================================================
   专业名词（P1-① 全局 Tooltip）
   ========================================================================== */
.term, [data-term] {
  border-bottom: 1px dashed rgba(26, 46, 61, .34);
  cursor: help;
  text-decoration: none;
  transition: color .16s ease, border-color .16s ease;
}
[data-term].is-on,
[data-term]:hover { color: var(--accent); border-bottom-color: var(--accent); }

.gtip {
  position: fixed; z-index: 80;
  max-width: 300px;
  padding: 10px 13px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 12px 34px rgba(26, 46, 61, .18);
  font-size: 12.5px; line-height: 1.64;
  color: var(--text-2);
  pointer-events: none;
  opacity: 0; transform: translateY(-5px);
  transition: opacity .18s ease, transform .18s ease;
}
.gtip.on { opacity: 1; transform: translateY(0); }
.gtip b { display: block; color: var(--text); font-weight: 650; margin-bottom: 3px; }

/* ==========================================================================
   户型页：上传前须知（P1-②）
   ========================================================================== */
.help-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.help-card { padding: 20px 22px; }
.help-card h2 {
  font-size: 15.5px; margin: 0 0 13px; letter-spacing: -.01em;
  font-family: var(--font-display);
}
.help-steps { counter-reset: hs; list-style: none; margin: 0; padding: 0; }
.help-steps li {
  position: relative; padding-left: 27px;
  font-size: 13.4px; line-height: 1.75; color: var(--text-2);
  margin-bottom: 10px;
}
.help-steps li::before {
  content: counter(hs); counter-increment: hs;
  position: absolute; left: 0; top: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
}
.help-list { list-style: none; margin: 0; padding: 0; }
.help-list li {
  position: relative; padding-left: 17px;
  font-size: 13.4px; line-height: 1.75; color: var(--text-2);
  margin-bottom: 10px;
}
.help-list li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); opacity: .7;
}
