/* Monologue Gaze — 언어별 글꼴 (js/i18n.js 가 <html lang> 을 정하고 그 언어의 글꼴을 부른다)
 * css/base.css 의 글꼴 변수는 앞자리에 var(--l-종류,) 를 비워 두었다. 한국어면 비어 있어 원래 글꼴 그대로,
 * 다른 언어면 그 언어의 글자를 가진 글꼴이 앞에 선다. 번역되지 않고 남은 한글은 뒤의 한국어 글꼴이 받는다.
 * 값 끝의 쉼표는 지우지 말 것 (뒤에 원래 글꼴 목록이 이어 붙는다).
 * 종류: hand 펜 손글씨 · hand2 붓·거친 손글씨 · hand3 동글동글한 손글씨 · serif 명조 · old 옛 활자 · sans 고딕 · heavy 굵은 제목
 *       mono 고정폭 · type 타자기 · pixel 도트 화면 · brush 신문 제호 붓글씨 · cjk 한자·가나 받침 */

html:is([lang="en"],[lang="de"]){
  --l-hand:"Caveat",; --l-hand2:"Shadows Into Light",; --l-hand3:"Patrick Hand",;
  --l-serif:"Crimson Pro",; --l-old:"Old Standard TT",; --l-brush:"Old Standard TT",; --l-mono:"PT Mono",; /* 로마자 고정폭: 곧은따옴표가 아닌 “ ” 와 ō 가 한글 코딩 글꼴로 넘어가 넓게 벌어지지 않게 */
}
html[lang="ru"]{
  --l-hand:"Caveat",; --l-hand2:"Marck Script",; --l-hand3:"Pangolin",;
  --l-serif:"PT Serif",; --l-old:"Old Standard TT",; --l-brush:"Old Standard TT",;
  --l-sans:"PT Sans",; --l-mono:"PT Mono",; --l-type:"IBM Plex Mono",;
}
html[lang="ja"]{
  --l-hand:"Klee One",; --l-hand2:"Zen Kurenaido",; --l-hand3:"Yomogi",;
  --l-serif:"Noto Serif JP",; --l-old:"New Tegomin",; --l-sans:"Noto Sans JP",; --l-heavy:"Dela Gothic One",;
  --l-mono:"M PLUS 1 Code",; --l-type:"Special Elite","M PLUS 1 Code",; --l-pixel:"DotGothic16",; --l-cjk:"Noto Sans JP",;
}
/* ZCOOL XiaoWei 는 「回」와 回 가 들어간 글자(徊 등)를 까만 네모(■)로 그린다. 그 글자들만 Noto Serif SC 에서 떼어 와 먼저 쓴다 */
@font-face{font-family:"MG Hui";src:url(../fonts/zh-hui.woff2) format("woff2");font-weight:100 900;font-display:swap;unicode-range:U+56DE,U+5EFB,U+5F8A,U+6D04,U+8334,U+86D4}
/* Special Elite 의 「—」는 닳은 물결이라 중국어 「——」가 끊겨 보인다. 그 한 글자는 Noto Sans SC 것으로 */
@font-face{font-family:"MG Dash";src:url(../fonts/zh-dash.woff2) format("woff2");font-display:swap;unicode-range:U+2014}
/* Long Cang 은 「时」를 번체 「時」 꼴로, 「—」를 끊어진 두 토막으로 그린다. 그 두 글자만 같은 붓글씨 계열인 Ma Shan Zheng 에서 떼어 와 먼저 쓴다 */
@font-face{font-family:"MG Shi";src:url(../fonts/zh-shi.woff2) format("woff2");font-display:swap;unicode-range:U+2014,U+65F6}
html[lang="zh"]{
  --l-hand:"LXGW WenKai",; --l-hand2:"MG Shi","Long Cang",; --l-hand3:"ZCOOL KuaiLe",;
  --l-serif:"Noto Serif SC",; --l-old:"MG Hui","ZCOOL XiaoWei",; --l-sans:"Noto Sans SC",; --l-heavy:"ZCOOL QingKe HuangYou",; --l-brush:"Ma Shan Zheng",;
  --l-mono:"Noto Sans SC",; --l-type:"MG Dash","Special Elite","Noto Sans SC",; --l-pixel:"Noto Sans SC",; --l-cjk:"Noto Sans SC",;
}

/* 제목은 어느 언어에서나 로마자라 타자기 글꼴 그대로 */
.cab-title{font-family:"Special Elite",var(--f-type)}

/* 일본어·중국어는 글자 사이 어디서나 줄을 바꾼다. base.css 의 keep-all(한국어 낱말을 지키는 설정)을 그대로 두면 「、」「。」에서만 줄이 바뀌어
 * 수첩처럼 좁은 칸에서 「※」만 한 줄에 남고 줄 끝이 들쭉날쭉해진다. 줄머리 금칙(「。」「ー」로 줄을 시작하지 않기)은 strict 로 지킨다 */
html:is([lang="ja"],[lang="zh"]) :is(body,.c-q,.c-bub,.rep-memo,.rep-empty){word-break:normal;line-break:strict}
/* 큰 손글씨 메모와 제목은 짧아서 낱말 중간에서 끊기면 「いつなの/か？」처럼 한두 글자가 남는다. 일본어는 구절 단위(auto-phrase, 크롬)로, 못 쓰는 브라우저와 중국어는 문장부호에서 끊는다 */
html[lang="ja"] :is(.scrawl,h1,h2,h3){word-break:keep-all;word-break:auto-phrase}
html[lang="zh"] .scrawl{word-break:keep-all}
/* 일본어 표 칸은 말마디에서만 꺾는다 (フランク・デル/ガド 대신). 지원하지 않는 브라우저는 글자 사이에서 꺾는다 */
html[lang="ja"] .b-tbl :is(td,th){word-break:normal;word-break:auto-phrase}
