/* ================================================================
   WW-DARKMODE.CSS  — v1.0
   전역 다크모드 시스템 (모든 페이지 공통)
   로딩 순서: 모든 CSS 파일 맨 마지막에 로드 → 최고 우선순위
   ================================================================ */

/* ── 전환 차단 (FOUC 방지) ─────────────────────────────────────── */
.ww-no-transition *,
.ww-no-transition *::before,
.ww-no-transition *::after {
  transition: none !important;
  animation-duration: 0.001ms !important;
}

/* ── 페이지 전환 애니메이션 ────────────────────────────────────── */
@keyframes ww-page-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
body {
  animation: ww-page-in 0.38s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

/* ── 테마 전환 부드럽게 ────────────────────────────────────────── */
body,
.site-header,
.site-header--gng,
.ww-hdr,
.site-footer,
.site-footer--gng,
main,
.card,
.modal-content,
.dropdown-menu,
.list-group-item,
.form-control,
.form-select,
.accordion-item,
.accordion-button,
.table,
.wwb-svc-card,
.wwb-pf-card,
.wwb-faq-item,
.wwb-trust-card,
.wwb-why-card,
.wwb-step-card,
.wwb-hero,
.wwb-sec {
  transition:
    background-color 0.3s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.3s ease !important;
}

/* ── color-scheme — 기본: 라이트 ──────────────────────────────── */
:root { color-scheme: light; }
[data-theme="light"] { color-scheme: light; }
[data-theme="dark"]  { color-scheme: dark; }

/* ── 라이트 모드 명시 기본값 (OS 다크모드 간섭 차단) ─────────── */
[data-theme="light"] body {
  background-color: #ffffff;
  color: #0a1525;
}
[data-theme="light"] main,
[data-theme="light"] #main,
[data-theme="light"] .main-wrap {
  background: #ffffff;
}

/* ================================================================
   ① BODY / BASE
   ================================================================ */
[data-theme="dark"] body {
  background-color: #0f1623 !important;
  color: #e2e8f0 !important;
}
[data-theme="dark"] main { background: #0f1623; }
[data-theme="dark"] #main { background: #0f1623; }
[data-theme="dark"] .main-wrap { background: #0f1623; }
[data-theme="dark"] hr { border-color: rgba(255,255,255,.1); opacity: 1; }
[data-theme="dark"] a { color: #60a5fa; }
[data-theme="dark"] a:hover { color: #93c5fd; }

/* ── 제목 ── */
[data-theme="dark"] h1,[data-theme="dark"] h2,[data-theme="dark"] h3,
[data-theme="dark"] h4,[data-theme="dark"] h5,[data-theme="dark"] h6 {
  color: #f0f4ff;
}
[data-theme="dark"] p { color: #94a3b8; }

/* ================================================================
   ② Bootstrap 컴포넌트 완전 다크
   ================================================================ */

/* ── Card ── */
[data-theme="dark"] .card {
  background: #141c2e !important;
  border-color: rgba(255,255,255,.08) !important;
  color: #e2e8f0;
}
[data-theme="dark"] .card-header {
  background: rgba(255,255,255,.03) !important;
  border-color: rgba(255,255,255,.08) !important;
  color: #f0f4ff;
}
[data-theme="dark"] .card-footer {
  background: rgba(255,255,255,.02) !important;
  border-color: rgba(255,255,255,.08) !important;
  color: #94a3b8;
}
[data-theme="dark"] .card-title { color: #f0f4ff; }
[data-theme="dark"] .card-text  { color: #94a3b8; }
[data-theme="dark"] .card-subtitle { color: #64748b; }

/* ── Modal ── */
[data-theme="dark"] .modal-content {
  background: #141c2e;
  border-color: rgba(255,255,255,.1);
  color: #e2e8f0;
}
[data-theme="dark"] .modal-header { border-color: rgba(255,255,255,.08); }
[data-theme="dark"] .modal-footer { border-color: rgba(255,255,255,.08); }
[data-theme="dark"] .modal-title  { color: #f0f4ff; }
[data-theme="dark"] .modal-backdrop { background: rgba(0,0,0,.7); }
[data-theme="dark"] .btn-close {
  filter: invert(1) grayscale(1) brightness(2);
}

/* ── Dropdown ── */
[data-theme="dark"] .dropdown-menu {
  background: #141c2e;
  border-color: rgba(255,255,255,.1);
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
}
[data-theme="dark"] .dropdown-item { color: #cbd5e1; }
[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
  background: rgba(59,130,246,.15);
  color: #60a5fa;
}
[data-theme="dark"] .dropdown-item.active,
[data-theme="dark"] .dropdown-item:active {
  background: #3b82f6;
  color: #fff;
}
[data-theme="dark"] .dropdown-divider { border-color: rgba(255,255,255,.08); }
[data-theme="dark"] .dropdown-header { color: #64748b; }

/* ── Forms ── */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background-color: #0f1623 !important;
  border-color: rgba(255,255,255,.12) !important;
  color: #e2e8f0 !important;
}
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
  background-color: #0f1623 !important;
  border-color: #3b82f6 !important;
  color: #e2e8f0 !important;
  box-shadow: 0 0 0 0.2rem rgba(59,130,246,.25) !important;
}
[data-theme="dark"] .form-control::placeholder { color: #4b5563; }
[data-theme="dark"] .form-label  { color: #94a3b8; }
[data-theme="dark"] .form-text   { color: #64748b; }
[data-theme="dark"] .form-control:disabled,
[data-theme="dark"] .form-select:disabled {
  background: #1a2236 !important;
  color: #64748b !important;
}
[data-theme="dark"] .input-group-text {
  background: #1a2236;
  border-color: rgba(255,255,255,.12);
  color: #94a3b8;
}
[data-theme="dark"] .form-check-input {
  background-color: #1a2236;
  border-color: rgba(255,255,255,.2);
}
[data-theme="dark"] .form-check-input:checked {
  background-color: #3b82f6;
  border-color: #3b82f6;
}
[data-theme="dark"] .form-check-label { color: #94a3b8; }
[data-theme="dark"] select option { background: #141c2e; color: #e2e8f0; }

/* ── Table ── */
[data-theme="dark"] .table {
  color: #e2e8f0;
  border-color: rgba(255,255,255,.07);
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(255,255,255,.025);
  --bs-table-hover-bg: rgba(59,130,246,.08);
  --bs-table-border-color: rgba(255,255,255,.07);
  --bs-table-color: #e2e8f0;
}
[data-theme="dark"] .table > :not(caption) > * > * {
  border-bottom-color: rgba(255,255,255,.06);
  background: transparent;
}
[data-theme="dark"] thead th,
[data-theme="dark"] .table > thead {
  background: #141c2e !important;
  color: #94a3b8;
  border-bottom-color: rgba(255,255,255,.1);
}
[data-theme="dark"] .table-bordered > :not(caption) > * > * {
  border-color: rgba(255,255,255,.07);
}

/* ── Buttons ── */
[data-theme="dark"] .btn-light {
  background: #1e2a40 !important;
  border-color: rgba(255,255,255,.1) !important;
  color: #e2e8f0 !important;
}
[data-theme="dark"] .btn-light:hover {
  background: #253450 !important;
  color: #fff !important;
}
[data-theme="dark"] .btn-white {
  background: #1e2a40;
  border-color: rgba(255,255,255,.15);
  color: #e2e8f0;
}
[data-theme="dark"] .btn-outline-secondary {
  border-color: rgba(255,255,255,.2);
  color: #94a3b8;
}
[data-theme="dark"] .btn-outline-secondary:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}
[data-theme="dark"] .btn-outline-dark {
  border-color: #e2e8f0;
  color: #e2e8f0;
}
[data-theme="dark"] .btn-outline-dark:hover {
  background: #e2e8f0;
  color: #0f1623;
}
[data-theme="dark"] .btn-outline-light {
  border-color: rgba(255,255,255,.25);
  color: #cbd5e1;
}
[data-theme="dark"] .btn-outline-light:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}

/* ── Alert ── */
[data-theme="dark"] .alert-light {
  background: #1a2236;
  border-color: rgba(255,255,255,.08);
  color: #e2e8f0;
}
[data-theme="dark"] .alert-secondary {
  background: rgba(100,116,139,.15);
  border-color: rgba(100,116,139,.3);
  color: #94a3b8;
}
[data-theme="dark"] .alert-info {
  background: rgba(14,116,144,.18);
  border-color: rgba(14,116,144,.35);
  color: #67e8f9;
}
[data-theme="dark"] .alert-warning {
  background: rgba(161,98,7,.18);
  border-color: rgba(161,98,7,.35);
  color: #fcd34d;
}
[data-theme="dark"] .alert-danger {
  background: rgba(185,28,28,.18);
  border-color: rgba(185,28,28,.35);
  color: #fca5a5;
}
[data-theme="dark"] .alert-success {
  background: rgba(5,150,105,.18);
  border-color: rgba(5,150,105,.35);
  color: #6ee7b7;
}

/* ── Badge ── */
[data-theme="dark"] .badge.bg-light,
[data-theme="dark"] .badge.text-bg-light {
  background: #1e2a40 !important;
  color: #94a3b8 !important;
}
[data-theme="dark"] .badge.bg-secondary { background: #374151 !important; }
[data-theme="dark"] .badge.bg-dark { background: #1a2236 !important; color: #e2e8f0 !important; }

/* ── List group ── */
[data-theme="dark"] .list-group-item {
  background: #141c2e;
  border-color: rgba(255,255,255,.08);
  color: #e2e8f0;
}
[data-theme="dark"] .list-group-item.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}
[data-theme="dark"] .list-group-item-action:hover,
[data-theme="dark"] .list-group-item-action:focus {
  background: #1a2236;
  color: #e2e8f0;
}

/* ── Nav tabs / pills ── */
[data-theme="dark"] .nav-tabs { border-color: rgba(255,255,255,.1); }
[data-theme="dark"] .nav-tabs .nav-link {
  color: #94a3b8;
  border-color: transparent;
}
[data-theme="dark"] .nav-tabs .nav-link:hover {
  border-color: rgba(255,255,255,.08) rgba(255,255,255,.08) transparent;
  color: #e2e8f0;
}
[data-theme="dark"] .nav-tabs .nav-link.active {
  background: #141c2e;
  border-color: rgba(255,255,255,.1) rgba(255,255,255,.1) #141c2e;
  color: #60a5fa;
}
[data-theme="dark"] .nav-pills .nav-link { color: #94a3b8; }
[data-theme="dark"] .nav-pills .nav-link.active {
  background: #3b82f6;
  color: #fff;
}
[data-theme="dark"] .nav-underline .nav-link { color: #94a3b8; }
[data-theme="dark"] .nav-underline .nav-link.active { color: #60a5fa; }

/* ── Accordion ── */
[data-theme="dark"] .accordion-item {
  background: #141c2e;
  border-color: rgba(255,255,255,.08);
}
[data-theme="dark"] .accordion-button {
  background: #141c2e;
  color: #e2e8f0;
}
[data-theme="dark"] .accordion-button:not(.collapsed) {
  background: #1a2236;
  color: #60a5fa;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.06);
}
[data-theme="dark"] .accordion-button::after {
  filter: invert(1) grayscale(1) brightness(2);
}
[data-theme="dark"] .accordion-body {
  background: #141c2e;
  color: #94a3b8;
}

/* ── Pagination ── */
[data-theme="dark"] .page-link {
  background: #141c2e;
  border-color: rgba(255,255,255,.08);
  color: #94a3b8;
}
[data-theme="dark"] .page-link:hover {
  background: #1a2236;
  color: #60a5fa;
  border-color: rgba(59,130,246,.35);
}
[data-theme="dark"] .page-item.active .page-link {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}
[data-theme="dark"] .page-item.disabled .page-link {
  background: #0f1623;
  color: #374151;
  border-color: rgba(255,255,255,.05);
}

/* ── Breadcrumb ── */
[data-theme="dark"] .breadcrumb-item { color: #94a3b8; }
[data-theme="dark"] .breadcrumb-item + .breadcrumb-item::before { color: #4b5563; }
[data-theme="dark"] .breadcrumb-item a { color: #60a5fa; }
[data-theme="dark"] .breadcrumb-item.active { color: #64748b; }

/* ── Progress ── */
[data-theme="dark"] .progress { background: #1a2236; }

/* ── Tooltip ── */
[data-theme="dark"] .tooltip-inner {
  background: #e2e8f0;
  color: #0f1623;
}

/* ── Popover ── */
[data-theme="dark"] .popover {
  background: #141c2e;
  border-color: rgba(255,255,255,.1);
}
[data-theme="dark"] .popover-header {
  background: #1a2236;
  border-color: rgba(255,255,255,.08);
  color: #f0f4ff;
}
[data-theme="dark"] .popover-body { color: #94a3b8; }

/* ── Offcanvas ── */
[data-theme="dark"] .offcanvas {
  background: #141c2e;
  color: #e2e8f0;
}
[data-theme="dark"] .offcanvas-header { border-color: rgba(255,255,255,.08); }
[data-theme="dark"] .offcanvas-title { color: #f0f4ff; }

/* ── Spinners ── */
[data-theme="dark"] .spinner-border { color: #3b82f6; }

/* ── Utility overrides ── */
[data-theme="dark"] .text-dark     { color: #e2e8f0 !important; }
[data-theme="dark"] .text-body     { color: #e2e8f0 !important; }
[data-theme="dark"] .text-muted    { color: #64748b !important; }
[data-theme="dark"] .text-secondary{ color: #94a3b8 !important; }
[data-theme="dark"] .text-black    { color: #f0f4ff !important; }
[data-theme="dark"] .text-black-50 { color: rgba(240,244,255,.5) !important; }
[data-theme="dark"] .bg-white      { background-color: #141c2e !important; }
[data-theme="dark"] .bg-light      { background-color: #1a2236 !important; }
[data-theme="dark"] .bg-body       { background-color: #0f1623 !important; }
[data-theme="dark"] .bg-body-secondary { background-color: #141c2e !important; }
[data-theme="dark"] .bg-body-tertiary  { background-color: #1a2236 !important; }
[data-theme="dark"] .border,
[data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom,
[data-theme="dark"] .border-start,
[data-theme="dark"] .border-end   { border-color: rgba(255,255,255,.09) !important; }
[data-theme="dark"] .shadow        { box-shadow: 0 4px 24px rgba(0,0,0,.5) !important; }
[data-theme="dark"] .shadow-sm     { box-shadow: 0 2px 10px rgba(0,0,0,.4) !important; }
[data-theme="dark"] .shadow-lg     { box-shadow: 0 12px 48px rgba(0,0,0,.55) !important; }

/* ── Sub-page layout ── */
[data-theme="dark"] .page-sub,
[data-theme="dark"] .page-wrap,
[data-theme="dark"] .content-wrap,
[data-theme="dark"] .sub-wrap { background: var(--ww-bg-alt); color: var(--ww-text); }
[data-theme="dark"] .sub-visual { background: linear-gradient(135deg,#0b1120,#0f1829); }
[data-theme="dark"] .sub-visual-title,
[data-theme="dark"] .sub-visual h1,
[data-theme="dark"] .sub-visual h2 { color: #f0f4ff; }

/* ── Board (게시판) ── */
[data-theme="dark"] .board-wrap,
[data-theme="dark"] .bbs-wrap { background: #0f1623; }
[data-theme="dark"] .board-table-wrap { background: #141c2e; }
[data-theme="dark"] .board-table th {
  background: #1a2236 !important;
  color: #94a3b8;
  border-color: rgba(255,255,255,.08);
}
[data-theme="dark"] .board-table td {
  color: #e2e8f0;
  border-color: rgba(255,255,255,.06);
}
[data-theme="dark"] .board-table tr:hover td { background: rgba(59,130,246,.07); }
[data-theme="dark"] .board-title a { color: #e2e8f0; }
[data-theme="dark"] .board-title a:hover { color: #60a5fa; }
[data-theme="dark"] .board-view-wrap { background: #141c2e; }
[data-theme="dark"] .board-view-title { color: #f0f4ff; }
[data-theme="dark"] .board-view-info { color: #64748b; }
[data-theme="dark"] .board-view-content { color: #e2e8f0; }
[data-theme="dark"] .board-search .form-control { background: #0f1623; border-color: rgba(255,255,255,.12); color: #e2e8f0; }

/* ── Page content area ── */
[data-theme="dark"] .page-content { background: #0f1623; color: #e2e8f0; }
[data-theme="dark"] .page-content h1,[data-theme="dark"] .page-content h2,
[data-theme="dark"] .page-content h3,[data-theme="dark"] .page-content h4 { color: #f0f4ff; }
[data-theme="dark"] .page-content p,
[data-theme="dark"] .page-content li { color: #94a3b8; }
[data-theme="dark"] .page-content table th {
  background: #1a2236 !important;
  color: #94a3b8;
  border-color: rgba(255,255,255,.08);
}
[data-theme="dark"] .page-content table td {
  color: #e2e8f0;
  border-color: rgba(255,255,255,.07);
}
[data-theme="dark"] .page-content blockquote {
  border-left-color: #3b82f6;
  background: rgba(59,130,246,.08);
  color: #94a3b8;
}
[data-theme="dark"] .page-content code {
  background: #1a2236;
  color: #60a5fa;
}
[data-theme="dark"] .page-content pre {
  background: #0b1120;
  border-color: rgba(255,255,255,.08);
}

/* ── GNG Board/BBS specific ── */
[data-theme="dark"] .gw-bbs-list-wrap,
[data-theme="dark"] .gw-bbs-view-wrap,
[data-theme="dark"] .bbs-list-table,
[data-theme="dark"] .bbs-view-head { background: #141c2e; }
[data-theme="dark"] .bbs-list-table td,
[data-theme="dark"] .bbs-list-table th { border-color: rgba(255,255,255,.07); }

/* ── Sidebar ── */
[data-theme="dark"] .sidebar { background: #141c2e; border-color: rgba(255,255,255,.08); }
[data-theme="dark"] .sidebar-title { color: #f0f4ff; }
[data-theme="dark"] .sidebar-item { color: #94a3b8; border-color: rgba(255,255,255,.06); }
[data-theme="dark"] .sidebar-item:hover { color: #60a5fa; background: rgba(59,130,246,.08); }
[data-theme="dark"] .sidebar-item.active { color: #60a5fa; border-left-color: #3b82f6; }

/* ── 게시판 쓰기 폼 ── */
[data-theme="dark"] .board-write-wrap { background: #141c2e; }
[data-theme="dark"] .board-write-form label { color: #94a3b8; }
[data-theme="dark"] .board-write-form input,
[data-theme="dark"] .board-write-form textarea,
[data-theme="dark"] .board-write-form select {
  background: #0f1623 !important;
  border-color: rgba(255,255,255,.12) !important;
  color: #e2e8f0 !important;
}

/* ── 포트폴리오 ── */
[data-theme="dark"] .portfolio-wrap,
[data-theme="dark"] .pf-grid { background: #0f1623; }
[data-theme="dark"] .pf-item,
[data-theme="dark"] .portfolio-item {
  background: #141c2e;
  border-color: rgba(255,255,255,.07);
}
[data-theme="dark"] .pf-item:hover,
[data-theme="dark"] .portfolio-item:hover {
  border-color: rgba(59,130,246,.3);
  box-shadow: 0 16px 48px rgba(0,0,0,.4);
}
[data-theme="dark"] .pf-title,
[data-theme="dark"] .portfolio-title { color: #f0f4ff; }
[data-theme="dark"] .pf-desc,
[data-theme="dark"] .portfolio-desc { color: #94a3b8; }
[data-theme="dark"] .pf-category { color: #60a5fa; }

/* ── 공통 섹션 배경 ── */
[data-theme="dark"] .section { background: #0f1623; }
[data-theme="dark"] .section--alt { background: #141c2e; }
[data-theme="dark"] .section--soft { background: #111827; }
[data-theme="dark"] section { background: transparent; }

/* ================================================================
   ③ 다크모드 토글 버튼 (헤더용)
   ================================================================ */

/* 구버전 모바일 전용 버튼 — 완전 제거 (head.php HTML에서도 제거됨) */
.ww-darkmode-btn--mobile {
  display: none !important;
}

.ww-darkmode-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,0,0,.12);
  background: rgba(0,0,0,.04);
  color: #374151;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease !important;
  padding: 0;
}
.ww-darkmode-btn:hover {
  background: rgba(37,99,235,.08);
  border-color: rgba(37,99,235,.3);
  transform: rotate(12deg);
}
.ww-darkmode-btn .ww-dm-icon-sun,
.ww-darkmode-btn .ww-dm-icon-moon {
  position: absolute;
  font-size: 1rem;
  line-height: 1;
  transition: opacity 0.22s, transform 0.28s cubic-bezier(0.34,1.56,0.64,1) !important;
}
/* 라이트모드: 달 표시 */
.ww-darkmode-btn .ww-dm-icon-moon { opacity: 1; transform: scale(1) rotate(0deg); }
.ww-darkmode-btn .ww-dm-icon-sun  { opacity: 0; transform: scale(0.4) rotate(90deg); }
/* 다크모드: 해 표시 */
[data-theme="dark"] .ww-darkmode-btn .ww-dm-icon-moon { opacity: 0; transform: scale(0.4) rotate(-90deg); }
[data-theme="dark"] .ww-darkmode-btn .ww-dm-icon-sun  { opacity: 1; transform: scale(1) rotate(0deg); }
[data-theme="dark"] .ww-darkmode-btn {
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: #94a3b8;
}
[data-theme="dark"] .ww-darkmode-btn:hover {
  background: rgba(59,130,246,.15);
  border-color: rgba(59,130,246,.4);
  color: #60a5fa;
}

/* ================================================================
   ④ Phosphor Icons 통합 (data-ph 속성)
   ================================================================ */
.ph-icon {
  display: inline-block;
  line-height: 1;
  vertical-align: middle;
}

/* ================================================================
   ⑤ 고품질 애니메이션 시스템
   ================================================================ */

/* 스크롤 리빌 기본 */
.wwb-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16,1,.3,1), transform 0.7s cubic-bezier(0.16,1,.3,1);
  will-change: opacity, transform;
}
.wwb-reveal.is-visible { opacity: 1; transform: none; }

/* 리빌 딜레이 클래스 */
.wwb-reveal--delay-1 { transition-delay: 0.08s; }
.wwb-reveal--delay-2 { transition-delay: 0.16s; }
.wwb-reveal--delay-3 { transition-delay: 0.24s; }
.wwb-reveal--delay-4 { transition-delay: 0.32s; }
.wwb-reveal--delay-5 { transition-delay: 0.40s; }

.wwb-reveal--from-left {
  transform: translateX(-48px);
}
.wwb-reveal--from-right {
  transform: translateX(48px);
}
.wwb-reveal--from-left.is-visible,
.wwb-reveal--from-right.is-visible { transform: none; }

/* 카운터 애니메이션 트리거 */
.wwb-count-init {
  opacity: 0;
  transition: opacity 0.5s;
}
.wwb-count-init.is-visible { opacity: 1; }

/* ================================================================
   ⑥ 다크모드 시 네이티브 input 개선
   ================================================================ */
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] input[type="url"],
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background-color: #0f1623;
  border-color: rgba(255,255,255,.12);
  color: #e2e8f0;
  color-scheme: dark;
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder { color: #4b5563; }

/* ================================================================
   ⑦ 스크롤바 다크모드
   ================================================================ */
[data-theme="dark"] {
  scrollbar-color: #2d3f5f #0f1623;
  scrollbar-width: thin;
}
[data-theme="dark"] ::-webkit-scrollbar { width: 7px; height: 7px; }
[data-theme="dark"] ::-webkit-scrollbar-track { background: #0f1623; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #2d3f5f; border-radius: 4px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #3b82f6; }

/* ================================================================
   ⑧ 다크모드 로고 보정 (필요시 filter 주석 해제)
   ================================================================ */
/* [data-theme="dark"] .brand-logo[src*="logo.svg"] { filter: brightness(0) invert(1); } */

/* ================================================================
   ⑨ 푸터 ftg-* 다크모드 (ww-tokens.css 토큰 cascade로 대부분 자동)
   ================================================================ */
[data-theme="dark"] .site-footer {
  /* --ww-bg-alt, --ww-border 는 ww-tokens.css [data-theme="dark"]에서 자동 처리 */
  border-top-color: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .ftg-chip {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.07);
}
[data-theme="dark"] .ftg-chip:hover {
  background: rgba(16, 87, 245, 0.12);
  border-color: rgba(16, 87, 245, 0.35);
}
[data-theme="dark"] .ftg-chip-icon {
  background: rgba(16, 87, 245, 0.18);
}
[data-theme="dark"] .ftg-chip-label > span:last-child {
  color: rgba(238, 243, 255, 0.88);
}
[data-theme="dark"] .ftg-sns-link {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(238, 243, 255, 0.6);
}
[data-theme="dark"] .ftg-bizno-link {
  background: rgba(16, 87, 245, 0.15);
}
[data-theme="dark"] .ftg-bottom {
  border-top-color: rgba(255, 255, 255, 0.06);
}

/* 전환 트랜지션 추가 */
.site-footer,
.ftg-chip,
.ftg-sns-link {
  transition: background-color 0.3s ease, border-color 0.25s ease, color 0.25s ease !important;
}

/* ================================================================
   ⑩ 인쇄 미디어 (다크모드 무시)
   ================================================================ */
@media print {
  [data-theme="dark"] body { background: #fff !important; color: #000 !important; }
  [data-theme="dark"] * { background: transparent !important; color: #000 !important; }
}
