/* km-dark.css — 2026-11-03 다크모드 정리
   원인: 07-13 '다크모드 가드'(search.php)가 본문 글자를 #1e293b 로 고정했는데, 09-10 km-design.css 개편으로
   표·카드 배경이 어두워져 결과표 수치·제목이 어두운 배경 위 어두운 글자가 됨. 가드는 제거하고 kd 변수 기준으로 통일.
   페이지가 quirks 모드라 table 이 색을 상속하지 않으므로 표 요소는 색을 직접 지정한다. */
html body.kd-ui.theme-dark{
  --kd-bg:#0f1724;--kd-surface:#162133;--kd-soft:#1f2d44;--kd-line:#2e405a;
  --kd-ink:#e6edf7;--kd-muted:#9fb1c9;--kd-accent:#8fb2ff;--kd-btn:#4361ee;--kd-btn-h:#3651d4;
  --kd-good:#5eead4;--kd-warn:#fcd34d;--kd-bad:#fca5a5;
  color-scheme:dark;background:var(--kd-bg)!important;color:var(--kd-ink)!important;
}

/* ── 본문 글자 ─────────────────────────────────────── */
html body.kd-ui.theme-dark .container.my-4,
html body.kd-ui.theme-dark .container.my-4 h1,html body.kd-ui.theme-dark .container.my-4 h2,
html body.kd-ui.theme-dark .container.my-4 h3,html body.kd-ui.theme-dark .container.my-4 h4,
html body.kd-ui.theme-dark .container.my-4 h5,html body.kd-ui.theme-dark .container.my-4 h6,
html body.kd-ui.theme-dark .container.my-4 .card-title,
html body.kd-ui.theme-dark .container.my-4 label,
html body.kd-ui.theme-dark .container.my-4 .slider-wrap,
html body.kd-ui.theme-dark .container.my-4 .card{color:var(--kd-ink)!important}
html body.kd-ui.theme-dark .container.my-4 .text-muted,
html body.kd-ui.theme-dark .container.my-4 small,
html body.kd-ui.theme-dark .combiner-body .mb-3>div{color:var(--kd-muted)!important}
html body.kd-ui.theme-dark .combiner-body .mb-3>div strong{color:var(--kd-ink)!important}

/* ── 결과표(조회수·입찰가) ─────────────────────────── */
html body.kd-ui.theme-dark .container.my-4 table,
html body.kd-ui.theme-dark .container.my-4 table th,
html body.kd-ui.theme-dark .container.my-4 table td{color:var(--kd-ink);border-color:var(--kd-line)!important}
html body.kd-ui.theme-dark .container.my-4 table th{color:#f1f5fb!important}
html body.kd-ui.theme-dark .container.my-4 table td{font-variant-numeric:tabular-nums}
html body.kd-ui.theme-dark #pcArea .table,html body.kd-ui.theme-dark #mobileArea .table{background:var(--kd-surface)!important}
html body.kd-ui.theme-dark #pcArea .table thead th,html body.kd-ui.theme-dark #mobileArea .table thead th,
html body.kd-ui.theme-dark #pcArea .table tbody th,html body.kd-ui.theme-dark #mobileArea .table tbody th{background:var(--kd-soft)!important}
html body.kd-ui.theme-dark #pcArea .table td,html body.kd-ui.theme-dark #mobileArea .table td{background:var(--kd-surface)}
html body.kd-ui.theme-dark .pos-td{background:#121c2c!important;color:var(--kd-muted)!important}
html body.kd-ui.theme-dark .pos-td.highlight{background:#1d2c47!important;color:#ffffff!important;font-weight:700}
html body.kd-ui.theme-dark .container.my-4 table td:first-child{color:#dbe6f5}
/* 필터 결과표 경쟁률 색은 유지 */
html body.kd-ui.theme-dark .rate-level-1 td:nth-child(5){color:#34d399!important}
html body.kd-ui.theme-dark .rate-level-2 td:nth-child(5){color:#93c5fd!important}
html body.kd-ui.theme-dark .rate-level-3 td:nth-child(5){color:#fbbf24!important}
html body.kd-ui.theme-dark .rate-level-4 td:nth-child(5){color:#fdba74!important}
html body.kd-ui.theme-dark .rate-level-5 td:nth-child(5){color:#f87171!important}
html body.kd-ui.theme-dark #filterTable .text-danger,html body.kd-ui.theme-dark #filterTable [style*="color:red"],
html body.kd-ui.theme-dark #filterTable [style*="color: red"]{color:#fca5a5!important}

/* 표 안 검색 바로가기(PC통합·MO검색·광고·블로그) */
html body.kd-ui.theme-dark .btn-outline-success{background:rgba(16,185,129,.08)!important;border-color:#34d399!important;color:#6ee7b7!important}
html body.kd-ui.theme-dark .btn-outline-success:hover{background:rgba(16,185,129,.2)!important;color:#d1fae5!important}

/* ── 입찰가 그래프 ─────────────────────────────────── */
html body.kd-ui.theme-dark .ko-bid-chart{background:var(--kd-surface)!important;border-color:var(--kd-line)!important;color:var(--kd-ink)!important}
html body.kd-ui.theme-dark .ko-bc-plot{background:repeating-linear-gradient(to top,#2a3a52 0 1px,transparent 1px 25%) 0 26px/100% calc(100% - 26px - 24px) no-repeat}
html body.kd-ui.theme-dark .ko-bc-col small,html body.kd-ui.theme-dark .ko-bc-head span{color:var(--kd-muted)!important}
html body.kd-ui.theme-dark .ko-bc-bar.pc em{color:#93c5fd!important}
html body.kd-ui.theme-dark .ko-bc-bar.mo em{color:#fca5a5!important}

/* ── 저장·내보내기 묶음 ────────────────────────────── */
html body.kd-ui.theme-dark .ko-export-main,html body.kd-ui.theme-dark .ko-bar{background:var(--kd-surface)!important;border-color:var(--kd-line)!important;color:var(--kd-ink)!important}
html body.kd-ui.theme-dark .ko-export-main *:not(button):not(a):not(i),html body.kd-ui.theme-dark .ko-bar *:not(button):not(a):not(i){color:inherit}
html body.kd-ui.theme-dark .ko-export-group{border-top-color:var(--kd-line)!important}
html body.kd-ui.theme-dark .ko-export-group-head{color:var(--kd-ink)!important}
html body.kd-ui.theme-dark .ko-export-group-head span{color:var(--kd-muted)!important}
html body.kd-ui.theme-dark .ko-export-group-head a{color:var(--kd-good)!important}

/* ── 버튼 ─────────────────────────────────────────── */
html body.kd-ui.theme-dark .btn-primary,html body.kd-ui.theme-dark .km-btn-primary{background:var(--kd-btn)!important;border-color:var(--kd-btn)!important;color:#fff!important}
html body.kd-ui.theme-dark .btn-primary:hover,html body.kd-ui.theme-dark .km-btn-primary:hover{background:var(--kd-btn-h)!important;border-color:var(--kd-btn-h)!important}
html body.kd-ui.theme-dark .km-nav-btn-primary{background:var(--kd-btn)!important;color:#fff!important}
html body.kd-ui.theme-dark .km-nav-btn-primary:hover{background:var(--kd-btn-h)!important}
html body.kd-ui.theme-dark #v2PromoBanner a{background:var(--kd-soft)!important;color:var(--kd-accent)!important;border:1px solid var(--kd-line)!important}
html body.kd-ui.theme-dark .combiner-btn-group .btn,
html body.kd-ui.theme-dark .keyword-box .btn-wrap .btn,
html body.kd-ui.theme-dark .combiner-footer .btn,
html body.kd-ui.theme-dark #km-legacy-pager button,html body.kd-ui.theme-dark #km-legacy-pager a,
html body.kd-ui.theme-dark .combiner-close-btn,html body.kd-ui.theme-dark .km-fold-btn,
html body.kd-ui.theme-dark .reset-btn{background-color:var(--kd-soft)!important;color:var(--kd-ink)!important;border:1px solid var(--kd-line)!important}
html body.kd-ui.theme-dark .combiner-btn-group .btn:hover,
html body.kd-ui.theme-dark .keyword-box .btn-wrap .btn:hover,
html body.kd-ui.theme-dark #km-legacy-pager button:hover,html body.kd-ui.theme-dark #km-legacy-pager a:hover{background-color:#2a3c5a!important}
html body.kd-ui.theme-dark .combiner-btn-group .btn-primary{background-color:var(--kd-btn)!important;color:#fff!important}
html body.kd-ui.theme-dark #km-legacy-pager span{color:var(--kd-muted)!important}
html body.kd-ui.theme-dark .keyword-mgmt-btn.delete,html body.kd-ui.theme-dark .keyword-mgmt-btn.delete *{color:#fca5a5!important}

/* ── 입력창 ───────────────────────────────────────── */
html body.kd-ui.theme-dark .form-control,html body.kd-ui.theme-dark .form-select,
html body.kd-ui.theme-dark .container.my-4 input[type=text],html body.kd-ui.theme-dark .container.my-4 input[type=number],
html body.kd-ui.theme-dark .container.my-4 textarea{background:var(--kd-bg)!important;color:var(--kd-ink)!important;border-color:var(--kd-line)!important}
html body.kd-ui.theme-dark .form-control::placeholder,html body.kd-ui.theme-dark textarea::placeholder,
html body.kd-ui.theme-dark input::placeholder{color:#7487a1!important;opacity:1}
html body.kd-ui.theme-dark .form-control:focus,html body.kd-ui.theme-dark textarea:focus,html body.kd-ui.theme-dark input:focus{border-color:var(--kd-accent)!important;box-shadow:0 0 0 3px rgba(143,178,255,.18)!important}
html body.kd-ui.theme-dark #searchForm .col-12>div{background:rgba(245,158,11,.10)!important;border-color:rgba(245,158,11,.35)!important;color:var(--kd-warn)!important}

/* ── 커스텀 키워드·조합기·수집 박스 ───────────────── */
html body.kd-ui.theme-dark #fixedSet .card-title{color:var(--kd-ink)!important}
html body.kd-ui.theme-dark .combiner-options{background:var(--kd-bg)!important;border-color:var(--kd-line)!important}
html body.kd-ui.theme-dark .combiner-option-label{color:var(--kd-ink)!important}
html body.kd-ui.theme-dark .combiner-result{background:var(--kd-bg)!important;color:var(--kd-ink)!important;border-color:var(--kd-line)!important}
html body.kd-ui.theme-dark .combiner-footer{background:var(--kd-surface)!important;border-color:var(--kd-line)!important}
html body.kd-ui.theme-dark .combiner-settings-btn{filter:invert(1) brightness(1.4)}
html body.kd-ui.theme-dark .keyword-list-container{background:var(--kd-bg)!important;color:var(--kd-ink)!important;border-color:var(--kd-line)!important}
html body.kd-ui.theme-dark .keyword-header,html body.kd-ui.theme-dark .keyword-box label{color:var(--kd-ink)!important}

/* ── 기타 ─────────────────────────────────────────── */
html body.kd-ui.theme-dark .container.my-4 a:not(.btn):not(.km-ad-card):not([class*="km-nav"]){color:var(--kd-accent)}
html body.kd-ui.theme-dark .km-ad-strip{background:var(--kd-surface)!important;border-color:var(--kd-line)!important}
html body.kd-ui.theme-dark .km-ad-strip-title{color:var(--kd-muted)!important}
html body.kd-ui.theme-dark .km-ad-card{background:var(--kd-soft)!important;border-color:var(--kd-line)!important}
html body.kd-ui.theme-dark .rate-legend{color:var(--kd-muted)!important}
