/* ============================================================
   UI/UX 실무 용어집 — 스타일
   1) 토큰   2) 기본   3) 사이트 골격   4) 홈
   5) 카테고리 페이지   6) 용어 카드   7) 검색 페이지
   8) 쇼케이스   9) 데모 부품   10) 반응형
   ============================================================ */

/* ---------- 1) 토큰 ----------
   에디토리얼(문서형) — 종이 질감의 밝은 바탕에 잉크빛 글자,
   포인트는 딥 네이비 한 색. 면(그림자)보다 선(괘선)으로 구조를 잡는다.

   라이트/다크 값을 light-dark(밝을때, 어두울때) 로 나란히 적어두었다.
   색을 바꾸려면 이 블록 한 곳만 고치면 두 테마에 모두 반영된다.
   테마 선택은 :root 의 color-scheme 이 결정한다 —
   자동(시스템) / 밝게 / 어둡게 는 헤더 스위치가 data-theme 으로 전환한다.
   ------------------------------------------------------------ */
:root {
  color-scheme: light dark;              /* 기본: 시스템 설정을 따라간다 */

  /* 지면 */
  --bg: #fdfcfa;
  --bg: light-dark(#fdfcfa, #1a1815);
  --bg-elev: #ffffff;
  --bg-elev: light-dark(#ffffff, #23201a);
  --bg-sunken: #f4f2ec;
  --bg-sunken: light-dark(#f4f2ec, #141310);
  --border: #e6e1d6;
  --border: light-dark(#e6e1d6, #37332c);
  --border-strong: #c5bfaf;
  --border-strong: light-dark(#c5bfaf, #4f4a40);

  /* 잉크 */
  --text: #1a1917;
  --text: light-dark(#1a1917, #f1ede4);
  --text-sub: #4e4b45;
  --text-sub: light-dark(#4e4b45, #b6b0a4);
  --text-dim: #736d64;
  --text-dim: light-dark(#736d64, #9c968a);

  /* 포인트 1색 */
  --accent: #23405c;
  --accent: light-dark(#23405c, #93b6dc);
  --accent-soft: #e9eef4;
  --accent-soft: light-dark(#e9eef4, #1f2935);
  --accent-text: #1c3149;
  --accent-text: light-dark(#1c3149, #a9c6e6);
  --on-accent: #ffffff;
  --on-accent: light-dark(#ffffff, #14202e);

  /* 의미색 — 내용에서 성공/경고/오류를 구분하는 데 쓰이므로 유지 */
  --warn: #8a5a11;
  --warn: light-dark(#8a5a11, #d9ab5a);
  --warn-soft: #fdf8ea;
  --warn-soft: light-dark(#fdf8ea, #2b2418);
  --warn-border: #e3d1a4;
  --warn-border: light-dark(#e3d1a4, #58482b);
  --danger: #a52f2a;
  --danger: light-dark(#a52f2a, #d98a80);
  --success: #2c6a4d;
  --success: light-dark(#2c6a4d, #7ab694);

  /* 어두운 표면 위 요소 (토스트·액센트 버튼) */
  --tooltip-link: #9fc0e0;
  --on-accent-fill: rgba(255, 255, 255, .09);

  /* 오버레이 */
  --overlay: rgba(26, 25, 23, .5);
  --overlay: light-dark(rgba(26, 25, 23, .5), rgba(0, 0, 0, .62));
  --tooltip-bg: #26241f;
  --tooltip-bg: light-dark(#26241f, #0e0d0b);

  /* 형태 — 인쇄물처럼 각을 살린다 */
  --radius: 6px;
  --radius-sm: 4px;
  --shadow-c1: rgba(40, 35, 25, .07);
  --shadow-c1: light-dark(rgba(40, 35, 25, .07), rgba(0, 0, 0, .5));
  --shadow-c2: rgba(40, 35, 25, .18);
  --shadow-c2: light-dark(rgba(40, 35, 25, .18), rgba(0, 0, 0, .68));
  --shadow-sm: none;
  --shadow-md: 0 2px 10px var(--shadow-c1);
  --shadow-lg: 0 12px 36px var(--shadow-c2);

  /* ── 타입 스케일 ── 8단계. 이 밖의 크기는 쓰지 않는다 */
  --fs-display: clamp(30px, 5.6vw, 52px);  /* 히어로 제목 */
  --fs-h1: clamp(25px, 3.4vw, 32px);       /* 페이지 제목 */
  --fs-h2: 22px;                           /* 용어명·단계 제목 */
  --fs-lead: 17px;                         /* 정의문·리드문·목록 제목 */
  --fs-body: 15px;                         /* 본문 */
  --fs-sm: 13.5px;                         /* 보조 설명 */
  --fs-xs: 12px;                           /* 라벨·캡션 */
  --fs-2xs: 10.5px;                        /* 배지·미세 라벨 */

  /* ── 행간 ── 용도별 4단계 */
  --lh-tight: 1.25;   /* 제목 */
  --lh-snug: 1.5;     /* 짧은 문장·라벨 */
  --lh-body: 1.8;     /* 본문 */
  --lh-loose: 1.9;    /* 리드문 */

  /* ── 여백 ── 8pt 기반. 4는 미세 조정용 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;

  /* ── 모서리 ── */
  --r-sm: 3px;      /* 배지·칩 */
  --r-md: 6px;      /* 카드·박스 */
  --r-lg: 10px;     /* 큰 카드 */
  --r-full: 999px;
  --radius: var(--r-md);      /* 이전 이름 유지 */
  --radius-sm: 4px;

  --wrap: 1120px;
  --hue: 250;
}

/* 제목은 자간을 좁혀 단정하게, 본문은 넉넉한 행간으로 */
h1, h2, h3, h4 { letter-spacing: -.032em; line-height: var(--lh-tight); }

code {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  padding: 1px var(--sp-1);
  border-radius: var(--r-sm);
  font-size: .86em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

em { font-style: normal; }

::selection { background: var(--accent); color: var(--on-accent); }

* { box-sizing: border-box; }

/* ---------- 2) 기본 ---------- */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    system-ui, "Segoe UI", "Malgun Gothic", sans-serif;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;

  /* 한글은 기본값이 글자 단위로 끊긴다 — "모습에 / 서 온 이름" 처럼.
     keep-all 로 낱말을 지키고 줄바꿈은 띄어쓰기에서만 일어나게 한다. */
  word-break: keep-all;
  line-break: strict;
}

a { color: inherit; }

/* 낱말을 지키면 아주 긴 토큰(URL·코드)이 넘칠 수 있어 그런 곳만 예외로 둔다 */
code, pre, .ask__t { overflow-wrap: anywhere; }

/* ---------- 3) 사이트 골격 ---------- */
.sh {
  position: sticky;
  top: 0;
  z-index: 200;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.7) blur(16px);
  -webkit-backdrop-filter: saturate(1.7) blur(16px);
  border-bottom: 1px solid var(--border);
}

.sh__in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--sp-5);
  height: 56px;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.sh__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 800;
  font-size: var(--fs-body);
  text-decoration: none;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.sh__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--fs-2xs);
  font-weight: 800;
  letter-spacing: .02em;
  flex: 0 0 auto;
}

.sh__nav { display: flex; gap: var(--sp-1); }

.sh__nav a {
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-dim);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-sm);
  transition: .14s;
  white-space: nowrap;
}

.sh__nav a:hover { color: var(--text); background: var(--bg-sunken); }
.sh__nav a.on { color: var(--accent-text); background: var(--accent-soft); }

/* 테마 전환 — 자동 / 밝게 / 어둡게 */
/* 언어 전환 — 테마 스위치와 같은 높이·굵기로 나란히 선다.
   지금 언어가 아니라 "넘어갈 언어"를 적는다(English / 한국어). */
.lang {
  flex: 0 0 auto;
  margin-left: var(--sp-3);
  padding: var(--sp-1) var(--sp-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text-dim);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: .13s;
}

.lang:hover {
  color: var(--accent-text);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.theme {
  display: flex;
  margin-left: var(--sp-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex: 0 0 auto;
}

.theme button {
  border: 0;
  border-left: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-dim);
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 700;
  padding: var(--sp-1) var(--sp-2);
  cursor: pointer;
  transition: .13s;
  white-space: nowrap;
}

.theme button:first-child { border-left: 0; }
.theme button:hover { color: var(--text); background: var(--bg-sunken); }

.theme button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
  border-left-color: var(--accent);
}

.sf {
  border-top: 1px solid var(--border);
  background: var(--bg-sunken);
  margin-top: var(--sp-8);
}

.sf__in {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-5) var(--sp-7);
  color: var(--text-dim);
  font-size: var(--fs-xs);
  line-height: var(--lh-body);
}

.sf__t { font-weight: 800; color: var(--text-sub); font-size: var(--fs-sm); margin: 0 0 var(--sp-1); }
.sf p { margin: 0 0 var(--sp-2); }
.sf__src { font-size: var(--fs-xs); opacity: .85; }

.sf__rights {
  margin-top: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
}

.sf__rights p { font-size: var(--fs-xs); line-height: var(--lh-body); }
.sf__rights p:last-child { margin-bottom: 0; }
.sf__rights b { color: var(--text-sub); }

.sf__c {
  font-weight: 800;
  color: var(--text-sub);
  font-size: var(--fs-xs) !important;
  letter-spacing: -.01em;
}

.sf__nav { margin-top: var(--sp-3); }
.sf__nav a { color: var(--accent-text); text-decoration: none; font-weight: 700; }
.sf__nav a:hover { text-decoration: underline; }

.totop {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 150;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text-sub);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  font-size: var(--fs-body);
  display: none;
}

.totop.on { display: block; }

/* ---------- 4) 홈 ----------
   카드 그리드 대신 잡지 목차 형식. 큰 번호와 괘선으로 위계를 만든다.
   ------------------------------------------------------------ */
.hm { max-width: 940px; margin: 0 auto; padding: 0 var(--sp-5); }

.hm__hero { padding: var(--sp-8) 0 var(--sp-8); max-width: 720px; }

.hm__hero h1 {
  margin: 0 0 var(--sp-5);
  font-size: clamp(30px, 5.6vw, 52px);
  font-weight: 800;
  line-height: var(--lh-tight);
}

.hm__hero h1 em {
  box-shadow: inset 0 -4px 0 var(--accent);
  padding: 0 2px;
}

.hm__lead {
  margin: 0 0 var(--sp-3);
  color: var(--text-sub);
  font-size: var(--fs-lead);
  line-height: var(--lh-loose);
}

.hm__meta {
  margin: var(--sp-5) 0 var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm);
  color: var(--text-dim);
  font-weight: 600;
}

.hm__cta { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

/* 섹션 제목 — 굵은 괘선 위에 얹는다 */
.hm__h2 {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-body);
  font-weight: 800;
  letter-spacing: .01em;
  padding-top: var(--sp-3);
  border-top: 2px solid var(--text);
}

.hm__sub { margin: 0 0 var(--sp-5); color: var(--text-dim); font-size: var(--fs-body); }

.hm__how { padding-top: var(--sp-6); }
.hm__how .hm__h2 { margin-bottom: var(--sp-5); }

/* 5관점 — 번호 매긴 목록 */
.hm__how-l {
  list-style: none;
  counter-reset: how;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--sp-1) var(--sp-6);
}

.hm__how-l li {
  counter-increment: how;
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: baseline;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
}

.hm__how-l li::before {
  content: counter(how, decimal-leading-zero);
  font-size: var(--fs-xs);
  font-weight: 800;
  color: var(--accent-text);
  letter-spacing: .06em;
}

/* 번호는 1열, 제목과 설명은 모두 2열에 — 지정하지 않으면 설명이 번호 칸으로 흘러간다 */
.hm__how-l h3 { grid-column: 2; margin: 0 0 3px; font-size: var(--fs-body); font-weight: 800; }
.hm__how-l p { grid-column: 2; margin: 0; font-size: var(--fs-sm); color: var(--text-dim); line-height: var(--lh-body); }

.hm__cats, .hm__show { padding-top: var(--sp-8); }

/* ── 분류 · 깊게 보기 ──────────────────────────
   "고르는 곳은 카드, 읽는 곳은 괘선" — 여기는 고르는 곳이라 카드.
   ------------------------------------------------------------ */
.toc, .dive {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-3);
}

.toc__i, .dive__i {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: start;
  gap: 0 var(--sp-1);
  padding: var(--sp-4) var(--sp-4) var(--sp-4) var(--sp-3);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}

.toc__i:hover, .dive__i:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.toc__n, .dive__n {
  font-size: var(--fs-h2);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: var(--lh-tight);
  font-variant-numeric: tabular-nums;
}

.toc__n {
  color: hsl(var(--hue) 38% 48%);
  color: light-dark(hsl(var(--hue) 38% 48%), hsl(var(--hue) 42% 64%));
}

.dive__n { color: var(--accent); }

.toc__b, .dive__b { display: block; }

.toc__t, .dive__t {
  display: block;
  font-size: var(--fs-lead);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: var(--lh-tight);
  margin-bottom: var(--sp-1);
}

.toc__hot {
  display: inline-block;
  font-style: normal;
  font-size: var(--fs-2xs);
  font-weight: 800;
  color: var(--danger);
  border: 1px solid currentColor;
  border-radius: var(--r-sm);
  padding: 1px var(--sp-1);
  margin-left: var(--sp-2);
  vertical-align: 2px;
  white-space: nowrap;
}

.toc__d, .dive__d {
  display: block;
  font-size: var(--fs-sm);
  color: var(--text-dim);
  line-height: var(--lh-snug);
}

.toc__c {
  grid-column: 2;
  margin-top: var(--sp-3);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.toc__c::after { content: "개 용어"; }

.dive__go {
  display: block;
  grid-column: 2;
  margin-top: var(--sp-3);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs);
  font-weight: 800;
  color: var(--accent-text);
}

/* ---------- 5) 카테고리 페이지 ---------- */
.cp { max-width: 880px; margin: 0 auto; padding: 0 var(--sp-5); }

.cp__hero {
  padding: var(--sp-6) 0 var(--sp-6);
  border-bottom: 2px solid var(--text);
  margin-bottom: var(--sp-5);
}

.cp__back {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-dim);
  text-decoration: none;
  margin-bottom: var(--sp-4);
}

.cp__back:hover { color: var(--accent-text); }

.cp__no {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 800;
  color: hsl(var(--hue) 45% 38%);
  color: light-dark(hsl(var(--hue) 45% 38%), hsl(var(--hue) 44% 66%));
  border: 1px solid currentColor;
  border-radius: var(--r-sm);
  padding: 2px var(--sp-2);
  letter-spacing: .09em;
  margin-bottom: var(--sp-3);
}

.cp__hero h1 { margin: 0 0 var(--sp-3); font-size: clamp(25px, 4.4vw, 34px); font-weight: 800; }
.cp__lead { margin: 0 0 var(--sp-4); color: var(--text-sub); font-size: var(--fs-lead); line-height: var(--lh-loose); }
.cp__meta { display: flex; gap: var(--sp-4); font-size: var(--fs-xs); color: var(--text-dim); font-weight: 700; }

.cp__note {
  background: var(--warn-soft);
  border: 1px solid var(--warn-border);
  border-radius: var(--radius-sm);
  padding: var(--sp-4) var(--sp-4);
  margin-bottom: var(--sp-5);
}

/* 라벨만 블록으로 — 본문 안의 <b> 강조는 인라인으로 유지되어야 한다 */
.cp__note > b {
  display: block;
  color: var(--warn);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: .03em;
  margin-bottom: var(--sp-1);
}

.cp__note p { margin: 0; font-size: var(--fs-body); line-height: var(--lh-body); }
.cp__note a { color: var(--accent-text); font-weight: 700; }

/* ── 2단 레이아웃 + 좌측 고정 목차 ──────────────
   카테고리 페이지는 20~28화면이라 지금 어디쯤인지 알려줘야 한다.
   ------------------------------------------------------------ */
.cp__wrap {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: var(--sp-7);
  align-items: start;
}

.cp__side { position: sticky; top: 72px; min-width: 0; }

.cp__side-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-2);
}

.cp__side-hd > b {
  font-size: var(--fs-2xs);
  font-weight: 800;
  color: var(--text-dim);
  letter-spacing: .06em;
}

.dens {
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text-sub);
  font: inherit;
  font-size: var(--fs-2xs);
  font-weight: 700;
  padding: 2px var(--sp-2);
  border-radius: var(--r-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: .13s;
}

.dens:hover { border-color: var(--accent); color: var(--accent-text); }
.dens[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.cp__spy {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.cp__spy a {
  display: flex;
  gap: var(--sp-2);
  align-items: baseline;
  padding: 5px var(--sp-2) 5px 0;
  font-size: var(--fs-xs);
  color: var(--text-dim);
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: var(--sp-2);
  transition: color .13s, border-color .13s;
  line-height: var(--lh-snug);
}

.cp__spy a i {
  font-style: normal;
  font-size: var(--fs-2xs);
  opacity: .6;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}

.cp__spy a:hover { color: var(--text); }

.cp__spy a[aria-current] {
  color: var(--accent-text);
  border-left-color: var(--accent);
  font-weight: 800;
}

.cp__spy a[aria-current] i { opacity: 1; }

/* ── 밀도 전환 — 정의만 남기고 접는다 ── */
body.is-compact .tc__demo,
body.is-compact .tc__tip,
body.is-compact .tc__how,
body.is-compact .tc__ask,
body.is-compact .tc__when { display: none; }

body.is-compact .tc { padding-bottom: var(--sp-4); }
body.is-compact .cp__list { gap: var(--sp-4); }
body.is-compact .tc__hd { margin-bottom: var(--sp-2); }
body.is-compact .tc__name h3 { font-size: var(--fs-lead); }
body.is-compact .tc__def p { font-size: var(--fs-body); }
body.is-compact .tc__rel { margin-top: var(--sp-2); }

/* ── 관련 용어 ── */
.tc__rel {
  margin-top: var(--sp-5);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}

.tc__rel > b {
  display: block;
  font-size: var(--fs-2xs);
  font-weight: 800;
  letter-spacing: .05em;
  color: var(--text-dim);
  margin-bottom: var(--sp-2);
}

.tc__rel div { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

.tc__rel a {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-decoration: none;
  color: var(--text-sub);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 3px var(--sp-2);
  transition: .13s;
}

.tc__rel a:hover { border-color: var(--accent); color: var(--accent-text); background: var(--accent-soft); }

.cp__list { display: flex; flex-direction: column; gap: var(--sp-7); }

.cp__pn { display: flex; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-7); }

.cp__pn-i {
  flex: 1;
  max-width: 300px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-4);
  text-decoration: none;
  transition: .15s;
}

.cp__pn-i:hover { border-color: var(--accent); }
.cp__pn-i span { display: block; font-size: var(--fs-2xs); color: var(--text-dim); font-weight: 700; margin-bottom: 3px; }
.cp__pn-i b { font-size: var(--fs-sm); font-weight: 800; }
.cp__pn-i--n { text-align: right; }

/* ---------- 6) 용어 카드 ---------- */
.tc {
  padding: 0 0 var(--sp-7);
  border-bottom: 1px solid var(--border);
  scroll-margin-top: var(--sp-8);
}

.tc__hd { display: flex; align-items: flex-start; gap: var(--sp-2); margin-bottom: var(--sp-4); }

.tc__no {
  flex: 0 0 auto;
  width: 34px;
  color: var(--text-dim);
  font-size: var(--fs-sm);
  font-weight: 800;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  padding-top: var(--sp-2);
}

.tc__name h3 { margin: 0; font-size: var(--fs-h2); font-weight: 800; line-height: var(--lh-tight); }
.tc__name p { margin: var(--sp-1) 0 0; font-size: var(--fs-sm); color: var(--text-dim); font-weight: 600; letter-spacing: .02em; }
.tc__name p span { opacity: .8; }

.tc__when {
  padding: 2px 0 2px var(--sp-4);
  margin-bottom: var(--sp-4);
  border-left: 2px solid var(--accent);
}

.tc__when > b {
  display: block;
  font-size: var(--fs-2xs);
  font-weight: 800;
  color: var(--accent-text);
  letter-spacing: .08em;
  margin-bottom: var(--sp-1);
}

.tc__when p { margin: 0; font-size: var(--fs-body); line-height: var(--lh-body); color: var(--text-sub); }
.tc__when p b { color: var(--text); }

.tc__def p { margin: 0; font-size: var(--fs-lead); line-height: var(--lh-loose); color: var(--text-sub); }
.tc__def p b { color: var(--text); }

.tc__demo {
  margin-top: var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-elev);
}

.tc__demo-h {
  font-size: var(--fs-2xs);
  font-weight: 800;
  letter-spacing: .05em;
  color: var(--text-dim);
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
}

.tc__demo-h span { font-weight: 600; opacity: .75; letter-spacing: 0; margin-left: var(--sp-1); }
.tc__demo-b { padding: var(--sp-5) var(--sp-5); font-size: var(--fs-body); background: var(--bg-sunken); }

.tc__tip {
  margin-top: var(--sp-5);
  background: var(--warn-soft);
  border-left: 2px solid var(--warn-border);
  padding: var(--sp-3) var(--sp-4);
}

.tc__tip > b {
  display: block;
  color: var(--warn);
  font-size: var(--fs-2xs);
  font-weight: 800;
  letter-spacing: .05em;
  margin-bottom: var(--sp-1);
}

.tc__tip p { margin: 0; font-size: var(--fs-body); line-height: var(--lh-body); }

.tc__how {
  margin-top: var(--sp-4);
  padding: 0 0 0 var(--sp-4);
  border-left: 2px solid var(--border-strong);
}

.tc__how > b {
  display: block;
  color: var(--text-dim);
  font-size: var(--fs-2xs);
  font-weight: 800;
  letter-spacing: .05em;
  margin-bottom: var(--sp-1);
}

.tc__how p { margin: 0; font-size: var(--fs-body); line-height: var(--lh-body); color: var(--text-sub); }

.tc__ask { margin-top: var(--sp-5); }

.tc__ask > b {
  display: block;
  font-size: var(--fs-2xs);
  font-weight: 800;
  letter-spacing: .05em;
  color: var(--success);
  margin-bottom: var(--sp-1);
}

.ask {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  background: color-mix(in srgb, var(--success) 6%, transparent);
  border-left: 2px solid var(--success);
  padding: var(--sp-3) var(--sp-4);
}

.ask__t {
  margin: 0;
  flex: 1;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-sub);
}

.ask__t b { color: var(--text); }

.ask__c {
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--success) 45%, transparent);
  background: var(--bg-elev);
  color: var(--success);
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 800;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: .14s;
}

.ask__c:hover { background: var(--success); color: var(--on-accent); }
.ask__c.done { background: var(--success); color: var(--on-accent); border-color: var(--success); }

.askset { display: flex; flex-direction: column; gap: var(--sp-2); }

/* ---------- 7) 검색 페이지 ---------- */
.tp { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--sp-5); }
.tp__hd { padding: var(--sp-6) 0 var(--sp-5); }
.tp__hd h1 { margin: 0 0 var(--sp-2); font-size: var(--fs-h1); }
.tp__hd > p { margin: 0 0 var(--sp-4); color: var(--text-dim); font-size: var(--fs-sm); }

.tp__search { position: relative; max-width: 480px; margin-bottom: var(--sp-4); }

.tp__search input {
  width: 100%;
  padding: var(--sp-3) var(--sp-6);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-body);
  outline: none;
  transition: .15s;
}

.tp__search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

.tp__search > span {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim); pointer-events: none; font-size: var(--fs-sm);
}

.tp__search button {
  position: absolute; right: 8px; top: 50%;
  transform: translateY(-50%);
  border: 0; background: var(--bg-sunken);
  color: var(--text-sub);
  width: 24px; height: 24px;
  border-radius: 50%;
  cursor: pointer; font-size: var(--fs-sm); line-height: 1;
  display: none;
}

.tp__search button.on { display: block; }

.tp__filter { display: flex; flex-wrap: wrap; gap: var(--sp-1); }

.fchip {
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text-sub);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-sm);
  font: inherit;
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  transition: .13s;
}

.fchip:hover { border-color: var(--accent); color: var(--accent-text); }
.fchip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.tp__count { color: var(--text-dim); font-size: var(--fs-xs); font-weight: 700; margin: 0 0 var(--sp-3); }

.tp__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: var(--sp-3); }

.ti {
  display: block;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-4);
  text-decoration: none;
  transition: .15s;
  position: relative;
}

.ti:hover { border-color: var(--accent); transform: translateY(-1px); }
.ti h3 { margin: 0; font-size: var(--fs-body); font-weight: 800; }
.ti__en { display: block; font-size: var(--fs-2xs); color: var(--text-dim); font-weight: 600; margin: 2px 0 var(--sp-1); }
.ti__d { margin: 0; font-size: var(--fs-sm); color: var(--text-dim); line-height: var(--lh-body); }

.ti__c {
  display: inline-block;
  margin-top: var(--sp-2);
  font-size: var(--fs-2xs);
  font-weight: 800;
  color: hsl(var(--hue) 40% 42%);
  color: light-dark(hsl(var(--hue) 40% 42%), hsl(var(--hue) 44% 66%));
  border: 1px solid currentColor;
  border-radius: var(--r-sm);
  padding: 1px var(--sp-2);
  letter-spacing: .02em;
}

.tp__empty { text-align: center; padding: var(--sp-8) var(--sp-4); color: var(--text-dim); grid-column: 1 / -1; }
.tp__empty strong { display: block; font-size: var(--fs-lead); color: var(--text-sub); margin-bottom: var(--sp-1); }

/* ---------- 8) 쇼케이스 ---------- */
.sp { max-width: 880px; margin: 0 auto; padding: 0 var(--sp-5); }
.sp__hero { padding: var(--sp-6) 0 var(--sp-5); text-align: center; }

.sp__kicker {
  font-size: var(--fs-2xs);
  font-weight: 800;
  letter-spacing: .14em;
  color: var(--accent-text);
  margin: 0 0 var(--sp-3);
}

.sp__hero .cp__back { display: block; text-align: left; }
.sp__hero h1 { margin: 0 0 var(--sp-4); font-size: clamp(26px, 5vw, 40px); font-weight: 800; line-height: var(--lh-tight); }

.sp__hero h1 em {
  box-shadow: inset 0 -3px 0 var(--accent);
  padding: 0 2px;
}

.sp__lead { margin: 0 auto; max-width: 640px; color: var(--text-sub); font-size: var(--fs-lead); line-height: var(--lh-loose); }

.sp__steps {
  display: flex;
  gap: var(--sp-1);
  overflow-x: auto;
  padding: var(--sp-1) 0 var(--sp-3);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-5);
  scrollbar-width: none;
}

.sp__steps::-webkit-scrollbar { display: none; }

.spb {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text-sub);
  padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-2);
  border-radius: var(--r-sm);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
  transition: .14s;
  white-space: nowrap;
}

.spb b {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg-sunken);
  color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-2xs); font-weight: 800;
}

.spb:hover { border-color: var(--accent); color: var(--accent-text); }
.spb[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.spb[aria-selected="true"] b { background: var(--on-accent-fill); color: var(--on-accent); }

.sp__pane h2 { margin: 0 0 var(--sp-2); font-size: var(--fs-h2); font-weight: 800; }
.sp__plead { margin: 0 0 var(--sp-5); color: var(--text-sub); font-size: var(--fs-body); line-height: var(--lh-loose); }
.sp__body { margin-bottom: var(--sp-5); }

.sp__take {
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  border-radius: var(--radius-sm);
  padding: var(--sp-4) var(--sp-4);
}

.sp__take > b {
  display: block;
  font-size: var(--fs-2xs);
  font-weight: 800;
  letter-spacing: .05em;
  color: var(--accent-text);
  margin-bottom: var(--sp-1);
}

.sp__take p { margin: 0; font-size: var(--fs-body); line-height: var(--lh-loose); color: var(--text-sub); }
.sp__take p b { color: var(--text); }

.sp__close {
  margin-top: var(--sp-8);
  padding: var(--sp-6) 0 var(--sp-2);
  border-top: 2px solid var(--text);
  text-align: left;
}

.sp__close .sp__kicker { color: var(--accent-text); }
.sp__close h2 { margin: 0 0 var(--sp-4); font-size: clamp(22px, 3.6vw, 30px); line-height: var(--lh-tight); }
.sp__close > p { margin: 0; max-width: 620px; color: var(--text-sub); font-size: var(--fs-body); line-height: var(--lh-loose); }
.sp__close > p b { color: var(--text); }
.sp__close-l { display: flex; gap: var(--sp-4); flex-wrap: wrap; margin-top: var(--sp-5); }

.sp__close-l a {
  color: var(--accent-text);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 800;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  transition: .15s;
}

.sp__close-l a:hover { background: var(--accent-soft); }

/* 쇼케이스 내부 부품 */
.sd__opts { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-4); }

.sd__opts .btn--2[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.sd__note {
  font-size: var(--fs-sm);
  color: var(--text-dim);
  line-height: var(--lh-body);
  margin: var(--sp-3) 0 0;
}

.sd__note b { color: var(--text-sub); }

.sd__two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }

.sd__h {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 800;
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
}

.sd__h span { font-size: var(--fs-2xs); font-weight: 700; color: var(--text-dim); }

.sd__box {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--sp-4) var(--sp-5);
}

.sd__st { margin: var(--sp-2) 0 0; font-size: var(--fs-xs); color: var(--text-dim); font-weight: 700; }

.sd__cmp { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin-top: var(--sp-4); }

.sd__cmp-b {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-elev);
}

.sd__cmp-b > b { display: block; font-size: var(--fs-xs); font-weight: 800; margin-bottom: var(--sp-1); }
.sd__cmp-b > b.ok { color: var(--success); }
.sd__cmp-b > b.no { color: var(--danger); }
.sd__cmp-b p { margin: 0; font-size: var(--fs-sm); line-height: var(--lh-body); color: var(--text-sub); }

.sd__grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--sp-3); }
.sd__bt { display: block; font-size: var(--fs-xs); font-weight: 800; margin-bottom: var(--sp-1); }

.sd__tbl { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elev); }

.sd__rel { margin-top: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); }

.sd__rel-i {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-elev);
}

.sd__rel-i b { font-size: var(--fs-sm); font-weight: 800; margin-right: var(--sp-2); }
.sd__rel-i span { font-size: var(--fs-xs); color: var(--text-dim); }
.sd__rel-i--on { background: var(--accent-soft); border-color: var(--accent); }
.sd__rel-i--on b { color: var(--accent-text); }

.sd__dlgdemo { padding: var(--sp-5) var(--sp-2); background: var(--bg-sunken); border-radius: var(--radius-sm); }

.sd__pin {
  position: absolute;
  font-size: var(--fs-2xs);
  font-weight: 800;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: var(--radius-sm);
  padding: 1.var(--sp-1) var(--sp-1);
  letter-spacing: .02em;
}

.sd__state { text-align: center; padding: var(--sp-5) var(--sp-3); }
.sd__state .st { display: inline-flex; padding: var(--sp-2) var(--sp-5); font-size: var(--fs-sm); }
.sd__state p { margin: var(--sp-3) 0 0; font-size: var(--fs-sm); color: var(--text-sub); line-height: var(--lh-body); }

.winpop {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 74%;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.winpop__bar {
  display: flex; align-items: center; gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-2);
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--border);
}

.winpop__bar span { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.winpop__bar b { margin-left: var(--sp-2); font-size: var(--fs-2xs); color: var(--text-dim); font-weight: 600; }
.winpop__body { padding: var(--sp-4) var(--sp-3); text-align: center; font-size: var(--fs-sm); font-weight: 800; }
.winpop__body span { display: block; margin-top: var(--sp-1); font-size: var(--fs-2xs); font-weight: 500; color: var(--text-dim); }

.btn-flat {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-md);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
}

/* 반응형 시뮬레이터 */
.rs__ctl { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.rs__lbl { font-size: var(--fs-xs); font-weight: 800; color: var(--text-dim); white-space: nowrap; }
.rs__ctl input { flex: 1; }
.rs__val { font-size: var(--fs-sm); font-weight: 800; min-width: 62px; text-align: right; color: var(--accent-text); }

.rs__stage {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--sp-3);
  overflow: hidden;
  display: flex;
  justify-content: center;
}

.rs__frame {
  max-width: 100%;
  transition: width .12s;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-elev);
}

.rs__site { display: flex; flex-direction: column; min-height: 190px; }

.rs__hd {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-2xs);
}

.rs__hd b { font-weight: 800; letter-spacing: .04em; }
.rs__hd nav { display: flex; gap: var(--sp-3); margin-left: auto; color: var(--text-dim); font-weight: 600; }
.rs__burger { margin-left: auto; display: none; font-size: var(--fs-body); color: var(--text-sub); font-style: normal; }

.rs__main { flex: 1; display: flex; gap: var(--sp-2); padding: var(--sp-3); }

.rs__side {
  flex: 0 0 84px;
  background: var(--bg-sunken);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-2xs); font-weight: 700; color: var(--text-dim);
}

.rs__cards { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2); }

.rs__cards > div {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--r-md);
  min-height: 52px;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-2xs); font-weight: 700; color: var(--accent-text);
}

.rs__ft {
  padding: var(--sp-2) var(--sp-3);
  border-top: 1px solid var(--border);
  font-size: var(--fs-2xs); color: var(--text-dim); font-weight: 700;
  text-align: center;
}

/* 시뮬레이터 상태 클래스 — JS가 프레임에 붙인다 */
.rs__frame.bp-tablet .rs__side { display: none; }
.rs__frame.bp-tablet .rs__cards { grid-template-columns: repeat(2, 1fr); }
.rs__frame.bp-mobile .rs__side { display: none; }
.rs__frame.bp-mobile .rs__cards { grid-template-columns: 1fr; }
.rs__frame.bp-mobile .rs__hd nav { display: none; }
.rs__frame.bp-mobile .rs__burger { display: block; }

.rs__state {
  margin: var(--sp-3) 0 0;
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--accent-text);
}

/* ---------- 8-b) 디자인 가이드 ---------- */
.dg { max-width: 880px; margin: 0 auto; padding: 0 var(--sp-5); }
.dg__hero { padding: var(--sp-7) 0 var(--sp-6); border-bottom: 2px solid var(--text); }
.dg__hero h1 { margin: 0 0 var(--sp-4); font-size: var(--fs-h1); font-weight: 800; }
.dg__lead { margin: 0; max-width: 620px; color: var(--text-sub); font-size: var(--fs-lead); line-height: var(--lh-loose); }

.dg__s { padding-top: var(--sp-7); }

.dg__h {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--accent-text);
  text-transform: uppercase;
}

.dg__note { margin: 0 0 var(--sp-4); color: var(--text-dim); font-size: var(--fs-sm); }

/* 원칙 */
.dg__pr { display: flex; flex-direction: column; }
.dg__pr-i { display: grid; grid-template-columns: 40px 1fr; padding: var(--sp-4) 0; border-bottom: 1px solid var(--border); }
.dg__pr-n { font-size: var(--fs-sm); font-weight: 800; color: var(--accent-text); font-variant-numeric: tabular-nums; padding-top: 3px; }
.dg__pr-i h3 { margin: 0 0 var(--sp-1); font-size: var(--fs-lead); font-weight: 800; }
.dg__pr-i p { margin: 0; font-size: var(--fs-sm); color: var(--text-sub); line-height: var(--lh-body); }

/* 타입 스케일 */
.dg__type { border-top: 1px solid var(--border); }
.dg__type-i { padding: var(--sp-4) 0; border-bottom: 1px solid var(--border); }
.dg__type-s { font-weight: 700; letter-spacing: -.03em; line-height: var(--lh-tight); margin-bottom: var(--sp-2); }
.dg__t-display { font-size: var(--fs-display); font-weight: 800; }
.dg__t-h1 { font-size: var(--fs-h1); font-weight: 800; }
.dg__t-h2 { font-size: var(--fs-h2); font-weight: 800; }
.dg__t-lead { font-size: var(--fs-lead); }
.dg__t-body { font-size: var(--fs-body); }
.dg__t-sm { font-size: var(--fs-sm); }
.dg__t-xs { font-size: var(--fs-xs); }
.dg__t-2xs { font-size: var(--fs-2xs); }

.dg__meta { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; font-size: var(--fs-xs); color: var(--text-dim); }
.dg__meta code { font-size: var(--fs-2xs); }

/* 여백 */
.dg__sp { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.dg__sp-i { display: grid; grid-template-columns: 72px 100px 1fr; align-items: center; gap: var(--sp-3); padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text-dim); }
.dg__sp-i i { display: block; background: var(--accent); border-radius: 1px; }
.dg__sp-i code, .dg__sw-i code, .dg__meta code { justify-self: start; }

/* 색 */
.dg__cg { margin-bottom: var(--sp-5); }
.dg__cg-t { margin: 0 0 var(--sp-3); font-size: var(--fs-sm); font-weight: 800; }
.dg__sw { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--sp-3); }
.dg__sw-i { display: grid; grid-template-columns: 32px 1fr; gap: var(--sp-3); align-items: center; }
.dg__sw-i i { display: block; width: 32px; height: 32px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); }
.dg__sw-i code { font-size: var(--fs-2xs); display: block; justify-self: start; }
.dg__sw-i span { font-size: var(--fs-2xs); color: var(--text-dim); display: block; grid-column: 2; }

/* 모서리 */
.dg__r { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--sp-4); }
.dg__r-i i { display: block; width: 100%; height: 48px; background: var(--accent-soft); border: 1px solid var(--accent); margin-bottom: var(--sp-2); }
.dg__r-i code { font-size: var(--fs-2xs); }
.dg__r-i span { font-size: var(--fs-2xs); color: var(--text-dim); margin-left: var(--sp-2); }

/* 컴포넌트 */
.dg__c { padding: var(--sp-4) 0; border-bottom: 1px solid var(--border); }
.dg__c-t { margin: 0 0 var(--sp-3); font-size: var(--fs-sm); font-weight: 800; }
.dg__c-d { margin: var(--sp-3) 0 0; font-size: var(--fs-xs); color: var(--text-dim); line-height: var(--lh-snug); }
.dg__st { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: var(--sp-2); }

/* 질문 */
.dg__q { border-top: 1px solid var(--border); }
.dg__q-i { padding: var(--sp-4) 0; border-bottom: 1px solid var(--border); }
.dg__q-i h3 { margin: 0 0 var(--sp-2); font-size: var(--fs-lead); font-weight: 800; }
.dg__q-i p { margin: 0; font-size: var(--fs-sm); color: var(--text-sub); line-height: var(--lh-body); }

.dg__tbl-w { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-elev); }

.dg__a11y { margin: 0; padding-left: var(--sp-5); }
.dg__a11y li { font-size: var(--fs-sm); color: var(--text-sub); line-height: var(--lh-body); margin-bottom: var(--sp-2); }


/* 스플래시 데모 등에서 쓰는 로고 자리 표시 */
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  font-size: var(--fs-sm);
  font-weight: 800;
  letter-spacing: .02em;
}

/* 선 아이콘 — data/icons.js. 크기는 부모 font-size(1em)를 따라간다 */
.ic {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -.14em;
  flex: 0 0 auto;
}

/* ---------- 8-d) 사이트맵 ---------- */
.sm { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--sp-5); }
.sm__hero { padding: var(--sp-7) 0 var(--sp-6); border-bottom: 2px solid var(--text); }
.sm__hero h1 { margin: 0 0 var(--sp-4); font-size: var(--fs-h1); font-weight: 800; }
.sm__lead { margin: 0 0 var(--sp-4); max-width: 620px; color: var(--text-sub); font-size: var(--fs-lead); line-height: var(--lh-loose); }
.sm__meta { margin: 0; font-size: var(--fs-sm); color: var(--text-dim); font-weight: 600; }

.sm__s { padding-top: var(--sp-7); }

.sm__h {
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--accent-text);
  text-transform: uppercase;
}

/* 기본 페이지 목록 */
.sm__flat { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.sm__flat li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-3);
  padding: var(--sp-3) 0; border-bottom: 1px solid var(--border);
}
.sm__flat a { font-size: var(--fs-lead); font-weight: 800; text-decoration: none; }
.sm__flat a:hover { color: var(--accent-text); }
.sm__flat span { font-size: var(--fs-sm); color: var(--text-dim); }

/* 분류별 용어 색인 */
.sm__cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--sp-5); }

.sm__cat, .sm__dive {
  border-top: 2px solid hsl(var(--hue, 250) 38% 55%);
  padding-top: var(--sp-3);
}

.sm__dive { border-top-color: var(--accent); }

.sm__cat h3, .sm__dive h3 {
  display: flex; align-items: baseline; gap: var(--sp-2); flex-wrap: wrap;
  margin: 0 0 var(--sp-1); font-size: var(--fs-lead); font-weight: 800;
}

.sm__cat h3 a, .sm__dive h3 a { text-decoration: none; }
.sm__cat h3 a:hover, .sm__dive h3 a:hover { color: var(--accent-text); }

.sm__no {
  font-size: var(--fs-xs);
  font-weight: 800;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.sm__cat h3 em, .sm__dive h3 em {
  margin-left: auto; font-style: normal;
  font-size: var(--fs-2xs); font-weight: 700; color: var(--text-dim);
}

.sm__desc { margin: 0 0 var(--sp-3); font-size: var(--fs-sm); color: var(--text-dim); line-height: var(--lh-snug); }

.sm__terms { list-style: none; margin: 0; padding: 0; }
.sm__terms li { padding: 3px 0; border-bottom: 1px solid var(--border); }
.sm__terms a { font-size: var(--fs-sm); font-weight: 700; text-decoration: none; }
.sm__terms a:hover { color: var(--accent-text); }
.sm__terms i { font-style: normal; font-size: var(--fs-2xs); color: var(--text-dim); margin-left: var(--sp-2); }

.sm__dives { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--sp-5); }
.sm__steps { margin: 0; padding-left: var(--sp-5); }
.sm__steps li { font-size: var(--fs-sm); color: var(--text-sub); padding: 2px 0; }

@media (max-width: 720px) {
  .sm { padding-left: var(--sp-4); padding-right: var(--sp-4); }
  .sm__cats, .sm__dives { grid-template-columns: 1fr; }
}

/* ---------- 8-c) 전역 검색 팔레트 ---------- */
.sh__find {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-left: auto;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text-dim);
  font: inherit;
  font-size: var(--fs-xs);
  padding: 5px var(--sp-2) 5px var(--sp-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: .13s;
  white-space: nowrap;
}

.sh__find:hover { border-color: var(--accent); color: var(--accent-text); }
.sh__find kbd {
  font-family: inherit;
  font-size: var(--fs-2xs);
  font-weight: 700;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 1px 4px;
  color: var(--text-dim);
}

.pal { position: fixed; inset: 0; z-index: 400; }
.pal[hidden] { display: none; }
.pal__scrim { position: absolute; inset: 0; background: var(--overlay); }

.pal__box {
  position: relative;
  max-width: 620px;
  margin: 10vh auto 0;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.pal__in {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
}

.pal__q {
  flex: 1;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: var(--fs-lead);
  outline: none;
}

.pal__esc, .pal__ft kbd {
  font-family: inherit;
  font-size: var(--fs-2xs);
  font-weight: 700;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 1px 5px;
  color: var(--text-dim);
}

.pal__list { max-height: 52vh; overflow-y: auto; padding: var(--sp-2); }

.pal__i {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
}

.pal__i[aria-selected="true"] { background: var(--accent-soft); }
.pal__ko { font-size: var(--fs-body); font-weight: 800; }
.pal__en { grid-column: 1; font-size: var(--fs-xs); color: var(--text-dim); }
.pal__cat { grid-row: 1 / 3; align-self: center; font-size: var(--fs-2xs); color: var(--text-dim); white-space: nowrap; }
.pal__i[aria-selected="true"] .pal__ko,
.pal__i[aria-selected="true"] .pal__cat { color: var(--accent-text); }
.pal__none { margin: 0; padding: var(--sp-5); text-align: center; color: var(--text-dim); font-size: var(--fs-sm); }

.pal__ft {
  padding: var(--sp-2) var(--sp-4);
  border-top: 1px solid var(--border);
  font-size: var(--fs-2xs);
  color: var(--text-dim);
  background: var(--bg-sunken);
}

/* ---------- 9) 데모 부품 ---------- */
.d-row { display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center; }
.d-col { display: flex; flex-direction: column; gap: var(--sp-2); }
.d-note { font-size: var(--fs-sm); color: var(--text-dim); margin-top: var(--sp-3); line-height: var(--lh-snug); }
.d-box { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-md); }
.hid { display: none; }
.hid.is-open { display: block; }

.btn {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
  transition: .14s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:hover { filter: brightness(1.09); }
.btn:active { transform: translateY(1px); }
.btn--2 { background: var(--bg-elev); color: var(--text); border-color: var(--border-strong); }
.btn--2:hover { border-color: var(--accent); color: var(--accent-text); filter: none; }
.btn--ghost { background: transparent; border-color: transparent; color: var(--accent-text); }
.btn--ghost:hover { background: var(--accent-soft); filter: none; }
.btn--line { background: transparent; color: var(--accent-text); }
.btn--line:hover { background: var(--accent-soft); filter: none; }
.btn--danger { background: var(--danger); border-color: var(--danger); }
.btn--sm { padding: var(--sp-1) var(--sp-3); font-size: var(--fs-xs); }
.btn--lg { padding: var(--sp-3) var(--sp-5); font-size: var(--fs-body); border-radius: var(--radius-sm); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; transform: none; }

.fld {
  width: 100%;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-sm);
  outline: none;
  transition: .14s;
}

.fld:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.fld:disabled { background: var(--bg-sunken); color: var(--text-dim); cursor: not-allowed; }
.fld[readonly] { background: var(--bg-sunken); }

.lbl { font-size: var(--fs-xs); font-weight: 700; color: var(--text-sub); display: block; margin-bottom: var(--sp-1); }
.hlp { font-size: var(--fs-xs); color: var(--text-dim); margin-top: var(--sp-1); }
.err { font-size: var(--fs-xs); color: var(--danger); margin-top: var(--sp-1); font-weight: 600; }

.ln { height: 6px; border-radius: var(--r-sm); background: var(--border); display: block; }
.ln + .ln { margin-top: var(--sp-1); }
.ln.w80 { width: 80%; } .ln.w60 { width: 60%; } .ln.w40 { width: 40%; } .ln.w30 { width: 30%; }
.ln.big { height: 10px; background: var(--border-strong); }

/* 오버레이 무대 — 데모는 강의 중 화면에 띄워 함께 보므로 넉넉하게 잡는다 */
.d-stage {
  position: relative;
  height: 230px;
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  overflow: hidden;
}

.d-stage__bg { padding: var(--sp-4); font-size: var(--fs-sm); color: var(--text-dim); line-height: var(--lh-body); }

.scrim {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-3);
  z-index: 5;
}

.is-open .scrim, .scrim.is-open { opacity: 1; pointer-events: auto; }

.dlg {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  width: 100%;
  max-width: 340px;
  box-shadow: var(--shadow-lg);
  transform: scale(.94);
  transition: transform .2s;
}

.is-open .scrim .dlg, .scrim.is-open .dlg { transform: scale(1); }
.dlg h4 { margin: 0 0 var(--sp-2); font-size: var(--fs-lead); }
.dlg p { margin: 0 0 var(--sp-4); font-size: var(--fs-sm); color: var(--text-sub); line-height: var(--lh-snug); }
.dlg .d-row { justify-content: flex-end; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text-sub);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  transition: .13s;
  font-family: inherit;
}

.chip[aria-pressed="true"], .chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }

.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 var(--sp-1);
  border-radius: var(--r-full); background: var(--danger); color: var(--on-accent);
  font-size: var(--fs-2xs); font-weight: 800;
}

.tag {
  display: inline-block; padding: 2px var(--sp-2); border-radius: var(--radius-sm);
  background: var(--accent-soft); color: var(--accent-text);
  font-size: var(--fs-xs); font-weight: 700;
}

.sk {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-sunken) 37%, var(--border) 63%);
  background-size: 400% 100%;
  animation: sk 1.4s ease infinite;
  border-radius: var(--radius-sm);
}

@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.spin {
  width: 26px; height: 26px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.bar { height: 7px; background: var(--border); border-radius: var(--r-full); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: var(--r-full); transition: width .3s; }

/* 내비게이션 부품 */
.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--border); }

.tabs button {
  border: 0; background: none; color: var(--text-dim);
  font: inherit; font-size: var(--fs-sm); font-weight: 700;
  padding: var(--sp-2) var(--sp-3); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: .14s;
}

.tabs button:hover { color: var(--text-sub); }
.tabs button[aria-selected="true"] { color: var(--accent-text); border-bottom-color: var(--accent); }

.pane { padding: var(--sp-3) 3px 2px; font-size: var(--fs-sm); color: var(--text-sub); line-height: var(--lh-snug); }

.tbtn {
  flex: 1; border: 0; background: none; padding: var(--sp-2) 0;
  cursor: pointer; font: inherit; font-size: var(--fs-2xs); font-weight: 700;
  color: var(--text-dim); line-height: var(--lh-snug);
}

.tbtn[aria-pressed="true"] { color: var(--accent-text); }

.menu {
  position: absolute; top: calc(100% + 5px); left: 0;
  min-width: 138px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-1);
  opacity: 0; transform: translateY(-5px); pointer-events: none;
  transition: .16s; z-index: 20;
}

.menu.is-open { opacity: 1; transform: none; pointer-events: auto; }

.menu i {
  display: block; padding: var(--sp-1) var(--sp-2); border-radius: var(--r-md);
  font-size: var(--fs-xs); font-style: normal; color: var(--text-sub); cursor: pointer;
}

.menu i:hover { background: var(--accent-soft); color: var(--accent-text); }

.drawer {
  position: absolute; left: 0; top: 0; bottom: 0; width: 62%;
  background: var(--bg-elev); border-right: 1px solid var(--border-strong);
  transform: translateX(-101%);
  transition: transform .26s cubic-bezier(.4, 0, .2, 1);
  z-index: 6; padding: var(--sp-4);
}

.is-open .drawer { transform: none; }

.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--bg-elev);
  border-top: 1px solid var(--border-strong);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  transform: translateY(101%);
  transition: transform .26s cubic-bezier(.4, 0, .2, 1);
  z-index: 6; padding: var(--sp-4);
  box-shadow: var(--shadow-lg);
}

.is-open .sheet { transform: none; }
.sheet__grab { width: 34px; height: 4px; background: var(--border-strong); border-radius: var(--r-full); margin: 0 auto var(--sp-2); }

.np {
  position: absolute; right: 0; top: 0; bottom: 0; width: 46%;
  background: var(--bg-elev); border-left: 1px solid var(--border-strong);
  transform: translateX(101%);
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
  padding: var(--sp-4); z-index: 4;
}

.np.is-open { transform: none; }

.crumb { display: flex; align-items: center; gap: var(--sp-1); flex-wrap: wrap; font-size: var(--fs-xs); }
.crumb a { color: var(--text-dim); text-decoration: none; cursor: pointer; }
.crumb a:hover { color: var(--accent-text); text-decoration: underline; }
.crumb span { color: var(--text-dim); opacity: .6; }
.crumb b { color: var(--text); font-weight: 700; }

.pager { display: flex; gap: var(--sp-1); align-items: center; flex-wrap: wrap; }

.pager button {
  min-width: 28px; height: 28px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev); color: var(--text-sub);
  border-radius: var(--r-md); font: inherit; font-size: var(--fs-xs); font-weight: 700; cursor: pointer;
}

.pager button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pager button:disabled { opacity: .35; cursor: not-allowed; }

.steps { display: flex; align-items: center; }
.steps > div { display: flex; align-items: center; flex: 1; }
.steps > div:last-child { flex: 0 0 auto; }

.steps b {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--bg-elev); color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-2xs); font-weight: 800; flex: 0 0 auto; transition: .2s;
}

.steps i { flex: 1; height: 2px; background: var(--border-strong); transition: .2s; }
.steps .done b { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.steps .done i { background: var(--accent); }
.steps .now b { border-color: var(--accent); color: var(--accent-text); }
.steps__lbl { display: flex; margin-top: var(--sp-1); font-size: var(--fs-2xs); color: var(--text-dim); font-weight: 700; }
.steps__lbl span { flex: 1; }
.steps__lbl span:last-child { flex: 0 0 auto; }

.fab {
  position: absolute; right: 10px; bottom: 10px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: var(--accent); color: var(--on-accent);
  font-size: var(--fs-lead); cursor: pointer; box-shadow: var(--shadow-md); z-index: 2;
}

.sticky-demo { height: 118px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-elev); }
.sticky-demo__bar { position: sticky; top: 0; background: var(--accent); color: var(--on-accent); font-size: var(--fs-2xs); font-weight: 800; padding: var(--sp-1) var(--sp-2); z-index: 1; }
.sticky-demo__body { padding: var(--sp-2); }

.burger {
  width: 34px; height: 30px;
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--bg-elev); cursor: pointer;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: var(--sp-1);
  flex: 0 0 auto;
}

.burger em { display: block; width: 15px; height: 2px; background: var(--text-sub); border-radius: var(--r-sm); }

/* 오버레이·피드백 부품 */
.tip-h { position: relative; display: inline-block; border-bottom: 1px dashed var(--text-dim); cursor: help; font-weight: 700; }

.tip-h::after {
  content: attr(data-tip);
  position: absolute; bottom: calc(100% + 7px); left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--tooltip-bg); color: var(--on-accent);
  font-size: var(--fs-2xs); font-weight: 500;
  padding: var(--sp-1) var(--sp-2); border-radius: var(--r-md); white-space: nowrap;
  opacity: 0; pointer-events: none; transition: .16s; z-index: 30;
}

.tip-h:hover::after, .tip-h:focus-visible::after { opacity: 1; transform: translateX(-50%); }

.toast {
  position: absolute; left: 50%; bottom: 16px;
  transform: translateX(-50%) translateY(10px);
  background: var(--tooltip-bg); color: var(--on-accent);
  font-size: var(--fs-sm); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-lg);
  opacity: 0; pointer-events: none; transition: .22s; z-index: 8;
  display: flex; align-items: center; gap: var(--sp-3);
  box-shadow: var(--shadow-lg); max-width: 92%;
}

.toast.is-open { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
.toast em { font-style: normal; color: var(--tooltip-link); font-weight: 800; cursor: pointer; white-space: nowrap; }

.banner {
  display: flex; gap: var(--sp-2); align-items: center;
  background: var(--accent-soft); border: 1px solid var(--accent);
  color: var(--accent-text); border-radius: var(--r-md);
  padding: var(--sp-2) var(--sp-3); font-size: var(--fs-xs); line-height: var(--lh-snug);
}

.banner button { margin-left: auto; }

.msg {
  display: flex; gap: var(--sp-2); align-items: flex-start;
  font-size: var(--fs-xs); border-radius: var(--r-md); padding: var(--sp-2) var(--sp-2);
  line-height: var(--lh-snug); border: 1px solid;
}

.msg.ok { background: color-mix(in srgb, var(--success) 10%, transparent); border-color: color-mix(in srgb, var(--success) 40%, transparent); color: var(--success); }
.msg.no { background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: color-mix(in srgb, var(--danger) 40%, transparent); color: var(--danger); }
.msg.warn { background: var(--warn-soft); border-color: var(--warn-border); color: var(--warn); }

.pop {
  position: absolute; bottom: calc(100% + 8px); left: 0; width: 190px;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg); padding: var(--sp-3);
  font-size: var(--fs-xs); color: var(--text-sub);
  opacity: 0; transform: translateY(5px); pointer-events: none;
  transition: .16s; z-index: 30; line-height: var(--lh-snug);
}

.pop.is-open { opacity: 1; transform: none; pointer-events: auto; }

.cmp { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-2); }
.cmp > div { border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-2); background: var(--bg-elev); }
.cmp h6 { margin: 0 0 var(--sp-1); font-size: var(--fs-xs); font-weight: 800; color: var(--accent-text); }
.cmp p { margin: 0; font-size: var(--fs-xs); color: var(--text-dim); line-height: var(--lh-snug); }

.coach {
  position: absolute; background: var(--accent); color: var(--on-accent);
  font-size: var(--fs-2xs); font-weight: 700; padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg); z-index: 6; line-height: var(--lh-snug);
}

/* 폼 부품 */
.opt { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); cursor: pointer; padding: 3px 0; color: var(--text-sub); }
.opt input { accent-color: var(--accent); width: 15px; height: 15px; }

.sw { position: relative; display: inline-flex; align-items: center; gap: var(--sp-2); cursor: pointer; font-size: var(--fs-sm); color: var(--text-sub); }
.sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw i { width: 38px; height: 22px; background: var(--border-strong); border-radius: var(--r-full); position: relative; transition: .2s; flex: 0 0 auto; }

.sw i::after {
  content: ""; position: absolute; left: 2px; top: 2px;
  width: 18px; height: 18px; background: var(--bg-elev); border-radius: 50%;
  transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

.sw input:checked + i { background: var(--accent); }
.sw input:checked + i::after { transform: translateX(16px); }
.sw input:focus-visible + i { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }

.seg { display: inline-flex; background: var(--bg-sunken); border: 1px solid var(--border); border-radius: var(--r-md); padding: 2px; }

.seg button {
  border: 0; background: none; padding: var(--sp-1) var(--sp-3); border-radius: var(--r-md);
  font: inherit; font-size: var(--fs-xs); font-weight: 700;
  color: var(--text-dim); cursor: pointer; transition: .14s;
}

.seg button[aria-pressed="true"] { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-sm); }

.dz {
  border: 2px dashed var(--border-strong); border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-3); text-align: center; font-size: var(--fs-xs);
  color: var(--text-dim); transition: .15s; cursor: pointer;
}

.dz.is-open { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }

.num { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--r-md); overflow: hidden; background: var(--bg-elev); }
.num button { border: 0; background: none; width: 28px; height: 28px; font-size: var(--fs-body); cursor: pointer; color: var(--text-sub); line-height: 1; }
.num button:hover { background: var(--bg-sunken); }
.num input { width: 40px; border: 0; text-align: center; background: none; color: var(--text); font: inherit; font-size: var(--fs-sm); -moz-appearance: textfield; }
.num input::-webkit-outer-spin-button, .num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

input[type="range"] { accent-color: var(--accent); width: 100%; }

.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; font-size: var(--fs-2xs); text-align: center; }
.cal span { padding: var(--sp-1) 0; color: var(--text-dim); font-weight: 700; }
.cal b { padding: var(--sp-1) 0; border-radius: var(--r-md); font-weight: 500; color: var(--text-sub); cursor: pointer; }
.cal b:hover { background: var(--bg-sunken); }
.cal b.on { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.cal b.dim { opacity: .3; }

/* 데이터 표시 부품 */
.car { overflow: hidden; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--bg-elev); }
.car__track { display: flex; transition: transform .3s cubic-bezier(.4, 0, .2, 1); }

.car__track > div {
  flex: 0 0 100%; height: 118px;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-body); font-weight: 800; color: var(--accent-text);
  background: var(--accent-soft); border-right: 1px solid var(--border);
}

.dots { display: flex; gap: var(--sp-1); justify-content: center; margin-top: var(--sp-2); }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); transition: .2s; display: block; }
.dots i.on { background: var(--accent); width: 16px; border-radius: var(--r-full); }

.acc { border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--bg-elev); }
.acc details { border-bottom: 1px solid var(--border); }
.acc details:last-child { border-bottom: 0; }

.acc summary {
  padding: var(--sp-2) var(--sp-3); font-size: var(--fs-sm); font-weight: 700; cursor: pointer;
  list-style: none; display: flex; justify-content: space-between;
  align-items: center; gap: var(--sp-2); color: var(--text);
}

.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "▾"; transition: transform .2s; color: var(--text-dim); font-size: var(--fs-2xs); }
.acc details[open] summary::after { transform: rotate(180deg); }
.acc p { margin: 0; padding: 0 var(--sp-3) var(--sp-3); font-size: var(--fs-xs); color: var(--text-sub); line-height: var(--lh-snug); }

.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-elev); }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); min-width: 300px; }
.tbl th { background: var(--bg-sunken); padding: var(--sp-2) var(--sp-2); text-align: left; font-weight: 800; color: var(--text-sub); border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: var(--sp-2) var(--sp-2); border-bottom: 1px solid var(--border); color: var(--text-sub); }
.tbl tr:last-child td { border-bottom: 0; }

.ava {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-text);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-xs); font-weight: 800; flex: 0 0 auto; border: 1px solid var(--accent);
}

.ava--sm { width: 24px; height: 24px; font-size: var(--fs-2xs); }
.ava-stack { display: flex; }
.ava-stack .ava { margin-left: -var(--sp-2); border: 2px solid var(--bg-sunken); }
.ava-stack .ava:first-child { margin-left: 0; }

.tl { position: relative; padding-left: var(--sp-4); }
.tl::before { content: ""; position: absolute; left: 4px; top: 5px; bottom: 8px; width: 2px; background: var(--border); }
.tl > div { position: relative; padding-bottom: var(--sp-3); font-size: var(--fs-xs); color: var(--text-sub); line-height: var(--lh-snug); }
.tl > div::before { content: ""; position: absolute; left: -18px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg-sunken); }
.tl > div b { display: block; color: var(--text); font-size: var(--fs-xs); }
.tl > div span { font-size: var(--fs-2xs); color: var(--text-dim); }

.chart { display: flex; align-items: flex-end; gap: var(--sp-2); height: 108px; }
.chart i { flex: 1; background: var(--accent); border-radius: var(--radius-sm) var(--radius-sm) 0 0; display: block; min-height: 4px; }
.chart-x { display: flex; gap: var(--sp-2); margin-top: var(--sp-1); font-size: var(--fs-2xs); color: var(--text-dim); text-align: center; }
.chart-x span { flex: 1; }

.thumb {
  width: 100%; aspect-ratio: 4 / 3; border-radius: var(--r-md);
  background: var(--bg-sunken); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-lead); color: var(--text-dim);
}

/* 상태 부품 */
.st {
  display: flex; align-items: center; justify-content: center;
  padding: var(--sp-3) var(--sp-2); border-radius: var(--r-md);
  border: 1px solid var(--border-strong); background: var(--bg-elev);
  font-size: var(--fs-sm); font-weight: 700; color: var(--text-sub);
  text-align: center; transition: .14s;
}

.st.hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.st.focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); border-color: var(--accent); }
.st.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); transform: translateY(1px); }
.st.sel { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); font-weight: 800; }
.st.dis { opacity: .4; }

.mv-track { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-2) var(--sp-2); overflow: hidden; }
.mv { width: 22px; height: 22px; border-radius: var(--r-md); background: var(--accent); margin-left: 0; transition: margin-left .7s linear; }
.mv.ease { transition-timing-function: cubic-bezier(.2, .9, .3, 1); }
.mv-track.is-open .mv { margin-left: calc(100% - var(--sp-5)); }

.heart { font-size: var(--fs-h2); cursor: pointer; background: none; border: 0; padding: 3px; line-height: 1; transition: transform .22s cubic-bezier(.2, 1.6, .4, 1); }
.heart::before { content: "♡"; color: var(--text-dim); }
.heart[aria-pressed="true"]::before { content: "♥"; color: var(--danger); }
.heart[aria-pressed="true"] { transform: scale(1.22); }

.drag-item { padding: var(--sp-1) var(--sp-2); background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: var(--r-md); font-size: var(--fs-xs); font-weight: 700; cursor: grab; user-select: none; }
.drag-item.dragging { opacity: .4; }

.drop-zone {
  flex: 1; min-height: 62px;
  border: 2px dashed var(--border-strong); border-radius: var(--r-md);
  padding: var(--sp-2); display: flex; flex-direction: column; gap: var(--sp-1); transition: .15s;
}

.drop-zone.drop-on { border-color: var(--accent); background: var(--accent-soft); }
.drop-zone > b { font-size: var(--fs-2xs); color: var(--text-dim); letter-spacing: .02em; }

.press-target {
  padding: var(--sp-3); border-radius: var(--r-md); background: var(--bg-elev);
  border: 1px solid var(--border-strong); text-align: center;
  font-size: var(--fs-xs); font-weight: 700; color: var(--text-sub);
  user-select: none; cursor: pointer; transition: .1s;
}

.press-target.pressing { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); transform: scale(.97); }

.swipe-wrap { position: relative; overflow: hidden; border-radius: var(--r-md); border: 1px solid var(--border); }
.swipe-bg { position: absolute; inset: 0; background: var(--danger); color: var(--on-accent); display: flex; align-items: center; justify-content: flex-end; padding-right: var(--sp-3); font-size: var(--fs-xs); font-weight: 800; }
.swipe-fg { position: relative; background: var(--bg-elev); padding: var(--sp-3); font-size: var(--fs-xs); transition: transform .25s; }
.swipe-wrap.is-open .swipe-fg { transform: translateX(-84px); }

.ptr { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-elev); overflow: hidden; }
.ptr__top { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); height: 0; overflow: hidden; background: var(--bg-sunken); font-size: var(--fs-2xs); color: var(--text-dim); font-weight: 700; transition: height .25s; }
.ptr.is-open .ptr__top { height: 34px; }

.para { position: relative; height: 92px; overflow-y: auto; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--bg-elev); }
.para__bg { position: sticky; top: 0; height: 92px; margin-bottom: -var(--sp-8); background: linear-gradient(135deg, var(--accent-soft), var(--bg-sunken)); display: flex; align-items: center; justify-content: center; font-size: var(--fs-2xs); font-weight: 800; color: var(--accent-text); }
.para__fg { position: relative; padding: var(--sp-7) var(--sp-3) var(--sp-3); }
.para__fg > div { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-2); font-size: var(--fs-xs); color: var(--text-sub); }

/* 미니 화면 목업 */
.mock { background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-1); }
.mk-row { display: flex; gap: var(--sp-1); flex: 1; min-height: 0; }
.mk-col { display: flex; flex-direction: column; gap: var(--sp-1); flex: 1; min-width: 0; }

.mk-b {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-sunken); border: 1px dashed var(--border-strong);
  border-radius: var(--r-md); font-size: var(--fs-xs); font-weight: 700; color: var(--text-dim);
  padding: var(--sp-2) var(--sp-1); text-align: center; min-height: 34px; letter-spacing: -.01em;
}

.mk-b.on { background: var(--accent-soft); border-style: solid; border-color: var(--accent); color: var(--accent-text); }
.mk-b.warn { background: var(--warn-soft); border-color: var(--warn-border); border-style: solid; color: var(--warn); }
.mk-b.tall { min-height: 78px; }
.mk-b.grow { flex: 1; }

.mk-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--sp-1); height: 50px; }
.mk-grid i { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--r-sm); display: block; }
.mk-grid.gut { gap: var(--sp-2); }
.mk-cap { font-size: var(--fs-2xs); font-weight: 700; color: var(--text-dim); letter-spacing: -.01em; margin-bottom: var(--sp-1); display: block; }

.mk-dev { display: flex; gap: var(--sp-2); align-items: flex-end; }
.mk-dev > div { border: 1px solid var(--border-strong); border-radius: var(--r-md); padding: var(--sp-1); background: var(--bg-elev); }
.mk-dev .p { width: 52px; }
.mk-dev .t { width: 78px; }
.mk-dev .d { flex: 1; }

@media (prefers-reduced-motion: reduce) {
  .sk, .spin { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* ---------- 10) 반응형 ---------- */
@media (max-width: 860px) {
  .sd__two, .sd__cmp { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body { font-size: var(--fs-body); }
  .sh__in, .hm, .cp, .tp, .sp, .dg { padding-left: var(--sp-4); padding-right: var(--sp-4); }

  /* 좁은 폭에서는 헤더를 두 줄로 — 메뉴 4개 + 테마 3버튼이 한 줄에 안 들어간다 */
  .sh__in { height: auto; flex-wrap: wrap; padding-top: var(--sp-2); padding-bottom: var(--sp-2); gap: var(--sp-2); }
  .sh__logo { font-size: var(--fs-sm); }
  .sh__nav { margin-left: auto; }
  .sh__nav a { padding: var(--sp-1) var(--sp-2); font-size: var(--fs-xs); }
  .theme { margin-left: 0; width: 100%; }
  .theme button { flex: 1; font-size: var(--fs-2xs); padding: var(--sp-1) 0; }
  .hm__hero { padding: var(--sp-7) 0 var(--sp-6); }
  .hm__how { padding-top: var(--sp-5); }
  .hm__cats, .hm__show { padding-top: var(--sp-7); }

  /* 카드 — 1열로 펴고 번호 칸을 좁힌다 */
  .toc, .dive { grid-template-columns: 1fr; }

  /* 좌측 목차 → 상단 가로 스크롤 */
  .cp__wrap { grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); }
  .cp__side { position: static; }
  .cp__side-in { min-width: 0; border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-3); }
  .cp__spy { flex-direction: row; overflow-x: auto; max-height: none; gap: var(--sp-1); }
  .cp__spy a { border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; padding: var(--sp-1) var(--sp-2); }
  .cp__spy a[aria-current] { border-left: 0; border-bottom-color: var(--accent); }
  .sh__find span { display: none; }
  .sh__find { padding: 5px var(--sp-2); }
  .pal__box { margin-top: 4vh; max-width: none; border-radius: var(--r-md); }
  .toc__i, .dive__i { grid-template-columns: 36px 1fr; padding: var(--sp-3); }
  .toc__i:hover, .dive__i:hover { transform: none; }
  .hm__how-l { gap: 0 var(--sp-5); }

  .tc { padding: 0 0 var(--sp-6); }
  .tc__name h3 { font-size: var(--fs-h2); }
  .tc__no { display: none; }
  .tc__demo-b { padding: var(--sp-4) var(--sp-3); }
  .tc__when, .tc__how, .ask { padding-left: var(--sp-3); }
  .tc__tip { padding: var(--sp-3) var(--sp-3); }
  .ask { flex-direction: column; gap: var(--sp-2); }
  .ask__c { align-self: flex-end; }
  .tp__list { grid-template-columns: 1fr; }
  .cp__pn { flex-direction: column; }
  .cp__pn-i { max-width: none; }
  .cp__pn-i--n { text-align: left; }
  .sp__close { padding-top: var(--sp-6); }
  .sp__close-l { gap: var(--sp-3); }
  .dg__sp-i { grid-template-columns: 56px auto 1fr; gap: var(--sp-2); }
  .sd__grid3 { grid-template-columns: 1fr; }
  .cmp { grid-template-columns: 1fr; }
}
