/* Neutral surfaces and warm orange. Never recolour raster media, canvas inks or video. */
body:not(.light){--bg:#242527;--panel:#2e2f32;--text:#f4f3ef;--muted:#bebfbe;--border:#585a5e;--line:var(--border);--theme-surface:#353639;--theme-field:#292a2d;--theme-hover:#414246;--theme-selected:#4c3525;--theme-accent:#f1a060;--accent:#f1a060;--accent-dim:#f1a06024;--on-accent:#242527;--canvas-surface:#212225;--canvas-dot:#44464a;--error:#ff9c91;--ok:#9cd2ad;--theme-ruler:#d0cfcb;--theme-ruler-line:#797a7e;color-scheme:dark}
body.light{--bg:#f3f3f0;--panel:#fbfbf9;--text:#292a2c;--muted:#5d6065;--border:#b9bbb8;--line:var(--border);--theme-surface:#eaeae6;--theme-field:#f4f4f1;--theme-hover:#e3e3de;--theme-selected:#f9e3d3;--theme-accent:#984313;--accent:#b65319;--accent-dim:#b653191a;--on-accent:#fffaf5;--canvas-surface:#efefec;--canvas-dot:#c6c7c2;--error:#a62d25;--ok:#28623b;--theme-ruler:#53565a;--theme-ruler-line:#a4a6a2;color-scheme:light}
body{background:var(--bg);color:var(--text);accent-color:var(--accent);scrollbar-color:var(--border) var(--bg)}
body :is(.titlebar,.sidebar,.inspector,.prompt-bar,.canvas-toolbar,.collection-view,dialog,.context-menu,.painter-menu,.provider-card,.creator-multi-panel,.creator-color-palette,.project-card,.node-caption,.workflow-toolbar,.workflow-input-panel,.mood-dialog,.mood-options,.creator-gallery-panel){background:var(--panel);color:var(--text);border-color:var(--border)}
body :is(.node,.preview-frame,.painter-window,.video-editor){border-color:var(--border)}
body :is(select,.search-input,.modal-input,.prompt-row textarea,.parameter-selector,.creator-multi-trigger,.creator-color-trigger,.creator-color-search,.creator-multi-choice,.creator-color-option,.settings-row select,.video-setting input,.video-setting select,.alpha-dialog input:not([type=range]):not([type=checkbox]),.alpha-dialog textarea,.alpha-dialog select){background:var(--theme-field);color:var(--text);border-color:var(--border)}
body :is(input,textarea)::placeholder{color:var(--muted);opacity:1}
body :is(.nav-button,.title-actions button,.prompt-label,.prompt-footer,.canvas-hint,.node-prompt,.preview-heading>button,.preview-tabs button,.compare-controls,.edit-controls,.setting-line,.presets-tabs>button,.preset-footer,.inline-note,.collection-heading p,.project-meta,.empty-state,.modal-copy,.modal-field,.tutorial-list,.creator-fill-subtitle,.creator-field-label,.creator-preview-label,.creator-range-limits,.creator-color-note,.creator-no-colors,.connection-note,.provider-state,.provider-credential-label,.provider-message,.extra-reference-count,.extra-reference-item small,.extra-reference-message,.real-job-label,.real-job-message,.history-job-kind,.workflow-selection-count,.alpha-dialog .muted,.alpha-dialog .note,.alpha-dialog .materialMeta small,.alpha-dialog .alpha-preset small){color:var(--muted)}
body :is(.secondary-button,.modal-header button,.section-toggle,.model-refresh,.context-menu button,.painter-menu button,.alpha-dialog button,.workflow-toolbar button,.painter-choice button){background:var(--theme-surface);color:var(--text);border-color:var(--border)}
body :is(.secondary-button:hover,.nav-button:hover,.context-menu button:hover,.painter-menu button:hover:not(:disabled),.alpha-dialog button:hover:not(:disabled),.workflow-toolbar button:hover:not(:disabled),.project-card:hover){background:var(--theme-hover);color:var(--text);border-color:var(--accent)}
body :is(.primary-button,.primary-button:hover,.alpha-dialog button.primary,.alpha-dialog .primary.prepare){background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
body :is(.primary-button:disabled,.generation-confirm-dialog .primary-button:disabled,.alpha-dialog button.primary:disabled){opacity:1;background:var(--theme-surface);color:var(--muted);border:1px solid var(--border);cursor:not-allowed}
body :is(.nav-button.active,.nav-button.active:hover,.preset.active,.creator-multi-choice.selected,.creator-color-option.selected,.mood-option.selected,.mood-option:focus-visible,.inspector button.active,.preview-tabs button.active,.media-tabs button.active,.presets-tabs>button.active,.painter-choice button.active){color:var(--theme-accent);background:var(--theme-selected);border-color:var(--accent)}
body :is(.preset.active .preset-label,.creator-range-value,.creator-filled-value,.creator-multi-count,.provider-setup-link,.real-output-list a,.scale-range-value,.project-storage-status,.node.selected .node-caption,.workflow-input-row button,.workflow-group-name,.workflow-group-label,.painter-badge,.workflow-port:focus-visible){color:var(--theme-accent)}
body :is(.preset,.creator-gallery-trigger,.creator-gallery-option,.mood-card,.mood-option,.visual-creator-form .creator-field-range,.visual-creator-form .creator-field-number,.alpha-dialog .materialCard,.alpha-dialog .storyCard){background:var(--theme-surface);color:var(--text);border-color:var(--border)}
body :is(.creator-live-preview,.architecture-preview-area,.architecture-preview,.architecture-actions,.creator-form-actions,.creator-multi-panel-heading,.generation-confirm-prompt,.generation-input-review,.extra-references,.extra-reference-item,.mood-preview,.mood-actions button:first-child,.workflow-input-row,.preview-placeholder,.workflow-draft-label){background:var(--theme-surface);color:var(--text);border-color:var(--border)}
body :is(.creator-preview-text,.creator-preset-name,.parameter-selector:after,.creator-color-arrow,.extra-reference-heading,.workflow-input-panel strong,.visual-creator-form .creator-field-range .creator-field-label,.visual-creator-form .creator-field-number .creator-field-label){color:var(--text)}
body :is(.mood-field-name,.creator-choice-category,.creator-selection-count){background:var(--theme-selected);color:var(--theme-accent)}
body :is(.canvas,.canvas-grid){background-color:var(--canvas-surface)}
body .canvas-grid{background-image:radial-gradient(var(--canvas-dot) 1px,transparent 1px)}
body :is(.node.selected,.workflow-group.selected,.creator-dummy .node-media){border-color:var(--accent)}
body :is(.node-port,.workflow-port){background:var(--panel);border-color:var(--accent)}
body #connections path{stroke:var(--accent)}
body .workflow-group{background:var(--accent-dim);border-color:var(--accent)}
body :is(.workflow-group-name,.workflow-draft-label){background:var(--theme-selected)}
body :is(.workflow-input-panel p,.workflow-input-row span){color:var(--muted)}
body :is(.brandmark,.demo-tag){background:var(--theme-selected);color:var(--theme-accent);border-color:var(--accent)}
body .toast{background:var(--panel);color:var(--text);border-color:var(--border)}
body dialog::backdrop{background:#16171999;backdrop-filter:blur(3px)}
body :is(button,input,select,textarea,summary,a):focus-visible{outline-color:var(--accent)}
body .drop-hint{background:var(--theme-selected);color:var(--theme-accent)}
body :is(.inline-error,.node-job-error,.creator-validation,.creator-field-empty .creator-field-label){color:var(--error)}
body :is(.model-connection-status.connected,.provider-state.connected){color:var(--ok)}
body :is(.model-connection-status.unavailable,.model-connection-status.not-connected,.project-legacy-badge,.project-storage-status.storage-error){color:var(--theme-accent)}
body :is(.higgsfield-cost-review,.generation-confirm-dialog .higgsfield-cost-review){border-color:var(--accent)}
html[data-filmocraft-auth] body :is(form,section){background:var(--panel);color:var(--text);border-color:var(--border)}
html[data-filmocraft-auth] body :is(input,.secret,.codes,button.secondary){background:var(--theme-field);color:var(--text);border-color:var(--border)}
html[data-filmocraft-auth] body button:not(.secondary):not(.danger):not(.link){background:var(--accent);color:var(--on-accent)}
html[data-filmocraft-auth] body :is(h1 span,a,.tag){color:var(--theme-accent)}
html[data-filmocraft-auth] body button.link{background:transparent;color:var(--muted)}
html[data-filmocraft-auth] body .warning{background:var(--theme-selected);border-color:var(--accent);color:var(--text)}
html[data-filmocraft-auth] body .warning p{color:var(--text)}
html[data-filmocraft-auth] body button.danger{color:var(--error)}
body.light .alpha-dialog button.primary,body:not(.light) .alpha-dialog button.primary{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}body.light .alpha-dialog button.primary:disabled,body:not(.light) .alpha-dialog button.primary:disabled{background:var(--theme-surface);color:var(--muted);border-color:var(--border)}
body #realPreview{background:var(--theme-surface);color:var(--text)}body .node-job-status.status-local{background:var(--panel);color:var(--text);border-color:var(--border)}body .node.selected{box-shadow:0 0 0 3px var(--accent-dim)}
