/* ═══════════════════════════════════════════════════════════════
   여수뉴스포털 — 뉴스 상세 v3  (UI 고도화)
   파일: news/assets/css/news-detail-v3.css
   ═══════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────
   CSS 변수
────────────────────────────────────────────────────────────────*/
.nd3-wrap {
  --nd3-serif:    'Noto Serif KR', Georgia, 'Times New Roman', serif;
  --nd3-sans:     'Pretendard Variable', Pretendard, -apple-system, sans-serif;
  --nd3-fs-body:  17px;
  --nd3-lh-body:  2.0;
  --nd3-max:      1220px;
  --nd3-col-art:  1fr;
  --nd3-col-sb:   310px;
  --nd3-gap:      40px;
  --nd3-radius:   12px;
  --nd3-border:   #e5e7eb;
  --nd3-surface:  #f9fafb;
  --nd3-blue:     #2563eb;
  --nd3-text:     #111827;
  --nd3-text2:    #374151;
  --nd3-muted:    #6b7280;
  --nd3-light:    #9ca3af;
  --nd3-accent:   #ef4444;
  --nd3-shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --nd3-shadow:    0 4px 16px rgba(0,0,0,.08);
  --nd3-shadow-lg: 0 8px 32px rgba(0,0,0,.12);
}

/* ──────────────────────────────────────────────────────────────
   읽기 진행바
────────────────────────────────────────────────────────────────*/
#nd3-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  z-index: 9999;
  transition: width .1s linear;
  border-radius: 0 3px 3px 0;
}

/* ──────────────────────────────────────────────────────────────
   전체 래퍼 · 콘텐츠 영역
────────────────────────────────────────────────────────────────*/
.nd3-wrap {
  background: #fff;
  font-family: var(--nd3-sans);
}
.nd3-contents {
  max-width: var(--nd3-max);
  margin: 0 auto;
  padding: 0 20px 80px;
}

/* ──────────────────────────────────────────────────────────────
   2단 레이아웃
────────────────────────────────────────────────────────────────*/
.nd3-layout {
  display: grid;
  grid-template-columns: var(--nd3-col-art) var(--nd3-col-sb);
  gap: var(--nd3-gap);
  align-items: start;
  padding-top: 24px;
}

/* ──────────────────────────────────────────────────────────────
   브레드크럼
────────────────────────────────────────────────────────────────*/
.nd3-breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px; /* 원칙3: 최소 14px – 구 12px 수정 */
  color: var(--nd3-light);
  margin-bottom: 22px;
}
.nd3-breadcrumb a {
  color: var(--nd3-muted);
  transition: color .15s;
}
.nd3-breadcrumb a:hover { color: var(--nd3-text); }
.nd3-sep { font-size: 10px; color: var(--nd3-border); } /* 원칙3 예외: 구분자 아이콘 폰트 최솟값 10px */

/* ──────────────────────────────────────────────────────────────
   기사 헤더
────────────────────────────────────────────────────────────────*/
.nd3-art-header { margin-bottom: 28px; }

/* 배지 행 */
.nd3-art-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.nd3-cat-badge {
  font-size: 14px; /* 원칙3: 최소 14px – 구 12px 수정 */
  font-weight: 700;
  color: var(--badge-color, var(--nd3-blue));
  border-bottom: 2px solid currentColor;
  padding-bottom: 1px;
  letter-spacing: 0.02em;
  transition: opacity .15s;
}
.nd3-cat-badge:hover { opacity: .75; }

.nd3-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px; /* 원칙3 예외: 배지 최솟값 12px – 구 11px 수정 */
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}
.nd3-badge-breaking {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  animation: nd3Pulse 1.5s infinite;
}
.nd3-badge-featured {
  background: #fefce8;
  color: #b45309;
  border: 1px solid #fde68a;
}
@keyframes nd3Pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .65; }
}
.nd3-read-time {
  font-size: 14px; /* 원칙3: 최소 14px – 구 12px 수정 */
  color: var(--nd3-light);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 제목 */
.nd3-headline {
  font-family: var(--nd3-serif);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.55;
  color: var(--nd3-text);
  letter-spacing: -0.025em;
  margin-bottom: 14px;
  word-break: keep-all;
}

/* 부제목 */
.nd3-subtitle {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--nd3-text2);
  margin-bottom: 14px;
  padding: 14px 18px;
  border-left: 3px solid var(--nd3-blue);
  background: #eff6ff;
  border-radius: 0 8px 8px 0;
  word-break: keep-all;
}
.nd3-description {
  font-size: 16px;
  line-height: 1.75;
  color: var(--nd3-muted);
  margin-bottom: 14px;
  word-break: keep-all;
}

/* 메타 바 */
.nd3-art-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--nd3-border);
  border-bottom: 1px solid var(--nd3-border);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.nd3-meta-left,
.nd3-meta-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.nd3-reporter {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nd3-reporter-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: -1px;
}
.nd3-reporter-info strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--nd3-text2);
}
.nd3-reporter-email,
.nd3-source {
  font-size: 14px; /* 원칙3: 최소 14px – 구 12px 수정 */
  color: var(--nd3-light);
}
.nd3-reporter-email:hover { color: var(--nd3-blue); }
.nd3-meta-item {
  font-size: 14px; /* 원칙3: 최소 14px – 구 13px 수정 */
  color: var(--nd3-light);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 툴바 (폰트 조절 + 공유) */
.nd3-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0 4px;
}

/* 폰트 크기 조절 */
.nd3-font-ctrl {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nd3-toolbar-label {
  font-size: 14px; /* 원칙3: 최소 14px – 구 12px 수정 */
  color: var(--nd3-light);
  margin-right: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nd3-font-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--nd3-border);
  border-radius: 6px;
  background: #fff;
  font-size: 12px; /* 원칙3 예외: UI 버튼 내부 기호(A+/A-) 12px 허용 */
  font-weight: 700;
  color: var(--nd3-text2);
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nd3-font-btn:hover {
  border-color: var(--nd3-blue);
  color: var(--nd3-blue);
  background: #eff6ff;
}

/* 공유 버튼 행 */
.nd3-share-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.nd3-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: 20px;
  font-size: 14px; /* 원칙3: 최소 14px – 구 12px 수정 */
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  text-decoration: none;
  border: 1px solid transparent;
  font-family: inherit;
  white-space: nowrap;
}
.nd3-share-kakao {
  background: #FEE500;
  color: #3B1E1E;
  border-color: #e6ce00;
}
.nd3-share-kakao:hover { background: #f5dc00; }
.nd3-share-naver {
  background: #03C75A;
  color: #fff;
  border-color: #02b350;
}
.nd3-share-naver:hover { background: #02b350; }
.nd3-share-twitter {
  background: #1da1f2;
  color: #fff;
  border-color: #1a91da;
}
.nd3-share-twitter:hover { background: #1a91da; color:#fff; }
.nd3-share-facebook {
  background: #1877f2;
  color: #fff;
  border-color: #166fe5;
}
.nd3-share-facebook:hover { background: #166fe5; color:#fff; }
.nd3-share-copy,
.nd3-share-print {
  background: #fff;
  color: var(--nd3-muted);
  border-color: var(--nd3-border);
}
.nd3-share-copy:hover,
.nd3-share-print:hover {
  background: var(--nd3-surface);
  color: var(--nd3-text);
  border-color: #9ca3af;
}

/* ──────────────────────────────────────────────────────────────
   Hero 썸네일
────────────────────────────────────────────────────────────────*/
.nd3-hero-figure {
  margin: 0 0 28px;
  border-radius: var(--nd3-radius);
  overflow: hidden;
  background: var(--nd3-surface);
  box-shadow: var(--nd3-shadow);
  position: relative;
}
.nd3-hero-figure img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.nd3-hero-figure:hover img { transform: scale(1.01); }
.nd3-caption {
  font-size: 14px; /* 원칙3: 최소 14px – 구 12px 수정 */
  color: var(--nd3-muted);
  padding: 10px 16px;
  background: rgba(0,0,0,.55);
  color: rgba(255,255,255,.85);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ──────────────────────────────────────────────────────────────
   AI 요약 박스
────────────────────────────────────────────────────────────────*/
.nd3-ai-summary {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--nd3-radius);
  padding: 18px 20px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.nd3-ai-summary::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 4px; height: 100%;
  background: linear-gradient(180deg, #2563eb, #059669);
  border-radius: 0;
}
.nd3-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.nd3-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px; /* 원칙3 예외: 배지 최솟값 12px */
  font-weight: 700;
  color: #2563eb;
  background: #dbeafe;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}
.nd3-ai-toggle {
  background: none;
  border: none;
  color: var(--nd3-light);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all .15s;
}
.nd3-ai-toggle:hover { background: rgba(37,99,235,.08); color: var(--nd3-blue); }
.nd3-ai-body p {
  font-size: 15px;
  line-height: 1.85;
  color: var(--nd3-text2);
  margin: 0;
  word-break: keep-all;
}

/* ──────────────────────────────────────────────────────────────
   기사 본문
────────────────────────────────────────────────────────────────*/
.nd3-art-body {
  font-size: var(--nd3-fs-body);
  line-height: var(--nd3-lh-body);
  color: var(--nd3-text2);
  margin-bottom: 32px;
  letter-spacing: -0.01em;
  word-break: keep-all;
  transition: font-size .2s;
}
.nd3-art-body .nd3-para {
  margin-bottom: 1.6em;
}
.nd3-art-body .nd3-para:last-child { margin-bottom: 0; }
.nd3-art-body .nd3-subhead {
  font-family: var(--nd3-serif);
  font-size: 1.07em;
  font-weight: 700;
  color: var(--nd3-text);
  margin: 2em 0 0.8em;
  padding-left: 14px;
  border-left: 3px solid var(--nd3-blue);
  line-height: 1.5;
}
.nd3-art-body .nd3-subhead2 {
  font-weight: 700;
  color: var(--nd3-text2);
  margin: 1.8em 0 0.7em;
  font-size: 1em;
}
.nd3-art-body .nd3-quote {
  margin: 1.8em 0;
  padding: 20px 24px;
  background: var(--nd3-surface);
  border-left: 4px solid #93c5fd;
  border-radius: 0 8px 8px 0;
  font-size: 16px;
  line-height: 1.8;
  color: var(--nd3-text2);
  font-style: italic;
}
.nd3-art-body .nd3-quote p { margin: 0; }
.nd3-art-body .nd3-ref {
  font-size: 14px; /* 원칙3: 최소 14px – 구 13px 수정 */
  color: var(--nd3-light);
  border-top: 1px solid var(--nd3-border);
  padding-top: 12px;
  margin-top: 24px;
  line-height: 1.7;
}
.nd3-art-body .nd3-hr {
  border: none;
  border-top: 1px dashed var(--nd3-border);
  margin: 32px 0;
}

/* ──────────────────────────────────────────────────────────────
   접근 차단 박스
────────────────────────────────────────────────────────────────*/
.nd3-access-block {
  text-align: center;
  padding: 56px 32px;
  background: var(--nd3-surface);
  border: 2px dashed var(--nd3-border);
  border-radius: var(--nd3-radius);
  margin: 0 0 32px;
}
.nd3-block-icon { font-size: 48px; margin-bottom: 16px; }
.nd3-block-title { font-size: 20px; font-weight: 700; color: var(--nd3-text); margin-bottom: 10px; }
.nd3-block-desc { font-size: 14px; color: var(--nd3-muted); margin-bottom: 24px; line-height: 1.7; }
.nd3-block-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.nd3-block-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all .18s;
}
.nd3-block-btn-primary { background: #1e293b; color: #fff; }
.nd3-block-btn-primary:hover { background: #0f172a; color: #fff; }
.nd3-block-btn-outline { background: #fff; color: var(--nd3-text); border: 2px solid var(--nd3-border); }
.nd3-block-btn-outline:hover { border-color: #9ca3af; }

/* ──────────────────────────────────────────────────────────────
   좋아요 버튼
────────────────────────────────────────────────────────────────*/
.nd3-like-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 0;
  border-top: 1px solid var(--nd3-border);
  border-bottom: 1px solid var(--nd3-border);
  margin-bottom: 28px;
}
.nd3-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border: 2px solid #e5e7eb;
  border-radius: 50px;
  background: #fff;
  cursor: pointer;
  transition: all .25s;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--nd3-text2);
  box-shadow: var(--nd3-shadow-sm);
}
.nd3-like-btn:hover {
  border-color: #fca5a5;
  background: #fff5f5;
  transform: translateY(-2px);
  box-shadow: var(--nd3-shadow);
}
.nd3-like-btn.liked {
  border-color: #ef4444;
  background: #fef2f2;
  color: #dc2626;
}
.nd3-like-heart {
  font-size: 20px;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.nd3-like-btn:hover .nd3-like-heart,
.nd3-like-btn.liked .nd3-like-heart {
  transform: scale(1.25);
}
.nd3-like-cnt {
  background: #f3f4f6;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 14px; /* 원칙3: 최소 14px – 구 13px 수정 */
  font-weight: 700;
  min-width: 28px;
  text-align: center;
}
.nd3-like-btn.liked .nd3-like-cnt { background: #fee2e2; color: #dc2626; }
.nd3-like-hint { font-size: 14px; color: var(--nd3-light); } /* 원칙3: 최소 14px – 구 12px 수정 */

/* ──────────────────────────────────────────────────────────────
   키워드 태그
────────────────────────────────────────────────────────────────*/
.nd3-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 20px 0;
  margin-bottom: 32px;
}
.nd3-tags-label {
  font-size: 14px; /* 원칙3: 최소 14px – 구 12px 수정 */
  font-weight: 700;
  color: var(--nd3-light);
  display: flex;
  align-items: center;
  gap: 4px;
}
.nd3-tag {
  display: inline-block;
  padding: 5px 13px;
  border-radius: 20px;
  border: 1px solid var(--nd3-border);
  font-size: 14px; /* 원칙3: 최소 14px – 구 13px 수정 */
  color: var(--nd3-muted);
  background: var(--nd3-surface);
  transition: all .18s;
  text-decoration: none;
}
.nd3-tag:hover {
  border-color: var(--nd3-blue);
  color: var(--nd3-blue);
  background: #eff6ff;
}

/* ──────────────────────────────────────────────────────────────
   관련기사
────────────────────────────────────────────────────────────────*/
.nd3-related { margin-bottom: 32px; }

.nd3-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.nd3-section-title strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--nd3-text);
  white-space: nowrap;
  letter-spacing: -0.02em;
}
.nd3-section-line {
  flex: 1;
  height: 1px;
  background: var(--nd3-border);
}

.nd3-rel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.nd3-rel-card {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--nd3-border);
  background: #fff;
  text-decoration: none;
  transition: all .2s;
  color: inherit;
}
.nd3-rel-card:hover {
  border-color: #bfdbfe;
  box-shadow: var(--nd3-shadow);
  transform: translateY(-2px);
}
.nd3-rel-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--nd3-surface);
}
.nd3-rel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s;
}
.nd3-rel-card:hover .nd3-rel-thumb img { transform: scale(1.05); }
.nd3-rel-body {
  padding: 12px 14px;
  flex: 1;
}
.nd3-rel-cat {
  display: block;
  font-size: 12px; /* 원칙3 예외: 카드 카테고리 배지 최솟값 12px – 구 11px 수정 */
  font-weight: 700;
  color: var(--nd3-blue);
  margin-bottom: 5px;
  letter-spacing: 0.02em;
}
.nd3-rel-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--nd3-text);
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nd3-rel-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px; /* 원칙3 예외: 메타 최솟값 12px – 구 11px 수정 */
  color: var(--nd3-light);
}
.nd3-rel-meta i { font-size: 10px; } /* 원칙3 예외: 아이콘 폰트 10px 허용 */

/* ──────────────────────────────────────────────────────────────
   이전/다음 기사
────────────────────────────────────────────────────────────────*/
.nd3-prevnext {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  border-radius: var(--nd3-radius);
  overflow: hidden;
  border: 1px solid var(--nd3-border);
  margin-bottom: 32px;
  box-shadow: var(--nd3-shadow-sm);
}
.nd3-pnav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--nd3-surface);
  text-decoration: none;
  color: inherit;
  transition: background .18s;
  min-height: 80px;
}
.nd3-pnav:hover { background: #f1f5f9; }
.nd3-pnav.nd3-pnav-empty { opacity: .45; cursor: default; }
.nd3-pnav.nd3-pnav-empty:hover { background: var(--nd3-surface); }
.nd3-pnav-thumb {
  width: 64px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--nd3-border);
}
.nd3-pnav-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nd3-pnav-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}
.nd3-pnav-info-right { align-items: flex-end; }
.nd3-pnav-dir {
  font-size: 12px; /* 원칙3 예외: 방향 레이블 최솟값 12px – 구 11px 수정 */
  font-weight: 700;
  color: var(--nd3-light);
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.02em;
}
.nd3-next .nd3-pnav-dir { justify-content: flex-end; }
.nd3-pnav-title {
  font-size: 14px; /* 원칙3: 최소 14px – 구 13px 수정 */
  font-weight: 600;
  color: var(--nd3-text2);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nd3-next .nd3-pnav-title { text-align: right; }
.nd3-pnav-empty-msg { font-size: 14px; color: var(--nd3-light); } /* 원칙3: 최소 14px – 구 13px 수정 */
.nd3-pnav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 14px 16px;
  background: #1e293b;
  color: #fff;
  font-size: 12px; /* 원칙3 예외: 목록 버튼 최솟값 12px – 구 11px 수정 */
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  transition: background .18s;
  min-width: 56px;
  letter-spacing: 0.02em;
}
.nd3-pnav-list i { font-size: 16px; }
.nd3-pnav-list:hover { background: #0f172a; color: #fff; }

/* ──────────────────────────────────────────────────────────────
   사이드바
────────────────────────────────────────────────────────────────*/
.nd3-sidebar {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.nd3-side-block {
  background: #fff;
  border: 1px solid var(--nd3-border);
  border-radius: var(--nd3-radius);
  overflow: hidden;
  box-shadow: var(--nd3-shadow-sm);
}
.nd3-side-title {
  padding: 14px 16px;
  font-size: 14px; /* 원칙3: 최소 14px – 구 13px 수정 */
  font-weight: 800;
  color: var(--nd3-text);
  border-bottom: 1px solid var(--nd3-border);
  display: flex;
  align-items: center;
  gap: 7px;
  letter-spacing: -0.01em;
  background: var(--nd3-surface);
}

/* ── ToC ── */
.nd3-toc { padding: 10px 0; }
.nd3-toc-list { list-style: none; padding: 0; margin: 0; }
.nd3-toc-item { }
.nd3-toc-item a {
  display: block;
  padding: 7px 16px;
  font-size: 14px; /* 원칙3: 최소 14px – 구 13px 수정 */
  color: var(--nd3-muted);
  transition: all .15s;
  border-left: 2px solid transparent;
  line-height: 1.5;
  text-decoration: none;
}
.nd3-toc-item a:hover { color: var(--nd3-blue); background: #eff6ff; }
.nd3-toc-item a.is-active { color: var(--nd3-blue); border-left-color: var(--nd3-blue); background: #eff6ff; font-weight: 600; }
.nd3-toc-sub a { padding-left: 28px; font-size: 12px; } /* 원칙3 예외: 2단계 들여쓰기 ToC 최솟값 12px */

/* ── 많이 본 기사 ── */
.nd3-popular-list { list-style: none; padding: 8px 0; margin: 0; }
.nd3-popular-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  transition: background .15s;
}
.nd3-popular-item:hover { background: var(--nd3-surface); }
.nd3-popular-item.is-current { background: #eff6ff; }
.nd3-rank {
  font-size: 14px;
  font-weight: 800;
  color: var(--nd3-light);
  min-width: 18px;
  text-align: center;
  flex-shrink: 0;
  padding-top: 1px;
}
.nd3-rank-top { color: var(--nd3-accent); }
.nd3-popular-body { flex: 1; min-width: 0; }
.nd3-popular-title {
  display: block;
  font-size: 14px; /* 원칙3: 최소 14px – 구 13px 수정 */
  font-weight: 600;
  color: var(--nd3-text2);
  line-height: 1.5;
  margin-bottom: 4px;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .15s;
}
.nd3-popular-title:hover { color: var(--nd3-blue); }
.nd3-popular-item.is-current .nd3-popular-title { color: var(--nd3-blue); }
.nd3-popular-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px; /* 원칙3 예외: 메타 최솟값 12px – 구 11px 수정 */
  color: var(--nd3-light);
}
.nd3-popular-meta i { font-size: 10px; } /* 원칙3 예외: 아이콘 폰트 10px 허용 */
.nd3-popular-thumb {
  width: 56px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--nd3-surface);
}
.nd3-popular-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── 카테고리 목록 ── */
.nd3-cat-list { padding: 6px 0; margin: 0; list-style: none; }
.nd3-cat-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  font-size: 14px; /* 원칙3: 최소 14px – 구 13px 수정 */
  color: var(--nd3-muted);
  transition: all .15s;
  text-decoration: none;
  border-left: 2px solid transparent;
}
.nd3-cat-item:hover { background: var(--nd3-surface); color: var(--nd3-text); }
.nd3-cat-item.is-active {
  font-weight: 700;
  color: var(--nd3-cc, var(--nd3-blue));
  background: #eff6ff;
  border-left-color: var(--nd3-cc, var(--nd3-blue));
}
.nd3-cat-item i:first-child { width: 16px; text-align: center; font-size: 13px; flex-shrink: 0; }
.nd3-cat-item span { flex: 1; }
.nd3-cat-chk { font-size: 12px; color: var(--nd3-cc, var(--nd3-blue)); } /* 원칙3 예외: 체크 아이콘 최솟값 12px – 구 10px 수정 */

/* ──────────────────────────────────────────────────────────────
   토스트
────────────────────────────────────────────────────────────────*/
#nd3Toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.nd3-toast-item {
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--nd3-shadow-lg);
  opacity: 0;
  transform: translateY(10px) scale(.95);
  transition: all .3s;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 200px;
}
.nd3-toast-item.show { opacity: 1; transform: translateY(0) scale(1); }
.nd3-toast-item.ok  { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.nd3-toast-item.err { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ──────────────────────────────────────────────────────────────
   인쇄
────────────────────────────────────────────────────────────────*/
@media print {
  #nd3-progress-bar, .nd3-sidebar, .nd3-toolbar,
  .nd3-like-area, .nd3-related, .nd3-prevnext,
  .nd3-tags, .nd3-breadcrumb, .nl-section-header,
  #nd3Toast { display: none !important; }
  .nd3-layout { grid-template-columns: 1fr !important; }
  .nd3-headline { font-size: 22px !important; }
  .nd3-art-body { font-size: 15px !important; line-height: 1.9 !important; }
  .nd3-hero-figure { break-inside: avoid; }
}

/* ──────────────────────────────────────────────────────────────
   반응형
────────────────────────────────────────────────────────────────*/
@media (max-width: 1060px) {
  .nd3-layout { grid-template-columns: 1fr; gap: 28px; }
  .nd3-sidebar { position: static; display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
}

@media (max-width: 768px) {
  .nd3-contents { padding: 0 14px 56px; }
  .nd3-headline { font-size: 24px; }
  .nd3-rel-grid { grid-template-columns: 1fr; }
  .nd3-sidebar { grid-template-columns: 1fr; }
  .nd3-prevnext { grid-template-columns: 1fr; }
  .nd3-pnav-list { display: none; }
  .nd3-hero-figure img { max-height: 240px; }
  .nd3-share-row { gap: 4px; }
  .nd3-share-btn span { display: none; }
  .nd3-share-btn { padding: 7px 10px; border-radius: 50%; }
}

@media (max-width: 480px) {
  .nd3-headline { font-size: 21px; }
  .nd3-art-body { font-size: 16px; line-height: 1.9; }
  .nd3-subtitle { font-size: 15px; }
  .nd3-art-meta { flex-direction: column; align-items: flex-start; }
  .nd3-toolbar { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ════════════════════════════════════════════════
   누락 클래스 보완 (표준화 v1.1 / 2026-07-11)
════════════════════════════════════════════════ */

/* 기사 본문 영역 (main.nd3-article) */
.nd3-article {
  min-width: 0;
  flex: 1;
}

/* 이전/다음 개별 방향 */
.nd3-prev { border-right: 1px solid var(--nd3-border, #e8ecf0); }
@media (max-width: 768px) { .nd3-prev { border-right: none; } }

/* 좋아요 버튼 라벨 */
.nd3-like-label {
  font-size: 15px;
  font-weight: 600;
  color: inherit;
}

/* ToC 사이드 블록 */
.nd3-toc-block {
  border: 1px solid var(--nd3-border, #e8ecf0);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
  background: #f8fafc;
}

/* 카테고리 퀵링크 블록 (사이드바) */
.nd3-cat-block {
  border: 1px solid var(--nd3-border, #e8ecf0);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}

/* 인기기사 블록 (사이드바) */
.nd3-popular-block {
  border: 1px solid var(--nd3-border, #e8ecf0);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}
