/* 디자인 토큰: 색·간격·글자·모서리의 유일한 정의. 다른 CSS 파일은 이 변수만 쓰고 값을 다시 정하지 않는다.
   다크 모드는 아래 [data-theme="dark"]에서 토큰만 바꾼다. */
:root {
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
  --text-scale: 1;
  --fs-pixel: calc(11px * var(--text-scale)); --fs-pixel-lg: calc(22px * var(--text-scale)); --fs-xxl: calc(26px * var(--text-scale)); --fs-xs: calc(11px * var(--text-scale)); --fs-sm: calc(12px * var(--text-scale)); --fs-md: calc(14px * var(--text-scale)); --fs-lg: calc(16px * var(--text-scale)); --fs-xl: calc(20px * var(--text-scale));
  --radius: 10px; --radius-sm: 6px; --radius-bubble: 12px;

  --c-bg: #eaf6fd;
  --c-surface: #ffffff;
  --c-surface-2: #f3f9fd;
  --c-line: #d3e6f2;
  --c-ink: #17324f;
  --c-ink-soft: #5d7891;
  --c-accent: #2b9fd6;
  --c-accent-soft: #dff1fb;
  --c-coral: #ef7a72;
  --c-coral-strong: #c8325e;
  --c-mint: #46c2a6;
  /* 미니게임 타일: 작은 칸에서도 즉시 구분되는 고채도 색. */
  --c-game-tile-red: #ef303b;
  --c-game-tile-blue: #126ee8;
  --c-game-tile-green: #08a65d;
  --c-game-tile-yellow: #f2b400;
  --c-game-tile-purple: #853ee5;
  /* 지뢰찾기: 열지 않은 칸은 열린 칸과 즉시 구분되는 어두운 타일이다. */
  --c-game-mine-covered: #31506d;
  --c-game-mine-covered-hover: #426987;
  --c-game-mine-covered-edge: #19334d;
  --shadow: 0 1px 2px rgba(23, 50, 79, .06), 0 4px 14px rgba(23, 50, 79, .05);

  /* 윈도우풍 창 (Figma 「메인 화면 PC 1920×1080」 변수 color/win/*, radius/win) */
  --c-win-topbar: #123560;
  --c-win-topbar-text: #ffffff;
  --c-win-panel: #eaf8fd;
  --c-win-panel-inner: #ffffff;
  --c-win-header: #cdeefa;
  --c-win-frame: #2fa3d6;
  --c-win-frame-soft: #9fd8ee;
  --c-win-bevel-light: #ffffff;
  --c-win-bevel-dark: #8cc3dc;
  --c-win-label: #2d7fb3;
  --c-win-page: #f4fbff;
  --radius-win: 2px;
  --c-win-pink: #f0657e;
  --c-dim: rgba(6, 59, 90, .2);
  --c-dim-event: rgba(0, 0, 0, .62); /* 이벤트 대화(VN) 팝업 바깥 막: 뒤 화면을 가려 대화에 집중시킨다(사용자 2026-11-30 「불투명도 낮은 검은색」, 목업 승인) */

  /* 학생증 카드 (Figma 좌우 UI 개선안 「학생증 카드」) */
  --c-card-head-1: #1b4a80;
  --c-card-head-2: #123560;
  --c-card-foot-1: #e8f7fd;
  --c-card-foot-2: #cfeefb;
  --radius-card: 8px;

  /* 메인 화면 배치 (Figma 1920×1080 기준: 바깥 여백 24, 상단 바 84, 창 제목줄 38) */
  --sp-6: 32px;
  --top-h: 84px;
  --col-left: 348px;
  --col-right: 396px;
  --col-center-max: 1500px;
  --dock-pane-min: 160px;
  --screen-edge: 5%;
  --bag-slot-size: 40px;
  --win-title-h: 38px;

  --font: "PretendardVariable", "Malgun Gothic", sans-serif;
  --font-pixel: "Galmuri11", "PretendardVariable", "Malgun Gothic", sans-serif; /* 창 제목·학생증 제목·숫자(11px의 배수에서 가장 또렷) */
  --font-mono: "Galmuri11", ui-monospace, Consolas, monospace;
}
:root[data-font-size="minimum"] { --text-scale: .8; }
:root[data-font-size="small"] { --text-scale: .9; }
:root[data-font-size="large"] { --text-scale: 1.15; }
:root[data-font-size="maximum"] { --text-scale: 1.3; }
:root[data-ui-font="mona12"] { --font-pixel: "Mona12", "Galmuri11", "PretendardVariable", "Malgun Gothic", sans-serif; --font-mono: "Mona12", "Galmuri11", ui-monospace, Consolas, monospace; }
:root[data-ui-font="roundedFixedsys"] { --font-pixel: "RoundedFixedsys", "Galmuri11", "PretendardVariable", "Malgun Gothic", sans-serif; --font-mono: "RoundedFixedsys", "Galmuri11", ui-monospace, Consolas, monospace; }
:root[data-ui-font="ttukttakGamja"] { --font-pixel: "TtukttakGamja", "Galmuri11", "PretendardVariable", "Malgun Gothic", sans-serif; --font-mono: "TtukttakGamja", "Galmuri11", ui-monospace, Consolas, monospace; }
:root[data-ui-font="dosStory"] { --font-pixel: "DosStory", "Galmuri11", "PretendardVariable", "Malgun Gothic", sans-serif; --font-mono: "DosStory", "Galmuri11", ui-monospace, Consolas, monospace; }
:root[data-ui-font="dosGothic"] { --font-pixel: "DosGothic", "Galmuri11", "PretendardVariable", "Malgun Gothic", sans-serif; --font-mono: "DosGothic", "Galmuri11", ui-monospace, Consolas, monospace; }
:root[data-ui-font="dosMyungjo"] { --font-pixel: "DosMyungjo", "Galmuri11", "PretendardVariable", "Malgun Gothic", sans-serif; --font-mono: "DosMyungjo", "Galmuri11", ui-monospace, Consolas, monospace; }
:root[data-ui-font="dosHandwriting"] { --font-pixel: "DosHandwriting", "Galmuri11", "PretendardVariable", "Malgun Gothic", sans-serif; --font-mono: "DosHandwriting", "Galmuri11", ui-monospace, Consolas, monospace; }
:root[data-ui-font="danpungSaemmul"] { --font-pixel: "DanpungSaemmul", "Galmuri11", "PretendardVariable", "Malgun Gothic", sans-serif; --font-mono: "DanpungSaemmul", "Galmuri11", ui-monospace, Consolas, monospace; }
:root[data-ui-font="terrarumSansBitmap"] { --font-pixel: "TerrarumSansBitmap", "Galmuri11", "PretendardVariable", "Malgun Gothic", sans-serif; --font-mono: "TerrarumSansBitmap", "Galmuri11", ui-monospace, Consolas, monospace; }
:root[data-ui-font="neoDunggeunGothicPro"] { --font-pixel: "NeoDunggeunGothicPro", "Galmuri11", "PretendardVariable", "Malgun Gothic", sans-serif; --font-mono: "NeoDunggeunGothicPro", "Galmuri11", ui-monospace, Consolas, monospace; }
:root[data-theme="dark"] {
  --c-bg: #0d1a2b;
  --c-surface: #14243a;
  --c-surface-2: #1a2e48;
  --c-line: #26405f;
  --c-ink: #e4f0fa;
  --c-ink-soft: #93abc4;
  --c-accent: #5cc0ee;
  --c-accent-soft: #1c3b5a;
  --c-coral-strong: #ff8fae;
  --c-game-tile-red: #ff5968;
  --c-game-tile-blue: #4ca0ff;
  --c-game-tile-green: #30d986;
  --c-game-tile-yellow: #ffd54a;
  --c-game-tile-purple: #ba8cff;
  --c-game-mine-covered: #0a1728;
  --c-game-mine-covered-hover: #142c46;
  --c-game-mine-covered-edge: #06101d;
  --c-win-topbar: #0a1a2e;
  --c-win-panel: #16283f;
  --c-win-panel-inner: #14243a;
  --c-win-header: #1f3d5c;
  --c-win-frame: #3a86b0;
  --c-win-frame-soft: #2a5c7c;
  --c-win-bevel-light: #2a4766;
  --c-win-bevel-dark: #0d1a2b;
  --c-win-label: #8fcdf0;
  --c-win-page: #0d1a2b;
  --c-win-pink: #ff8fae;
  --c-dim: rgba(0, 0, 0, .5);
  --c-card-head-1: #1f4f86;
  --c-card-head-2: #0a1a2e;
  --c-card-foot-1: #1f3d5c;
  --c-card-foot-2: #16283f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 14px rgba(0, 0, 0, .2);
  color-scheme: dark;
}

/* 프리셋 스튜디오는 그림 도구에 맞는 중립 회색 작업 공간을 쓴다. */
:root[data-app="preset-studio"][data-theme="dark"] {
  --c-bg: #333333;
  --c-surface: #494949;
  --c-surface-2: #555555;
  --c-line: #6b6b6b;
  --c-ink: #eeeeee;
  --c-ink-soft: #cccccc;
  --c-accent: #c6dfff;
  --c-accent-soft: #677993;
  --radius: 3px;
  --radius-sm: 2px;
}
