/* StageFlow isolated UI palettes — editable without touching stageflow.css.
   Only the app shell / library / dialogs are themed. Performance Stage View
   remains contrast-safe and independent of user theme overrides.
   Tokens correspond 1:1 to documented stageflow.theme JSON keys. */
:root{
 --sf-theme-canvas:#0e1420; --sf-theme-surface:#142536;
 --sf-theme-raised:#253447; --sf-theme-header:#101d32;
 --sf-theme-border:#38516a; --sf-theme-text:#edf6fb;
 --sf-theme-muted:#a8bfd0; --sf-theme-accent:#16dce4;
 --sf-theme-accent-text:#04222b; --sf-theme-positive:#2bdb94;
}
body:not(.stageActive){background:var(--sf-theme-canvas);color:var(--sf-theme-text)}
body:not(.stageActive) header, body:not(.stageActive) .sfHeader{background:var(--sf-theme-header)}
body:not(.stageActive) aside,
body:not(.stageActive) .sfWelcomeCard,
body:not(.stageActive) .sfWelcomeHero,
body:not(.stageActive) .sfDialog,
body:not(.stageActive) dialog:not(.sfSongToolDialog),
body:not(.stageActive) .sfCloudSettings{background-color:var(--sf-theme-surface)}
body:not(.stageActive) .sfWelcomeHero{background-image:none}
body:not(.stageActive) button:not(.primary):not(.sfDrumStep):not(.sfSyncIndicator),
body:not(.stageActive) select,
body:not(.stageActive) input:not([type=color]):not([type=range]),
body:not(.stageActive) textarea{background-color:var(--sf-theme-raised);color:var(--sf-theme-text);border-color:var(--sf-theme-border)}
body:not(.stageActive) .primary,
body:not(.stageActive) button.primary,
body:not(.stageActive) .sfWelcomeActions button.primary{background:var(--sf-theme-accent);border-color:var(--sf-theme-accent);color:var(--sf-theme-accent-text)}
body:not(.stageActive) .sfWelcomeEyebrow,
body:not(.stageActive) .brand b{color:var(--sf-theme-accent)}
body:not(.stageActive) .sfWelcomeCard,
body:not(.stageActive) .sfWelcomeHero,
body:not(.stageActive) .sfCloudSettings{border-color:var(--sf-theme-border)}
body:not(.stageActive) .sfWelcomeHero h2,
body:not(.stageActive) .sfWelcomeCard h3{color:var(--sf-theme-text)}
body:not(.stageActive) .sfWelcomeHero p,
body:not(.stageActive) .sfWelcomeCard p,
body:not(.stageActive) .sfWelcomeFootnote{color:var(--sf-theme-muted)}
/* Isolated theme editor (color input itself must show the real selected color). */
.sfThemeEditor{border:1px solid var(--sf-theme-border);border-radius:12px;padding:12px;display:grid;gap:10px;margin:12px 0;background:var(--sf-theme-surface)}
.sfThemeEditor .sfThemeControls{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.sfThemeEditor #sfThemeFields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.sfThemeColorRow{display:flex;align-items:center;gap:8px;justify-content:space-between;font-size:12px;min-width:0}
.sfThemeColorRow span{flex:1;min-width:0}
.sfThemeColorRow input[type=color]{cursor:pointer;flex:none;height:32px;width:44px;border:1px solid var(--sf-theme-border);background:transparent;padding:2px;border-radius:6px}
.sfThemeColorRow code{font-size:10px}
#sfThemeStatus{color:var(--sf-theme-muted);font-size:12px}
@media(max-width:700px){.sfThemeEditor #sfThemeFields{grid-template-columns:1fr}}
