/* ==========================================================
   블로그 엔진 공통 구조 CSS (모든 테마 공용)
   - 색·서체·장식은 themes/{테마}/style.css 의 CSS 변수로 결정
   ========================================================== */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f6f8;
  --text: #191b1f;
  --muted: #646a73;
  --line: #e6e8eb;
  --accent: #3b5bdb;
  --accent-ink: #ffffff;
  --accent-soft: rgba(59, 91, 219, .12);
  --link: var(--accent);
  --head-bg: var(--surface);
  --foot-bg: var(--surface-2);
  --radius: 14px;
  --radius-sm: 8px;
  --radius-img: var(--radius);
  --card-border: 1px solid var(--line);
  --card-bg: var(--surface);
  --shadow: none;
  --shadow-hover: 0 12px 28px rgba(15, 23, 42, .10);
  --font-body: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  --font-head: var(--font-body);
  --head-weight: 700;
  --title-tracking: -0.02em;
  --fs-body: 17px;
  --lh-body: 1.8;
  --wrap: 1120px;
  --content: 720px;
  --gap: 24px;
}

/* ── 리셋 ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 999; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.preview-bar { background: #111; color: #fff; font-size: 13px; text-align: center; padding: 8px 12px; }
.preview-bar a { color: #ffd43b; text-decoration: underline; }

/* ── 읽기 진행 막대 ── */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

/* ── 헤더 ── */
.site-head { background: var(--head-bg); border-bottom: 1px solid var(--line); }
.head-inner { display: flex; align-items: center; gap: 18px; min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); flex-shrink: 0; }
.brand:hover { color: var(--text); }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 22px; line-height: 1;
}
.brand-letter {
  width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: var(--accent-ink);
  font-size: 15px; font-weight: 800;
}
.brand-logo { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 21px; letter-spacing: var(--title-tracking); white-space: nowrap; }
.gnb { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.gnb::-webkit-scrollbar { display: none; }
.gnb a {
  color: var(--muted); font-size: 15px; font-weight: 500; padding: 7px 12px; border-radius: 999px; white-space: nowrap;
  transition: background .15s, color .15s;
}
.gnb a:hover, .gnb a[aria-current] { color: var(--text); background: var(--surface-2); }
.scheme-toggle {
  width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); border: 1px solid var(--line); flex-shrink: 0;
}
.scheme-toggle:hover { color: var(--text); }
.scheme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .scheme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .scheme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .scheme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .scheme-toggle .i-moon { display: none; }
}

/* 헤더 변형: 가운데 정렬 */
.header-centered .head-inner { flex-direction: column; gap: 8px; padding-top: 22px; padding-bottom: 8px; }
.header-centered .gnb { margin-left: 0; max-width: 100%; }
.header-centered .scheme-toggle { position: absolute; right: 20px; top: 18px; }
.header-centered .site-head { position: relative; }
/* 헤더 변형: 신문 마스트헤드 */
.masthead-bar { border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.masthead-bar .wrap { display: flex; justify-content: space-between; gap: 12px; padding-top: 6px; padding-bottom: 6px; }
.masthead-bar span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-masthead .head-inner { flex-direction: column; gap: 6px; padding-top: 20px; padding-bottom: 0; }
.header-masthead .brand-name { font-size: clamp(30px, 6vw, 48px); }
.header-masthead .gnb { margin: 8px 0 0; width: 100%; justify-content: center; border-top: 1px solid var(--line); padding: 6px 0; }
@media (max-width: 640px) {
  .masthead-bar span:last-child { display: none; }
  .header-masthead .gnb, .header-centered .gnb { justify-content: flex-start; }
}

/* ── 본문 래퍼 (+ 문서형 사이드 내비) ── */
.site-body { display: block; }
.site-main { min-width: 0; }
.has-sidenav:not(.page-home) .site-body { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
.side-nav-inner { position: sticky; top: 88px; padding: 32px 0; }
.side-label { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.side-nav ul { list-style: none; }
.side-nav a { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--text); font-size: 15px; }
.side-nav a em { font-style: normal; color: var(--muted); font-size: 12.5px; }
.side-nav a:hover, .side-nav a[aria-current] { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 960px) {
  .has-sidenav:not(.page-home) .site-body { display: block; }
  .side-nav { display: none; }
}

/* ── 히어로 ── */
.hero { padding: 56px 0 28px; }
.hero-eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .14em; color: var(--accent); margin-bottom: 14px; }
.hero-title {
  font-family: var(--font-head); font-weight: var(--head-weight);
  font-size: clamp(30px, 5.2vw, 50px); line-height: 1.25; letter-spacing: var(--title-tracking); max-width: 780px;
}
.hero-desc { color: var(--muted); margin-top: 14px; max-width: 620px; font-size: 17.5px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip {
  display: inline-block; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
}
.chip:hover { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.empty-note { color: var(--muted); padding: 40px 0; }

/* ── 섹션 제목 ── */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 44px 0 18px; }
.section-title { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 22px; line-height: 1.35; letter-spacing: var(--title-tracking); }
.section-title a { color: inherit; }
.section-more { font-size: 14px; color: var(--muted); white-space: nowrap; }
.section-more:hover { color: var(--accent); }

/* ── 카드 그리드 / 리스트 ── */
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.cols-3 .post-grid.grid-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.post-grid.grid-list, .post-grid.grid-text { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 960px) { .cols-3 .post-grid.grid-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .post-grid, .cols-3 .post-grid.grid-grid, .post-grid.grid-list, .post-grid.grid-text { grid-template-columns: 1fr; }
}
.post-list { display: flex; flex-direction: column; }
/* 애드센스 자동광고가 그리드 칸에 끼어들어 레이아웃이 깨지는 것 방지 */
.post-grid > .google-auto-placed, .post-grid > ins, .bento > .google-auto-placed, .bento > ins,
.post-list > .google-auto-placed, .docs-index > .google-auto-placed { grid-column: 1 / -1; width: 100%; }

.post-card { min-width: 0; }
.post-card > a { color: inherit; display: flex; flex-direction: column; height: 100%; }
.card-media { overflow: hidden; border-radius: var(--radius-img); background: var(--surface-2); }
.card-thumb { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .card-thumb { transform: scale(1.03); }
.card-thumb-ph {
  aspect-ratio: 1200 / 630; display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); font-size: 34px; font-weight: 800;
}
.card-body { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; flex: 1; min-width: 0; }
.card-cat { font-size: 12.5px; font-weight: 700; color: var(--accent); letter-spacing: .02em; }
.card-title { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 18.5px; line-height: 1.45; letter-spacing: var(--title-tracking); color: var(--text); }
.post-card:hover .card-title { color: var(--accent); }
.card-desc {
  color: var(--muted); font-size: 14.5px; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { margin-top: auto; padding-top: 4px; font-size: 13px; color: var(--muted); }

/* 그리드 카드: 박스형 (테마에서 --card-bg / --card-border / --shadow 조절) */
.card-grid > a { background: var(--card-bg); border: var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.card-grid:hover > a { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card-grid .card-media { border-radius: 0; }
.card-grid .card-body { padding: 16px 18px 18px; }

/* 리스트 카드: 텍스트 왼쪽 + 썸네일 오른쪽 */
.card-list { border-bottom: 1px solid var(--line); }
.card-list > a { flex-direction: row-reverse; align-items: center; gap: 22px; padding: 22px 0; }
.card-list .card-media { width: 220px; flex-shrink: 0; }
.card-list .card-body { padding-top: 0; }
.card-list .card-title { font-size: 20px; }
@media (max-width: 640px) {
  .card-list > a { gap: 14px; padding: 16px 0; align-items: flex-start; }
  .card-list .card-media { width: 108px; }
  .card-list .card-thumb, .card-list .card-thumb-ph { aspect-ratio: 1 / 1; }
  .card-list .card-title { font-size: 16.5px; }
  .card-list .card-desc { display: none; }
}

/* 텍스트 카드 */
.card-text { border-bottom: 1px solid var(--line); }
.card-text > a { padding: 14px 0; }
.card-text .card-body { padding: 0; }
.card-text .card-title { font-size: 17px; }

/* 피처 카드: 큰 이미지 위 텍스트 오버레이 */
.card-feature > a { position: relative; border-radius: var(--radius); overflow: hidden; background: #111; }
.card-feature .card-media { border-radius: 0; height: 100%; }
.card-feature .card-thumb, .card-feature .card-thumb-ph { height: 100%; min-height: 320px; aspect-ratio: auto; }
.card-feature .card-body {
  position: absolute; inset: auto 0 0 0; padding: 28px 26px 24px;
  background: linear-gradient(to top, rgba(0,0,0,.82), rgba(0,0,0,.45) 60%, transparent);
}
.card-feature .card-cat { color: #fff; opacity: .9; }
.card-feature .card-title { color: #fff; font-size: clamp(21px, 3vw, 30px); line-height: 1.35; }
.card-feature:hover .card-title { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.card-feature .card-desc { color: rgba(255,255,255,.82); }
.card-feature .card-meta { color: rgba(255,255,255,.7); }

/* ── 홈: 매거진 ── */
.mag-top { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 28px; padding-top: 28px; }
.mag-lead .post-card, .mag-lead .post-card > a { height: 100%; }
.mag-side-label { font-size: 13px; font-weight: 800; letter-spacing: .08em; color: var(--accent); padding-bottom: 8px; border-bottom: 2px solid var(--text); }
.mag-side .card-list > a { padding: 14px 0; gap: 14px; }
.mag-side .card-list .card-media { width: 104px; }
.mag-side .card-list .card-thumb, .mag-side .card-list .card-thumb-ph { aspect-ratio: 4 / 3; }
.mag-side .card-title { font-size: 16px; }
@media (max-width: 860px) { .mag-top { grid-template-columns: 1fr; } }

/* ── 홈: 벤토 ── */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(180px, auto); gap: 16px; padding-top: 12px; }
.bento-cell { min-width: 0; }
.bento-cell .post-card, .bento-cell .post-card > a { height: 100%; }
.bento-0 { grid-column: span 2; grid-row: span 2; }
.bento-1, .bento-2 { grid-column: span 2; }
.bento-1 .card-grid > a, .bento-2 .card-grid > a { flex-direction: row; }
.bento-1 .card-media, .bento-2 .card-media { width: 44%; flex-shrink: 0; }
.bento-1 .card-thumb, .bento-2 .card-thumb, .bento-1 .card-thumb-ph, .bento-2 .card-thumb-ph { height: 100%; aspect-ratio: auto; }
.bento-cats { grid-column: span 1; }
.bento-cats-inner { height: 100%; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.bento-label { font-size: 12px; font-weight: 800; letter-spacing: .1em; opacity: .8; margin-bottom: 6px; }
.bento-cats-inner a { color: inherit; display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.22); font-weight: 600; font-size: 15px; }
.bento-cats-inner a em { font-style: normal; opacity: .75; font-size: 13px; }
@media (max-width: 960px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-1, .bento-2 { grid-column: span 2; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .bento-0, .bento-1, .bento-2, .bento-cats { grid-column: auto; grid-row: auto; }
  .bento-1 .card-grid > a, .bento-2 .card-grid > a { flex-direction: column; }
  .bento-1 .card-media, .bento-2 .card-media { width: 100%; }
  .bento-1 .card-thumb, .bento-2 .card-thumb { aspect-ratio: 1200 / 630; height: auto; }
}

/* ── 홈: 문서형 인덱스 ── */
.docs-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; padding-top: 8px; }
.docs-cat { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 18px; background: var(--card-bg); display: flex; flex-direction: column; }
.docs-cat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.docs-cat-head h2 { font-family: var(--font-head); font-size: 19px; font-weight: var(--head-weight); }
.docs-cat-head h2 a { color: var(--text); }
.docs-count { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.docs-cat-desc { font-size: 14px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.docs-cat ul { list-style: none; margin: 12px 0 10px; }
.docs-cat li a { display: block; padding: 6px 0 6px 16px; color: var(--text); font-size: 15px; line-height: 1.5; position: relative; }
.docs-cat li a::before { content: ''; position: absolute; left: 2px; top: 14px; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); opacity: .55; }
.docs-cat li a:hover { color: var(--accent); }
.docs-cat .section-more { margin-top: auto; }

/* ── 홈: 피처드 ── */
.featured-top { padding-top: 12px; }
.featured-top .card-feature .card-thumb, .featured-top .card-feature .card-thumb-ph { min-height: 380px; max-height: 480px; }

/* ── 카테고리 헤더 ── */
.cat-head { padding: 40px 0 20px; }
.cat-head h1 { font-family: var(--font-head); font-weight: var(--head-weight); font-size: clamp(28px, 4.5vw, 40px); letter-spacing: var(--title-tracking); line-height: 1.3; margin-top: 6px; }
.cat-desc { color: var(--muted); margin-top: 8px; }
.cat-intro {
  margin-top: 18px; padding: 18px 20px; background: var(--surface-2); border-radius: var(--radius);
  color: var(--muted); font-size: 15.5px; line-height: 1.8; max-width: 820px;
}
.cat-count { margin-top: 18px; font-size: 13.5px; color: var(--muted); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }

/* ── 글 상세 ── */
.post-layout { display: block; }
.post-layout.has-aside { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; justify-content: center; }
.post-layout.has-aside .post { max-width: var(--content); width: 100%; justify-self: center; }
.post-aside { min-width: 0; }
.aside-sticky { position: sticky; top: 92px; padding-top: 48px; display: flex; flex-direction: column; gap: 28px; }
@media (min-width: 1081px) { .toc-mode-sidebar.has-aside .toc-inline { display: none; } }
@media (max-width: 1080px) {
  .post-layout.has-aside { display: block; }
  .post-aside { display: none; }
}
.post > * { max-width: var(--content); margin-left: auto; margin-right: auto; }
.post-head { padding: 40px 0 6px; }
.post-title {
  font-family: var(--font-head); font-weight: var(--head-weight);
  font-size: clamp(27px, 4.4vw, 40px); line-height: 1.35; letter-spacing: var(--title-tracking); margin-top: 12px;
}
.post-meta { color: var(--muted); font-size: 14px; margin-top: 14px; display: flex; gap: 6px 14px; flex-wrap: wrap; }
.post-hero-fig { margin-top: 26px; }
.post-hero-img { width: 100%; border-radius: var(--radius-img); }

/* 핵심 요약 (AEO 정답 문단) */
.answer-box {
  margin-top: 28px; padding: 20px 22px; border-radius: var(--radius);
  background: var(--accent-soft); border-left: 4px solid var(--accent);
}
.ab-label { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; color: var(--accent); margin-bottom: 6px; }
.answer-box p { font-size: 16.5px; line-height: 1.75; }

/* 목차 */
.toc { font-size: 15px; }
.toc-inline { margin-top: 24px; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 20px; background: var(--surface); }
.toc-inline summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; }
.toc-inline summary::-webkit-details-marker { display: none; }
.toc-inline summary::after { content: '접기'; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.toc-inline details:not([open]) summary::after { content: '펼치기'; }
.toc ol { list-style: none; counter-reset: toc; margin-top: 8px; }
.toc li { counter-increment: toc; }
.toc li a { display: flex; gap: 10px; padding: 5px 0; color: var(--text); line-height: 1.5; }
.toc li a::before { content: counter(toc, decimal-leading-zero); color: var(--accent); font-weight: 700; font-size: 13px; padding-top: 2px; font-variant-numeric: tabular-nums; }
.toc li a:hover { color: var(--accent); }
.toc-label { font-size: 12.5px; font-weight: 800; letter-spacing: .06em; color: var(--muted); }
.toc-sidebar ol { margin-top: 10px; border-left: 2px solid var(--line); }
.toc-sidebar li a { padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; font-size: 14px; color: var(--muted); }
.toc-sidebar li a::before { display: none; }
.toc-sidebar li a.on, .toc-sidebar li a:hover { color: var(--accent); border-left-color: var(--accent); }
.aside-popular ol { list-style: none; counter-reset: pop; margin-top: 10px; }
.aside-popular li { counter-increment: pop; }
.aside-popular li a { display: flex; gap: 10px; padding: 7px 0; font-size: 14px; color: var(--text); line-height: 1.5; border-bottom: 1px solid var(--line); }
.aside-popular li a::before { content: counter(pop); font-weight: 800; color: var(--accent); min-width: 14px; }

/* 본문 타이포 */
.post-body { margin-top: 32px; }
.post-body > * { max-width: 100%; }
.post-body p { margin: 0 0 1.35em; }
.post-body h2 {
  font-family: var(--font-head); font-weight: var(--head-weight); font-size: 24px; line-height: 1.42;
  letter-spacing: var(--title-tracking); margin: 2.2em 0 .8em; scroll-margin-top: 90px;
}
.post-body h3 { font-size: 19.5px; font-weight: 700; line-height: 1.5; margin: 1.7em 0 .6em; }
.post-body h4 { font-size: 17px; margin: 1.4em 0 .5em; }
.post-body ul, .post-body ol { margin: 0 0 1.35em; padding-left: 1.4em; }
.post-body li { margin-bottom: .45em; }
.post-body li::marker { color: var(--accent); }
.post-body a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-body strong, .post-body b { font-weight: 700; }
.post-body blockquote {
  border-left: 4px solid var(--accent); background: var(--surface-2);
  padding: 16px 20px; margin: 0 0 1.35em; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--muted);
}
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body table { width: 100%; border-collapse: collapse; margin: 0 0 1.35em; font-size: 15px; line-height: 1.6; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.post-body th { background: var(--surface-2); font-weight: 700; }
@media (max-width: 640px) { .post-body table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; } .post-body th, .post-body td { min-width: 96px; } }
.post-body img { border-radius: var(--radius-img); }
.post-body .body-fig { margin: 18px 0 28px; }
.post-body .body-fig img { width: 100%; }
.post-body .body-fig img { height: auto; border-radius: var(--radius-sm, 8px); }
.post-body .photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: start; }
.post-body .photo-grid figcaption { grid-column: 1 / -1; }
.post-body .src-photo figcaption.photo-credit { margin-top: 2px; }
@media (max-width: 560px) { .post-body .photo-grid { grid-template-columns: 1fr; } }
.ai-mark { text-align: right; color: var(--muted); font-size: 12.5px; margin-top: 6px; }

/* FAQ */
.faq-sec { margin-top: 48px; }
.faq-sec .section-title { margin-bottom: 14px; }
.faq-sec details { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 10px; background: var(--surface); }
.faq-sec summary { cursor: pointer; font-weight: 700; font-size: 16px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-sec summary::-webkit-details-marker { display: none; }
.faq-sec summary::after { content: '+'; color: var(--accent); font-size: 22px; font-weight: 400; line-height: 1; flex-shrink: 0; transition: transform .2s; }
.faq-sec details[open] summary::after { transform: rotate(45deg); }
.faq-sec details p { margin-top: 12px; color: var(--muted); font-size: 15.5px; line-height: 1.75; }

/* 광고 슬롯 */
.ad-slot { margin: 32px auto; text-align: center; min-height: 100px; }
.ad-slot.ad-top { margin-top: 0; }

/* 관련 글 */
.related { margin-top: 56px; }

/* ── 페이지네이션 ── */
.paging { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 40px 0 16px; }
.paging a, .paging span {
  min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px; font-size: 14.5px; color: var(--text); background: var(--surface);
}
.paging a:hover { border-color: var(--accent); color: var(--accent); }
.paging .cur { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }

/* ── 정적 페이지 ── */
.page-body { max-width: var(--content); margin: 48px auto 24px; }
.page-body h1 { font-family: var(--font-head); font-weight: var(--head-weight); font-size: clamp(26px, 4vw, 34px); letter-spacing: var(--title-tracking); margin-bottom: 20px; }
.page-body h2 { font-size: 20px; margin: 1.8em 0 .6em; }
.page-body p, .page-body ul { margin-bottom: 1.2em; }
.page-body ul { padding-left: 1.3em; }
.notfound { text-align: center; }
.nf-code { font-size: 72px; font-weight: 900; color: var(--accent); line-height: 1; margin-bottom: 8px; }
.nf-home { text-align: center; margin: 32px 0; }
.btn-accent { display: inline-block; padding: 12px 22px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 700; }

/* ── 푸터 ── */
.site-foot { background: var(--foot-bg); margin-top: 72px; border-top: 1px solid var(--line); }
.foot-inner { padding-top: 40px; padding-bottom: 44px; display: grid; gap: 16px; }
.foot-brand { font-family: var(--font-head); font-weight: 800; font-size: 19px; }
.foot-desc { color: var(--muted); font-size: 14px; margin-top: 4px; max-width: 560px; }
.foot-cats { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.foot-cats a, .foot-links a { color: var(--muted); }
.foot-cats a:hover, .foot-links a:hover { color: var(--accent); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; }
.foot-copy { color: var(--muted); font-size: 13px; opacity: .8; }

@media (max-width: 640px) {
  :root { --fs-body: 16.5px; --gap: 18px; }
  .wrap { padding: 0 16px; }
  .head-inner { gap: 10px; flex-wrap: wrap; min-height: 56px; }
  .header-inline .gnb { order: 3; width: 100%; margin: 0 -16px; padding: 0 12px; }
  .header-inline .scheme-toggle { margin-left: auto; }
  .brand-name { font-size: 19px; }
  .hero { padding: 36px 0 16px; }
  .section-head { margin-top: 34px; }
  .post-head { padding-top: 28px; }
  .answer-box { padding: 16px 18px; }
}

/* ── 공공데이터 기본 정보 표 · 출처 ── */
.post-body .data-facts { margin-top: .4em; }
.post-body .data-facts th { width: 28%; white-space: nowrap; }
@media (max-width: 640px) { .post-body .data-facts th { white-space: normal; } }
.post-body .data-source { font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 24px; }
.photo-credit { font-size: 12.5px; color: var(--muted); text-align: right; margin-top: 6px; }

/* 다국어: 언어 전환·현지화 안내 */
.lang-switch { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); margin-top: 14px; }
.lang-switch a { color: var(--muted); text-decoration: none; border-bottom: 1px dotted currentColor; }
.lang-switch a:hover { color: var(--accent); }
.lang-switch span[aria-current] { color: var(--text); font-weight: 700; }
.post-langs { margin-top: 10px; }
.i18n-note { margin-top: 28px; font-size: 13px; color: var(--muted); }
.i18n-note a { color: var(--accent); }
