/*
 * 엘라스쿨 폰트 시스템
 * NanumSquareNeo Variable (로컬) — 렌더링 차단 없음
 * 다국어 폰트는 product2.html에서만 비동기 로딩
 */

/* NanumSquareNeo Variable Font (local — 즉시 로딩) */
@font-face {
  font-family: 'NanumSquareNeo';
  src: url('/assets/webfonts/woff2/NanumSquareNeo-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* CSS Variables */
:root {
  --font-main: 'NanumSquareNeo', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-kr: 'NanumSquareNeo', sans-serif;
  --font-en: 'Inter', 'Noto Sans', sans-serif;
  --font-ja: 'Noto Sans JP', 'Inter', sans-serif;
  --font-zh: 'Noto Sans SC', 'Inter', sans-serif;
  --font-vi: 'Noto Sans', 'Inter', sans-serif;
  --font-ru: 'Inter', 'Noto Sans', sans-serif;
  --font-th: 'Noto Sans Thai', 'Noto Sans', sans-serif;
  --font-id: 'Inter', 'Noto Sans', sans-serif;
  --font-mn: 'Noto Sans Mongolian', 'Noto Sans', sans-serif;
  --font-es: 'Inter', 'Noto Sans', sans-serif;
}

/* Global font default — NanumSquareNeo 우선 */
html, body,
*, *::before, *::after {
  font-family: var(--font-main) !important;
}

a, p, span, h1, h2, h3, h4, h5, h6,
li, td, th, label, input, textarea, select, button {
  font-family: var(--font-main) !important;
}

/* Korean (ko) — 기본 */
html[lang="ko"],
html[lang="ko"] body,
html[lang="ko"] * {
  font-family: var(--font-kr) !important;
  word-break: keep-all;
}

/* ── 다국어 규칙 (Google Fonts 로딩 후 적용됨) ── */

html[lang="en"], html[lang="en"] body, html[lang="en"] * {
  font-family: var(--font-en) !important;
}
html[lang="ja"], html[lang="ja"] body, html[lang="ja"] * {
  font-family: var(--font-ja) !important;
  word-break: keep-all;
}
html[lang="zh"], html[lang="zh"] body, html[lang="zh"] * {
  font-family: var(--font-zh) !important;
}
html[lang="vi"], html[lang="vi"] body, html[lang="vi"] * {
  font-family: var(--font-vi) !important;
}
html[lang="ru"], html[lang="ru"] body, html[lang="ru"] * {
  font-family: var(--font-ru) !important;
}
html[lang="th"], html[lang="th"] body, html[lang="th"] * {
  font-family: var(--font-th) !important;
}
html[lang="id"], html[lang="id"] body, html[lang="id"] * {
  font-family: var(--font-id) !important;
}
html[lang="mn"], html[lang="mn"] body, html[lang="mn"] * {
  font-family: var(--font-mn) !important;
}
html[lang="es"], html[lang="es"] body, html[lang="es"] * {
  font-family: var(--font-es) !important;
}
