/* Monan 공통 테마: CRS의 밝은 팔레트를 전체 서비스에 적용합니다. */
:root[data-theme="light"] {
  color-scheme: light;
  --ink: #14243a;
  --muted: #5a6b80;
  --paper: #edf3f9;
  --panel: #ffffff;
  --panel-2: #f2f6fa;
  --line: rgba(38, 64, 94, .18);
  --green: #178f8a;
  --lime: #2f78d1;
  --white: #14243a;
  --red: #c6505b;
}

:root[data-theme="light"] body,
:root[data-theme="light"] .home-page,
:root[data-theme="light"] .quiz-page {
  color: #14243a !important;
  background:
    radial-gradient(circle at 78% 0%, rgba(98, 161, 214, .19), transparent 33rem),
    linear-gradient(135deg, #f6f9fc 0%, #eef4fa 52%, #e8f0f8 100%) !important;
}

:root[data-theme="light"] .topbar,
:root[data-theme="light"] .home-page .topbar,
:root[data-theme="light"] .quiz-page .topbar {
  border-bottom-color: rgba(38, 64, 94, .14) !important;
  background: rgba(255, 255, 255, .84) !important;
}

:root[data-theme="light"] .main-nav-link,
:root[data-theme="light"] .home-page .main-nav-link {
  color: #5a6b80 !important;
}

:root[data-theme="light"] .main-nav-link:hover,
:root[data-theme="light"] .home-page .main-nav-link:hover {
  border-color: #aebfd0 !important;
  background: rgba(47, 120, 209, .08) !important;
  color: #1c568d !important;
}

:root[data-theme="light"] .main-nav-link.is-active,
:root[data-theme="light"] .main-nav-link[aria-current="page"] {
  border-color: #7fa8d6 !important;
  background: rgba(47, 120, 209, .11) !important;
  color: #1b5f9e !important;
}

:root[data-theme="light"] .current-user,
:root[data-theme="light"] .quiz-current-user {
  border-left-color: #b9c9d9 !important;
  color: #405a73 !important;
}

:root[data-theme="light"] :is(.profile-link, .admin-link, .quiz-home-link) {
  color: #23679f !important;
}

:root[data-theme="light"] :is(.text-button, .quiz-logout) {
  color: #1b6f92 !important;
}

:root[data-theme="light"] :is(.global-theme-toggle, .home-theme-toggle) {
  border-color: #aebfd0 !important;
  background: rgba(255, 255, 255, .76) !important;
  color: #3a5672 !important;
}

:root[data-theme="light"] :is(.global-theme-toggle, .home-theme-toggle):hover {
  border-color: #6f97bf !important;
  background: #f7fbff !important;
  color: #1e5f98 !important;
}

:root[data-theme="light"] :is(.global-theme-toggle, .home-theme-toggle) [data-theme-icon],
:root[data-theme="light"] .home-theme-toggle span:first-child {
  color: #bd741f !important;
}

:root[data-theme="light"] body :is(input, select, textarea) {
  border-color: #b8c8d8 !important;
  background: #ffffff !important;
  color: #14243a !important;
}

:root[data-theme="light"] body :is(input, select, textarea)::placeholder {
  color: #71839a !important;
}

:root[data-theme="light"] body :is(
  .filters, .login-card, .withdraw-modal, .sync-panel, .summary-card,
  .analytics-card, .dashboard-card, [class*="panel"], [class*="-card"], [class*="-modal"]
) {
  border-color: rgba(38, 64, 94, .18) !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(239, 245, 251, .96)) !important;
  box-shadow: 0 14px 34px rgba(31, 58, 91, .10) !important;
}

:root[data-theme="light"] body :is(h1, h2, h3, h4, strong, .company, .number, .news-title, .youtube-video-title),
:root[data-theme="light"] :is(.home-hero h1, .dashboard-card h2, .home-date-card strong, .home-company-item strong, .home-news-item a, .home-video-copy strong, .quiz-preview > strong) {
  color: #14243a !important;
}

:root[data-theme="light"] body :is(p, small, .source, .code, .industry, .disclaimer, .dashboard-description),
:root[data-theme="light"] :is(.home-hero > div > p:not(.eyebrow), .home-date-card small, .home-company-item span, .home-news-item span, .home-video-copy small, .quiz-preview > p) {
  color: #5a6b80 !important;
}

:root[data-theme="light"] body :is(th, td) { border-color: rgba(38, 64, 94, .16) !important; }
:root[data-theme="light"] body th { background: rgba(47, 120, 209, .06) !important; color: #45627d !important; }
:root[data-theme="light"] body .table-wrap { border-color: #b8c8d8 !important; background: rgba(255, 255, 255, .82) !important; }
:root[data-theme="light"] body .table-wrap tbody tr:hover { background: rgba(47, 120, 209, .07) !important; }

:root[data-theme="light"] :is(.home-date-card, .dashboard-card, .quiz-preview) {
  border-color: rgba(38, 64, 94, .18) !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(239, 245, 251, .96)) !important;
  box-shadow: 0 14px 34px rgba(31, 58, 91, .10) !important;
}

:root[data-theme="light"] :is(.home-company-item, .home-news-item) { border-top-color: rgba(38, 64, 94, .16) !important; }
:root[data-theme="light"] .home-card-action { border-color: #4b87ba !important; color: #1f6099 !important; }
:root[data-theme="light"] .home-card-action:hover { background: #e9f3fc !important; }

/* 오늘의 퀴즈의 바깥 영역뿐 아니라 문제·보기·해설 카드도 밝게 전환합니다. */
:root[data-theme="light"] :is(.quiz-date-card, .quiz-state-card, .quiz-question, .quiz-score-card, .quiz-submit-area, .quiz-reference-library) {
  border-color: rgba(38, 64, 94, .18) !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(239, 245, 251, .96)) !important;
  box-shadow: 0 14px 34px rgba(31, 58, 91, .10) !important;
}

:root[data-theme="light"] .quiz-question.is-correct { border-color: #6fb6a6 !important; background: linear-gradient(145deg, #f7fffc, #eaf8f5) !important; }
:root[data-theme="light"] .quiz-question.is-incorrect { border-color: #d698a0 !important; background: linear-gradient(145deg, #fffafa, #fff0f2) !important; }
:root[data-theme="light"] :is(.quiz-state-card h2, .score-copy h2, .quiz-progress-row h2, .quiz-question h3) { color: #14243a !important; }
:root[data-theme="light"] :is(.quiz-state-card > p:not(.eyebrow), .score-copy > p:not(.eyebrow), .quiz-progress-label, .quiz-submit-area p, .question-feedback p) { color: #5a6b80 !important; }
:root[data-theme="light"] .quiz-date-card span,
:root[data-theme="light"] .quiz-progress-row h2 span,
:root[data-theme="light"] .score-ring span { color: #62768c !important; }
:root[data-theme="light"] :is(.quiz-date-card strong, .score-ring strong) { color: #14243a !important; }
:root[data-theme="light"] .score-ring::before { background: #f3f7fc !important; box-shadow: inset 0 0 0 1px rgba(38, 64, 94, .10) !important; }
:root[data-theme="light"] .quiz-option { border-color: #c2d0dd !important; background: #f8fbfe !important; color: #29465f !important; }
:root[data-theme="light"] .quiz-option:hover { border-color: #7da6cd !important; background: #edf5fc !important; }
:root[data-theme="light"] .option-marker { border-color: #8da5bb !important; color: #587086 !important; }
:root[data-theme="light"] .quiz-option:has(input:checked) { border-color: #4e91c7 !important; background: #e7f2fd !important; color: #183f65 !important; }
:root[data-theme="light"] .quiz-option:has(input:checked) .option-marker { border-color: #2f78d1 !important; background: #2f78d1 !important; color: #fff !important; }
:root[data-theme="light"] .quiz-option.is-answer { border-color: #54a696 !important; background: #e7f8f3 !important; color: #174a42 !important; }
:root[data-theme="light"] .quiz-option.is-selected-wrong { border-color: #d27b87 !important; background: #fff0f2 !important; color: #80323d !important; }
:root[data-theme="light"] .question-feedback { border-left-color: #4e91c7 !important; background: #edf4fb !important; }
:root[data-theme="light"] .question-feedback a { color: #1f6eaf !important; }

/* 홈·퀴즈도 뉴스/유튜브처럼 넓은 본문 폭을 사용합니다. */
.home-main,
.quiz-main {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: max(3vw, 28px) !important;
  padding-right: max(3vw, 28px) !important;
}

@media (max-width: 480px) {
  .home-main,
  .quiz-main {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* CRS의 기존 청색 계열 다크 화면을 Monan Scout 기본 다크 팔레트로 맞춥니다. */
:root:not([data-theme="light"]) .crisis-hero > p:not(.eyebrow),
:root:not([data-theme="light"]) .crisis-start p:not(.eyebrow),
:root:not([data-theme="light"]) .scenario-brief,
:root:not([data-theme="light"]) .crisis-result {
  color: #8b958f !important;
}

:root:not([data-theme="light"]) .crisis-summary span {
  border-color: #354038 !important;
  background: #151a17 !important;
  color: #b7c4ba !important;
}

:root:not([data-theme="light"]) .crisis-game {
  border-color: #2a322d !important;
  background: linear-gradient(145deg, rgba(28, 35, 30, .94), rgba(14, 18, 16, .98)) !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, .22) !important;
}

:root:not([data-theme="light"]) .crisis-head,
:root:not([data-theme="light"]) .crisis-metric {
  border-color: #2a322d !important;
}

:root:not([data-theme="light"]) .crisis-metric,
:root:not([data-theme="light"]) .crisis-choice {
  background: #101412 !important;
}

:root:not([data-theme="light"]) .crisis-choice {
  border-color: #354038 !important;
  color: #dfe6df !important;
}

:root:not([data-theme="light"]) .crisis-choice:hover,
:root:not([data-theme="light"]) .crisis-choice:focus-visible {
  border-color: #73d6a5 !important;
  background: #151f19 !important;
}

:root:not([data-theme="light"]) .crisis-result {
  border-left-color: #73d6a5 !important;
  background: #151f19 !important;
}

:root:not([data-theme="light"]) .crisis-topbar .main-nav-link {
  color: #93a097 !important;
}

:root:not([data-theme="light"]) .crisis-topbar .main-nav-link:hover {
  border-color: #35483c !important;
  background: rgba(115, 214, 165, .08) !important;
  color: #d9e8dc !important;
}

:root:not([data-theme="light"]) .crisis-topbar .main-nav-link.is-active,
:root:not([data-theme="light"]) .crisis-topbar .main-nav-link[aria-current="page"] {
  border-color: rgba(214, 244, 110, .34) !important;
  background: rgba(214, 244, 110, .10) !important;
  color: #d6f46e !important;
}

/* 오늘의 출제 자료(Research Brief)도 퀴즈 카드와 같은 밝은 표면을 사용합니다. */
:root[data-theme="light"] .quiz-briefing {
  border-color: rgba(38, 64, 94, .18) !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(239, 245, 251, .96)) !important;
  box-shadow: 0 14px 34px rgba(31, 58, 91, .10) !important;
}

:root[data-theme="light"] .quiz-briefing-head h2 {
  color: #14243a !important;
}

:root[data-theme="light"] :is(.quiz-briefing-head > span, .quiz-briefing-copy) {
  color: #5a6b80 !important;
}

:root[data-theme="light"] .quiz-briefing-list li {
  border-color: rgba(38, 64, 94, .18) !important;
  background: #f8fbfe !important;
}

:root[data-theme="light"] :is(.quiz-briefing-list a, .quiz-briefing-list strong) {
  color: #1e4569 !important;
}

:root[data-theme="light"] .quiz-briefing-list a:hover {
  color: #1f6eaf !important;
}

:root[data-theme="light"] .quiz-briefing-list small {
  color: #667c91 !important;
}

/* 서비스별 큰 제목을 하나의 MONAN 디스플레이 폰트로 통일합니다. */
:root {
  --monan-display-font: "Black Han Sans", "Black Ops One", "Arial Black", "Noto Sans KR", sans-serif;
}

:is(.home-hero h1, .hero h1, .news-hero h1, .youtube-hero h1, .quiz-hero h1, .page-heading h2) {
  font-family: var(--monan-display-font) !important;
  font-style: normal !important;
  font-weight: 400 !important;
  letter-spacing: .02em !important;
}

/* SCOUT도 MONAN과 동일한 형태로 표시합니다. */
.hero h1 em,
:is(.home-hero h1, .news-hero h1, .youtube-hero h1, .quiz-hero h1) em {
  font-family: inherit !important;
  font-style: normal !important;
}

:root[data-theme="light"] :is(.home-hero h1, .hero h1, .news-hero h1, .youtube-hero h1, .quiz-hero h1, .page-heading h2) {
  color: #14243a !important;
  text-shadow: none !important;
}

:root[data-theme="light"] :is(.hero h1 em, .news-hero h1 em, .youtube-hero h1 em, .quiz-hero h1 em) {
  color: #1f6eaf !important;
}

/* 밝은 로그인 화면에서는 원본의 짙은 로고 색을 사용해 배경과 분리합니다. */
:root[data-theme="light"] .login-brand-logo {
  filter: none !important;
}

/* 홈 소개 영역을 제거한 뒤에는 카드가 자연스럽게 시작되도록 상단 여백을 줄입니다. */
.home-main { padding-top: 34px !important; }

@media (max-width: 820px) {
  .home-main { padding-top: 26px !important; }
}

/* 밝은 홈 대시보드 카드의 보조 텍스트 대비를 제목 포인트 색상에 맞춥니다. */
:root[data-theme="light"] .dashboard-card-head > a {
  color: #1f6eaf !important;
  text-decoration-color: rgba(31, 110, 175, .42) !important;
}

:root[data-theme="light"] .dashboard-card-head > a:hover,
:root[data-theme="light"] .dashboard-card-head > a:focus-visible {
  color: #174f84 !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

:root[data-theme="light"] .dashboard-card-head > a span {
  color: inherit !important;
}

:root[data-theme="light"] :is(.dashboard-description, .home-empty, .home-loading) {
  color: #526b84 !important;
}

:root[data-theme="light"] .quiz-status {
  border-color: #4b87ba !important;
  background: #e8f2fc !important;
  color: #1f6eaf !important;
}

:root[data-theme="light"] .quiz-status.is-done {
  border-color: #268a7f !important;
  background: #e3f5f1 !important;
  color: #176e69 !important;
}

/* 로그인·회원가입도 대시보드와 같은 밝은 모드 표면과 대비를 사용합니다. */
:root[data-theme="light"] .auth-page {
  background:
    radial-gradient(circle at 78% 0%, rgba(98, 161, 214, .19), transparent 33rem),
    linear-gradient(135deg, #f6f9fc 0%, #eef4fa 52%, #e8f0f8 100%) !important;
}

:root[data-theme="light"] .auth-page .login-card {
  border-color: rgba(38, 64, 94, .18) !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(239, 245, 251, .96)) !important;
  box-shadow: 0 14px 34px rgba(31, 58, 91, .10) !important;
}

:root[data-theme="light"] .auth-page .login-card :is(h1, legend) {
  color: #14243a !important;
}

:root[data-theme="light"] .auth-page .login-card :is(label, p, small) {
  color: #526b84 !important;
}

:root[data-theme="light"] .auth-page .login-card a {
  color: #1f6eaf !important;
  text-decoration-color: rgba(31, 110, 175, .45) !important;
}

:root[data-theme="light"] .auth-page .login-card fieldset {
  border-color: rgba(38, 64, 94, .18) !important;
}

/* 뉴스 수집 화면의 탭과 빈 목록도 밝은 카드 표면으로 통일합니다. */
:root[data-theme="light"] .news-view-tabs {
  border-bottom-color: rgba(38, 64, 94, .18) !important;
}

:root[data-theme="light"] .news-view-tab {
  border-color: #b8c8d8 !important;
  background: rgba(255, 255, 255, .76) !important;
  color: #526b84 !important;
}

:root[data-theme="light"] .news-view-tab:hover {
  border-color: #7fa8d6 !important;
  background: #f2f7fc !important;
  color: #1f6eaf !important;
}

:root[data-theme="light"] .news-view-tab.is-active,
:root[data-theme="light"] .news-view-tab[aria-selected="true"] {
  border-color: #7fa8d6 !important;
  background: #e8f2fc !important;
  color: #1f6eaf !important;
}

:root[data-theme="light"] .news-view-heading h2 {
  color: #14243a !important;
}

:root[data-theme="light"] .news-view-heading > div > p:not(.eyebrow),
:root[data-theme="light"] :is(.news-empty, .news-auto-empty) {
  color: #526b84 !important;
}

:root[data-theme="light"] .news-view-action {
  border-color: #4b87ba !important;
  background: #e8f2fc !important;
  color: #1f6eaf !important;
}

:root[data-theme="light"] .news-view-action:hover {
  border-color: #1f6eaf !important;
  background: #dcecfb !important;
  color: #174f84 !important;
}

:root[data-theme="light"] .news-collected-articles {
  border-color: rgba(38, 64, 94, .18) !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(239, 245, 251, .96)) !important;
  box-shadow: 0 14px 34px rgba(31, 58, 91, .10) !important;
}

:root[data-theme="light"] .news-collected-article {
  border-top-color: rgba(38, 64, 94, .14) !important;
}

/* 유튜브 라이브러리의 탐색 탭·필터도 밝은 대시보드 표면으로 통일합니다. */
:root[data-theme="light"] .youtube-view-tabs {
  border-bottom-color: rgba(38, 64, 94, .18) !important;
}

:root[data-theme="light"] .youtube-view-tabs > .youtube-view-tab {
  border-color: #b8c8d8 !important;
  background: rgba(255, 255, 255, .76) !important;
  color: #526b84 !important;
}

:root[data-theme="light"] .youtube-view-tabs > .youtube-view-tab:hover {
  border-color: #7fa8d6 !important;
  background: #f2f7fc !important;
  color: #1f6eaf !important;
}

:root[data-theme="light"] .youtube-view-tabs > .youtube-view-tab.is-active,
:root[data-theme="light"] .youtube-view-tabs > .youtube-view-tab[aria-selected="true"] {
  border-color: #7fa8d6 !important;
  background: #e8f2fc !important;
  color: #1f6eaf !important;
}

:root[data-theme="light"] .youtube-video-filters {
  border-color: rgba(38, 64, 94, .18) !important;
  background: #f2f7fc !important;
}

:root[data-theme="light"] :is(.youtube-video-filter-fields label, .youtube-video-filter-label) {
  color: #526b84 !important;
}

:root[data-theme="light"] :is(.youtube-video-date-summary, .youtube-date-weekday, .youtube-empty) {
  color: #526b84 !important;
}

:root[data-theme="light"] :is(.youtube-video-date-presets button, .youtube-date-presets button) {
  border-color: #b8c8d8 !important;
  background: #ffffff !important;
  color: #526b84 !important;
}

:root[data-theme="light"] :is(.youtube-video-date-presets button:hover, .youtube-video-date-presets button.is-active, .youtube-date-presets button:hover, .youtube-date-presets button.is-active) {
  border-color: #7fa8d6 !important;
  background: #e8f2fc !important;
  color: #1f6eaf !important;
}

:root[data-theme="light"] :is(.youtube-refresh, .youtube-video-filter-actions button:first-child, .youtube-load-more) {
  border-color: #4b87ba !important;
  background: #e8f2fc !important;
  color: #1f6eaf !important;
}

:root[data-theme="light"] :is(.youtube-refresh:hover, .youtube-video-filter-actions button:first-child:hover, .youtube-load-more:hover) {
  border-color: #1f6eaf !important;
  background: #dcecfb !important;
  color: #174f84 !important;
}

:root[data-theme="light"] .youtube-video-filter-actions button:last-child {
  border-color: #b8c8d8 !important;
  background: #ffffff !important;
  color: #526b84 !important;
}

:root[data-theme="light"] .youtube-video-filter-actions button:last-child:hover {
  border-color: #7fa8d6 !important;
  background: #f2f7fc !important;
  color: #1f6eaf !important;
}

:root[data-theme="light"] .youtube-video-bulk-bar {
  border-color: rgba(38, 64, 94, .18) !important;
  background: #f2f7fc !important;
}

/* 수동·자동 수집 조건도 수집 목록과 같은 밝은 대시보드 표면을 사용합니다. */
:root[data-theme="light"] .news-page :is(
  .news-filter,
  .news-query-mode,
  .news-keyword-group,
  .custom-source,
  .news-subscription-form,
  .news-subscriptions-panel,
  .news-automatic-articles
) {
  border-color: rgba(38, 64, 94, .18) !important;
  background: #f2f7fc !important;
  box-shadow: none !important;
}

:root[data-theme="light"] .news-page :is(
  .news-filter,
  .news-subscription-form,
  .news-saved-searches,
  .news-date-range,
  .news-keyword-group,
  .custom-source,
  .news-subscriptions-panel,
  .news-automatic-articles
) :is(label, legend, .news-group-head strong, .custom-source h3, .news-subscription-form-heading h3, .news-subscriptions-top h3) {
  color: #14243a !important;
}

:root[data-theme="light"] .news-page :is(
  .keyword-help,
  .news-note,
  .news-query-mode-help,
  .custom-source p,
  .news-automatic-note,
  .news-auto-heading > div > p:not(.eyebrow),
  .news-saved-subscription-detail,
  .news-saved-subscription-timing,
  .news-automatic-articles-note,
  .news-updated
) {
  color: #526b84 !important;
}

:root[data-theme="light"] .news-page :is(select, input[type="date"]) {
  color-scheme: light !important;
}

:root[data-theme="light"] .news-page .news-query-mode-controls button,
:root[data-theme="light"] .news-page .source-choice {
  border-color: #b8c8d8 !important;
  background: #ffffff !important;
  color: #526b84 !important;
}

:root[data-theme="light"] .news-page .news-query-mode-controls button:hover,
:root[data-theme="light"] .news-page .source-choice:hover {
  border-color: #7fa8d6 !important;
  background: #f7fbff !important;
  color: #1f6eaf !important;
}

:root[data-theme="light"] .news-page .news-query-mode-controls button.is-active,
:root[data-theme="light"] .news-page .source-choice:has(input:checked) {
  border-color: #7fa8d6 !important;
  background: #e8f2fc !important;
  color: #1f6eaf !important;
}

:root[data-theme="light"] .news-page .source-choice-content small {
  color: #526b84 !important;
}

:root[data-theme="light"] .news-page :is(
  .news-add-term,
  .news-add-group,
  .source-add,
  .source-remove,
  .news-save-row button,
  .news-cancel-edit,
  .news-refresh-rules,
  .news-subscription-edit
) {
  border-color: #4b87ba !important;
  background: #e8f2fc !important;
  color: #1f6eaf !important;
}

:root[data-theme="light"] .news-page :is(
  .news-add-term,
  .news-add-group,
  .source-add,
  .source-remove,
  .news-save-row button,
  .news-cancel-edit,
  .news-refresh-rules,
  .news-subscription-edit
):hover {
  border-color: #1f6eaf !important;
  background: #dcecfb !important;
  color: #174f84 !important;
}

:root[data-theme="light"] .news-page .news-automatic-note {
  border-left-color: #1f6eaf !important;
  background: #e8f2fc !important;
}

:root[data-theme="light"] .news-page .news-automatic-note strong,
:root[data-theme="light"] .news-page .news-auto-badge,
:root[data-theme="light"] .news-page .news-saved-subscription-title small,
:root[data-theme="light"] .news-page .news-automatic-article-rule {
  color: #1f6eaf !important;
}

:root[data-theme="light"] .news-page .news-auto-badge {
  border-color: #7fa8d6 !important;
  background: #e8f2fc !important;
}

:root[data-theme="light"] .news-page .news-subscription-delete {
  border-color: #d39aa1 !important;
  background: #fff1f3 !important;
  color: #a63d4a !important;
}

/* 뉴스 수동 수집의 날짜 입력은 브라우저 기본 다크 컨트롤을 사용하지 않습니다. */
:root[data-theme="light"] body.news-page .news-manual-date-section {
  border-top-color: rgba(38, 64, 94, .18) !important;
}

:root[data-theme="light"] body.news-page .news-manual-date-heading :is(p, span),
:root[data-theme="light"] body.news-page .news-manual-date-section .news-date-range label > span {
  color: #14243a !important;
}

:root[data-theme="light"] body.news-page .news-manual-date-heading span {
  color: #526b84 !important;
}

:root[data-theme="light"] body.news-page .news-manual-date-section .news-date-range input {
  border-color: #b8c8d8 !important;
  background: #ffffff !important;
  color: #14243a !important;
  color-scheme: light !important;
}

:root[data-theme="light"] body.news-page :is(.news-date-weekday, .news-manual-date-summary) {
  color: #1f6eaf !important;
}

:root[data-theme="light"] body.news-page .news-date-presets button {
  border-color: #b8c8d8 !important;
  background: #ffffff !important;
  color: #526b84 !important;
}

:root[data-theme="light"] body.news-page .news-date-presets button:hover,
:root[data-theme="light"] body.news-page .news-date-presets button.is-active {
  border-color: #7fa8d6 !important;
  background: #e8f2fc !important;
  color: #1f6eaf !important;
}

/* 유튜브 수동·자동 수집의 가로 조건 바와 규칙 카드도 밝은 모드에 맞춥니다. */
:root[data-theme="light"] .youtube-page :is(
  .youtube-control-card,
  .youtube-rules-panel,
  .youtube-condition-grid > .youtube-repeat-section,
  .youtube-condition-grid > .youtube-mode-section,
  .youtube-condition-details > .youtube-date-section,
  .youtube-condition-details > .youtube-threshold-section,
  #youtubeManualPanel .youtube-horizontal-condition-bar,
  #youtubeAutomaticPanel .youtube-horizontal-condition-bar,
  #youtubeManualPanel .youtube-horizontal-detail-bar,
  #youtubeManualPanel .youtube-inline-detail-bar
) {
  border-color: rgba(38, 64, 94, .18) !important;
  background: #f2f7fc !important;
  box-shadow: none !important;
}

:root[data-theme="light"] .youtube-page :is(
  #youtubeManualPanel .youtube-horizontal-condition-bar,
  #youtubeAutomaticPanel .youtube-horizontal-condition-bar,
  #youtubeManualPanel .youtube-horizontal-detail-bar,
  #youtubeManualPanel .youtube-inline-detail-bar
) > * {
  border-left-color: rgba(38, 64, 94, .18) !important;
  background: transparent !important;
}

:root[data-theme="light"] .youtube-page :is(
  .youtube-control-card,
  .youtube-rules-panel,
  .youtube-condition-grid,
  .youtube-condition-details,
  .youtube-horizontal-condition-bar,
  .youtube-horizontal-detail-bar,
  .youtube-inline-detail-bar
) :is(label, .youtube-field-label, .youtube-inline-field-label, .youtube-repeat-heading, .youtube-card-heading h2, .youtube-manual-conditions h3) {
  color: #14243a !important;
}

:root[data-theme="light"] .youtube-page :is(
  .youtube-input-help,
  .youtube-repeat-count,
  .youtube-rule-note,
  .youtube-manual-date-summary,
  .youtube-date-weekday,
  .youtube-rules-panel p
) {
  color: #526b84 !important;
}

:root[data-theme="light"] .youtube-page :is(select, input[type="date"]) {
  color-scheme: light !important;
}

:root[data-theme="light"] .youtube-page .youtube-rule-note {
  border-left-color: #1f6eaf !important;
  background: #e8f2fc !important;
}

:root[data-theme="light"] .youtube-page :is(
  .youtube-repeat-remove,
  .youtube-add-input,
  .youtube-save-rule,
  .youtube-condition-save-row button,
  .youtube-condition-actions button:not(:last-child),
  .youtube-cancel-rule-edit,
  .youtube-rule-edit
) {
  border-color: #4b87ba !important;
  background: #e8f2fc !important;
  color: #1f6eaf !important;
}

:root[data-theme="light"] .youtube-page :is(
  .youtube-repeat-remove,
  .youtube-add-input,
  .youtube-save-rule,
  .youtube-condition-save-row button,
  .youtube-condition-actions button:not(:last-child),
  .youtube-cancel-rule-edit,
  .youtube-rule-edit
):hover {
  border-color: #1f6eaf !important;
  background: #dcecfb !important;
  color: #174f84 !important;
}

:root[data-theme="light"] .youtube-page :is(.youtube-condition-actions button:last-child, .youtube-rule-delete) {
  border-color: #d39aa1 !important;
  background: #fff1f3 !important;
  color: #a63d4a !important;
}

/* 유튜브 수동 수집의 한 줄 검색 기간도 밝은 컨트롤과 파란 포인트로 맞춥니다. */
:root[data-theme="light"] body.youtube-page #youtubeManualPanel .youtube-inline-detail-bar {
  border-color: rgba(38, 64, 94, .18) !important;
  background: #f2f7fc !important;
  scrollbar-color: #7fa8d6 #e6eef6 !important;
}

:root[data-theme="light"] body.youtube-page #youtubeManualPanel .youtube-inline-detail-bar > .youtube-inline-detail-cell {
  border-left-color: rgba(38, 64, 94, .18) !important;
}

:root[data-theme="light"] body.youtube-page #youtubeManualPanel :is(
  .youtube-inline-field-label,
  .youtube-inline-detail-cell > label,
  .youtube-inline-detail-cell > .youtube-repeat-heading
) {
  color: #14243a !important;
}

:root[data-theme="light"] body.youtube-page #youtubeManualPanel .youtube-inline-detail-bar input {
  border-color: #b8c8d8 !important;
  background: #ffffff !important;
  color: #14243a !important;
  color-scheme: light !important;
}

:root[data-theme="light"] body.youtube-page #youtubeManualPanel :is(.youtube-date-weekday, .youtube-manual-date-summary) {
  color: #1f6eaf !important;
}

:root[data-theme="light"] body.youtube-page #youtubeManualPanel .youtube-inline-preset-cell .youtube-date-presets button {
  border-color: #b8c8d8 !important;
  background: #ffffff !important;
  color: #526b84 !important;
}

:root[data-theme="light"] body.youtube-page #youtubeManualPanel .youtube-inline-preset-cell .youtube-date-presets button:hover,
:root[data-theme="light"] body.youtube-page #youtubeManualPanel .youtube-inline-preset-cell .youtube-date-presets button.is-active {
  border-color: #7fa8d6 !important;
  background: #e8f2fc !important;
  color: #1f6eaf !important;
}

/*
 * 밝은 모드 전수 점검
 *
 * 개별 화면에 남아 있던 어두운 테마 전용 고정 색상을 밝은 테마의
 * 대비 기준으로 보정합니다. 본문 #14243a, 보조 정보 #526b84,
 * 상호작용 포인트 #1f6eaf를 공통으로 사용해 페이지 전환 시에도
 * 읽기 흐름이 달라지지 않도록 합니다.
 */
:root[data-theme="light"] {
  --monan-light-ink: #14243a;
  --monan-light-body: #526b84;
  --monan-light-soft: #f2f7fc;
  --monan-light-border: #b8c8d8;
  --monan-light-accent: #1f6eaf;
  --monan-light-accent-soft: #e8f2fc;
  --monan-light-success: #167a75;
  --monan-light-danger: #a63d4a;
}

:root[data-theme="light"] :is(.eyebrow, .section-kicker) {
  color: #1f6eaf !important;
}

:root[data-theme="light"] :is(.secondary, .modal-confirm, .profile-success-continue) {
  background: #2f78d1 !important;
  color: #ffffff !important;
}

:root[data-theme="light"] :is(.secondary:hover, .modal-confirm:hover, .profile-success-continue:hover) {
  background: #1f6eaf !important;
}

:root[data-theme="light"] :is(.analytics-message[data-kind="success"], .manual-message, .sync-message) {
  color: #167a75 !important;
}

:root[data-theme="light"] :is(.analytics-message[data-kind="error"], .withdraw-message, .login-message, .password-change-message) {
  color: #a63d4a !important;
}

/* 재무 스크리너: 상단 조건 바, 표, 저장 조건 */
:root[data-theme="light"] .screener-page :is(
  .filters h2,
  .filters label:not(.check),
  .filters .metric > div:first-child,
  .filter-heading,
  .results h2,
  .saved-conditions h3,
  .manual-sync h3,
  .admin-panel h3
) {
  color: var(--monan-light-ink) !important;
}

:root[data-theme="light"] .screener-page :is(
  .filters small,
  .range-inputs,
  .sort,
  .saved-conditions .text-button,
  .manual-sync p,
  .admin-panel p,
  .trend-dates,
  .disclaimer
) {
  color: var(--monan-light-body) !important;
}

:root[data-theme="light"] .screener-page :is(.number, .trend-values, .company) {
  color: var(--monan-light-ink) !important;
}

:root[data-theme="light"] .screener-page .chip {
  border-color: #8eb7dc !important;
  background: #e8f2fc !important;
  color: #1f6099 !important;
}

:root[data-theme="light"] .screener-page :is(.manual-sync, .admin-panel, .saved-conditions) {
  border-color: rgba(38, 64, 94, .18) !important;
}

:root[data-theme="light"] .screener-page :is(.manual-sync .secondary, .admin-panel .secondary) {
  border-color: #4b87ba !important;
}

:root[data-theme="light"] .screener-page .pagination :is(button, select) {
  border-color: #b8c8d8 !important;
  background: #ffffff !important;
  color: #405d78 !important;
}

:root[data-theme="light"] .screener-page .pagination button:is(:hover, .is-active) {
  border-color: #4b87ba !important;
  background: #e8f2fc !important;
  color: #1f6eaf !important;
}

/* 홈 대시보드: 빈 상태·숫자·상태 배지도 본문 대비를 유지합니다. */
:root[data-theme="light"] .home-page :is(.home-empty, .home-loading, .dashboard-number-label) {
  color: var(--monan-light-body) !important;
}

:root[data-theme="light"] .home-page .dashboard-number {
  color: #1f6eaf !important;
}

:root[data-theme="light"] .home-page :is(.quiz-status, .quiz-status.is-done) {
  border-color: #8eb7dc !important;
  background: #e8f2fc !important;
  color: #1f6099 !important;
}

/* 뉴스: 수집 목록, 스크랩, 수동/자동 수집 모든 상태 */
:root[data-theme="light"] .news-page :is(
  .news-hero > p:not(.eyebrow),
  .news-view-heading > p,
  .news-collected-meta,
  .news-collected-badge,
  .news-clips-panel > p,
  .news-empty,
  .news-clip-meta,
  .news-article-meta,
  .news-article-summary,
  .news-query-summary,
  .news-saved-searches small
) {
  color: var(--monan-light-body) !important;
}

:root[data-theme="light"] .news-page :is(
  .news-view-heading h2,
  .news-collected-title,
  .news-article-title,
  .news-clip-title,
  .news-saved-searches h3
) {
  color: var(--monan-light-ink) !important;
}

:root[data-theme="light"] .news-page :is(.news-collected-view, .news-clips-panel, .news-saved-searches) {
  border-color: rgba(38, 64, 94, .18) !important;
  background: linear-gradient(145deg, #ffffff, #eff5fb) !important;
}

:root[data-theme="light"] .news-page :is(
  .news-advanced-query-panel,
  .news-search-diagnostics,
  .news-search-diagnostic-step,
  .news-keyword-group,
  .clips-panel,
  .news-results-panel
) {
  border-color: rgba(38, 64, 94, .18) !important;
  background: #f8fbfe !important;
}

:root[data-theme="light"] .news-page :is(
  .news-advanced-query-help,
  .news-advanced-query-example,
  .news-advanced-query-feedback,
  .news-search-diagnostic-step > span,
  .news-search-diagnostic-step small,
  .news-search-diagnostic-hint,
  .news-search-diagnostic-explanation,
  .news-meta,
  .clip-meta
) {
  color: var(--monan-light-body) !important;
}

:root[data-theme="light"] .news-page :is(.news-term-remove, .clip-button, .clip-remove) {
  border-color: #b8c8d8 !important;
  background: #ffffff !important;
  color: #526b84 !important;
}

:root[data-theme="light"] .news-page :is(.news-term-remove:hover, .clip-button:hover, .clip-remove:hover) {
  border-color: #7fa8d6 !important;
  background: #edf5fc !important;
  color: #1f6eaf !important;
}

:root[data-theme="light"] .news-page :is(.news-collected-article, .news-clip-item, .news-article) {
  border-color: rgba(38, 64, 94, .15) !important;
  background: #f8fbfe !important;
}

:root[data-theme="light"] .news-page :is(.news-view-action, .news-clip-action, .news-scrap-button, .news-search-button) {
  border-color: #4b87ba !important;
  background: #e8f2fc !important;
  color: #1f6eaf !important;
}

:root[data-theme="light"] .news-page :is(.news-view-action:hover, .news-clip-action:hover, .news-scrap-button:hover, .news-search-button:hover) {
  border-color: #1f6eaf !important;
  background: #dcecfb !important;
  color: #174f84 !important;
}

/* 유튜브: 영상 카드·선택/삭제 도구·자동 수집 규칙 */
:root[data-theme="light"] .youtube-page :is(
  .youtube-hero > p:not(.eyebrow),
  .youtube-video-meta,
  .youtube-video-empty,
  .youtube-empty,
  .youtube-video-bulk-count,
  .youtube-rules-empty,
  .youtube-rule-meta
) {
  color: var(--monan-light-body) !important;
}

:root[data-theme="light"] .youtube-page :is(.youtube-video-card, .youtube-rule-item, .youtube-video-item) {
  border-color: rgba(38, 64, 94, .18) !important;
  background: #f8fbfe !important;
}

:root[data-theme="light"] .youtube-page :is(
  .youtube-stat-card,
  .youtube-heading-badge,
  .youtube-subscription,
  .youtube-video-select,
  .youtube-video-modal,
  .youtube-video-modal-backdrop
) {
  border-color: rgba(38, 64, 94, .18) !important;
  background: #f2f7fc !important;
}

:root[data-theme="light"] .youtube-page :is(
  .youtube-stat-card span,
  .youtube-stat-card small,
  .youtube-updated-note,
  .youtube-channel-name,
  .youtube-subscription-detail,
  .youtube-subscription-timing,
  .youtube-thumbnail-placeholder,
  .youtube-video-modal > p:not(.eyebrow)
) {
  color: var(--monan-light-body) !important;
}

:root[data-theme="light"] .youtube-page :is(.youtube-subscription-title, .youtube-video-modal h2) {
  color: var(--monan-light-ink) !important;
}

:root[data-theme="light"] .youtube-page :is(.youtube-rule-toggle, .youtube-video-modal-actions button:first-child) {
  border-color: #b8c8d8 !important;
  background: #ffffff !important;
  color: #526b84 !important;
}

:root[data-theme="light"] .youtube-page .youtube-rule-toggle[aria-pressed="true"] {
  border-color: #6fb6a6 !important;
  background: #e7f8f3 !important;
  color: #167a75 !important;
}

:root[data-theme="light"] .youtube-page .youtube-video-select {
  box-shadow: 0 2px 7px rgba(31, 58, 91, .14) !important;
}

:root[data-theme="light"] .youtube-page .youtube-video-modal-backdrop {
  background: rgba(20, 36, 58, .38) !important;
}

:root[data-theme="light"] .youtube-page :is(.youtube-video-title, .youtube-rule-item h3, .youtube-rule-item strong) {
  color: var(--monan-light-ink) !important;
}

:root[data-theme="light"] .youtube-page :is(.youtube-source-badge, .youtube-auto-badge) {
  border-color: #8eb7dc !important;
  background: #e8f2fc !important;
  color: #1f6099 !important;
}

:root[data-theme="light"] .youtube-page :is(.youtube-bulk-delete, .youtube-delete, .youtube-delete-selected, .youtube-delete-all) {
  border-color: #d39aa1 !important;
  background: #fff1f3 !important;
  color: #a63d4a !important;
}

/* 오늘의 퀴즈: 출처, 용어 자료, 선택지와 해설의 낮은 대비를 보정합니다. */
:root[data-theme="light"] .quiz-page :is(
  .question-category,
  .question-source-label,
  .question-source-meta,
  .question-source-copy,
  .quiz-reference-intro,
  .quiz-reference-status,
  .quiz-reference-summary-copy,
  .quiz-reference-code
) {
  color: var(--monan-light-body) !important;
}

:root[data-theme="light"] .quiz-page :is(
  .question-title,
  .question-source strong,
  .quiz-reference-library h2,
  .quiz-reference-list h3,
  .quiz-reference-summary-action
) {
  color: var(--monan-light-ink) !important;
}

:root[data-theme="light"] .quiz-page :is(.question-article-excerpt, .question-source, .quiz-reference-list li, .quiz-reference-body) {
  border-color: rgba(38, 64, 94, .18) !important;
  background: #f8fbfe !important;
}

:root[data-theme="light"] .quiz-page :is(.question-source a, .question-source-references a, .quiz-reference-list a) {
  color: #1f6eaf !important;
}

:root[data-theme="light"] .quiz-page .quiz-submit:disabled {
  background: #d9e2eb !important;
  color: #6a7c90 !important;
}

/* 회원가입·로그인·회원정보: 폼의 보조 문구와 위험 작업까지 모두 읽히게 처리합니다. */
:root[data-theme="light"] :is(.auth-page, .login-page) :is(
  .login-card label,
  .login-card small,
  .login-card > p:not(.eyebrow),
  .profile-withdraw-section p,
  .profile-password-section p,
  .profile-withdraw-modal > p:not(.eyebrow),
  .profile-success-modal > p:not(.eyebrow)
) {
  color: var(--monan-light-body) !important;
}

:root[data-theme="light"] .login-page {
  background:
    radial-gradient(circle at 78% 0%, rgba(98, 161, 214, .19), transparent 33rem),
    linear-gradient(135deg, #f6f9fc 0%, #eef4fa 52%, #e8f0f8 100%) !important;
}

:root[data-theme="light"] :is(.auth-page, .login-page) :is(
  .login-card h1,
  .login-card h2,
  .login-card label,
  .profile-withdraw-section h2,
  .profile-password-section h2,
  .profile-withdraw-modal label
) {
  color: var(--monan-light-ink) !important;
}

:root[data-theme="light"] :is(.profile-withdraw-section, .profile-password-section) {
  border-color: rgba(38, 64, 94, .18) !important;
}

:root[data-theme="light"] .profile-withdraw-button {
  border-color: #d39aa1 !important;
  background: #fff1f3 !important;
  color: #a63d4a !important;
}

:root[data-theme="light"] .profile-password-button {
  border-color: #4b87ba !important;
  background: #e8f2fc !important;
  color: #1f6eaf !important;
}

:root[data-theme="light"] :is(.modal-backdrop, .profile-success-backdrop) {
  background: rgba(20, 36, 58, .38) !important;
}

/* 관리자: 탭, 통계, 사용자 목록, 접속 로그의 모든 텍스트 계층을 밝은 표면에 맞춥니다. */
:root[data-theme="light"] .admin-page :is(
  .admin-hero h1,
  .admin-panel-heading h2,
  .analytics-card .card-heading :is(h2, h3),
  .admin-service-link strong,
  .account-identity strong,
  .summary-card strong
) {
  color: var(--monan-light-ink) !important;
}

:root[data-theme="light"] .admin-page :is(
  .admin-hero > p:not(.eyebrow),
  .admin-panel-heading > p,
  .admin-service-link small,
  .account-list .account-identity small,
  .account-list-empty,
  .summary-card p,
  .card-heading small,
  .action-stats div,
  .admin-table-wrap td,
  .admin-table-wrap td::before,
  .day-bar span
) {
  color: var(--monan-light-body) !important;
}

:root[data-theme="light"] .admin-page :is(.admin-tabs-toolbar, .admin-table-wrap, .account-list) {
  border-color: rgba(38, 64, 94, .18) !important;
  background: #f2f7fc !important;
  box-shadow: 0 10px 26px rgba(31, 58, 91, .08) !important;
}

:root[data-theme="light"] .admin-page .admin-tab {
  color: #526b84 !important;
}

:root[data-theme="light"] .admin-page .admin-tab:hover {
  color: #1f6eaf !important;
  background: #eef5fb !important;
}

:root[data-theme="light"] .admin-page .admin-tab:is(.is-active, [aria-selected="true"]) {
  border-color: #7fa8d6 !important;
  background: #e8f2fc !important;
  color: #1f6eaf !important;
}

:root[data-theme="light"] .admin-page :is(.admin-refresh, .account-create button, .account-list button) {
  border-color: #4b87ba !important;
  background: #e8f2fc !important;
  color: #1f6eaf !important;
}

:root[data-theme="light"] .admin-page :is(.admin-refresh:hover, .account-create button:hover, .account-list button:hover) {
  border-color: #1f6eaf !important;
  background: #dcecfb !important;
  color: #174f84 !important;
}

:root[data-theme="light"] .admin-page :is(.admin-service-link, .admin-table-wrap tr) {
  border-color: rgba(38, 64, 94, .18) !important;
  background: linear-gradient(145deg, #ffffff, #eff5fb) !important;
}

:root[data-theme="light"] .admin-page .admin-service-link:hover {
  border-color: #7fa8d6 !important;
  background: #edf5fc !important;
}

:root[data-theme="light"] .admin-page .action-stats div,
:root[data-theme="light"] .admin-page .account-list div,
:root[data-theme="light"] .admin-page .daily-chart {
  border-color: rgba(38, 64, 94, .16) !important;
}

:root[data-theme="light"] .admin-page :is(.action-stats strong, .day-bar strong) {
  color: #1f6eaf !important;
}

/* CRS: 밝은 카드 위에서 작은 상태 텍스트와 정책 수치를 분명히 표시합니다. */
:root[data-theme="light"] :is(
  .page-description,
  .service-notice p,
  .system-status-label,
  .metric-card span,
  .exposure-card span,
  .mission-card p,
  .crisis-signals li span,
  .policy-agency,
  .range-meta,
  .policy-footer p,
  .policy-capacity,
  .policy-divider p
) {
  color: #4e6680 !important;
}

:root[data-theme="light"] :is(
  .mission-card h3,
  .crisis-signals h3,
  .metric-card strong,
  .exposure-card strong,
  .policy-label,
  .policy-label strong,
  .policy-heading h3
) {
  color: #142d49 !important;
}

:root[data-theme="light"] :is(.crisis-signals li, .policy-control-wrap, .citizen-approval) {
  border-color: rgba(38, 64, 94, .18) !important;
}

/* 사용자 계산기: 밝은 모드에서도 입력값, 수식, 계산 결과의 위계를 또렷하게 유지합니다. */
:root[data-theme="light"] .calculator-page {
  background: radial-gradient(circle at 86% 0%, rgba(83, 143, 204, .18), transparent 34rem), #eef4fa !important;
}

:root[data-theme="light"] .calculator-page :is(
  .calculator-hero h1,
  .library-heading h2,
  .workspace-heading h2,
  .definition-heading h3,
  .runner-heading h3,
  .template-heading h3,
  .calculator-list-item strong,
  .template-item strong
) {
  color: var(--monan-light-ink) !important;
}

:root[data-theme="light"] .calculator-page :is(
  .calculator-hero > div > p:not(.eyebrow),
  .calculator-note,
  .definition-heading > div > p:not(.eyebrow),
  .runner-help,
  .calculator-list-item small,
  .template-item small,
  .calculator-list-empty,
  .formula-guide,
  .runtime-placeholder,
  .definition-item label,
  .calculator-meta-section label,
  .runtime-input label
) {
  color: var(--monan-light-body) !important;
}

:root[data-theme="light"] .calculator-page :is(
  .calculator-library,
  .calculator-workspace,
  .definition-section,
  .formula-guide,
  .calculator-runner,
  .calculator-note,
  .calculator-list-item,
  .template-item,
  .definition-item,
  .runtime-result
) {
  border-color: rgba(38, 64, 94, .2) !important;
  background: linear-gradient(145deg, #ffffff, #eff5fb) !important;
  box-shadow: 0 14px 32px rgba(31, 58, 91, .08) !important;
}

:root[data-theme="light"] .calculator-page :is(
  .calculator-meta-section input,
  .calculator-meta-section textarea,
  .definition-item input,
  .definition-item textarea,
  .runtime-input input
) {
  border-color: #aebfd1 !important;
  background: #ffffff !important;
  color: #14243a !important;
}

:root[data-theme="light"] .calculator-page :is(.library-new, .outline-button) {
  border-color: #4b87ba !important;
  background: #e8f2fc !important;
  color: #1f6eaf !important;
}

:root[data-theme="light"] .calculator-page :is(.library-new:hover, .outline-button:hover) {
  border-color: #1f6eaf !important;
  background: #dcecfb !important;
  color: #174f84 !important;
}

:root[data-theme="light"] .calculator-page .calculator-list-item:is(:hover, .is-active) {
  border-color: #7fa8d6 !important;
  background: #e8f2fc !important;
}

:root[data-theme="light"] .calculator-page .primary-button {
  border-color: #1f6eaf !important;
  background: #1f6eaf !important;
  color: #ffffff !important;
}

:root[data-theme="light"] .calculator-page .runtime-result strong {
  color: #1f6eaf !important;
}

:root[data-theme="light"] .calculator-page .formula-guide code {
  background: #e8f2fc !important;
  color: #1f6eaf !important;
}

:root[data-theme="light"] .calculator-page .chatgpt-helper {
  border-color: #bfd0e2 !important;
}

:root[data-theme="light"] .calculator-page .chatgpt-helper :is(h3, .chatgpt-helper-message) {
  color: #14243a !important;
}

:root[data-theme="light"] .calculator-page .chatgpt-helper > p:not(.eyebrow):not(.chatgpt-helper-message) {
  color: #506987 !important;
}

:root[data-theme="light"] .calculator-page .chatgpt-helper textarea {
  border-color: #a9bfd7 !important;
  background: #ffffff !important;
  color: #14243a !important;
}

:root[data-theme="light"] .calculator-page .chatgpt-copy {
  border-color: #4b87ba !important;
  background: #e8f2fc !important;
  color: #1f6eaf !important;
}

:root[data-theme="light"] .calculator-page .chatgpt-open {
  border-color: #1f6eaf !important;
  background: #1f6eaf !important;
  color: #ffffff !important;
}

/*
 * Monan Scout 서비스 페이지 표준
 * 새 기능 페이지는 .monan-page-main 과 .monan-page-title을 사용합니다.
 * 공통 기준: 상단 62px · 좌우 max(3vw, 28px) · 제목 36~58px.
 */
:root {
  --monan-page-gutter: max(3vw, 28px);
  --monan-page-top: 62px;
  --monan-page-bottom: 92px;
  --monan-page-title-size: clamp(36px, 5vw, 58px);
  --monan-page-title-line-height: 1.05;
}

.monan-page-main {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: var(--monan-page-top) var(--monan-page-gutter) var(--monan-page-bottom) !important;
}

.monan-page-title {
  margin: 0 !important;
  color: #f4f6f1 !important;
  font-family: var(--monan-display-font) !important;
  font-size: var(--monan-page-title-size) !important;
  font-style: normal !important;
  font-weight: 400 !important;
  line-height: var(--monan-page-title-line-height) !important;
  letter-spacing: .02em !important;
  text-transform: none !important;
}

.monan-page-title em {
  color: var(--lime) !important;
  font-family: inherit !important;
  font-style: normal !important;
}

:is(.hero, .news-hero, .youtube-hero, .quiz-hero, .calculator-hero) {
  margin-bottom: 32px !important;
}

/* 게임 본문도 다른 서비스와 같은 좌우 기준선에서 시작합니다. */
.app-shell.monan-page-shell {
  max-width: none;
  margin: 0;
  padding-right: var(--monan-page-gutter);
  padding-left: var(--monan-page-gutter);
}

.monan-page-shell .game-layout {
  padding-top: var(--monan-page-top);
}

:root[data-theme="light"] .monan-page-title {
  color: #14243a !important;
  text-shadow: none !important;
}

:root[data-theme="light"] .monan-page-title em {
  color: #1f6eaf !important;
}

@media (max-width: 480px) {
  :root {
    --monan-page-gutter: 20px;
    --monan-page-top: 42px;
    --monan-page-title-size: 40px;
  }
}
/* 공개 둘러보기: 화면은 읽기 전용으로 열고, 개인 데이터 변경은 회원가입 뒤에만 허용합니다. */
.guest-auth-actions{display:inline-flex;align-items:center;gap:8px;margin-left:8px}
.guest-login-link,.guest-explore-link,.guest-signup-link{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:0 11px;border:1px solid var(--line,#b8c8d8);font-weight:700;font-size:.84rem;text-decoration:none}
.guest-login-link,.guest-explore-link{color:var(--ink,#102640);background:transparent}
.guest-signup-link{color:#fff;background:var(--accent,#2878c8);border-color:var(--accent,#2878c8)}
.guest-access-banner{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 24px;padding:14px 18px;border:1px solid color-mix(in srgb,var(--accent,#2878c8) 35%,transparent);background:color-mix(in srgb,var(--accent,#2878c8) 9%,transparent);color:var(--ink,#102640)}
.guest-access-banner div{display:grid;gap:3px}.guest-access-banner strong{font-size:.95rem}.guest-access-banner span{font-size:.86rem;opacity:.8}.guest-access-banner a{white-space:nowrap;color:var(--accent,#2878c8);font-weight:800;text-decoration:none}
.monan-page-shell>.crisis-guest-access-banner{margin:20px 0 0}
.guest-view .member-only-control{position:relative}.guest-view .member-only-control::after{content:'회원가입 후 사용';position:absolute;inset:0;display:grid;place-items:center;background:color-mix(in srgb,var(--surface,#fff) 82%,transparent);color:var(--accent,#2878c8);font-size:.85rem;font-weight:800;pointer-events:none}
.guest-view .member-only-control :is(input,select,textarea,button){pointer-events:none;opacity:.45}
@media (max-width:720px){.guest-access-banner{align-items:flex-start;flex-direction:column}.guest-auth-actions{margin-left:0}.guest-login-link,.guest-explore-link,.guest-signup-link{padding:0 8px}}
