.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex-shrink: 0; margin-right: 12px; border-radius: 50%; background: transparent; color: var(--text-primary); }
.theme-toggle:hover { background: var(--bg-card-soft); color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.theme-toggle .icon { width: 22px; height: 22px; }
.theme-moon, :root[data-theme="light"] .theme-sun { display: none; }
:root[data-theme="light"] .theme-moon { display: block; }
:root[data-theme="light"] {
    color-scheme: light;
    --bg-primary: #fffefa;
    --bg-header: #fffefa;
    --bg-secondary: #fffefa;
    --bg-card: #fffefa;
    --bg-card-soft: #edf1f5;
    --bg-input: #f8fafc;
    --border-color: #d4dce5;
    --border-soft: #e0e5ec;
    --text-primary: #202b3a;
    --text-secondary: #536174;
    --text-muted: #657388;
    --accent: #94620e;
    --accent-strong: #a16a10;
    --accent-dark: #fff0d3;
    --link: #80550e;
    --danger: #b82b3a;
    --shadow-soft: 0 8px 24px rgba(28, 44, 65, .06);
}
:root[data-theme="light"] body { background: var(--bg-primary); }
:root[data-theme="light"] :is(.topbar, .topnav.open) { background: var(--bg-header); border-color: var(--border-color); }
:root[data-theme="light"] :is(.card, .post-card, .dropdown-panel, .mini-menu, .modal-panel, .message-bubble, .toast) { background: var(--bg-card); border-color: var(--border-color); color: var(--text-primary); }
:root[data-theme="light"] .community-shell .feed-panel.card { background: transparent; border: 0; }
:root[data-theme="light"] :is(.nav-icon, .community-nav-item, .post-copy, .sidebar-search .icon, .mail-item.unread strong) { color: var(--text-primary); }
:root[data-theme="light"] :is(.community-heading p, .community-motto, .community-signoff) { color: var(--text-secondary); }
:root[data-theme="light"] :is(.community-nav-item.active, .settings-nav button.active, .settings-nav button:hover, .segmented-control button.active, .contributor-row mark) { color: var(--accent); background: var(--accent-dark); }
:root[data-theme="light"] :is(.community-nav-item:hover, .profile-menu a:hover, .profile-menu button:hover, .dropdown-link:hover, .mini-menu button:hover, .conversation-item.active, .conversation-item:hover, .mail-item.active, .mail-item:hover) { background: var(--bg-card-soft); }
:root[data-theme="light"] :is(.composer-row textarea, .sidebar-search input, .attachment-box, .poll-card button, .ghost-button, .chip, .segmented-control button, .poll-option-field, .remove-option-button, .add-option-button) { background: var(--bg-input); color: var(--text-primary); border-color: var(--border-color); }
:root[data-theme="light"] :is(input, textarea)::placeholder { color: var(--text-muted); opacity: 1; }
:root[data-theme="light"] .community-shell .tab-button:not(.active) { background: var(--bg-card-soft); color: var(--text-secondary); }
:root[data-theme="light"] .community-shell .tab-button.active { box-shadow: 0 0 0 1px #d7b46b; }
:root[data-theme="light"] :is(.category-badge, .category-badge.neutral, .category-badge.accent) { background: #eef3f8; color: #47617c; border-color: #b9c9db; }
:root[data-theme="light"] :is(.top-actions, .recent-item, .topic-navigation) { border-color: var(--border-color); }
:root[data-theme="light"] .community-shell .feed-toolbar { background: transparent; }
:root[data-theme="light"] :is(.status-pill.blocked, .priority.medium, .month-grid em, .login-status.success) { color: #80550e; }
:root[data-theme="light"] :is(.priority.high, .login-status.error, .mini-menu .danger) { color: #b82b3a; }
:root[data-theme="light"] .priority.low { color: #536174; }
:root[data-theme="light"] .mobile-menu-toggle span { background: var(--text-primary); }
@media (max-width: 720px) { .theme-toggle { margin-right: 5px; width: 32px; } }
