/* 디자인 토큰은 이 파일의 :root 에서만 정의한다. 그 밖에서는 var(--이름)으로만 쓴다. */

:root {
  color-scheme: light dark;

  /* 바탕과 글자 */
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --faint: #86868b;
  --hair: #d2d2d7;
  --accent: #0071e3;
  --accent-text: #ffffff;
  --focus: #0071e3;
  --strong-ring: #1d1d1f;
  --danger: #d70015;
  --warn-bg: #fff4d6;
  --warn-text: #7a5300;
  --shadow: 0 1px 2px rgb(0 0 0 / 4%), 0 8px 24px rgb(0 0 0 / 6%);
  --overlay: rgb(0 0 0 / 32%);

  /* 오행 색: 기본(점·도형), 옅은 바탕, 글자(흰 바탕 대비 4.5:1 이상) */
  --wood: #34c759;
  --wood-soft: #e4f7e8;
  --wood-ink: #1d7a35;
  --fire: #ff3b30;
  --fire-soft: #ffe6e4;
  --fire-ink: #c4141c;
  --earth: #ffcc00;
  --earth-soft: #fff5d1;
  --earth-ink: #856200;
  --metal: #8e8e93;
  --metal-soft: #ededf0;
  --metal-ink: #555559;
  --water: #007aff;
  --water-soft: #e1eeff;
  --water-ink: #0057c2;
  --good: #34c759;
  --bad: #ff3b30;

  --ch-icon: 28px;
  --ch-icon-sm: 22px;
  --ch-icon-lg: 44px;
  --card-art-size: 112px;
  --card-art-corner: 64px;
  --person-size: 88px;
  --self-art-size: 96px;
  --sinsal-art-size: 64px;
  --ch-icon-xs: 18px;
  --job-icon-size: 56px;
  --nav-icon-size: 36px;

  /* 글꼴 (외부 글꼴을 불러오지 않는다. 설치돼 있으면 Pretendard, 애플 기기는 Apple SD Gothic Neo) */
  --font: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', system-ui, sans-serif;
  --font-hanja: 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Serif KR', serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: 2.25rem;
  --fs-hero: 2.5rem;
  --fs-hero-lg: 3.5rem;
  --fs-glyph: 1.75rem;
  --fs-glyph-lg: 2.25rem;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --leading: 1.6;
  --leading-tight: 1.2;
  --tracking-tight: -0.022em;

  /* 간격 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 48px;
  --space-9: 72px;

  /* 모서리 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* 크기 */
  --page-width: 1080px;
  --form-width: 520px;
  --reading-width: 680px;
  --tap-size: 44px;
  --button-size: 52px;
  --border-width: 1px;
  --ring-width: 2px;
  --header-height: 52px;
  --report-nav-height: 84px;
  --animal-size: 132px;
  --animal-size-lg: 168px;
  --donut-size: 220px;
  --cycle-size: 320px;
  --timeline-card: 84px;
  --tile-size: 48px;
  --bar-height: 8px;
  --check-size: 22px;
  --popover-width: 300px;
  --list-height: 260px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --faint: #8e8e93;
    --hair: #38383a;
    --accent: #2997ff;
    --accent-text: #000000;
    --focus: #2997ff;
    --strong-ring: #f5f5f7;
    --danger: #ff6961;
    --warn-bg: #3a2f0b;
    --warn-text: #ffd966;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%);
    --overlay: rgb(0 0 0 / 60%);
    --wood: #30d158;
    --wood-soft: #10301a;
    --wood-ink: #4be37a;
    --fire: #ff453a;
    --fire-soft: #3a1513;
    --fire-ink: #ff7a70;
    --earth: #ffd60a;
    --earth-soft: #352c08;
    --earth-ink: #ffd84d;
    --metal: #98989d;
    --metal-soft: #2a2a2d;
    --metal-ink: #c7c7cc;
    --water: #0a84ff;
    --water-soft: #0b2440;
    --water-ink: #64a8ff;
    --good: #30d158;
    --bad: #ff453a;
  }
}
