/* 기존 다크 팔레트를 유지하고 공통 토큰으로 라이트 모드를 제공한다. */
:root { color-scheme: dark; --bg-topbar: rgba(10,14,26,.85); }
:root[data-theme="light"] {
    color-scheme: light;
    --bg: #f5f7fb;
    --bg-card: #ffffff;
    --bg-hover: #e8edf5;
    --bg-input: #f8fafc;
    --bg-topbar: rgba(255,255,255,.92);
    --text: #172033;
    --text-muted: #475569;
    --text-dim: #526078;
    --border: #dce2eb;
    --border-light: #c5cedc;
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #4338ca;
    --success: #047857;
    --warning: #92400e;
    --danger: #b91c1c;
    --shadow: 0 1px 3px rgba(15,23,42,.08);
    --shadow-lg: 0 10px 25px rgba(15,23,42,.12);
}
.topbar { background: var(--bg-topbar); }
.sidebar-nav { overflow-y: auto; min-height: 0; }
.interest-fieldset { border: 0; min-width: 0; margin-bottom: 20px; }
.interest-topics { display: flex; flex-wrap: wrap; gap: 6px; }
.interest-topics .checkbox-label { border: 1px solid var(--border-light); background: var(--bg-input); }
.interest-topics .checkbox-label:has(:checked) { border-color: var(--primary); color: var(--primary-light); }
.discovery-note { color: var(--text-muted); font-size: .85rem; margin: 8px 0 16px; overflow-wrap: anywhere; }
.discovery-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.discovery-controls select { width: auto; }
.discovery-item { display: flex; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.discovery-item:last-child { border-bottom: 0; }
.discovery-rank { font-weight: 800; color: var(--primary-light); min-width: 24px; }
.discovery-body { min-width: 0; flex: 1; }
.discovery-link { color: var(--text); text-decoration: none; }
.discovery-link:hover { color: var(--primary-light); text-decoration: underline; }
.discovery-reason { font-size: .8rem; color: var(--primary-light); margin-top: 10px; overflow-wrap: anywhere; }
.theme-switch { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--bg-input); flex-shrink: 0; }
.theme-switch button { font: inherit; font-size: .8rem; font-weight: 600; padding: 6px 10px; min-height: 32px; border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--text-muted); cursor: pointer; }
.theme-switch button:hover { background: var(--bg-hover); color: var(--text); }
.theme-switch button[aria-pressed="true"] { background: var(--primary-fill); color: #fff; }
:root[data-theme="light"] .briefing-hero { border-color: var(--border-light); background: radial-gradient(ellipse at top right,#e8e7ff 0,transparent 65%),var(--bg-card); }
:root[data-theme="light"] .hero-status { background: var(--bg-input); }
:root[data-theme="light"] .error-banner { color: #991b1b; }
:root[data-theme="light"] .job-succeeded { color: #047857; }
:root[data-theme="light"] .job-failed,
:root[data-theme="light"] .job-interrupted,
:root[data-theme="light"] .job-error { color: #991b1b!important; }
:root[data-theme="light"] .job-running { color: #4338ca; }
:root[data-theme="light"] .job-partial { color: #92400e; }
:root[data-theme="light"] .badge-hot { color: #b91c1c; }
:root[data-theme="light"] .badge-warm { color: #92400e; }
:root[data-theme="light"] .badge-cool { color: #4338ca; }
@media(max-width:480px) {
    .topbar { padding: 0 10px; gap: 8px; }
    .topbar-left { gap: 6px; min-width: 0; }
    .topbar-title { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .topbar-actions { gap: 6px; flex-shrink: 0; }
    .theme-switch button { padding: 6px 8px; }
}
