/* 0923 需求迭代-页面 UI优化：统一使用 HarmonyOS Sans SC。 */
/* 20261016 字体改 woff2 优先（8MB ttf→4.2MB），配合 head 里的 preload；ttf 仅作老浏览器回退。 */
/* kami1016 页面优化调整：font-display 由 swap 改 optional——首绘没就绪就整页系统字体，页内不再出现"先系统字体
   再换鸿蒙体"的替换抖动；字体后台下载进缓存，自下一页起全程生效。 */

/* HarmonyOS Sans Fonts © 2021 Huawei Device Co., Ltd.；字体授权见 ../../fonts/HarmonyOS_Sans_SC/LICENSE.txt。 */

/* 2610产品端复盘优化 start：完整字库转换为 WOFF2，保留字体名称、400/500/700 字重与 swap 加载方式。 */
@font-face {
    font-family: "HarmonyOS Sans SC";
    /* kami1016 页面优化调整 start：woff2 优先（新增 .woff2 字体文件） */
    src: url("../../fonts/HarmonyOS_Sans_SC/HarmonyOS_Sans_SC_Regular.woff2") format("woff2"),
         url("../../fonts/HarmonyOS_Sans_SC/HarmonyOS_Sans_SC_Regular.ttf") format("truetype");
    /* kami1016 页面优化调整 end */
    font-style: normal;
    font-weight: 400;
    font-display: optional;
}

@font-face {
    font-family: "HarmonyOS Sans SC";
    /* kami1016 页面优化调整 start：woff2 优先（新增 .woff2 字体文件） */
    src: url("../../fonts/HarmonyOS_Sans_SC/HarmonyOS_Sans_SC_Medium.woff2") format("woff2"),
         url("../../fonts/HarmonyOS_Sans_SC/HarmonyOS_Sans_SC_Medium.ttf") format("truetype");
    /* kami1016 页面优化调整 end */
    font-style: normal;
    font-weight: 500;
    font-display: optional;
}

@font-face {
    font-family: "HarmonyOS Sans SC";
    /* kami1016 页面优化调整 start：woff2 优先（新增 .woff2 字体文件） */
    src: url("../../fonts/HarmonyOS_Sans_SC/HarmonyOS_Sans_SC_Bold.woff2") format("woff2"),
         url("../../fonts/HarmonyOS_Sans_SC/HarmonyOS_Sans_SC_Bold.ttf") format("truetype");
    /* kami1016 页面优化调整 end */
    font-style: normal;
    font-weight: 700;
    font-display: optional;
}
/* 2610产品端复盘优化 end：HarmonyOS Sans SC 字体格式。 */

html:root {
    --ui-font-family: "HarmonyOS Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;
    --van-base-font: var(--ui-font-family);
}

/* 0923 需求迭代-页面 UI优化：全站文本统一字体，覆盖页面、弹窗和第三方组件的旧文本字体。 */
html body,
html body *:not(:where(
    pre, pre *, code, code *, kbd, kbd *, samp, samp *,
    .fa, .fa *, .fas, .fas *, .far, .far *, .fab, .fab *,
    .fal, .fal *, .fad, .fad *, .fat, .fat *,
    [class^="fa-"], [class^="fa-"] *, [class*=" fa-"], [class*=" fa-"] *,
    .layui-icon, .layui-icon *, .van-icon, .van-icon *, .iconfont, .iconfont *
)) {
    font-family: var(--ui-font-family) !important;
}

/* 兼容模板中带 !important 的播放器及 GitHub 信息区域。 */
html body .github-box,
html body .github-box .github-box-title h3,
html body .aplayer {
    font-family: var(--ui-font-family) !important;
}
