/* 셀프호스팅 웹폰트 — 외부 CDN 요청 0건.
 *
 * 왜 셀프호스팅인가: 예전엔 jsDelivr·hangeul.pstatic.net·fonts.googleapis.com에서
 * 받았다. 그러면 방문자 IP·UA가 그 세 곳(둘은 Google)에 닿는데 처리방침엔 적혀
 * 있지 않았고, 남의 CDN 장애가 곧 우리 폰트 깨짐이었다(중국에선 Google Fonts 차단).
 * 전부 /fonts/로 옮겨서 제3자 요청 자체를 없앴다. preconnect 4줄과 noscript 폴백도
 * 같이 사라졌다 — 동일 출처라 비동기 로딩 트릭이 필요 없다.
 *
 * woff2만 둔다: 앱이 <script type="module">이라 woff2 미지원 브라우저는 애초에
 * 앱을 못 돌린다. woff·eot·ttf 폴백은 죽은 무게였다.
 *
 * 라이선스: 셋 다 SIL OFL 1.1. 전문은 같은 디렉터리 LICENSE-*.txt.
 *
 * ⚠ 캐시 규칙 (vercel.json) — 폰트를 교체할 땐 반드시 읽을 것.
 * /fonts/*.woff2 는 1년 immutable이다. 남의 CDN이 붙여주던 캐시(jsDelivr 실측
 * max-age=31536000, immutable)를 셀프호스팅하면서 잃었더니 Vercel 기본값
 * max-age=0, must-revalidate로 떨어져, 재방문자가 폰트 개수만큼 검증 왕복을
 * 매 페이지 로드마다 물게 됐다. 그래서 되돌려놨다.
 *
 * 대신 파일명에 콘텐츠 해시가 없으므로 immutable이 곧 "1년간 전파 불가"다.
 * **폰트 파일을 교체하면 파일명을 반드시 바꿀 것** (Pretendard-Regular.woff2 →
 * Pretendard-Regular-v2.woff2). 이름을 그대로 두면 기존 방문자는 최대 1년간
 * 옛 폰트를 계속 본다. 이 파일(fonts.css)만 max-age=86400이라 한자 서브셋
 * 갱신(unicode-range 교체)은 하루 안에 전파된다.
 */

/* Pretendard v1.3.9 — 본문. 앱이 쓰는 4굵기만(400/600/700/800).
 * local()은 원본 CDN CSS 그대로 유지 — 설치돼 있으면 내려받지 않는다. */
@font-face {
  font-family: 'Pretendard';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Pretendard Regular'), url('/fonts/Pretendard-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Pretendard';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: local('Pretendard SemiBold'), url('/fonts/Pretendard-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Pretendard';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local('Pretendard Bold'), url('/fonts/Pretendard-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Pretendard';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: local('Pretendard ExtraBold'), url('/fonts/Pretendard-ExtraBold.woff2') format('woff2');
}

/* 마루 부리 Regular — 카드 제목 세리프.
 * Apple Myungjo는 애플 기기 전용이라 웹폰트 없이는 안드로이드·윈도우에서
 * 시스템 세리프로 붕괴한다(2026-07-19 디자인 진단 ①).
 * 원본 네이버 CSS가 Regular만 'MaruBuri'로 등록했으므로 여기서도 Regular만 둔다
 * (굵게는 기존과 동일하게 합성 볼드). */
@font-face {
  font-family: 'MaruBuri';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/MaruBuri-Regular.woff2') format('woff2');
}

/* Noto Serif KR 한자 서브셋(23KB) — 마루부리엔 한자 글리프가 없어
 * 간지·신살 한자(丙戌 등)가 기기 폴백으로 갈라진다(안드로이드=산세리프).
 * 앱이 쓰는 한자 117자만 담은 서브셋. unicode-range 덕에 한자가 없는 화면에선
 * 아예 내려받지 않는다.
 *
 * 새 한자가 데이터에 추가되면 이 파일을 재생성할 것:
 *   1) data/*.json·src에서 CJK 정규식([一-鿿])으로 한자 수집
 *   2) https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@400&text=<수집한 한자>&display=swap
 *      를 최신 브라우저 UA로 요청 → 응답 CSS의 woff2 URL과 unicode-range를 얻는다
 *   3) woff2를 NotoSerifKR-hanja-subset.woff2로 저장하고 아래 unicode-range를 교체 */
@font-face {
  font-family: 'Noto Serif KR';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/NotoSerifKR-hanja-subset.woff2') format('woff2');
  unicode-range: U+4e01, U+4e03, U+4e11, U+4e19, U+4e2d, U+4e59, U+4ea1, U+4ea5, U+4eba, U+504f, U+50b7, U+5143, U+51a0, U+5203, U+524b, U+52ab, U+5341, U+5348, U+536f-5370, U+540c, U+55d4, U+571f, U+5893, U+58ec, U+5927, U+5929-592a, U+5b50, U+5b98, U+5bc5, U+5c07, U+5df1, U+5df3, U+5e1d, U+5e36, U+5e72, U+5e9a, U+5efa, U+5fb7, U+61f8, U+620a, U+620c, U+6211, U+6578, U+6587, U+65e5, U+65f6, U+65fa, U+660c, U+660e, U+661f, U+6625, U+665a, U+6697, U+6708, U+6728, U+672a, U+67f1, U+6843, U+6975, U+6b63, U+6b72, U+6b7b, U+6bba, U+6bd4, U+6c23, U+6c34, U+6c90, U+6d74, U+706b, U+7384, U+751f, U+7532-7533, U+75c5, U+7678, U+767d, U+795e, U+797f, U+7a7a, U+7acb, U+7b97, U+7bc0, U+7d05, U+7d76, U+7f61, U+7f8a, U+80a9, U+80ce, U+8276, U+82b1, U+83ef, U+84cb, U+864e, U+8870, U+8ca1, U+8cb4, U+8d64, U+8eab, U+8f3f, U+8f9b, U+8fb0, U+9041, U+904b, U+9149, U+91d1, U+91dd, U+9577, U+9580, U+95dc, U+9751, U+98df, U+990a, U+9918, U+99ac, U+9a5b, U+9b3c, U+9b41, U+9ec3, U+9f20;
}

