/* mih_tool 디자인 토큰 — 값만 둔다(DESIGN.md). 부품·화면은 이 이름만 쓴다. 틀: ireh tokens.css(이름 같음).
   방향: 가벼운 운영 콘솔. 바탕은 아주 옅은 라벤더 회색, 사이드바는 라벤더, 주색은 보라 한 가지(그라데이션 없음).
   분야 색(가수 산호·강연자 청록·사회자 파랑)은 뜻을 가진 색으로만 쓴다. 라이트가 기본, 다크는 시스템 설정 또는 data-theme="dark". */

:root {
  /* 바탕·글자 */
  --bg: #f7f6fb;
  --surface: #ffffff;
  --surface-2: #f3f1f9;
  --surface-3: #e9e6f3;
  --text: #1c1830;
  --text-2: #48435c;
  --text-3: #686380;
  --border: #e7e4ef;
  --border-strong: #d0cbe0;
  --overlay: rgba(20, 16, 40, .5);

  /* 주색(보라) — 버튼·링크·켜짐. 작은 글자는 -ink */
  --primary: #5f43d6;
  --primary-hover: #4f34c2;
  --primary-ink: #5134c4;
  --primary-soft: #efebfd;
  --primary-line: #d9d0fb;
  --on-primary: #ffffff;
  --focus: #6d52e6;

  /* 사이드바(라벤더) */
  --side-bg: #f1eefb;
  --side-border: #e4dff5;
  --side-text: #4a4462;
  --side-hover: #e7e2f8;
  --side-active-bg: #ffffff;
  --side-active-text: #4a2fc0;

  /* 분야(가수·공연팀 / 강연자·명사 / 사회자·MC) — 배지·그룹 줄 색 */
  --field-singer: #b4461b;   --field-singer-soft: #fdefe7;
  --field-speaker: #0d7268;  --field-speaker-soft: #e2f4f1;
  --field-host: #2650c9;     --field-host-soft: #e8eefd;

  /* 상태 */
  --success: #0f7a4a;
  --success-soft: #e3f5ec;
  --warn: #8a5300;
  --warn-strong: #945700;   /* 흰 글자 대비 4.5 이상(경고 버튼) */
  --warn-soft: #fff3dc;
  --danger: #c4231d;
  --danger-soft: #fde8e7;
  --on-danger: #ffffff;

  /* 툴팁·토스트(라이트는 짙은 바탕) */
  --tip-bg: #1f1a35;
  --tip-text: #f4f2fb;
  --tip-ok: #6ee0aa;
  --tip-err: #ff9a94;
  --tip-warn: #ffc966;

  /* 간격 */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-7: 32px; --space-8: 48px;

  /* 글자 — 본문 15(콘솔). 12px 미만 없음 */
  --text-xs: 12px; --text-sm: 13px; --text-md: 15px; --text-lg: 17px;
  --text-xl: 20px; --text-2xl: 24px; --text-3xl: 32px;
  --leading-tight: 1.3;
  --leading-normal: 1.6;
  --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;
  --font-mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;   /* 영문 키·모델 ID 에만(한글 넣지 않음) */

  /* 모서리·그림자·높이 */
  --r-sm: 6px; --r: 10px; --r-lg: 14px; --r-full: 999px;
  --shadow-1: 0 1px 2px rgba(28, 24, 48, .06);
  --shadow-card: 0 1px 2px rgba(28, 24, 48, .04), 0 6px 18px -10px rgba(40, 28, 90, .14);
  --shadow-2: 0 18px 44px -16px rgba(28, 20, 70, .3);
  --control-h-sm: 36px; --control-h-md: 44px; --control-h-lg: 52px;

  /* 폭 */
  --side-w: 248px;
  --topbar-h: 60px;
  --page-max: 1240px;
  --gutter: 16px;

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

  color-scheme: light;
}

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

/* 다크 — 시스템 설정(사용자가 라이트를 고르지 않았을 때)과 직접 고름은 같은 값 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #13111c; --surface: #1b1827; --surface-2: #221e31; --surface-3: #2c273f;
    --text: #ece9f6; --text-2: #bdb7d2; --text-3: #9a93b3;
    --border: #2b2640; --border-strong: #3d3657; --overlay: rgba(0, 0, 0, .62);
    --primary: #8f7bff; --primary-hover: #a595ff; --primary-ink: #b2a4ff; --primary-soft: #2a2350; --primary-line: #463c80; --on-primary: #120c2c; --focus: #a595ff;
    --side-bg: #171424; --side-border: #262138; --side-text: #bdb7d2; --side-hover: #221e33; --side-active-bg: #2a2350; --side-active-text: #d6ceff;
    --field-singer: #ff9d72; --field-singer-soft: #3a2018; --field-speaker: #5fd3c4; --field-speaker-soft: #11302c; --field-host: #8fb0ff; --field-host-soft: #1a2546;
    --success: #5fd49a; --success-soft: #0f2f22; --warn: #f5c060; --warn-strong: #f5c060; --warn-soft: #33260b; --danger: #ff8a85; --danger-soft: #3a1414; --on-danger: #1b0505;
    --tip-bg: #ece9f6; --tip-text: #1c1830; --tip-ok: #0f7a4a; --tip-err: #c4231d; --tip-warn: #8a5300;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, .3); --shadow-2: 0 18px 44px -16px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #13111c; --surface: #1b1827; --surface-2: #221e31; --surface-3: #2c273f;
  --text: #ece9f6; --text-2: #bdb7d2; --text-3: #9a93b3;
  --border: #2b2640; --border-strong: #3d3657; --overlay: rgba(0, 0, 0, .62);
  --primary: #8f7bff; --primary-hover: #a595ff; --primary-ink: #b2a4ff; --primary-soft: #2a2350; --primary-line: #463c80; --on-primary: #120c2c; --focus: #a595ff;
  --side-bg: #171424; --side-border: #262138; --side-text: #bdb7d2; --side-hover: #221e33; --side-active-bg: #2a2350; --side-active-text: #d6ceff;
  --field-singer: #ff9d72; --field-singer-soft: #3a2018; --field-speaker: #5fd3c4; --field-speaker-soft: #11302c; --field-host: #8fb0ff; --field-host-soft: #1a2546;
  --success: #5fd49a; --success-soft: #0f2f22; --warn: #f5c060; --warn-strong: #f5c060; --warn-soft: #33260b; --danger: #ff8a85; --danger-soft: #3a1414; --on-danger: #1b0505;
  --tip-bg: #ece9f6; --tip-text: #1c1830; --tip-ok: #0f7a4a; --tip-err: #c4231d; --tip-warn: #8a5300;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .3); --shadow-2: 0 18px 44px -16px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
