/* 이레솔루션 디자인 토큰 — 값만 둔다(DESIGN.md §2). 부품·화면은 이 이름만 쓴다.
   색 출처: 로고 그라데이션 시안(#00D5FF 근처) → 파랑(#1F6BF0) → 남색(#0A1A4F).
   라이트가 기본, 다크는 시스템 설정 또는 data-theme="dark". 첫 화면(남색 바탕)은 두 테마 모두 남색. */

:root {
  /* 바탕·글자 */
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --surface-3: #e2e8f2;
  --text: #0b1530;
  --text-2: #3f4b66;
  --text-3: #5b6680;
  --border: #e1e6ef;
  --border-strong: #c6cfde;
  --overlay: rgba(4, 10, 28, .55);

  /* 주색(파랑) — 버튼·링크. 작은 글자는 -ink */
  --primary: #1d4fd7;
  --primary-hover: #163fb3;
  --primary-ink: #1a47c2;
  --primary-soft: #e7eefe;
  --on-primary: #ffffff;
  --focus: #1d4fd7;

  /* 강조(하늘색) — 남색 위 강조·작은 표시에만 */
  --accent: #36c6f2;
  --accent-hover: #6ad6f7;
  --on-accent: #06173d;
  --accent-ink: #0a6f96;      /* 밝은 바탕 위 하늘색 글자(대비 4.5 이상) */

  /* 남색(첫 화면·문의 띠·관리자 머리말) — 테마와 무관 */
  --navy-950: #071434;
  --navy-900: #0b1c47;
  --navy-800: #13296a;
  --navy-line: rgba(255, 255, 255, .12);
  --on-navy: #ffffff;
  --on-navy-2: #c3cee6;
  --on-navy-3: #9fb0d4;
  --cyan-300: #7ddcfa;
  --brand-gradient: linear-gradient(120deg, #36c6f2 0%, #2a7bf0 48%, #1d3fbf 100%);

  /* 상태 */
  --success: #0f7a4a;
  --success-soft: #e3f5ec;
  --warn: #8a5300;
  --warn-soft: #fff1d6;
  --danger: #c4231d;
  --danger-soft: #fde8e7;
  --on-danger: #ffffff;

  /* 툴팁·토스트(라이트는 짙은 바탕) */
  --tip-bg: #0b1530;
  --tip-text: #f2f5fb;
  --tip-ok: #5fe0a4;
  --tip-err: #ff8f8a;

  /* 관리자 틀(§5 — 지금 어느 쪽인지 바로 보이게) */
  --admin-bar: #0b1c47;
  --admin-bar-text: #ffffff;
  --admin-tag: #36c6f2;
  --admin-side: #ffffff;

  /* 간격 */
  --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: 64px; --space-10: 96px;   /* 랜딩 칸 사이(넉넉한 여백)에만 */

  /* 글자 — 본문 16. 12px 미만 없음 */
  --text-xs: 12px; --text-sm: 14px; --text-md: 16px; --text-lg: 18px;
  --text-xl: 20px; --text-2xl: 24px; --text-3xl: 32px;
  --display-sm: clamp(30px, 6vw, 40px);   /* 칸 제목 */
  --display: clamp(36px, 7.4vw, 64px);     /* 첫 화면 제목 */
  --display-num: clamp(44px, 9vw, 88px);   /* 전후 숫자 */
  --leading-tight: 1.25;
  --leading-normal: 1.65;
  --weight-normal: 400; --weight-medium: 500; --weight-bold: 700; --weight-heavy: 800;
  --tracking-tight: -0.02em;
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;

  /* 모서리·그림자·높이 */
  --r-sm: 8px; --r: 12px; --r-lg: 20px; --r-xl: 28px; --r-full: 999px;
  --shadow-1: 0 1px 2px rgba(11, 21, 48, .06);
  --shadow-card: 0 1px 2px rgba(11, 21, 48, .04), 0 8px 24px -12px rgba(11, 21, 48, .12);
  --shadow-2: 0 18px 48px -16px rgba(11, 21, 48, .28);
  --control-h-sm: 40px; --control-h-md: 48px; --control-h-lg: 56px;

  /* 폭 */
  --container: 1200px;
  --container-narrow: 760px;
  --gutter: 20px;

  /* 움직임 */
  --dur: 180ms;
  --dur-slow: 480ms;
  --ease: cubic-bezier(.2, .7, .2, 1);

  color-scheme: light;
}

@media (min-width: 600px) { :root { --gutter: 32px; } }

/* 다크 — 시스템 설정(사용자가 라이트를 고르지 않았을 때) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #050d22;
    --surface: #0b1631;
    --surface-2: #111f42;
    --surface-3: #1a2a55;
    --text: #e9eef8;
    --text-2: #b6c0d6;
    --text-3: #93a0bb;
    --border: #1c2a50;
    --border-strong: #2c3d6b;
    --overlay: rgba(0, 0, 0, .66);
    --primary: #5b8cff;
    --primary-hover: #7aa2ff;
    --primary-ink: #8fb0ff;
    --primary-soft: #14275a;
    --on-primary: #04102b;
    --focus: #7ddcfa;
    --accent-ink: #7ddcfa;
    --navy-950: #040c22;
    --navy-900: #0a1838;
    --success: #5fd49a; --success-soft: #0f2f22;
    --warn: #f5c060;    --warn-soft: #33260b;
    --danger: #ff8a85;  --danger-soft: #3a1414; --on-danger: #1b0505;
    --tip-bg: #e9eef8; --tip-text: #0b1530; --tip-ok: #0f7a4a; --tip-err: #c4231d;
    --admin-bar: #0a1838; --admin-side: #0b1631;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-2: 0 18px 48px -16px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
/* 다크 — 사용자가 직접 고름 */
:root[data-theme="dark"] {
  --bg: #050d22;
  --surface: #0b1631;
  --surface-2: #111f42;
  --surface-3: #1a2a55;
  --text: #e9eef8;
  --text-2: #b6c0d6;
  --text-3: #93a0bb;
  --border: #1c2a50;
  --border-strong: #2c3d6b;
  --overlay: rgba(0, 0, 0, .66);
  --primary: #5b8cff;
  --primary-hover: #7aa2ff;
  --primary-ink: #8fb0ff;
  --primary-soft: #14275a;
  --on-primary: #04102b;
  --focus: #7ddcfa;
  --accent-ink: #7ddcfa;
  --navy-950: #040c22;
  --navy-900: #0a1838;
  --success: #5fd49a; --success-soft: #0f2f22;
  --warn: #f5c060;    --warn-soft: #33260b;
  --danger: #ff8a85;  --danger-soft: #3a1414; --on-danger: #1b0505;
  --tip-bg: #e9eef8; --tip-text: #0b1530; --tip-ok: #0f7a4a; --tip-err: #c4231d;
  --admin-bar: #0a1838; --admin-side: #0b1631;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-2: 0 18px 48px -16px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
