/*
 * chch-template-dark.css — 게시물 본문 템플릿 다크모드
 *
 * 블로그/카페/섹션 글쓰기로 게시된 HTML 템플릿의
 * 인라인 스타일을 다크모드에서 오버라이드.
 * bbs_header.php에서 로드.
 */

/* 래퍼 배경 투명화 */
html[data-theme="dark"] .board-v4-post-content > div[style*="background"],
html[data-theme="dark"] .contents > div[style*="background"] {
  background: transparent !important;
  color: #c8d6e8 !important;
}

/* 제목 */
html[data-theme="dark"] .board-v4-post-content h1,
html[data-theme="dark"] .board-v4-post-content h2,
html[data-theme="dark"] .board-v4-post-content h3,
html[data-theme="dark"] .contents h1,
html[data-theme="dark"] .contents h2,
html[data-theme="dark"] .contents h3 {
  color: #e8eef5 !important;
}

/* 본문 텍스트 */
html[data-theme="dark"] .board-v4-post-content div[style] p,
html[data-theme="dark"] .board-v4-post-content div[style] li,
html[data-theme="dark"] .board-v4-post-content div[style] span,
html[data-theme="dark"] .contents div[style] p,
html[data-theme="dark"] .contents div[style] li,
html[data-theme="dark"] .contents div[style] span {
  color: #c8d6e8 !important;
}

/* strong 강조 */
html[data-theme="dark"] .board-v4-post-content strong[style],
html[data-theme="dark"] .contents strong[style] {
  color: #8fc7ff !important;
}

/* 카드/박스 (border-radius + background) */
html[data-theme="dark"] .board-v4-post-content div[style*="border-radius"][style*="background"],
html[data-theme="dark"] .contents div[style*="border-radius"][style*="background"] {
  background: rgba(20, 35, 54, .92) !important;
  border-color: #2b425d !important;
}

/* 왼쪽 보더 인용/섹션 카드 */
html[data-theme="dark"] .board-v4-post-content div[style*="border-left"][style*="background"],
html[data-theme="dark"] .contents div[style*="border-left"][style*="background"] {
  background: rgba(25, 40, 60, .90) !important;
}

/* 주의/경고 박스 (#fff8e1) */
html[data-theme="dark"] .board-v4-post-content div[style*="fff8e1"],
html[data-theme="dark"] .contents div[style*="fff8e1"] {
  background: rgba(60, 45, 15, .85) !important;
  border-color: #8a6b1a !important;
}
html[data-theme="dark"] .board-v4-post-content div[style*="fff8e1"] p,
html[data-theme="dark"] .contents div[style*="fff8e1"] p {
  color: #ffd899 !important;
}

/* 체크리스트/요약 내부 흰색 박스 */
html[data-theme="dark"] .board-v4-post-content div[style*="border-radius"] div[style*="background: #fff"],
html[data-theme="dark"] .contents div[style*="border-radius"] div[style*="background: #fff"] {
  background: rgba(15, 29, 49, .95) !important;
  border-color: #2b425d !important;
  color: #c8d6e8 !important;
}

/* 코드 */
html[data-theme="dark"] .board-v4-post-content code[style],
html[data-theme="dark"] .contents code[style],
html[data-theme="dark"] .board-v4-post-content pre[style],
html[data-theme="dark"] .contents pre[style] {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}

/* 태그 하단 */
html[data-theme="dark"] .board-v4-post-content div[style*="border-top"][style*="font-size: 13px"],
html[data-theme="dark"] .board-v4-post-content div[style*="border-top"][style*="font-size: 14px"],
html[data-theme="dark"] .contents div[style*="border-top"][style*="font-size: 13px"],
html[data-theme="dark"] .contents div[style*="border-top"][style*="font-size: 14px"] {
  border-color: #2b425d !important;
  color: #7a9ab5 !important;
}

/* 테이블 */
html[data-theme="dark"] .board-v4-post-content table[style] thead tr[style],
html[data-theme="dark"] .contents table[style] thead tr[style] {
  background: #1b3550 !important;
  color: #fff !important;
}
html[data-theme="dark"] .board-v4-post-content table[style] td,
html[data-theme="dark"] .board-v4-post-content table[style] th,
html[data-theme="dark"] .contents table[style] td,
html[data-theme="dark"] .contents table[style] th {
  border-color: #2b425d !important;
  color: #c8d6e8 !important;
}
html[data-theme="dark"] .board-v4-post-content table[style] tr[style*="f8fbff"],
html[data-theme="dark"] .board-v4-post-content table[style] tr[style*="f8fafc"],
html[data-theme="dark"] .contents table[style] tr[style*="f8fbff"],
html[data-theme="dark"] .contents table[style] tr[style*="f8fafc"] {
  background: rgba(20, 35, 54, .6) !important;
}

/* 인물탐구 타임라인 세로선 */
html[data-theme="dark"] .board-v4-post-content div[style*="background: #d8ccb4"],
html[data-theme="dark"] .contents div[style*="background: #d8ccb4"] {
  background: #3a4f65 !important;
}

/* 인물탐구 아이보리 배경 (#fffef9) */
html[data-theme="dark"] .board-v4-post-content div[style*="fffef9"],
html[data-theme="dark"] .contents div[style*="fffef9"] {
  background: transparent !important;
  color: #c8d6e8 !important;
}

/* 인물탐구 인용 박스 (#f7f3ea) */
html[data-theme="dark"] .board-v4-post-content div[style*="f7f3ea"],
html[data-theme="dark"] .contents div[style*="f7f3ea"] {
  background: rgba(40, 35, 25, .85) !important;
}
html[data-theme="dark"] .board-v4-post-content div[style*="f7f3ea"] p,
html[data-theme="dark"] .contents div[style*="f7f3ea"] p {
  color: #d4c8a8 !important;
}

/* 번호 원형 뱃지 (배경색이 짙은 것은 유지) */

/* 헤더 border-bottom */
html[data-theme="dark"] .board-v4-post-content div[style*="border-bottom: 3px"],
html[data-theme="dark"] .board-v4-post-content div[style*="border-bottom: 2px"],
html[data-theme="dark"] .board-v4-post-content div[style*="border-bottom: 1px"],
html[data-theme="dark"] .contents div[style*="border-bottom: 3px"],
html[data-theme="dark"] .contents div[style*="border-bottom: 2px"],
html[data-theme="dark"] .contents div[style*="border-bottom: 1px"] {
  border-color: #2b425d !important;
}

/* 소제목 색상 (이탤릭 소개글) */
html[data-theme="dark"] .board-v4-post-content p[style*="font-style: italic"][style*="color: #8a7a62"],
html[data-theme="dark"] .contents p[style*="font-style: italic"][style*="color: #8a7a62"] {
  color: #a09480 !important;
}
