/* 다크 모드 — 라이트 전용 디자인 위에 얹는 코어 다크 테마.
   html[data-theme="dark"] 에서만 활성화되므로 라이트 화면엔 전혀 영향 없음.
   "핵심 화면(홈·목록·상세·본문·헤더/푸터·폼·표)" 우선 커버. 세부 페이지는 점진 보완. */

html[data-theme="dark"]{
  --dk-bg:#14171c;
  --dk-surface:#1b1f26;
  --dk-surface2:#232833;
  --dk-border:#2c333d;
  --dk-text:#e6e8eb;
  --dk-muted:#9aa4af;
  background:var(--dk-bg);
}
html[data-theme="dark"] body{ background:var(--dk-bg)!important; color:var(--dk-text)!important; }

/* ── 공용 크롬: 헤더 / 네비 / 드로어 / 푸터 ── */
html[data-theme="dark"] .header,
html[data-theme="dark"] .header-inner,
html[data-theme="dark"] header,
html[data-theme="dark"] .menu-list,
html[data-theme="dark"] .ms-drawer-panel,
html[data-theme="dark"] .ms-drawer-head,
html[data-theme="dark"] .ms-drawer-search,
html[data-theme="dark"] footer,
html[data-theme="dark"] .footer,
html[data-theme="dark"] .footer-acc{
  background:var(--dk-surface)!important; border-color:var(--dk-border)!important; color:var(--dk-text)!important;
}
html[data-theme="dark"] .gnb-link,
html[data-theme="dark"] .gnb-drop-btn,
html[data-theme="dark"] .menu-item,
html[data-theme="dark"] .menu-textline .menu-item{ color:#d3d8de!important; }
html[data-theme="dark"] .gnb-drop-menu{ background:var(--dk-surface2)!important; border-color:var(--dk-border)!important; }
html[data-theme="dark"] .menu-textline .menu-item{ border-color:var(--dk-border)!important; }
html[data-theme="dark"] .menu-textline .menu-item:hover,
html[data-theme="dark"] .gnb-drop-item:hover{ background:var(--dk-surface2)!important; }
html[data-theme="dark"] .ms-drawer-close{ background:var(--dk-surface2)!important; color:#cbd5e1!important; }

/* ── 카드 / 패널 / 박스 / 섹션 ── */
html[data-theme="dark"] .card,
html[data-theme="dark"] .hero,
html[data-theme="dark"] .filter,
html[data-theme="dark"] .flt-section,
html[data-theme="dark"] .category-guide,
html[data-theme="dark"] .author-box,
html[data-theme="dark"] .related-card,
html[data-theme="dark"] .vs-card,
html[data-theme="dark"] .vs-kpi,
html[data-theme="dark"] .empty,
html[data-theme="dark"] .box,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .stab{
  background:var(--dk-surface)!important; border-color:var(--dk-border)!important; color:var(--dk-text)!important;
}

/* ── 제목 / 본문 텍스트 ── */
html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3,html[data-theme="dark"] h4,
html[data-theme="dark"] .post-title,
html[data-theme="dark"] .post-body h2,html[data-theme="dark"] .post-body h3{ color:#f1f3f5!important; }
html[data-theme="dark"] .post-body,
html[data-theme="dark"] .post-wrap,
html[data-theme="dark"] .title,
html[data-theme="dark"] .biz-row,
html[data-theme="dark"] .meta,
html[data-theme="dark"] .promo{ color:var(--dk-text)!important; }
html[data-theme="dark"] .post-body blockquote{ background:var(--dk-surface2)!important; color:#cdd3da!important; }
html[data-theme="dark"] .post-body a{ color:#5fd68a!important; }

/* ── 인라인 하드코딩 배경(흰/연회색) 잡기 ── */
html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background:#ffffff"],
html[data-theme="dark"] [style*="background: #ffffff"],
html[data-theme="dark"] [style*="background:white"],
html[data-theme="dark"] [style*="background: white"],
html[data-theme="dark"] [style*="background:#f8fafc"],
html[data-theme="dark"] [style*="background:#f1f5f9"],
html[data-theme="dark"] [style*="background:#f9fafb"],
html[data-theme="dark"] [style*="background:#fafafa"],
html[data-theme="dark"] [style*="background:#f6fbf8"],
html[data-theme="dark"] [style*="background:#f0fff"]{
  background-color:var(--dk-surface)!important; border-color:var(--dk-border)!important;
}

/* ── 인라인 하드코딩 글자색 → 밝게 ── */
html[data-theme="dark"] [style*="color:#111827"],
html[data-theme="dark"] [style*="color:#0f172a"],
html[data-theme="dark"] [style*="color:#1f2937"],
html[data-theme="dark"] [style*="color:#1e293b"],
html[data-theme="dark"] [style*="color:#334155"],
html[data-theme="dark"] [style*="color:#374151"]{ color:var(--dk-text)!important; }
html[data-theme="dark"] [style*="color:#64748b"],
html[data-theme="dark"] [style*="color:#6b7280"],
html[data-theme="dark"] [style*="color:#94a3b8"],
html[data-theme="dark"] [style*="color:#9ca3af"],
html[data-theme="dark"] [style*="color:#475569"]{ color:var(--dk-muted)!important; }

/* ── 폼 컨트롤 ── */
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .inp,
html[data-theme="dark"] .sel{
  background:var(--dk-surface2)!important; color:var(--dk-text)!important; border-color:#3a424d!important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{ color:#7c8791!important; }

/* ── 표 ── */
html[data-theme="dark"] table,
html[data-theme="dark"] th,
html[data-theme="dark"] td{ border-color:var(--dk-border)!important; color:var(--dk-text)!important; }

/* ── 썸네일 배경(이미지 자체는 유지) ── */
html[data-theme="dark"] .thumb{ background:#0f1216!important; }

/* 브랜드 초록 버튼/배지, 이미지는 그대로 유지 (별도 override 없음) */
