/* ==========================================================================
   小星火 xiaostarfire.cn · 视觉质感升级 v2（2026-09-13）
   --------------------------------------------------------------------------
   设计方向（对标 api.careertick.com 的克制与留白）：
   - 顶栏由高饱和紫色渐变改为「浅色磨砂玻璃」，紫色只保留给品牌字标与选中态
   - 字体分层：品牌内容用 LXGW 文楷；导航/按钮/标签/数字等 UI 层改用系统无衬线，
     让界面「更锐利」，正文保持温润
   - 统一圆角（16/20/999）、极轻阴影（1px~2px 底影 + 大范围柔影）、克制的强调色
   - 眉题（eyebrow）替代粗重的章节下划线；卡片悬停做位移 + 阴影 + 图片微缩放
   - 表单/分页/页脚等基础件一并收敛，减少「Bootstrap 默认脸」
   加载顺序在 xiaoxinghuo.css 之后，仅做覆盖，不改动既有模板的类名契约。
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 设计令牌（覆盖 v1）
   -------------------------------------------------------------------------- */
:root {
  /* 品牌与强调（白字压在实心色上时用深一档，保证 AA） */
  --xh-primary: #5e35b1;
  --xh-primary-dark: #4527a0;
  --xh-primary-ink: #4a2a94;
  --xh-primary-light: #7e57c2;
  --xh-primary-soft: rgba(94, 53, 177, 0.08);
  --xh-accent: #e8590c;
  --xh-accent-dark: #c2410c;
  --xh-accent-soft: rgba(232, 89, 12, 0.10);

  /* 中性色（冷调暖白，层次更细） */
  --xh-ink: #1c1a29;
  --xh-heading: #211e30;
  --xh-body-text: #45414f;
  --xh-muted: #716e7d;
  --xh-border: #edebf3;
  --xh-border-strong: #ddd9e7;
  --xh-body-bg: #f6f5fa;
  --xh-card-bg: #ffffff;
  --xh-surface-soft: #faf9fd;

  /* 语义色 */
  --xh-success: #0f9d6b;
  --xh-warning: #c98a12;
  --xh-danger: #d64545;
  --xh-info: #2f6fd0;

  /* 形状 */
  --xh-radius-sm: 0.625rem;
  --xh-radius: 0.875rem;
  --xh-radius-lg: 1.25rem;
  --xh-radius-pill: 999px;

  /* 阴影：底影极轻 + 大范围柔影，避免「脏灰」 */
  --xh-shadow-xs: 0 1px 2px rgba(28, 26, 41, 0.04);
  --xh-shadow-sm: 0 1px 2px rgba(28, 26, 41, 0.04), 0 6px 18px rgba(28, 26, 41, 0.05);
  --xh-shadow: 0 2px 6px rgba(28, 26, 41, 0.05), 0 16px 38px rgba(28, 26, 41, 0.09);
  --xh-shadow-lg: 0 24px 60px rgba(28, 26, 41, 0.14);

  /* 动效曲线 */
  --xh-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* UI 层字体：导航/按钮/标签/数字/眉题 —— 系统无衬线，界面更锐利 */
  --xh-font-ui: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* 正文改用清爽无衬线（对标参考站），标题/字标保留 LXGW 文楷作为品牌温度 */
  --xh-font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --xh-font-heading: "LXGW WenKai", "PingFang SC", "Microsoft YaHei", sans-serif;
  /* 覆盖字标/正文/标题的字体变量仍沿用 v1 的 LXGW 文楷，此处派生一个展示字号 */
  --xh-font-display: var(--xh-font-heading);
}

/* --------------------------------------------------------------------------
   2. 基础与排版
   -------------------------------------------------------------------------- */
body {
  background-color: var(--xh-body-bg);
  color: var(--xh-body-text);
  font-size: 1rem; /* 正文 16px */
  line-height: 1.7;
}

/* 排版层级：一套用 clamp 收敛的标题阶梯（桌面有气势、窄屏不溢出） */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--xh-heading);
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1, .h1 { font-size: clamp(1.95rem, 4vw, 2.85rem); line-height: 1.14; letter-spacing: -0.022em; }
h2, .h2 { font-size: clamp(1.55rem, 2.9vw, 2.15rem); line-height: 1.2; letter-spacing: -0.018em; }
h3, .h3 { font-size: clamp(1.3rem, 2.1vw, 1.6rem); line-height: 1.28; letter-spacing: -0.014em; }
h4, .h4 { font-size: clamp(1.12rem, 1.5vw, 1.3rem); line-height: 1.36; letter-spacing: -0.01em; }
h5, .h5 { font-size: 1.05rem; line-height: 1.4; }
h6, .h6 { font-size: 0.95rem; line-height: 1.45; }

.display-1 { font-size: clamp(2.6rem, 6vw, 4.2rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.026em; }
.display-2 { font-size: clamp(2.3rem, 5.2vw, 3.6rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.024em; }
.display-3 { font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.022em; }
.display-4 { font-size: clamp(1.75rem, 3.8vw, 2.6rem); font-weight: 800; line-height: 1.14; letter-spacing: -0.02em; }
.display-5 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; line-height: 1.16; }
.display-6 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); font-weight: 700; line-height: 1.2; }

.lead {
  font-size: clamp(1rem, 1.55vw, 1.18rem);
  line-height: 1.7;
  font-weight: 400;
  color: var(--xh-body-text);
}

/* 眉题：小写大间距的引导词，替代粗下划线 */
.section-eyebrow,
.hero-eyebrow-text {
  display: inline-block;
  font-family: var(--xh-font-ui);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--xh-primary);
  margin-bottom: 0.65rem;
}

.section-sub {
  color: var(--xh-muted);
  margin: 0.5rem 0 0;
  max-width: 46rem;
}

.section-title {
  font-size: clamp(1.5rem, 2.7vw, 2rem);
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--xh-heading);
}

/* 原标题下方的粗下划线在新体系里由「眉题」承担，这里隐藏，避免与副标题打架 */
.section-title::after {
  display: none;
}

.section-title-center::after {
  display: none;
}

.text-muted {
  color: var(--xh-muted) !important;
}

/* 链接默认色改用品牌紫（Bootstrap 默认蓝会显廉价） */
a {
  color: var(--xh-primary-ink);
  text-decoration-color: rgba(94, 53, 177, 0.3);
}

a.text-dark,
a.text-decoration-none.text-dark {
  color: var(--xh-ink) !important;
}

/* 章节头部：标题组 + 右侧「查看全部」 */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.section-head .section-title {
  margin-bottom: 0;
}

.section-head > .btn,
.section-head > a {
  flex: none;
}

/* --------------------------------------------------------------------------
   2b. 长文排版：帮助正文（.help-doc）与通用正文（.prose）
   -------------------------------------------------------------------------- */
.help-doc,
.prose {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--xh-body-text);
}

.help-doc > :first-child,
.prose > :first-child {
  margin-top: 0;
}

.help-doc h1,
.prose h1 {
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  line-height: 1.2;
  margin: 0 0 1rem;
}

.help-doc h2,
.prose h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.6rem);
  line-height: 1.28;
  margin: 2.4rem 0 0.9rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--xh-border);
}

.help-doc h3,
.prose h3 {
  font-size: 1.2rem;
  line-height: 1.35;
  margin: 1.9rem 0 0.65rem;
}

.help-doc h4,
.prose h4 {
  font-size: 1.05rem;
  line-height: 1.4;
  margin: 1.5rem 0 0.5rem;
}

.help-doc h5,
.help-doc h6,
.prose h5,
.prose h6 {
  font-size: 0.98rem;
  line-height: 1.45;
  margin: 1.2rem 0 0.4rem;
  color: var(--xh-ink);
}

.help-doc p,
.prose p {
  margin: 0 0 1.1rem;
}

.help-doc ul,
.help-doc ol,
.prose ul,
.prose ol {
  margin: 0 0 1.15rem;
  padding-left: 1.35rem;
}

.help-doc li,
.prose li {
  margin-bottom: 0.45rem;
}

.help-doc li::marker,
.prose li::marker {
  color: var(--xh-primary-light);
}

.help-doc li > ul,
.help-doc li > ol,
.prose li > ul,
.prose li > ol {
  margin: 0.45rem 0 0.2rem;
}

.help-doc blockquote,
.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.9rem 1.2rem;
  border-left: 3px solid var(--xh-primary-light);
  background: var(--xh-surface-soft);
  border-radius: 0 var(--xh-radius) var(--xh-radius) 0;
  color: var(--xh-body-text);
}

.help-doc blockquote > :last-child,
.prose blockquote > :last-child {
  margin-bottom: 0;
}

.help-doc code,
.prose code {
  font-family: var(--xh-font-numeric);
  font-size: 0.88em;
  background: var(--xh-primary-soft);
  color: var(--xh-primary-ink);
  padding: 0.12rem 0.4rem;
  border-radius: 0.35rem;
}

.help-doc pre,
.prose pre {
  margin: 0 0 1.3rem;
  padding: 1.1rem 1.25rem;
  background: #1b1826;
  color: #f4f2f8;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--xh-radius);
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.65;
}

.help-doc pre code,
.prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

.help-doc table,
.prose table {
  width: 100%;
  margin: 0 0 1.35rem;
  border: 1px solid var(--xh-border);
  border-radius: var(--xh-radius);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: 0.94rem;
}

.help-doc th,
.help-doc td,
.prose th,
.prose td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--xh-border);
  text-align: left;
}

.help-doc thead th,
.prose thead th {
  background: var(--xh-surface-soft);
  color: var(--xh-heading);
  font-weight: 700;
}

.help-doc tbody tr:last-child td,
.prose tbody tr:last-child td {
  border-bottom: 0;
}

.help-doc hr,
.prose hr {
  margin: 2.25rem 0;
  border-color: var(--xh-border);
  opacity: 1;
}

.help-doc a,
.prose a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.help-doc a:hover,
.prose a:hover {
  color: var(--xh-primary-dark);
}

.help-doc img,
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--xh-radius);
}

.help-doc strong,
.prose strong {
  color: var(--xh-ink);
  font-weight: 700;
}

.bg-soft {
  background-color: var(--xh-surface-soft) !important;
}

/* --------------------------------------------------------------------------
   3. 顶栏：浅色磨砂玻璃
   -------------------------------------------------------------------------- */
.navbar {
  --bs-navbar-color: var(--xh-body-text);
  --bs-navbar-hover-color: var(--xh-primary);
  --bs-navbar-active-color: var(--xh-primary);
  --bs-navbar-brand-color: var(--xh-ink);
  --bs-navbar-brand-hover-color: var(--xh-ink);
  --bs-navbar-toggler-border-color: var(--xh-border-strong);
  background: rgba(255, 255, 255, 0.86) !important;
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--xh-border);
  box-shadow: 0 1px 0 rgba(28, 26, 41, 0.02), 0 8px 24px rgba(28, 26, 41, 0.04) !important;
}

.navbar-brand {
  font-size: 1.32rem;
  letter-spacing: 0.01em;
  color: var(--xh-ink) !important;
}

.navbar-brand img {
  filter: drop-shadow(0 2px 5px rgba(94, 53, 177, 0.28));
}

.navbar .nav-link {
  font-family: var(--xh-font-ui);
  font-weight: 600;
  font-size: 0.93rem;
  letter-spacing: 0.005em;
  color: var(--xh-body-text) !important;
  opacity: 1;
  padding: 0.5rem 0.9rem;
  border-radius: var(--xh-radius-pill);
  transition: color 0.16s var(--xh-ease), background 0.16s var(--xh-ease);
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--xh-primary) !important;
  background: var(--xh-primary-soft);
}

.navbar .nav-link.active {
  color: var(--xh-primary-ink) !important;
  background: var(--xh-primary-soft);
}

.navbar-toggler {
  border-color: var(--xh-border-strong) !important;
}

.navbar-toggler-text {
  color: var(--xh-ink) !important;
}

.navbar .notif-bell {
  color: var(--xh-body-text);
  font-family: var(--xh-font-ui);
  font-weight: 600;
  border-radius: var(--xh-radius-pill);
}

.navbar .notif-bell:hover {
  background: var(--xh-primary-soft);
  color: var(--xh-primary);
}

/* 顶栏搜索：胶囊浅底 */
.navbar form .input-group {
  background: var(--xh-body-bg);
  border: 1px solid var(--xh-border);
  border-radius: var(--xh-radius-pill);
  padding: 2px;
  overflow: hidden;
}

.navbar .input-group-text {
  background: transparent !important;
  color: var(--xh-muted) !important;
  font-family: var(--xh-font-ui);
  font-weight: 600;
  font-size: 0.85rem;
  border: 0 !important;
  padding-left: 0.85rem;
  border-radius: var(--xh-radius-pill) !important;
}

.navbar .form-control {
  background: transparent !important;
  border: 0 !important;
  font-family: var(--xh-font-ui);
  font-size: 0.88rem;
  border-radius: var(--xh-radius-pill) !important;
  box-shadow: none !important;
}

.navbar .form-control:focus {
  background: #fff !important;
  box-shadow: 0 0 0 3px var(--xh-primary-soft) !important;
}

/* 语言切换按钮在浅色顶栏上的样式 */
.navbar .btn-outline-light {
  color: var(--xh-body-text) !important;
  border-color: var(--xh-border-strong) !important;
  background: transparent;
}

.navbar .btn-outline-light:hover,
.navbar .btn-outline-light.active {
  color: var(--xh-primary) !important;
  border-color: var(--xh-primary) !important;
  background: var(--xh-primary-soft) !important;
}

/* --------------------------------------------------------------------------
   4. 按钮：胶囊 + 克制阴影
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--xh-font-ui);
  font-weight: 600;
  letter-spacing: 0.005em;
  border-radius: var(--xh-radius-pill);
  transition: transform 0.18s var(--xh-ease), box-shadow 0.18s var(--xh-ease),
    background-color 0.18s var(--xh-ease), border-color 0.18s var(--xh-ease), color 0.18s var(--xh-ease);
}

.btn:active {
  transform: translateY(1px) scale(0.985);
}

.btn-primary {
  background: linear-gradient(135deg, #6a44c4 0%, var(--xh-primary) 60%, #4f2ba3 100%);
  border: none;
  box-shadow: 0 4px 14px rgba(94, 53, 177, 0.22);
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #5d39b3 0%, #4d2b9b 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(94, 53, 177, 0.30);
}

.btn-accent {
  background: linear-gradient(135deg, #cf4208 0%, #b23a06 100%);
  border: none;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(166, 54, 6, 0.26);
}

.btn-accent:hover,
.btn-accent:focus {
  background: linear-gradient(135deg, #c2410c 0%, #a03606 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(166, 54, 6, 0.34);
  color: #fff;
}

.btn-outline-primary {
  color: var(--xh-primary-ink);
  border-color: rgba(94, 53, 177, 0.35);
  background: #fff;
}

.btn-outline-primary:hover {
  background: var(--xh-primary);
  border-color: var(--xh-primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(94, 53, 177, 0.22);
}

.btn-outline-secondary {
  color: var(--xh-body-text);
  border-color: var(--xh-border-strong);
  background: #fff;
}

.btn-outline-secondary:hover {
  color: var(--xh-ink);
  background: var(--xh-body-bg);
  border-color: var(--xh-border-strong);
  transform: translateY(-1px);
  box-shadow: var(--xh-shadow-xs);
}

.btn-soft {
  background: var(--xh-primary-soft);
  color: var(--xh-primary-ink);
}

.btn-soft:hover {
  background: rgba(94, 53, 177, 0.16);
  color: var(--xh-primary-dark);
  transform: translateY(-1px);
}

.btn-light,
.btn-outline-light.btn-lg {
  border-radius: var(--xh-radius-pill);
}

.btn-outline-light {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #fff;
  color: #fff;
}

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */
.hero {
  min-height: 0;
  padding: 6.5rem 0 6rem;
  color: #f7f6fb;
}

.hero::before {
  filter: brightness(0.7) contrast(1.02) saturate(0.76);
}

/* 叠加：中心保证文字对比、四周仅轻微加深做纵深；右侧暖光提气，避免暗部死黑 */
.hero::after {
  background:
    radial-gradient(80% 70% at 50% 44%, rgba(10, 9, 16, 0.44) 0%, rgba(10, 9, 16, 0.28) 58%, rgba(10, 9, 16, 0.5) 100%),
    linear-gradient(180deg, rgba(10, 9, 16, 0.68) 0%, rgba(10, 9, 16, 0.24) 48%, rgba(10, 9, 16, 0.62) 100%),
    radial-gradient(85% 55% at 50% 0%, rgba(94, 53, 177, 0.16) 0%, rgba(94, 53, 177, 0) 62%),
    radial-gradient(55% 48% at 80% 16%, rgba(255, 234, 204, 0.12) 0%, rgba(255, 234, 204, 0) 70%);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  margin-bottom: 1.5rem;
  border-radius: var(--xh-radius-pill);
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-family: var(--xh-font-ui);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--xh-accent);
  box-shadow: 0 0 0 4px rgba(232, 89, 12, 0.22);
}

.hero h1 {
  font-size: clamp(2.5rem, 5.8vw, 4.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1.35rem !important;
  text-wrap: balance;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.4);
}

.hero .lead {
  font-size: clamp(1.06rem, 1.75vw, 1.3rem);
  line-height: 1.8;
  max-width: 44rem;
  color: #fff;
  opacity: 1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.55);
  text-wrap: pretty;
  line-break: strict;
}

.hero .d-flex.flex-wrap {
  margin-top: 2.1rem;
}

.hero .d-flex.flex-wrap .btn {
  min-height: 3.25rem;
  padding: 0 1.9rem;
  font-size: 1rem;
}

/* 深色 Hero 上的次级按钮：描边与文字提到够亮，暗底上不发灰 */
.hero .btn-outline-light {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.10);
}

.hero .btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: #fff;
}

/* 数据条：去掉横贯的顶部分割线（避免把首屏切成两截），仅保留列间竖分隔 */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  max-width: 40rem;
  margin: 3rem auto 0;
  padding-top: 0;
  border-top: 0;
}

.hero-stats > div {
  padding: 0 1.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
}

.hero-stats > div:first-child {
  border-left: 0;
}

.hero-stats .h3 {
  font-family: var(--xh-font-numeric);
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  font-weight: 700;
  line-height: 1.1;
  color: #fff !important;
  margin-bottom: 0.35rem !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-stats .stat-label {
  font-family: var(--xh-font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

/* --------------------------------------------------------------------------
   6. 卡片
   -------------------------------------------------------------------------- */
.card {
  border: 1px solid var(--xh-border);
  border-radius: var(--xh-radius-lg);
  background: var(--xh-card-bg);
  box-shadow: var(--xh-shadow-sm);
  transition: transform 0.24s var(--xh-ease), box-shadow 0.24s var(--xh-ease),
    border-color 0.24s var(--xh-ease);
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(94, 53, 177, 0.16);
  box-shadow: var(--xh-shadow);
}

.card-header {
  background: var(--xh-surface-soft);
  border-bottom-color: var(--xh-border);
}

.card-title {
  font-size: 1.05rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

/* 卡片封面：统一比例，避免固定像素高度在窄屏被压扁 */
.card-img-top {
  height: auto;
  aspect-ratio: 16 / 10;
  background-color: #eef0f6;
  transition: transform 0.35s var(--xh-ease);
}

.card-img-top-sm {
  aspect-ratio: 16 / 10;
}

/* 商品卡：封面容器承载角标与渐隐，正文区留白更从容 */
.product-card-media {
  position: relative;
  overflow: hidden;
}

.product-card-media .card-img-top {
  display: block;
  border-radius: 0;
}

.product-card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 14, 28, 0) 52%, rgba(18, 14, 28, 0.24) 100%);
  pointer-events: none;
}

.product-card .card-body {
  padding: 1rem 1.05rem 1.05rem;
}

/* 商品详情大图：锁定 16/10 比例，首屏高度在图片加载前即确定，消除 CLS */
.product-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--xh-radius-lg);
  box-shadow: var(--xh-shadow-sm);
}

/* 商品详情支付弹窗二维码占位框（模板由店铺组内联尺寸迁移至此） */
.qr-frame {
  width: 220px;
  height: 220px;
}

.qr-frame img {
  max-width: 200px;
}

/* 已购内容页头部：深墨紫渐变 + 光晕，替代原来的高饱和三色渐变 */
.owned-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #241f38 0%, #2f2750 55%, #3a2a5e 100%);
}

.owned-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 90% at 92% 0%, rgba(232, 89, 12, 0.18) 0%, rgba(232, 89, 12, 0) 60%),
    radial-gradient(60% 80% at 0% 100%, rgba(94, 53, 177, 0.4) 0%, rgba(94, 53, 177, 0) 60%);
  pointer-events: none;
}

.owned-hero > * {
  position: relative;
  z-index: 1;
}

.product-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--xh-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
}

.product-card .card-text {
  font-size: 0.82rem;
  line-height: 1.55;
}

.product-card .price-tag {
  font-size: 1.05rem;
}

.product-card small {
  font-size: 0.76rem;
}

/* 创作者卡 */
.card .avatar {
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(28, 26, 41, 0.14);
}

/* 分类卡 */
.category-card {
  border-radius: var(--xh-radius);
  padding: 1rem 0.75rem !important;
  transition: transform 0.2s var(--xh-ease), border-color 0.2s var(--xh-ease), box-shadow 0.2s var(--xh-ease);
}

.category-card:hover {
  border-color: rgba(94, 53, 177, 0.28);
  box-shadow: var(--xh-shadow-sm);
}

.category-card h6 {
  font-family: var(--xh-font-ui);
  font-weight: 600;
}

/* 数据卡 */
.stat-card {
  position: relative;
  overflow: hidden;
  /* 归零 v1 的 border-left:4px，避免与 ::before 3px 渐变条叠成双色边 */
  border-left: 0;
}

.stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--xh-primary), var(--xh-primary-light));
}

.stat-card.accent::before {
  background: linear-gradient(180deg, var(--xh-accent), #f59e0b);
}

/* 桌面端更大的章节留白 */
@media (min-width: 768px) {
  section.container.py-5,
  section.bg-soft.py-5 {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }
}

/* 静态/面板类卡片：悬停不位移、阴影不变，避免信息面板「跳动」 */
.card.static-card:hover,
.card.table-card:hover,
.card.sticky-top:hover,
.table-responsive.card:hover {
  transform: none;
  border-color: var(--xh-border);
  box-shadow: var(--xh-shadow-sm);
}

/* --------------------------------------------------------------------------
   7. 角标 / 胶囊 / 价格
   -------------------------------------------------------------------------- */
.badge {
  font-family: var(--xh-font-ui);
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--xh-radius-pill);
  padding: 0.34em 0.72em;
}

.badge-type {
  background: var(--xh-primary-soft);
  color: var(--xh-primary-ink);
}

.badge-category {
  background: #f2eefc;
  color: #5c3fa8;
}

/* 封面上的胶囊角标 */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  height: 1.7rem;
  padding: 0 0.65rem;
  border-radius: var(--xh-radius-pill);
  font-family: var(--xh-font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}

.chip-type {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  z-index: 2;
  background: rgba(255, 255, 255, 0.94);
  color: var(--xh-primary-ink);
  box-shadow: 0 4px 12px rgba(18, 14, 28, 0.14);
}

.chip-duration {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  background: rgba(18, 14, 28, 0.55);
  color: #fff;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.price-tag {
  font-family: var(--xh-font-numeric);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--xh-ink);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   8. 表单
   -------------------------------------------------------------------------- */
.form-label {
  font-family: var(--xh-font-ui);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--xh-ink);
  margin-bottom: 0.4rem;
}

.form-control,
.form-select {
  border-radius: var(--xh-radius);
  border: 1px solid var(--xh-border-strong);
  background-color: #fff;
  padding: 0.62rem 0.9rem;
  font-family: var(--xh-font-ui);
  font-size: 0.95rem;
  color: var(--xh-ink);
  transition: border-color 0.16s var(--xh-ease), box-shadow 0.16s var(--xh-ease);
}

.form-control::placeholder {
  color: #a7a3b1;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--xh-primary);
  box-shadow: 0 0 0 4px var(--xh-primary-soft);
  background-color: #fff;
}

.input-group-text {
  background: var(--xh-surface-soft);
  border: 1px solid var(--xh-border-strong);
  border-radius: var(--xh-radius);
  font-family: var(--xh-font-ui);
  font-weight: 600;
  color: var(--xh-muted);
}

.form-check-input:checked {
  background-color: var(--xh-primary);
  border-color: var(--xh-primary);
}

.form-check-input:focus {
  border-color: var(--xh-primary-light);
  box-shadow: 0 0 0 4px var(--xh-primary-soft);
}

.form-check-input {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.22em;
  border-color: var(--xh-border-strong);
  transition: background-color 0.16s var(--xh-ease), border-color 0.16s var(--xh-ease),
    box-shadow 0.16s var(--xh-ease);
}

.form-check-label {
  font-family: var(--xh-font-ui);
  font-size: 0.94rem;
  color: var(--xh-body-text);
}

.form-control:disabled,
.form-select:disabled,
.form-control[readonly] {
  background-color: var(--xh-surface-soft);
  color: var(--xh-muted);
}

textarea.form-control {
  min-height: 6rem;
}

.is-invalid,
.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
  border-color: var(--xh-danger);
}

.is-invalid:focus,
.was-validated .form-control:invalid:focus,
.was-validated .form-select:invalid:focus {
  border-color: var(--xh-danger);
  box-shadow: 0 0 0 4px rgba(214, 69, 69, 0.12);
}

.is-valid,
.was-validated .form-control:valid,
.was-validated .form-select:valid {
  border-color: var(--xh-success);
}

.is-valid:focus,
.was-validated .form-control:valid:focus,
.was-validated .form-select:valid:focus {
  border-color: var(--xh-success);
  box-shadow: 0 0 0 4px rgba(15, 157, 107, 0.12);
}

/* --------------------------------------------------------------------------
   9. 导航胶囊 / 分页 / 面包屑 / 空态
   -------------------------------------------------------------------------- */
.nav-pills {
  gap: 0.4rem;
}

.nav-pills .nav-link {
  font-family: var(--xh-font-ui);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--xh-body-text);
  border-radius: var(--xh-radius-pill);
  padding: 0.5rem 1.05rem;
  transition: color 0.16s var(--xh-ease), background 0.16s var(--xh-ease);
}

.nav-pills .nav-link:hover {
  background: var(--xh-primary-soft);
  color: var(--xh-primary-ink);
}

.nav-pills .nav-link.active {
  background: var(--xh-primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(94, 53, 177, 0.24);
}

/* 选项卡：下划线式，去掉 Bootstrap 默认的方块底 */
.nav-tabs {
  border-bottom: 1px solid var(--xh-border);
  gap: 0.25rem;
}

.nav-tabs .nav-link {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.6rem 1rem;
  font-family: var(--xh-font-ui);
  font-weight: 600;
  color: var(--xh-muted);
}

.nav-tabs .nav-link:hover {
  color: var(--xh-primary);
  border-color: transparent;
}

.nav-tabs .nav-link.active {
  color: var(--xh-primary-ink);
  background: transparent;
  border-color: transparent;
  border-bottom-color: var(--xh-primary);
}

.page-link {
  font-family: var(--xh-font-ui);
  font-weight: 600;
  color: var(--xh-body-text);
  border: 1px solid var(--xh-border);
  border-radius: var(--xh-radius-sm) !important;
  margin: 0 0.15rem;
  min-width: 2.5rem;
  text-align: center;
  transition: color 0.16s var(--xh-ease), background 0.16s var(--xh-ease), border-color 0.16s var(--xh-ease);
}

.page-link:hover {
  color: var(--xh-primary-ink);
  background: var(--xh-primary-soft);
  border-color: transparent;
}

.page-item.active .page-link {
  background: var(--xh-primary);
  border-color: var(--xh-primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(94, 53, 177, 0.22);
}

.page-item.disabled .page-link {
  color: #8f8a9c;
  background: #fff;
}

/* 语言切换等分段按钮：改为带间隙的独立胶囊 */
.navbar .btn-group {
  gap: 4px;
}

.navbar .btn-group > .btn {
  border-radius: var(--xh-radius-pill) !important;
}

.breadcrumb {
  font-family: var(--xh-font-ui);
  font-size: 0.86rem;
}
.breadcrumb-item a {
  color: var(--xh-muted);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: var(--xh-primary);
}

.breadcrumb-item.active {
  color: var(--xh-body-text);
}

.empty-state {
  padding: 3.5rem 1rem;
}

.help-doc-card {
  transition: transform 0.2s var(--xh-ease), border-color 0.2s var(--xh-ease), box-shadow 0.2s var(--xh-ease);
}

.help-doc-card:hover {
  border-color: rgba(94, 53, 177, 0.28);
  box-shadow: var(--xh-shadow-sm);
}

.help-doc-mark {
  transition: transform 0.3s var(--xh-ease);
}

.help-doc-card:hover .help-doc-mark {
  transform: scale(1.08) rotate(-6deg);
}

/* 空态标题：共享 include 由 h5 升到 h3（语义层），字号/行高/字距按原 h5 观感锁定；
   同时保留 h5 选择器，兼容仍在用 h5 的局部空态，避免观感回退 */
.empty-state h3,
.empty-state h5 {
  font-size: 1.05rem;
  line-height: 1.4;
  letter-spacing: -0.012em;
  font-weight: 700;
}

.empty-state .empty-state-img {
  opacity: 0.92;
  border-radius: var(--xh-radius-lg);
}

/* --------------------------------------------------------------------------
   10. 页脚
   -------------------------------------------------------------------------- */
footer {
  background: #171425;
  background-image: linear-gradient(180deg, #1c1830 0%, #141122 100%);
  color: rgba(255, 255, 255, 0.68);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

footer h5,
footer h6 {
  color: #fff;
  letter-spacing: 0.01em;
}

footer h6 {
  font-family: var(--xh-font-ui);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.56);
}

footer a {
  color: rgba(255, 255, 255, 0.74);
}

footer a:hover {
  color: #fff;
}

footer .border-top {
  border-color: rgba(255, 255, 255, 0.10) !important;
}

/* --------------------------------------------------------------------------
   11. 弹窗 / 提示 / 表格 / 列表组
   -------------------------------------------------------------------------- */
.modal-content {
  border: none;
  border-radius: var(--xh-radius-lg);
  box-shadow: var(--xh-shadow-lg);
}

/* 弹窗标题：模板升到 h3 后保持原 h5 字号/字距，对话框标题不喧宾夺主 */
.modal-title {
  font-size: 1.05rem;
  letter-spacing: -0.012em;
}

.alert {
  border: none;
  border-radius: var(--xh-radius);
  font-family: var(--xh-font-ui);
}

.table {
  color: var(--xh-body-text);
}

.table thead th {
  font-family: var(--xh-font-ui);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--xh-muted);
  border-bottom-color: var(--xh-border);
}

.list-group-item {
  border-color: var(--xh-border);
  background: transparent;
}

/* 下拉菜单：更轻的边框与阴影 */
.dropdown-menu {
  border: 1px solid var(--xh-border);
  border-radius: var(--xh-radius);
  box-shadow: var(--xh-shadow);
  padding: 0.4rem;
  font-family: var(--xh-font-ui);
  font-size: 0.9rem;
}

.dropdown-item {
  border-radius: var(--xh-radius-sm);
  padding: 0.5rem 0.65rem;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--xh-primary-soft);
  color: var(--xh-primary-ink);
}

/* 通知下拉的眉题：模板已由 h6 降级为非标题元素，字体/行高需在类上显式接手，
   保持与原先 h6 一致的观感（字号/字重/间距/颜色仍由本类与 Bootstrap 决定） */
.dropdown-header {
  font-family: var(--xh-font-heading);
  font-size: 0.875rem;
  line-height: 1.45;
  font-weight: 700;
  color: var(--xh-muted);
  letter-spacing: 0.04em;
}

/* 可点击但非链接的卡片/标签（Bootstrap 无此工具类） */
.cursor-pointer {
  cursor: pointer;
}

/* 表格行悬停 */
.table-hover > tbody > tr:hover > * {
  --bs-table-accent-bg: transparent;
  background-color: var(--xh-surface-soft);
}

/* 微信登录按钮（深一档微信绿，白字可达 AA） */
.btn-wechat {
  background-color: #067d3e;
  border: none;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(6, 125, 62, 0.22);
}

.btn-wechat:hover,
.btn-wechat:focus {
  background-color: #06703a;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(6, 125, 62, 0.30);
}

/* 后台趋势条 / 列表缩略图（承接模板里的功能性内联样式） */
.trend-bar {
  background: var(--xh-primary);
  border-radius: 3px 3px 0 0;
  min-height: 3px;
}

.table-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--xh-radius-sm);
  border: 1px solid var(--xh-border);
}

.order-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--xh-radius-sm);
  border: 1px solid var(--xh-border);
  box-shadow: var(--xh-shadow-xs);
}

/* 帮助中心侧栏导航 */
.help-nav-list a {
  display: block;
  padding: 0.45rem 0.6rem;
  border-radius: var(--xh-radius-sm);
  transition: background 0.16s var(--xh-ease), color 0.16s var(--xh-ease);
}

.help-nav-list li + li {
  margin-top: 0.15rem;
}

.help-nav-list a:hover {
  background: var(--xh-primary-soft);
  color: var(--xh-primary-ink);
}

/* --------------------------------------------------------------------------
   11b. 基础件统一：表格 / 徽章 / 提示 / 列表组 / 下拉 / 分页 / 面包屑
   -------------------------------------------------------------------------- */
.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--xh-body-text);
  --bs-table-border-color: var(--xh-border);
  margin-bottom: 0;
}

.table > :not(caption) > * > * {
  padding: 0.8rem 1rem;
  vertical-align: middle;
}

.table thead th {
  background: var(--xh-surface-soft);
  font-family: var(--xh-font-ui);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--xh-muted);
  border-bottom: 1px solid var(--xh-border-strong);
  white-space: nowrap;
}

.table tbody tr {
  transition: background-color 0.15s var(--xh-ease);
}

.table-hover > tbody > tr:hover > * {
  --bs-table-accent-bg: transparent;
  background-color: var(--xh-primary-soft);
}

.table-responsive.card {
  overflow: hidden;
}

.status-badge {
  font-family: var(--xh-font-ui);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  padding: 0.34em 0.8em;
}

.alert {
  border: 1px solid var(--xh-border);
  border-left: 3px solid currentColor;
  border-radius: var(--xh-radius);
  padding: 0.85rem 1.1rem;
  font-size: 0.95rem;
  box-shadow: var(--xh-shadow-xs);
}

.alert-success { background: rgba(15, 157, 107, 0.08); border-color: rgba(15, 157, 107, 0.22); color: #0a6e50; }
.alert-warning { background: rgba(201, 138, 18, 0.10); border-color: rgba(201, 138, 18, 0.26); color: #7c5408; }
.alert-danger,
.alert-error { background: rgba(214, 69, 69, 0.08); border-color: rgba(214, 69, 69, 0.22); color: #a8322d; }
.alert-info { background: rgba(47, 111, 208, 0.08); border-color: rgba(47, 111, 208, 0.22); color: #23508f; }

.alert-success,
.alert-warning,
.alert-danger,
.alert-error,
.alert-info {
  border-left-color: currentColor;
}

.list-group {
  border-radius: var(--xh-radius);
}

.list-group-item {
  padding: 0.85rem 1.05rem;
  font-family: var(--xh-font-ui);
  font-size: 0.95rem;
}

.list-group-item-action {
  transition: background-color 0.16s var(--xh-ease), color 0.16s var(--xh-ease);
}

.list-group-item-action:hover,
.list-group-item-action:focus {
  background: var(--xh-primary-soft);
  color: var(--xh-primary-ink);
}

.list-group-item.active {
  background: var(--xh-primary);
  border-color: var(--xh-primary);
}

.dropdown-menu {
  min-width: 12rem;
}

.dropdown-item {
  transition: background-color 0.14s var(--xh-ease), color 0.14s var(--xh-ease);
}

.dropdown-item:active {
  background: var(--xh-primary-dark);
  color: #fff;
}

.dropdown-divider {
  border-color: var(--xh-border);
  margin: 0.35rem 0;
}

.pagination {
  gap: 0.25rem;
  margin-bottom: 0;
}

.page-link:focus-visible {
  box-shadow: 0 0 0 4px var(--xh-primary-soft);
}

.breadcrumb {
  margin-bottom: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "\203A";
  color: #b7b3c4;
  padding-right: 0.45rem;
}

/* --------------------------------------------------------------------------
   12. 认证 / 账户页面（登录、注册、资料等）
   -------------------------------------------------------------------------- */
.auth-wrap {
  max-width: 30rem;
  margin: 0 auto;
  padding: 3.5rem 0 4.5rem;
}

.auth-card {
  background: #fff;
  border: 1px solid var(--xh-border);
  border-radius: var(--xh-radius-lg);
  box-shadow: var(--xh-shadow);
  padding: 2.25rem 2rem;
}

.auth-head {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-head h1,
.auth-head h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.auth-head p {
  color: var(--xh-muted);
  margin: 0;
}

.auth-foot {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--xh-muted);
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   12b. 滚动微交互（顶栏状态 / 视口进入 / 背景图淡入）
   -------------------------------------------------------------------------- */
.navbar {
  transition: box-shadow 0.25s var(--xh-ease), background-color 0.25s var(--xh-ease),
    border-color 0.25s var(--xh-ease);
}

/* 顶栏滚动后：底色更实、描边更清晰、阴影更深 */
body.is-scrolled .navbar {
  background: rgba(255, 255, 255, 0.94) !important;
  border-bottom-color: var(--xh-border-strong);
  box-shadow: 0 1px 0 rgba(28, 26, 41, 0.03), 0 12px 32px rgba(28, 26, 41, 0.1) !important;
}

/* 进入视口：仅在启用 JS 时才隐藏，脚本失效时内容保持默认可见 */
.js [data-reveal] {
  transition: opacity 0.5s var(--xh-ease), transform 0.5s var(--xh-ease),
    box-shadow 0.24s var(--xh-ease), border-color 0.24s var(--xh-ease);
}

.js [data-reveal]:not(.is-revealed) {
  opacity: 0;
  transform: translateY(16px);
}

/* 懒加载背景图：由脚本加 .is-loading 后才隐藏，加载完成淡入。
   隐藏态不直接挂在 .js 上，脚本中途失效时内容默认可见，不会留白块。 */
.js .card-bg-lazy {
  transition: opacity 0.45s var(--xh-ease), transform 0.3s var(--xh-ease);
}

.js .card-bg-lazy.is-loading {
  opacity: 0;
}

.js .card-bg-lazy.is-loaded {
  opacity: 1;
}

/* 首页变现卡序号 / 最终 CTA 光晕 */
.monetize-num {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: var(--xh-radius-pill);
  background: rgba(255, 255, 255, 0.94);
  color: var(--xh-primary-ink);
  font-family: var(--xh-font-numeric);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 12px rgba(18, 14, 28, 0.16);
}

.cta-band {
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 120% at 50% 0%, rgba(94, 53, 177, 0.1) 0%, rgba(94, 53, 177, 0) 62%);
  pointer-events: none;
}

.cta-band > .container {
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   13. 移动端收敛（覆盖 v1 在 767.98 断点下的 !important）
   -------------------------------------------------------------------------- */
/* 折叠菜单展开态（<lg）：在白色磨砂顶栏下形成一块干净面板 */
@media (max-width: 991.98px) {
  .navbar .navbar-collapse {
    margin: 0.6rem -0.75rem -0.25rem;
    padding: 0.9rem 0.9rem 1.1rem;
    background: #fff;
    border: 1px solid var(--xh-border);
    border-radius: var(--xh-radius-lg);
    box-shadow: var(--xh-shadow);
  }

  .navbar .navbar-nav .nav-link {
    padding: 0.7rem 0.85rem;
    border-radius: var(--xh-radius);
  }

  .navbar .navbar-nav .nav-link.active,
  .navbar .navbar-nav .nav-link:hover {
    background: var(--xh-primary-soft);
  }

  .navbar form[role="search"] {
    width: 100%;
    margin: 0.35rem 0 0.75rem !important;
  }

  .navbar form[role="search"] .input-group {
    width: 100%;
  }

  .navbar .navbar-nav.align-items-lg-center {
    margin-top: 0.25rem;
  }

  .navbar .btn-group {
    margin-top: 0.35rem;
  }
}

@media (max-width: 767.98px) {
  .section-head {
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 1.35rem;
  }

  .hero {
    padding: 2.6rem 0 2.9rem;
  }

  /* 手机端单独提亮：窄屏背景更容易糊成黑块，遮罩整体降一档 */
  .hero::before {
    filter: brightness(0.8) contrast(1.01) saturate(0.86);
  }

  .hero::after {
    background:
      linear-gradient(180deg, rgba(10, 9, 16, 0.52) 0%, rgba(10, 9, 16, 0.24) 46%, rgba(10, 9, 16, 0.56) 100%),
      radial-gradient(90% 50% at 50% 0%, rgba(94, 53, 177, 0.14) 0%, rgba(94, 53, 177, 0) 64%);
  }

  .hero-eyebrow {
    margin-bottom: 1rem;
    font-size: 0.68rem;
    padding: 0.38rem 0.8rem;
  }

  .hero h1 {
    margin-bottom: 0.9rem !important;
  }

  .hero-stats {
    margin-top: 1.75rem;
    padding-top: 1.35rem;
  }

  .hero-stats > div {
    padding: 0 0.6rem;
  }

  .hero-stats .h3 {
    font-size: 1.35rem;
    margin-bottom: 0.15rem !important;
  }

  .hero-stats .stat-label {
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }

  .product-card .card-body {
    padding: 0.8rem;
  }

  .product-card-title {
    font-size: 0.9rem;
  }

  .auth-card {
    padding: 1.5rem 1.15rem;
    box-shadow: var(--xh-shadow-sm);
  }

  .auth-wrap {
    padding: 1.75rem 0 2.5rem;
  }

  .section-title::after {
    display: none;
  }

  .section-sub {
    font-size: 0.93rem;
  }

  .hero .lead {
    font-size: 1rem;
    line-height: 1.7;
  }

  /* Hero 按钮层级：主 CTA 通栏，次 CTA 退为文字链接，突出主行动 */
  .hero .d-flex.flex-wrap {
    gap: 0.35rem !important;
  }

  .hero .d-flex.flex-wrap .btn-accent {
    width: 100%;
  }

  .hero .d-flex.flex-wrap .btn-outline-light {
    width: auto;
    min-height: 0;
    padding: 0.5rem 0.25rem;
    background: transparent;
    border-color: transparent;
    text-decoration: underline;
    text-underline-offset: 4px;
    font-size: 0.94rem;
    color: rgba(255, 255, 255, 0.92);
  }

  .hero .d-flex.flex-wrap .btn-outline-light:hover {
    background: transparent;
    border-color: transparent;
    color: #fff;
  }

  .hero-stats {
    margin-top: 2.1rem;
    padding-top: 1.5rem;
  }

  section.container.py-5,
  section.bg-soft.py-5 {
    padding-top: 2.75rem !important;
    padding-bottom: 2.75rem !important;
  }

  .card {
    border-radius: var(--xh-radius);
  }

  .card-body {
    padding: 1.05rem;
  }

  .card-header {
    padding: 0.85rem 1.05rem;
  }

  .help-doc,
  .prose {
    font-size: 0.97rem;
  }

  .help-doc h2,
  .prose h2 {
    margin-top: 1.9rem;
  }

  .table > :not(caption) > * > * {
    padding: 0.65rem 0.75rem;
  }

  .auth-head h1,
  .auth-head h2 {
    font-size: 1.45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .card-img-top,
  .btn {
    transition: none !important;
  }

  .js [data-reveal],
  .js [data-reveal]:not(.is-revealed) {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .js .card-bg-lazy {
    opacity: 1 !important;
    transition: none !important;
  }

  .navbar,
  body.is-scrolled .navbar {
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
   14. 组件补全（承接 cycle1 苦力登记的需求）
   错误页数字 / 已购封面 / 二维码 / 向导选择 / 表头 / 小空态 / 趋势图 /
   侧栏 sticky / 帮助导航当前项 / 订阅徽标 / 字母缩略图 / 居中页头
   -------------------------------------------------------------------------- */

/* 14.1 404/500 大号数字：品牌渐变文字 */
.error-code {
  font-family: var(--xh-font-numeric);
  font-weight: 800;
  font-size: clamp(4.5rem, 14vw, 7rem);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 0.5rem;
  color: var(--xh-primary);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .error-code {
    background: linear-gradient(135deg, var(--xh-primary) 0%, var(--xh-primary-light) 52%, var(--xh-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

/* 14.2 已购页 Hero 封面：尺寸兜底（模板可去掉功能性内联） */
.owned-cover {
  background-color: #eef0f6;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  aspect-ratio: 4 / 3;
  min-height: 10rem;
}

/* 14.3 二维码：舒适内边距 + 大圆角 + 图片居中限宽 */
.qr-box {
  padding: 1.25rem;
  border-radius: var(--xh-radius-lg);
}

.qr-box img {
  display: block;
  width: 100%;
  max-width: 13.75rem;
  height: auto;
  margin: 0 auto;
}

/* 14.4 拖拽区 / 类型选择：绝对定位 input 的定位父级 + 选中态确定标记 */
.file-dropzone,
.type-pill,
.mbd-type-pill {
  position: relative;
}

.type-pill.is-selected::after,
.mbd-type-pill.is-selected::after {
  content: "\2713";
  position: absolute;
  top: -0.45rem;
  right: -0.45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  font-family: var(--xh-font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  box-shadow: 0 2px 8px rgba(94, 53, 177, 0.35);
}

/* 类型卡是整块可点区域，标记收进右上角避免被裁切 */
.type-pill.is-selected::after {
  top: 0.5rem;
  right: 0.5rem;
  background: var(--xh-primary);
}

.mbd-type-pill.is-selected::after {
  background: var(--mbd-orange, var(--xh-accent));
  box-shadow: 0 2px 8px rgba(232, 89, 12, 0.35);
}

/* 14.5 表格表头：.table-light 收敛到卡片头同色 */
.table-light {
  --bs-table-bg: var(--xh-surface-soft);
  --bs-table-color: var(--xh-heading);
  --bs-table-border-color: var(--xh-border);
  --bs-table-striped-bg: rgba(94, 53, 177, 0.03);
}

.table-light > thead > tr > th {
  border-bottom-color: var(--xh-border-strong);
}

/* 14.6 窄容器小空态：去大图、收紧内边距与字号。
   既可直接加在 .empty-state 上，也可包在外层容器上。 */
.empty-state--sm,
.empty-state.empty-state--sm {
  padding: 1.6rem 0.75rem;
}

.empty-state--sm .empty-state {
  padding: 0;
}

.empty-state--sm .empty-state-img,
.empty-state.empty-state--sm .empty-state-img {
  display: none;
}

.empty-state--sm h3,
.empty-state--sm h5,
.empty-state.empty-state--sm h3,
.empty-state.empty-state--sm h5 {
  font-size: 0.98rem;
  margin-bottom: 0.3rem;
}

.empty-state--sm p,
.empty-state.empty-state--sm p {
  font-size: 0.86rem;
  margin-bottom: 0.6rem;
}

.empty-state--sm .btn,
.empty-state.empty-state--sm .btn {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
}

/* 14.7 侧栏 sticky：统一偏移，窄屏取消吸附 */
.sticky-side {
  position: sticky;
  top: 90px;
}

/* 14.8 数据趋势图：收纳内联 height / gap / min-width */
.trend-chart {
  display: flex;
  align-items: flex-end;
  height: 120px;
  gap: 8px;
}

.trend-col {
  flex: 1 1 0;
  min-width: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

/* 14.9 帮助中心侧栏当前项：柔底 + 左竖条 + 深紫字重 */
.help-nav-list a[aria-current="page"] {
  background: var(--xh-primary-soft);
  color: var(--xh-primary-ink);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--xh-primary);
}

/* 14.10 订阅语义徽标（有效 / 过期），保留对 Bootstrap subtle 工具类的兜底 */
.badge-active {
  background: rgba(15, 157, 107, 0.12) !important;
  color: #0a6e50 !important;
}

.badge-expired {
  background: rgba(113, 110, 125, 0.14) !important;
  color: #57535f !important;
}

/* 14.11 无封面字母占位缩略图 */
.table-thumb--letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--xh-surface-soft);
  color: var(--xh-primary-ink);
  font-family: var(--xh-font-ui);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
  object-fit: unset;
}

/* 14.12 居中页头 */
.section-head-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.section-head-center .section-sub {
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 991.98px) {
  .sticky-side {
    position: static;
    top: auto;
  }
}

/* --------------------------------------------------------------------------
   15. 最后一公里（cycle3）：Hero 纵深 / 首页节奏 / 组件态 / 页脚 / 移动端
   -------------------------------------------------------------------------- */

/* 15.1 Hero 背景清晰度：略提亮 + 提对比，图像更通透；白字靠 ::after 深色遮罩
   与文字阴影保持对比，不牺牲可读性。 */
.hero::before {
  filter: brightness(0.56) contrast(1.06) saturate(1.06);
}

/* 15.2 Hero 底部 → 正文的自然过渡：底部 40px 渐隐到页面底色，消除硬切。
   仅覆盖 hero 底部内边距区域（桌面 6rem / 移动 3.4rem），不遮挡文字。 */
.hero-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(246, 245, 250, 0) 0%, rgba(246, 245, 250, 0.06) 30%, rgba(246, 245, 250, 0.42) 65%, var(--xh-body-bg) 100%);
}

/* 15.3 首页「三种变现方式」：封面比例化 + 卡片级缩放 + 文字层级
   （v1 的 .monetize-img 是固定 height:10rem，且 :hover 只作用在图片本身上） */
.monetize-card {
  position: relative;
}

.monetize-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s var(--xh-ease);
}

.monetize-card:hover .monetize-img {
  transform: scale(1.05);
}

/* 悬停缩放的触发表意归卡片统一控制，避免直接压在图片上时两套规则打架 */
.monetize-img:hover {
  transform: none;
}

.monetize-card h5 {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.monetize-card p {
  font-size: 0.92rem;
  line-height: 1.65;
}

.monetize-num {
  box-shadow: 0 4px 12px rgba(18, 14, 28, 0.16), 0 0 0 1px rgba(94, 53, 177, 0.08);
}

/* 15.4 分类卡 hover：比通用卡更克制（不抢作品卡的视觉），仅轻抬 + 描边 */
.category-card:hover {
  transform: translateY(-3px);
  border-color: rgba(94, 53, 177, 0.28);
  box-shadow: var(--xh-shadow-sm);
}

.category-card h6 {
  letter-spacing: -0.005em;
  transition: color 0.18s var(--xh-ease);
}

.category-card:hover h6 {
  color: var(--xh-primary-ink);
}

/* 15.5 首页卡片栅格留白：桌面端 gutter 略放大，收尾更从容（只作用于首页带
   .home-grid 的栅格，避免影响其他页面的 .row.g-4） */
@media (min-width: 992px) {
  .home-grid {
    --bs-gutter-x: 1.75rem;
    --bs-gutter-y: 1.75rem;
  }
}

/* 15.6 最终 CTA 收尾：更厚的呼吸感 + 标题限宽 + 更稳的按钮投影
   （提高选择器权重以压过 v2 里 section.bg-soft.py-5 的 !important 留白） */
section.cta-band.py-5 {
  padding-top: 4.5rem !important;
  padding-bottom: 4.5rem !important;
}

.cta-band .section-title {
  max-width: 24ch;
}

.cta-band .btn-accent {
  box-shadow: 0 8px 22px rgba(232, 89, 12, 0.26), 0 2px 6px rgba(28, 26, 41, 0.06);
}

/* 15.7 按钮组件态
   focus-visible 品牌光环：白色隔离圈 + 品牌紫外环，深浅底上都清晰 */
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(94, 53, 177, 0.35);
}

/* 深色底/实心按钮上的光环把隔离圈换半透明，避免「白边」显得突兀 */
.btn-accent:focus-visible,
.btn-primary:focus-visible,
.btn-wechat:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 0 0 6px rgba(94, 53, 177, 0.45);
}

/* 禁用态：统一降透明 + 去投影/位移，交互反馈明确 */
.btn:disabled,
.btn.disabled {
  opacity: 0.55;
  box-shadow: none;
  transform: none;
  filter: none;
  cursor: not-allowed;
}

/* 文字按钮：品牌色 + 悬停下划线，替代 Bootstrap 默认蓝 */
.btn-link {
  --bs-btn-color: var(--xh-primary-ink);
  --bs-btn-hover-color: var(--xh-primary-dark);
  --bs-btn-active-color: var(--xh-primary-dark);
  font-family: var(--xh-font-ui);
  font-weight: 600;
  text-decoration: none;
  box-shadow: none;
}

.btn-link:hover,
.btn-link:focus {
  color: var(--xh-primary-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  transform: none;
  box-shadow: none;
}

.btn-link:focus-visible {
  outline: 2px solid var(--xh-primary);
  outline-offset: 3px;
  box-shadow: none;
}

.btn-link.text-muted {
  color: var(--xh-muted) !important;
}

.btn-link.text-muted:hover,
.btn-link.text-muted:focus {
  color: var(--xh-ink) !important;
}

/* .btn-success 收编到品牌绿（v1 仍留 #0b7a59 与旧投影） */
.btn-success {
  --bs-btn-bg: #0f9d6b;
  --bs-btn-border-color: #0f9d6b;
  --bs-btn-hover-bg: #0c8057;
  --bs-btn-hover-border-color: #0c8057;
  --bs-btn-active-bg: #0c8057;
  --bs-btn-active-border-color: #0c8057;
  border: none;
  box-shadow: 0 4px 14px rgba(15, 157, 107, 0.22);
}

.btn-success:hover,
.btn-success:focus {
  box-shadow: 0 10px 26px rgba(15, 157, 107, 0.30);
}

/* 归零 v1 .btn-outline-light:hover 的深色投影（浅色顶栏/深色 hero 都不需要脏影） */
.btn-outline-light:hover,
.btn-outline-light:focus {
  box-shadow: none;
}

/* 15.8 顶栏汉堡按钮焦点环：润色 v1 的白色环（在浅色顶栏上不可见） */
.navbar-toggler:focus,
.navbar-toggler:focus-visible {
  outline: none;
  border-color: var(--xh-primary-light) !important;
  box-shadow: 0 0 0 3px var(--xh-primary-soft);
}

/* 顶栏头像：收纳模板内联 object-fit */
.navbar-avatar {
  object-fit: cover;
}

/* 15.9 徽标统一：.badge / .chip / .status-badge 共用一套字形与胶囊半径 */
.badge,
.chip,
.status-badge {
  font-family: var(--xh-font-ui);
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--xh-radius-pill);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.36em 0.8em;
  font-size: 0.78rem;
  line-height: 1;
  white-space: nowrap;
}

/* v1 未覆盖的 info 语义色，补齐为同族柔底深字 */
.status-badge.bg-info {
  background: rgba(47, 111, 208, 0.12) !important;
  color: #23508f !important;
}

/* 15.10 页脚：层次与链接 hover、备案行视觉 */
footer {
  position: relative;
}

footer .footer-brand p {
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.62);
}

footer .footer-links a {
  display: inline-block;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.16s var(--xh-ease), transform 0.16s var(--xh-ease);
}

footer .footer-links a:hover,
footer .footer-links a:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  transform: translateX(2px);
}

.footer-police-logo {
  height: 16px;
  width: auto;
}

.footer-meta {
  color: rgba(255, 255, 255, 0.5);
}

.footer-meta a {
  color: rgba(255, 255, 255, 0.6);
}

.footer-meta a:hover {
  color: #fff;
}

/* 通知下拉菜单：内联 min-width/max-height 收编为类，便于窄屏收敛 */
.notif-menu {
  min-width: 320px;
}

.notif-list {
  max-height: 320px;
  overflow-y: auto;
}

/* 15.11 移动端收尾（含 320px 不溢出） */
@media (max-width: 991.98px) {
  /* 折叠面板限高可滚动，菜单项多时不会顶出屏幕 */
  .navbar .navbar-collapse {
    max-height: calc(100vh - 4.5rem);
    overflow-y: auto;
  }
}

@media (max-width: 767.98px) {
  /* Hero：标题按视口收敛（v2 基础 clamp 的最小值 2.5rem 在窄屏偏大） */
  .hero h1 {
    font-size: clamp(1.9rem, 8.2vw, 2.5rem);
  }

  /* 给底部渐隐留出安全余量 */
  .hero {
    padding-bottom: 3.4rem;
  }

  .monetize-card h5 {
    font-size: 1rem;
  }

  .monetize-card p {
    font-size: 0.88rem;
  }

  section.cta-band.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  /* 页脚：品牌块与链接区之间加分隔，链接两列排布更省纵向空间 */
  footer.py-5 {
    padding-top: 2.5rem !important;
    padding-bottom: 1.75rem !important;
  }

  footer .footer-brand {
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  footer .footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.15rem 1rem;
  }

  footer .footer-links li {
    margin-bottom: 0.5rem;
  }

  footer .footer-links a:hover {
    transform: none;
  }
}

/* 320px 级超窄屏：通知面板与数据条不再挤压/溢出 */
@media (max-width: 400px) {
  .notif-menu {
    min-width: 0;
    width: min(92vw, 320px);
  }

  .hero-stats > div {
    padding: 0 0.4rem;
  }

  .hero-stats .stat-label {
    letter-spacing: 0.02em;
  }
}

/* 15.12 prefers-reduced-motion：禁用悬停位移与图片缩放（不只是过渡时长） */
@media (prefers-reduced-motion: reduce) {
  .card:hover,
  .category-card:hover,
  .monetize-card:hover .monetize-img,
  .card:hover .card-img-top,
  .help-doc-card:hover .help-doc-mark {
    transform: none !important;
  }

  .hero .container {
    animation: none !important;
  }
}

/* --------------------------------------------------------------------------
   16. 键盘焦点环收尾（cycle6）：统一「深底白环 / 浅底品牌紫环」体系
   --------------------------------------------------------------------------
   v1 的全局 `:focus-visible` 权重 (0,1,0) 低于 Bootstrap 的
   `.nav-link:focus-visible` / `.page-link:focus-visible`（默认蓝 0.25rem 环），
   因此导航与分页此前落到系统蓝；`.btn-outline-light:focus` 的 box-shadow 归零
   又盖掉了 `.btn:focus-visible` 光环，导致该按钮深底聚焦无指示。本节集中修正。
   -------------------------------------------------------------------------- */

/* 16.1 深色 Hero 上的次要按钮：白环 + 外扩（该按钮在深底 Hero 使用） */
.btn-outline-light:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
  box-shadow: none;
}

/* 16.2 浅色顶栏里的 .btn-outline-light（语言切换）：白环不可见，改品牌紫环 */
.navbar .btn-outline-light:focus-visible {
  outline: 3px solid var(--xh-primary);
  outline-offset: 2px;
  box-shadow: none;
}

/* 16.3 导航链接（含顶栏、nav-pills、nav-tabs）：品牌紫环，压过 Bootstrap 蓝环 */
.nav-link:focus-visible,
.navbar .nav-link:focus-visible {
  outline: 3px solid var(--xh-primary);
  outline-offset: 2px;
  box-shadow: none;
}

/* 16.4 顶栏搜索：整只胶囊随输入聚焦联动描边 + 品牌光环 */
.navbar form .input-group:focus-within {
  border-color: var(--xh-primary);
  box-shadow: 0 0 0 4px rgba(94, 53, 177, 0.18);
}

.navbar .form-control:focus {
  box-shadow: 0 0 0 4px rgba(94, 53, 177, 0.18) !important;
}

/* 16.5 分页：品牌紫环贴近页码，避免与相邻页重叠 */
.page-link:focus-visible {
  outline: 3px solid var(--xh-primary);
  outline-offset: 1px;
  box-shadow: none;
}

/* 16.6 下拉菜单项：环内缩到菜单内，不溢出菜单边界 */
.dropdown-item:focus-visible {
  outline: 3px solid var(--xh-primary);
  outline-offset: -3px;
  background: var(--xh-primary-soft);
  color: var(--xh-primary-ink);
}

/* 16.7 旧观感收尾：v1 未覆盖的几处纯黑阴影 / 越界圆角，统一到 v2 令牌 */
/* 头像：非卡片场景（资料页、店铺头、已购页）此前仍是纯黑投影 */
.avatar {
  box-shadow: 0 2px 10px rgba(28, 26, 41, 0.12);
}

/* 支付品牌 logo：0.5/0.75rem 不在 v2 圆角阶梯上 */
.payment-logo {
  border-radius: var(--xh-radius-sm);
}

.payment-logo-lg {
  border-radius: var(--xh-radius);
}

/* 商品详情移动端购买条：旧纯黑顶影改为品牌中性柔影（仅移动端显示） */
@media (max-width: 767.98px) {
  .mobile-buybar {
    box-shadow: 0 -6px 24px rgba(28, 26, 41, 0.10);
  }
}
