:root { color-scheme: light; }
input, select, textarea { color: var(--theme-text, #1f2937); background-color: var(--theme-surface, #fff); }
dialog { color: var(--theme-text, #1f2937); background: var(--theme-surface, #fff); }
input::placeholder, textarea::placeholder { color: var(--theme-muted, #6b7280); opacity: 1; }
.site-theme { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font: 13px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.site-theme-button-wrap { position: relative; display: inline-flex; }
.site-theme .site-theme-button { display: inline-grid; place-items: center; width: 36px; height: 36px; min-height: 36px; margin: 0; padding: 6px; border: 1px solid var(--theme-border-strong, #dfe3e8); border-radius: 50%; color: var(--theme-text-secondary, #475569); background: var(--theme-surface-muted, #f4f6f8); cursor: pointer; }
.site-theme .site-theme-button:hover { color: var(--theme-text, #1f2937); background: var(--theme-hover, #e9edf3); }
.site-theme .site-theme-button:focus-visible { outline: 2px solid var(--theme-focus, #2563eb); outline-offset: 3px; }
.site-theme .site-theme-button[aria-disabled="true"] { cursor: wait; opacity: .6; }
.site-theme-tooltip { position: absolute; top: calc(100% + 8px); left: 0; z-index: 100; width: max-content; max-width: min(230px, calc(100vw - 32px)); padding: 8px 11px; border: 1px solid var(--theme-border, #dfe3e8); border-radius: 8px; background: var(--theme-surface, #fff); color: var(--theme-text, #1f2937); box-shadow: 0 4px 14px var(--theme-shadow, #1118271a); font-size: 12px; line-height: 1.6; text-align: left; pointer-events: none; visibility: hidden; opacity: 0; transform: translateY(-3px); transition: opacity .15s ease, transform .15s ease, visibility .15s; }
.site-theme-tooltip > span { display: block; }
.site-theme-tooltip [data-next-mode] { color: var(--theme-muted, #6b7280); }
.site-theme-button-wrap:hover .site-theme-tooltip, .site-theme-button-wrap:focus-within .site-theme-tooltip { visibility: visible; opacity: 1; transform: translateY(0); }
.login-theme-header .site-theme-tooltip { left: auto; right: 0; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; animation-timing-function: ease-in-out; }
@media (prefers-reduced-motion: reduce) {
  .site-theme-tooltip { transition: none; transform: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
.site-theme-status { color: var(--theme-danger-text, #b91c1c); }
.site-theme-status:empty { display: none; }
.site-session-actions { align-items: center; flex-wrap: wrap; }
body.login-page { display: flex; flex-direction: column; }
.login-theme-header { display: flex; justify-content: flex-end; width: 100%; padding: 16px 24px; }
.login-main { flex: 1; display: grid; place-items: center; width: 100%; padding: 0 0 48px; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --theme-page-bg: #0b1220;
  --theme-surface: #111b2b;
  --theme-surface-muted: #182334;
  --theme-surface-inset: #202d40;
  --theme-hover: #223047;
  --theme-text: #e2e8f0;
  --theme-text-secondary: #cbd5e1;
  --theme-muted: #94a3b8;
  --theme-subtle: #a5b4c7;
  --theme-border: #334155;
  --theme-border-strong: #475569;
  --theme-info-bg: #1b304c;
  --theme-info-border: #365a85;
  --theme-link: #93c5fd;
  --theme-code: #7dd3fc;
  --theme-success-text: #86efac;
  --theme-success-bg: #18382b;
  --theme-danger-text: #fca5a5;
  --theme-danger-bg: #3b2028;
  --theme-danger-border: #854444;
  --theme-warning-text: #fbbf24;
  --theme-warning-bg: #362b14;
  --theme-warning-border: #765d24;
  --theme-purple-text: #c4b5fd;
  --theme-purple-bg: #30294b;
  --theme-orange-text: #fdba74;
  --theme-orange-bg: #3d2d20;
  --theme-nav-bg: #111b2bf5;
  --theme-backdrop: #020617b3;
  --theme-shadow: #00000040;
  --theme-focus: #60a5fa;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]), :root[data-theme="system"] {
    color-scheme: dark;
    --theme-page-bg: #0b1220;
    --theme-surface: #111b2b;
    --theme-surface-muted: #182334;
    --theme-surface-inset: #202d40;
    --theme-hover: #223047;
    --theme-text: #e2e8f0;
    --theme-text-secondary: #cbd5e1;
    --theme-muted: #94a3b8;
    --theme-subtle: #a5b4c7;
    --theme-border: #334155;
    --theme-border-strong: #475569;
    --theme-info-bg: #1b304c;
    --theme-info-border: #365a85;
    --theme-link: #93c5fd;
    --theme-code: #7dd3fc;
    --theme-success-text: #86efac;
    --theme-success-bg: #18382b;
    --theme-danger-text: #fca5a5;
    --theme-danger-bg: #3b2028;
    --theme-danger-border: #854444;
    --theme-warning-text: #fbbf24;
    --theme-warning-bg: #362b14;
    --theme-warning-border: #765d24;
    --theme-purple-text: #c4b5fd;
    --theme-purple-bg: #30294b;
    --theme-orange-text: #fdba74;
    --theme-orange-bg: #3d2d20;
    --theme-nav-bg: #111b2bf5;
    --theme-backdrop: #020617b3;
    --theme-shadow: #00000040;
    --theme-focus: #60a5fa;
  }
}
