/* derschneemann.net — 「연분홍 겨울살림 점검 수첩」
   모바일(360px) 기준으로 쓰고 min-width 로 넓힌다. 토큰은 base.html :root. DESIGN.md 참고. */

/* ── 0. 기본 ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 16px; line-height: 1.7; font-weight: 400;
  word-break: keep-all; overflow-wrap: break-word;
}
h1, h2, h3, h4, p, ul, ol, dl, figure, blockquote { margin: 0; }
h1, h2, h3, h4 { line-height: 1.35; font-weight: 600; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
button { font: inherit; }
.num, time { font-family: var(--font-number); font-weight: 600; font-variant-numeric: tabular-nums; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; box-shadow: 0 0 0 2px var(--surface); border-radius: 4px; }
.skiplink {
  position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; min-height: 44px;
  background: var(--primary); color: var(--surface); border-radius: var(--radius-sm); text-decoration: none;
}
.skiplink:focus { top: 12px; }
[hidden] { display: none !important; }

/* ── 1. 헤더 (비고정) ──────────────────────────────── */
.notebook-top { background: var(--bg); border-bottom: 1px solid var(--line); }
.notebook-top__in {
  max-width: var(--container); margin: 0 auto; padding: 8px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; text-decoration: none; color: var(--primary); }
.wordmark__mark { flex: none; }
.wordmark__text { display: flex; flex-direction: column; line-height: 1.1; }
.wordmark__name { font-family: var(--font-heading); font-size: 23px; letter-spacing: -.01em; }
.wordmark__domain { font-family: var(--font-number); font-size: 11px; color: var(--text-dim); letter-spacing: .02em; margin-top: 3px; }
.topics-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; flex: none;
  background: var(--surface); color: var(--primary); border: 1px solid var(--border); border-radius: 999px;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.topics-btn__bars { width: 16px; height: 10px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; position: relative; }
.topics-btn__bars::after { content: ""; position: absolute; left: 0; right: 0; top: 2px; border-top: 2px solid currentColor; }
.topics-btn[aria-expanded="true"] { background: var(--primary); color: var(--surface); border-color: var(--primary); }
.no-js .topics-btn, html:not(.js) .topics-btn { display: none; }
.topics { max-width: var(--container); margin: 0 auto; padding: 0 16px 12px; }
.js .topics:not(.is-open) { display: none; }
.topics__list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.topics__list a {
  display: flex; align-items: center; min-height: 48px; padding: 6px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  text-decoration: none; font-size: 15px; font-weight: 600; color: var(--primary);
}
.topics__list a[aria-current="page"] { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); color: var(--accent); }

/* ── 2. 공통 틀 ───────────────────────────────────── */
.page { max-width: var(--container); margin: 0 auto; padding: 0 16px 56px; }
.crumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--text-dim); }
.crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding-right: 10px; color: var(--text-dim); text-underline-offset: 3px; }
.crumbs a::after { content: "›"; margin-left: 8px; color: var(--border); text-decoration: none; display: inline-block; }
.crumbs [aria-current] { display: block; max-width: 14em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }

.band { margin-top: 40px; }
.band__head { margin-bottom: 14px; }
.band__title { font-family: var(--font-heading); font-weight: 400; font-size: 27px; color: var(--primary); line-height: 1.25; }
.band__title::after { content: ""; display: block; width: 40px; height: 3px; margin-top: 8px; background: var(--accent); border-radius: 2px; }
.band__desc { margin-top: 8px; color: var(--text-dim); font-size: 15px; line-height: 1.65; }
.band__more { margin-top: 12px; }
.band__more a, .tier__more {
  display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: 15px; color: var(--primary);
  text-underline-offset: 4px;
}
.band__more a::after { content: "→"; margin-left: 6px; }
.empty-note { padding: 18px; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); color: var(--text-dim); }
.empty-note a { color: var(--primary); }
.chip {
  display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 600; line-height: 1.6;
}
.stamp { display: inline-flex; align-items: baseline; gap: 4px; font-size: 14px; color: var(--text-dim); }
.stamp__k { font-size: 13px; }
.stamp time { font-size: 14px; color: var(--text); }

/* 광고: 코드가 들어오기 전(라벨만 있는 자리)은 통째로 숨긴다 */
.ad-slot { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 250px; margin-top: 40px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.ad-label { font-size: 12px; color: var(--text-dim); letter-spacing: .08em; }
.ad-slot:not(:has(> :not(.ad-label))) { display: none; }
.entries__ad { list-style: none; }
.entries__ad .ad-slot { margin: 0; }
.entries__ad:not(:has(.ad-slot > :not(.ad-label))) { display: none; }

/* ── 3. 홈 ────────────────────────────────────────── */
.intro { padding: 24px 0 4px; }
.intro__kicker { font-size: 14px; font-weight: 600; color: var(--accent); }
.intro__title { margin-top: 6px; font-family: var(--font-heading); font-weight: 400; font-size: 34px; line-height: 1.22; color: var(--primary); letter-spacing: -.01em; }
.intro__lede { margin-top: 12px; font-size: 17px; line-height: 1.7; max-width: 36em; }
.intro__by { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); font-size: 14px; color: var(--text-dim); max-width: 40em; }
.intro__author { font-weight: 600; color: var(--primary); margin-right: 6px; }

/* 우리 집은 지금: 상태 → 첫 행동 */
.checklist { list-style: none; padding: 0; display: grid; gap: 10px; }
.check-row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.check-row__state {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  background: var(--primary-soft); font-weight: 600; font-size: 17px; color: var(--primary);
}
.check-row__box { flex: none; margin-top: 1px; width: 18px; height: 18px; border: 2px solid var(--primary); border-radius: 4px; background: var(--surface); }
.check-row__act { padding: 12px 16px 6px; }
.check-row__first { font-size: 16px; line-height: 1.7; }
.check-row__k { display: inline-block; margin-right: 8px; padding: 0 7px; border-radius: 4px; font-size: 13px; font-weight: 600; color: var(--accent); border: 1px solid var(--accent); line-height: 1.6; vertical-align: 1px; }
.check-row__link {
  display: flex; align-items: center; gap: 10px; min-height: 48px; margin-top: 6px; padding: 8px 0;
  border-top: 1px solid var(--line); text-decoration: none; color: var(--primary);
}
.check-row__lk { flex: none; font-size: 13px; color: var(--text-dim); }
.check-row__lt { flex: 1; min-width: 0; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.check-row__link::after { content: "→"; flex: none; color: var(--accent); }

.season-tag { display: inline-flex; gap: 4px; align-items: baseline; padding: 0 8px; margin-right: 4px; border-radius: 4px; background: var(--primary); color: var(--surface); font-size: 13px; font-weight: 600; }
.season-tag .num { font-size: 12px; }

/* 작은 카드 목록 (계절·처음 읽을 글) */
.minis { list-style: none; padding: 0; display: grid; gap: 10px; }
.mini { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.mini__label { font-size: 13px; font-weight: 600; color: var(--accent); }
.mini__title { margin-top: 4px; font-size: 17px; line-height: 1.45; }
.mini__title a { display: block; padding: 10px 0; margin: -10px 0; text-decoration: none; color: var(--text); }
.mini__title a:hover { text-decoration: underline; }
.mini__sum { margin-top: 2px; font-size: 15px; color: var(--text-dim); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 비용 3단계 */
.tiers { list-style: none; padding: 0; display: grid; gap: 10px; counter-reset: tier; }
.tier { padding: 14px 16px 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.tier__label { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-weight: 600; color: var(--primary); }
.tier__step { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--primary); font-size: 14px; }
.tier__note { font-size: 13px; font-weight: 400; color: var(--text-dim); }
.tier__title { margin-top: 8px; font-size: 17px; line-height: 1.45; }
.tier__title a { display: block; padding: 10px 0; margin: -10px 0; text-decoration: none; color: var(--text); }
.tier__title a:hover { text-decoration: underline; }
.tier__more { font-size: 14px; color: var(--accent); }

/* 글 목록 행 */
.entries { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.entry { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.entry--thumb { grid-template-columns: minmax(0, 1fr) 84px; }
.entry__cat { font-size: 13px; font-weight: 600; color: var(--accent); }
.entry__title { margin-top: 2px; font-size: 18px; line-height: 1.45; font-weight: 600; }
.entry__title a { display: block; padding: 10px 0; margin: -10px 0; text-decoration: none; color: var(--text); }
.entry__title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.entry__sum { margin-top: 4px; font-size: 15px; line-height: 1.65; color: var(--text-dim);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.entry__meta { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.entry__thumb { display: block; align-self: start; }
.entry__thumb img { display: block; width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius-sm); background: var(--primary-soft); }
.more-btn {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; margin-top: 16px;
  background: var(--surface); color: var(--primary); border: 1px solid var(--border); border-radius: var(--radius);
  font-weight: 600; cursor: pointer;
}
.more-btn:hover { background: var(--primary-soft); }

.official { margin-top: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: var(--radius-sm); font-size: 15px; line-height: 1.7; }
.official__k { font-size: 13px; font-weight: 600; color: var(--primary); margin-bottom: 4px; }
.official a { color: var(--primary); font-weight: 600; text-underline-offset: 3px; }

.rules { list-style: none; padding: 0; display: grid; gap: 10px; counter-reset: rule; }
.rules li { counter-increment: rule; position: relative; padding: 14px 16px 14px 52px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 15px; line-height: 1.7; }
.rules li::before { content: counter(rule); position: absolute; left: 16px; top: 14px; width: 24px; height: 24px; display: grid; place-items: center;
  border-radius: 50%; background: var(--primary); color: var(--surface); font-family: var(--font-number); font-size: 13px; }
.rules strong { display: block; color: var(--primary); font-weight: 600; font-size: 16px; }

/* ── 4. 카테고리·태그 ─────────────────────────────── */
.list-head { padding: 8px 0 0; }
.list-head__kind { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--accent); }
.list-head__title { margin-top: 2px; font-family: var(--font-heading); font-weight: 400; font-size: 34px; line-height: 1.25; color: var(--primary); }
.list-head__hash { color: var(--accent); margin-right: 2px; }
.list-head__desc { margin-top: 8px; font-size: 16px; color: var(--text); max-width: 40em; }
.list-head__count { margin-top: 10px; font-size: 14px; color: var(--text-dim); }
.list-head__count .num { font-size: 17px; color: var(--primary); margin-right: 2px; }
.list-head + .band { margin-top: 28px; }

/* ── 5. 글 페이지 ──────────────────────────────────── */
.post-head { max-width: var(--content-w); }
.post-head__cat { margin-top: 0; }
.post-head__cat a {
  display: inline-flex; align-items: center; min-height: 44px; text-decoration: none;
}
.post-head__cat span { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 999px;
  background: var(--primary); color: var(--surface); font-size: 14px; font-weight: 600; }
.post-head__cat a:hover span { background: var(--accent); }
.post-head__title { margin-top: 10px; font-family: var(--font-heading); font-weight: 400; font-size: 30px; line-height: 1.3; color: var(--primary); letter-spacing: -.005em; }
.post-head__lede { margin-top: 10px; font-size: 17px; line-height: 1.7; color: var(--text); }
.post-head__by { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 14px; }
.post-head__author { font-weight: 600; color: var(--primary); }
.post-cover { margin-top: 20px; max-width: var(--content-w); }
.post-cover img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: var(--primary-soft); }

.post-grid { margin-top: 20px; }
.toc-rail { margin-bottom: 24px; padding: 0 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.toc-rail__h { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; font-weight: 600; color: var(--primary); cursor: pointer; list-style: none; }
.toc-rail__h::-webkit-details-marker { display: none; }
.toc-rail__h::after { content: "펼치기"; margin-left: auto; font-size: 13px; font-weight: 400; color: var(--text-dim); }
.toc-rail__d[open] > .toc-rail__h::after { content: "접기"; }
.toc-rail__n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--primary-soft); font-size: 12px; color: var(--primary); }
.toc-rail__list { list-style: none; padding: 0 0 6px; margin-top: 0; counter-reset: toc; border-top: 1px solid var(--line); }
.toc-rail__list li { counter-increment: toc; border-top: 1px solid var(--line); }
.toc-rail__list li:first-child { border-top: 0; }
.toc-rail__list a { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding: 10px 0; font-size: 15px; line-height: 1.5; color: var(--text); text-decoration: none; }
.toc-rail__list a::before { content: counter(toc); flex: none; min-width: 1.4em; font-family: var(--font-number); font-weight: 600; color: var(--accent); white-space: nowrap; }
.toc-rail__list a:hover { color: var(--accent); text-decoration: underline; }

.post-main { max-width: var(--content-w); min-width: 0; }
.post-foot { margin-top: 40px; display: grid; gap: 20px; }
.post-tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.post-tags a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--primary); font-size: 14px; font-weight: 600; text-decoration: none;
}
.post-tags a:hover { border-color: var(--accent); color: var(--accent); }
.author-card { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 15px; line-height: 1.75; }
.author-card__h { font-family: var(--font-heading); font-weight: 400; font-size: 22px; color: var(--primary); margin-bottom: 6px; }
.author-card p + p { margin-top: 8px; }
.author-card__rule { color: var(--text-dim); font-size: 14px; }
.related { margin-top: 40px; }
.related__h { font-family: var(--font-heading); font-weight: 400; font-size: 24px; color: var(--primary); margin-bottom: 10px; }
.entries--compact .entry__sum { -webkit-line-clamp: 1; }

/* ── 6. .post-body 기본 ───────────────────────────── */
.post-body { font-size: 17px; line-height: 1.8; color: var(--text); }
.post-body > * + * { margin-top: 1em; }
.post-body > :is(h2, h3, h4) + * { margin-top: .6em; }
.post-body > :is(blockquote, div, aside, figure, table, nav, ul, ol) + :is(p, h4) { margin-top: 1.3em; }
.post-body h2 {
  margin-top: 2.4em; padding-top: 14px; border-top: 2px solid var(--primary);
  font-size: 21px; font-weight: 600; color: var(--primary); scroll-margin-top: 16px;
}
.post-body h3 { margin-top: 1.8em; font-size: 18px; font-weight: 600; color: var(--text); scroll-margin-top: 16px; }
.post-body h3::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 2px; background: var(--accent); vertical-align: 3px; }
.post-body h4 { font-size: 16px; font-weight: 600; }
.post-body strong { font-weight: 600; color: var(--primary); }
.post-body a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-body a:hover { color: var(--accent); text-decoration-thickness: 2px; }
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body li + li { margin-top: .4em; }
.post-body li p { margin: 0; }
.post-body li::marker { color: var(--accent); font-weight: 600; }
.post-body hr { border: 0; height: 1px; margin: 2.4em 0; background: var(--line); }
.post-body img { display: block; max-width: 100%; height: auto; border-radius: var(--radius); }
.post-body figure { margin: 1.4em 0 0; }
.post-body figcaption { margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--text-dim); }
.post-body figcaption::before { content: ""; display: inline-block; width: 14px; height: 2px; margin-right: 6px; background: var(--accent); vertical-align: 4px; }
/* 섹션 사진: 본문 폭 가득 4:3, 사진이 늦게 와도 자리가 흔들리지 않게 */
.post-body > figure > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--primary-soft); }
.post-body code, .post-body kbd { font-family: ui-monospace, Menlo, monospace; font-size: .88em; }

/* 겨울 생활의 한 장면 (본문 첫 인용) — 큰 따옴표 장식 없이 연분홍 회색 면 */
.post-body blockquote {
  margin: 1.4em 0 0; padding: 16px 18px; background: var(--primary-soft); border-radius: var(--radius);
  font-size: 17px; line-height: 1.8; color: var(--primary);
}
.post-body > blockquote:first-child { margin-top: 0; }
.post-body blockquote p + p { margin-top: .6em; }
.post-body blockquote cite { display: block; margin-top: 8px; font-size: 14px; font-style: normal; color: var(--text-dim); }

/* ── 7. 표준 컴포넌트 31종 ─────────────────────────── */
/* 알림 박스: 배지 문구로 의미를 전한다 (색만으로 구분하지 않음) */
.post-body :is(.warn-box, .info-box, .success-box, .error-box, .note-box) {
  display: flex; flex-direction: column; gap: 8px; margin-top: 1.4em; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: 16px; line-height: 1.75;
}
.post-body :is(.warn-box, .info-box, .success-box, .error-box, .note-box) > div > :first-child { margin-top: 0; }
.post-body :is(.warn-box, .info-box, .success-box, .error-box, .note-box) ul { margin: 6px 0 0; padding-left: 1.2em; }
.post-body .badge {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 1px 10px;
  border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.7; white-space: nowrap;
  background: var(--primary); color: var(--surface);
}
.post-body .warn-box { background: var(--warn-soft); border-color: #F0C9A8; }
.post-body .warn-box .badge { background: var(--warn); }
.post-body .warn-box strong { color: var(--warn); }
.post-body .error-box { background: #FCE8EC; border-color: #E9B4C1; }
.post-body .error-box .badge { background: var(--accent); }
.post-body .error-box strong { color: var(--accent); }
.post-body .info-box { background: var(--surface); border-left: 4px solid var(--primary); }
.post-body .success-box { background: #EEF4EE; border-color: #C5D8C6; }
.post-body .success-box .badge { background: #2F5D3A; }
.post-body .note-box { background: var(--surface); border: 1px dashed var(--border); font-size: 15px; }
.post-body .note-box .badge { background: var(--surface); color: var(--primary); border: 1px solid var(--border); }

/* 콘텐츠 박스 */
.post-body :is(.prep-box, .summary-box, .key-points, .toc-box) {
  margin-top: 1.4em; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.post-body :is(.prep-box, .summary-box, .key-points, .toc-box) > :is(h3, h4) {
  margin: 0 0 8px; padding: 0; border: 0; font-size: 16px; font-weight: 600; color: var(--primary);
}
.post-body :is(.prep-box, .summary-box, .key-points, .toc-box) > :is(h3, h4)::before { content: none; }
.post-body :is(.summary-box, .key-points, .toc-box) :is(ul, ol) { margin: 0; padding-left: 1.2em; }
/* 비용 3단계 요약: 세로 목록 + 단계 이름 굵게 */
.post-body .summary-box { border-top: 4px solid var(--primary); }
.post-body .summary-box li { padding: 6px 0; }
.post-body .summary-box li + li { margin-top: 0; border-top: 1px dashed var(--line); }
.post-body .summary-box li > strong:first-child { display: inline-block; margin-right: 6px; color: var(--accent); }
.post-body .key-points { background: var(--primary); border-color: var(--primary); color: var(--surface); }
.post-body .key-points > :is(h3, h4), .post-body .key-points strong { color: var(--surface); }
.post-body .key-points li::marker { color: #F4C9D6; }
.post-body .toc-box { background: var(--bg); border-style: dashed; border-color: var(--border); }
.post-body .toc-box a { color: var(--text); text-decoration: none; display: inline-block; padding: 6px 0; min-height: 44px; }
.post-body .toc-box a:hover { color: var(--accent); text-decoration: underline; }
.post-body .prep-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.post-body .prep-grid > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.post-body .prep-grid > div:last-child { border-bottom: 0; }
.post-body .prep-grid > div > span:last-child { flex: none; font-family: var(--font-number); font-weight: 600; color: var(--text-dim); white-space: nowrap; }

/* 단계: 먹색 숫자 + 짧은 밑줄 (버튼처럼 보이지 않게) */
.post-body .step { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; margin-top: 1.2em; }
.post-body .step + .step { padding-top: 1.2em; border-top: 1px dashed var(--line); }
.post-body .step .num {
  align-self: start; padding-bottom: 4px; border-bottom: 3px solid var(--accent);
  font-family: var(--font-number); font-weight: 600; font-size: 22px; line-height: 1.1; color: var(--primary); text-align: left; white-space: nowrap;
}
.post-body .step .body h4 { font-size: 17px; margin: 0 0 4px; color: var(--primary); }
.post-body .step .body p + p { margin-top: .6em; }

.post-body .timeline { list-style: none; padding: 0; margin-top: 1.4em; }
.post-body .timeline li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 0 0 16px 22px; border-left: 2px solid var(--line); margin-left: 6px; }
.post-body .timeline li + li { margin-top: 0; }
.post-body .timeline li:last-child { border-left-color: transparent; }
.post-body .timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.post-body .timeline .time { font-family: var(--font-number); font-weight: 600; font-size: 14px; color: var(--accent); }

/* 표 — 흰 바탕·먹색 머리글·가는 행 구분선, 숫자 오른쪽 정렬은 작가가 td 안 숫자만 쓰면 tabular */
.post-body :is(.scroll-x, .table-scroll) {
  overflow-x: auto; margin-top: 1.4em; border: 1px solid var(--line); border-radius: var(--radius);
  background:
    linear-gradient(90deg, var(--surface) 30%, rgba(255, 255, 255, 0)) left / 40px 100% no-repeat local,
    linear-gradient(270deg, var(--surface) 30%, rgba(255, 255, 255, 0)) right / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(55, 50, 52, .22), transparent) left / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(55, 50, 52, .22), transparent) right / 14px 100% no-repeat scroll,
    var(--surface);
}
.post-body .scroll-x .table-scroll { margin: 0; border: 0; border-radius: 0; overflow: visible; background: none; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.6; background: var(--surface); font-variant-numeric: tabular-nums; }
.post-body > table { display: block; overflow-x: auto; }
.post-body :is(.scroll-x, .table-scroll) table { margin: 0; min-width: 560px; background: transparent; }
.post-body table caption { caption-side: top; text-align: left; padding: 10px 14px; font-size: 14px; color: var(--text-dim); }
.post-body table :is(th, td) { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.post-body table thead th { background: var(--primary); color: var(--surface); font-size: 14px; font-weight: 600; white-space: nowrap; }
.post-body table tbody th { font-weight: 600; color: var(--primary); min-width: 6em; }
.post-body table tbody tr:last-child > * { border-bottom: 0; }

.post-body .pros-cons { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 1.4em; }
.post-body .pros-cons > div { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.post-body .pros-cons h4 { font-size: 15px; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.post-body .pros-cons .pros h4 { color: var(--primary); }
.post-body .pros-cons .pros h4::before { content: "＋"; }
.post-body .pros-cons .cons h4 { color: var(--accent); }
.post-body .pros-cons .cons h4::before { content: "－"; }
.post-body .pros-cons ul { margin: 0; padding-left: 1.2em; }

.post-body .stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1.4em; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.post-body .stats-grid .stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.post-body .stats-grid .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
.post-body .stats-grid .label { font-size: 13px; color: var(--text-dim); }
.post-body .stats-grid .value { font-size: 16px; font-weight: 600; color: var(--primary); line-height: 1.5; font-variant-numeric: tabular-nums; }

/* 텍스트 강조 */
.post-body .lead { font-size: 1.08em; color: var(--primary); }
.post-body .highlight { background: linear-gradient(transparent 60%, #F7C6D4 60%); padding: 0 1px; }
.post-body .pull-quote { margin: 1.8em 0 0; padding: 4px 0 4px 16px; border-left: 4px solid var(--accent); font-size: 20px; font-weight: 600; line-height: 1.6; color: var(--primary); }
.post-body kbd, .post-body .kbd { display: inline-block; padding: 0 6px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; background: var(--surface); line-height: 1.6; }

/* 미디어 */
.post-body .image-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 1.4em; }
.post-body .image-grid figure { margin: 0; }
.post-body .before-after { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 1.4em; }
.post-body .before-after > div { position: relative; }
.post-body .before-after .label { position: absolute; top: 8px; left: 8px; padding: 1px 10px; border-radius: 999px; background: var(--primary); color: var(--surface); font-size: 13px; font-weight: 600; }
.post-body .video-embed { position: relative; aspect-ratio: 16 / 9; margin-top: 1.4em; border-radius: var(--radius); overflow: hidden; background: var(--primary-soft); }
.post-body .video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* CTA: 먹색 면 + 흰 글자 버튼 */
.post-body .cta-box { margin-top: 1.4em; padding: 18px; background: var(--surface); border: 2px solid var(--primary); border-radius: var(--radius); }
.post-body .cta-box h4 { font-size: 17px; color: var(--primary); }
.post-body .cta-box p { margin-top: 6px; }
.post-body .cta-button, .post-body a.cta-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 12px; padding: 0 20px; max-width: 100%;
  background: var(--primary); color: var(--surface); border-radius: 999px; font-weight: 600; font-size: 16px; text-decoration: none; text-align: center;
}
.post-body .cta-button:hover { background: var(--accent); color: var(--surface); text-decoration: none; }

/* 기타 */
.post-body .divider { width: 100%; height: 1px; border: 0; background: var(--line); }
.post-body .spoiler { margin-top: 1.4em; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.post-body .spoiler summary { display: flex; align-items: center; min-height: 48px; padding: 0 16px; cursor: pointer; font-weight: 600; color: var(--primary); }
.post-body .spoiler > :not(summary) { padding: 0 16px 14px; margin: 0; }
.post-body .footnote-ref { font-family: var(--font-number); font-size: .72em; }
.post-body .footnote { display: block; margin-top: 2em; padding: 12px 0 0 2.4em; text-indent: -2.4em; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.7; color: var(--text-dim); }
.post-body .footnote + .footnote { margin-top: 4px; padding-top: 0; border-top: 0; }
.post-body .footnote .num { display: inline-block; min-width: 2.4em; text-indent: 0; color: var(--primary); font-size: 13px; }
.post-body .price-tag { display: inline-flex; align-items: baseline; gap: 2px; padding: 0 6px; border-radius: 4px; background: var(--primary-soft); }
.post-body .price-tag .amount { font-family: var(--font-number); font-weight: 600; color: var(--primary); }
.post-body .price-tag .currency { font-size: .85em; color: var(--text-dim); }
/* FAQ: dl 은 모두 펼친 채 */
.post-body .faq { margin-top: 1.4em; border-top: 1px solid var(--line); }
.post-body .faq dt { display: flex; gap: 8px; padding: 14px 0 4px; font-weight: 600; color: var(--primary); }
.post-body .faq dt::before { content: "Q"; flex: none; font-family: var(--font-number); color: var(--accent); }
.post-body .faq dd { margin: 0; padding: 0 0 14px 20px; border-bottom: 1px solid var(--line); }
.post-body .tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.post-body .tag-list .tag { padding: 1px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 14px; }
.post-body .inline-ad { margin: 2em 0 0; min-height: 120px; }

/* 표 → 모바일 행 카드 (site.js 가 data-label 을 붙이고 .is-stacked 를 달았을 때만). JS 가 없으면 가로 스크롤 */
@media (max-width: 599px) {
  .post-head .crumbs li:last-child { display: none; }
  .post-head .crumbs li:nth-last-child(2) a::after { content: none; }
}
@media (max-width: 719px) {
  .post-body :is(.scroll-x, .table-scroll).is-stacked { overflow: visible; border: 0; border-radius: 0; background: none; }
  .post-body table.is-stacked, .post-body table.is-stacked :is(tbody, tr, th, td) { display: block; min-width: 0; width: auto; }
  .post-body table.is-stacked { background: none; }
  .post-body table.is-stacked caption { display: block; padding: 0 2px 8px; }
  .post-body table.is-stacked thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .post-body table.is-stacked tbody tr { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--primary); border-radius: var(--radius); padding: 4px 0 8px; }
  .post-body table.is-stacked tbody tr + tr { margin-top: 10px; }
  .post-body table.is-stacked tbody :is(th, td) { border: 0; padding: 6px 14px; }
  .post-body table.is-stacked tbody > tr > :first-child:not([data-label]) { padding-top: 10px; font-size: 16px; font-weight: 600; color: var(--primary); }
  .post-body table.is-stacked td[data-label] { display: grid; grid-template-columns: 6.2em minmax(0, 1fr); gap: 10px; border-top: 1px dashed var(--line); }
  .post-body table.is-stacked td[data-label]::before { content: attr(data-label); font-size: 13px; font-weight: 600; color: var(--text-dim); padding-top: 1px; }
}

/* ── 8. 푸터 ─────────────────────────────────────── */
.notebook-end { margin-top: 24px; background: var(--primary); color: #E9DFE3; }
.notebook-end__in { max-width: var(--container); margin: 0 auto; padding: 32px 16px 40px; display: grid; gap: 14px; font-size: 14px; line-height: 1.75; }
.notebook-end__name { font-family: var(--font-heading); font-size: 24px; color: var(--surface); }
.notebook-end__id p + p { margin-top: 4px; }
.notebook-end__links { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 0 16px; }
.notebook-end__links { align-self: start; }
.notebook-end__links a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; color: var(--surface); font-weight: 600; text-underline-offset: 3px; }
.notebook-end__note strong { color: var(--surface); }
.notebook-end__copy { font-family: var(--font-number); font-size: 12px; color: #CDBFC5; }

/* CMS 기본 페이지(/privacy·/about·/contact) */
.cms-default-page { max-width: var(--content-w); padding-top: 24px; }
.cms-default-page h1 { font-family: var(--font-heading); font-weight: 400; font-size: 32px; color: var(--primary); margin-bottom: 16px; }
.cms-default-page h2 { margin-top: 1.6em; font-size: 19px; color: var(--primary); }
.cms-default-page p, .cms-default-page li { line-height: 1.8; }
.cms-default-page p + p { margin-top: .8em; }

/* ── 9. 넓은 화면 ─────────────────────────────────── */
@media (min-width: 600px) {
  .topics__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .post-body .pros-cons, .post-body .before-after { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-body .image-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .post-body .prep-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .post-body .prep-grid > div:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
  .post-body .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .post-body .stats-grid .stat:last-child:nth-child(odd) { grid-column: auto; }
  .post-body .stats-grid .stat:nth-child(3n+1):last-child { grid-column: 1 / -1; }
  .entry--thumb { grid-template-columns: minmax(0, 1fr) 132px; }
  .entry__thumb img { width: 132px; height: 99px; }
  .minis, .tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .page { padding: 0 24px 72px; }
  .notebook-top__in, .topics, .notebook-end__in { padding-left: 24px; padding-right: 24px; }
  .intro { padding-top: 40px; }
  .intro__title { font-size: 44px; }
  .intro__lede { font-size: 18px; }
  .band { margin-top: 56px; }
  .band__title { font-size: 31px; }
  /* 상태 → 행동: 왼쪽 상태, 오른쪽 첫 행동과 관련 글 */
  .check-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); }
  .check-row__state { align-items: flex-start; padding: 18px 20px; }
  .check-row__box { margin-top: 5px; }
  .check-row__act { padding: 16px 20px 8px; }
  .list-head__title { font-size: 42px; }
  .post-head__title { font-size: 38px; }
  .post-head__lede { font-size: 18px; }
  .post-body { font-size: 18px; line-height: 1.85; }
  .post-body h2 { font-size: 24px; }
  .post-body h3 { font-size: 20px; }
  .post-body blockquote { padding: 20px 24px; font-size: 18px; }
  .post-body :is(.warn-box, .info-box, .success-box, .error-box, .note-box) { flex-direction: row; gap: 12px; padding: 16px 20px; }
  .post-body .badge { margin-top: 3px; }
  .post-body :is(.prep-box, .summary-box, .key-points, .toc-box) { padding: 18px 22px; }
  .post-body .timeline li { grid-template-columns: 110px minmax(0, 1fr); gap: 14px; }
  .notebook-end__in { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); column-gap: 48px; }
  .notebook-end__note, .notebook-end__copy { grid-column: 1 / -1; }
}
@media (min-width: 960px) {
  /* 헤더: 워드마크 한 줄 + 내비 한 줄 (전체 주제 버튼 없이 항상 펼침) */
  .topics-btn { display: none; }
  .js .topics:not(.is-open), .topics { display: block; }
  .topics { padding-bottom: 0; }
  .topics__list { display: flex; flex-wrap: wrap; gap: 0 4px; border-top: 1px solid var(--line); }
  .topics__list a { min-height: 48px; padding: 0 12px; background: none; border: 0; border-radius: 0; font-size: 15px; }
  .topics__list a:hover { color: var(--accent); }
  .topics__list a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--accent); }
  .notebook-top__in { padding-top: 14px; padding-bottom: 10px; }
  .wordmark__name { font-size: 28px; }
  .wordmark__mark { width: 36px; height: 36px; }

  /* 글: 왼쪽 128px 목차 레일 + 40px + 본문 760px */
  .post-grid--toc { display: grid; grid-template-columns: var(--toc-w) minmax(0, var(--content-w)); column-gap: 40px; align-items: start; }
  .post-grid--toc .toc-rail { position: sticky; top: 20px; margin: 0; padding: 0; background: none; border: 0; border-radius: 0; max-height: calc(100vh - 40px); overflow-y: auto; }
  .post-grid--toc .toc-rail__h { min-height: 0; font-size: 13px; padding-bottom: 6px; border-bottom: 2px solid var(--primary); }
  .js .post-grid--toc .toc-rail__h { pointer-events: none; cursor: default; }
  .js .post-grid--toc .toc-rail__h::after { content: none; }
  .post-grid--toc .toc-rail__list { border-top: 0; }
  .post-grid--toc .toc-rail__list a { flex-direction: column; gap: 0; font-size: 14px; padding: 8px 0; }
  .post:has(.post-grid--toc) :is(.post-head, .post-cover) { margin-left: calc(var(--toc-w) + 40px); }
  .post-head { padding-top: 8px; }
  .post-head__title { font-size: 44px; }

}
@media (min-width: 1100px) {
  .intro { display: grid; grid-template-columns: minmax(0, 1fr) 360px; column-gap: 48px; align-items: end; }
  .intro__kicker, .intro__title, .intro__lede { grid-column: 1; }
  .intro__by { grid-column: 2; grid-row: 1 / span 3; align-self: end; border-top: 0; border-left: 1px dashed var(--border); padding: 0 0 4px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .notebook-top, .toc-rail, .ad-slot, .notebook-end, .post-tags, .related { display: none !important; }
  body { background: #fff; }
}
