/*
 * 表示ロケール別 Web フォント定義。
 *
 * 日本語・繁體中文・韓国語には同一 Unicode コードポイントで字形が異なる CJK 互換文字があり、
 * 日本語フォント (KosugiMaru) のままでは繁體中文・韓国語で誤った字形や欠落 (豆腐) が生じる。
 * そのため表示ロケールに応じて Web フォントを差し替える。
 *
 * 切替は各レイアウトが出力済みの <html lang="..."> (Util::getCurrentLocaleH() 由来、
 * ja-JP / en-US / en-GB / ko-KR / zh-TW) を属性セレクタで拾って行う。PHP 側の分岐は不要。
 *
 * 実フォントは Google Fonts (Noto Sans TC / Noto Sans KR v39 Regular、
 * それぞれ chinese-traditional / korean サブセット) を webroot/font/ へセルフホストしている。
 * ライセンスは webroot/font/NotoSans-LICENSE.txt (SIL Open Font License 1.1) を参照。
 * サブセットに含まれない文字 (かな等) は font-family の後続フォントへフォールバックする。
 */

@font-face {
    font-family: 'noto-sans-tc';
    src: url('../../font/NotoSansTC-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'noto-sans-kr';
    src: url('../../font/NotoSansKR-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* 既定 (ja_JP / en_US / en_GB)。@font-face は base.css 側で定義済み */
:root {
    --app-font-family: 'kosugi-maru', "ヒラギノ角ゴ Pro W3", "ＭＳ Ｐゴシック", sans-serif;
}

/* 繁體中文 */
html[lang="zh-TW"] {
    --app-font-family: 'noto-sans-tc', "Microsoft JhengHei", "PingFang TC", sans-serif;
}

/* 韓国語 */
html[lang="ko-KR"] {
    --app-font-family: 'noto-sans-kr', "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}
