:root{color-scheme:light}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:7px 11px;min-height:36px;border:1px solid var(--line,#d9dbe1);border-radius:6px;background:transparent;color:inherit;font:500 12px/1.3 'DM Sans',system-ui,sans-serif;white-space:nowrap;cursor:pointer}
.theme-toggle:hover{background:#eceaf3}.theme-toggle:focus-visible{outline:3px solid #b9aee4;outline-offset:3px}
.theme-icon{font-size:19px;line-height:1}.auth-theme{position:absolute;top:20px;right:24px}.auth-page{padding-top:76px!important;padding-bottom:40px!important}.auth-theme .theme-toggle{width:auto;margin:0;background:transparent;color:inherit}
@media(max-width:750px){.main-nav{display:none}.theme-toggle{width:36px;padding:7px;flex:none}.theme-label{display:none}.header-actions{gap:7px}.site-header{gap:12px}.site-header .account-label{max-width:72px}.site-header .btn-small{padding:7px 10px}}
:root[data-theme="dark"]{color-scheme:dark;--bg:#14161d;--cream:#1d2029;--ink:#eef0f6;--sub:#b1b8ca;--faint:#929bb1;--line:#353b49;--accent:#b5a5ff;--accent-soft:#322c48;--shadow:none;--surface:#1d2029;--raised:#252935;--field:#171a22}
:root[data-theme="dark"] :is(.site-header,.panel,.admin-dialog,.modal-card,.card){background:var(--surface);color:var(--ink);border-color:var(--line)}
:root[data-theme="dark"] :is(.btn-outline,.btn-danger,.pill,.glyph-button){background:var(--surface);border-color:var(--line);color:var(--ink)}
:root[data-theme="dark"] :is(.btn-outline:hover,.theme-toggle:hover,.btn-light,.step-counter,.admin-stat,.admin-table th,.variant-buttons,.auth-toggle){background:var(--raised);color:var(--ink)}
:root[data-theme="dark"] :is(.btn-primary,.auth-page form>button){background:#7560ce;color:#fff}
:root[data-theme="dark"] :is(.btn-primary:hover,.auth-page form>button:hover){background:#866fe0}
:root[data-theme="dark"] :is(.pill.active,.glyph-button.selected,.glyph-button:hover,.variant.active,.auth-toggle button.active){background:var(--accent-soft);color:var(--accent);border-color:var(--accent)}
:root[data-theme="dark"] .glyph-button.done{background:#20352d;color:#b3dfc6}
:root[data-theme="dark"] .glyph-button.done.selected{background:var(--accent-soft);color:var(--accent)}
:root[data-theme="dark"] :is(.form-panel textarea,.form-panel select,.modal-card input,.admin-section input,.admin-section textarea,.admin-user-actions>select,#adminSearch,.admin-dialog textarea,.beta-card textarea,#adminActionName,.auth-page input){background:var(--field);color:var(--ink);border-color:var(--line)}
:root[data-theme="dark"] :is(.field-label,.account-label,.saved-indicator,.account-info,.privacy-note,.drawing-footer,.variant-bar>span,.draw-tips,.changelog-entry li,.auth-page p){color:var(--sub)}
:root[data-theme="dark"] :is(.mini-help,.step-counter,.text-meta,.changelog-entry time){color:var(--sub)}
:root[data-theme="dark"] :is(.preview-panel,.progress-track){background:#101218}
:root[data-theme="dark"] :is(.subtle-separator){background:var(--line)}
:root[data-theme="dark"] :is(.drawing-footer,.admin-section,.trash-row,.changelog-entry,.beta-card,.admin-table td,.admin-table th,.auth-page .hint){border-color:var(--line)}
:root[data-theme="dark"] :is(.live-announcement,.beta-banner,.notice){background:#282338;border-color:#4a3f66;color:#e1d8ff}
:root[data-theme="dark"] :is(.beta-banner strong,.release-status){color:var(--accent)}
:root[data-theme="dark"] :is(.btn-danger,.native-status.error,.admin-notice.error,.auth-error){color:#ffb8b3}
:root[data-theme="dark"] :is(.notice.error,.auth-page .error){background:#382328;border-color:#6b3d47;color:#ffc2bd}
:root[data-theme="dark"] :is(.admin-notice,.goodnotes-hint .native-status){color:#a5d9bb}
:root[data-theme="dark"] :is(.admin-notice.error,.goodnotes-hint .native-status.error){color:#ffb8b3}
:root[data-theme="dark"] .legal-draft{background:#332e22;border-color:#5a5037;color:#e4d6ac!important}
:root[data-theme="dark"] .skip-link{background:var(--surface)}
:root[data-theme="dark"] .admin-dialog::backdrop{background:#05070bc9}
/* These are actual sheets, not interface surfaces. Never invert canvases/images. */
.paper-item,.draw-canvas-wrap{color-scheme:light}
:root[data-theme="dark"] .paper-item{background:#fff;border-color:#414654;box-shadow:0 4px 16px #0005}

:root[data-theme="dark"] .auth-page{background:var(--bg);color:var(--ink)}
:root[data-theme="dark"] .auth-page a{color:var(--accent)}

@media(max-width:480px){.site-header .account-label{display:none}.legal-page .site-header{height:auto;min-height:62px;flex-wrap:wrap;padding-top:12px;padding-bottom:12px}}
