:root{color-scheme:light;--minimap-bg:#fafbf7;--frame-outline:#e2e4db}
.theme-switch{display:inline-flex;align-items:center;gap:3px;padding:3px;border:1px solid #dedfe4;border-radius:11px;background:#f2f3f0;flex-shrink:0;width:max-content}
.theme-switch button{display:flex;align-items:center;justify-content:center;gap:5px;min-height:32px;padding:5px 9px;border:0;border-radius:8px;background:transparent;color:#656771;font:600 12px 'DM Sans',sans-serif;cursor:pointer}
.theme-switch svg{width:16px;height:16px;flex-shrink:0}
.theme-switch button[aria-pressed=true]{background:#fff;color:#5c47be;box-shadow:0 1px 4px #20243b18}
.theme-switch button:focus-visible{outline:2px solid #8b78ed;outline-offset:2px}
.auth-appearance{display:flex;justify-content:flex-end;margin-bottom:18px}
.dashboard-admin-actions{flex-wrap:wrap}
html[data-theme=night]{color-scheme:dark;--purple:#b2a2ff;--dark:#e8ebf3;--border:#343d4d;--muted:#a4adbe;--shadow:0 10px 40px #0005;--minimap-bg:#19202c;--frame-outline:#4b596f;background:#111620;color:#e8ebf3}
html[data-theme=night] body{background:#111620;color:#e8ebf3}
html[data-theme=night] :is(.rail,.topbar,.toolbox,.overview-panel,.object-toolbar,.connection-toolbar,.bottom-controls,.resize-panel,.popover,.modal,.weave-auth-card,.dashboard-sidebar,.dashboard-card,.dashboard-start>button,.dashboard-search,.dashboard-mobile-filters button,.dashboard-card-menu,.text-selection-toolbar,.frame-pagination,.minimap-wrap,.phone-frame-nav){background:#1b2230;color:#e8ebf3;border-color:#343d4d;box-shadow:0 8px 28px #0003}
html[data-theme=night] :is(#dashboard,.dashboard-main,#workspaceGate,.modal-backdrop){background-color:#111620}
html[data-theme=night] #viewport{background-color:#111620;background-image:radial-gradient(#344055 1px,transparent 1px)}
html[data-theme=night] :is(.board-title,.breadcrumbs,.dashboard-back,.icon-button,.tool,.rail-button,.overview-toggle,.connect-toggle,.board-badge,.weave-text-button,.auth-switches button,.auth-brand,.dashboard-brand,.weave-brand-word,.dashboard-header h1,.dashboard-section-heading h2,.dashboard-card h3,.dashboard-start strong,.modal h1,.modal h2,.overview-panel h3,.board-menu-item){color:#e8ebf3}
html[data-theme=night] :is(.breadcrumbs,.save-status,.dashboard-header p,.dashboard-account-line,.dashboard-eyebrow,.dashboard-card-meta,.dashboard-start small,.dashboard-sidebar-note,.modal p,.auth-existing,.auth-legal,.weave-auth-card p,.overview-panel p,.modal-eyebrow){color:#aab4c6}
html[data-theme=night] :is(.dashboard-sidebar nav button,.dashboard-workspace strong,.dashboard-card-name,.dashboard-card-menu button,.popover button,.overview-item,.frame-title,.bottom-controls button){color:#e8ebf3}
html[data-theme=night] :is(.button-outline,.board-badge,.overview-toggle,.connect-toggle,.dashboard-role,.dashboard-plan,.dashboard-workspace,.guest-banner,.dashboard-card-preview,.dashboard-card-menu button:hover,.popover button:hover,.overview-item:hover,.tool:hover,.icon-button:hover,.rail-button:hover,.phone-frame-nav button){background:#252f40;color:#dce3f3;border-color:#3b485e}
html[data-theme=night] :is(.button-primary,.dashboard-mobile-filters button.active){background:#b2a2ff;color:#171329;border-color:#b2a2ff}
html[data-theme=night] :is(.tool.active,.rail-button.active,.dashboard-sidebar nav button.active){background:#393157;color:#d4caff}
html[data-theme=night] :is(.modal,.weave-auth-card,.resize-panel,.popover,.text-selection-toolbar) :is(input:not([type=color]),textarea,select),html[data-theme=night] .dashboard-search input{background:#121925;color:#edf0f7;border-color:#46536a}
html[data-theme=night] :is(.modal,.weave-auth-card) label{color:#cdd5e5}
html[data-theme=night] :is(input,textarea)::placeholder{color:#929db2}
html[data-theme=night] .theme-switch{background:#111925;border-color:#3c475a}
html[data-theme=night] .theme-switch button{color:#aeb8ca}
html[data-theme=night] .theme-switch button[aria-pressed=true]{background:#41365d;color:#e7dfff;box-shadow:none}
html[data-theme=night] :is(.rail-divider,.tool-divider,.top-divider,.title-separator){background:#3b4557}
html[data-theme=night] .subtle-note{color:#aab4c6!important}
html[data-theme=night] .board-node.text{color:#e8ebf3}
html[data-theme=night] .board-node.shape{color:#343430}
html[data-theme=night] .board-node.frame{background:#ffffff04;border-color:#4b596f}
html[data-theme=night] .frame-title{background:#252f40}
html[data-theme=night] .phone-note-editor{background:#1b2230!important;color:#e8ebf3}
html[data-theme=night] .connection-line{stroke:#b7a6ee}
html[data-theme=night] .connection-label rect{fill:#252f40;stroke:#46536a}
html[data-theme=night] .connection-label text{fill:#e8ebf3}
html[data-theme=night] :is(.dashboard-plan-note,.admin-summary,.admin-user-card){background:#252f40;color:#dce3f3;border-color:#3b485e}
html[data-theme=night] :is(.dashboard-plan strong,.admin-user-overview strong){color:#ddd3ff}
html[data-theme=night] :is(.dashboard-plan p,.admin-user-identity>span,.admin-user-details>span,.admin-user-overview span){color:#b4bfd3}
html[data-theme=night] :is(.dashboard-card-art,.template-art,.board-card-preview,.frame-preview){background:#19202c;border-color:#3b485e}
html[data-theme=night] :is(.dashboard-card-options,.shortcut-button,.panel-footer,.template-card,.board-card,.admin-user-overview>div){background:#252f40;color:#dce3f3;border-color:#3b485e}
html[data-theme=night] .dashboard-start-icon{color:#5b4b79}
html[data-theme=night] .dashboard-card-menu button:focus-visible{background:#393157;color:#e8ebf3}
html[data-theme=night] .dashboard-card-menu .dashboard-menu-danger{color:#ffa7b5;border-color:#46536a}
html[data-theme=night] .dashboard-card-menu .dashboard-menu-danger:is(:hover,:focus-visible){background:#512d3b}
html[data-theme=night] .admin-user-badges span{background:#393157;color:#ddd3ff}
@media(max-width:700px){html[data-theme=night] .canvas-topline{background:linear-gradient(#111620 0%,#111620 75%,#11162000 100%)}}
@media(max-width:1120px){.topbar-actions .theme-switch button{padding:5px 7px}.topbar-actions .theme-switch button span{display:none}.topbar-actions .theme-switch{gap:1px}}
@media(max-width:600px){.theme-switch button{min-height:32px}.dashboard-admin-actions{gap:8px}.topbar-actions .theme-switch{padding:2px}.topbar-actions .theme-switch button{padding:5px}.auth-appearance{margin-bottom:12px}}
