/* homepan 디자인 토큰 — 값만 둔다(DESIGN.md). 부품·화면은 이 이름만 쓴다. 틀: mih_tool tokens.css(이름 같음, 값만 바꿈).
   방향: 「원고 작업대」. 바탕은 따뜻한 종이색, 사이드바는 옅은 세이지, 주색은 깊은 초록 한 가지(그라데이션 없음).
   노랑은 「사실 확인 필요」, 파랑 점선은 「내 생각 자리」 — 원고 검수 표시에만 쓰는 뜻 있는 색.
   분야 색은 분야 이름을 모른다: 플러그인이 tone(rose·blue·amber·teal·violet·slate) 중 하나를 고른다.
   라이트가 기본, 다크는 시스템 설정 또는 data-theme="dark". */

:root {
  /* 바탕·글자 */
  --bg: #f6f4ee;
  --surface: #ffffff;
  --surface-2: #f2efe6;
  --surface-3: #e8e4d8;
  --text: #1d211e;
  --text-2: #444a45;
  --text-3: #626a64;
  --border: #e4e0d4;
  --border-strong: #cdc7b6;
  --overlay: rgba(20, 24, 20, .5);

  /* 주색(초록) — 버튼·링크·켜짐. 작은 글자는 -ink */
  --primary: #17694f;
  --primary-hover: #105740;
  --primary-ink: #135c45;
  --primary-soft: #e3f1ea;
  --primary-line: #bcdccc;
  --on-primary: #ffffff;
  --focus: #1f8a68;

  /* 사이드바(세이지) */
  --side-bg: #edf0e9;
  --side-border: #dde3d6;
  --side-text: #3f4740;
  --side-hover: #e1e7da;
  --side-active-bg: #ffffff;
  --side-active-text: #135c45;

  /* 분야 색 묶음(플러그인 tone) — 배지·카드 띠 */
  --tone-rose: #b3364f;   --tone-rose-soft: #fbe9ed;
  --tone-blue: #2554b8;   --tone-blue-soft: #e7eefc;
  --tone-amber: #8f5a00;  --tone-amber-soft: #fdf1d8;
  --tone-teal: #0d6f68;   --tone-teal-soft: #dff3f0;
  --tone-violet: #5a3fc4; --tone-violet-soft: #eeeafd;
  --tone-slate: #4a5560;  --tone-slate-soft: #eceff2;

  /* 원고 검수 표시 */
  --mark-fact: #fff0b8;        /* 사실 확인 필요 — 형광펜 노랑 */
  --mark-fact-line: #d9a300;
  --mark-mine: #2554b8;        /* 내 생각 자리 — 파랑 점선 */
  --mark-mine-soft: #eef3fd;
  --mark-risk: #c4231d;        /* 경험 문장 의심 */

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

  /* 툴팁·토스트(라이트는 짙은 바탕) */
  --tip-bg: #1f2a24;
  --tip-text: #f3f6f2;
  --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-read(네이버 본문 크기 비슷하게) */
  --text-xs: 12px; --text-sm: 13px; --text-md: 15px; --text-lg: 17px;
  --text-xl: 20px; --text-2xl: 24px; --text-3xl: 32px;
  --text-read: 16px;
  --leading-tight: 1.3;
  --leading-normal: 1.6;
  --leading-read: 1.85;
  --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(30, 36, 28, .06);
  --shadow-card: 0 1px 2px rgba(30, 36, 28, .04), 0 8px 20px -12px rgba(30, 50, 36, .18);
  --shadow-2: 0 18px 44px -16px rgba(20, 40, 28, .3);
  --control-h-sm: 36px; --control-h-md: 44px; --control-h-lg: 52px;

  /* 폭 */
  --side-w: 232px;
  --topbar-h: 60px;
  --page-max: 1320px;
  --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: #121512; --surface: #1a1e1b; --surface-2: #212622; --surface-3: #2a302b;
    --text: #e9ede8; --text-2: #bcc4bd; --text-3: #98a199;
    --border: #2a302b; --border-strong: #3b433c; --overlay: rgba(0, 0, 0, .62);
    --primary: #5ccf9f; --primary-hover: #7adcb2; --primary-ink: #7adcb2; --primary-soft: #193226; --primary-line: #2c5a45; --on-primary: #08180f; --focus: #7adcb2;
    --side-bg: #161a17; --side-border: #252b26; --side-text: #bcc4bd; --side-hover: #212722; --side-active-bg: #193226; --side-active-text: #9fe8c6;
    --tone-rose: #ff94a8; --tone-rose-soft: #3a1820; --tone-blue: #8fb0ff; --tone-blue-soft: #1a2546; --tone-amber: #f5c060; --tone-amber-soft: #33260b;
    --tone-teal: #5fd3c4; --tone-teal-soft: #11302c; --tone-violet: #b2a4ff; --tone-violet-soft: #2a2350; --tone-slate: #b6c0ca; --tone-slate-soft: #262c32;
    --mark-fact: #4a3b06; --mark-fact-line: #f5c060; --mark-mine: #8fb0ff; --mark-mine-soft: #1a2546; --mark-risk: #ff8a85;
    --success: #5fd49a; --success-soft: #0f2f22; --warn: #f5c060; --warn-strong: #f5c060; --warn-soft: #33260b; --danger: #ff8a85; --danger-soft: #3a1414; --on-danger: #1b0505;
    --tip-bg: #e9ede8; --tip-text: #1d211e; --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: #121512; --surface: #1a1e1b; --surface-2: #212622; --surface-3: #2a302b;
  --text: #e9ede8; --text-2: #bcc4bd; --text-3: #98a199;
  --border: #2a302b; --border-strong: #3b433c; --overlay: rgba(0, 0, 0, .62);
  --primary: #5ccf9f; --primary-hover: #7adcb2; --primary-ink: #7adcb2; --primary-soft: #193226; --primary-line: #2c5a45; --on-primary: #08180f; --focus: #7adcb2;
  --side-bg: #161a17; --side-border: #252b26; --side-text: #bcc4bd; --side-hover: #212722; --side-active-bg: #193226; --side-active-text: #9fe8c6;
  --tone-rose: #ff94a8; --tone-rose-soft: #3a1820; --tone-blue: #8fb0ff; --tone-blue-soft: #1a2546; --tone-amber: #f5c060; --tone-amber-soft: #33260b;
  --tone-teal: #5fd3c4; --tone-teal-soft: #11302c; --tone-violet: #b2a4ff; --tone-violet-soft: #2a2350; --tone-slate: #b6c0ca; --tone-slate-soft: #262c32;
  --mark-fact: #4a3b06; --mark-fact-line: #f5c060; --mark-mine: #8fb0ff; --mark-mine-soft: #1a2546; --mark-risk: #ff8a85;
  --success: #5fd49a; --success-soft: #0f2f22; --warn: #f5c060; --warn-strong: #f5c060; --warn-soft: #33260b; --danger: #ff8a85; --danger-soft: #3a1414; --on-danger: #1b0505;
  --tip-bg: #e9ede8; --tip-text: #1d211e; --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;
}
