:root {
  --ff-font: "HarmonyOS Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  --ff-canvas:#fffaf3; --ff-surface:#fffefd; --ff-subtle:#f7f2e9; --ff-tint:#fff0d1;
  --ff-ink:#24231f; --ff-muted:#6b685e; --ff-line:#e8e1d5; --ff-line-strong:#b5ac9b;
  --ff-accent:#ffb238; --ff-accent-ink:#995705; --ff-on-accent:#30220c; --ff-secondary:#23796e;
  --ff-good:#23725d; --ff-warn:#915614; --ff-danger:#ad4050; --ff-radius:8px; --ff-button-radius:7px;
  --ff-shadow-ink:#322a1c; --ff-shadow:0 5px 20px #6d521711; --ff-control-shadow:0 1px 2px #624a1510;
  --ff-inset:none; --ff-blur:none; --ff-border-width:1px; --ff-heading-weight:730; --ff-gap:20px;
}
:root[data-ui-theme="glass"] {
  --ff-canvas:#e2eeeb; --ff-surface:#ffffffbc; --ff-subtle:#f0f7f4b8; --ff-tint:#d4eae8d9;
  --ff-ink:#173b3b; --ff-muted:#4f6c6c; --ff-line:#b8d0cd; --ff-line-strong:#6faaa7;
  --ff-accent:#197d82; --ff-accent-ink:#12676d; --ff-on-accent:#fff; --ff-secondary:#bd6555;
  --ff-shadow-ink:#143c38; --ff-shadow:0 8px 30px #193c3214, inset 0 1px #fff;
  --ff-control-shadow:0 2px 7px #1e51470c; --ff-radius:8px; --ff-blur:blur(18px) saturate(130%);
}
:root[data-ui-theme="bento"] {
  --ff-canvas:#edf2ed; --ff-surface:#fff; --ff-subtle:#f1f5ed; --ff-tint:#e0ecd9;
  --ff-ink:#20362d; --ff-muted:#5b6d61; --ff-line:#d8e2d6; --ff-line-strong:#94ad98;
  --ff-accent:#286753; --ff-accent-ink:#215e49; --ff-on-accent:#fff; --ff-secondary:#a36e19;
  --ff-shadow-ink:#193b2e; --ff-shadow:0 2px 8px #24463208; --ff-control-shadow:none; --ff-gap:14px;
}
:root[data-ui-theme="neumo"] {
  --ff-canvas:#e4ece8; --ff-surface:#e4ece8; --ff-subtle:#e0e9e4; --ff-tint:#d4e7dc;
  --ff-ink:#234036; --ff-muted:#506b5d; --ff-line:#ccd9d0; --ff-line-strong:#93ac9c;
  --ff-accent:#23765f; --ff-accent-ink:#1a644f; --ff-on-accent:#fff; --ff-secondary:#9d5b4a;
  --ff-shadow-ink:#486454; --ff-shadow:7px 7px 17px #bdccc3, -7px -7px 17px #ffffff;
  --ff-control-shadow:3px 3px 7px #bdccc3, -3px -3px 7px #ffffff;
  --ff-inset:inset 3px 3px 7px #bdccc3, inset -3px -3px 7px #fafffc;
}
:root[data-ui-theme="mist"] {
  --ff-canvas:#e3e7ef; --ff-surface:#e3e7ef; --ff-subtle:#dee3ec; --ff-tint:#d8e5f4;
  --ff-ink:#303d50; --ff-muted:#59687c; --ff-line:#cbd2df; --ff-line-strong:#99a7bf;
  --ff-accent:#396fb6; --ff-accent-ink:#2e5f9c; --ff-on-accent:#fff; --ff-secondary:#a3614c;
  --ff-shadow-ink:#667387; --ff-shadow:5px 5px 12px #b6c0d0, -5px -5px 12px #fff;
  --ff-control-shadow:2px 3px 5px #b3bdce, -2px -2px 5px #fff;
  --ff-inset:inset 3px 3px 5px #b3bdce, inset -3px -3px 5px #fff;
}
:root[data-ui-theme="cinema"] {
  --ff-canvas:#151719; --ff-surface:#202326; --ff-subtle:#282c30; --ff-tint:#373127;
  --ff-ink:#f0f0e9; --ff-muted:#b4b8b9; --ff-line:#3b4044; --ff-line-strong:#70787c;
  --ff-accent:#e9bc65; --ff-accent-ink:#f0c77a; --ff-on-accent:#28231a; --ff-secondary:#72c9bd;
  --ff-good:#8bd2af; --ff-warn:#e7bd72; --ff-danger:#ff9aaa;
  --ff-shadow-ink:#000; --ff-shadow:0 3px 12px #0003; --ff-control-shadow:none;
}
:root[data-ui-theme="swiss"] {
  --ff-canvas:#f4f5f4; --ff-surface:#fff; --ff-subtle:#f0f1ef; --ff-tint:#f9e5e1;
  --ff-ink:#202222; --ff-muted:#626866; --ff-line:#d4d8d5; --ff-line-strong:#8a938e;
  --ff-accent:#bf3b32; --ff-accent-ink:#a4302a; --ff-on-accent:#fff; --ff-secondary:#26756e;
  --ff-radius:2px; --ff-button-radius:2px; --ff-shadow:none; --ff-control-shadow:none; --ff-heading-weight:780;
}
:root[data-ui-theme="pop"] {
  --ff-canvas:#f6f5ef; --ff-surface:#fffefa; --ff-subtle:#f0eee2; --ff-tint:#f9e5a5;
  --ff-ink:#252923; --ff-muted:#5f645c; --ff-line:#343b32; --ff-line-strong:#252923;
  --ff-accent:#ecc04a; --ff-accent-ink:#75520b; --ff-on-accent:#252923; --ff-secondary:#2862a0;
  --ff-radius:4px; --ff-button-radius:3px; --ff-shadow:3px 3px 0 #343b32; --ff-control-shadow:2px 2px 0 #343b32;
  --ff-border-width:1.5px; --ff-heading-weight:800;
}

/* Shared semantic contracts, including lazy-loaded legacy modules. */
html[data-ui-theme] {
  --ink:var(--ff-ink)!important; --muted:var(--ff-muted)!important; --faint:var(--ff-muted)!important;
  --line:var(--ff-line)!important; --panel:var(--ff-surface)!important; --solid:var(--ff-surface)!important;
  --bg:var(--ff-canvas)!important; --card:var(--ff-surface)!important; --accent:var(--ff-accent-ink)!important;
  --blue:var(--ff-secondary)!important; --green:var(--ff-good)!important; --danger:var(--ff-danger)!important;
  color:var(--ff-ink); background:var(--ff-canvas); font-family:var(--ff-font);
}
html[data-ui-theme] body { background:var(--ff-canvas)!important; color:var(--ff-ink)!important; font-family:var(--ff-font)!important; }
html[data-ui-theme] *,html[data-ui-theme] *::before,html[data-ui-theme] *::after { letter-spacing:0!important; }
html[data-ui-theme] :focus-visible { outline:3px solid var(--ff-accent-ink)!important; outline-offset:3px; }
html[data-ui-theme] :is(button,input,select,textarea) { accent-color:var(--ff-accent-ink); }
html[data-ui-theme] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea) {
  color:var(--ff-ink)!important; background:var(--ff-surface)!important;
  border-color:var(--ff-line)!important; border-radius:var(--ff-button-radius)!important; box-shadow:var(--ff-inset);
}
html[data-ui-theme] :is(input,textarea)::placeholder { color:var(--ff-muted)!important; opacity:.8; }
html[data-ui-theme] option { background:var(--ff-canvas); color:var(--ff-ink); }
html[data-ui-theme] :is(button,.button,.btn,.ec-btn) { border-radius:var(--ff-button-radius); }
html[data-ui-theme] :is(h1,h2,h3,h4) { color:var(--ff-ink); font-weight:var(--ff-heading-weight); }
html[data-ui-theme] :is(.primary,.x6-primary,.xr-primary,.remix-primary,.ec-btn.primary,.reference-generate-btn,.composer-generate,.ff-primary,.arrow-send) {
  background:var(--ff-accent)!important; color:var(--ff-on-accent)!important; border-color:var(--ff-accent)!important;
  box-shadow:var(--ff-control-shadow); border-radius:var(--ff-button-radius)!important;
}
html[data-ui-theme] :is(.primary,.x6-primary,.remix-primary,.ec-btn.primary):hover:not(:disabled) { filter:brightness(.96); }
html[data-ui-theme] button:disabled { opacity:.5; filter:none; }
html[data-ui-theme] :is(.app,.main,.page,.studio-shell,.home-work-column,.creation-stage,.commercial-layout) { background-color:transparent!important; }
html[data-ui-theme] :is(.topbar,.sidebar,.workspace-rail,.video-project-rail) {
  background:var(--ff-surface)!important; border-color:var(--ff-line)!important; backdrop-filter:var(--ff-blur);
}
html[data-ui-theme] .topbar { box-shadow:0 1px 0 var(--ff-line); }
html[data-ui-theme] .sidebar { display:flex; flex-direction:column; padding-bottom:12px!important; }
html[data-ui-theme] .sidebar>.brand { flex-shrink:0; border-bottom-color:var(--ff-line)!important; min-height:78px; }
html[data-ui-theme] .sidebar>.nav { min-height:0; flex:1 1 auto; overflow-y:auto; scrollbar-width:thin; }
html[data-ui-theme] .sidebar>.workspace-credit-box { position:static!important; inset:auto!important; flex:0 0 auto; width:auto!important; margin:12px 14px!important; padding:12px 14px!important; background:var(--ff-subtle)!important; border-color:var(--ff-line)!important; box-shadow:none!important; border-radius:var(--ff-radius)!important; }
html[data-ui-theme] .workspace-credit-box strong { color:var(--ff-ink)!important; }
html[data-ui-theme] .sidebar .sidebar-settings { position:static!important; flex:0 0 auto; width:auto!important; margin:0 14px!important; padding:0!important; display:flex!important; flex-direction:column; gap:6px; border:0!important; }
html[data-ui-theme] .sidebar .sidebar-settings .settings-main { width:100%; min-height:38px; justify-content:flex-start; gap:10px; padding:6px 12px!important; }
html[data-ui-theme] .brand-copy strong { font-size:21px!important; white-space:nowrap; }
html[data-ui-theme] :is(.brand-copy strong,.topbar-user strong,.task-inbox,.topbar-tool) { color:var(--ff-ink)!important; }
html[data-ui-theme] .brand-copy small { display:none!important; }
html[data-ui-theme] .brand .logo-line { gap:5px!important; }
html[data-ui-theme] .brand .signal-logo { width:42px!important; height:48px!important; }
html[data-ui-theme] .signal-logo img { object-fit:contain; width:100%; height:100%; filter:none!important; }
.ff-brand-tv { color:var(--ff-accent-ink); font-weight:760; }
html[data-ui-theme] .workspace-switcher { color:var(--ff-ink)!important; background:var(--ff-subtle)!important; border-color:var(--ff-line)!important; }
html[data-ui-theme] :is(.avatar,.credit-pill) { background:var(--ff-tint)!important; color:var(--ff-accent-ink)!important; border-color:var(--ff-line)!important; }
html[data-ui-theme] .system-state { background:color-mix(in srgb,var(--ff-good) 9%,var(--ff-surface))!important; color:var(--ff-good)!important; }
html[data-ui-theme] .sidebar :is(.nav>button,.workspace-secondary-nav button,.reference-creation-subnav button,.reference-admin-subnav button) { background:transparent!important; color:var(--ff-muted)!important; border-radius:var(--ff-button-radius)!important; }
html[data-ui-theme] .sidebar :is(.nav>button.active,.workspace-secondary-nav button.active,.reference-creation-subnav button.active,.reference-admin-subnav button.active) { color:var(--ff-accent-ink)!important; background:var(--ff-tint)!important; box-shadow:inset 3px 0 var(--ff-accent); }
html[data-ui-theme] .sidebar button:hover:not(:disabled) { background:var(--ff-subtle)!important; }

/* The complete app uses the same material for framed tools, dialogs and repeated items. */
html[data-ui-theme] :is(.panel,.card,.composer,.command-deck,.signal-card,.commercial-card,.workspace-card,.home-panel,.home-queue,.home-feed,.home-continue-card,.radar-card,.viral-card,.radar-filter-panel,.radar-filter-bar,.radar-summary-card,.radar-stat-card,.radar-video-card,.remix-input-panel,.remix-analysis-panel,.remix-settings,.remix-source-panel,.editing-workspace,.editing-settings-panel,.editing-preview-panel,.editing-batch-card,.publishing-panel,.publish-panel,.asset-card,.asset-folder,.knowledge-card,.knowledge-assets-shell,.knowledge-assets-panel,.knowledge-assets-card,.account-settings-section,.x6-compose,.x6-chat,.x6-settings,.x6-gallery,.x6-project-rail,.x6-knowledge-card,.x6-result,.ec-card,.ec-panel,.ec-modal,.ec-dialog) {
  background:var(--ff-surface)!important; border-color:var(--ff-line)!important;
  border-radius:var(--ff-radius)!important; box-shadow:var(--ff-shadow); backdrop-filter:var(--ff-blur);
}
html[data-ui-theme] :is(dialog,.dialog,.modal,.dropdown-menu,.popover,.context-menu,.project-list-popover,.x6-category-menu) {
  color:var(--ff-ink)!important; background:var(--ff-surface)!important; border-color:var(--ff-line)!important; border-radius:var(--ff-radius)!important;
}
html[data-ui-theme] dialog::backdrop { background:#1a252b66; backdrop-filter:blur(4px); }
html[data-ui-theme] :is(thead,th) { color:var(--ff-muted)!important; background:var(--ff-subtle)!important; }
html[data-ui-theme] :is(td,th,tr) { border-color:var(--ff-line)!important; }
html[data-ui-theme] .xqv6 {
  --x6-ink:var(--ff-ink)!important; --x6-muted:var(--ff-muted)!important; --x6-line:var(--ff-line)!important;
  --x6-accent:var(--ff-accent-ink)!important; --x6-selected:var(--ff-tint)!important; color:var(--ff-ink)!important;
}
html[data-ui-theme] :is(body,.page,.xqv6,.ec-app,.ec-shell) { --ui-brand:var(--ff-accent-ink)!important; --ui-ink:var(--ff-ink)!important; --ui-muted:var(--ff-muted)!important; --ui-brand-soft:var(--ff-tint)!important; }
html[data-ui-theme] #viralRemixRoot { --xr-purple:var(--ff-accent-ink)!important; }
html[data-ui-theme] .x6-modes { background:var(--ff-subtle)!important; border-color:var(--ff-line)!important; gap:8px; padding:6px; }
html[data-ui-theme] .x6-modes button { background:transparent!important; box-shadow:none; }
html[data-ui-theme] .x6-modes button[aria-selected="true"] { background:var(--ff-surface)!important; border-color:var(--ff-line)!important; color:var(--ff-accent-ink)!important; box-shadow:var(--ff-shadow); }
html[data-ui-theme] .x6-modes button[aria-selected="true"]::after { background:var(--ff-accent)!important; }
html[data-ui-theme] .x6-modes :is(.x6-mode-art,.x6-mode-avatar,.x6-mode-mark) { border-color:var(--ff-line)!important; }
html[data-ui-theme] :is(.x6-messages,.x6-brief,.x6-project-item,.x6-chat-suggestions button,.x6-segment,.x6-agent-summary,.remix-constraint-summary) { background:var(--ff-subtle)!important; border-color:var(--ff-line)!important; }
html[data-ui-theme] .x6-message p { color:var(--ff-ink)!important; background:var(--ff-surface)!important; border-color:var(--ff-line)!important; }
html[data-ui-theme] .x6-message.user p { background:var(--ff-tint)!important; color:var(--ff-ink)!important; }
html[data-ui-theme] :is(.x6-segment button[aria-pressed="true"],.x6-filters button[aria-pressed="true"],.x6-category-root[aria-current="true"],.x6-tags button[aria-pressed="true"]) { color:var(--ff-accent-ink)!important; background:var(--ff-tint)!important; border-color:var(--ff-accent-ink)!important; }
html[data-ui-theme] .x6-numbers button[aria-pressed="true"] { background:var(--ff-accent)!important; color:var(--ff-on-accent)!important; }
html[data-ui-theme] .x6-agent-word { color:var(--ff-accent-ink)!important; }
html[data-ui-theme] .x6-knowledge-card[aria-pressed="true"] { border-color:var(--ff-accent-ink)!important; outline:1px solid var(--ff-accent-ink); }
html[data-ui-theme] .x6-project-item[aria-current="true"] { background:var(--ff-tint)!important; border-color:var(--ff-accent-ink)!important; }
html[data-ui-theme] :is(.home-work-column::before,.home-work-column::after,.login-bg::before,.login-bg::after) { display:none!important; }
html[data-ui-theme] .login-bg { background:var(--ff-canvas)!important; }
html[data-ui-theme] .login-card { background:var(--ff-surface)!important; box-shadow:var(--ff-shadow)!important; color:var(--ff-ink)!important; border:1px solid var(--ff-line)!important; border-radius:var(--ff-radius)!important; }
html[data-ui-theme] .login-card :is(p,label,h1,strong) { color:var(--ff-ink)!important; }
html[data-ui-theme] .signal-login-brand .logo { width:56px; height:56px; }
html[data-ui-theme] .signal-login-brand strong { font-size:25px; }
html[data-ui-theme] .signal-login-brand em { display:none; }
html[data-ui-theme] :is(.ec-shell,.ec-content,.ec-workspace,.ec-main) { background:transparent!important; color:var(--ff-ink)!important; }
html[data-ui-theme] :is(.ec-step,.ec-toolbar,.ec-tabs,.ec-header,.ec-two-fields,.ec-field) { border-color:var(--ff-line)!important; }
html[data-ui-theme] .ec-tabs .active { background:var(--ff-accent)!important; color:var(--ff-on-accent)!important; }

/* Brand artwork is presentation-only; it never replaces project or result media. */
html[data-ui-theme] {
  --ff-peach:#fff0d5; --ff-peach-ink:#9a5200;
  --ff-blue:#e9edff; --ff-blue-ink:#495eb4;
  --ff-mint:#e0f3ec; --ff-mint-ink:#18765d;
  --ff-coral:#ffe8e3; --ff-coral-ink:#b34b44;
  --ff-lilac:#f0e8fa; --ff-lilac-ink:#7b4e9e;
}
html[data-ui-theme="cinema"] {
  --ff-peach:#493821; --ff-peach-ink:#ffd391;
  --ff-blue:#2e3653; --ff-blue-ink:#bbcaff;
  --ff-mint:#233e35; --ff-mint-ink:#a6dfcb;
  --ff-coral:#4e302e; --ff-coral-ink:#ffc2b8;
  --ff-lilac:#3e3049; --ff-lilac-ink:#dfc0fa;
}
html[data-ui-theme] :is(.nav>button,.dashboard-quick-actions>button,.home-core-metrics>div):nth-of-type(5n+1) { --ff-feature:var(--ff-peach); --ff-feature-ink:var(--ff-peach-ink); }
html[data-ui-theme] :is(.nav>button,.dashboard-quick-actions>button,.home-core-metrics>div):nth-of-type(5n+2) { --ff-feature:var(--ff-blue); --ff-feature-ink:var(--ff-blue-ink); }
html[data-ui-theme] :is(.nav>button,.dashboard-quick-actions>button,.home-core-metrics>div):nth-of-type(5n+3) { --ff-feature:var(--ff-mint); --ff-feature-ink:var(--ff-mint-ink); }
html[data-ui-theme] :is(.nav>button,.dashboard-quick-actions>button,.home-core-metrics>div):nth-of-type(5n+4) { --ff-feature:var(--ff-coral); --ff-feature-ink:var(--ff-coral-ink); }
html[data-ui-theme] :is(.nav>button,.dashboard-quick-actions>button,.home-core-metrics>div):nth-of-type(5n+5) { --ff-feature:var(--ff-lilac); --ff-feature-ink:var(--ff-lilac-ink); }
html[data-ui-theme] .sidebar .nav>button>svg { box-sizing:content-box; width:18px; height:18px; padding:6px; border-radius:8px; color:var(--ff-feature-ink)!important; background:var(--ff-feature)!important; flex-shrink:0; }
html[data-ui-theme] body.studio-redesign .dashboard-quick-actions>button>svg { box-sizing:content-box; width:22px!important; height:22px!important; padding:10px!important; flex:0 0 22px; border-radius:8px; background:var(--ff-feature)!important; color:var(--ff-feature-ink)!important; box-shadow:inset 0 1px #ffffff80; }
html[data-ui-theme] .home-core-metrics>div>svg { box-sizing:content-box; padding:8px; background:var(--ff-feature)!important; color:var(--ff-feature-ink)!important; border-radius:8px; }
html[data-ui-theme] .home-core-metrics>div { border-top:2px solid color-mix(in srgb,var(--ff-feature-ink) 35%,var(--ff-line))!important; }
html[data-ui-theme] .x6-modes .x6-mode-art {
  width:76px; height:76px; flex:0 0 76px; background-image:url('/assets/brand/firefly-roles-v2.png')!important;
  background-size:200% 200%!important; background-repeat:no-repeat!important;
  background-position:left top!important; border:0!important; box-shadow:none!important; border-radius:8px;
}
html[data-ui-theme] .x6-modes .x6-mode-art>* { visibility:hidden; }
html[data-ui-theme] .x6-mode-quick .x6-mode-art { background-color:var(--ff-peach)!important; }
html[data-ui-theme] .x6-modes .x6-mode-chat .x6-mode-art { background-position:right top!important; background-color:var(--ff-blue)!important; }
html[data-ui-theme] .x6-modes .x6-mode-inspire .x6-mode-art { background-position:left bottom!important; background-color:var(--ff-mint)!important; }
html[data-ui-theme] .x6-modes button { min-height:120px; }
html[data-ui-theme] .x6-modes .x6-mode-chat .x6-mode-copy>small { color:var(--ff-blue-ink)!important; }
html[data-ui-theme] .x6-modes .x6-mode-inspire .x6-mode-copy>small { color:var(--ff-mint-ink)!important; }
html[data-ui-theme] .x6-avatar { background:transparent!important; object-fit:contain; }
html[data-ui-theme] .x6-choice-grid>.x6-choices:nth-child(1)>legend { color:var(--ff-blue-ink); }
html[data-ui-theme] .x6-choice-grid>.x6-choices:nth-child(2)>legend { color:var(--ff-coral-ink); }
html[data-ui-theme] .x6-choice-grid>.x6-choices:nth-child(3)>legend { color:var(--ff-mint-ink); }
html[data-ui-theme] .x6-choice-grid>.x6-choices:nth-child(4)>legend { color:var(--ff-lilac-ink); }
html[data-ui-theme] .x6-results>.x6-empty { min-height:124px; display:flex; justify-content:center; align-items:center; gap:16px; color:var(--ff-muted); background:var(--ff-subtle); }
html[data-ui-theme] .x6-results>.x6-empty::before { content:''; display:block; flex:0 0 74px; height:74px; background:url('/assets/brand/firefly-roles-v2.png') left top / 200% 200% no-repeat; }
html[data-ui-theme] :is(.asset-empty-state,.dashboard-insight-empty,.xr-empty)>svg { background:var(--ff-blue); color:var(--ff-blue-ink)!important; padding:10px; box-sizing:content-box; border-radius:8px; }
html[data-ui-theme] .xr-brand { background:var(--ff-peach)!important; color:var(--ff-peach-ink)!important; }
html[data-ui-theme] .xr-brand>img { width:60px; height:60px; object-fit:contain; }
html[data-ui-theme] .xr-brand strong { color:var(--ff-peach-ink)!important; }
html[data-ui-theme] .xr-input-tabs>button:nth-child(1)>svg { color:var(--ff-blue-ink)!important; background:var(--ff-blue)!important; }
html[data-ui-theme] .xr-input-tabs>button:nth-child(2)>svg { color:var(--ff-mint-ink)!important; background:var(--ff-mint)!important; }
html[data-ui-theme] .xr-input-tabs>button:nth-child(3)>svg { color:var(--ff-coral-ink)!important; background:var(--ff-coral)!important; }
html[data-ui-theme] body.studio-redesign .home-operations-head .dashboard-hero-mark { width:110px!important; height:110px!important; background:url('/assets/brand/firefly-roles-v2.png') left top / 200% 200% no-repeat!important; border:0!important; box-shadow:none!important; transform:none!important; }
html[data-ui-theme] .dashboard-hero-mark>* { display:none!important; }
html[data-ui-theme] body.studio-redesign .page-create:not(.task-mode) .home-operations-head::before { display:none!important; }
html[data-ui-theme="firefly"] body.studio-redesign .page-create:not(.task-mode) .home-operations-head {
  min-height:184px!important; padding:24px 28px!important; background:#fff9f0 url('/assets/brand/firefly-studio-header-v2.png') right center / auto 100% no-repeat!important;
  border-top:0!important; border-bottom:1px solid var(--ff-line)!important; gap:20px;
}
html[data-ui-theme="firefly"] body.studio-redesign .page-create:not(.task-mode) .home-operations-copy { width:58%!important; max-width:640px!important; }
html[data-ui-theme="firefly"] body.studio-redesign .home-operations-head .dashboard-hero-mark { display:none!important; }
html[data-ui-theme="firefly"] body.studio-redesign .page-create:not(.task-mode) .home-operations-copy h1 { font-size:28px!important; line-height:1.35; color:#302b23!important; }
html[data-ui-theme="firefly"] .home-operations-copy p { color:#716252!important; max-width:410px; }
html[data-ui-theme="firefly"] .x6-heading { padding-left:68px; position:relative; min-height:70px; }
html[data-ui-theme="firefly"] .x6-heading::before { content:''; position:absolute; left:0; top:0; width:56px; height:66px; background:url('/assets/brand/firefly-mascot.png') center / contain no-repeat; }
html[data-ui-theme="firefly"] body[data-content-v6-view="library"] .x6-heading::before { width:60px; height:60px; background:url('/assets/brand/firefly-roles-v2.png') right bottom / 200% 200% no-repeat; }
html[data-ui-theme] .editing-workbench-empty { color:#f4f1e9!important; }
html[data-ui-theme] .editing-workbench-empty :is(b,span,svg) { color:#e6e6e1!important; }

/* Distinct composition and material, not eight color swaps. */
html[data-ui-theme="firefly"] .x6-modes button:nth-child(1) .x6-mode-art { background-color:var(--ff-peach)!important; }
html[data-ui-theme="firefly"] .x6-modes button:nth-child(2) .x6-mode-art { background-color:var(--ff-blue)!important; }
html[data-ui-theme="firefly"] .x6-modes button:nth-child(3) .x6-mode-art { background-color:var(--ff-mint)!important; }
html[data-ui-theme="firefly"] .topbar { border-top:3px solid #ffbd5b; }
html[data-ui-theme="glass"] :is(.main>.topbar,.sidebar) { background:#ffffff99!important; box-shadow:inset 0 1px #fff; }
html[data-ui-theme="glass"] .ff-theme-panel { background:#f6fffcf2!important; }
html[data-ui-theme="glass"] :is(.x6-compose,.x6-chat,.x6-settings,.x6-gallery) { border:1px solid #ffffff!important; }
html[data-ui-theme="bento"] :is(.x6-compose,.x6-chat,.x6-settings,.x6-gallery,.panel,.ec-card) { border-width:1px!important; }
html[data-ui-theme="bento"] :is(.x6-split,.studio-shell,.editing-grid,.remix-workspace) { gap:14px!important; }
html[data-ui-theme="bento"] .x6-modes { grid-template-columns:1.2fr 1fr 1fr; }
html[data-ui-theme="bento"] .x6-modes button:nth-child(2) { background:#e9e1f1!important; }
html[data-ui-theme="bento"] .x6-modes button:nth-child(3) { background:#f7edc9!important; }
html[data-ui-theme="bento"] .x6-modes button[aria-selected="true"] { border-color:var(--ff-accent)!important; box-shadow:inset 0 -3px var(--ff-accent); }
html[data-ui-theme="bento"] .workspace-credit-box { border-left:3px solid #d3ac4e!important; }
html[data-ui-theme="neumo"] :is(.x6-modes,.x6-segment,.x6-brief) { box-shadow:var(--ff-inset); }
html[data-ui-theme="neumo"] :is(button.ghost,.xqv6 button:not(.x6-primary):not(.x6-mode-button),.ec-btn:not(.primary)) { box-shadow:var(--ff-control-shadow); }
html[data-ui-theme="neumo"] :is(.x6-numbers button[aria-pressed="true"],.x6-segment button[aria-pressed="true"]) { box-shadow:var(--ff-inset); }
html[data-ui-theme="mist"] :is(.x6-modes,.workspace-credit-box,.x6-chat-compose) { box-shadow:var(--ff-inset)!important; }
html[data-ui-theme="mist"] :is(.x6-settings,.x6-compose,.x6-gallery) { border-left:3px solid #94b6e1!important; }
html[data-ui-theme="mist"] :is(button.ghost,.xqv6 button:not(.x6-primary)) { box-shadow:var(--ff-control-shadow); }
html[data-ui-theme="cinema"] :is(.x6-modes,.x6-segment,.sidebar-settings,.workspace-credit-box) { border-color:var(--ff-line)!important; }
html[data-ui-theme="cinema"] .x6-mode-art { background:#36312a!important; }
html[data-ui-theme="cinema"] :is(.x6-project-rail,.x6-settings) { border-top:2px solid #8a7043!important; }
html[data-ui-theme="swiss"] :is(.x6-modes,.x6-compose,.x6-chat,.x6-gallery,.x6-settings) { border-radius:2px!important; box-shadow:none!important; }
html[data-ui-theme="swiss"] :is(.x6-panel-heading,.x6-heading,.page-header,.section-head) { box-shadow:inset 0 -1px var(--ff-line); }
html[data-ui-theme="swiss"] .x6-modes button[aria-selected="true"]::after { height:2px; width:calc(100% - 34px); }
html[data-ui-theme="pop"] :is(.panel,.card,.x6-compose,.x6-chat,.x6-settings,.x6-gallery,.x6-result,.ec-card,.login-card) { border:1.5px solid var(--ff-line)!important; }
html[data-ui-theme="pop"] :is(.primary,.x6-primary,.ec-btn.primary) { border:1.5px solid var(--ff-line)!important; }
html[data-ui-theme="pop"] .x6-modes button:nth-child(2) { background:#e4e9fa!important; }
html[data-ui-theme="pop"] .x6-modes button:nth-child(3) { background:#f4ddd5!important; }
html[data-ui-theme="pop"] .x6-modes button[aria-selected="true"] { box-shadow:3px 3px 0 var(--ff-line); }

.ff-theme-trigger { width:100%; min-height:48px!important; display:flex!important; align-items:center; justify-content:flex-start; gap:9px; padding:8px 10px!important; border:1px solid var(--ff-line)!important; color:var(--ff-ink)!important; background:var(--ff-subtle)!important; box-shadow:var(--ff-control-shadow); }
.ff-theme-trigger>svg { width:18px; height:18px; flex-shrink:0; color:var(--ff-accent-ink); }
.ff-theme-trigger>svg:last-child { margin-left:auto; width:13px; }
.ff-theme-trigger>span { display:flex; flex-direction:column; align-items:flex-start; gap:2px; }
.ff-theme-trigger small { font-size:10px; color:var(--ff-muted); }
.ff-theme-trigger b { font-size:12px; font-weight:650; }
.ff-theme-global { position:fixed; z-index:55; left:16px; bottom:18px; width:176px; }
.ff-theme-panel { position:fixed; inset:auto; left:var(--ff-popup-left,14px); bottom:var(--ff-popup-bottom,80px); margin:0; width:min(424px,calc(100vw - 24px)); max-height:var(--ff-popup-height,calc(100dvh - 120px)); padding:0; background:var(--ff-surface); color:var(--ff-ink); border:1px solid var(--ff-line); border-radius:var(--ff-radius); box-shadow:0 8px 32px #10202226; overflow:auto; backdrop-filter:var(--ff-blur); }
.ff-theme-panel>header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px 8px; border-bottom:1px solid var(--ff-line); }
.ff-overline { font-size:10px; color:var(--ff-accent-ink); font-weight:700; }
.ff-theme-panel h2 { font-size:14px; margin:0; }
.ff-theme-panel>header button { display:grid; place-items:center; width:30px; height:30px; padding:6px; background:var(--ff-subtle); color:var(--ff-ink); border:1px solid var(--ff-line); }
.ff-theme-panel svg { width:17px; height:17px; flex-shrink:0; }
.ff-theme-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; padding:12px; }
.ff-theme-grid>button { min-width:0; display:block; padding:0; overflow:hidden; text-align:left; background:var(--ff-subtle); color:var(--ff-ink); border:1px solid var(--ff-line); border-radius:6px; }
.ff-theme-grid>button[aria-checked="true"] { outline:2px solid var(--ff-accent-ink); outline-offset:2px; }
.ff-theme-thumb { display:block; position:relative; aspect-ratio:1.3; border-bottom:1px solid var(--ff-line); background:var(--theme-preview); }
.ff-theme-thumb img { display:block; width:100%; height:100%; object-fit:cover; object-position:left top; }
.ff-theme-number { position:absolute; top:7px; left:7px; padding:2px 5px; font-size:10px; font-weight:650; background:var(--theme-swatch); color:var(--theme-swatch-ink); border-radius:3px; }
.ff-theme-label { display:flex; align-items:center; gap:2px; padding:7px 6px; }
.ff-theme-label strong { font-size:11px; white-space:nowrap; }
.ff-theme-label>svg { width:14px; height:14px; color:var(--ff-accent-ink); }
.ff-theme-check { margin-left:auto; color:var(--ff-accent-ink); visibility:hidden; }
.ff-theme-check svg { width:12px; height:12px; }
[aria-checked="true"] .ff-theme-check { visibility:visible; }
.ff-theme-grid>button>small { display:block; font-size:10px; padding:0 10px; color:var(--ff-muted); }
.ff-theme-panel>footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 24px; border-top:1px solid var(--ff-line); }
.ff-theme-panel>footer span { font-size:12px; color:var(--ff-muted); }
.ff-theme-panel>footer button { min-height:38px; padding:6px 18px; border:0; background:var(--ff-accent); color:var(--ff-on-accent); }
.ff-theme-status { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
html[data-ui-theme] #settingsPanel[data-ui-anchored="true"] { position:fixed!important; inset:auto!important; left:var(--ff-popup-left,14px)!important; bottom:var(--ff-popup-bottom,64px)!important; margin:0!important; width:min(360px,calc(100vw - 24px))!important; max-height:min(460px,var(--ff-popup-height,calc(100dvh - 120px)))!important; overflow-y:auto!important; z-index:10000; box-shadow:0 8px 32px #10202226!important; }
html[data-ui-theme] #settingsPanel[data-ui-anchored="true"] .account-settings-head { position:sticky; top:0; z-index:1; padding:12px 16px; background:var(--ff-surface); }
html[data-ui-theme] #settingsPanel[data-ui-anchored="true"] .account-settings-body { padding:14px 16px; }
html[data-ui-theme] #settingsPanel[data-ui-anchored="true"] .account-settings-head h2 { font-size:15px; }
html[data-ui-theme] :is(.account-security-entry,.auth-form .auth-checkbox) { color:var(--ff-ink)!important; }
.ff-settings-menu { position:fixed; inset:auto; left:var(--ff-popup-left,14px); bottom:var(--ff-popup-bottom,64px); margin:0; width:min(224px,calc(100vw - 24px)); max-height:var(--ff-popup-height,calc(100dvh - 120px)); overflow:auto; padding:8px; background:var(--ff-surface); color:var(--ff-ink); border:1px solid var(--ff-line); border-radius:var(--ff-radius); box-shadow:0 6px 24px #10202226; backdrop-filter:var(--ff-blur); }
.ff-settings-menu>header { display:flex; gap:9px; align-items:center; padding:7px 6px; }
.ff-settings-avatar { display:grid; place-items:center; width:32px; height:32px; border-radius:6px; background:var(--ff-tint); color:var(--ff-accent-ink); }
.ff-settings-avatar svg { width:17px; height:17px; }
.ff-settings-menu header strong { font-size:12px; display:block; max-width:154px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ff-settings-menu header small { display:block; font-size:10px; color:var(--ff-muted); }
.ff-settings-credits { display:flex; align-items:center; justify-content:space-between; padding:4px 6px 9px; border-bottom:1px solid var(--ff-line); font-size:11px; color:var(--ff-muted); }
.ff-settings-credits b { font-size:13px; color:var(--ff-good); }
.ff-settings-actions { display:grid; gap:2px; padding-top:5px; }
.ff-settings-actions button { display:flex; align-items:center; gap:8px; width:100%; min-height:36px; padding:7px 8px; border:0; background:transparent; color:var(--ff-ink); font:inherit; font-size:12px; text-align:left; }
.ff-settings-actions button:hover { background:var(--ff-subtle); }
.ff-settings-actions button[hidden] { display:none; }
.ff-settings-actions button svg { width:15px; height:15px; flex-shrink:0; color:var(--ff-muted); }
.ff-settings-actions button span { flex:1; }
html.ff-theme-switching { overflow-anchor:none; }
html.ff-theme-transition,html.ff-theme-transition body,html.ff-theme-transition :is(.topbar,.sidebar,.page,.panel,.card,dialog,.ff-theme-panel,button,input,select,textarea,.xqv6 *,.xr-workspace *,.ec-app *,.ec-shell *) { transition:background-color 320ms ease,color 280ms ease,border-color 320ms ease,border-width 320ms ease,box-shadow 380ms ease,backdrop-filter 320ms ease,grid-template-columns 320ms ease,gap 320ms ease,padding 320ms ease,margin 320ms ease!important; }
@media (min-width:1024px) {
  html[data-ui-theme="bento"] .x6-choice-grid { column-gap:18px; }
  html[data-ui-theme="bento"] .x6-fields { gap:12px; }
}
@media (max-width:820px) {
  html[data-ui-theme] .sidebar .nav>button>svg { padding:4px; width:18px; height:18px; border-radius:6px; }
  html[data-ui-theme] .x6-modes .x6-mode-art { width:46px; height:46px; flex-basis:46px; }
  html[data-ui-theme] .x6-modes button { min-height:112px; }
  html[data-ui-theme="firefly"] .x6-heading { padding-left:0; }
  html[data-ui-theme="firefly"] .x6-heading::before { display:none; }
  html[data-ui-theme="firefly"] body.studio-redesign .page-create:not(.task-mode) .home-operations-head { padding:18px!important; min-height:170px!important; background:var(--ff-peach)!important; }
  html[data-ui-theme="firefly"] body.studio-redesign .page-create:not(.task-mode) .home-operations-copy { width:calc(100% - 86px)!important; }
  html[data-ui-theme="firefly"] body.studio-redesign .page-create:not(.task-mode) .home-operations-copy h1 { font-size:22px!important; }
  html[data-ui-theme="firefly"] body.studio-redesign .home-operations-head .dashboard-hero-mark { display:block!important; position:absolute; right:10px!important; top:32px; width:76px!important; height:76px!important; }
  html[data-ui-theme="firefly"] .home-operations-copy p { max-width:205px; font-size:12px; }
  html[data-ui-theme] .sidebar { flex-direction:row!important; padding-bottom:0!important; }
  html[data-ui-theme] .sidebar .sidebar-settings { display:none!important; }
  html[data-ui-theme] .sidebar>.nav { overflow:visible!important; }
  html[data-ui-theme] .sidebar>.workspace-credit-box { display:none!important; }
  .ff-theme-trigger { position:fixed; z-index:55; left:12px; bottom:calc(72px + env(safe-area-inset-bottom)); width:126px; min-height:40px!important; padding:5px 8px!important; box-shadow:0 2px 9px #10202220; }
  .ff-theme-trigger small { display:none; }
  .ff-theme-trigger>svg:last-child { width:12px; }
  .ff-theme-panel { width:min(424px,calc(100vw - 24px)); }
  .ff-theme-panel>header { padding:10px 12px 8px; }
  .ff-theme-panel h2 { font-size:14px; }
  .ff-theme-grid { grid-template-columns:repeat(4,minmax(0,1fr)); padding:12px; gap:7px; }
  .ff-theme-panel>footer { padding:12px 16px; }
  html[data-ui-theme="bento"] .x6-modes { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (prefers-reduced-motion:reduce) {
  html[data-ui-theme] *,html[data-ui-theme] *::before,html[data-ui-theme] *::after { animation-duration:.01ms!important; transition-duration:.01ms!important; scroll-behavior:auto!important; }
}
@media (forced-colors:active) { .ff-theme-grid>button[aria-checked="true"] { outline-color:Highlight; } }
