/* 테마 토글의 모양·아이콘은 29mu-theme-toggle.css 한 곳에 있다.
   @import 는 규격상 다른 규칙보다 앞이어야 해서 파일 맨 위에 둔다. */
@import url("29mu-theme-toggle.css");

@font-face {
  font-family: "Pretendard Variable";
  src: url("../assets/fonts/PretendardVariable.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 45 920;
  font-display: swap;
}

/*
 * Named themes.
 *   뉴럴 다크    = dark  | night   ← 기본
 *   애플 화이트  = light | day
 * --theme-name is the human label. Do not rename the machine ids.
 *
 * 사용자 지침 (2026-08-21): 「모든 웹페이지는 — 보고서든 사이트 페이지든 —
 * 몬스타 홈 테마다. 뉴럴 다크 기본, 애플 화이트 토글로 2가지 구현.」
 *
 * **기본 테마의 단일 소스는 아래 `:root` 다.** `:root` 가 곧 기본이고,
 * 그 안의 `--theme-id` 가 기본 테마의 이름을 말한다. 29mu-theme.js 는 저장값도
 * URL 도 없을 때 그 값을 읽어 쓴다 — JS 안에 기본값을 다시 적지 않는다.
 * 기본을 바꾸려면 여기 `:root` 하나만 바꾼다.
 *
 * 여기에 apple-white / neuron-dark 별칭 선택자를 다시 만들지 마라. 29mu-theme.js 의
 * normalize() 가 모든 값을 dark/light 로 접어서 root 에 붙이므로, 그 선택자는 절대
 * 맞지 않는 죽은 코드가 된다(2026-08-21 실측: ?theme=neuron-dark → 밝은 화면).
 * 사람이 부르는 이름은 아래 --theme-name 이 이미 말한다.
 *
 * Status colors --st-ok/--st-warn/--st-bad live here only.
 */

/* 기본 = 소비자 면(베이지). 사용자 지침 2026-08-22:
   「소비자들이 보는 것들은 베이지 기본. 내가 보는 운영자 관련 페이지는 다크가
    기본값이다. 이유는 내가 눈이 부셔서 작업 페이지들은 다크로 한다.」
   운영 면은 <html data-29mu-surface="…"> 로 자기를 밝힌다 — 아래 블록이 그것을 받는다. */
:root {
  color-scheme: light;
  --theme-id: light;
  --theme-name: "몬스타 베이지";
  --theme-paper: #f3f0e8;
  --theme-ink: #111216;
  --theme-lime: #111216;
  --focus: #1f6fd0;   /* 밝은 지면 4.35:1 */
  --bg: var(--theme-paper);
  --surface: #ffffff;
  --surface-strong: #eae9e4;
  --surface-soft: #f8f7f3;
  --text: var(--theme-ink);
  --muted: #5d626d;
  --subtle: #626770;
  --line: rgba(12, 14, 20, .13);
  --line-strong: rgba(12, 14, 20, .24);
  --accent: var(--theme-lime);
  --accent-ink: #f3f0e8;
  --shadow: 0 24px 80px rgba(33, 32, 28, .10);
  --paper: var(--theme-paper);
  --ink: var(--theme-ink);
  --grey: #555b61;
  --lime: var(--theme-lime);
  --st-ok: #1d7c3e;
  --st-warn: #9a6200;
  --st-bad: #b3261e;
  /* 「확인 불가」는 네 번째 상태다. 정상으로도 실패로도 단정하지 않는다.
     2026-08-29 전까지 두 가지 임시방편이 따로 있었다 —
     today.html 의 `.day--none{opacity:.45}` 와
     ops-fullstatus.html 의 `.state.miss{color:var(--muted)}`. 하나로 모은다. */
  --st-unknown: var(--subtle);
  --font-sans: "Pretendard Variable", Pretendard, "Noto Sans KR", "Noto Sans CJK KR", "Apple SD Gothic Neo", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --pc: #4aa8ff;
  --studio: #8c68ff;
  --game: #6c7079;
  --max: 1440px;
  --gutter: clamp(20px, 4vw, 64px);
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 72px;
  --space-8: 112px;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  /* ops-fullstatus.html 이 `border-radius:2px` 를 5곳에 박고 있었다. 토큰화한다. */
  --radius-xs: 2px;
  /* Legacy aliases used by story/business/archive/lab surfaces — keep in sync */
  --hairline: rgba(255, 255, 255, .16);
}

/* 운영자 면 기본 = 다크. 눈부심 때문이다.
   표식은 이미 있던 것을 쓴다(허브가 모든 운영 화면에 붙인다) — 새 표식을 만들지 않는다.
   아래 html[data-theme=…] 블록이 뒤에 오므로, 사람이 고른 테마가 이것을 이긴다. */
html[data-29mu-surface] {
  color-scheme: dark;
  --theme-id: dark;
  --theme-name: "몬스타 다크";
  --theme-paper: #111216;
  --theme-ink: #f6f5f1;
  --theme-lime: #f6f5f1;
  --focus: #4aa8ff;   /* 어두운 지면 7.43:1 */
  --bg: var(--theme-paper);
  --surface: #10131a;
  --surface-strong: #161a23;
  --surface-soft: #0d1016;
  --text: var(--theme-ink);
  --muted: #9da4b3;
  --subtle: #727a89;
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(255, 255, 255, .22);
  --accent: var(--theme-lime);
  --paper: var(--theme-paper);
  --ink: var(--theme-ink);
  --grey: #adb1ba;
  --hairline: rgba(255, 255, 255, .16);
  --lime: var(--theme-lime);
  --accent-ink: #111216;
  --shadow: 0 24px 80px rgba(0, 0, 0, .24);
  --st-ok: #5cbd82;
  --st-warn: #d9a441;
  --st-bad: #e0695f;
  --st-unknown: var(--subtle);
}


html[data-theme="light"],
html[data-theme="day"] {
  color-scheme: light;
  --theme-id: light;
  --theme-name: "몬스타 베이지";
  --theme-paper: #f3f0e8;
  --theme-ink: #111216;
  --theme-lime: #111216;
  --focus: #1f6fd0;   /* 밝은 지면 4.35:1 */
  --bg: var(--theme-paper);
  --surface: #ffffff;
  --surface-strong: #eae9e4;
  --surface-soft: #f8f7f3;
  --text: var(--theme-ink);
  --muted: #5d626d;
  --subtle: #626770;
  --line: rgba(12, 14, 20, .13);
  --line-strong: rgba(12, 14, 20, .24);
  --accent: var(--theme-lime);
  --accent-ink: #f3f0e8;
  --shadow: 0 24px 80px rgba(33, 32, 28, .10);
  --paper: var(--theme-paper);
  --ink: var(--theme-ink);
  --grey: #555b61;
  --lime: var(--theme-lime);
  --st-ok: #1d7c3e;
  --st-warn: #9a6200;
  --st-bad: #b3261e;
  --st-unknown: var(--subtle);
}

html[data-theme="dark"],
html[data-theme="night"] {
  color-scheme: dark;
  --theme-id: dark;
  --theme-name: "몬스타 다크";
  --theme-paper: #111216;
  --theme-ink: #f6f5f1;
  --theme-lime: #f6f5f1;
  --focus: #4aa8ff;   /* 어두운 지면 7.43:1 */
  --bg: var(--theme-paper);
  --surface: #10131a;
  --surface-strong: #161a23;
  --surface-soft: #0d1016;
  --text: var(--theme-ink);
  --muted: #9da4b3;
  --subtle: #727a89;
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(255, 255, 255, .22);
  --accent: var(--theme-lime);
  --paper: var(--theme-paper);
  --ink: var(--theme-ink);
  --grey: #adb1ba;
  --hairline: rgba(255, 255, 255, .16);
  --lime: var(--theme-lime);
  --accent-ink: #111216;
  --shadow: 0 24px 80px rgba(0, 0, 0, .24);
  --st-ok: #5cbd82;
  --st-warn: #d9a441;
  --st-bad: #e0695f;
  --st-unknown: var(--subtle);
}


/* Instant scrub while toggling day/night (prevents mid-frame residual) */
html.theme-switching,
html.theme-switching body,
html.theme-switching .site-header,
html.theme-switching .journal-global-masthead,
html.theme-switching .masthead {
  transition: none !important;
}
