/* ==========================================================================
   info.oonona.com — Oonona 개인 블로그
   한국 정보 블로그형 스타일시트 (라이트 기본 · 다크 지원 · 반응형 · 인쇄)
   ========================================================================== */

/* ---------- 1. 토큰 ---------- */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --ink: #20242b;
  --ink-2: #3d434c;
  --muted: #818792;
  --line: #e7e9ee;
  --line-2: #d8dbe2;
  --brand: #0f7a63;
  --brand-ink: #0a5c4b;
  --brand-soft: #e9f5f1;
  --blue: #1d63b8;
  --blue-soft: #eaf2fd;
  --amber: #a4610f;
  --amber-soft: #fdf4e6;
  --violet: #6b4fbf;
  --violet-soft: #f1edfb;
  --danger: #a53c31;
  --danger-soft: #fceceb;
  --mark: #fff3bf;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
  --radius: 10px;
  --radius-sm: 8px;
  --max: 1160px;
  --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
          "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", Roboto, sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "D2Coding", Menlo, monospace;
}

[data-theme="dark"] {
  --bg: #121417;
  --surface: #191c20;
  --surface-2: #1f2328;
  --ink: #eef0f3;
  --ink-2: #c9ced6;
  --muted: #949ba5;
  --line: #2a2f36;
  --line-2: #373d45;
  --brand: #4fd0aa;
  --brand-ink: #8ee5c9;
  --brand-soft: #16332c;
  --blue: #8bbcf5;
  --blue-soft: #1b2836;
  --amber: #e5b878;
  --amber-soft: #332a1b;
  --violet: #b9a6f2;
  --violet-soft: #2a2440;
  --danger: #f09184;
  --danger-soft: #372220;
  --mark: #5b4a12;
  --shadow: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121417;
    --surface: #191c20;
    --surface-2: #1f2328;
    --ink: #eef0f3;
    --ink-2: #c9ced6;
    --muted: #949ba5;
    --line: #2a2f36;
    --line-2: #373d45;
    --brand: #4fd0aa;
    --brand-ink: #8ee5c9;
    --brand-soft: #16332c;
    --blue: #8bbcf5;
    --blue-soft: #1b2836;
    --amber: #e5b878;
    --amber-soft: #332a1b;
    --violet: #b9a6f2;
    --violet-soft: #2a2440;
    --danger: #f09184;
    --danger-soft: #372220;
    --mark: #5b4a12;
    --shadow: none;
  }
}

/* ---------- 2. 기본 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 130px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  word-break: keep-all;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }
.nw { white-space: nowrap; }

a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-ink); }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

.hd-inner { width: min(100% - 40px, var(--max)); margin-inline: auto; }

/* ---------- 3. 헤더 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.hd-top {
  position: relative;
  display: flex; align-items: center; gap: 16px;
  height: 68px;
}
.logo {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--ink); white-space: nowrap;
}
.logo b {
  font-size: 22px; font-weight: 800; letter-spacing: -0.035em; line-height: 1;
}
.logo-en {
  font-size: 11px; font-weight: 800; line-height: 1.4; letter-spacing: .11em;
  color: var(--brand);
}
.logo-badge {
  font-size: 11px; font-weight: 700; line-height: 1.4; letter-spacing: -0.01em;
  color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 5px; padding: 2px 7px;
}
.logo:hover { color: var(--ink); }

.hd-search {
  position: relative; margin-left: auto;
  width: min(320px, 38vw);
}
.hd-search input, .wg-search input {
  width: 100%; height: 38px;
  padding: 0 42px 0 14px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--surface-2); color: var(--ink);
  font-family: inherit; font-size: 13.5px;
}
.hd-search input::placeholder, .wg-search input::placeholder { color: var(--muted); }
.hd-search input:focus, .wg-search input:focus {
  outline: none; border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent);
}
.hd-search button, .wg-search button {
  position: absolute; right: 4px; top: 4px;
  width: 30px; height: 30px; border-radius: 50%;
  border: 0; background: transparent; color: var(--muted);
  display: grid; place-items: center; cursor: pointer;
}
.hd-search button:hover, .wg-search button:hover { color: var(--brand); background: var(--brand-soft); }

.hd-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn, .theme-toggle {
  appearance: none; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink-2); width: 36px; height: 36px; border-radius: 50%;
  cursor: pointer; display: grid; place-items: center;
  font-size: 15px; line-height: 1; font-family: inherit;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.icon-btn:hover, .theme-toggle:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line-2); }
.icon-btn { display: none; }

.cat-nav { border-top: 1px solid var(--line); }
.cat-nav .hd-inner {
  display: flex; align-items: stretch; gap: 2px;
  height: 44px; overflow-x: auto; scrollbar-width: none;
}
.cat-nav .hd-inner::-webkit-scrollbar { display: none; }
.cat-nav a {
  display: inline-flex; align-items: center;
  padding: 0 15px; white-space: nowrap;
  font-size: 15px; font-weight: 600; color: var(--ink-2);
  text-decoration: none; border-bottom: 2px solid transparent;
}
.cat-nav a:hover { color: var(--ink); background: var(--surface-2); }
.cat-nav a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }

.read-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--brand); z-index: 60; transition: width .1s linear;
}

/* ---------- 4. 레이아웃 ---------- */
.layout {
  width: min(100% - 40px, var(--max));
  margin-inline: auto;
  padding: 24px 0 64px;
  display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px; align-items: start;
}
.layout.narrow { grid-template-columns: minmax(0, 1fr); }
.main-col { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }

.board, .post-card, .page-card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- 5. 글 목록 (홈·카테고리) ---------- */
.board { padding: 24px 26px 12px; }
.board-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.board-head h1 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -0.03em; }
.board-head p { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.board-count { font-size: 12.5px; color: var(--muted); white-space: nowrap; padding-bottom: 3px; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0 2px; }.tab {
  appearance: none; font-family: inherit; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink-2); font-size: 13px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; line-height: 1.5;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.tab:hover { border-color: var(--line-2); color: var(--ink); }
.tab span { color: var(--muted); font-weight: 600; margin-left: 2px; }
.tab.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.tab.is-on span { color: rgba(255, 255, 255, .75); }

.post-list { list-style: none; margin: 0; padding: 0; }
.post-item {
  display: grid; grid-template-columns: 208px minmax(0, 1fr);
  gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line);
}
.post-item:last-child { border-bottom: 0; }
.post-thumb {
  display: block; width: 100%; aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface-2);
}
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-item:hover .post-thumb img { transform: scale(1.04); }

.post-body { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; }
.badge {
  display: inline-block; font-size: 11.5px; font-weight: 700;
  padding: 3px 8px; border-radius: 5px; line-height: 1.5;
  color: var(--muted); background: var(--surface-2); text-decoration: none;
}
.badge.money { color: var(--blue); background: var(--blue-soft); }
.badge.home { color: var(--brand); background: var(--brand-soft); }
.badge.business { color: var(--amber); background: var(--amber-soft); }
.badge.life { color: var(--violet); background: var(--violet-soft); }
.post-ttl {
  margin: 0; font-size: 19px; font-weight: 700; line-height: 1.45;
  letter-spacing: -0.025em;
}
.post-ttl a { color: var(--ink); text-decoration: none; }
.post-ttl a:hover { color: var(--brand); text-decoration: underline; }
.post-exc {
  margin: 0; font-size: 14.5px; line-height: 1.7; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: auto; padding-top: 3px;
  font-size: 12.5px; color: var(--muted);
}
.dot {
  display: inline-block; width: 3px; height: 3px; border-radius: 50%;
  background: var(--line-2); flex: 0 0 auto;
}
.list-empty { padding: 30px 0 26px; text-align: center; color: var(--muted); font-size: 14px; }

.note-board { padding: 22px 26px 24px; }
.board-sub { margin: 0 0 14px; font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.checklist {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px 30px;
}
.checklist li { display: flex; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.checklist .num {
  flex: 0 0 auto; font-size: 12px; font-weight: 800; color: var(--brand);
  padding-top: 2px; letter-spacing: .04em; font-variant-numeric: tabular-nums;
}
.checklist b { display: block; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.checklist p { margin: 3px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.65; }

.sibling-note {
  margin-top: 18px; padding: 16px 18px;
  background: var(--surface-2); border-radius: var(--radius-sm);
  font-size: 13.5px; color: var(--muted); line-height: 1.7;
}

/* ---------- 6. 사이드바 ---------- */
.side { display: grid; gap: 16px; min-width: 0; }
.widget {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 18px 16px;
}
.wg-title {
  margin: 0 0 12px; padding-bottom: 10px;
  font-size: 14px; font-weight: 800; letter-spacing: -0.02em;
  border-bottom: 1px solid var(--line);
}
.widget.profile { text-align: center; padding: 22px 18px 18px; }
.pf-avatar {
  width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 10px;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
  font-size: 22px; font-weight: 800; letter-spacing: -0.03em;
}
.pf-name { display: block; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.pf-desc { margin: 3px 0 0; font-size: 12.5px; color: var(--brand); font-weight: 600; }
.pf-line { margin: 10px 0 12px; font-size: 12.5px; line-height: 1.65; color: var(--muted); }
.pf-stats {
  display: flex; justify-content: center; gap: 14px;
  font-size: 12px; color: var(--muted);
}
.pf-stats b { color: var(--ink-2); font-weight: 700; }
.btn-ghost {
  display: inline-block; margin-top: 13px; padding: 7px 15px;
  border: 1px solid var(--line-2); border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-decoration: none;
}
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }

.wg-search { position: relative; }
.wg-search input { border-radius: var(--radius-sm); height: 38px; }

.cat-wrap {}
.cat-count { font-size: 12px; color: var(--muted); }
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list li + li { border-top: 1px solid var(--line); }
.cat-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 2px; font-size: 14px; color: var(--ink-2); text-decoration: none;
}
.cat-list a:hover { color: var(--brand); }
.cat-list a.is-on { color: var(--brand); font-weight: 700; }
.cat-list a span { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li + li { border-top: 1px solid var(--line); }
.mini-list a { display: block; padding: 10px 0; text-decoration: none; }
.mini-list .badge { margin-bottom: 5px; }
.mini-list b {
  display: block; font-size: 13.5px; font-weight: 600; line-height: 1.5;
  color: var(--ink); letter-spacing: -0.015em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mini-list a:hover b { color: var(--brand); }
.notice p { margin: 0 0 10px; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.link-more { font-size: 12.5px; font-weight: 600; text-decoration: none; }

.toc-widget {}
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.toc a {
  display: block; padding: 6px 0 6px 10px;
  font-size: 13px; line-height: 1.5; color: var(--muted);
  text-decoration: none; border-left: 2px solid transparent;
}
.toc li.toc-h3 a { padding-left: 20px; font-size: 12.5px; }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--brand); border-left-color: var(--brand); font-weight: 700; }

/* ---------- 7. 글 본문 ---------- */
.post-card { padding: 26px 34px 34px; }
.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--muted);
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumb span { color: var(--line-2); }
.post-head { padding-top: 14px; }
.post-head .badge { margin-bottom: 10px; }
.post-ttl.page { font-size: clamp(24px, 3vw, 32px); }
.post-head h1 {
  margin: 0 0 12px; font-size: clamp(24px, 3vw, 32px); font-weight: 800;
  line-height: 1.38; letter-spacing: -0.035em; color: var(--ink);
}
.post-lede { margin: 0 0 18px; font-size: 15.5px; line-height: 1.8; color: var(--ink-2); }
.post-info {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px;
  padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted);
}
.post-info .who { color: var(--ink-2); font-weight: 700; }

.post-cover { margin: 22px 0 0; }
.post-cover img { width: 100%; border-radius: var(--radius-sm); }
figcaption { margin-top: 8px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }

.prose {
  margin-top: 22px; font-size: 16.5px; line-height: 1.9; color: var(--ink-2);
  min-width: 0;
}
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose > p + p { margin-top: 1.1em; }
.prose h2 {
  margin: 2.1em 0 .7em; padding-left: 12px;
  border-left: 4px solid var(--brand);
  font-size: 21px; font-weight: 800; line-height: 1.45;
  letter-spacing: -0.025em; color: var(--ink);
}
.prose h3 {
  margin: 1.7em 0 .5em;
  font-size: 17.5px; font-weight: 700; line-height: 1.5;
  letter-spacing: -0.02em; color: var(--ink);
}
.prose strong { color: var(--ink); font-weight: 700; }
.prose ul, .prose ol { margin: 1em 0; padding-left: 1.35em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--brand); }
.prose a { font-weight: 500; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }
.prose blockquote {
  margin: 1.5em 0; padding: 10px 18px;
  border-left: 3px solid var(--line-2); background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-2); font-size: 15.5px;
}
.prose blockquote p + p { margin-top: .6em; }

/* 요약 박스 */
.summary-box {
  background: var(--surface-2); border: 1px solid var(--line);
  border-left: 4px solid var(--brand); border-radius: var(--radius-sm);
  padding: 18px 20px; margin: 1.5em 0;
}
.summary-box .label {
  margin: 0 0 10px; font-size: 11.5px; font-weight: 800;
  letter-spacing: .08em; color: var(--brand);
}
.summary-box ul { margin: 0; padding-left: 1.1em; font-size: 15.5px; line-height: 1.8; }
.summary-box li + li { margin-top: .45em; }
.summary-box p { font-size: 15.5px; }

/* 콜아웃 */
.callout {
  display: grid; grid-template-columns: 22px 1fr; gap: 12px;
  margin: 1.5em 0; padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  border: 1px solid color-mix(in srgb, var(--brand) 22%, transparent);
  font-size: 15.5px; line-height: 1.8;
}
.callout .ico { font-size: 15px; line-height: 1.6; color: var(--brand); font-weight: 700; }
.callout p { margin: 0; }
.callout p + p { margin-top: .6em; }
.callout strong { color: var(--brand-ink); }
.callout.warn { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 28%, transparent); }
.callout.warn .ico, .callout.warn strong { color: var(--amber); }
.callout.stop { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 28%, transparent); }
.callout.stop .ico, .callout.stop strong { color: var(--danger); }

/* 표 */
.table-wrap {
  margin: 1.6em 0; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface);
}
table { border-collapse: collapse; width: 100%; font-size: 14.5px; line-height: 1.65; }
caption {
  caption-side: top; text-align: left;
  padding: 12px 14px 8px; font-size: 12.5px; color: var(--muted); font-weight: 600;
}
th, td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th {
  background: var(--surface-2); color: var(--ink);
  font-size: 13px; font-weight: 700; white-space: nowrap;
  border-bottom: 1px solid var(--line-2);
}
tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 65%, transparent); }
tbody tr:last-child td { border-bottom: 0; }
td strong { color: var(--ink); }
.num-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 비교 카드 */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 1.6em 0; }
.compare > div {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 18px 20px; font-size: 15px;
}
.compare h4 {
  margin: 0 0 8px; font-size: 12.5px; font-weight: 800;
  letter-spacing: .04em; color: var(--brand);
}
.compare p { margin: 0 0 6px; }
.compare ul { margin: .3em 0 0; padding-left: 1.1em; font-size: 14.5px; }

/* 단계 목록 */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.6em 0; display: grid; gap: 12px; }
.steps li {
  counter-increment: step; position: relative;
  padding: 2px 0 2px 42px; font-size: 15.5px;
}
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 1px;
  width: 27px; height: 27px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
  border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
  font-size: 12.5px; font-weight: 800;
}
.steps b { display: block; color: var(--ink); }

/* FAQ */
.faq { margin: 1.6em 0; display: grid; gap: 8px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 0 16px;
}
.faq summary {
  cursor: pointer; padding: 14px 0; list-style: none;
  font-size: 15.5px; font-weight: 700; color: var(--ink);
  display: flex; justify-content: space-between; gap: 14px; align-items: flex-start;
  line-height: 1.55;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: 0 0 auto; color: var(--brand);
  font-weight: 500; font-size: 19px; line-height: 1.2;
}
.faq details[open] summary::after { content: "−"; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq .answer { padding: 12px 0 16px; font-size: 15px; line-height: 1.85; color: var(--ink-2); }
.faq .answer p { margin: 0; }
.faq .answer p + p { margin-top: .6em; }

/* 출처 */
.sources {
  margin: 2em 0 0; padding: 18px 20px;
  background: var(--surface-2); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--muted);
}
.sources h2, .sources h3 {
  margin: 0 0 9px; padding: 0; border: 0;
  font-size: 12px; font-weight: 800; letter-spacing: .06em; color: var(--muted);
}
.sources ol { margin: 0; padding-left: 1.25em; display: grid; gap: 5px; line-height: 1.7; }
.sources a { color: var(--ink-2); }

.disclaimer {
  margin: 1.8em 0 0; padding: 14px 16px;
  border: 1px dashed var(--line-2); border-radius: var(--radius-sm);
  font-size: 13px; line-height: 1.8; color: var(--muted);
}

/* 목차(모바일) */
.toc-mobile {
  display: none; margin: 18px 0 0;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.toc-mobile summary {
  cursor: pointer; padding: 12px 14px; list-style: none;
  font-size: 13.5px; font-weight: 700; color: var(--ink-2);
  display: flex; justify-content: space-between; align-items: center;
}
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after { content: "▾"; color: var(--muted); }
.toc-mobile[open] summary::after { content: "▴"; }
.toc-mobile ol { margin: 0; padding: 2px 16px 14px; list-style: none; display: grid; gap: 1px; }
.toc-mobile ol a {
  display: block; padding: 7px 0; font-size: 14px;
  color: var(--ink-2); text-decoration: none; line-height: 1.5;
}
.toc-mobile li.toc-h3 { padding-left: 12px; }
.toc-mobile li.toc-h3 a { color: var(--muted); font-size: 13px; }
.toc-mobile li.toc-h3 a::before { content: "– "; }

/* 태그·작성자·이전다음·관련글 */
.tag-list {
  display: flex; flex-wrap: wrap; gap: 7px;
  margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line);
}
.tag {
  font-size: 12.5px; color: var(--muted); text-decoration: none;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 11px;
}
.tag:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }

.author-box {
  display: flex; gap: 14px; align-items: flex-start;
  margin-top: 20px; padding: 18px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.author-box .avatar {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand); color: #fff; font-size: 17px; font-weight: 800;
}
.author-box b { display: block; font-size: 14px; font-weight: 800; color: var(--ink); }
.author-box p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--muted); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.pager a {
  display: block; padding: 14px 16px; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
}
.pager a:hover { border-color: color-mix(in srgb, var(--brand) 35%, transparent); background: var(--surface-2); }
.pager span { display: block; font-size: 11.5px; color: var(--muted); }
.pager b {
  display: block; margin-top: 4px; font-size: 14px; font-weight: 600; line-height: 1.5; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pg-next { text-align: right; }
.pg-empty { display: block; }

.related-box { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.related-box h2 { margin: 0 0 12px; font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.rel-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rel-list a {
  display: flex; gap: 12px; align-items: center;
  padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  text-decoration: none;
}
.rel-list a:hover { border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.rel-thumb {
  flex: 0 0 auto; width: 92px; aspect-ratio: 16 / 10;
  border-radius: 6px; overflow: hidden; background: var(--surface-2);
}
.rel-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rel-body { min-width: 0; }
.rel-body .badge { margin-bottom: 5px; }
.rel-body b {
  display: block; font-size: 13.5px; font-weight: 600; line-height: 1.5; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- 8. 정적 페이지 ---------- */
.page-card { padding: 26px 34px 34px; max-width: 880px; margin-inline: auto; width: 100%; }
.page-head { padding: 14px 0 20px; border-bottom: 1px solid var(--line); }
.page-head h1 { margin: 0 0 8px; font-size: 25px; font-weight: 800; letter-spacing: -0.03em; }
.page-head p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.7; }
.page-prose { margin-top: 6px; font-size: 15.5px; }
.page-prose h2 { font-size: 19px; }

/* 검색 */
.search-form { display: flex; gap: 8px; margin: 18px 0 14px; }
.search-form input {
  flex: 1; min-width: 0; height: 42px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font-family: inherit; font-size: 14.5px;
}
.search-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.search-form button {
  flex: 0 0 auto; height: 42px; padding: 0 18px; border: 0; border-radius: var(--radius-sm);
  background: var(--brand); color: #fff; font-family: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer;
}
.search-form button:hover { background: var(--brand-ink); }
.search-status { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.search-status b { color: var(--ink); font-weight: 700; }
.mark { background: var(--mark); color: inherit; border-radius: 2px; padding: 0 1px; }

/* 404 */
.nf { text-align: center; padding: 44px 34px 40px; }
.nf-code { margin: 0 0 6px; font-size: 44px; font-weight: 800; color: var(--brand); letter-spacing: -0.04em; }
.nf h1 { margin: 0 0 8px; font-size: 23px; font-weight: 800; letter-spacing: -0.03em; }
.nf-desc { margin: 0 0 6px; font-size: 14px; color: var(--muted); }
.nf .search-form { max-width: 420px; margin: 20px auto 16px; }
.nf-list { list-style: none; margin: 10px 0 0; padding: 0; text-align: left; max-width: 560px; margin-inline: auto; }
.nf-list li + li { border-top: 1px solid var(--line); }
.nf-list a {
  display: flex; align-items: center; gap: 10px; padding: 12px 2px;
  font-size: 14px; color: var(--ink-2); text-decoration: none;
}
.nf-list a:hover { color: var(--brand); }

/* ---------- 9. 푸터 ---------- */
.site-footer {
  margin-top: 8px; padding: 34px 0 26px;
  background: var(--surface); border-top: 1px solid var(--line);
}
.ft-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: 32px; }
.ft-brand p { margin: 12px 0 0; max-width: 36em; font-size: 12.5px; line-height: 1.8; color: var(--muted); }
.ft-col h3 { margin: 0 0 10px; font-size: 12.5px; font-weight: 800; color: var(--muted); letter-spacing: .02em; }
.ft-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.ft-col a { font-size: 13px; color: var(--ink-2); text-decoration: none; }
.ft-col a:hover { color: var(--brand); text-decoration: underline; }
.ft-bottom {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}

.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
  box-shadow: var(--shadow); cursor: pointer; display: none; place-items: center;
  font-size: 16px; line-height: 1;
}
.to-top.is-on { display: grid; }
.to-top:hover { color: var(--brand); border-color: var(--brand); }

/* 글 페이지: 사이드바 고정 */
@media (min-width: 1025px) {
  .layout-post .side {
    position: sticky; top: 122px;
    max-height: calc(100vh - 142px);
    overflow-y: auto; overscroll-behavior: contain;
    padding-right: 2px; scrollbar-width: none;
  }
  .layout-post .side::-webkit-scrollbar { display: none; }
}

/* ---------- 10. 반응형 ---------- */
@media (max-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { grid-template-columns: 1fr 1fr; gap: 14px; }
  .widget.profile { grid-column: 1 / -1; }
  .toc-widget { display: none; }
  .toc-mobile { display: block; }
  html { scroll-padding-top: 120px; }
}

@media (max-width: 760px) {
  body { font-size: 15.5px; }
  .hd-inner { width: min(100% - 28px, var(--max)); }
  .hd-top { height: 58px; gap: 8px; }
  .logo { gap: 6px; }
  .logo b { font-size: 19px; }
  .logo-en { font-size: 9.5px; letter-spacing: .08em; }
  .logo-badge { font-size: 9.5px; padding: 2px 5px; }
  .hd-search { display: none; }
  .hd-search.is-open {
    display: flex; position: absolute; top: 58px; left: 0; right: 0;
    width: auto; margin: 0; padding: 10px 14px;
    background: var(--surface); border-bottom: 1px solid var(--line); z-index: 60;
  }
  .icon-btn { display: grid; }
  .cat-nav .hd-inner { height: 42px; }
  .cat-nav a { padding: 0 11px; font-size: 14px; }

  .layout { width: min(100% - 24px, var(--max)); padding: 14px 0 44px; gap: 16px; }
  .main-col { gap: 16px; }
  .board { padding: 18px 16px 8px; }
  .board-head { flex-wrap: wrap; align-items: flex-start; gap: 6px; }
  .board-head h1 { font-size: 18px; }
  .board-head p { font-size: 12.5px; }
  .board-count { padding-bottom: 0; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; }
  .post-item { grid-template-columns: 116px minmax(0, 1fr); gap: 12px; padding: 16px 0; }
  .post-ttl { font-size: 15.5px; line-height: 1.45; }
  .post-exc { font-size: 13px; -webkit-line-clamp: 2; }
  .post-meta { font-size: 11.5px; gap: 6px; }
  .badge { font-size: 10.5px; padding: 2px 6px; }
  .checklist { grid-template-columns: 1fr; }
  .note-board { padding: 18px 16px; }

  .side { grid-template-columns: 1fr; }

  .post-card { padding: 20px 16px 26px; }
  .post-head h1 { font-size: 22px; }
  .post-lede { font-size: 14.5px; }
  .prose { font-size: 16px; line-height: 1.88; margin-top: 18px; }
  .prose h2 { font-size: 18.5px; }
  .prose h3 { font-size: 16px; }
  .summary-box { padding: 16px; }
  .summary-box ul { font-size: 15px; padding-left: 1em; }
  .callout { grid-template-columns: 18px 1fr; gap: 10px; padding: 14px; font-size: 15px; }
  th, td { padding: 9px 10px; }
  table { font-size: 13.5px; }
  .compare { grid-template-columns: 1fr; }
  .rel-list { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pg-next { text-align: left; }
  .page-card { padding: 20px 16px 26px; }
  .page-head h1 { font-size: 21px; }
  .page-prose h2 { font-size: 17.5px; }
  .ft-grid { grid-template-columns: 1fr; gap: 24px; }
  .site-footer { padding: 28px 0 22px; }
  .nf { padding: 32px 18px 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media print {
  .site-header, .site-footer, .toc-widget, .toc-mobile, .side, .tag-list,
  .pager, .related-box, .read-progress, .to-top, .author-box { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .layout { display: block; width: 100%; padding: 0; }
  .post-card { border: 0; box-shadow: none; padding: 0; }
  .prose { font-size: 11pt; }
  .prose a { color: #000; text-decoration: none; }
  .post-cover img { max-height: 220pt; object-fit: cover; }
}
