/* ─────────────────────────────────────────
   ailit — AI 리터러시 통합 교육 플랫폼
   Shared Stylesheet  v1.0  2026.06
   Font: Pretendard (CDN)
───────────────────────────────────────── */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

/* ── 변수 ── */
:root {
  --navy:       #1E3A6E;
  --navy-mid:   #2D5492;
  --blue:       #3B82F6;
  --bg-light:   #EFF6FF;
  --bg-green:   #F0FDF4;
  --orange:     #F97316;
  --dark:       #1C2340;
  --gray:       #64748B;
  --gray-light: #94A3B8;
  --gray-border:#E2E8F0;
  --teal:       #0D9488;
  --green:      #059669;
  --amber:      #D97706;
  --red:        #DC2626;
  --white:      #FFFFFF;

  --radius:     14px;
  --radius-sm:  8px;
  --shadow:     0 2px 16px rgba(30,58,110,.08);
  --shadow-hover:0 8px 36px rgba(30,58,110,.14);
  --transition: all .22s ease;
  --max-w:      1100px;
  --header-h:   64px;
}

/* ── 리셋 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', sans-serif;
  font-size: 14pt; line-height: 1.65;
  color: var(--dark); background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── 헤더 / 네비게이션 ── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-border);
  height: var(--header-h);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto; padding: 0 24px;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: inline-flex; align-items: center; justify-content: center;
  height: 50px; padding: 0 8px;
  background: #05070A; border-radius: 6px;
}
.nav-logo img {
  width: 150px; height: auto; display: block;
}
.nav-logo span { color: var(--orange); }
.nav-links {
  display: flex; gap: 8px; align-items: center;
}
.nav-links a {
  padding: 6px 14px; border-radius: 100px;
  font-size: 14px; font-weight: 500; color: var(--gray);
  transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  background: var(--bg-light); color: var(--navy); font-weight: 600;
}
.nav-links a.nav-cta {
  background: var(--navy); color: var(--white);
  padding: 6px 18px; font-weight: 600;
}
.nav-links a.nav-cta:hover { background: var(--navy-mid); }
/* 햄버거 */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  width: 36px; height: 36px; align-items: center; justify-content: center;
  cursor: pointer; background: none; border: none;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--dark); border-radius: 2px; transition: var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* 모바일 메뉴 */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--white);
  border-bottom: 1px solid var(--gray-border);
  padding: 12px 24px 20px;
  gap: 4px;
}
.mobile-menu a {
  padding: 12px 0; font-size: 16px; font-weight: 500;
  color: var(--dark); border-bottom: 1px solid var(--gray-border);
  display: block;
}
.mobile-menu a.nav-cta {
  margin-top: 8px; background: var(--navy); color: var(--white);
  padding: 12px 20px; border-radius: var(--radius-sm);
  border: none; text-align: center;
}
.mobile-menu.open { display: flex; }

/* ── 레이아웃 유틸 ── */
.container {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
}
.section { padding: 80px 0; }
.section-sm { padding: 56px 0; }

/* ── 타이포그래피 ── */
.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--orange);
  margin-bottom: 12px;
}
.eyebrow.teal   { color: var(--teal); }
.eyebrow.blue   { color: var(--blue); }
.eyebrow.green  { color: var(--green); }
.eyebrow.navy   { color: var(--navy); }

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800; line-height: 1.25;
  color: var(--dark); letter-spacing: -.5px;
}
.section-sub {
  font-size: 16px; color: var(--gray);
  margin-top: 12px; max-width: 600px;
}
.section-sub.wide { max-width: 820px; }

/* ── 히어로 (다크 네이비) ── */
.hero {
  background: var(--navy);
  padding: 96px 0 80px;
  position: relative; overflow: hidden;
}
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 50%;
  background: var(--navy-mid);
}
.hero::before { width: 420px; height: 420px; top: -120px; right: -80px; opacity: .4; }
.hero::after  { width: 280px; height: 280px; bottom: -100px; left: -60px; opacity: .28; }
.hero-content { position: relative; z-index: 1; }
.hero-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--orange);
  margin-bottom: 20px; display: block;
}
.hero-title {
  font-size: clamp(36px, 6vw, 58px);
  font-weight: 900; line-height: 1.18;
  color: var(--white); letter-spacing: -.8px;
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 18px; color: #CADCFC;
  margin-bottom: 40px; max-width: 560px; line-height: 1.7;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* 서브 히어로 (코스 페이지용) */
.hero-sub-page {
  background: var(--navy);
  padding: 72px 0 64px;
  position: relative; overflow: hidden;
}
.hero-sub-page::before {
  content: ''; position: absolute; border-radius: 50%;
  background: var(--navy-mid); opacity: .35;
  width: 320px; height: 320px; top: -80px; right: -60px;
}
.hero-sub-page .hero-content { position: relative; z-index: 1; }
.hero-badge {
  display: inline-block;
  padding: 5px 14px; border-radius: 100px;
  font-size: 12px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

/* ── 버튼 ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 13px 26px; border-radius: 100px;
  font-size: 15px; font-weight: 600;
  cursor: pointer; transition: var(--transition); border: none;
}
.btn-primary {
  background: var(--orange); color: var(--white);
}
.btn-primary:hover { background: #ea6c0a; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(249,115,22,.4); }
.btn-secondary {
  background: rgba(255,255,255,.15); color: var(--white);
  border: 1.5px solid rgba(255,255,255,.35);
}
.btn-secondary:hover { background: rgba(255,255,255,.25); }
.btn-outline {
  background: transparent; color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-sm { padding: 9px 18px; font-size: 13px; }

/* ── 카드 ── */
.card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--gray-border);
  box-shadow: var(--shadow); padding: 28px;
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

/* ── 학년 티어 카드 ── */
.tier-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px; margin-top: 48px;
}
.tier-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--gray-border);
  box-shadow: var(--shadow);
  overflow: hidden; transition: var(--transition);
  display: flex; flex-direction: column;
}
.tier-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.tier-card-bar { height: 5px; }
.tier-card-body { padding: 24px 22px; flex: 1; }
.tier-card-label { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 6px; }
.tier-card-tag { font-size: 20px; font-weight: 800; line-height: 1.2; margin-bottom: 14px; }
.tier-divider { border: none; border-top: 1px solid var(--gray-border); margin: 14px 0; }
.tier-card-tools { font-size: 13px; color: var(--gray); line-height: 1.6; }
.tier-card-footer { padding: 16px 22px 20px; }
.tier-card-link {
  display: block; text-align: center; padding: 10px;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
  transition: var(--transition);
}

/* ── 루틴 스텝 ── */
.routine-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px; margin-top: 48px;
}
.routine-step {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--gray-border);
  box-shadow: var(--shadow);
  padding: 32px 20px 28px; text-align: center;
  transition: var(--transition);
}
.routine-step:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.routine-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  font-size: 15px; font-weight: 800; color: var(--white);
  margin: 0 auto 18px;
}
.routine-en {
  font-size: 10px; font-weight: 700; letter-spacing: 2.5px;
  text-transform: uppercase; margin-bottom: 6px;
}
.routine-ko {
  font-size: 22px; font-weight: 800; margin-bottom: 16px;
}
.routine-desc {
  font-size: 13px; color: var(--gray); line-height: 1.65;
}

/* ── 주차 커리큘럼 ── */
.week-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px; margin-top: 40px;
}
.week-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--gray-border);
  box-shadow: var(--shadow); overflow: hidden; text-align: center;
}
.week-card-head { padding: 18px 12px 14px; }
.week-num { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 4px; }
.week-title { font-size: 18px; font-weight: 800; }
.week-divider { border: none; border-top: 1px solid var(--gray-border); }
.week-items { padding: 16px 14px; font-size: 13px; color: var(--gray); line-height: 1.75; }

/* ── 비교 테이블 ── */
.compare-wrap { overflow-x: auto; margin-top: 40px; }
.compare-table {
  width: 100%; border-collapse: collapse; min-width: 560px;
}
.compare-table th, .compare-table td {
  padding: 12px 16px; text-align: center;
  font-size: 14px; border: 1px solid var(--gray-border);
}
.compare-table thead th { font-weight: 700; font-size: 13px; }
.compare-table .col-item { text-align: left; font-weight: 600; color: var(--dark); background: #F8F9FA; }
.compare-table .col-ailit { background: #EEF4FF; color: var(--navy); font-weight: 700; }
.compare-table thead .col-ailit { background: var(--navy); color: var(--white); }
.compare-table td.ok { color: var(--green); }
.compare-table td.no { color: var(--gray-light); }

/* ── 연구 근거 카드 ── */
.research-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; }
.research-card { border-radius: var(--radius); border: 1px solid var(--gray-border); box-shadow: var(--shadow); overflow: hidden; }
.research-badge {
  padding: 5px 14px; border-radius: 100px; display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  margin: 22px 22px 0;
}
.research-author { font-size: 22px; font-weight: 800; margin: 10px 22px 2px; }
.research-journal { font-size: 12px; color: var(--gray-light); margin: 0 22px 16px; }
.research-divider { border: none; border-top: 1px solid var(--gray-border); }
.research-finding { font-size: 14px; color: var(--dark); padding: 16px 22px; line-height: 1.7; }
.research-note { font-size: 13px; padding: 12px 22px 20px; border-top: 1px solid var(--gray-border); }

/* ── 교사 리소스 카드 ── */
.resource-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; margin-top: 40px;
}
.resource-card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--gray-border); box-shadow: var(--shadow);
  padding: 28px 24px; transition: var(--transition);
}
.resource-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.resource-icon { font-size: 28px; margin-bottom: 14px; }
.resource-title { font-size: 16px; font-weight: 700; color: var(--dark); margin-bottom: 6px; }
.resource-desc { font-size: 13px; color: var(--gray); line-height: 1.65; }

/* ── 사이트맵 링크 카드 ── */
.sitemap-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; margin-top: 40px;
}
.sitemap-card {
  border-radius: var(--radius); border: 1.5px solid var(--gray-border);
  padding: 22px 20px; transition: var(--transition);
  display: flex; align-items: flex-start; gap: 14px;
}
.sitemap-card:hover { border-color: currentColor; box-shadow: var(--shadow); transform: translateY(-2px); }
.sitemap-card-bar { width: 4px; border-radius: 2px; align-self: stretch; flex-shrink: 0; }
.sitemap-card-url { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.sitemap-card-desc { font-size: 13px; color: var(--gray); }

/* ── 과정 흐름 (타임라인 리스트) ── */
.phase-list { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }
.phase-row {
  display: grid; grid-template-columns: 90px auto 1fr 72px;
  align-items: center; gap: 16px;
  background: var(--white); border-radius: var(--radius-sm);
  border: 1px solid var(--gray-border); padding: 14px 18px;
}
.phase-badge {
  padding: 4px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 700; text-align: center;
}
.phase-title { font-size: 14px; font-weight: 700; color: var(--dark); }
.phase-desc { font-size: 13px; color: var(--gray); }
.phase-weeks { font-size: 13px; font-weight: 700; text-align: right; }

/* ── KPI 그리드 ── */
.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.kpi-card {
  border-radius: var(--radius); border: 1px solid var(--gray-border);
  box-shadow: var(--shadow); overflow: hidden;
}
.kpi-head { padding: 18px 20px 14px; }
.kpi-phase { font-size: 18px; font-weight: 800; margin-bottom: 2px; }
.kpi-period { font-size: 12px; color: var(--gray-light); }
.kpi-list { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.kpi-item {
  display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--dark);
}
.kpi-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }

/* ── CTA 배너 ── */
.cta-banner {
  background: var(--navy); border-radius: var(--radius);
  padding: 56px 48px; text-align: center;
  position: relative; overflow: hidden;
}
.cta-banner::before {
  content: ''; position: absolute; border-radius: 50%;
  width: 300px; height: 300px; top: -100px; right: -80px;
  background: var(--navy-mid); opacity: .5;
}
.cta-content { position: relative; z-index: 1; }
.cta-title { font-size: 28px; font-weight: 800; color: var(--white); margin-bottom: 12px; }
.cta-sub { font-size: 16px; color: #CADCFC; margin-bottom: 28px; }

/* ── 알림 배너 ── */
.notice-banner {
  border-radius: var(--radius-sm); padding: 18px 24px;
  font-size: 19.5px; font-weight: 500; line-height: 1.6;
  display: flex; gap: 12px; align-items: flex-start;
  margin-bottom: 24px;
}
.notice-banner.amber { background: #FFFBEB; border: 1px solid #FCD34D; color: #92400E; }
.notice-banner.green { background: var(--bg-green); border: 1px solid #86EFAC; color: #065F46; }
.notice-banner.blue  { background: var(--bg-light); border: 1px solid #93C5FD; color: #1E40AF; }

/* ── 인용 블록 ── */
.quote-block {
  border-left: 4px solid var(--orange);
  padding: 18px 22px; background: var(--bg-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic; color: var(--dark);
  font-size: 15px; line-height: 1.7;
  margin: 24px 0;
}

/* ── 통계 강조 ── */
.stat-row { display: flex; gap: 40px; flex-wrap: wrap; margin: 32px 0; }
.stat-item { text-align: center; }
.stat-num { font-size: 40px; font-weight: 900; line-height: 1; }
.stat-label { font-size: 13px; color: var(--gray); margin-top: 4px; }

/* ── 푸터 ── */
.site-footer {
  background: var(--dark); color: #94A3B8;
  padding: 48px 0 32px;
}
.footer-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
}
.footer-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 32px; margin-bottom: 40px;
}
.footer-logo { font-size: 24px; font-weight: 800; color: var(--white); margin-bottom: 8px; }
.footer-logo span { color: var(--orange); }
.footer-tagline { font-size: 14px; color: #64748B; }
.footer-links { display: flex; gap: 32px; flex-wrap: wrap; }
.footer-col h4 { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #64748B; margin-bottom: 12px; }
.footer-col a { display: block; font-size: 14px; color: #94A3B8; margin-bottom: 8px; transition: var(--transition); }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08); padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 12px; color: #475569;
}

/* ── 배경 변형 ── */
.bg-light { background: var(--bg-light); }
.bg-green { background: var(--bg-green); }
.bg-dark  { background: var(--dark); }
.bg-navy  { background: var(--navy); }

/* ── 그리드 유틸 ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ── 스크롤 프로그레스 바 ── */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px;
  background: var(--orange); z-index: 200;
  width: 0; transition: width .1s;
}

/* ─────────────────
   반응형 (모바일)
───────────────────*/
@media (max-width: 768px) {
  :root { --header-h: 56px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .section { padding: 56px 0; }
  .section-sm { padding: 40px 0; }

  .tier-grid    { grid-template-columns: repeat(2, 1fr); }
  .routine-grid { grid-template-columns: repeat(2, 1fr); }
  .week-grid    { grid-template-columns: repeat(2, 1fr); }
  .resource-grid{ grid-template-columns: repeat(2, 1fr); }
  .research-grid{ grid-template-columns: 1fr; }
  .sitemap-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid     { grid-template-columns: 1fr; }
  .grid-2       { grid-template-columns: 1fr; }
  .grid-3       { grid-template-columns: 1fr; }

  .phase-row { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
  .phase-desc { grid-column: 1/-1; }
  .phase-weeks { text-align: left; }

  .cta-banner { padding: 40px 28px; }
  .footer-top { flex-direction: column; }
  .footer-links { flex-direction: column; gap: 24px; }

  .hero { padding: 64px 0 56px; }
  .hero-sub-page { padding: 48px 0 44px; }
  .stat-row { gap: 24px; }
}

@media (max-width: 480px) {
  .tier-grid    { grid-template-columns: 1fr; }
  .routine-grid { grid-template-columns: 1fr; }
  .week-grid    { grid-template-columns: 1fr; }
  .resource-grid{ grid-template-columns: 1fr; }
  .sitemap-grid { grid-template-columns: 1fr; }
}

/* ── 색상 유틸 ── */
.c-teal   { color: var(--teal); }
.c-blue   { color: var(--blue); }
.c-navy   { color: var(--navy); }
.c-orange { color: var(--orange); }
.c-green  { color: var(--green); }
.c-amber  { color: var(--amber); }
.c-gray   { color: var(--gray); }
.c-white  { color: var(--white); }

.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }

/* ── 등장 애니메이션 ── */
.fade-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity .5s ease, transform .5s ease;
}
.fade-up.visible {
  opacity: 1; transform: translateY(0);
}

/* ══════════════════════════════════════
   다크/라이트 모드 토글 버튼
══════════════════════════════════════ */
.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid var(--gray-border);
  background: transparent;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--gray); transition: var(--transition); flex-shrink: 0;
  margin-left: 8px;
}
.theme-toggle:hover { background: var(--bg-light); color: var(--dark); }

/* 라이트 모드: 달 표시, 해 숨김 */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

/* 다크 모드: 해 표시, 달 숨김 */
html[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ══════════════════════════════════════
   다크 모드 — CSS 변수 오버라이드
══════════════════════════════════════ */
html[data-theme="dark"] {
  --dark:        #F1F5F9;    /* 기본 텍스트 → 밝게 */
  --white:       #0F172A;    /* 페이지 배경 → 다크 */
  --gray:        #94A3B8;
  --gray-light:  #64748B;
  --gray-border: #334155;
  --bg-light:    #1E2D45;
  --bg-green:    #0A2010;
  --shadow:      0 2px 16px rgba(0,0,0,.4);
  --shadow-hover:0 8px 36px rgba(0,0,0,.5);
}

/* 헤더 / 모바일 메뉴 */
html[data-theme="dark"] .site-header {
  background: rgba(15,23,42,.96);
  border-bottom-color: #334155;
}
html[data-theme="dark"] .nav-links a { color: #94A3B8; }
html[data-theme="dark"] .nav-links a:hover,
html[data-theme="dark"] .nav-links a.active {
  background: #1E293B; color: #F1F5F9;
}
html[data-theme="dark"] .nav-toggle span { background: #E2E8F0; }
html[data-theme="dark"] .mobile-menu {
  background: #0F172A; border-bottom-color: #334155;
}
html[data-theme="dark"] .mobile-menu a {
  color: #E2E8F0; border-bottom-color: #334155;
}

/* 카드 계열 — 배경을 페이지보다 살짝 밝게 */
html[data-theme="dark"] .card,
html[data-theme="dark"] .tier-card,
html[data-theme="dark"] .routine-step,
html[data-theme="dark"] .week-card,
html[data-theme="dark"] .resource-card,
html[data-theme="dark"] .kpi-card,
html[data-theme="dark"] .research-card {
  background: #1E293B; border-color: #334155;
}
html[data-theme="dark"] .sitemap-card { background: #1E293B; }
html[data-theme="dark"] .phase-row  { background: #1E293B; border-color: #334155; }
html[data-theme="dark"] .tier-divider,
html[data-theme="dark"] .week-divider { border-top-color: #334155; }

/* 비교 테이블 */
html[data-theme="dark"] .compare-table th,
html[data-theme="dark"] .compare-table td { border-color: #334155; }
html[data-theme="dark"] .compare-table .col-item {
  background: #1A2942; color: #E2E8F0;
}
html[data-theme="dark"] .compare-table tbody td:not(.col-item):not(.col-ailit) {
  background: #1E293B;
}
html[data-theme="dark"] .compare-table thead th:not(.col-ailit) {
  background: #1A2942; color: #94A3B8;
}

/* 알림 배너 */
html[data-theme="dark"] .notice-banner.amber {
  background: rgba(146,64,14,.2); border-color: #D97706; color: #FCD34D;
}
html[data-theme="dark"] .notice-banner.green {
  background: rgba(5,150,105,.15); border-color: #059669; color: #6EE7B7;
}
html[data-theme="dark"] .notice-banner.blue {
  background: rgba(59,130,246,.15); border-color: #3B82F6; color: #93C5FD;
}

/* 인용 블록 */
html[data-theme="dark"] .quote-block {
  background: #1A2942; color: #CBD5E1;
}

/* CTA 배너 — 이미 다크 배경이라 변경 최소 */
html[data-theme="dark"] .cta-banner { background: #1E3A6E; }

/* 푸터 — 더 진하게 */
html[data-theme="dark"] .site-footer { background: #020817; }
html[data-theme="dark"] .footer-bottom { border-top-color: rgba(255,255,255,.06); }

/* 히어로 영역 — navy 배경 유지, 변경 없음 */

/* 연구 카드 배지 다크모드 보정 */
html[data-theme="dark"] .research-badge { filter: brightness(1.1); }

/* 섹션 타이틀 색상 보정 */
html[data-theme="dark"] .section-title { color: #F1F5F9; }
html[data-theme="dark"] .section-sub   { color: #94A3B8; }
html[data-theme="dark"] .eyebrow        { color: var(--orange); }

/* 인라인 스타일로 white/gray 하드코딩된 곳 보정 */
html[data-theme="dark"] .footer-logo { color: #F1F5F9; }
html[data-theme="dark"] .footer-tagline { color: #64748B; }
html[data-theme="dark"] .footer-col a   { color: #94A3B8; }
html[data-theme="dark"] .footer-col a:hover { color: #F1F5F9; }
html[data-theme="dark"] .footer-bottom  { color: #475569; }

.footer-logo img { width: 156px; height: auto; display: block; background:#05070A; border-radius:6px; padding:0 8px; }

/* ─────────────────────────────────────────
   회원/폼 (auth) · 답변 저장 위젯 · 관리자
───────────────────────────────────────── */
.auth-wrap { max-width: 480px; margin: 0 auto; padding: 48px 24px 80px; }
.auth-card { background: var(--white); border: 1px solid var(--gray-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px 28px; }
.auth-title { font-size: 24px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.auth-desc { font-size: 14px; color: var(--gray); margin-bottom: 24px; }
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 13px; font-weight: 700; color: var(--dark); margin-bottom: 6px; }
.form-field input, .form-field select { width: 100%; padding: 12px 14px; font-size: 15px; font-family: inherit; border: 1px solid var(--gray-border); border-radius: var(--radius-sm); background: var(--white); color: var(--dark); }
.form-field input:focus, .form-field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.form-hint { font-size: 12px; color: var(--gray-light); margin-top: 6px; }
.form-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--dark); margin-bottom: 10px; line-height: 1.5; }
.form-check input { margin-top: 3px; flex-shrink: 0; width: 16px; height: 16px; }
.form-check a { color: var(--blue); text-decoration: underline; }
.form-error { background: #FEF2F2; border: 1px solid #FCA5A5; color: #B91C1C; font-size: 13px; padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; }
.form-ok { background: var(--bg-green); border: 1px solid #86EFAC; color: #065F46; font-size: 13px; padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; }
.btn-block { width: 100%; justify-content: center; }
.auth-alt { font-size: 13px; color: var(--gray); text-align: center; margin-top: 18px; }
.auth-alt a { color: var(--blue); font-weight: 600; }
.guardian-box { background: var(--bg-light); border: 1px solid #BFDBFE; border-radius: var(--radius-sm); padding: 16px; margin-bottom: 16px; }
.guardian-box h4 { font-size: 13px; color: var(--navy); margin-bottom: 12px; }

/* 답변 저장 위젯 */
.answer-box { background: var(--bg-light); border: 1px solid #BFDBFE; border-radius: var(--radius-sm); padding: 18px; margin: 20px 0; }
.answer-box .answer-q { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.answer-box textarea { width: 100%; min-height: 96px; padding: 12px; font-size: 14px; font-family: inherit; border: 1px solid var(--gray-border); border-radius: var(--radius-sm); resize: vertical; color: var(--dark); }
.answer-box .answer-bar { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.answer-box .answer-status { font-size: 12px; color: var(--gray); }

/* 관리자 표 */
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 16px; }
.admin-table th, .admin-table td { border: 1px solid var(--gray-border); padding: 8px 10px; text-align: left; vertical-align: top; }
.admin-table th { background: #F8F9FA; font-weight: 700; color: var(--dark); position: sticky; top: 0; }
.admin-scroll { overflow-x: auto; }
.tag-minor { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: #FFF7ED; color: var(--orange); }
.tag-adult { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--bg-green); color: var(--green); }
