/* 선택 글꼴 (설정 → 글꼴). 브라우저는 실제로 쓰는 글꼴 파일만 내려받습니다.
   - @import 는 파일 맨 위에 있어야 동작합니다.
   - 나눔스퀘어: cdn.rawgit.com 은 2019년 종료 → 같은 저장소의 jsDelivr 주소 사용
   - 마루부리: 굵기마다 파일 하나씩 (같은 굵기를 여러 번 선언하면 마지막 것만 쓰여 본문이 가장 얇게 보이는 문제가 있었음) */
@import url("https://cdn.jsdelivr.net/gh/moonspam/NanumSquare@2.0/nanumsquare.css");

@font-face { font-family: "BookkMyungjo"; src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2302@1.0/BookkMyungjo-Lt.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "BookkMyungjo"; src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2302@1.0/BookkMyungjo-Bd.woff2") format("woff2"); font-weight: 700; font-display: swap; }

@font-face { font-family: "Hippie"; src: url("https://cdn.jsdelivr.net/gh/Project-Noonnu/2610081905@hippie/hippie/hippie_히피체.woff2") format("woff2"); font-weight: 400; font-display: swap; }

@font-face { font-family: "JoseonGulim"; src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_20-04@1.0/ChosunGu.woff") format("woff"); font-weight: 400; font-display: swap; }

@font-face { font-family: "MaruBuri"; src: url("https://hangeul.pstatic.net/hangeul_static/webfont/MaruBuri/MaruBuri-ExtraLight.woff2") format("woff2"); font-weight: 200; font-display: swap; }
@font-face { font-family: "MaruBuri"; src: url("https://hangeul.pstatic.net/hangeul_static/webfont/MaruBuri/MaruBuri-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "MaruBuri"; src: url("https://hangeul.pstatic.net/hangeul_static/webfont/MaruBuri/MaruBuri-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "MaruBuri"; src: url("https://hangeul.pstatic.net/hangeul_static/webfont/MaruBuri/MaruBuri-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "MaruBuri"; src: url("https://hangeul.pstatic.net/hangeul_static/webfont/MaruBuri/MaruBuri-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

@font-face { font-family: "GangBujangNim"; src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/naverfont_06@1.0/Kangbujang.woff") format("woff"); font-weight: 400; font-display: swap; }

@font-face { font-family: "NanumSquareRound"; src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_two@1.0/NanumSquareRound.woff") format("woff"); font-weight: 400; font-display: swap; }

/* 선택한 글꼴을 화면 전체(--sans)와 글 본문(--serif)에 적용. 글꼴이 없거나 늦게 오면 기본 글꼴로 대체 */
:root[data-font="bookk"]      { --sans: "BookkMyungjo", "Noto Serif KR", serif; --serif: "BookkMyungjo", "Noto Serif KR", serif; }
:root[data-font="hippie"]     { --sans: "Hippie", "Noto Sans KR", sans-serif; --serif: "Hippie", "Noto Sans KR", sans-serif; }
:root[data-font="joseon"]     { --sans: "JoseonGulim", "Noto Sans KR", sans-serif; --serif: "JoseonGulim", "Noto Serif KR", serif; }
:root[data-font="maruburi"]   { --sans: "MaruBuri", "Noto Serif KR", serif; --serif: "MaruBuri", "Noto Serif KR", serif; }
:root[data-font="gangbujang"] { --sans: "GangBujangNim", "Noto Sans KR", sans-serif; --serif: "GangBujangNim", "Noto Sans KR", sans-serif; }
:root[data-font="nanumsquare"]{ --sans: "NanumSquare", "Noto Sans KR", sans-serif; --serif: "NanumSquare", "Noto Sans KR", sans-serif; }
:root[data-font="nanumround"] { --sans: "NanumSquareRound", "Noto Sans KR", sans-serif; --serif: "NanumSquareRound", "Noto Sans KR", sans-serif; }
