/* 전기차 충전소 사이트 — 단일 CSS
 * 디자인 원칙: 모바일 퍼스트, 한 손 조작, 정보 밀도 우선
 * 컬러: 전기·친환경 톤 (그린 #0a7c3a) + 중성 그레이
 */

:root {
  --primary: #0a7c3a;          /* 본문 링크·CTA·강조 */
  --primary-dark: #065f46;     /* 호버·중요 텍스트 */
  --primary-light: #ecfdf5;    /* 배경·하이라이트 */
  --primary-soft: #d1fae5;     /* 보더·약한 배경 */
  --text: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f7f8f9;
  --card: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Pretendard Variable', Pretendard, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; color: var(--text); background: var(--bg); line-height: 1.55; -webkit-text-size-adjust: 100%; overflow-x: hidden; max-width: 100vw; }
img { max-width: 100%; height: auto; }
table { max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ============ HEADER ============ */
.site-header { background: #fff; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 100; }
.site-header .container { display: flex; align-items: center; gap: 16px; height: 56px; }
.logo { font-weight: 700; font-size: 17px; color: #0a7c3a; flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.logo-img { width: 24px; height: 24px; vertical-align: middle; }
.logo-text { display: inline; }
/* 모바일에서 로고 텍스트 숨김 (아이콘만) — 헤더 폭 절약 */
@media (max-width: 480px) {
  .logo-text { display: none; }
  .site-header .container { gap: 10px; }
}
@media (min-width: 481px) and (max-width: 599px) {
  .logo { font-size: 14px; }
  .site-header .container { gap: 8px; }
}
/* 네비 — 모바일에서도 항상 표시 (블로그 진입점 보장) */
.nav-main { display: flex; gap: 12px; flex-shrink: 0; }
.nav-main a { color: #374151; font-size: 14px; font-weight: 500; white-space: nowrap; }
.nav-main a:hover { color: #0a7c3a; text-decoration: none; }
@media (min-width: 600px) { .nav-main { gap: 16px; } }
.search { flex: 1; display: flex; gap: 4px; max-width: 480px; margin-left: auto; min-width: 0; }
.search input { flex: 1; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 15px; min-width: 0; }
.search input:focus { outline: 2px solid #0a7c3a; outline-offset: -1px; border-color: transparent; }
.search button { padding: 8px 14px; background: #0a7c3a; color: #fff; border: 0; border-radius: 8px; cursor: pointer; flex-shrink: 0; }
/* 모바일 — 검색창 폭 축소 + 패딩 축소 */
@media (max-width: 599px) {
  .search input { padding: 7px 10px; font-size: 14px; }
  .search button { padding: 7px 10px; }
  .search { gap: 3px; }
}

/* ============ HERO ============ */
.hero { padding: 48px 16px 32px; text-align: center; background: linear-gradient(180deg, #ecfdf5 0%, #f7f8f9 100%); }
.hero h1 { font-size: 28px; margin-bottom: 8px; }
.hero-sub { color: #4b5563; margin-bottom: 24px; }
.hero-search { display: flex; gap: 6px; max-width: 540px; margin: 0 auto; }
.hero-search input { flex: 1; padding: 12px 16px; border: 1px solid #d1d5db; border-radius: 10px; font-size: 16px; background: #fff; }
.hero-search button { padding: 12px 24px; background: #0a7c3a; color: #fff; border: 0; border-radius: 10px; cursor: pointer; font-weight: 600; }

@media (min-width: 768px) {
  .hero { padding: 80px 16px 48px; }
  .hero h1 { font-size: 36px; }
}

/* ============ SECTIONS ============ */
.section { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 20px; margin: 16px 0; }
.section > h2 { font-size: 18px; margin-bottom: 16px; }
.section h3 { font-size: 15px; margin: 12px 0 8px; color: #374151; }

main h1 { padding: 16px 0; font-size: 24px; }
main h1 + .region-sub, main h1 + .station-addr { color: #4b5563; margin-top: -8px; margin-bottom: 16px; }

/* ============ GRIDS ============ */
.sido-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 480px) { .sido-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 768px) { .sido-grid { grid-template-columns: repeat(6, 1fr); } }
.sido-tile { display: flex; align-items: center; justify-content: center; padding: 18px 8px; background: #f3f4f6; border-radius: 8px; color: #1f2937; font-weight: 600; }
.sido-tile:hover { background: #ecfdf5; color: #0a7c3a; text-decoration: none; }

.sigungu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 480px) { .sigungu-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .sigungu-grid { grid-template-columns: repeat(5, 1fr); } }
.sigungu-tile { padding: 14px 10px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; text-align: center; color: #1f2937; }
.sigungu-tile:hover { background: #ecfdf5; color: #0a7c3a; border-color: #0a7c3a; text-decoration: none; }
.sigungu-tile-all { background: #ecfdf5; border-color: #0a7c3a; color: #0a7c3a; font-weight: 600; }
.sigungu-tile-all:hover { background: #0a7c3a; color: #ffffff; border-color: #0a7c3a; }
.sigungu-tile-all .tile-sub { display: block; margin-top: 2px; font-size: 0.78rem; font-weight: 400; color: inherit; opacity: 0.85; }
.more-hint { margin-top: 12px; padding: 10px 12px; background: #fef9c3; border-radius: 6px; color: #713f12; font-size: 0.9rem; text-align: center; }

.dong-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
@media (min-width: 480px) { .dong-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 768px) { .dong-grid { grid-template-columns: repeat(6, 1fr); } }
.dong-tile { padding: 10px 6px; background: #f9fafb; border-radius: 6px; text-align: center; font-size: 14px; color: #374151; }
.dong-tile:hover { background: #ecfdf5; color: #0a7c3a; text-decoration: none; }

/* ============ GEO LEAD (1depth·2depth 첫 단락, LLM 인용용) ============ */
.geo-lead { margin: 8px 0 10px; padding: 12px 14px; background: #f0fdf4; border-left: 4px solid #0a7c3a; border-radius: 6px; line-height: 1.6; color: #1f2937; font-size: 0.95rem; }

/* ============ INSIGHTS (운영사·출력·인기·24h) ============ */
.insights-section { margin-top: 24px; }
.insights-section h3 { font-size: 1.05rem; margin: 18px 0 6px; color: #065f46; font-weight: 600; }
.insights-section h3 .h3-sub { font-size: 0.85rem; font-weight: 400; color: #6b7280; margin-left: 4px; }
.insights-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 0.92rem; }
.insights-table th, .insights-table td { padding: 8px 10px; border-bottom: 1px solid #e5e7eb; text-align: left; }
.insights-table th { background: #f9fafb; font-weight: 600; color: #374151; }
.insights-table td.num { text-align: right; font-variant-numeric: tabular-nums; color: #1f2937; }
.insights-list { margin: 8px 0 0; padding-left: 20px; }
.insights-list li { margin-bottom: 6px; line-height: 1.5; }
.insights-list a { display: inline-block; }
.insights-list .meta { display: block; font-size: 0.83rem; color: #6b7280; margin-top: 2px; }
.new-badge { margin: 12px 0; padding: 10px 14px; background: #fef3c7; border-left: 4px solid #f59e0b; border-radius: 6px; color: #78350f; font-size: 0.92rem; }
.new-badge strong { color: #92400e; }

/* ============ BACK-TO-REGION (시군구·동 페이지 좌측 상단 상위 지역 링크) ============ */
.back-to-region { display: inline-flex; align-items: center; padding: 8px 14px; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 8px; color: #065f46; font-size: 14px; font-weight: 600; margin: 8px 0 12px; }
.back-to-region:hover { background: #d1fae5; text-decoration: none; }

/* ============ STATS ============ */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 600px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 16px; background: #f9fafb; border-radius: 8px; text-align: center; }
.stat strong { display: block; font-size: 24px; color: #0a7c3a; }
.stat span { color: #6b7280; font-size: 13px; }

/* ============ STATION CARDS ============ */
.station-list { display: grid; gap: 10px; }
@media (min-width: 640px) { .station-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .station-list { grid-template-columns: repeat(3, 1fr); } }
.station-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; transition: box-shadow .1s; }
.station-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.station-card__link { display: block; padding: 14px; color: inherit; }
.station-card__link:hover { text-decoration: none; }
.station-card__name { font-size: 15px; margin-bottom: 4px; color: #111827; }
.station-card__addr { color: #6b7280; font-size: 13px; margin-bottom: 8px; }
.station-card__badges { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.station-card__realtime { font-size: 13px; color: #6b7280; padding-top: 8px; border-top: 1px solid #f3f4f6; }

.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.badge-fast { background: #fef3c7; color: #b45309; }
.badge-slow { background: #dbeafe; color: #1e40af; }
.badge-24h { background: #d1fae5; color: #065f46; }
.badge-free { background: #f3e8ff; color: #6b21a8; }

/* ============ FILTER BAR ============ */
.filter-bar { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; margin-bottom: 12px; -webkit-overflow-scrolling: touch; }
.filter { padding: 8px 14px; background: #fff; border: 1px solid #d1d5db; border-radius: 20px; font-size: 14px; color: #374151; white-space: nowrap; }
.filter:hover { border-color: #0a7c3a; color: #0a7c3a; text-decoration: none; }
.filter.on { background: #0a7c3a; color: #fff; border-color: #0a7c3a; }
.filter.reset { color: #6b7280; }

/* ============ MAP ============ */
.map-wrap { margin: 12px 0; border-radius: 10px; overflow: hidden; border: 1px solid #e5e7eb; }
.kakao-map { width: 100%; }

.directions { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 16px; }
.directions a { padding: 8px 14px; background: #fff; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; color: #374151; }
.directions a:hover { border-color: #0a7c3a; color: #0a7c3a; text-decoration: none; }

/* ============ REALTIME ============ */
.realtime-badge { padding: 12px 14px; border-radius: 8px; background: #f9fafb; border: 1px solid #e5e7eb; min-width: 220px; }
.realtime-headline { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.realtime-detail { display: flex; gap: 10px; margin-top: 4px; font-size: 12px; color: #6b7280; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; }
.dot-good { background: #10b981; }
.dot-mid { background: #f59e0b; }
.dot-bad { background: #ef4444; }
.dot-loading { background: #d1d5db; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .4; } 50% { opacity: 1; } }
.realtime-good { background: #ecfdf5; border-color: #a7f3d0; }
.realtime-mid { background: #fffbeb; border-color: #fde68a; }
.realtime-bad { background: #fef2f2; border-color: #fecaca; }

/* ============ STATION DETAIL ============ */
.station-summary { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0; align-items: center; }
.station-summary .badges { display: flex; flex-wrap: wrap; gap: 4px; }

.charger-table { width: 100%; border-collapse: collapse; }
.charger-table th, .charger-table td { padding: 8px 12px; border-bottom: 1px solid #f3f4f6; text-align: left; font-size: 14px; }
.charger-table th { background: #f9fafb; color: #4b5563; font-weight: 600; }

.operator p { margin-bottom: 4px; }

.surroundings-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .surroundings-grid { grid-template-columns: 1fr 1fr; } }
.surroundings ul { list-style: none; }
.surroundings li { padding: 8px 0; border-bottom: 1px solid #f3f4f6; font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.surroundings .cat { color: #9ca3af; font-size: 12px; }
.muted { color: #9ca3af; font-size: 12px; }

.nearby-list { list-style: none; }
.nearby-list li { padding: 8px 0; border-bottom: 1px solid #f3f4f6; }

.region-results { list-style: none; }
.region-results li { padding: 8px 0; border-bottom: 1px solid #f3f4f6; }

/* ============ BREADCRUMB ============ */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 4px; padding: 12px 0; font-size: 13px; color: #6b7280; }
.breadcrumb .sep { margin: 0 4px; color: #d1d5db; }
.breadcrumb a { color: #4b5563; }

/* ============ FAQ ============ */
.faq dl { margin-top: 8px; }
.faq dt { font-weight: 600; color: #1f2937; margin-top: 14px; }
.faq dt:first-child { margin-top: 0; }
.faq dd { color: #4b5563; margin-top: 4px; font-size: 14px; }

/* ============ EMPTY ============ */
.empty { padding: 24px; text-align: center; color: #6b7280; background: #f9fafb; border-radius: 8px; }

/* ============ ADS ============ */
.ad-placeholder { padding: 24px; text-align: center; background: #f3f4f6; border: 2px dashed #d1d5db; border-radius: 8px; color: #9ca3af; font-size: 13px; margin: 16px 0; }

/* ============ BLOG ============ */
.cat-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 12px 0; margin-bottom: 8px; -webkit-overflow-scrolling: touch; }
.cat-tab { padding: 8px 14px; background: #fff; border: 1px solid #d1d5db; border-radius: 20px; font-size: 14px; color: #374151; white-space: nowrap; }
.cat-tab:hover { border-color: #0a7c3a; color: #0a7c3a; text-decoration: none; }
.cat-tab.on { background: #0a7c3a; color: #fff; border-color: #0a7c3a; }

.article-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .article-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .article-grid { grid-template-columns: repeat(3, 1fr); } }
.article-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; transition: box-shadow .1s, transform .1s; }
.article-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); transform: translateY(-2px); }
.article-card__link { display: block; color: inherit; }
.article-card__link:hover { text-decoration: none; }
.article-card__cover { width: 100%; height: 160px; object-fit: cover; display: block; }
.article-card__body { padding: 16px; }
.article-card__cat { display: inline-block; padding: 2px 10px; background: #ecfdf5; color: #065f46; border-radius: 12px; font-size: 11px; font-weight: 600; margin-bottom: 8px; }
.article-card__title { font-size: 16px; line-height: 1.4; margin-bottom: 6px; color: #111827; }
.article-card__desc { font-size: 13px; color: #6b7280; line-height: 1.5; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-card__meta { font-size: 12px; color: #9ca3af; display: flex; gap: 6px; }

/* ============ POST (article detail) ============ */
.post { max-width: 720px; margin: 0 auto; background: #fff; border-radius: 12px; padding: 24px 20px; border: 1px solid #e5e7eb; }
.post__header { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid #f3f4f6; }
.post__cat { display: inline-block; padding: 4px 12px; background: #ecfdf5; color: #065f46; border-radius: 12px; font-size: 12px; font-weight: 600; margin-bottom: 12px; }
.post__title { font-size: 24px; line-height: 1.35; color: #111827; margin-bottom: 8px; }
.post__desc { color: #4b5563; line-height: 1.6; margin-bottom: 12px; }
.post__meta { font-size: 13px; color: #9ca3af; display: flex; gap: 8px; flex-wrap: wrap; }

/* 본문 간격·타이포 — bokjipick.kr 와 동일 (Wirecutter 톤, line-height 1.8) */
.post__body { font-size: 16px; line-height: 1.8; color: #1f2937; }
.post__body h2 { font-size: 21px; font-weight: 700; margin: 44px 0 14px; padding-left: 14px; border-left: 3px solid var(--primary); line-height: 1.35; }
.post__body h3 { font-size: 17px; font-weight: 600; margin: 28px 0 10px; line-height: 1.4; }
.post__body p { margin-bottom: 18px; }
.post__body ul, .post__body ol { margin: 0 0 18px 24px; }
.post__body li { margin-bottom: 6px; line-height: 1.75; }
.post__body strong { font-weight: 700; color: #111827; }
/* 본문 내부 링크 — 백링크 강조 (사이트 primary 컬러 + 하단 굵은 보더) */
.post__body a:not(.tag):not(.post__tags a) {
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1.5px solid var(--primary);
  padding-bottom: 1px;
  transition: color .15s, border-color .15s, background .15s;
}
.post__body a:not(.tag):hover {
  color: #fff;
  background: var(--primary);
  border-bottom-color: var(--primary-dark);
  border-radius: 2px;
}
/* 외부 링크는 ↗ 아이콘 */
.post__body a[href^="http"]:not([href*="evplace.kr"])::after {
  content: " ↗";
  font-size: .85em;
  opacity: .7;
}
.post__body table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.post__body th, .post__body td { padding: 10px 12px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.post__body th { background: #f9fafb; font-weight: 600; }
.post__body blockquote { border-left: 3px solid #d1d5db; background: #f9fafb; padding: 14px 18px; margin: 20px 0; color: #4b5563; border-radius: 0 8px 8px 0; }
.post__body blockquote p:last-child { margin-bottom: 0; }
.post__body code { padding: 1px 6px; background: #f3f4f6; border-radius: 4px; font-size: 0.9em; color: #b45309; }
.post__body pre.code { padding: 14px; background: #1f2937; color: #f3f4f6; border-radius: 8px; overflow-x: auto; margin: 20px 0; }
.post__body pre.code code { background: transparent; color: inherit; padding: 0; }
.post__body hr { border: 0; border-top: 1px solid var(--border); margin: 36px 0; }
.post__body img, .article-body__image { display: block; max-width: 100%; height: auto; margin: 16px auto; border-radius: 8px; border: 1px solid #f3f4f6; }

.post__tags { margin-top: 24px; padding-top: 16px; border-top: 1px solid #f3f4f6; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 4px 10px; background: #f3f4f6; color: #4b5563; border-radius: 12px; font-size: 12px; }

/* ============ ARTICLE — 모바일 최적화 (720px 이하) ============
 * 표: 가로 스크롤 + 첫 컬럼 sticky로 라벨 유지
 * 이미지: 둥근 모서리·마진 축소, 화면 풀폭 활용
 * 본문: 폰트 0.96rem, h2/h3 마진 축소, 외부 링크 ↗ 작게
 * 코드: 가로 스크롤, 폰트 0.85em
 */
@media (max-width: 720px) {
  .post { padding: 18px 14px; border-radius: 8px; }
  .post__header { margin-bottom: 18px; padding-bottom: 12px; }
  .post__title { font-size: 20px; line-height: 1.35; }
  .post__desc { font-size: 14px; line-height: 1.55; }
  .post__meta { font-size: 12px; gap: 6px; }

  .post__body { font-size: 15.5px; line-height: 1.78; }
  .post__body h2 { font-size: 18px; margin: 32px 0 12px; padding-left: 10px; border-left-width: 3px; }
  .post__body h3 { font-size: 15.5px; margin: 22px 0 8px; }
  .post__body p { margin-bottom: 14px; }
  .post__body ul, .post__body ol { margin: 0 0 14px 22px; }
  .post__body li { margin-bottom: 5px; line-height: 1.7; }
  .post__body hr { margin: 24px 0; }
  .post__body blockquote { padding: 12px 14px; margin: 16px 0; font-size: 14.5px; }

  /* 표: 가로 스크롤 + 첫 컬럼 sticky (라벨 유지) + 셀 nowrap */
  .post__body .table-wrap, .post__body table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  .post__body table { white-space: nowrap; font-size: 13px; border: 1px solid var(--border); border-radius: 6px; }
  .post__body th, .post__body td { padding: 8px 10px; }
  .post__body thead th:first-child, .post__body tbody td:first-child {
    position: sticky; left: 0; background: #fff; z-index: 1;
    border-right: 2px solid var(--primary-soft);
  }
  .post__body thead th:first-child { background: #f9fafb; }

  /* 이미지: 풀폭, 마진 축소 */
  .post__body img, .article-body__image { margin: 14px -14px; max-width: calc(100% + 28px); border-radius: 0; border: 0; }

  /* 코드 블록: 가로 스크롤 */
  .post__body pre.code { padding: 12px; font-size: 12.5px; margin: 16px -14px; border-radius: 0; }

  /* 본문 링크 호버 → tap 친화 (배경 반전 그대로 + min tap area) */
  .post__body a:not(.tag) { padding: 1px 2px; }
  .post__body a[href^="http"]:not([href*="evplace.kr"])::after { font-size: .8em; }

  /* tags */
  .post__tags { margin-top: 18px; padding-top: 12px; gap: 4px; }
  .tag { padding: 3px 8px; font-size: 11px; }

  /* breadcrumb 살짝 축소 */
  .breadcrumb { font-size: 12px; gap: 4px; flex-wrap: wrap; }
}

/* 초소형 (380px 미만): 더 압축 */
@media (max-width: 380px) {
  .post { padding: 16px 12px; }
  .post__title { font-size: 18px; }
  .post__body h2 { font-size: 17px; }
}

/* ============ ARTICLE 3-COLUMN GRID (좌 TOC / 본문 / 우 관련글) ============ */
.post-main { width: 100%; max-width: none; padding: 0; margin: 0; }  /* layout.ts main 기본 .container 1080 폭 해제 */
.post-grid { max-width: 1400px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 1200px) {
  .post-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr) 280px; gap: 0; padding: 0 24px; }
}

/* 좌측 TOC */
.toc-col { display: none; }
@media (min-width: 1200px) { .toc-col { display: block; } }
.toc-sticky { position: sticky; top: 72px; padding: 28px 16px 28px 0; max-height: calc(100vh - 88px); overflow-y: auto; }
.toc-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.toc-nav { display: flex; flex-direction: column; gap: 2px; }
.toc-nav a { font-size: 13px; line-height: 1.45; color: var(--muted); text-decoration: none; padding: 4px 0 4px 10px; border-left: 2px solid transparent; transition: color .15s, border-color .15s; display: block; }
.toc-nav a:hover, .toc-nav a.active { color: var(--primary-dark); border-left-color: var(--primary); text-decoration: none; }
.toc-nav a.toc-h3 { padding-left: 20px; font-size: 12px; color: #9ca3af; }

/* 모바일 TOC 토글 */
.toc-mobile-wrap { margin: 16px 0 20px; }
@media (min-width: 1200px) { .toc-mobile-wrap { display: none; } }
.toc-mobile-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 10px 14px; font-size: 13px; font-weight: 600; color: var(--text); background: var(--primary-light); border: 1px solid var(--primary-soft); border-radius: 8px; cursor: pointer; }
.toc-mobile-panel { display: none; margin-top: 6px; padding: 12px 14px; background: #f9fafb; border: 1px solid var(--border); border-radius: 8px; }
.toc-mobile-panel.open { display: block; }
.toc-mobile-panel a { display: block; font-size: 13px; color: var(--text); padding: 5px 0; text-decoration: none; }
.toc-mobile-panel a.toc-h3 { padding-left: 14px; color: var(--muted); font-size: 12px; }

/* 중앙 본문 */
.main-col { min-width: 0; padding: 16px 0 40px; }
@media (min-width: 1200px) { .main-col { padding: 24px 32px 60px; } }

/* 우측 관련 글 */
.related-col { display: none; }
@media (min-width: 1200px) { .related-col { display: block; } }
.related-sticky { position: sticky; top: 72px; padding: 28px 0 28px 16px; max-height: calc(100vh - 88px); overflow-y: auto; }
.related-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.rec-card { display: flex; gap: 10px; align-items: flex-start; text-decoration: none; padding: 8px; border-radius: 8px; transition: background .15s; color: inherit; margin-bottom: 4px; }
.rec-card:hover { background: var(--primary-light); text-decoration: none; }
.rec-thumb { width: 72px; height: 54px; object-fit: cover; border-radius: 4px; flex-shrink: 0; background: #f3f4f6; }
.rec-thumb--placeholder { background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-soft) 100%); }
.rec-body { flex: 1; min-width: 0; }
.rec-cat { font-size: 10px; font-weight: 700; color: var(--primary-dark); display: block; margin-bottom: 3px; }
.rec-title { font-size: 12.5px; font-weight: 600; line-height: 1.45; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.related-empty { font-size: 12.5px; color: var(--muted); padding: 8px; }

/* 모바일/태블릿용 관련 글 (1200px 미만에서만 본문 하단 표시) */
.related-mobile { margin-top: 32px; }
@media (min-width: 1200px) { .related-mobile { display: none; } }

/* ============ LEGAL PAGES (privacy · contact · about) ============ */
.legal { max-width: 760px; margin: 24px auto 56px; }
.legal-hero { margin: 8px 0 24px; padding: 0; }
.legal-hero h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.015em; margin: 0 0 10px; padding: 0; color: #0f172a; line-height: 1.25; }
@media (min-width: 768px) { .legal-hero h1 { font-size: 34px; } }
.legal-meta { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #6b7280; }
.legal-meta .dot { width: 6px; height: 6px; border-radius: 50%; background: #10b981; display: inline-block; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18); }

.legal-summary { background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%); border: 1px solid #a7f3d0; border-radius: 16px; padding: 22px 24px; margin: 0 0 18px; }
.legal-summary-label { font-size: 12px; font-weight: 700; color: #065f46; margin: 0 0 14px; letter-spacing: 0.06em; text-transform: uppercase; }
.legal-summary-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .legal-summary-grid { grid-template-columns: 1fr 1fr; gap: 12px 24px; } }
.legal-summary-item { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: #111827; line-height: 1.5; }
.legal-summary-item::before { content: ""; flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%; background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23059669' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='3 8 6.5 11.5 13 5'/></svg>") center/11px no-repeat; box-shadow: 0 1px 2px rgba(0,0,0,0.06); margin-top: 1px; }
.legal-summary-item strong { font-weight: 700; color: #065f46; margin-right: 4px; }

.legal-section { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 24px 26px; margin: 0 0 14px; }
.legal-section > h2 { font-size: 17px; font-weight: 700; margin: 0 0 14px; padding: 0; color: #0f172a; display: flex; align-items: center; gap: 12px; line-height: 1.4; border: 0; }
.legal-section > h2 .num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #ecfdf5; color: #0a7c3a; font-size: 13px; font-weight: 700; flex-shrink: 0; border: 1px solid #d1fae5; }
.legal-section p { color: #374151; font-size: 15px; line-height: 1.78; margin: 0 0 10px; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul { margin: 6px 0 10px; padding: 0; list-style: none; }
.legal-section ul li { position: relative; padding: 10px 0 10px 22px; color: #374151; font-size: 14.5px; line-height: 1.6; border-bottom: 1px solid #f3f4f6; }
.legal-section ul li:last-child { border-bottom: 0; padding-bottom: 4px; }
.legal-section ul li::before { content: ""; position: absolute; left: 6px; top: 19px; width: 5px; height: 5px; border-radius: 50%; background: #0a7c3a; }
.legal-section ul li strong { color: #0f172a; font-weight: 600; }
.legal-section a { color: #0a7c3a; font-weight: 500; }
.legal-section a:hover { text-decoration: underline; }

.legal-contact { background: linear-gradient(135deg, #0a7c3a 0%, #065f46 100%); color: #fff; border-radius: 14px; padding: 24px 26px; margin: 8px 0 0; box-shadow: 0 8px 24px -10px rgba(10, 124, 58, 0.45); }
.legal-contact-label { font-size: 12px; font-weight: 700; margin: 0 0 8px; color: #a7f3d0; letter-spacing: 0.06em; text-transform: uppercase; }
.legal-email { font-size: 19px; font-weight: 600; margin: 0; line-height: 1.4; }
.legal-email a { color: #fff; text-decoration: none; }
.legal-email a:hover { text-decoration: underline; }
.legal-contact-sub { font-size: 13px; color: #d1fae5; margin: 8px 0 0; }

/* ============ FOOTER ============ */
.site-footer { margin-top: 32px; padding: 24px 0; background: #fff; border-top: 1px solid #e5e7eb; font-size: 13px; color: #6b7280; }
.site-footer p { margin-bottom: 6px; }
.site-footer .copyright { color: #9ca3af; font-size: 12px; margin-top: 12px; }
