html[data-theme="light"] {
  --bg: var(--site-bg);
  --panel: var(--site-panel);
  --panel2: var(--site-surface);
  --panel-raised: var(--site-elevated);
  --header: var(--site-panel);
  --rail-bg: var(--site-panel);
  --soft: var(--site-surface);
  --line: var(--site-line);
  --border: var(--site-line);
  --text: var(--site-text);
  --muted: var(--site-muted);
  --link: var(--site-accent);
  --accent: var(--site-accent);
  --accent2: #7f3329;
  --purple: var(--site-accent);
  --purple2: #7f3329;
  --green: var(--site-ok);
  --good: var(--site-ok);
  --error: #8f302b;
  --red: var(--error);
  --secondary-warn: #774820;
  --secondary-warn-bg: #f7e8d0;
  --secondary-error-bg: #fae1da;
  --secondary-input-line: #907d69;
  --secondary-shadow: 0 18px 45px #49372926;
}

html[data-theme="light"] body {
  background: var(--bg);
  color: var(--text);
}

html[data-theme="light"] :is(button, input, select, textarea, summary, a):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

html[data-theme="light"] :is(input, textarea)::placeholder {
  color: var(--muted);
}

html[data-theme="light"] :is(input[type="checkbox"], input[type="radio"]) {
  accent-color: var(--accent);
}

/* Account and public documents share the legal header, links and cards. */
html[data-theme="light"] :is(.legal-head, .legal-foot) {
  background: var(--panel);
}

html[data-theme="light"] .legal-logo {
  color: var(--text) !important;
}

html[data-theme="light"] .legal-sidebar a {
  color: var(--muted);
}

html[data-theme="light"] .legal-sidebar a:is(:hover, [aria-current="page"]) {
  background: var(--site-accent-soft);
  color: var(--accent);
}

html[data-theme="light"] :is(.legal-eyebrow, .account-note button) {
  color: var(--accent);
}

html[data-theme="light"] :is(.legal-article p, .legal-article li, .legal-operator dt, .account-wrap p, .pk-footer-version, .pk-account-version) {
  color: var(--muted);
}

html[data-theme="light"] .legal-article strong {
  color: var(--text);
}

html[data-theme="light"] :is(.legal-notice, .account-wrap .account-warning) {
  background: var(--secondary-warn-bg);
  border-color: var(--line);
  color: var(--secondary-warn);
}

html[data-theme="light"] .legal-table :is(td, th) {
  border-color: var(--line);
}

html[data-theme="light"] :is(.account-button, .auth-card button, #twoFactorHelpDialog button) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

html[data-theme="light"] .account-button.danger {
  background: var(--secondary-error-bg);
  border-color: var(--error);
  color: var(--error);
}

html[data-theme="light"] :is(.account-security-badge, .private-badge) {
  background: var(--site-accent-soft);
  border-color: var(--line);
  color: var(--accent);
}

html[data-theme="light"] :is(#disableTwoFactorDialog, #twoFactorHelpDialog, .auth-card, main:has(> .choices)) {
  background: var(--panel);
  border-color: var(--line);
  color: var(--text);
  box-shadow: var(--secondary-shadow);
}

html[data-theme="light"] :is(#disableTwoFactorDialog, #twoFactorHelpDialog)::backdrop {
  background: #342a206b;
}

html[data-theme="light"] :is(#disableTwoFactorCode, .auth-card input:not([type="checkbox"]), .channel-panel select, .create-row input, .copy-row input, .search-field input, .filter-field select) {
  background: var(--site-elevated);
  border-color: var(--secondary-input-line);
  color: var(--text);
}

html[data-theme="light"] :is(#disableTwoFactorStatus, main:has(> .choices) #message) {
  color: var(--error);
}

/* Registration and two-factor onboarding. */
html[data-theme="light"] :is(.auth-card p, .auth-card footer, .help-steps li, main:has(> .choices) p, .choice small) {
  color: var(--muted);
}

html[data-theme="light"] .auth-card :is(header, footer, .security-risk) {
  border-color: var(--line);
}

html[data-theme="light"] :is(.auth-card a, .auth-card h1 small, #twoFactorHelpDialog a, .manual-secret summary) {
  color: var(--accent);
}

html[data-theme="light"] :is(.auth-card .help-trigger, #twoFactorHelpDialog .help-dialog-head button, .choice) {
  background: var(--site-elevated);
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="light"] :is(.auth-card .help-trigger:hover, .choice:is(:hover, :focus-visible, .is-suggested)) {
  background: var(--site-accent-soft);
  border-color: var(--accent);
  color: var(--text);
}

html[data-theme="light"] .choice.is-suggested {
  box-shadow: 0 0 0 1px var(--accent) inset;
}

html[data-theme="light"] .auth-card :is(code, pre) {
  background: var(--site-workspace);
  color: var(--text);
}

html[data-theme="light"] :is(#requiredNotice, #securityStatus, .security-risk strong) {
  color: var(--secondary-warn);
}

html[data-theme="light"] .landing.beta-denied {
  background: var(--bg);
}

html[data-theme="light"] .beta-denied .landing-beta {
  background: var(--panel);
  border-color: var(--line);
}

html[data-theme="light"] .beta-denied .beta-access-link {
  background: var(--accent);
  color: #fff;
}

html[data-theme="light"] .beta-denied .beta-access-link:hover {
  background: var(--accent2);
  border-color: var(--accent2);
}

html[data-theme="light"] .beta-denied-home {
  color: var(--accent);
}

/* OBS moderator and shared services navigation. */
html[data-theme="light"] :is(.top, .sidebar, .topbar, .tm-sidebar, .tm-page-head, .tm-chat-column, .tm-community, .tm-footer) {
  background: var(--panel);
  border-color: var(--line);
}

html[data-theme="light"] :is(.top .brand strong, .top nav a[aria-current], .breadcrumb strong, .identity, .notes strong) {
  color: var(--text);
}

html[data-theme="light"] :is(.top a, .overline, .back-link, .nav-icon, .user-detail summary, .report-chronology > summary, .report-time, .bans-group h3) {
  color: var(--accent);
}

html[data-theme="light"] .panel button:not(.secondary, .approve-live),
html[data-theme="light"] :is(.tm-app .tm-btn.primary, .tm-unread) {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

html[data-theme="light"] :is(.panel button.secondary, .control-btn, .mini-btn, .ple-services-trigger, .tm-link, .tm-btn, .tm-user-actions button) {
  background: var(--site-elevated);
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="light"] :is(.control-btn, .mini-btn, .ple-services-trigger, .tm-link, .tm-btn, .tm-user-actions button):hover {
  background: var(--site-surface);
  color: var(--text);
}

html[data-theme="light"] .control-btn:hover:not(:disabled) {
  background: var(--site-surface);
}

html[data-theme="light"] .tm-app .tm-btn.primary:hover {
  background: var(--accent2);
  color: #fff;
}

html[data-theme="light"] :is(.panel .muted strong, .intro .muted strong, .stream-card strong, .secret-box strong) {
  color: var(--text);
}

html[data-theme="light"] :is(.channel-panel label, .stream-card small, .secret-box > label, .audio, .rules :is(ol, ul)) {
  color: var(--muted);
}

html[data-theme="light"] .panel:has(> #secretBox) > ol {
  color: var(--text);
}

html[data-theme="light"] :is(.state, .beta) {
  background: var(--site-accent-soft);
  border-color: var(--line);
  color: var(--accent);
}

html[data-theme="light"] :is(.state.ok, .stream-actions .approve-live, .mini-btn.restore, .feedback, .tag.good, .tm-pill.good) {
  background: var(--site-ok-soft);
  border-color: var(--site-ok);
  color: var(--site-ok);
}

html[data-theme="light"] :is(.state.warn, .tag.owner) {
  background: var(--secondary-warn-bg);
  border-color: var(--line);
  color: var(--secondary-warn);
}

html[data-theme="light"] :is(.stream-card, .secret-box, #previewDiagnostics, .admin-note, .user-card, .channel-card, .metric, .report-files li, .report-timeline li, .role-item) {
  background: var(--site-elevated);
  border-color: var(--line);
}

html[data-theme="light"] :is(.stream-card code, .ple-services-menu a) {
  color: var(--text);
}

html[data-theme="light"] .message {
  color: var(--site-ok);
}

html[data-theme="light"] :is(.message.error, .feedback.error, .mini-btn.danger, .tag.bad, .tm-feedback.error, .tm-btn.danger, .tm-user-actions [data-user-action="ban"]) {
  background-color: var(--secondary-error-bg);
  border-color: var(--error);
  color: var(--error);
}

html[data-theme="light"] :is(footer:has(> [data-app-version]), .footer) {
  border-color: var(--line);
  color: var(--muted);
}

html[data-theme="light"] footer:has(> [data-app-version]) :is(a, button) {
  color: var(--accent);
}

html[data-theme="light"] .ple-services-menu {
  background: var(--site-elevated);
  border-color: var(--line);
  box-shadow: var(--secondary-shadow);
}

html[data-theme="light"] .ple-services-menu a:is(:hover, [aria-current="page"]) {
  background: var(--site-accent-soft);
  color: var(--accent);
}

/* Admin views and report cards. */
html[data-theme="light"] :is(.brand small, .breadcrumb, .breadcrumb span, .updated, .notes, .sidesection, .version, .meta, .caution, .section-info, .nameblock .handle, .metric .label, .metric .sub, .role-item .role-status, .search-field span, .filter-field span, .pager, .empty, .event-item small) {
  color: var(--muted);
}

html[data-theme="light"] .nav button {
  color: var(--text);
}

html[data-theme="light"] :is(.nav button:hover, .nav button.active, .tag.lead, .avatar) {
  background: var(--site-accent-soft);
  border-color: var(--line);
  color: var(--accent);
}

html[data-theme="light"] :is(.chip, .tag, .channel-stats span) {
  background: var(--site-surface);
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="light"] :is(.health-row, .user-detail, .event-item, .empty) {
  border-color: var(--line);
}

html[data-theme="light"] .report-card > summary::marker {
  color: var(--accent);
}

html[data-theme="light"] .health-row b {
  color: var(--site-ok);
}

html[data-theme="light"] .health-row .warn {
  color: var(--secondary-warn);
}

/* Twitch moderator dashboard. Video, avatars and emotes retain their colors. */
html[data-theme="light"] :is(.tm-app a, .tm-footer-cookie, .tm-brand-name small, .tm-subtitle, .tm-community-chatter .tm-chatter-mark, .tm-community-group summary::before, .tm-community-permissions summary, .tm-overview-details > summary, .tm-point-event-head strong, .tm-point-event-head span, .tm-reward-symbol, .tm-reward span:not(.tm-reward-symbol), .tm-compose .tm-reply-indicator, .tm-selective-scopes summary, .tm-revoke-details summary) {
  color: var(--accent);
}

html[data-theme="light"] .tm-brand {
  color: var(--text);
}

html[data-theme="light"] :is(.tm-picker-button, .tm-stream-line, .tm-picker-popover, .tm-permission, .tm-stat, .tm-stream-stats .tm-stat, .tm-list-item, .tm-overview-details, .tm-quick-edit, .tm-point-event, .tm-reward, .tm-selective-scopes, .tm-revoke-details) {
  background: var(--site-elevated);
  border-color: var(--line);
}

html[data-theme="light"] .tm-picker-popover {
  box-shadow: var(--secondary-shadow);
}

html[data-theme="light"] :is(.tm-picker-button:hover, .tm-picker-button[aria-expanded="true"], .tm-channel:hover, .tm-channel.active, .tm-nav button.selected, .tm-chat-message .tm-badge, .tm-authorization, .tm-feedback:not(.error)) {
  background: var(--site-accent-soft);
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="light"] :is(.tm-nav button:hover, .tm-chat-message:hover, .tm-community-chatter:hover) {
  background: var(--site-surface);
  color: var(--text);
}

html[data-theme="light"] :is(.tm-nav button:not(.selected), .tm-sidebar-foot a, .tm-community-chatter, .tm-selective-scopes > label, .tm-audit-preview-line) {
  color: var(--text);
}

html[data-theme="light"] .tm-chat-message .tm-user[style] {
  filter: brightness(.42);
}

html[data-theme="light"] :is(.tm-card, .tm-audit-preview-line, .tm-community > hr, .tm-community > .tm-community-overview, .tm-community-recent, .tm-community-group, .tm-community-permissions) {
  border-color: var(--line);
}

html[data-theme="light"] :is(.tm-stream-card > .tm-card-head, .tm-stream-meta, .tm-quick-card > .tm-card-head, .tm-permissions-details, .tm-chat-head, .tm-compose, .tm-community-head) {
  background: var(--site-surface);
  border-color: var(--line);
}

html[data-theme="light"] :is(.tm-stream-line-title, .tm-sidebar-foot, .tm-sidebar-foot a:hover, .tm-authorization p, .tm-stream-meta p, .tm-stream-meta-live, .tm-quick-card .tm-empty, .tm-permissions-details > summary, .tm-permission span, .tm-stat span, .tm-chat-head span, .tm-chat-message .tm-time, .tm-community-small, .tm-community-status, .tm-community-hint, .tm-grant-status, .tm-community-chatter small, .tm-summary-hint, .tm-quick-edit label, .tm-community-search-label, .tm-pill.bad, .tm-footer) {
  color: var(--muted);
}

html[data-theme="light"] .tm-channel-dot {
  background: var(--accent);
  color: #fff;
}

html[data-theme="light"] :is(.tm-stream-meta-live.is-live, .tm-send-status) {
  color: var(--site-ok);
}

html[data-theme="light"] :is(.tm-chat-head input[type="search"], .tm-compose textarea, .tm-main input:not([type="checkbox"]), .tm-main textarea, .tm-main select) {
  background: var(--site-elevated);
  border-color: var(--secondary-input-line);
  color: var(--text);
}

html[data-theme="light"] .tm-pill:not(.good) {
  border-color: var(--line);
  color: var(--muted);
}

html[data-theme="light"] .tm-point-event blockquote {
  border-color: var(--accent);
  color: var(--text);
}
