:root {
  /* 글자 크기(모바일 기본) · 행간 · 자간 */
  --fs-display: 40px;
  --fs-h2: 30px;
  --fs-h3: 20px;
  --fs-body: 16px;
  --fs-small: 14px;
  --fs-caption: 13px;
  --lh-display: 1.15;
  --lh-h2: 1.25;
  --lh-h3: 1.35;
  --lh-body: 1.65;
  --lh-small: 1.5;
  --lh-caption: 1.5;
  --ls-heading: -0.02em;
  --ls-body: 0;
  /* 간격 — 4px 배수만 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --section-y: 64px;
  --gutter: 20px;
  --container: 1200px;
  /* 글자색 — 대비 AA 이상(흰 바탕에 #111 18.9:1 · #555 7.5:1). 색은 사이트가 정한다 — 바꿀 때도 4.5:1 이상(24px 이상 큰 글씨 3:1) */
  --color-text: #111111;
  --color-text-muted: #555555;
  --color-bg: #ffffff;
  /* 터치 · 안전 영역(노치·홈바 — viewport-fit=cover 일 때 값이 생긴다) */
  --tap-min: 44px;
  --tap-gap: 8px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}
@media (min-width: 768px) {
  :root {
    --fs-display: clamp(40px, 5.9524vw - 5.7143px, 80px);
    --fs-h2: clamp(30px, 1.1905vw + 20.8571px, 38px);
    --fs-h3: clamp(20px, 0.744vw + 14.2857px, 25px);
    --fs-body: clamp(16px, 0.2976vw + 13.7143px, 18px);
    --section-y: clamp(64px, 4.7619vw + 27.4286px, 96px);
  }
}

/* 기본 규칙(규칙 B) — :where() 특이도 0 */
:where(html) { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
:where(body) { font-size: var(--fs-body); line-height: var(--lh-body); letter-spacing: var(--ls-body); color: var(--color-text); background-color: var(--color-bg); }
:where(h1) { font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: var(--ls-heading); }
:where(h2) { font-size: var(--fs-h2); line-height: var(--lh-h2); letter-spacing: var(--ls-heading); }
:where(h3) { font-size: var(--fs-h3); line-height: var(--lh-h3); letter-spacing: var(--ls-heading); }
:where(small) { font-size: var(--fs-small); line-height: var(--lh-small); }
/* 입력칸 16px 이상(iOS 자동 확대 방지) · 높이 44px 이상 */
:where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="hidden"], [type="file"], [type="image"]), select, textarea) { font-size: max(16px, 1em); min-height: var(--tap-min); }
:where(button, [role="button"], input[type="button"], input[type="submit"], input[type="reset"]) { min-height: var(--tap-min); }
:where(.hm-tap) { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap-min); min-height: var(--tap-min); }
:where(a, button, [role="button"], label, summary) { touch-action: manipulation; }
/* 이미지·영상은 칸을 넘지 않는다(비율 유지) */
:where(img, video) { max-width: 100%; height: auto; }
/* 화면 높이 — 100vh 대신(모바일 주소창 대응) */
:where(.hm-full-h) { min-height: 100vh; min-height: 100svh; min-height: 100dvh; }
/* 움직임 줄이기 설정이면 장식 애니메이션 끄기(규칙 B5) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

:root {
  --fs-hero: clamp(36px, 4.8vw + 18px, 72px);
  --fs-section: clamp(32px, 3.6vw + 16px, 64px);
  --fs-page: clamp(32px, 2.4vw + 22px, 54px);
  --fs-lead: clamp(17px, 0.4vw + 15px, 18px);
  --fs-deco: clamp(48px, 8vw, 150px);
  --space-9: 96px;
  --space-10: 120px;
  --wrap: 1424px;
}
