/* ============================================================
 * 47字体网 · 全站样式（HIG 规范版 v3）
 * 设计准则：清晰 / 遵从 / 深度 / 易用
 * 单位约定：1pt = 1px（标准密度）；所有尺寸按 pt 标注、按 px 实现
 * 组织：① 令牌 ② 基础 ③ 组件 ④ 页面 ⑤ 响应式与降级
 * ============================================================ */

/* ============================================================
 * ① 设计令牌 Tokens
 * ============================================================ */
:root {
  color-scheme: light dark;

  /* --- 间距：仅使用这套 4 的倍数增量 --- */
  --sp-1: 4px;    /* 4pt  */
  --sp-2: 8px;    /* 8pt  */
  --sp-3: 12px;   /* 12pt */
  --sp-4: 16px;   /* 16pt */
  --sp-5: 20px;   /* 20pt */
  --sp-6: 24px;   /* 24pt */
  --sp-8: 32px;   /* 32pt */

  /* --- 圆角：小控件 6pt / 卡片 12pt / 面板 16pt / 胶囊 --- */
  --r-control: 6px;
  --r-card: 12px;
  --r-panel: 16px;
  --r-pill: 999px;

  /* --- 字号层级：字号 / 行高 / 字重 --- */
  --t-large-title: 34px;
  --t-title: 28px;
  --t-title2: 20px;
  --t-headline: 17px;
  --t-body: 16px;
  --t-subhead: 14px;
  --t-caption: 12px;

  --lh-tight: 1.2;
  --lh-normal: 1.5;
  --lh-relaxed: 1.7;

  /* --- 字体：系统无衬线，尊重平台 --- */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
               "Microsoft YaHei", "Helvetica Neue", sans-serif;

  /* --- 浅色模式色彩（参照 iOS 系统色） --- */
  --bg: #F2F2F7;          /* 系统分组背景 */
  --card: #FFFFFF;        /* 卡片 / 次级背景 */
  --text: #1C1C1E;        /* 主文本 */
  --text-2: #6E6E73;      /* 次要文本 */
  --border: #E5E5EA;      /* 分隔线 */
  --fill: #E5E5EA;        /* 填充背景（未选中 chip） */
  --tint: #007AFF;        /* 系统蓝：唯一交互强调色 */
  --tint-hover: #0062CC;
  --success: #34C759;     /* 授权合格 */
  --warning: #FF9F0A;     /* 提示 */
  --danger: #FF3B30;      /* 错误 / 额度用完 */
  --success-bg: #E9F9EE;
  --warning-bg: #FFF6E5;
  --danger-bg: #FFEBE9;
  --nav-bg: rgba(255, 255, 255, .92);
  --shadow-1: 0 2px 8px rgba(0, 0, 0, .06);    /* 轻，仅分层 */
  --shadow-2: 0 4px 16px rgba(0, 0, 0, .10);   /* 浮层 */
  --focus: #007AFF;

  /* --- 动效：柔和弹簧质感，只做状态反馈 --- */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur: 160ms;

  /* --- 兼容旧模板残留变量（逐步淘汰） --- */
  --primary: var(--tint);
  --primary-2: var(--tint);
  --hot: var(--danger);
  --radius: var(--r-card);
  --shadow: var(--shadow-1);
}

/* --- 深色模式：iOS 系统深色色阶，不简单反色 --- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1C1C1E;
    --text: #FFFFFF;
    --text-2: #98989F;
    --border: #38383A;
    --fill: #2C2C2E;
    --tint: #0A84FF;
    --tint-hover: #409CFF;
    --success: #30D158;
    --warning: #FFD60A;
    --danger: #FF453A;
    --success-bg: #12331E;
    --warning-bg: #3A2C00;
    --danger-bg: #3A1512;
    --nav-bg: rgba(28, 28, 30, .92);
    --shadow-1: 0 2px 8px rgba(0, 0, 0, .30);
    --shadow-2: 0 4px 16px rgba(0, 0, 0, .50);
    --focus: #0A84FF;
  }
}

/* ============================================================
 * ② 基础 Base：reset + 排版 + 无障碍
 * ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--tint); text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* 统一焦点环：键盘可见，鼠标不打扰 */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--r-control);
}

/* 容器：安全区适配（灵动岛/刘海、底部指示条、横屏左右） */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: max(var(--sp-5), env(safe-area-inset-left));
  padding-right: max(var(--sp-5), env(safe-area-inset-right));
}

/* 高对比度模式 */
@media (prefers-contrast: more) {
  :root { --border: currentColor; --text-2: var(--text); }
  .font-card, .rec-card, .panel { border-width: 2px; }
}

/* ============================================================
 * ③ 组件 Components
 * ============================================================ */

/* ---------- 3.1 导航栏 ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}
.navbar .container {
  display: flex;
  align-items: center;
  height: 56px;              /* 56pt 导航高度 */
  gap: var(--sp-6);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--t-headline);
  font-weight: 700;
  color: var(--text);
  min-height: 44px;          /* 触控目标 44pt */
}
.logo-badge {
  width: 30px;
  height: 30px;
  border-radius: var(--r-control);
  background: var(--tint);
  color: #fff;
  font-size: var(--t-subhead);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-links { display: flex; align-items: center; gap: var(--sp-1); flex: 1; }
.nav-links > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;          /* 触控目标 44pt */
  padding: 0 var(--sp-3);
  border-radius: var(--r-control);
  font-size: var(--t-subhead);
  color: var(--text-2);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-links > a:hover { background: var(--fill); color: var(--text); }
.nav-links > a.active,
.nav-links > a[aria-current="page"] { color: var(--tint); font-weight: 600; }

/* ---------- 3.2 按钮（五态） ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;          /* 触控目标 44pt */
  padding: 0 var(--sp-5);
  border: none;
  border-radius: var(--r-control);
  font-size: var(--t-headline);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), transform 100ms var(--ease);
}
.btn-primary { background: var(--tint); color: #fff; }        /* 默认 */
.btn-primary:hover { background: var(--tint-hover); }          /* hover */
.btn-primary:active { transform: scale(.97); }                 /* 按下 */
.btn-secondary { background: var(--fill); color: var(--text); }/* 次级 */
.btn-secondary:hover { background: var(--border); }
.btn:disabled { opacity: .45; cursor: not-allowed; }           /* 禁用 */
.btn.is-loading { color: transparent; position: relative; }
.btn.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 20px; height: 20px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 兼容旧类名：btn-grad / btn-ghost → 新按钮 */
.btn-grad { background: var(--tint); color: #fff; }
.btn-grad:hover { background: var(--tint-hover); }
.btn-grad:active { transform: scale(.97); }
.btn-ghost { background: var(--fill); color: var(--text); }
.btn-ghost:hover { background: var(--border); }

/* ---------- 3.3 标签 / Chip ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px var(--sp-2);
  border-radius: var(--r-pill);
  background: var(--fill);
  color: var(--text-2);
  font-size: var(--t-caption);
  line-height: 1.4;
}
.tag.lic { background: var(--success-bg); color: var(--success); font-weight: 600; }
.tag.new { background: var(--danger-bg); color: var(--danger); font-weight: 600; }

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;          /* 触控目标 44pt */
  padding: 0 var(--sp-4);
  border-radius: var(--r-pill);
  background: var(--fill);
  color: var(--text);
  font-size: var(--t-subhead);
  cursor: pointer;
  border: 1px solid transparent;
  user-select: none;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.chip:hover { background: var(--border); }
.chip.on { background: var(--tint); color: #fff; font-weight: 600; }
.chip.sm { min-height: 32px; padding: 0 var(--sp-3); font-size: var(--t-caption); }

/* ---------- 3.4 卡片 ---------- */
.font-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.font-card:hover { box-shadow: var(--shadow-2); border-color: var(--tint); }
.font-preview {
  position: relative;
  height: 118px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.font-preview img { width: 100%; height: 100%; object-fit: contain; }
/* 卡片下载浮层：hover 显示，纯色半透明，无渐变 */
.dl-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: var(--sp-6) var(--sp-3) var(--sp-3);
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  background: linear-gradient(transparent, rgba(0, 0, 0, .45));
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  pointer-events: none;
}
.font-card:hover .dl-overlay,
.font-card:focus-within .dl-overlay { opacity: 1; }
.dl-overlay .ov-btn {
  background: var(--card);
  color: var(--tint);
  font-size: var(--t-caption);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-control);
  font-weight: 600;
}
.font-meta { padding: var(--sp-3) var(--sp-4) var(--sp-4); }
.font-meta h3 {
  font-size: var(--t-subhead);
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.font-meta .tags { display: flex; gap: var(--sp-2); margin-top: var(--sp-2); flex-wrap: wrap; }
.font-meta .pack { margin-top: var(--sp-2); font-size: var(--t-caption); color: var(--text-2); font-weight: 600; }
.empty-tip { text-align: center; color: var(--text-2); padding: var(--sp-8) 0; grid-column: 1 / -1; }

/* 列表视图（补齐缺失样式） */
.font-grid.list-mode { display: flex; flex-direction: column; gap: var(--sp-2); }
.font-row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  min-height: 96px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: var(--sp-2) var(--sp-4) var(--sp-2) var(--sp-2);
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.font-row:hover { box-shadow: var(--shadow-2); border-color: var(--tint); }
.font-row img {
  width: 150px; height: 76px;
  object-fit: contain;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-control);
  flex-shrink: 0;
}
.font-row .row-main { flex: 1; min-width: 0; }
.font-row h3 { font-size: var(--t-headline); font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.font-row .tags { display: flex; gap: var(--sp-2); margin-top: var(--sp-2); flex-wrap: wrap; }
.font-row .row-right { display: flex; align-items: center; gap: var(--sp-4); flex-shrink: 0; }
.font-row .row-size { font-size: var(--t-subhead); color: var(--text-2); }
.font-row .row-go { font-size: var(--t-title2); color: var(--tint); font-weight: 600; }
@media (max-width: 640px) {
  .font-row .row-size { display: none; }
  .font-row img { width: 110px; height: 58px; }
}

/* ---------- 3.5 网格 / 列表视图切换 ---------- */
.view-switch { display: flex; gap: var(--sp-1); }
.v-btn {
  width: 44px; height: 44px;             /* 触控目标 44pt */
  border: 1px solid var(--border);
  border-radius: var(--r-control);
  background: var(--card);
  color: var(--text-2);
  font-size: var(--t-headline);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.v-btn:hover { background: var(--fill); }
.v-btn.on { background: var(--tint); color: #fff; border-color: transparent; }

/* ---------- 3.6 输入框 / 选择器 ---------- */
.search-box { display: flex; }
.search-box input {
  flex: 1;
  min-height: 44px;                      /* 触控目标 44pt */
  padding: 0 var(--sp-4);
  font-size: var(--t-body);
  border: 1px solid var(--border);
  border-radius: var(--r-control) 0 0 var(--r-control);
  background: var(--card);
  color: var(--text);
  outline: none;
}
.search-box input:focus { border-color: var(--tint); }
.search-box .s-btn {
  min-width: 44px; min-height: 44px;     /* 触控目标 44pt */
  padding: 0 var(--sp-5);
  border: none;
  border-radius: 0 var(--r-control) var(--r-control) 0;
  background: var(--tint);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--dur) var(--ease);
}
.search-box .s-btn:hover { background: var(--tint-hover); }
select {
  min-height: 44px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--r-control);
  background: var(--card);
  color: var(--text);
  font-size: var(--t-subhead);
}

/* ---------- 3.7 弹窗 ---------- */
.modal-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .5);
  align-items: center;
  justify-content: center;
  padding: var(--sp-5);
}
.modal-mask.show { display: flex; }
.modal {
  background: var(--card);
  border-radius: var(--r-panel);
  max-width: 520px;
  width: 100%;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-2);
  animation: fade-in var(--dur) var(--ease);
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal-hero { height: 150px; display: flex; align-items: center; justify-content: center; background: var(--fill); }
.modal-hero .p-text { font-size: 44px; font-weight: 700; color: var(--text); }
.modal-body { padding: var(--sp-5) var(--sp-6) var(--sp-6); }
.modal-body h3 { font-size: var(--t-title2); margin-bottom: var(--sp-2); }
.modal-info { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: var(--sp-3) 0 var(--sp-4); }
.modal-body p.desc { color: var(--text-2); font-size: var(--t-subhead); }
.modal-actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-5); }
.modal-actions .btn { flex: 1; }
.modal-close {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  width: 44px; height: 44px;             /* 触控目标 44pt */
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, .35);
  color: #fff;
  font-size: var(--t-headline);
  cursor: pointer;
}

/* ============================================================
 * ④ 页面 Pages
 * ============================================================ */

/* ---------- 4.1 Hero（去渐变、去光晕，克制留白） ---------- */
.hero {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  padding: var(--sp-8) 0;
  position: relative;
}
.hero .container { text-align: center; }
.hero h1 {
  font-size: var(--t-large-title);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -.5px;
}
.hero h1 .hl { color: var(--tint); }
.hero p.sub {
  margin-top: var(--sp-3);
  font-size: var(--t-headline);
  color: var(--text-2);
}
.hero-stats { display: flex; justify-content: center; gap: var(--sp-8); margin-top: var(--sp-5); }
.hero-stats b { font-size: var(--t-title2); display: block; font-weight: 700; color: var(--tint); }
.hero-stats span { font-size: var(--t-caption); color: var(--text-2); }
.hero .search-box { max-width: 640px; margin: var(--sp-6) auto 0; }
.hero .hero-cats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
}
.hero .hero-cats a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;                      /* 触控目标 44pt */
  padding: 0 var(--sp-4);
  border-radius: var(--r-pill);
  background: var(--fill);
  color: var(--text);
  font-size: var(--t-subhead);
  transition: background-color var(--dur) var(--ease);
}
.hero .hero-cats a:hover { background: var(--border); }

/* ---------- 4.2 首页：筛选 / 网格 / 区块 ---------- */
.filter-bar { margin: var(--sp-6) auto 0; position: relative; z-index: 5; }
.filter-inner {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-1);
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.f-label { font-size: var(--t-caption); color: var(--text-2); margin: 0 var(--sp-1) 0 var(--sp-3); font-weight: 500; }
.grid-wrap { padding: var(--sp-8) 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: var(--sp-2) 0 var(--sp-4); gap: var(--sp-4); }
.section-head h2 { font-size: var(--t-title2); font-weight: 600; }
.section-head span { color: var(--text-2); font-size: var(--t-subhead); }
.font-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--sp-4);
}
.hot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--sp-3); margin: 0 0 var(--sp-6); }
.hot-card {
  position: relative;
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  color: var(--text);
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--dur) var(--ease);
}
.hot-card:hover { box-shadow: var(--shadow-2); }
.hot-card img { width: 100%; height: 110px; object-fit: cover; }
.hot-meta { padding: var(--sp-2) var(--sp-3); }
.hot-meta h4 { margin: 0 0 2px; font-size: var(--t-subhead); }
.hot-meta span { font-size: var(--t-caption); color: var(--text-2); }
.hot-rank {
  position: absolute; top: var(--sp-2); left: var(--sp-2);
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0, 0, 0, .6); color: #fff;
  font-size: var(--t-caption); font-weight: 600;
  display: flex; align-items: center; justify-content: center; z-index: 2;
}
.hot-rank.r1 { background: var(--warning); }
.hot-rank.r2 { background: #8E8E93; }
.hot-rank.r3 { background: #A2845E; }

/* 首页通用小类 */
.muted { font-size: var(--t-subhead); color: var(--text-2); font-weight: 400; }
.head-tools { display: flex; align-items: center; gap: var(--sp-2); }
.sort-select { padding: var(--sp-2) var(--sp-3); }
.explore-sec { margin: 0 0 var(--sp-6); }
.explore-head { font-size: var(--t-headline); margin: 0 0 var(--sp-3); }
.small-btn { font-size: var(--t-caption); padding: var(--sp-1) var(--sp-3); border: 1px solid var(--border); border-radius: var(--r-control); background: var(--card); color: var(--text-2); min-height: 32px; cursor: pointer; }
.small-btn:hover { background: var(--fill); color: var(--text); }
.back-section { text-align: center; padding: var(--sp-5) var(--sp-5) var(--sp-8); }
.back-btn { padding: 0 var(--sp-8); max-width: 420px; }
.faq-section { max-width: 900px; margin: var(--sp-6) auto var(--sp-2); }
.faq-title { font-size: var(--t-headline); margin: 0 0 var(--sp-4); }
.foot-contact { margin-top: var(--sp-2); font-size: var(--t-caption); }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.faq-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--sp-4); box-shadow: var(--shadow-1); }
.faq-card b { font-size: var(--t-subhead); }
.faq-card p { font-size: var(--t-caption); color: var(--text-2); margin: var(--sp-2) 0 0; line-height: var(--lh-relaxed); }
.faq-card a { color: var(--tint); }

/* ---------- 4.3 详情页（P0 补齐 + HIG 规范） ---------- */
.fd-page { padding-top: var(--sp-6); padding-bottom: var(--sp-8); }
.fd-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;                      /* 触控目标 44pt */
  margin-bottom: var(--sp-4);
  color: var(--tint);
  font-size: var(--t-subhead);
}
.fd-back:hover { color: var(--tint-hover); }
.fd-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--sp-6);
  align-items: start;
}
.fd-preview {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fd-preview img { width: 100%; height: 100%; object-fit: contain; }
.fd-info h1 {
  font-size: var(--t-title);
  line-height: var(--lh-tight);
  font-weight: 700;
  margin-bottom: var(--sp-3);
}
.fd-tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.fd-desc { font-size: var(--t-body); color: var(--text-2); margin-bottom: var(--sp-5); line-height: var(--lh-relaxed); }
.fd-spec {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
  padding: var(--sp-4);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
.spec-item { display: flex; flex-direction: column; gap: var(--sp-1); }
.spec-item span { font-size: var(--t-caption); color: var(--text-2); }
.spec-item b { font-size: var(--t-headline); font-weight: 600; }
.quota-line { min-height: 20px; margin-bottom: var(--sp-3); font-size: var(--t-subhead); color: var(--text-2); }
.fd-actions { margin-bottom: var(--sp-5); }
.fd-actions .btn { min-width: 160px; }
.fd-license {
  padding: var(--sp-4);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
.fd-license h4 { font-size: var(--t-headline); margin-bottom: var(--sp-2); }
.fd-license p { font-size: var(--t-subhead); color: var(--text-2); line-height: var(--lh-relaxed); }
.fd-sec { margin-top: var(--sp-8); }
.fd-sec h2 { font-size: var(--t-title2); margin-bottom: var(--sp-4); }
.rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--sp-4); }
.rec-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--dur) var(--ease);
}
.rec-card:hover { box-shadow: var(--shadow-2); }
.rec-card img { width: 100%; height: 110px; object-fit: cover; }
.rec-meta { padding: var(--sp-3); }
.rec-meta h4 { font-size: var(--t-subhead); font-weight: 600; }
.rec-meta .tag { margin-top: var(--sp-1); }

/* ---------- 4.4 文章页 ---------- */
.ar-wrap { max-width: 820px; margin: 0 auto; padding: 0 var(--sp-5) var(--sp-8); }
.ar-head { margin: var(--sp-8) 0 var(--sp-6); border-bottom: 2px solid var(--tint); padding-bottom: var(--sp-4); }
.ar-head .cat {
  display: inline-flex; align-items: center;
  background: var(--tint); color: #fff;
  font-size: var(--t-caption); padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-pill); margin-bottom: var(--sp-3);
}
.ar-head h1 { font-size: var(--t-title); line-height: 1.35; }
.ar-head .meta { color: var(--text-2); font-size: var(--t-subhead); margin-top: var(--sp-3); }
.ar-body { font-size: var(--t-body); line-height: 2; color: var(--text); }
.ar-body h2 { font-size: var(--t-title2); margin: var(--sp-8) 0 var(--sp-4); padding-left: var(--sp-3); border-left: 4px solid var(--tint); }
.ar-body p { margin: var(--sp-4) 0; }
.ar-body ul, .ar-body ol { margin: var(--sp-4) 0; padding-left: var(--sp-6); }
.ar-body li { margin: var(--sp-2) 0; }
.ar-body strong { color: var(--tint); }
.ar-body blockquote { background: var(--card); border-left: 4px solid var(--tint); padding: var(--sp-4); border-radius: var(--r-control); margin: var(--sp-5) 0; font-size: var(--t-subhead); }
.ar-cta { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-panel); padding: var(--sp-6); text-align: center; margin: var(--sp-8) 0; }
.ar-cta h3 { font-size: var(--t-headline); margin: 0 0 var(--sp-2); }
.ar-cta p { font-size: var(--t-subhead); margin: 0 0 var(--sp-4); color: var(--text-2); }
.ar-cta a { display: inline-flex; align-items: center; min-height: 44px; background: var(--tint); color: #fff; padding: 0 var(--sp-8); border-radius: var(--r-pill); font-weight: 600; font-size: var(--t-subhead); }
.ar-cta a:hover { background: var(--tint-hover); }
.ar-nav { display: flex; justify-content: space-between; gap: var(--sp-4); margin-top: var(--sp-8); font-size: var(--t-subhead); }
.ar-nav a { color: var(--tint); }

/* ---------- 4.5 试字页 ---------- */
.try-wrap { max-width: 900px; margin: 0 auto; padding: 0 var(--sp-5) var(--sp-8); }
.try-head { text-align: center; margin: var(--sp-8) 0 var(--sp-5); }
.try-head h1 { font-size: var(--t-title); }
.try-head p { color: var(--text-2); font-size: var(--t-subhead); margin-top: var(--sp-2); }
.try-controls {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-panel); box-shadow: var(--shadow-1);
  padding: var(--sp-4); display: grid;
  grid-template-columns: 1fr 120px 120px; gap: var(--sp-3);
  align-items: end; margin-bottom: var(--sp-5);
}
.try-controls label { font-size: var(--t-caption); color: var(--text-2); display: block; margin-bottom: var(--sp-1); }
.try-controls input, .try-controls select {
  width: 100%; min-height: 44px; padding: 0 var(--sp-3);
  border: 1px solid var(--border); border-radius: var(--r-control);
  font-size: var(--t-subhead); background: var(--card); color: var(--text);
}
.preview-stage {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-panel); box-shadow: var(--shadow-1);
  padding: var(--sp-6); min-height: 320px;
  display: flex; flex-direction: column; gap: var(--sp-5);
}
.preview-line { border-bottom: 1px dashed var(--border); padding-bottom: var(--sp-4); }
.preview-line .pf-name { font-size: var(--t-caption); color: var(--text-2); margin-bottom: var(--sp-2); display: flex; justify-content: space-between; align-items: center; }
.preview-line .pf-name a, .pf-name a { color: var(--tint); font-weight: 500; }
.preview-line .pf-text { font-size: var(--try-size, 34px); line-height: 1.5; color: var(--try-color, var(--text)); word-break: break-all; }
.preview-line .pf-text.loading { color: var(--text-2); font-size: var(--t-subhead); }
.try-tip { text-align: center; color: var(--text-2); font-size: var(--t-caption); margin-top: var(--sp-5); line-height: var(--lh-relaxed); }

/* ---------- 4.6 留言板 ---------- */
.bd-wrap { max-width: 760px; margin: 0 auto; padding: 0 var(--sp-5) var(--sp-8); }
.bd-head { text-align: center; margin: var(--sp-8) 0 var(--sp-6); }
.bd-head h1 { font-size: var(--t-title); }
.bd-head p { color: var(--text-2); font-size: var(--t-subhead); margin-top: var(--sp-2); }
.bd-form { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-panel); box-shadow: var(--shadow-1); padding: var(--sp-6); }
.bd-form input, .bd-form textarea {
  width: 100%; min-height: 44px; padding: var(--sp-3);
  border: 1px solid var(--border); border-radius: var(--r-control);
  font-size: var(--t-subhead); margin-bottom: var(--sp-3); background: var(--card); color: var(--text);
}
.bd-form textarea { min-height: 96px; resize: vertical; }
.bd-form .row { display: flex; gap: var(--sp-3); align-items: center; }
.bd-form .row input { flex: 1; }
.bd-tip { font-size: var(--t-caption); color: var(--text-2); margin-bottom: var(--sp-4); }
.bd-list { margin-top: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-3); }
.bd-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--sp-4) var(--sp-5); box-shadow: var(--shadow-1); }
.bd-item .who { display: flex; justify-content: space-between; font-size: var(--t-caption); color: var(--text-2); margin-bottom: var(--sp-2); }
.bd-item .who b { color: var(--text); font-size: var(--t-subhead); }
.bd-item .txt { font-size: var(--t-subhead); line-height: var(--lh-relaxed); word-break: break-word; }
.bd-empty { text-align: center; color: var(--text-2); padding: var(--sp-8) 0; }

/* ---------- 4.7 打包下载页（donate，支付已下架期间保留结构） ---------- */
.donate-hero { text-align: center; padding: var(--sp-8) 0 var(--sp-2); }
.donate-hero h1 { font-size: var(--t-title); font-weight: 700; }
.donate-hero h1 em { font-style: normal; color: var(--tint); }
.donate-hero p { color: var(--text-2); margin-top: var(--sp-3); max-width: 640px; margin-left: auto; margin-right: auto; }
.story { max-width: 760px; margin: var(--sp-6) auto 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-1); padding: var(--sp-6); color: var(--text-2); font-size: var(--t-subhead); }
.pack-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); max-width: 1080px; margin: var(--sp-8) auto 0; }
.pack-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--sp-6) var(--sp-5); box-shadow: var(--shadow-1); text-align: center; border: 2px solid transparent; display: flex; flex-direction: column; }
.pack-card.hot { border-color: var(--tint); }
.pack-card .badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--tint); color: #fff; font-size: var(--t-caption); font-weight: 700; padding: var(--sp-1) var(--sp-4); border-radius: var(--r-pill); }
.pack-price { font-size: 40px; font-weight: 700; }
.pack-price small { font-size: var(--t-body); font-weight: 600; color: var(--text-2); }
.pack-name { color: var(--text-2); margin-top: 2px; font-weight: 600; }
.pack-feats { list-style: none; margin: var(--sp-5) 0; flex: 1; }
.pack-feats li { font-size: var(--t-subhead); color: var(--text-2); padding: var(--sp-1) 0; }
.pack-feats li::before { content: "✓ "; color: var(--success); font-weight: 700; }
.pack-btn { height: 46px; border: none; border-radius: var(--r-control); cursor: pointer; background: var(--tint); color: #fff; font-size: var(--t-body); font-weight: 700; }
.pack-btn:hover { background: var(--tint-hover); }
.pay-zone { max-width: 860px; margin: var(--sp-8) auto 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-panel); box-shadow: var(--shadow-1); padding: var(--sp-8); text-align: center; }
.pay-zone h2 { font-size: var(--t-title2); }
.pay-current { display: inline-flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-4); background: var(--fill); border-radius: var(--r-pill); padding: var(--sp-2) var(--sp-5); font-size: var(--t-subhead); color: var(--text-2); }
.pay-current b { color: var(--text); }
.pay-price { background: var(--tint); color: #fff; font-weight: 700; font-size: var(--t-subhead); padding: 2px var(--sp-4); border-radius: var(--r-pill); }
.pay-grid { display: grid; grid-template-columns: 280px 1fr; gap: var(--sp-8); align-items: start; margin-top: var(--sp-6); text-align: left; }
.qr-card { background: var(--card); border: 2px solid var(--success); border-radius: var(--r-panel); overflow: hidden; text-align: center; box-shadow: var(--shadow-1); }
.qr-card-head { background: var(--success); color: #fff; font-size: var(--t-caption); font-weight: 700; letter-spacing: 2px; padding: var(--sp-2) 0; }
.qr-card img, .qr-card .qr-placeholder { width: 100%; display: block; }
.qr-card .qr-placeholder { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-2); gap: var(--sp-2); font-size: var(--t-subhead); }
.qr-card .qr-placeholder .big { font-size: 40px; }
.qr-scan-tip { font-size: var(--t-caption); color: var(--text-2); padding: var(--sp-2) 0 2px; font-weight: 600; }
.qr-amount { font-size: 26px; font-weight: 700; color: var(--success); padding: 2px 0 var(--sp-4); }
.pay-steps-tl h3 { font-size: var(--t-body); margin-bottom: var(--sp-4); }
.pay-steps-tl ol { list-style: none; position: relative; }
.pay-steps-tl ol::before { content: ""; position: absolute; left: 13px; top: 10px; bottom: 10px; width: 2px; background: var(--border); }
.pay-steps-tl li { position: relative; padding: 0 0 var(--sp-5) 40px; font-size: var(--t-subhead); color: var(--text-2); }
.pay-steps-tl li::before { content: counter(list-item); counter-increment: list-item; position: absolute; left: 0; top: 0; width: 28px; height: 28px; background: var(--tint); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: var(--t-caption); font-weight: 700; }
.pay-steps-tl li b { color: var(--text); }
.note-bar { background: var(--warning-bg); border: 1px solid var(--warning); border-radius: var(--r-control); padding: var(--sp-3) var(--sp-4); font-size: var(--t-subhead); color: var(--warning); font-weight: 600; }
.pay-steps { margin: var(--sp-5) auto 0; text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--sp-5); }
.pay-steps h3 { font-size: var(--t-body); margin-bottom: var(--sp-3); color: var(--tint); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); max-width: 1020px; margin: var(--sp-8) auto 0; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-panel); box-shadow: var(--shadow-1); padding: var(--sp-6); }
.panel h2 { font-size: var(--t-headline); margin-bottom: var(--sp-4); }
.log-list { list-style: none; max-height: 320px; overflow: auto; }
.log-list li { display: flex; gap: var(--sp-3); padding: var(--sp-2) 0; font-size: var(--t-subhead); border-bottom: 1px dashed var(--border); }
.log-list li:last-child { border-bottom: none; }
.log-date { color: var(--tint); font-weight: 600; white-space: nowrap; }
.donor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--sp-2); max-height: 320px; overflow: auto; }
.donor { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-control); padding: var(--sp-3); text-align: center; }
.donor b { display: block; font-size: var(--t-subhead); }
.donor span { font-size: var(--t-caption); color: var(--text-2); }
.donor.ghost { color: var(--text-2); border-style: dashed; }
.friend-qr-row { display: flex; align-items: center; gap: var(--sp-4); background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: var(--sp-3) var(--sp-4); margin-top: var(--sp-4); }
.friend-qr-box { width: 92px; height: 92px; flex-shrink: 0; background: #fff; border-radius: var(--r-control); overflow: hidden; }
.friend-qr-box img { width: 100%; height: 100%; object-fit: contain; }
.friend-qr-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: var(--t-caption); color: var(--text-2); text-align: center; padding: var(--sp-1); }
.friend-txt { display: flex; flex-direction: column; gap: 2px; font-size: var(--t-subhead); color: var(--text-2); }
.friend-txt b { font-size: var(--t-body); color: var(--success); }

/* ---------- 4.8 404 兜底页 ---------- */
.w404 { max-width: 720px; margin: var(--sp-8) auto; padding: 0 var(--sp-5); text-align: center; }
.w404 .big { font-size: 110px; font-weight: 800; color: var(--tint); letter-spacing: 4px; line-height: 1; }
.w404 h1 { font-size: var(--t-title2); margin: var(--sp-3) 0 var(--sp-2); }
.w404 p { color: var(--text-2); font-size: var(--t-subhead); margin: 0 0 var(--sp-6); }

/* ---------- 4.9 页脚 ---------- */
footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  color: var(--text-2);
  padding: var(--sp-8) 0 calc(var(--sp-6) + env(safe-area-inset-bottom));
  margin-top: var(--sp-8);
}
.foot-grid { display: flex; flex-wrap: wrap; gap: var(--sp-8); justify-content: space-between; }
.foot-brand .logo { color: var(--text); margin-bottom: var(--sp-3); }
.foot-brand p { font-size: var(--t-caption); max-width: 340px; line-height: var(--lh-relaxed); }
.foot-col h4 { color: var(--text); font-size: var(--t-subhead); margin-bottom: var(--sp-3); }
.foot-col a { display: inline-flex; align-items: center; min-height: 32px; font-size: var(--t-caption); color: var(--text-2); }
.foot-col a:hover { color: var(--tint); }
.foot-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--sp-4); }
.copyright { text-align: center; margin-top: var(--sp-8); font-size: var(--t-caption); color: var(--text-2); border-top: 1px solid var(--border); padding-top: var(--sp-5); }
.beian { text-align: center; margin-top: var(--sp-2); font-size: var(--t-caption); color: var(--text-2); }
.beian a { color: var(--text-2); }
.beian a:hover { color: var(--tint); text-decoration: underline; }

/* ---------- 4.10 广告位（预留） ---------- */
.ad-slot { min-height: 90px; }

/* ============================================================
 * ⑤ 响应式 + 降级
 * ============================================================ */

/* 平板 */
@media (max-width: 860px) {
  .navbar .container { gap: var(--sp-4); }
  .hero h1 { font-size: var(--t-title); }
  .hero-stats { gap: var(--sp-5); }
  .two-col { grid-template-columns: 1fr; }
  .font-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .fd-grid { grid-template-columns: 1fr; }
  .fd-spec { grid-template-columns: 1fr 1fr; }
  .pack-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 手机：导航不折行（延续已修复的 white-space: nowrap） */
@media (max-width: 768px) {
  .navbar .container { gap: var(--sp-2); padding: 0 var(--sp-3); }
  .nav-links a {
    font-size: var(--t-caption);
    margin-left: 0;
    padding: 0 var(--sp-1);
    white-space: nowrap;
    flex-shrink: 0;
  }
  .nav-links { flex-wrap: nowrap; gap: 0; }
  .logo { font-size: var(--t-subhead); white-space: nowrap; flex-shrink: 0; }
  .logo-badge { width: 28px; height: 28px; }
  .faq-grid { grid-template-columns: 1fr; }
  .try-controls { grid-template-columns: 1fr; }
}

/* 小屏手机 */
@media (max-width: 560px) {
  .pack-grid { grid-template-columns: 1fr; }
  .pay-grid { grid-template-columns: 1fr; }
  .qr-card { max-width: 300px; margin: 0 auto; }
  .fd-spec { grid-template-columns: 1fr; }
  .rec-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: var(--sp-4); }
  .hero-stats b { font-size: var(--t-body); }
  .font-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 减弱动态效果：系统开启时全部降级 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
