/* ==========================================================================
   钱醒Pro · 全站暗调极简轻奢样式表
   设计系统：炭黑 + 米咖低饱和配色
   版本：2.0
   ========================================================================== */


/* ==========================================================================
   第1章：CSS变量定义
   ========================================================================== */

:root {
  /* ---------- 背景色 ---------- */
  --bg-primary:    #1C1A18;   /* 主背景：深炭黑 */
  --bg-secondary:  #252320;   /* 卡片/模块背景 */
  --bg-tertiary:   #2E2B27;   /* 悬停态/内嵌区 */
  --bg-input:      #1A1815;   /* 输入框背景 */

  /* ---------- 边框 ---------- */
  --border-default: #4A3F35;  /* 默认边框 */
  --border-hover:   #6B5C4E;  /* 悬停边框 */
  --border-focus:   #C4A882;  /* 聚焦边框 */

  /* ---------- 文字 ---------- */
  --text-primary:   #D4C5A9;  /* 主文字：温暖米白 */
  --text-secondary: #8C7B65;  /* 次要文字 */
  --text-muted:     #5C4F42;  /* 淡化文字 */

  /* ---------- 品牌强调色 ---------- */
  --accent-gold:       #C4A882;  /* 品牌强调色：米金 */
  --accent-gold-light: #D4B896;  /* 高亮米金 */
  --accent-gold-dark:  #A08B6E;  /* 深米金 */

  /* ---------- 功能色（低饱和） ---------- */
  --color-success: #6B9E7A;   /* 成功绿 */
  --color-danger:  #C47B6A;   /* 警告红 */
  --color-warning: #C4A06A;   /* 警告黄 */
  --color-info:    #7A95A8;   /* 信息蓝 */

  /* ---------- 字体体系 ---------- */
  --font-cn:   "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --font-en:   -apple-system, "Segoe UI", sans-serif;
  --font-mono: "SF Mono", "Consolas", monospace;

  /* ---------- 圆角体系（与 core.css 统一） ---------- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* ---------- 间距体系（与 core.css 统一，4px 基准） ---------- */
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;
  --sp-4: 1rem;     --sp-5: 1.25rem;  --sp-6: 1.5rem;
  --sp-8: 2rem;     --sp-10: 2.5rem;  --sp-12: 3rem;
  --sp-16: 4rem;    --sp-20: 5rem;    --sp-24: 6rem;
  --sp-32: 8rem;

  /* ---------- 阴影（与 core.css 统一） ---------- */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.7);
  --shadow-gold: 0 0 20px rgba(196, 168, 130, 0.08);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.35);

  /* ---------- 过渡（与 core.css 统一） ---------- */
  --transition-fast:   0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:   0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ---------- core.css 独有变量补全 ---------- */
  --bg-quaternary: #35312C;
  --bg-overlay: rgba(12, 11, 10, 0.85);
  --bg-hero-gradient: radial-gradient(ellipse 80% 60% at 50% 30%, rgba(196, 168, 130, 0.06) 0%, rgba(28, 26, 24, 0) 70%);
  --border-subtle: rgba(74, 63, 53, 0.4);
  --border-card: rgba(74, 63, 53, 0.55);
  --text-inverse: #1C1A18;
  --accent-gold-glow: rgba(196, 168, 130, 0.12);
  --accent-gold-border: rgba(196, 168, 130, 0.25);
  --color-success-bg: rgba(107, 158, 122, 0.1);
  --color-danger-bg: rgba(196, 123, 106, 0.1);
  --color-warning-bg: rgba(196, 160, 106, 0.1);
  --color-info-bg: rgba(122, 149, 168, 0.1);
  --font-serif: "Noto Serif SC", "STSong", "SimSun", Georgia, serif;
  --container-max: 1200px;
  --container-narrow: 800px;
  --container-wide: 1400px;
  --navbar-height: 64px;
  --mobile-nav-height: 56px;
  --z-dropdown: 100; --z-sticky: 200; --z-navbar: 300;
  --z-modal-backdrop: 400; --z-modal: 500; --z-toast: 600;

  /* ---------- 标准排版参数 ---------- */
  --line-height-article: 1.9;
  --paragraph-spacing: 30px;
  --card-radius: 12px;
  --card-shadow: var(--shadow-card);
}


/* ==========================================================================
   第2章：Reset & 基础样式
   ========================================================================== */

/* --- 全局盒模型 --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- 基础 Reset --- */
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-cn);
  line-height: 1.75;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- 滚动条样式（暗色细条） --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-default) var(--bg-primary);
}

/* --- 图片 --- */
img,
video {
  max-width: 100%;
  display: block;
}

/* --- 链接 --- */
a {
  color: inherit;
  text-decoration: none;
}

/* --- 列表 --- */
ul,
ol {
  list-style: none;
}

/* --- 表单元素基础 --- */
button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* --- 表格 --- */
table {
  border-collapse: collapse;
  width: 100%;
}

/* --- HR --- */
hr {
  border: none;
  border-top: 1px solid var(--border-default);
  margin: 24px 0;
}

/* --- 代码 --- */
code,
pre {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px;
  overflow-x: auto;
  white-space: pre-wrap;
}

code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--accent-gold);
}

/* --- 选区高亮 --- */
::selection {
  background: rgba(196, 168, 130, 0.25);
  color: var(--text-primary);
}


/* ==========================================================================
   第3章：容器与布局工具
   ========================================================================== */

/* --- 主容器 --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-sm {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-xs {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Section 内边距 --- */
.section-pad {
  padding: 80px 0;
}

@media (max-width: 768px) {
  .section-pad {
    padding: 60px 0;
  }
}

/* --- Flex 工具类 --- */
.d-flex          { display: flex; }
.d-inline-flex   { display: inline-flex; }
.flex-col        { flex-direction: column; }
.flex-wrap       { flex-wrap: wrap; }
.flex-1          { flex: 1; }
.flex-shrink-0   { flex-shrink: 0; }
.align-center    { align-items: center; }
.align-start     { align-items: flex-start; }
.align-end       { align-items: flex-end; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.gap-4           { gap: 4px; }
.gap-6           { gap: 6px; }
.gap-8           { gap: 8px; }
.gap-10          { gap: 10px; }
.gap-12          { gap: 12px; }
.gap-16          { gap: 16px; }
.gap-20          { gap: 20px; }
.gap-24          { gap: 24px; }
.gap-32          { gap: 32px; }

/* --- Grid 工具类 --- */
.d-grid           { display: grid; }
.grid-2           { grid-template-columns: repeat(2, 1fr); }
.grid-3           { grid-template-columns: repeat(3, 1fr); }
.grid-4           { grid-template-columns: repeat(4, 1fr); }

/* --- 位置 --- */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }

/* --- 溢出 --- */
.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }

/* --- 宽高 --- */
.w-full  { width: 100%; }
.h-full  { height: 100%; }


/* ==========================================================================
   第4章：排版系统
   ========================================================================== */

/* --- 标题层级 --- */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 3.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.2rem;
  font-weight: 700;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.2rem;
}

h5 {
  font-size: 1rem;
}

h6 {
  font-size: 0.9rem;
}

/* 移动端标题缩放 */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  h3 { font-size: 1.3rem; }
  h4 { font-size: 1.1rem; }
}

/* --- 分区标题 --- */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 3rem;
}

/* --- 段落 --- */
p {
  color: var(--text-secondary);
  line-height: 1.75;
}

p + p {
  margin-top: 0.75em;
}

/* --- 文字修饰类 --- */
.text-accent    { color: var(--accent-gold); }
.text-muted     { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary   { color: var(--text-primary); }
.text-success   { color: var(--color-success); }
.text-danger    { color: var(--color-danger); }
.text-warning   { color: var(--color-warning); }
.text-info      { color: var(--color-info); }

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.text-sm  { font-size: 0.85rem; }
.text-xs  { font-size: 0.78rem; }
.text-lg  { font-size: 1.1rem; }
.text-xl  { font-size: 1.25rem; }

.font-bold    { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium  { font-weight: 500; }
.font-normal  { font-weight: 400; }

.font-mono { font-family: var(--font-mono); }
.font-en   { font-family: var(--font-en); }

.italic { font-style: italic; }

.uppercase    { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.05em; }
.tracking-wider { letter-spacing: 0.1em; }


/* ==========================================================================
   第5章：按钮系统
   ========================================================================== */

/* --- 基础按钮 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font-cn);
  line-height: 1;
  position: relative;
  overflow: hidden;
}

.btn:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* --- 主按钮（米金填充） --- */
.btn-primary {
  background: var(--accent-gold);
  color: #1C1A18;
  border-color: var(--accent-gold);
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--accent-gold-light);
  border-color: var(--accent-gold-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(196, 168, 130, 0.25);
}

.btn-primary:active {
  transform: translateY(0);
  background: var(--accent-gold-dark);
}

/* --- 描边按钮 --- */
.btn-outline {
  background: transparent;
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
}

.btn-outline:hover {
  background: rgba(196, 168, 130, 0.1);
  transform: translateY(-1px);
}

.btn-outline:active {
  transform: translateY(0);
}

/* --- 幽灵按钮 --- */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

/* --- 危险按钮 --- */
.btn-danger {
  background: transparent;
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
}

.btn-danger:hover {
  background: rgba(196, 123, 106, 0.1);
}

/* --- 成功按钮 --- */
.btn-success {
  background: transparent;
  color: var(--color-success);
  border: 1px solid var(--color-success);
}

.btn-success:hover {
  background: rgba(107, 158, 122, 0.1);
}

/* --- 尺寸变体 --- */
.btn-lg {
  padding: 14px 32px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-xs {
  padding: 5px 12px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
}

/* --- 图标按钮 --- */
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

/* --- 块级按钮 --- */
.btn-block {
  display: flex;
  width: 100%;
}


/* ==========================================================================
   第6章：导航栏
   ========================================================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  background: rgba(28, 26, 24, 0.80);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

.navbar.scrolled {
  background: rgba(28, 26, 24, 0.95);
  border-bottom-color: var(--border-default);
}

.navbar .container {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- Logo --- */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: 48px;
  flex-shrink: 0;
}

.nav-logo .logo-mark {
  width: 32px;
  height: 32px;
  background: var(--accent-gold);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #1C1A18;
  flex-shrink: 0;
}

.nav-logo .logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

/* --- 导航链接 --- */
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all 0.2s;
  text-decoration: none;
  display: block;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(196, 168, 130, 0.08);
}

/* --- 导航CTA --- */
.nav-cta {
  background: var(--accent-gold);
  color: #1C1A18;
  padding: 9px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-cta:hover {
  background: var(--accent-gold-light);
  transform: translateY(-1px);
}

/* --- 汉堡菜单 --- */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  margin-left: 16px;
  flex-shrink: 0;
}

.nav-hamburger span {
  width: 22px;
  height: 1.5px;
  background: var(--text-secondary);
  transition: all 0.25s;
  display: block;
}

.nav-hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- 移动端导航 --- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(28, 26, 24, 0.98);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--border-default);
    z-index: 999;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 12px 0;
    border-radius: 0;
    border-bottom: 1px solid var(--border-default);
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  .nav-logo {
    margin-right: auto;
  }
}


/* ==========================================================================
   第7章：Hero 区域
   ========================================================================== */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px 80px;
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
}

/* 背景装饰光晕 */
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(ellipse, rgba(196, 168, 130, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bg-primary));
  pointer-events: none;
  z-index: 0;
}

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

/* --- 徽章 --- */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(196, 168, 130, 0.1);
  border: 1px solid rgba(196, 168, 130, 0.2);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.8rem;
  color: var(--accent-gold);
  margin-bottom: 32px;
  letter-spacing: 0.05em;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-gold);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.75); }
}

/* --- 主标题 --- */
.hero-title {
  font-size: 3.6rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  max-width: 800px;
  margin: 0 auto 24px;
  letter-spacing: -0.02em;
}

.hero-title .highlight {
  color: var(--accent-gold);
}

/* --- 副标题 --- */
.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 540px;
  margin: 0 auto 40px;
}

/* --- CTA 按钮组 --- */
.hero-cta-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- 统计数据栏 --- */
.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border-default);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-gold);
  font-family: var(--font-en);
  display: block;
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
  display: block;
}

/* --- 滚动提示 --- */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.75rem;
  animation: scroll-hint-fade 2.5s ease-in-out infinite;
  z-index: 1;
}

.scroll-hint-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--border-default), transparent);
}

@keyframes scroll-hint-fade {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(4px); }
}

/* --- 移动端 Hero --- */
@media (max-width: 768px) {
  .hero {
    padding: 80px 20px 60px;
  }

  .hero-title {
    font-size: 2.2rem;
    letter-spacing: -0.01em;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-stats {
    gap: 24px;
  }

  .hero-stat-num {
    font-size: 1.6rem;
  }
}


/* ==========================================================================
   第8章：数据亮点条
   ========================================================================== */

.stats-bar {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
  padding: 32px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.stat-item {
  text-align: center;
  padding: 8px 0;
}

.stat-number {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent-gold);
  font-family: var(--font-en);
  display: block;
  line-height: 1;
}

.stat-unit {
  font-size: 1rem;
  margin-left: 4px;
  color: var(--accent-gold-dark);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 6px;
  display: block;
}

.stat-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: block;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(1, 1fr);
    gap: 16px;
  }

  .stat-item + .stat-item {
    border-top: 1px solid var(--border-default);
    padding-top: 16px;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .stat-item + .stat-item {
    border-top: none;
    padding-top: 8px;
  }
}


/* ==========================================================================
   第9章：通用内容区区块
   ========================================================================== */

.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

/* 分区标题装饰线 */
.section-header::before {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--accent-gold);
  margin: 0 auto 20px;
}

.section-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

/* 内容卡片通用 */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition-normal);
}

.card:hover {
  border-color: var(--border-hover);
}

.card-sm {
  padding: 16px;
}

.card-lg {
  padding: 36px;
}

/* 内嵌信息框 */
.info-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px;
}

.info-box.accent {
  background: rgba(196, 168, 130, 0.05);
  border-color: rgba(196, 168, 130, 0.2);
}

.info-box.success {
  background: rgba(107, 158, 122, 0.06);
  border-color: rgba(107, 158, 122, 0.2);
}

.info-box.danger {
  background: rgba(196, 123, 106, 0.06);
  border-color: rgba(196, 123, 106, 0.2);
}

.info-box.warning {
  background: rgba(196, 160, 106, 0.06);
  border-color: rgba(196, 160, 106, 0.2);
}


/* ==========================================================================
   第10章：功能卡片（Feature Cards）
   ========================================================================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gold);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.feature-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-tertiary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover .feature-icon-wrap {
  border-color: var(--accent-gold);
  background: rgba(196, 168, 130, 0.12);
}

/* 图标容器 */
.feature-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(196, 168, 130, 0.08);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 20px;
  transition: border-color 0.3s, background 0.3s;
}

.feature-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--accent-gold);
  margin-top: 16px;
  text-decoration: none;
  transition: gap 0.2s;
}

.feature-link:hover {
  gap: 10px;
}

/* 响应式 */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   第11章：AI对话演示区
   ========================================================================== */

.demo-section {
  background: var(--bg-secondary);
}

.demo-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.demo-copy h2 {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.demo-copy p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 32px;
}

/* --- 手机外壳 --- */
.demo-phone-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.demo-phone {
  width: 280px;
  background: var(--bg-primary);
  border: 1px solid var(--border-default);
  border-radius: 24px;
  padding: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}

/* 手机顶部状态栏模拟 */
.demo-phone::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
}

.demo-phone-header {
  text-align: center;
  padding-top: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-default);
  margin-bottom: 16px;
}

.demo-phone-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.demo-phone-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- 聊天气泡 --- */
.chat-bubble {
  max-width: 80%;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.6;
  word-break: break-word;
}

.chat-bubble.user {
  margin-left: auto;
  background: var(--accent-gold);
  color: #1C1A18;
  border-radius: 12px 12px 0 12px;
}

.chat-bubble.ai {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  border-radius: 12px 12px 12px 0;
}

/* --- 打字动画 --- */
.chat-typing {
  display: flex;
  gap: 4px;
  padding: 12px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: 12px 12px 12px 0;
  width: fit-content;
  align-items: center;
}

.chat-typing span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.2s infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

/* 移动端 Demo */
@media (max-width: 768px) {
  .demo-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .demo-phone {
    width: 240px;
  }
}


/* ==========================================================================
   第12章：社区用户故事区
   ========================================================================== */

.stories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.story-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.story-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* 星评 */
.story-stars {
  display: flex;
  gap: 3px;
  margin-bottom: 16px;
}

.story-star {
  color: var(--accent-gold);
  font-size: 0.9rem;
}

/* 引言 */
.story-quote {
  font-size: 1.05rem;
  color: var(--text-primary);
  line-height: 1.8;
  margin-bottom: 20px;
  font-style: italic;
  flex: 1;
}

.story-quote::before {
  content: '\201C';
  color: var(--accent-gold);
  font-size: 1.8rem;
  line-height: 1;
  display: block;
  margin-bottom: 8px;
  font-style: normal;
}

/* 作者信息 */
.story-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.story-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-gold);
  flex-shrink: 0;
}

.story-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  display: block;
}

.story-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

/* 响应式 */
@media (max-width: 900px) {
  .stories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .stories-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   第13章：定价区
   ========================================================================== */

.pricing-section {
  text-align: center;
}

.pricing-card-wrap {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.pricing-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  min-width: 280px;
  max-width: 360px;
  flex: 1;
  position: relative;
  transition: border-color 0.3s, transform 0.3s;
  text-align: left;
}

.pricing-card:hover {
  transform: translateY(-4px);
}

/* 推荐卡片 */
.pricing-card.featured {
  border-color: var(--accent-gold);
}

.pricing-card.featured:hover {
  box-shadow: 0 8px 32px rgba(196, 168, 130, 0.15);
}

.pricing-card.featured::before {
  content: '推荐';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-gold);
  color: #1C1A18;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 100px;
}

/* 定价标题 */
.pricing-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

/* 价格数字 */
.pricing-amount {
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--accent-gold);
  font-family: var(--font-en);
  line-height: 1;
  display: flex;
  align-items: flex-start;
  gap: 2px;
}

.pricing-amount sup {
  font-size: 1.2rem;
  vertical-align: top;
  margin-top: 12px;
  font-weight: 500;
}

.pricing-period {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
  margin-bottom: 24px;
}

/* 功能列表 */
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  text-align: left;
}

.pricing-features li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-default);
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-features li:last-child {
  border-bottom: none;
}

.pricing-features li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent-gold);
  border-radius: 50%;
  flex-shrink: 0;
}

.pricing-features li.disabled {
  opacity: 0.4;
  text-decoration: line-through;
}

.pricing-features li.disabled::before {
  background: var(--text-muted);
}

/* 定价分隔线 */
.pricing-divider {
  border: none;
  border-top: 1px solid var(--border-default);
  margin: 24px 0;
}


/* ==========================================================================
   第14章：Footer
   ========================================================================== */

.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-default);
  padding: 60px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto 48px;
  padding: 0 24px;
}

/* Footer 品牌 */
.footer-brand .logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-brand .logo-mark {
  width: 32px;
  height: 32px;
  background: var(--accent-gold);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #1C1A18;
  margin-right: 10px;
  vertical-align: middle;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-top: 12px;
  max-width: 280px;
}

/* Footer 社交链接 */
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.footer-social-link {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: all 0.2s;
  text-decoration: none;
}

.footer-social-link:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

/* Footer 导航列 */
.footer-col-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: var(--text-primary);
}

/* Footer 底部 */
.footer-bottom {
  border-top: 1px solid var(--border-default);
  padding: 24px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  color: var(--text-muted);
  font-size: 0.82rem;
  transition: color 0.2s;
  text-decoration: none;
}

.footer-bottom-links a:hover {
  color: var(--text-secondary);
}

/* 响应式 */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}


/* ==========================================================================
   第15章：滚动动画系统
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 延迟变体 */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* 方向变体 */
.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* ==========================================================================
   第16章：AI顾问页（advisor.html）专用样式
   ========================================================================== */

.advisor-page {
  background: var(--bg-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 64px;
}

/* --- 顾问页子头部 --- */
.advisor-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-default);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.advisor-back {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.advisor-back:hover {
  color: var(--text-primary);
}

.advisor-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.advisor-actions {
  display: flex;
  gap: 8px;
}

/* --- Tab 导航 --- */
.advisor-tabs {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-default);
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 24px;
  flex-shrink: 0;
}

.advisor-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  flex-shrink: 0;
  padding: 0 20px;
  height: 48px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: inherit;
}

.tab-btn.active {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}

.tab-btn:hover {
  color: var(--text-primary);
}

/* --- Tab 面板 --- */
.tab-panels {
  flex: 1;
  overflow-y: auto;
}

.tab-panel {
  display: none;
  padding: 24px;
}

.tab-panel.active {
  display: block;
}

/* --- 聊天界面 --- */
.chat-container {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 16px;
}

.chat-message {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.chat-message.user {
  flex-direction: row-reverse;
}

/* 聊天头像 */
.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
}

.chat-message.ai .chat-avatar {
  background: rgba(196, 168, 130, 0.15);
  color: var(--accent-gold);
  border: 1px solid var(--border-default);
}

.chat-message.user .chat-avatar {
  background: var(--accent-gold);
  color: #1C1A18;
}

/* 聊天内容 */
.chat-content {
  max-width: 75%;
}

.chat-bubble-inner {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.7;
  word-break: break-word;
}

.chat-message.ai .chat-bubble-inner {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  border-radius: 0 12px 12px 12px;
}

.chat-message.user .chat-bubble-inner {
  background: var(--accent-gold);
  color: #1C1A18;
  border-radius: 12px 0 12px 12px;
}

/* 时间戳 */
.chat-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

.chat-message.user .chat-time {
  text-align: right;
}

/* --- 快捷按钮 --- */
.quick-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 0;
}

.quick-btn {
  padding: 7px 14px;
  border-radius: 100px;
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}

.quick-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: rgba(196, 168, 130, 0.06);
}

/* --- 聊天输入区 --- */
.chat-input-area {
  border-top: 1px solid var(--border-default);
  padding: 16px 0;
  background: var(--bg-primary);
  flex-shrink: 0;
}

.chat-input-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.9rem;
  color: var(--text-primary);
  resize: none;
  min-height: 46px;
  max-height: 120px;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
  line-height: 1.5;
}

.chat-input:focus {
  border-color: var(--border-focus);
}

.chat-input::placeholder {
  color: var(--text-muted);
}

.chat-send {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--accent-gold);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  color: #1C1A18;
}

.chat-send:hover {
  background: var(--accent-gold-light);
  transform: translateY(-1px);
}

.chat-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* --- 仪表盘网格 --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .dashboard-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 数据指标卡片 */
.metric-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color 0.2s;
}

.metric-card:hover {
  border-color: var(--border-hover);
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}

.metric-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-en);
  display: block;
  line-height: 1;
}

.metric-change {
  font-size: 0.78rem;
  margin-top: 6px;
  display: block;
}

.metric-change.up   { color: var(--color-success); }
.metric-change.down { color: var(--color-danger); }
.metric-change.flat { color: var(--text-muted); }

/* --- 进度条 --- */
.progress-bar {
  background: var(--bg-tertiary);
  border-radius: 100px;
  height: 8px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  background: var(--accent-gold);
  border-radius: 100px;
  transition: width 0.6s ease;
  min-width: 4px;
}

.progress-fill.success { background: var(--color-success); }
.progress-fill.danger  { background: var(--color-danger); }
.progress-fill.info    { background: var(--color-info); }

.progress-thin {
  height: 4px;
}

/* --- 财务报告卡片 --- */
.report-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.report-header {
  background: var(--bg-tertiary);
  padding: 28px;
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  gap: 20px;
}

.report-score-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 3px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.report-score-num {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-gold);
  font-family: var(--font-en);
  line-height: 1;
}

.report-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.report-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.report-body {
  padding: 24px;
}

.report-section {
  margin-bottom: 20px;
}

.report-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-gold);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.insight-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.insight-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-gold);
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
}

.insight-dot.success { background: var(--color-success); }
.insight-dot.danger  { background: var(--color-danger); }
.insight-dot.warning { background: var(--color-warning); }

/* --- 打卡挑战模块 --- */
.challenge-grid {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 4px;
  margin: 16px 0;
}

.challenge-week {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  cursor: pointer;
  transition: all 0.15s;
}

.challenge-week.done {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
}

.challenge-week.today {
  border-color: var(--accent-gold-light);
  box-shadow: 0 0 0 2px rgba(196, 168, 130, 0.3);
}

.challenge-week:hover {
  border-color: var(--border-hover);
}

/* --- 消费拦截模块 --- */
.intercept-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.intercept-toggle-info {
  flex: 1;
}

.intercept-toggle-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.intercept-toggle-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* 开关样式 */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-tertiary);
  border-radius: 24px;
  transition: 0.3s;
  border: 1px solid var(--border-default);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: #1C1A18;
}

.toggle-switch input:focus-visible + .toggle-slider {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

/* --- 社区模块 --- */
.community-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.comm-tab {
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.comm-tab.active,
.comm-tab:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: rgba(196, 168, 130, 0.08);
}

/* 帖子卡片 */
.post-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
  cursor: pointer;
}

.post-card:hover {
  border-color: var(--border-hover);
}

.post-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.post-excerpt {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.post-meta {
  display: flex;
  gap: 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

/* --- 设置模态框 --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-overlay.hidden {
  display: none;
}

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.modal-close:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.modal-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* 表单元素 */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.form-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: border-color 0.2s;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}

.form-input:focus {
  border-color: var(--border-focus);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-size: 0.9rem;
  color: var(--text-primary);
  transition: border-color 0.2s;
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
  appearance: none;
  cursor: pointer;
}

.form-select:focus {
  border-color: var(--border-focus);
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
  display: block;
}

.form-error {
  font-size: 0.78rem;
  color: var(--color-danger);
  margin-top: 6px;
  display: block;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}


/* ==========================================================================
   第17章：凯利公式页（kelly.html）专用样式
   ========================================================================== */

.kelly-page {
  background: var(--bg-primary);
  min-height: 100vh;
  padding-top: 64px;
}

/* --- Kelly Hero --- */
.kelly-hero {
  padding: 80px 24px;
  text-align: center;
  border-bottom: 1px solid var(--border-default);
}

.kelly-hero-title {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.kelly-hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* --- 凯利公式展示 --- */
.kelly-formula {
  display: inline-block;
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 20px 40px;
  margin: 32px auto;
  font-size: 1.3rem;
  color: var(--text-primary);
  font-family: var(--font-en);
  letter-spacing: 0.05em;
}

.kelly-formula .var {
  color: var(--accent-gold);
  font-weight: 600;
}

/* --- 规则卡片网格 --- */
.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.rule-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.3s;
}

.rule-card:hover {
  border-color: var(--border-hover);
}

/* 规则徽章 */
.rule-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.rule-badge.red {
  background: rgba(196, 123, 106, 0.15);
  color: var(--color-danger);
  border: 1px solid rgba(196, 123, 106, 0.3);
}

.rule-badge.amber {
  background: rgba(196, 160, 106, 0.15);
  color: var(--color-warning);
  border: 1px solid rgba(196, 160, 106, 0.3);
}

.rule-badge.green {
  background: rgba(107, 158, 122, 0.15);
  color: var(--color-success);
  border: 1px solid rgba(107, 158, 122, 0.3);
}

.rule-badge.blue {
  background: rgba(122, 149, 168, 0.15);
  color: var(--color-info);
  border: 1px solid rgba(122, 149, 168, 0.3);
}

.rule-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.rule-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Kelly 计算器 --- */
.kelly-calculator {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

.calc-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 36px;
}

.calc-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.calc-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.calc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

/* Range 输入 */
.range-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.range-input {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--accent-gold);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s;
  border: none;
}

.range-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.range-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--accent-gold);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.range-value {
  min-width: 48px;
  text-align: right;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-gold);
  font-family: var(--font-en);
}

/* --- 仪表盘 (Gauge) --- */
.gauge-wrap {
  text-align: center;
  padding: 24px 0;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  margin-top: 8px;
}

.gauge-svg {
  max-width: 220px;
  margin: 0 auto;
}

.gauge-value {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent-gold);
  font-family: var(--font-en);
  display: block;
  line-height: 1;
}

.gauge-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

/* 结果网格 */
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.result-item {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  border: 1px solid var(--border-default);
}

.result-item-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}

.result-item-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-en);
  display: block;
}

/* 响应式 */
@media (max-width: 768px) {
  .rules-grid {
    grid-template-columns: 1fr;
  }

  .calc-row {
    grid-template-columns: 1fr;
  }

  .kelly-hero-title {
    font-size: 2rem;
  }

  .kelly-formula {
    font-size: 1rem;
    padding: 16px 24px;
  }
}


/* ==========================================================================
   第18章：移动端 PWA 专用样式
   ========================================================================== */

.mobile-page {
  background: var(--bg-primary);
  min-height: 100vh;
  padding-bottom: 70px;
}

/* 移动端顶栏 */
.mobile-header {
  padding: 20px 20px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: max(20px, env(safe-area-inset-top));
}

.mobile-header-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.mobile-header-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 移动端底部 Tab Bar */
.mobile-tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-default);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 100;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.m-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 0;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  text-decoration: none;
  transition: all 0.2s;
}

.m-tab-icon {
  font-size: 20px;
  line-height: 1;
  transition: transform 0.2s;
}

.m-tab-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.m-tab.active .m-tab-label {
  color: var(--accent-gold);
}

.m-tab.active .m-tab-icon {
  transform: translateY(-1px);
}

/* 移动端内容区 */
.mobile-content {
  padding: 16px 20px;
}

/* 移动端分区 */
.mobile-section {
  margin-bottom: 24px;
}

.mobile-section-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  padding: 0 4px;
}

/* 移动端列表项 */
.mobile-list-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
  transition: border-color 0.2s;
  cursor: pointer;
  text-decoration: none;
}

.mobile-list-item:hover {
  border-color: var(--border-hover);
}

.mobile-list-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(196, 168, 130, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.mobile-list-info {
  flex: 1;
  min-width: 0;
}

.mobile-list-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-list-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.mobile-list-arrow {
  color: var(--text-muted);
  font-size: 0.75rem;
  flex-shrink: 0;
}


/* ==========================================================================
   第19章：Toast 通知
   ========================================================================== */

.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.88rem;
  color: var(--text-primary);
  min-width: 240px;
  max-width: 360px;
  transform: translateX(calc(100% + 24px));
  transition: transform 0.3s ease;
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: var(--shadow-md);
}

.toast.show {
  transform: translateX(0);
}

.toast.success { border-color: var(--color-success); }
.toast.error   { border-color: var(--color-danger); }
.toast.warning { border-color: var(--color-warning); }
.toast.info    { border-color: var(--color-info); }

.toast-icon {
  font-size: 1rem;
  flex-shrink: 0;
  line-height: 1.4;
}

.toast.success .toast-icon { color: var(--color-success); }
.toast.error .toast-icon   { color: var(--color-danger); }
.toast.warning .toast-icon { color: var(--color-warning); }
.toast.info .toast-icon    { color: var(--color-info); }

.toast-body {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  margin-bottom: 2px;
}

.toast-msg {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* 移动端 Toast 位置调整 */
@media (max-width: 480px) {
  .toast-container {
    top: auto;
    bottom: 80px;
    left: 16px;
    right: 16px;
  }

  .toast {
    min-width: unset;
    max-width: 100%;
    transform: translateY(calc(100% + 16px));
  }

  .toast.show {
    transform: translateY(0);
  }
}


/* ==========================================================================
   第20章：通用工具类
   ========================================================================== */

/* --- 显隐 --- */
.hidden         { display: none !important; }
.invisible      { visibility: hidden; }
.opacity-0      { opacity: 0; }
.opacity-50     { opacity: 0.5; }
.opacity-75     { opacity: 0.75; }

/* --- 间距工具类 --- */
.mt-0  { margin-top: 0; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }

.mb-0  { margin-bottom: 0; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-0  { padding: 0; }
.p-8  { padding: 8px; }
.p-12 { padding: 12px; }
.p-16 { padding: 16px; }
.p-20 { padding: 20px; }
.p-24 { padding: 24px; }

/* --- 分隔线 --- */
.divider {
  border: none;
  border-top: 1px solid var(--border-default);
  margin: 24px 0;
}

.divider-sm {
  margin: 12px 0;
}

.divider-lg {
  margin: 40px 0;
}

/* --- 标签（Tag / Badge） --- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.78rem;
  border: 1px solid currentColor;
  line-height: 1;
}

.tag-gold    { color: var(--accent-gold);    background: rgba(196, 168, 130, 0.08); }
.tag-success { color: var(--color-success);  background: rgba(107, 158, 122, 0.08); }
.tag-danger  { color: var(--color-danger);   background: rgba(196, 123, 106, 0.08); }
.tag-warning { color: var(--color-warning);  background: rgba(196, 160, 106, 0.08); }
.tag-info    { color: var(--color-info);     background: rgba(122, 149, 168, 0.08); }
.tag-muted   { color: var(--text-muted);     background: rgba(92, 79, 66, 0.15); border-color: var(--text-muted); }

/* --- 空状态 --- */
.empty-state {
  text-align: center;
  padding: 64px 24px;
}

.empty-state-icon {
  font-size: 2.5rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.empty-state-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- 骨架屏加载 --- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.skeleton-text {
  height: 1em;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.skeleton-title {
  height: 1.5em;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

/* --- 加载动画 --- */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-default);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

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

/* --- 截断文本 --- */
.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- 无障碍 --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- 全局打印样式 --- */
@media print {
  .navbar,
  .mobile-tabbar,
  .toast-container,
  .modal-overlay,
  .scroll-hint {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .card,
  .feature-card,
  .story-card,
  .pricing-card {
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}


/* ==========================================================================
   第21章：全局响应式修补
   ========================================================================== */

@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }

  .container {
    padding: 0 16px;
  }

  .pricing-card-wrap {
    flex-direction: column;
    align-items: center;
  }

  .pricing-card {
    max-width: 100%;
    min-width: unset;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .challenge-grid {
    grid-template-columns: repeat(7, 1fr);
  }

  .modal-box {
    padding: 24px;
  }

  .calc-card {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }

  .hero-title {
    font-size: 1.9rem;
  }

  .hero-stats {
    gap: 20px;
    margin-top: 40px;
    padding-top: 32px;
  }

  .btn-lg {
    padding: 12px 24px;
    font-size: 0.95rem;
  }

  .features-grid,
  .stories-grid {
    padding: 0 16px;
  }

  .demo-container {
    padding: 0 16px;
  }

  .stories-grid {
    gap: 12px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
  }
}

/* 大屏适配 */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }

  .hero-title {
    font-size: 4rem;
  }
}

/* ==========================================================================
   End of 钱醒Pro style.css
   ========================================================================== */

/* ==========================================================================
   v2.1 统一修复补丁 — 解决全站 class 名不匹配、响应式缺失、新组件
   ========================================================================== */

/* --- 导航栏 class 名修复（CSS 用 .nav-hamburger，HTML 用 .hamburger） --- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  margin-left: 16px;
  flex-shrink: 0;
}
.hamburger span {
  width: 22px; height: 1.5px;
  background: var(--text-secondary);
  transition: all 0.25s; display: block;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* --- navbar-inner 替代 .navbar .container --- */
.navbar-inner {
  display: flex; align-items: center;
  width: 100%; max-width: 1200px; margin: 0 auto;
}

/* --- nav-logo-icon 替代 .nav-logo .logo-mark --- */
.nav-logo-icon {
  width: 32px; height: 32px;
  background: var(--accent-gold);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
  color: var(--text-inverse);
  flex-shrink: 0;
}

/* --- nav-btn 替代 .nav-cta --- */
.nav-btn {
  padding: 9px 20px; border-radius: var(--radius-md);
  font-size: 0.9rem; font-weight: 600;
  text-decoration: none; transition: all 0.2s;
  white-space: nowrap; flex-shrink: 0; cursor: pointer;
  border: none; font-family: inherit;
}
.nav-btn-primary {
  background: var(--accent-gold);
  color: var(--text-inverse);
}
.nav-btn-primary:hover {
  background: var(--accent-gold-light);
  transform: translateY(-1px);
}
.nav-btn-outline {
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
}
.nav-btn-outline:hover {
  border-color: var(--accent-gold);
  color: var(--text-primary);
}

/* --- 移动菜单 --- */
.mobile-menu {
  display: none;
  position: fixed; top: var(--navbar-height); left: 0; right: 0;
  background: rgba(28, 26, 24, 0.98);
  backdrop-filter: blur(20px);
  flex-direction: column; align-items: flex-start;
  padding: 16px 24px 24px;
  border-bottom: 1px solid var(--border-default);
  z-index: 999; max-height: calc(100vh - var(--navbar-height));
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu .nav-link {
  width: 100%; padding: 14px 0;
  color: var(--text-secondary); text-decoration: none;
  font-size: 0.95rem; border-bottom: 1px solid var(--border-subtle);
  transition: color 0.2s;
}
.mobile-menu .nav-link:hover,
.mobile-menu .nav-link.active { color: var(--accent-gold); }
.mobile-menu-divider {
  width: 100%; height: 1px;
  background: var(--border-subtle);
  margin: 8px 0;
}

/* --- 移动端导航触发 --- */
@media (max-width: 768px) {
  .nav-links { display: none !important; }
  .nav-btn-primary { display: none; }
  .hamburger { display: flex; }
  .nav-logo { margin-right: auto; }
}

/* --- 标准卡片样式统一 --- */
.card-standard {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: var(--card-radius);
  padding: 24px;
  transition: all var(--transition-normal);
  box-shadow: var(--card-shadow);
}
.card-standard:hover {
  border-color: var(--accent-gold-border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* --- 文章正文排版标准化 --- */
.article-body {
  line-height: var(--line-height-article);
  font-size: 1rem;
  color: var(--text-primary);
}
.article-body p {
  margin-bottom: var(--paragraph-spacing);
}
.article-body h2 {
  font-size: 1.4rem; font-weight: 600;
  margin-top: 48px; margin-bottom: 20px;
  color: var(--text-primary);
}
.article-body h3 {
  font-size: 1.15rem; font-weight: 600;
  margin-top: 36px; margin-bottom: 16px;
}
.article-body blockquote {
  border-left: 3px solid var(--accent-gold);
  padding: 12px 20px; margin: 24px 0;
  background: var(--accent-gold-glow);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-secondary);
}

/* --- 日间/深色模式切换按钮 --- */
.theme-toggle {
  position: fixed; top: 14px; right: 140px;
  width: 36px; height: 36px;
  border-radius: 50%; border: 1px solid var(--border-default);
  background: var(--bg-secondary); color: var(--text-secondary);
  cursor: pointer; font-size: 16px; z-index: 1001;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-fast);
}
.theme-toggle:hover { border-color: var(--accent-gold); color: var(--accent-gold); }
@media (max-width: 768px) { .theme-toggle { right: 60px; } }

/* 日间模式 body class */
body.light-mode {
  --bg-primary: #F5F3F0;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #EAE7E2;
  --bg-input: #F0EDE8;
  --text-primary: #2C2825;
  --text-secondary: #6B5F52;
  --text-muted: #9A8E80;
  --border-default: #D5CFC6;
  --border-hover: #B5ABA0;
  --border-subtle: rgba(213, 207, 198, 0.5);
  --border-card: rgba(213, 207, 198, 0.6);
  --accent-gold-glow: rgba(196, 168, 130, 0.08);
}
body.light-mode .navbar { background: rgba(255, 255, 255, 0.85); }
body.light-mode .navbar.scrolled { background: rgba(255, 255, 255, 0.95); }
body.light-mode .mobile-menu { background: rgba(255, 255, 255, 0.98); }

/* --- 文章页 上一篇/下一篇 导航 --- */
.article-nav {
  display: flex; justify-content: space-between;
  gap: 16px; margin-top: 48px; padding-top: 32px;
  border-top: 1px solid var(--border-default);
}
.article-nav-item {
  flex: 1; padding: 20px 24px;
  background: var(--bg-secondary); border: 1px solid var(--border-card);
  border-radius: var(--radius-lg); text-decoration: none;
  transition: all var(--transition-normal);
}
.article-nav-item:hover {
  border-color: var(--accent-gold-border);
  transform: translateY(-1px);
}
.article-nav-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; }
.article-nav-title { font-size: 0.9rem; color: var(--text-primary); line-height: 1.5; }
.article-nav-item.next { text-align: right; }

/* --- 文章中段社区引导 --- */
.community-cta-inline {
  margin: 40px 0; padding: 24px 28px;
  background: var(--accent-gold-glow);
  border: 1px solid var(--accent-gold-border);
  border-radius: var(--radius-lg);
  text-align: center;
}
.community-cta-inline p { color: var(--text-secondary); margin-bottom: 12px; font-size: 0.9rem; }
.community-cta-inline a {
  display: inline-block; padding: 8px 24px;
  background: var(--accent-gold); color: var(--text-inverse);
  border-radius: var(--radius-md); text-decoration: none;
  font-size: 0.85rem; font-weight: 600;
  transition: all var(--transition-fast);
}
.community-cta-inline a:hover { background: var(--accent-gold-light); }

/* --- 文章点赞评论快捷按钮 --- */
.article-actions {
  display: flex; gap: 12px; margin-top: 32px;
  padding-top: 24px; border-top: 1px solid var(--border-default);
}
.article-action-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-full);
  border: 1px solid var(--border-default);
  background: var(--bg-secondary); color: var(--text-secondary);
  cursor: pointer; font-size: 0.85rem; font-family: inherit;
  transition: all var(--transition-fast);
}
.article-action-btn:hover { border-color: var(--accent-gold); color: var(--accent-gold); }
.article-action-btn.liked { color: var(--color-danger); border-color: var(--color-danger); }

/* --- 社区分类筛选栏 --- */
.community-filters {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 24px; padding: 16px 20px;
  background: var(--bg-secondary); border-radius: var(--radius-lg);
  border: 1px solid var(--border-card);
}
.filter-chip {
  padding: 8px 18px; border-radius: var(--radius-full);
  border: 1px solid var(--border-default);
  background: transparent; color: var(--text-secondary);
  font-size: 0.85rem; cursor: pointer; font-family: inherit;
  transition: all var(--transition-fast);
}
.filter-chip:hover { border-color: var(--accent-gold); color: var(--text-primary); }
.filter-chip.active {
  background: var(--accent-gold); color: var(--text-inverse);
  border-color: var(--accent-gold); font-weight: 600;
}

/* --- 社区发布帖子浮动按钮 --- */
.fab-post {
  position: fixed; bottom: 80px; right: 24px;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent-gold); color: var(--text-inverse);
  border: none; cursor: pointer; font-size: 24px;
  box-shadow: var(--shadow-md); z-index: 50;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-normal);
}
.fab-post:hover { transform: scale(1.08); box-shadow: var(--shadow-lg); }
@media (max-width: 768px) { .fab-post { bottom: 70px; right: 16px; } }

/* --- 评论区分页 --- */
.comment-pagination {
  display: flex; gap: 8px; justify-content: center;
  margin-top: 24px;
}
.comment-page-btn {
  padding: 6px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-secondary); color: var(--text-secondary);
  cursor: pointer; font-size: 0.8rem; font-family: inherit;
  transition: all var(--transition-fast);
}
.comment-page-btn:hover { border-color: var(--accent-gold); color: var(--text-primary); }
.comment-page-btn.active { background: var(--accent-gold); color: var(--text-inverse); border-color: var(--accent-gold); }
.comment-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* --- 评论输入框 + 快捷表情 --- */
.comment-input-area {
  background: var(--bg-secondary); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 16px; margin-bottom: 24px;
}
.comment-input-area textarea {
  width: 100%; min-height: 80px; resize: vertical;
  background: var(--bg-input); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); padding: 12px 16px;
  color: var(--text-primary); font-family: inherit; font-size: 0.9rem;
  line-height: 1.6; outline: none;
  transition: border-color var(--transition-fast);
}
.comment-input-area textarea:focus { border-color: var(--accent-gold); }
.comment-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px;
}
.emoji-quick {
  display: flex; gap: 6px;
}
.emoji-quick span {
  cursor: pointer; font-size: 1.1rem; padding: 2px 4px;
  border-radius: 4px; transition: background 0.15s;
}
.emoji-quick span:hover { background: var(--bg-tertiary); }

/* --- 帖子卡片统一布局 --- */
.post-card {
  background: var(--bg-secondary); border: 1px solid var(--border-card);
  border-radius: var(--card-radius); padding: 20px 24px;
  transition: all var(--transition-normal); cursor: pointer;
}
.post-card:hover { border-color: var(--accent-gold-border); transform: translateY(-1px); }
.post-card-meta {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px; font-size: 0.8rem; color: var(--text-muted);
}
.post-card-author { color: var(--text-secondary); font-weight: 500; }
.post-card-tag {
  padding: 2px 10px; border-radius: var(--radius-full);
  background: var(--accent-gold-glow); color: var(--accent-gold);
  font-size: 0.72rem; font-weight: 500;
}
.post-card-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; line-height: 1.5; }
.post-card-excerpt { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 12px; }
.post-card-stats { display: flex; gap: 16px; font-size: 0.78rem; color: var(--text-muted); }

/* --- 搜索结果高亮 --- */
.search-result-item {
  padding: 16px 20px; border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-fast);
}
.search-result-item:hover { background: var(--bg-tertiary); }
.search-result-item:last-child { border-bottom: none; }
.search-highlight { color: var(--accent-gold); font-weight: 600; }
.search-empty { text-align: center; padding: 48px 20px; color: var(--text-muted); }

/* --- 知识库卡片 --- */
.knowledge-card {
  display: block; text-decoration: none;
  background: var(--bg-secondary); border: 1px solid var(--border-card);
  border-radius: var(--card-radius); padding: 24px;
  transition: all var(--transition-normal);
}
.knowledge-card:hover { border-color: var(--accent-gold-border); transform: translateY(-2px); }
.knowledge-card-icon { font-size: 1.5rem; margin-bottom: 12px; }
.knowledge-card-title { font-size: 1rem; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.knowledge-card-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }
.knowledge-card-meta { display: flex; gap: 12px; margin-top: 12px; font-size: 0.75rem; color: var(--text-muted); }

/* --- 会员中心侧边栏 --- */
.member-sidebar {
  display: flex; flex-direction: column; gap: 4px;
}
.member-menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: var(--radius-md);
  color: var(--text-secondary); cursor: pointer;
  font-size: 0.9rem; transition: all var(--transition-fast);
  border: none; background: transparent; font-family: inherit;
  text-align: left; width: 100%;
}
.member-menu-item:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.member-menu-item.active {
  background: var(--accent-gold-glow); color: var(--accent-gold);
  font-weight: 600; border-left: 3px solid var(--accent-gold);
}
.member-panel { display: none; }
.member-panel.active { display: block; }

/* --- 会员中心统计卡片 --- */
.stat-card {
  background: var(--bg-secondary); border: 1px solid var(--border-card);
  border-radius: var(--card-radius); padding: 20px 24px;
  text-align: center;
}
.stat-card-value { font-size: 2rem; font-weight: 700; color: var(--accent-gold); margin-bottom: 4px; }
.stat-card-label { font-size: 0.8rem; color: var(--text-muted); }

/* --- 发帖编辑器 --- */
.post-editor {
  background: var(--bg-secondary); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: 24px;
}
.post-editor input,
.post-editor textarea,
.post-editor select {
  width: 100%; background: var(--bg-input);
  border: 1px solid var(--border-default); border-radius: var(--radius-md);
  padding: 12px 16px; color: var(--text-primary);
  font-family: inherit; font-size: 0.9rem; outline: none;
  transition: border-color var(--transition-fast);
}
.post-editor input:focus,
.post-editor textarea:focus,
.post-editor select:focus { border-color: var(--accent-gold); }
.post-editor label { display: block; font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 6px; margin-top: 16px; }
.post-editor label:first-child { margin-top: 0; }
.post-editor textarea { min-height: 200px; resize: vertical; line-height: 1.7; }

/* --- 温和弹窗（下滑30%后触发） --- */
.soft-popup {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--bg-secondary); border: 1px solid var(--accent-gold-border);
  border-radius: var(--radius-xl); padding: 20px 28px;
  box-shadow: var(--shadow-lg); z-index: 500;
  display: flex; align-items: center; gap: 16px;
  max-width: 520px; opacity: 0;
  transition: all var(--transition-slow); pointer-events: none;
}
.soft-popup.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.soft-popup-text { flex: 1; font-size: 0.875rem; color: var(--text-secondary); line-height: 1.5; }
.soft-popup-text strong { color: var(--text-primary); display: block; margin-bottom: 4px; }
.soft-popup-close {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border-default); background: transparent;
  color: var(--text-muted); cursor: pointer; font-size: 14px;
  flex-shrink: 0; transition: all var(--transition-fast);
}
.soft-popup-close:hover { border-color: var(--color-danger); color: var(--color-danger); }

/* --- 首页分区小标题 --- */
.section-heading {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
}
.section-heading-line { flex: 1; height: 1px; background: var(--border-subtle); }
.section-heading h2 { font-size: 1.3rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.section-heading .heading-link { font-size: 0.8rem; color: var(--accent-gold); text-decoration: none; white-space: nowrap; }

/* --- 响应式修复：会员中心两栏布局 --- */
@media (max-width: 768px) {
  .member-layout { grid-template-columns: 1fr !important; }
  .member-sidebar { flex-direction: row; overflow-x: auto; gap: 8px; margin-bottom: 16px; }
  .member-menu-item { white-space: nowrap; padding: 10px 16px; }
  .member-menu-item.active { border-left: none; border-bottom: 3px solid var(--accent-gold); }
}

/* --- 响应式修复：顾问页面网格 --- */
@media (max-width: 768px) {
  .advisor-stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .advisor-secondary-grid { grid-template-columns: 1fr !important; }
  .advisor-challenge-stats { grid-template-columns: 1fr !important; }
  .advisor-wish-add { grid-template-columns: 1fr !important; }
  .advisor-tab-bar { overflow-x: auto; gap: 4px !important; }
  .advisor-tab-btn { white-space: nowrap; padding: 8px 14px !important; font-size: 0.8rem !important; }
}

/* --- 响应式修复：社区帖子网格 --- */
@media (max-width: 768px) {
  .community-posts-grid { grid-template-columns: 1fr !important; }
  .community-filters { overflow-x: auto; flex-wrap: nowrap; }
  .filter-chip { white-space: nowrap; }
}

/* --- 响应式修复：知识库卡片 --- */
@media (max-width: 768px) {
  .knowledge-grid { grid-template-columns: 1fr !important; }
}

/* --- 响应式修复：文章导航 --- */
@media (max-width: 768px) {
  .article-nav { flex-direction: column; }
  .article-nav-item.next { text-align: left; }
}

/* --- 标准化 Footer --- */
.footer-standard {
  background: var(--bg-secondary); border-top: 1px solid var(--border-default);
  padding: 60px 0 32px; margin-top: 80px;
}
.footer-standard-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; max-width: 1200px; margin: 0 auto; padding: 0 24px;
}
.footer-standard-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-standard-brand .nav-logo-icon { width: 36px; height: 36px; font-size: 18px; }
.footer-standard-brand span { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.footer-standard-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.7; }
.footer-standard-col h4 { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-standard-col a { display: block; font-size: 0.85rem; color: var(--text-secondary); text-decoration: none; padding: 5px 0; transition: color var(--transition-fast); }
.footer-standard-col a:hover { color: var(--accent-gold); }
.footer-standard-bottom {
  max-width: 1200px; margin: 40px auto 0; padding: 20px 24px 0;
  border-top: 1px solid var(--border-default);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.8rem; color: var(--text-muted);
}
.footer-standard-bottom a { color: var(--text-muted); text-decoration: none; transition: color var(--transition-fast); }
.footer-standard-bottom a:hover { color: var(--accent-gold); }
@media (max-width: 768px) {
  .footer-standard-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-standard-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* --- Toast 容器定位修复 --- */
.toast-container {
  position: fixed; top: 80px; right: 24px; z-index: 600;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--bg-secondary); border: 1px solid var(--border-default);
  border-left: 3px solid var(--accent-gold);
  border-radius: var(--radius-md); padding: 12px 20px;
  color: var(--text-primary); font-size: 0.875rem;
  box-shadow: var(--shadow-md); max-width: 360px;
  pointer-events: auto; transition: all 0.3s ease-out;
}
.toast.toast-success { border-left-color: var(--color-success); }
.toast.toast-error { border-left-color: var(--color-danger); }
.toast.toast-warning { border-left-color: var(--color-warning); }

/* --- 模态框修复 --- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 500;
  background: var(--bg-overlay); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal-box {
  background: var(--bg-secondary); border: 1px solid var(--border-default);
  border-radius: var(--radius-xl); padding: 32px;
  max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-xl);
}

/* --- 输入框统一 --- */
.input-standard {
  width: 100%; background: var(--bg-input);
  border: 1px solid var(--border-default); border-radius: var(--radius-md);
  padding: 12px 16px; color: var(--text-primary);
  font-family: inherit; font-size: 0.9rem; outline: none;
  transition: border-color var(--transition-fast);
}
.input-standard:focus { border-color: var(--accent-gold); }
.input-standard::placeholder { color: var(--text-muted); }

/* --- 按钮统一 --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 24px; border-radius: var(--radius-md);
  font-size: 0.9rem; font-weight: 600; font-family: inherit;
  text-decoration: none; cursor: pointer; border: none;
  transition: all var(--transition-fast); white-space: nowrap;
}
.btn-primary { background: var(--accent-gold); color: var(--text-inverse); }
.btn-primary:hover { background: var(--accent-gold-light); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1px solid var(--border-default); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--accent-gold); color: var(--text-primary); }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-sm { padding: 6px 16px; font-size: 0.8rem; }

/* --- 分页统一 --- */
.pagination {
  display: flex; gap: 6px; justify-content: center; align-items: center;
  margin-top: 32px;
}
.pagination button {
  padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-default); background: var(--bg-secondary);
  color: var(--text-secondary); cursor: pointer; font-size: 0.85rem;
  font-family: inherit; transition: all var(--transition-fast);
}
.pagination button:hover { border-color: var(--accent-gold); color: var(--text-primary); }
.pagination button.active { background: var(--accent-gold); color: var(--text-inverse); border-color: var(--accent-gold); }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* --- 滚动渐显动画 --- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s, transform 0.6s; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* --- 移动端文字溢出修复 --- */
@media (max-width: 768px) {
  body { font-size: 14px; }
  h1 { font-size: 1.75rem !important; }
  h2 { font-size: 1.4rem !important; }
  .hero-title { font-size: 2rem !important; }
  .hero-subtitle { font-size: 0.95rem !important; }
  img { max-width: 100%; height: auto; }
  .container { padding: 0 16px; }
  section { padding: 40px 0 !important; }
  .card-standard { padding: 16px; }
  .footer-standard-grid { padding: 0 16px; }
}

/* --- 内容管理面板（隐藏式管理入口） --- */
.admin-panel {
  display: none; position: fixed; top: 0; right: 0;
  width: 400px; height: 100vh; background: var(--bg-secondary);
  border-left: 1px solid var(--border-default); z-index: 600;
  padding: 24px; overflow-y: auto;
  box-shadow: var(--shadow-xl);
}
.admin-panel.open { display: block; }
.admin-panel h3 { font-size: 1rem; margin-bottom: 16px; color: var(--text-primary); }
.admin-panel textarea { width: 100%; min-height: 100px; background: var(--bg-input); border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: 10px; color: var(--text-primary); font-family: inherit; font-size: 0.85rem; resize: vertical; }
.admin-panel input { width: 100%; background: var(--bg-input); border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: 10px; color: var(--text-primary); font-family: inherit; font-size: 0.85rem; margin-bottom: 12px; }

/* ========== v2.2 文章页阅读增强组件 ========== */

/* 文章互动栏 */
.article-actions {
  display: flex; gap: 12px; align-items: center;
  padding: var(--sp-4) 0; border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.article-action-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 20px; border-radius: var(--radius-full);
  border: 1px solid var(--border-default); background: var(--bg-secondary);
  color: var(--text-secondary); cursor: pointer; font-size: 0.875rem;
  transition: var(--transition-base); font-family: inherit;
}
.article-action-btn:hover { border-color: var(--accent-gold); color: var(--accent-gold); }
.article-action-btn.active { border-color: var(--accent-gold); color: var(--accent-gold); background: rgba(196, 168, 130, 0.1); }
.article-action-btn .action-icon { font-size: 1.1rem; line-height: 1; }
.article-action-btn .action-count { font-size: 0.8rem; color: var(--text-muted); }
.article-action-btn.active .action-count { color: var(--accent-gold); }

/* 社区引流内联 */
.community-cta-inline {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-5); border-radius: var(--radius-lg);
  background: var(--bg-secondary); border: 1px solid var(--border-default);
}
.community-cta-inline .community-cta-icon {
  font-size: 2rem; color: var(--accent-gold); flex-shrink: 0;
}
.community-cta-inline .community-cta-text { flex: 1; }
.community-cta-inline .community-cta-text strong { color: var(--text-primary); font-size: 0.95rem; }
.community-cta-inline .community-cta-text p { color: var(--text-secondary); font-size: 0.85rem; margin: 4px 0 0; }
@media (max-width: 640px) {
  .community-cta-inline { flex-direction: column; text-align: center; gap: var(--sp-3); }
}

/* 评论列表 */
.comment-item {
  display: flex; gap: 12px; padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.comment-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-tertiary); color: var(--accent-gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: var(--weight-bold); flex-shrink: 0;
}
.comment-body { flex: 1; }
.comment-author { font-size: 0.85rem; font-weight: var(--weight-medium); color: var(--text-primary); }
.comment-time { font-size: 0.75rem; color: var(--text-muted); font-weight: normal; }
.comment-text { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; margin-top: 4px; }

/* 评论输入区 */
.comment-textarea {
  width: 100%; min-height: 60px; padding: 12px;
  background: var(--bg-input); border: 1px solid var(--border-default);
  border-radius: var(--radius-md); color: var(--text-primary);
  font-family: inherit; font-size: 0.875rem; resize: vertical;
}
.comment-textarea:focus { border-color: var(--accent-gold); outline: none; }
.comment-input-area {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px;
}
.emoji-quick { display: flex; gap: 8px; }
.emoji-quick span {
  cursor: pointer; font-size: 1.2rem; opacity: 0.7;
  transition: var(--transition-fast);
}
.emoji-quick span:hover { opacity: 1; transform: scale(1.2); }

/* 文章导航 */
.article-nav {
  display: flex; gap: var(--sp-4); justify-content: space-between;
}
.article-nav-item {
  flex: 1; padding: var(--sp-5); border-radius: var(--radius-lg);
  background: var(--bg-secondary); border: 1px solid var(--border-default);
  text-decoration: none; transition: var(--transition-base);
  cursor: pointer;
}
.article-nav-item:hover { border-color: var(--accent-gold); }
.article-nav-prev { text-align: left; }
.article-nav-next { text-align: right; }
.article-nav-label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; }
.article-nav-title { display: block; font-size: 0.875rem; color: var(--text-primary); }
@media (max-width: 640px) {
  .article-nav { flex-direction: column; gap: var(--sp-3); }
  .article-nav-next { text-align: left; }
}

/* 软弹窗 */
.soft-popup {
  position: fixed; bottom: 24px; right: 24px;
  width: 320px; max-width: calc(100vw - 48px);
  background: var(--bg-secondary); border: 1px solid var(--border-default);
  border-radius: var(--radius-lg); padding: var(--sp-5);
  box-shadow: var(--shadow-xl); z-index: 500;
  transform: translateY(120%); transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.soft-popup.show { transform: translateY(0); }
.soft-popup-close {
  position: absolute; top: 12px; right: 12px;
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 1.2rem; line-height: 1;
}
.soft-popup-close:hover { color: var(--text-primary); }
.soft-popup-title { font-size: 0.95rem; font-weight: var(--weight-bold); color: var(--text-primary); margin-bottom: 8px; }
.soft-popup-text { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 12px; }
.soft-popup-actions { display: flex; gap: 8px; }
.soft-popup-actions .btn { flex: 1; }
@media (max-width: 640px) {
  .soft-popup { bottom: 12px; right: 12px; left: 12px; width: auto; }
}

/* --- v3.0 AI对话加载动画 --- */
.chat-typing { display: flex; gap: 4px; align-items: center; padding: 4px 0; }
.typing-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted);
  animation: typingBounce 1.4s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-8px); opacity: 1; }
}

/* --- v3.0 会员菜单激活态补充 --- */
.member-menu-item.active { background: var(--accent-gold-glow); color: var(--accent-gold); font-weight: 600; }

/* --- v3.0 专栏分页按钮交互 --- */
.pagination .page-btn { cursor: pointer; }
.pagination .page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
