/* 다크 모드: <html class="dark"> 일 때 사이트에서 쓰는 Tailwind 색상 클래스를 덮어씀
   (Tailwind CDN 의 hover 규칙보다 우선하도록 .dark 를 앞에 붙여 우선순위를 높임) */

html.dark { color-scheme: dark; }

/* 배경 */
.dark .bg-gray-50 { background-color: #0d1219; }
.dark .bg-white { background-color: #161c27; }
.dark .bg-white\/80 { background-color: rgb(22 28 39 / 0.85); }
.dark .bg-gray-100 { background-color: #222a37; }
.dark .bg-gray-100\/80 { background-color: rgb(34 42 55 / 0.85); }
.dark .bg-gray-200 { background-color: #2c3544; }
.dark main .bg-gray-50,
.dark section .bg-gray-50,
.dark [data-checklist] { background-color: #1b2230; }
.dark .hover\:bg-gray-50:hover,
.dark .hover\:bg-white:hover,
.dark .hover\:bg-white\/60:hover { background-color: #222a37; }
.dark .hover\:bg-gray-100:hover,
.dark .hover\:bg-gray-200\/70:hover { background-color: #2c3544; }

/* 강조(검정 버튼/활성 탭)는 밝게 뒤집기 */
.dark .bg-gray-900 { background-color: #e8eaee; }
.dark .bg-gray-900.text-white,
.dark .bg-gray-900 .text-white { color: #111827; }
.dark .bg-gray-900 .text-gray-300 { color: #4b5563; }
.dark .hover\:bg-gray-800:hover,
.dark .hover\:bg-gray-900:hover { background-color: #cfd3da; }
.dark .hover\:bg-gray-900:hover.hover\:text-white,
.dark .hover\:text-white:hover { color: #111827; }
.dark .border-gray-900,
.dark .hover\:border-gray-900:hover { border-color: #e8eaee; }
.dark .border-gray-700 { border-color: #cfd3da; }
.dark .disabled\:bg-gray-300:disabled { background-color: #3a4352; }

/* 글자 */
.dark .text-gray-900,
.dark .text-black,
.dark .hover\:text-gray-900:hover,
.dark .hover\:text-black:hover,
.dark .peer:checked ~ .peer-checked\:text-gray-900 { color: #f1f3f5; }
.dark .text-gray-800 { color: #e5e7eb; }
.dark .text-gray-700,
.dark .hover\:text-gray-700:hover { color: #d1d5db; }
.dark .text-gray-600,
.dark .hover\:text-gray-600:hover { color: #b9c0ca; }
.dark .text-gray-500 { color: #9aa3af; }
.dark .text-gray-400,
.dark .marker\:text-gray-400 ::marker { color: #7f8896; }
.dark .text-gray-300 { color: #687180; }

/* 제목 그라데이션 글자 */
.dark .bg-clip-text { background-image: linear-gradient(to right, #f9fafb, #ffffff, #f9fafb); }

/* 테두리 */
.dark .border-gray-100,
.dark .border-gray-200,
.dark .border-gray-200\/40,
.dark .border-gray-200\/50,
.dark .border-gray-200\/70,
.dark .peer:checked ~ .peer-checked\:border-gray-200 { border-color: #2a3241; }
.dark .border-gray-300 { border-color: #3a4352; }
.dark .divide-gray-200 > :not([hidden]) ~ :not([hidden]) { border-color: #2a3241; }
.dark .peer:checked ~ .peer-checked\:bg-white { background-color: #2c3544; }

/* 폼 */
.dark input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.dark select,
.dark textarea { background-color: #161c27; color: #f1f3f5; }
.dark .accent-gray-900 { accent-color: #e8eaee; }
.dark .focus\:ring-gray-900:focus,
.dark .ring-gray-900 { --tw-ring-color: #e8eaee; }

/* 색 강조 (안내 상자, 배지) */
.dark .bg-blue-50 { background-color: rgb(59 130 246 / 0.14); }
.dark .border-blue-200 { border-color: rgb(59 130 246 / 0.4); }
.dark .text-blue-900, .dark .text-blue-600 { color: #bfdbfe; }
.dark .bg-amber-50, .dark .bg-amber-50\/70 { background-color: rgb(245 158 11 / 0.14); }
.dark .border-amber-200, .dark .border-amber-200\/80 { border-color: rgb(245 158 11 / 0.4); }
.dark .text-amber-900, .dark .text-amber-600 { color: #fde68a; }
.dark .bg-green-50 { background-color: rgb(34 197 94 / 0.14); }
.dark .border-green-200, .dark .border-green-300 { border-color: rgb(34 197 94 / 0.4); }
.dark .text-green-700, .dark .text-green-600, .dark .text-green-800 { color: #bbf7d0; }
.dark .bg-red-50, .dark .hover\:bg-red-50:hover { background-color: rgb(239 68 68 / 0.14); }
.dark .border-red-100, .dark .border-red-200, .dark .border-red-300 { border-color: rgb(239 68 68 / 0.4); }
.dark .text-red-600, .dark .text-red-400 { color: #fca5a5; }
.dark .text-red-800, .dark .hover\:text-red-800:hover { color: #fecaca; }

/* 테마 전환 버튼 아이콘 */
.theme-icon-sun { display: none; }
.dark .theme-icon-sun { display: inline; }
.dark .theme-icon-moon { display: none; }

/* 검색 결과 하이라이트 */
.dark mark { background-color: rgb(250 204 21 / 0.25); color: #fef08a; }
