/* ─────────────────────────── 디자인 토큰 ───────────────────────────
   빗썸 업무 도구: 검정 왼쪽 메뉴 · 회색 작업대 · 흰 카드 · 빗썸 오렌지 강조 (DESIGN.md).
   글자 대비는 WCAG AA 이상. 오렌지는 주 버튼·현재 단계·수치 표시·확정 도장에만 쓴다. */
/* 제목용 빗썸 고딕(굵은 한 벌, OFL: fonts/BithumbGothic-OFL.txt). 받기 전에는 본문 글꼴로 보인다. */
@font-face {
  font-family: "Bithumb Gothic";
  src: url("/fonts/BithumbGothic-Basic.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
* {
  box-sizing: border-box;
}
:root {
  /* 오른쪽 작업대(회색)와 그 위 글자 */
  --desk: #eceef1;
  --desk-text: #111111;
  --desk-muted: #5c6066; /* 회색 위 흐린 글자 (5.6:1) */
  /* 내용 카드 */
  --paper: #ffffff;
  --paper-surface: #ffffff;
  /* 글자 */
  --text: #111111; /* 본문 */
  --text-2: #3c3f44; /* 보조 */
  --text-3: #63666b; /* 흐린 글자 (흰 바탕 5.8:1) */
  --text-4: #9da0a5; /* 장식·비활성 */
  --bg: #ffffff;
  --fill: #f3f4f6; /* 옅은 면 (표 머리·칸 이름) */
  --fill-2: #e7e9ec; /* 눌림 */
  --rule: #cfd2d7; /* 칸 테두리 */
  --line: #e2e4e8; /* 구분선 */
  --line-soft: #eef0f2; /* 목록 줄 구분 */
  --field: #c3c6cc; /* 입력칸 테두리 */
  --accent: #ff6c00; /* 빗썸 오렌지 (면·선·점) */
  --accent-hover: #ff8126;
  --accent-text: #ff6c00; /* 오렌지 글자: 면과 같은 빗썸 오렌지(사용자 요청, 흰 바탕 대비 2.9:1이라 굵은 글자에 쓴다) */
  --accent-soft: #fff0e3; /* 옅은 오렌지 면 */
  --accent-on-dark: #ff8a33; /* 검은 바탕 위 오렌지 글자 (6.9:1) */
  --green: #03b26c;
  --green-text: #0a6440; /* 흰 바탕 위 초록 글자 (6:1) */
  --green-soft: #e3f6ec; /* 옅은 초록 면 */
  --warn-text: #7f5a00; /* 주의 (오렌지와 구분되는 노랑 계열) */
  --warn-soft: #fff5d6;
  --red: #e42939;
  --red-text: #c2152a;
  --red-soft: #fdeaea;
  /* 글자 단계: 역할마다 크기 하나. 제목·단계 제목·묶음 제목은 빗썸 고딕, 나머지는 Pretendard. */
  --fs-title: 26px; /* 화면 제목: 작품명·전체 작품 */
  --fs-pane: 20px; /* 단계 제목·대화상자 제목 */
  --fs-lead: 18px; /* 한 줄 요약·합계 */
  --fs-section: 17px; /* 묶음 제목 */
  --fs-read: 16px; /* 읽는 글 (요약 문장·점검 이유) */
  --fs-body: 15px; /* 기본 글 */
  --fs-ui: 14px; /* 표·버튼·입력 */
  --fs-meta: 13px; /* 보조 설명 */
  --fs-label: 12px; /* 칸 이름·표 머리·작은 표시 */
  --radius: 12px; /* 카드·대화상자 */
  --radius-sm: 10px; /* 왼쪽 메뉴 위 버튼 */
  /* 깊이: 회색 작업대 위 흰 카드(raised) → 들어 올린 카드(lift) → 떠 있는 층(float). 그림자는 옅고 중립색. */
  --shadow-raised: 0 1px 2px rgb(16 18 22 / 6%), 0 6px 16px -8px rgb(16 18 22 / 14%);
  --shadow-lift: 0 2px 4px rgb(16 18 22 / 8%), 0 14px 32px -12px rgb(16 18 22 / 22%);
  --shadow-float: 0 4px 10px rgb(16 18 22 / 10%), 0 24px 56px -16px rgb(16 18 22 / 30%);
  --shadow-on-paper: 0 1px 2px rgb(16 18 22 / 8%), 0 4px 10px -6px rgb(16 18 22 / 18%);
  --shadow-press: inset 0 1px 2px rgb(16 18 22 / 12%);
  /* 움직임: 바로 반응(fast) · 상태 변화(base) · 화면 넘김(slow). 도착은 감속 곡선 하나로 통일한다. */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 120ms;
  --base: 220ms;
  --slow: 340ms;
  --sidebar: 272px;
  --viewer: 420px;
  /* 왼쪽 메뉴: 검정 */
  --side-bg: #121212;
  --side-hover: #1f1f1f;
  --side-line: #2c2c2c;
  --side-text: #ececec;
  --side-muted: #a3a3a3;
  --side-active: rgb(255 108 0 / 16%);
  --font:
    "Pretendard Variable", Pretendard, -apple-system,
    BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic",
    sans-serif;
  --font-heading: "Bithumb Gothic", var(--font);
  font: 400 var(--fs-body)/1.6 var(--font);
  letter-spacing: -0.01em; /* Pretendard 한글은 아주 살짝 좁혀야 단정하다 */
  color: var(--text);
  background: var(--desk);
  word-break: keep-all; /* 한글 어절 단위 줄바꿈 */
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
/* 카드 안의 칸·버튼은 조금 작게 둥글린다 */
main,
dialog,
.evidence {
  --radius-sm: 8px;
}
/* 왼쪽 메뉴 + 본문 */
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}
[hidden] {
  display: none !important;
}
::selection {
  background: #ffd9bf;
}
/* 브라우저 기본 요소도 팔레트로 맞춘다. */
html {
  scrollbar-color: var(--field) transparent;
  accent-color: var(--accent);
}
input,
textarea {
  caret-color: var(--accent);
}
h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h2 {
  font-size: var(--fs-section);
  margin-bottom: 12px;
}
h3 {
  font-size: var(--fs-body);
}
p {
  margin: 4px 0 8px;
  text-wrap: pretty;
}
small,
.muted {
  color: var(--text-3);
  font-weight: 400;
}
.small {
  font-size: var(--fs-meta);
}
.spaced {
  margin-top: 24px;
}
.spacer {
  flex: 1;
}
.nowrap {
  white-space: nowrap;
}
.error {
  color: var(--red-text);
}
.warn-text {
  color: var(--warn-text);
}
.ok-text {
  color: var(--green-text);
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.card {
  border-radius: var(--radius);
  background: var(--paper-surface);
  box-shadow: var(--shadow-raised);
}
.count {
  display: inline-block;
  min-width: 22px;
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--fill-2);
  color: var(--text-2);
  font-size: var(--fs-label);
  font-weight: 600;
  line-height: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  vertical-align: 2px;
}
