/* ===== 字体统一管理 =====
 *
 * 用法:
 *   1. 字体文件放在 /backend/app/static/fonts/ 目录
 *   2. 在下面添加 @font-face 声明
 *   3. 在 :root 里调整 --font-* 变量的 font-family 顺序
 *   4. 所有 CSS 通过 var(--font-*) 引用，改一处全站生效
 *
 * 当前策略:
 *   - MiSans 只做“展示字” (--font-display)，用于会员标题/价格等大字
 *   - 正文保持系统字体栈（微软雅黑/苹方），不加载 webfont
 *   - 两个字重均已用 pyftsubset 按站点实际用字裁剪，约 20KB/个；
 *     重新生成示例:
 *       python -m fontTools.subset MiSans-Heavy.otf --text-file=chars.txt --flavor=woff2 --output-file=MiSans-Heavy.woff2 --no-hinting
 */

/* ===== @font-face 自定义字体声明 ===== */

@font-face {
  font-family: "MiSans";
  src: url("/static/fonts/MiSans-Heavy.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MiSans";
  src: url("/static/fonts/MiSans-DemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ===== 字体变量 ===== */

:root {
  /* 展示字体：会员标题/价格等装饰性大字 */
  --font-display: "MiSans", "Microsoft YaHei", "PingFang SC", sans-serif;
  /* 阅览室用的系统黑体：有则 SimHei，否则雅黑 */
  --font-heiti: "SimHei", "黑体", "Microsoft YaHei", "微软雅黑", sans-serif;
  /* 正文/常规 sans：保持系统字体 */
  --font-sans: "Microsoft YaHei", Arial, sans-serif;
  --font-body: Arial, "Microsoft YaHei", sans-serif;
  --font-mono: "Courier New", monospace;
  --font-serif: Georgia, "Times New Roman", "Microsoft YaHei", serif;
}
