/*
 * Showcase 页面字体注册。
 *
 * 自托管 11 款中文/拉丁艺术字体，供 Showcase 页面挑用。其它页面
 * 仍走全局 ``body`` 的系统字体栈（PingFang / 微软雅黑），不受影响。
 *
 * 体积速览（MB）：
 *   CrownTypeBold       56  ← 皇冠体，仅极小段使用，避免一次性下载
 *   YanShiFoXi          14  ← 演示佛系
 *   MoMoZhuiFeng        12  ← 默陌追风手写
 *   HanYiJunPoLi        10  ← 汉仪俊坡隶
 *   MoMoXinQing         10  ← 默陌心晴手写
 *   MoMoZhuanJi          9  ← 默陌专辑手写
 *   HongLeiZhuShu        6  ← 鸿雷拙书
 *   ChenYuluoyan-Thin    4  ← 陈余落雁瘦体
 *   NanGouGeYuFang       4  ← 南构葛玉芳行书
 *   Montserrat            0.2  ← 拉丁衬线
 *   RetroSignature        0.04 ← 复古签名
 *
 * font-display: swap — 字体没下载完时，浏览器立刻用回退字体绘制
 * 文字，下载完再静默切换。绝不阻塞首屏 LCP。
 *
 * 加载策略
 * --------
 * 这里所有 @font-face 仅是「声明」— 浏览器只在 CSS / JSX 里实际
 * 引用 ``font-family: 'XXX'`` 时才发请求。所以注册 11 款不会让首屏
 * 加载 11 个字体文件，只会触发实际用到的那几款。
 */

@font-face {
  font-family: 'MoMo ZhuiFeng';
  /* 子集化 woff2 (~340 KB) 包含 showcase 用到的所有字符，
   * 优先加载；如果未来加了新字符没及时重跑 subset_fonts.py，
   * 浏览器会回退到完整 ttf (~12 MB) 拉缺字。subset_fonts.py
   * 会扫 Showcase.tsx 自动提取字符集，再跑一次就重新瘦下来。
   * URL 后的 ``?v=`` 版本戳由 subset_fonts.py 重写，每次重跑
   * 都会换数字 — 这样浏览器才会重新拉新版子集，否则会拿旧
   * 的缓存导致「子集里没有的字符回退到苹方」。 */
  src: url('/fonts/MoMoZhuiFeng.woff2?v=8') format('woff2'),
       url('/fonts/MoMoZhuiFeng.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'HongLei ZhuShu';
  src: url('/fonts/HongLeiZhuShu.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'MoMo XinQing';
  /* 子集化 woff2 (~320 KB)，子集化前 10 MB。 */
  src: url('/fonts/MoMoXinQing.woff2') format('woff2'),
       url('/fonts/MoMoXinQing.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'NanGou GeYuFang';
  src: url('/fonts/NanGouGeYuFang.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'YanShi FoXi';
  /* 子集化 woff2 (~430 KB) 同上，子集化前 14 MB。 */
  src: url('/fonts/YanShiFoXi.woff2?v=8') format('woff2'),
       url('/fonts/YanShiFoXi.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'MoMo ZhuanJi';
  src: url('/fonts/MoMoZhuanJi.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'HanYi JunPo Li';
  src: url('/fonts/HanYiJunPoLi.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Crown Type Bold';
  src: url('/fonts/CrownTypeBold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'ChenYuluoyan';
  src: url('/fonts/ChenYuluoyan-Thin.ttf') format('truetype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/Montserrat-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Retro Signature';
  src: url('/fonts/RetroSignature.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
