/* 字体 —— 内嵌 woff2，任何机器(含 Linux/CI，无系统字体)都能 1:1 渲染。
   · 拉丁/IPA：SF Pro（系统 SFNS 子集，变体 wght+opsz） —— 与真机 SF Pro 一致
   · rounded 大数：SF Pro Rounded（SFNSRounded 子集，数字/标点）
   · 中文/日文 CJK：Noto Sans SC（开源 OFL，可自由分发；形近苹方 PingFang）
   · 韩文：Apple SD Gothic Neo（系统子集，仅韩文 UI）
   字体均「内嵌优先」于 -apple-system，保证 macOS 预览与 Linux 出图一致。
   合规：SF Pro / Apple SD Gothic 为 Apple 字体，仅本地内部素材用途，勿公开分发；
        Noto Sans SC 为开源(SIL OFL)，可自由使用。生成脚本见 tools/build-fonts.py。 */

@font-face {
  font-family: 'RW SF Pro';
  src: url('../fonts/sf-pro.woff2') format('woff2');
  font-weight: 1 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'RW SF Rounded';
  src: url('../fonts/sf-pro-rounded.woff2') format('woff2');
  font-weight: 1 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'RW Noto SC';
  src: url('../fonts/noto-sans-sc-regular.woff2') format('woff2');
  font-weight: 1 550; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'RW Noto SC';
  src: url('../fonts/noto-sans-sc-semibold.woff2') format('woff2');
  font-weight: 551 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'RW SD Gothic';
  src: url('../fonts/applesdgothic-regular.woff2') format('woff2');
  font-weight: 1 900; font-style: normal; font-display: swap;
}

:root {
  /* 内嵌字优先 → 跨平台一致；-apple-system 等仅作兜底。
     字形回退顺序：拉丁→SF Pro；中日→Noto SC；韩文→SD Gothic。 */
  --cjk: 'RW Noto SC', 'RW SD Gothic', 'PingFang SC', 'Hiragino Sans', 'Apple SD Gothic Neo', 'Microsoft YaHei';
  --font-text: 'RW SF Pro', var(--cjk), -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Helvetica Neue', sans-serif;
  --font-display: 'RW SF Pro', var(--cjk), -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, 'Helvetica Neue', sans-serif;
  --font-rounded: 'RW SF Rounded', 'RW SF Pro', var(--cjk), ui-rounded, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

/* SF Pro 变体含 opsz 光学尺寸轴，自动按字号选 Text/Display 度量 */
.screen, .screen * { font-optical-sizing: auto; }
