/*
 * Custom Font Definitions for NingNingTyping
 * ─────────────────────────────────────────────
 * 唯一的字体声明源。all.scss 中不再重复声明。
 * 由 index.html 通过 <link> 引入。
 */

/* ── 引入优化后的分片 Web Fonts ── */
@import url("./webfonts.css");

/* ── 日语专属课程字体（消除中日汉字字形差异）── */
/* Noto Sans JP (日文) - 使用分片优化的网路字体 */
@font-face {
    font-family: 'Noto Sans JP';
    src: local('Noto Sans JP'),
        local('Noto Sans JP Regular');
    /* 配合 sharded 字体，这里作为一个别名引用 */
}

/* 别名映射：将 cn-font-split 生成的名称映射到标准名称 */
@font-face {
    font-family: 'Noto Sans JP';
    src: local('Noto Sans JP Thin');
    font-weight: 100 900;
}

/* ── 纯拼音字母专属 Web Font (单层字母 ɑ, 标准 g) ── */
@font-face {
    font-family: 'Pinyin Regular';
    src: url('../fonts/pinyin/pinyin-regular.woff2') format('woff2');
    font-display: swap;
}

/* ── 拼音描红笔顺字体 (供儿童打字初学者学习笔画分布) ── */
@font-face {
    font-family: 'Pinyin Step';
    src: url('../fonts/pinyin/pinyin-step.woff2') format('woff2');
    font-display: swap;
}

/* ── 拼音文楷轻柔字形 ── */
@font-face {
    font-family: 'Pinyin Wenkai Light';
    src: url('../fonts/pinyin/pinyin-wenkai-light.woff2') format('woff2');
    font-display: swap;
}

/*
 * ── Language-Specific Utility Classes ─────────────────
 * 由 TypingViewModel.fontClass formula 动态应用至 .typing-container
 */

/* 中文书写/展示区：霞鹜文楷 */
.chinese-text,
.font-lang-zh,
.font-lang-zh span {
    font-family: 'LXGW WenKai', '霞鹜文楷', 'KaiTi', '楷体', 'Microsoft YaHei', sans-serif !important;
}

/* 日语区 */
.font-lang-jp,
.font-lang-jp span {
    font-family: 'Noto Sans JP', 'Courier New', Courier, monospace !important;
}

/* 拼音及注音区 */
.font-lang-pinyin,
.font-lang-pinyin span {
    font-family: 'Pinyin Regular', 'Courier New', Courier, monospace !important;
}

/* 拼音描红区 */
.font-lang-pinyin-step,
.font-lang-pinyin-step span {
    font-family: 'Pinyin Step', 'Courier New', Courier, monospace !important;
}

/* 拼音与输入区等宽 (JetBrains Mono) */
.pinyin-text,
.typing-input,
.font-mono {
    font-family: 'JetBrains Mono', Consolas, Monaco, 'Courier New', monospace !important;
}