/* ZEQIAO Studio — secondary workspaces, detail surfaces and menus.
   Presentation only: preserve existing DOM, visibility states and interactions. */
html body.reference-ui-shell[data-studio-ui] {
  --studio-success: var(--refine-success);
  --studio-danger: var(--refine-danger);
  --studio-warning: var(--refine-warning);
  --studio-pop-shadow: var(--studio-shadow);
}

/* Workspace headings establish one reading order, without another boxed layer. */
html body.reference-ui-shell[data-studio-ui] :is(#view-work,#view-projects,#view-assets,#view-tools,#view-help,#view-models,#view-chat) {
  color: var(--studio-text) !important;
}
html body.reference-ui-shell[data-studio-ui] :is(.content-head,.works-head) { margin-bottom: 28px !important; gap: 24px !important; }
html body.reference-ui-shell[data-studio-ui] :is(.content-head h2,.works-head h2) {
  color: var(--studio-text) !important; font-size: 26px !important; line-height: 1.25 !important; font-weight: 650 !important; letter-spacing: -.04em !important;
}
html body.reference-ui-shell[data-studio-ui] .content-head p { max-width: 66ch; margin-top: 10px !important; color: var(--studio-muted) !important; font-size: 13px !important; line-height: 1.8 !important; }
html body.reference-ui-shell[data-studio-ui] :is(#view-projects,#view-assets,#view-tools,#view-help,#view-models,#view-work) :is(.stack-actions,.project-panel-actions,.project-hero-actions,.project-settings-actions) { gap: 8px !important; }
html body.reference-ui-shell[data-studio-ui] :is(#view-projects,#view-assets,#view-tools,#view-help,#view-models,#view-work) :is(.stack-actions,.project-panel-actions,.project-hero-actions,.project-settings-actions) button {
  min-height: 38px !important; padding: 9px 14px !important; border: 1px solid var(--studio-line) !important; border-radius: 10px !important; background: var(--studio-surface) !important; color: var(--studio-text) !important; font-size: 12px !important; line-height: 1.4 !important; font-weight: 550 !important; box-shadow: none !important;
}
html body.reference-ui-shell[data-studio-ui] :is(#view-projects,#view-assets,#view-tools,#view-help,#view-models,#view-work) :is(.stack-actions,.project-panel-actions,.project-hero-actions,.project-settings-actions) button.primary {
  background: var(--studio-primary) !important; border-color: var(--studio-primary) !important; color: var(--studio-on-accent,#fff) !important;
}
html body.reference-ui-shell[data-studio-ui] :is(#view-work,#view-projects,#view-assets,#view-help,#view-models) .empty {
  min-height: 168px; padding: 38px 24px !important; border: 1px dashed var(--studio-line) !important; border-radius: var(--studio-radius) !important; background: var(--studio-surface) !important; color: var(--studio-muted) !important; font-size: 13px !important; line-height: 1.8;
}
html body.reference-ui-shell[data-studio-ui] :is(#view-work,#view-projects,#view-assets) .empty strong { color: var(--studio-text) !important; font-size: 15px; font-weight: 600; }

/* Tasks: a quiet toolbar and media-led rows; status is the only semantic color. */
html body.reference-ui-shell[data-studio-ui] .works-toolbar-sticky { padding: 0 0 18px !important; border: 0 !important; background: var(--studio-bg) !important; box-shadow: none !important; }
/* 2026-11-16: the works toolbar left a 60px empty band above the list (28px head
   margin + 18px padding + 14px margin); short windows need that height for results. */
html body.reference-ui-shell[data-studio-ui] #view-work .works-head { margin-bottom: 8px !important; }
html body.reference-ui-shell[data-studio-ui] #view-work .works-toolbar-sticky { padding-bottom: 6px !important; margin-bottom: 6px !important; }
html body.reference-ui-shell[data-studio-ui] .works-head { align-items: flex-start !important; flex-wrap: wrap; }
html body.reference-ui-shell[data-studio-ui] .works-head .tools { gap: 8px !important; flex-wrap: wrap; align-items: center; }
html body.reference-ui-shell[data-studio-ui] :is(.works-head,.asset-library-toolbar) :is(input,select) {
  min-width: 0; min-height: 40px !important; border: 1px solid var(--studio-line) !important; border-radius: 10px !important; background: var(--studio-surface) !important; color: var(--studio-text) !important; padding: 9px 12px !important; font-size: 12px !important; box-shadow: none !important;
}
html body.reference-ui-shell[data-studio-ui] .job-view-switch { gap: 3px !important; padding: 3px !important; border: 0 !important; border-radius: 10px !important; background: var(--studio-soft) !important; }
html body.reference-ui-shell[data-studio-ui] .job-view-switch button { min-height: 32px !important; padding: 6px 11px !important; border: 0 !important; border-radius: 8px !important; background: transparent !important; color: var(--studio-muted) !important; font-size: 12px !important; }
html body.reference-ui-shell[data-studio-ui] .job-view-switch button[aria-pressed="true"] { background: var(--studio-surface) !important; color: var(--studio-text) !important; box-shadow: 0 1px 3px color-mix(in srgb,var(--studio-text) 8%,transparent) !important; }
html body.reference-ui-shell[data-studio-ui] :is(#view-work,#view-projects) :is(.job-row,.work-card) { border: 1px solid var(--studio-line) !important; border-radius: var(--studio-radius) !important; background: var(--studio-surface) !important; color: var(--studio-text) !important; box-shadow: none !important; }
html body.reference-ui-shell[data-studio-ui] :is(#view-work,#view-projects) :is(.job-row,.work-card):hover { border-color: color-mix(in srgb,var(--studio-text) 20%,var(--studio-line)) !important; box-shadow: 0 6px 22px color-mix(in srgb,var(--studio-text) 4%,transparent) !important; transform: none !important; }
html body.reference-ui-shell[data-studio-ui] :is(#view-work,#view-projects) :is(.job-row,.work-card).selected { border-color: var(--studio-accent) !important; box-shadow: 0 0 0 1px var(--studio-accent) !important; }
html body.reference-ui-shell[data-studio-ui] :is(#view-work,#view-projects) :is(.job-main h3,.work-title) { color: var(--studio-text) !important; font-size: 14px !important; font-weight: 600 !important; letter-spacing: -.01em; line-height: 1.6; }
html body.reference-ui-shell[data-studio-ui] :is(#view-work,#view-projects) :is(.job-meta,.work-sub) { color: var(--studio-muted) !important; font-size: 11px !important; line-height: 1.7 !important; }
html body.reference-ui-shell[data-studio-ui] :is(#view-work,#view-projects) :is(.job-actions,.card-actions) button { min-height: 34px !important; border: 1px solid var(--studio-line) !important; border-radius: 8px !important; background: var(--studio-surface) !important; color: var(--studio-text) !important; font-size: 12px !important; font-weight: 500 !important; }
html body.reference-ui-shell[data-studio-ui] :is(#view-work,#view-projects) :is(.job-actions,.card-actions) button:hover { background: var(--studio-soft) !important; border-color: var(--studio-line) !important; }
html body.reference-ui-shell[data-studio-ui] :is(.bulkbar,.project-bulkbar,.asset-library-selection-bar) { padding: 14px 16px !important; border: 1px solid color-mix(in srgb,var(--studio-accent) 25%,var(--studio-line)) !important; border-radius: 12px !important; background: color-mix(in srgb,var(--studio-accent) 5%,var(--studio-surface)) !important; color: var(--studio-text) !important; }
html body.reference-ui-shell[data-studio-ui] .badge { border: 0 !important; border-radius: 6px !important; padding: 4px 8px !important; font-size: 10px !important; font-weight: 550 !important; letter-spacing: .01em; }
html body.reference-ui-shell[data-studio-ui] .badge.succeeded { background: color-mix(in srgb,var(--studio-success) 10%,var(--studio-surface)) !important; color: var(--studio-success) !important; }
html body.reference-ui-shell[data-studio-ui] :is(.badge.running,.badge.submitted,.badge.downloading) { background: color-mix(in srgb,var(--studio-accent) 9%,var(--studio-surface)) !important; color: var(--studio-accent) !important; }
html body.reference-ui-shell[data-studio-ui] .badge.queued { background: color-mix(in srgb,var(--studio-warning) 10%,var(--studio-surface)) !important; color: var(--studio-warning) !important; }
html body.reference-ui-shell[data-studio-ui] .badge.failed { background: color-mix(in srgb,var(--studio-danger) 9%,var(--studio-surface)) !important; color: var(--studio-danger) !important; }
html body.reference-ui-shell[data-studio-ui] .badge.canceled { background: var(--studio-soft) !important; color: var(--studio-muted) !important; }

/* Projects: generous cover gallery; details use typography rather than nested boxes. */
html body.reference-ui-shell[data-studio-ui] .project-dashboard .project-table { grid-template-columns: repeat(auto-fill,minmax(240px,1fr)) !important; gap: 20px !important; }
/* 2026-11-16: theme.css bleeds this head 8px left (margin 0 -8px with 8px padding); with the
   padding removed here the first character of "项目内作品" was clipped by the scrolling project manager. */
html body.reference-ui-shell[data-studio-ui] :is(.project-table-head,.project-panel-head) { margin-left: 0 !important; margin-right: 0 !important; padding: 0 0 22px !important; border: 0 !important; background: transparent !important; gap: 18px !important; }
html body.reference-ui-shell[data-studio-ui] :is(.project-table-head,.project-panel-head) h3 { font-size: 18px !important; font-weight: 600 !important; color: var(--studio-text) !important; }
html body.reference-ui-shell[data-studio-ui] :is(.project-table-head,.project-panel-head) p { color: var(--studio-muted) !important; font-size: 12px !important; margin-top: 8px !important; line-height: 1.7; }
html body.reference-ui-shell[data-studio-ui] .project-dashboard .project-table-row.project-card-compact { padding: 10px !important; border: 1px solid var(--studio-line) !important; border-radius: 17px !important; background: var(--studio-surface) !important; box-shadow: none !important; transition: border-color .18s, box-shadow .18s !important; }
html body.reference-ui-shell[data-studio-ui] .project-dashboard .project-table-row.project-card-compact:hover { transform: none !important; border-color: color-mix(in srgb,var(--studio-text) 20%,var(--studio-line)) !important; box-shadow: 0 8px 24px color-mix(in srgb,var(--studio-text) 5%,transparent) !important; }
html body.reference-ui-shell[data-studio-ui] .project-dashboard .project-card-compact .project-cover-card { border: 0 !important; border-radius: 11px !important; background: var(--studio-soft) !important; color: var(--studio-muted) !important; }
html body.reference-ui-shell[data-studio-ui] .project-dashboard .project-card-compact .project-name-block { padding: 8px 5px 7px !important; }
html body.reference-ui-shell[data-studio-ui] .project-dashboard .project-card-compact .project-name-block strong { font-size: 15px !important; line-height: 1.5 !important; color: var(--studio-text) !important; font-weight: 600 !important; }
html body.reference-ui-shell[data-studio-ui] .project-dashboard .project-card-compact .project-name-block small { margin-top: 7px !important; font-size: 12px !important; color: var(--studio-muted) !important; }
html body.reference-ui-shell[data-studio-ui] .project-pin { padding: 3px 6px !important; border: 0 !important; border-radius: 4px !important; background: var(--studio-soft) !important; color: var(--studio-muted) !important; font-size: 9px !important; font-weight: 500; }
html body.reference-ui-shell[data-studio-ui] .project-detail-toolbar { padding: 0 0 20px !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; }
html body.reference-ui-shell[data-studio-ui] .project-back-btn { border: 0 !important; padding-left: 0 !important; background: transparent !important; color: var(--studio-muted) !important; font-size: 12px !important; }
html body.reference-ui-shell[data-studio-ui] .project-topline { padding: 24px !important; border: 1px solid var(--studio-line) !important; border-radius: var(--studio-radius) !important; background: var(--studio-surface) !important; gap: 24px !important; }
html body.reference-ui-shell[data-studio-ui] .project-hero-copy { gap: 9px !important; }
html body.reference-ui-shell[data-studio-ui] :is(.project-eyebrow,.project-detail-toolbar>span) { color: var(--studio-muted) !important; font-size: 11px !important; letter-spacing: .025em; }
html body.reference-ui-shell[data-studio-ui] .project-stat-grid { gap: 0 !important; margin: 24px 0 !important; border: 1px solid var(--studio-line) !important; border-radius: 14px !important; overflow: hidden; background: var(--studio-surface) !important; }
html body.reference-ui-shell[data-studio-ui] .project-stat-card { padding: 18px 24px !important; border: 0 !important; border-right: 1px solid var(--studio-line) !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
html body.reference-ui-shell[data-studio-ui] .project-stat-card:last-child { border-right: 0 !important; }
html body.reference-ui-shell[data-studio-ui] .project-stat-card strong { margin-top: 7px !important; color: var(--studio-text) !important; font-size: 28px !important; font-weight: 500 !important; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
html body.reference-ui-shell[data-studio-ui] .project-stat-card>span { color: var(--studio-muted) !important; font-size: 11px !important; }
html body.reference-ui-shell[data-studio-ui] .project-detail-tabs { gap: 26px !important; padding: 0 !important; border: 0 !important; border-bottom: 1px solid var(--studio-line) !important; border-radius: 0 !important; background: transparent !important; }
html body.reference-ui-shell[data-studio-ui] .project-detail-tabs button { padding: 13px 0 !important; border: 0 !important; border-bottom: 2px solid transparent !important; border-radius: 0 !important; background: transparent !important; color: var(--studio-muted) !important; font-size: 13px !important; box-shadow: none !important; }
html body.reference-ui-shell[data-studio-ui] .project-detail-tabs button.active { border-bottom-color: var(--studio-text) !important; color: var(--studio-text) !important; }
html body.reference-ui-shell[data-studio-ui] .project-panel { margin-top: 24px !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
html body.reference-ui-shell[data-studio-ui] :is(.project-settings-grid>div,.project-agent-entry) { padding: 20px !important; border: 1px solid var(--studio-line) !important; border-radius: 12px !important; background: var(--studio-surface) !important; color: var(--studio-text) !important; }

/* Library: content gets the space; controls share one calm surface. */
html body.reference-ui-shell[data-studio-ui] .asset-library-toolbar { padding: 0 0 22px !important; gap: 9px !important; margin-bottom: 22px !important; border: 0 !important; border-bottom: 1px solid var(--studio-line) !important; border-radius: 0 !important; background: transparent !important; align-items: center; box-shadow: none !important; }
html body.reference-ui-shell[data-studio-ui] .asset-library-toolbar :is(input,select) { background: var(--studio-surface) !important; border-color: var(--studio-line) !important; }
html body.reference-ui-shell[data-studio-ui] .asset-library-toolbar :is(button,summary) { min-height: 38px !important; padding: 8px 12px !important; border: 1px solid var(--studio-line) !important; border-radius: 8px !important; background: var(--studio-surface) !important; color: var(--studio-text) !important; font-size: 12px !important; }
html body.reference-ui-shell[data-studio-ui] .asset-library-layout { gap: 26px !important; }
html body.reference-ui-shell[data-studio-ui] .asset-library-categories { padding: 6px 0 !important; border: 0 !important; background: transparent !important; gap: 5px !important; }
html body.reference-ui-shell[data-studio-ui] .asset-library-categories { border-radius: 0 !important; box-shadow: none !important; }
html body.reference-ui-shell[data-studio-ui] .asset-library-categories button { padding: 12px 14px !important; min-height: 44px !important; border: 0 !important; border-radius: 10px !important; background: transparent !important; color: var(--studio-muted) !important; font-size: 13px !important; }
html body.reference-ui-shell[data-studio-ui] .asset-library-categories button.active { background: var(--studio-surface) !important; color: var(--studio-text) !important; font-weight: 600 !important; box-shadow: 0 1px 4px color-mix(in srgb,var(--studio-text) 5%,transparent) !important; }
html body.reference-ui-shell[data-studio-ui] .asset-library-categories button span:last-child { color: var(--studio-muted) !important; background: var(--studio-soft) !important; border-radius: 5px !important; }
html body.reference-ui-shell[data-studio-ui] .asset-library-result-head { padding: 0 0 18px !important; border: 0 !important; color: var(--studio-text) !important; }
html body.reference-ui-shell[data-studio-ui] .asset-library-result-head strong { font-size: 15px !important; font-weight: 600 !important; }
html body.reference-ui-shell[data-studio-ui] .asset-library-result-head>span { color: var(--studio-muted) !important; font-size: 12px !important; }
html body.reference-ui-shell[data-studio-ui] :is(#view-assets,.project-assets-panel) .asset-library-grid { grid-template-columns: repeat(auto-fill,minmax(224px,1fr)) !important; gap: 18px !important; }
html body.reference-ui-shell[data-studio-ui] :is(#view-assets,.project-assets-panel) .asset-library-card { border: 1px solid var(--studio-line) !important; border-radius: 15px !important; background: var(--studio-surface) !important; box-shadow: none !important; padding: 0 !important; overflow: visible; }
html body.reference-ui-shell[data-studio-ui] :is(#view-assets,.project-assets-panel) .asset-library-card:hover { transform: none !important; border-color: color-mix(in srgb,var(--studio-text) 22%,var(--studio-line)) !important; box-shadow: 0 6px 22px color-mix(in srgb,var(--studio-text) 5%,transparent) !important; }
html body.reference-ui-shell[data-studio-ui] :is(#view-assets,.project-assets-panel) .asset-library-card.selected { border-color: var(--studio-accent) !important; box-shadow: 0 0 0 1px var(--studio-accent) !important; }
html body.reference-ui-shell[data-studio-ui] :is(#view-assets,.project-assets-panel) .asset-library-media { border-radius: 14px 14px 0 0 !important; background: var(--studio-soft) !important; }
html body.reference-ui-shell[data-studio-ui] :is(#view-assets,.project-assets-panel) .asset-library-card-body { padding: 15px !important; gap: 8px !important; }
html body.reference-ui-shell[data-studio-ui] :is(#view-assets,.project-assets-panel) .asset-library-card-title strong { color: var(--studio-text) !important; font-size: 14px !important; line-height: 1.55 !important; font-weight: 600 !important; }
html body.reference-ui-shell[data-studio-ui] :is(.asset-library-card-meta,.asset-library-status,.asset-library-kind) { color: var(--studio-muted) !important; font-size: 11px !important; line-height: 1.55 !important; }
html body.reference-ui-shell[data-studio-ui] :is(.asset-library-tags span,.asset-library-targets span) { padding: 3px 6px !important; border: 0 !important; border-radius: 4px !important; background: var(--studio-soft) !important; color: var(--studio-muted) !important; font-size: 10px !important; }
html body.reference-ui-shell[data-studio-ui] :is(#view-assets,.project-assets-panel) .asset-library-relation-slot { min-height: 52px !important; margin-top: 3px !important; padding: 10px !important; border: 0 !important; border-radius: 8px !important; background: var(--studio-bg) !important; color: var(--studio-muted) !important; }
html body.reference-ui-shell[data-studio-ui] :is(#view-assets,.project-assets-panel) .asset-library-relation-slot.bound { background: var(--studio-bg) !important; }
html body.reference-ui-shell[data-studio-ui] .asset-library-relation-icon { background: var(--studio-surface) !important; color: var(--studio-muted) !important; border: 1px solid var(--studio-line) !important; }
html body.reference-ui-shell[data-studio-ui] .asset-library-relation-copy b { color: var(--studio-text) !important; font-size: 11px !important; }
html body.reference-ui-shell[data-studio-ui] .asset-library-relation-copy small { color: var(--studio-muted) !important; font-size: 10px !important; line-height: 1.5; }
html body.reference-ui-shell[data-studio-ui] :is(#view-assets,.project-assets-panel) .asset-library-card-actions { gap: 6px !important; padding-top: 10px !important; margin-top: 3px !important; border-top: 1px solid var(--studio-line) !important; }
html body.reference-ui-shell[data-studio-ui] :is(#view-assets,.project-assets-panel) :is(.asset-library-card-actions>button,.asset-library-more>summary) { height: 34px !important; min-height: 34px !important; border: 1px solid var(--studio-line) !important; border-radius: 8px !important; background: var(--studio-surface) !important; color: var(--studio-text) !important; font-size: 12px !important; font-weight: 500 !important; }
html body.reference-ui-shell[data-studio-ui] :is(#view-assets,.project-assets-panel) .asset-library-card-actions>button.primary { border-color: var(--studio-primary) !important; background: var(--studio-primary) !important; color: var(--studio-on-accent,#fff) !important; }

/* Tools and help: editorial spacing, neutral icon tiles, useful text first. */
html body.reference-ui-shell[data-studio-ui] .production-tool-grid { gap: 18px !important; }
html body.reference-ui-shell[data-studio-ui] .production-tool-card { min-height: 220px !important; padding: 24px !important; grid-template-columns: 42px minmax(0,1fr) !important; gap: 16px !important; border: 1px solid var(--studio-line) !important; border-radius: var(--studio-radius) !important; background: var(--studio-surface) !important; box-shadow: none !important; }
html body.reference-ui-shell[data-studio-ui] .production-tool-card:hover { transform: none !important; border-color: color-mix(in srgb,var(--studio-text) 22%,var(--studio-line)) !important; box-shadow: 0 8px 28px color-mix(in srgb,var(--studio-text) 5%,transparent) !important; }
html body.reference-ui-shell[data-studio-ui] .production-tool-card.disabled { opacity: 1 !important; background: color-mix(in srgb,var(--studio-surface) 50%,var(--studio-bg)) !important; }
html body.reference-ui-shell[data-studio-ui] .production-tool-card.disabled :is(h3,.production-tool-icon) { color: var(--studio-muted) !important; }
html body.reference-ui-shell[data-studio-ui] .production-tool-icon { width: 42px !important; height: 42px !important; border-radius: 11px !important; background: var(--studio-soft) !important; color: var(--studio-text) !important; font-size: 16px !important; }
html body.reference-ui-shell[data-studio-ui] .production-tool-status { color: var(--studio-muted) !important; font-size: 10px !important; letter-spacing: .03em; }
html body.reference-ui-shell[data-studio-ui] .production-tool-card h3 { margin: 5px 0 10px !important; color: var(--studio-text) !important; font-size: 17px !important; line-height: 1.4 !important; font-weight: 600 !important; }
html body.reference-ui-shell[data-studio-ui] .production-tool-card p { color: var(--studio-muted) !important; font-size: 12px !important; line-height: 1.8 !important; }
html body.reference-ui-shell[data-studio-ui] .production-tool-card>button { justify-self: start; min-width: 82px; height: 34px !important; padding: 7px 15px !important; border: 1px solid var(--studio-line) !important; border-radius: 8px !important; background: var(--studio-surface) !important; color: var(--studio-text) !important; font-size: 12px !important; }
html body.reference-ui-shell[data-studio-ui] .production-tool-card>button:hover { background: var(--studio-soft) !important; }
html body.reference-ui-shell[data-studio-ui] .help-hero { padding: 32px !important; border: 1px solid var(--studio-line) !important; border-radius: var(--studio-radius) !important; background: var(--studio-surface) !important; box-shadow: none !important; }
html body.reference-ui-shell[data-studio-ui] .help-hero-visual { border-color: var(--studio-line) !important; color: var(--studio-text) !important; }
html body.reference-ui-shell[data-studio-ui] .help-hero-visual:before,
html body.reference-ui-shell[data-studio-ui] .help-hero-visual:after { border-color: var(--studio-line) !important; }
html body.reference-ui-shell[data-studio-ui] .help-orbit { background: var(--studio-surface) !important; color: var(--studio-muted) !important; border-color: var(--studio-line) !important; }
html body.reference-ui-shell[data-studio-ui] .help-kicker { color: var(--studio-muted) !important; font-size: 11px !important; letter-spacing: .08em; }
html body.reference-ui-shell[data-studio-ui] .help-hero h3 { margin: 12px 0 !important; color: var(--studio-text) !important; font-size: 23px !important; font-weight: 600 !important; line-height: 1.45; }
html body.reference-ui-shell[data-studio-ui] .help-hero p { color: var(--studio-muted) !important; font-size: 13px !important; line-height: 1.85 !important; }
html body.reference-ui-shell[data-studio-ui] .help-steps { gap: 16px !important; margin-top: 28px !important; }
html body.reference-ui-shell[data-studio-ui] .help-step { padding: 24px !important; border: 1px solid var(--studio-line) !important; border-radius: 14px !important; background: var(--studio-surface) !important; box-shadow: none !important; }
html body.reference-ui-shell[data-studio-ui] .help-step>span { display: block; margin-bottom: 24px; color: var(--studio-muted) !important; font-size: 24px !important; font-weight: 400 !important; letter-spacing: -.06em; background: none !important; }
html body.reference-ui-shell[data-studio-ui] .help-step b { margin-bottom: 12px !important; color: var(--studio-text) !important; font-size: 15px !important; font-weight: 600 !important; }
html body.reference-ui-shell[data-studio-ui] .help-step p { color: var(--studio-muted) !important; font-size: 12px !important; line-height: 1.85 !important; }
html body.reference-ui-shell[data-studio-ui] .help-troubleshoot { margin-top: 36px !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
html body.reference-ui-shell[data-studio-ui] .help-troubleshoot h3 { font-size: 18px !important; font-weight: 600 !important; color: var(--studio-text) !important; }
html body.reference-ui-shell[data-studio-ui] .help-troubleshoot .mini-list { gap: 0 !important; margin-top: 18px !important; }
html body.reference-ui-shell[data-studio-ui] .help-troubleshoot .mini-row { padding: 18px 0 !important; border: 0 !important; border-bottom: 1px solid var(--studio-line) !important; border-radius: 0 !important; background: transparent !important; color: var(--studio-text) !important; font-size: 13px !important; gap: 24px !important; }
html body.reference-ui-shell[data-studio-ui] .help-troubleshoot .mini-row span:last-child { color: var(--studio-muted) !important; }

/* Model directory retains its comparison table, now with clear scan rhythm. */
html body.reference-ui-shell[data-studio-ui] .model-compare { gap: 34px !important; }
html body.reference-ui-shell[data-studio-ui] .model-compare-section { padding: 0 !important; border: 0 !important; background: transparent !important; }
html body.reference-ui-shell[data-studio-ui] .model-compare-head { padding: 0 0 18px !important; color: var(--studio-text) !important; }
html body.reference-ui-shell[data-studio-ui] .model-compare-head h3 { font-size: 19px !important; font-weight: 600 !important; }
html body.reference-ui-shell[data-studio-ui] .model-compare-head :is(p,span) { color: var(--studio-muted) !important; font-size: 12px !important; }
html body.reference-ui-shell[data-studio-ui] .model-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--studio-line) !important; border-radius: 14px !important; background: var(--studio-surface) !important; box-shadow: none !important; }
html body.reference-ui-shell[data-studio-ui] .model-table { background: var(--studio-surface) !important; color: var(--studio-text) !important; }
html body.reference-ui-shell[data-studio-ui] .model-table th { padding: 16px !important; border-color: var(--studio-line) !important; background: var(--studio-soft) !important; color: var(--studio-muted) !important; font-size: 11px !important; font-weight: 500 !important; }
html body.reference-ui-shell[data-studio-ui] .model-table td { padding: 18px 16px !important; border-color: var(--studio-line) !important; color: var(--studio-text) !important; font-size: 12px !important; line-height: 1.7; }
html body.reference-ui-shell[data-studio-ui] .model-table tr:hover td { background: var(--studio-bg) !important; }
html body.reference-ui-shell[data-studio-ui] .model-table td strong { font-size: 13px !important; font-weight: 600 !important; color: var(--studio-text) !important; }
html body.reference-ui-shell[data-studio-ui] :is(.model-platform,.model-score) { background: var(--studio-soft) !important; color: var(--studio-text) !important; border: 0 !important; border-radius: 5px !important; font-size: 10px !important; }
html body.reference-ui-shell[data-studio-ui] .model-use-btn { min-height: 34px !important; padding: 7px 13px !important; border: 1px solid var(--studio-line) !important; border-radius: 8px !important; background: var(--studio-surface) !important; color: var(--studio-text) !important; font-size: 12px !important; }
html body.reference-ui-shell[data-studio-ui] .model-use-btn:hover:not(:disabled) { background: var(--studio-primary) !important; color: var(--studio-on-accent,#fff) !important; border-color: var(--studio-primary) !important; }
html body.reference-ui-shell[data-studio-ui] .model-table .is-unavailable { opacity: .86 !important; }

/* Popovers and menus keep their existing positioning/keyboard controllers. */
html body.reference-ui-shell[data-studio-ui] :is(.topbar-popover,.card-menu,.asset-library-more-menu,.asset-library-filter-more[open]>div,.asset-library-context-menu,.project-context-menu) {
  border: 1px solid var(--studio-line) !important; border-radius: 14px !important; background: var(--studio-surface) !important; color: var(--studio-text) !important; box-shadow: var(--studio-pop-shadow) !important;
}
html body.reference-ui-shell[data-studio-ui] :is(.card-menu,.asset-library-more-menu,.asset-library-context-menu,.project-context-menu) { padding: 6px !important; }
html body.reference-ui-shell[data-studio-ui] :is(.card-menu,.asset-library-more-menu,.asset-library-context-menu,.project-context-menu)>button { min-height: 38px !important; padding: 9px 12px !important; border: 0 !important; border-radius: 8px !important; background: transparent !important; color: var(--studio-text) !important; font-size: 12px !important; font-weight: 500 !important; }
html body.reference-ui-shell[data-studio-ui] :is(.card-menu,.asset-library-more-menu,.asset-library-context-menu,.project-context-menu)>button:hover { background: var(--studio-soft) !important; }
html body.reference-ui-shell[data-studio-ui] .user-popover { padding: 8px !important; }
html body.reference-ui-shell[data-studio-ui] .topbar-user-summary { gap: 12px !important; padding: 16px 12px 20px !important; margin-bottom: 7px !important; border-color: var(--studio-line) !important; }
html body.reference-ui-shell[data-studio-ui] .topbar-user-avatar { width: 42px !important; height: 42px !important; border-radius: 12px !important; background: var(--studio-soft) !important; color: var(--studio-text) !important; }
html body.reference-ui-shell[data-studio-ui] .topbar-user-summary strong { color: var(--studio-text) !important; font-size: 14px !important; font-weight: 600 !important; }
html body.reference-ui-shell[data-studio-ui] .topbar-user-summary small { color: var(--studio-muted) !important; font-size: 11px !important; }
html body.reference-ui-shell[data-studio-ui] .user-popover>button { min-height: 40px !important; padding: 10px 13px !important; border-radius: 9px !important; color: var(--studio-text) !important; font-size: 13px !important; font-weight: 500 !important; }
html body.reference-ui-shell[data-studio-ui] .user-popover>button:is(:hover,:focus-visible) { background: var(--studio-soft) !important; color: var(--studio-text) !important; }
html body.reference-ui-shell[data-studio-ui] .user-popover>button.danger { margin-top: 8px !important; border-color: var(--studio-line) !important; color: var(--studio-danger) !important; }
html body.reference-ui-shell[data-studio-ui] .topbar-popover-head { padding: 18px !important; border-color: var(--studio-line) !important; }
html body.reference-ui-shell[data-studio-ui] .topbar-popover-head strong { font-size: 15px !important; color: var(--studio-text) !important; }
html body.reference-ui-shell[data-studio-ui] :is(.topbar-popover-head,.topbar-notification-row) small { color: var(--studio-muted) !important; font-size: 11px !important; line-height: 1.7; }
html body.reference-ui-shell[data-studio-ui] .topbar-notification-row { padding: 14px 12px !important; border-radius: 10px !important; color: var(--studio-text) !important; }
html body.reference-ui-shell[data-studio-ui] .topbar-notification-row:hover { background: var(--studio-soft) !important; }
html body.reference-ui-shell[data-studio-ui] .topbar-popover-footer { border-color: var(--studio-line) !important; background: var(--studio-surface) !important; color: var(--studio-text) !important; min-height: 44px !important; }

/* Detail, asset selector and forms: consistent title/body/action separation. */
html body.reference-ui-shell[data-studio-ui] :is(.drawer,.app-dialog,.identity-wallet-card,.identity-password-card) { background: var(--studio-surface) !important; color: var(--studio-text) !important; border-color: var(--studio-line) !important; box-shadow: var(--studio-pop-shadow) !important; }
html body.reference-ui-shell[data-studio-ui] :is(.drawer-backdrop,.app-dialog-backdrop,.identity-overlay) { background: color-mix(in srgb,var(--studio-text) 24%,transparent) !important; backdrop-filter: blur(8px) !important; }
html body.reference-ui-shell[data-studio-ui] .drawer-head { padding: 22px 26px !important; min-height: 76px !important; border-color: var(--studio-line) !important; background: var(--studio-surface) !important; }
html body.reference-ui-shell[data-studio-ui] .drawer-head strong { font-size: 19px !important; font-weight: 600 !important; letter-spacing: -.025em !important; }
html body.reference-ui-shell[data-studio-ui] .drawer-body { padding: 26px !important; }
html body.reference-ui-shell[data-studio-ui] :is(.drawer-head,.drawer-body,.app-dialog,.identity-wallet-card) button { min-height: 36px !important; padding: 8px 12px !important; border: 1px solid var(--studio-line) !important; border-radius: 9px !important; background: var(--studio-surface) !important; color: var(--studio-text) !important; box-shadow: none !important; font-size: 12px !important; font-weight: 550 !important; }
html body.reference-ui-shell[data-studio-ui] :is(.drawer-body,.app-dialog,.identity-wallet-card) button.primary,
html body.reference-ui-shell[data-studio-ui] .wallet-primary,
html body.reference-ui-shell[data-studio-ui] .app-dialog-actions button:not(.ghost):not(.danger) { background: var(--studio-primary) !important; border-color: var(--studio-primary) !important; color: var(--studio-on-accent,#fff) !important; }
html body.reference-ui-shell[data-studio-ui] :is(.drawer-body,.app-dialog,.identity-wallet-card,.identity-password-card) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),textarea,select) { min-height: 42px !important; padding: 10px 12px !important; border: 1px solid var(--studio-line) !important; border-radius: 9px !important; background: var(--studio-bg) !important; color: var(--studio-text) !important; font-size: 13px !important; box-shadow: none !important; }
html body.reference-ui-shell[data-studio-ui] :is(.dialog-grid,.asset-editor) { gap: 18px !important; }
html body.reference-ui-shell[data-studio-ui] :is(.dialog-grid,.asset-editor,.asset-editor-grid) label { gap: 8px !important; color: var(--studio-text) !important; font-size: 12px !important; font-weight: 500 !important; }
html body.reference-ui-shell[data-studio-ui] :is(.asset-editor,.asset-editor-grid) label small { color: var(--studio-muted) !important; font-size: 11px !important; line-height: 1.65 !important; }
html body.reference-ui-shell[data-studio-ui] .detail-block { margin-bottom: 20px !important; padding: 18px !important; border: 1px solid var(--studio-line) !important; border-radius: 12px !important; background: var(--studio-bg) !important; box-shadow: none !important; }
html body.reference-ui-shell[data-studio-ui] .detail-block h3 { margin-bottom: 12px !important; color: var(--studio-text) !important; font-size: 13px !important; font-weight: 600 !important; }
html body.reference-ui-shell[data-studio-ui] .detail-block p { color: var(--studio-muted) !important; font-size: 13px !important; line-height: 1.85 !important; }
html body.reference-ui-shell[data-studio-ui] :is(.log-item,.asset-editor-source,.asset-editor-images,.asset-editor-pending-files,.asset-editor-image-row,.asset-pending-image) { border-color: var(--studio-line) !important; background: var(--studio-bg) !important; color: var(--studio-text) !important; }
html body.reference-ui-shell[data-studio-ui] .asset-editor-action-dock { border-color: var(--studio-line) !important; background: var(--studio-surface) !important; box-shadow: 0 -10px 30px color-mix(in srgb,var(--studio-text) 4%,transparent) !important; }
html body.reference-ui-shell[data-studio-ui] .app-dialog { padding: 28px !important; border-radius: 18px !important; }
html body.reference-ui-shell[data-studio-ui] .app-dialog h3 { margin-bottom: 12px !important; color: var(--studio-text) !important; font-size: 20px !important; font-weight: 600 !important; line-height: 1.4; }
html body.reference-ui-shell[data-studio-ui] .app-dialog p { margin-bottom: 24px !important; color: var(--studio-muted) !important; font-size: 13px !important; line-height: 1.85 !important; }
html body.reference-ui-shell[data-studio-ui] .app-dialog-actions { gap: 9px !important; }
html body.reference-ui-shell[data-studio-ui] .app-dialog-actions button { min-height: 40px !important; min-width: 80px; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer { border-radius: 20px !important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer>.drawer-head { padding: 22px 26px !important; min-height: 76px !important; flex-basis: 76px !important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer>.drawer-head strong { font-size: 21px !important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer>.drawer-body { padding: 20px 24px 0 !important; background: var(--studio-bg) !important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer .asset-picker-shell { gap: 16px !important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer .asset-picker-source-tabs { gap: 6px !important; padding: 5px !important; border: 0 !important; border-radius: 12px !important; background: var(--studio-soft) !important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer .asset-picker-source-tabs button { min-height: 38px !important; border: 0 !important; border-radius: 8px !important; background: transparent !important; color: var(--studio-muted) !important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer .asset-picker-source-tabs button[aria-selected="true"] { background: var(--studio-surface) !important; color: var(--studio-text) !important; box-shadow: 0 1px 4px color-mix(in srgb,var(--studio-text) 6%,transparent) !important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer .asset-picker-toolbar :is(input,select) { height: 40px !important; min-height: 40px !important; border-color: var(--studio-line) !important; background: var(--studio-surface) !important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer .asset-picker-model { padding: 12px 14px !important; border-color: var(--studio-line) !important; border-radius: 10px !important; background: var(--studio-surface) !important; color: var(--studio-text) !important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer .asset-picker-grid { gap: 12px !important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer .asset-picker-card { border: 1px solid var(--studio-line) !important; border-radius: 12px !important; background: var(--studio-surface) !important; color: var(--studio-text) !important; box-shadow: none !important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer .asset-picker-card.selected { border-color: var(--studio-accent) !important; box-shadow: 0 0 0 1px var(--studio-accent) !important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer .asset-picker-card:is(.incompatible,.disabled) { opacity: .55 !important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer .asset-picker-copy { padding: 13px !important; gap: 7px !important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer .asset-picker-title-row strong { color: var(--studio-text) !important; font-size: 13px !important; font-weight: 600 !important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer .asset-picker-copy :is(p,small) { color: var(--studio-muted) !important; line-height: 1.65 !important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer .asset-picker-footer { margin: 0 -24px !important; padding: 16px 24px !important; border-color: var(--studio-line) !important; background: var(--studio-surface) !important; color: var(--studio-muted) !important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer .asset-picker-footer button { min-height: 42px !important; border-radius: 10px !important; font-size: 13px !important; }

/* Wallet: balance reads first, explanation second, purchase remains explicit. */
html body.reference-ui-shell[data-studio-ui] .identity-wallet-card { padding: 32px !important; border-radius: 20px !important; }
html body.reference-ui-shell[data-studio-ui] .identity-wallet-card>header { margin-bottom: 28px !important; }
html body.reference-ui-shell[data-studio-ui] .identity-wallet-card h2 { color: var(--studio-text) !important; font-size: 25px !important; font-weight: 600 !important; letter-spacing: -.03em; }
html body.reference-ui-shell[data-studio-ui] .identity-wallet-card>header p { margin-top: 7px !important; color: var(--studio-muted) !important; font-size: 12px !important; }
html body.reference-ui-shell[data-studio-ui] .wallet-balance { padding: 24px !important; border: 1px solid var(--studio-line) !important; border-radius: 14px !important; background: var(--studio-bg) !important; }
html body.reference-ui-shell[data-studio-ui] .wallet-balance>strong { margin: 10px 0 14px !important; color: var(--studio-text) !important; font-size: 46px !important; font-weight: 500 !important; line-height: 1.2 !important; letter-spacing: -.06em; }
html body.reference-ui-shell[data-studio-ui] .wallet-balance :is(span,small),
html body.reference-ui-shell[data-studio-ui] :is(.wallet-unavailable,.wallet-quote,.wallet-empty,.wallet-ledger small,.wallet-orders small) { color: var(--studio-muted) !important; }
html body.reference-ui-shell[data-studio-ui] :is(.wallet-unavailable,.wallet-payment) { padding: 18px !important; border: 1px solid var(--studio-line) !important; border-radius: 12px !important; background: var(--studio-bg) !important; font-size: 12px !important; line-height: 1.8 !important; }
html body.reference-ui-shell[data-studio-ui] :is(.wallet-unavailable strong,.wallet-section h3,.wallet-ledger b,.wallet-orders b) { color: var(--studio-text) !important; }
html body.reference-ui-shell[data-studio-ui] :is(.wallet-ledger,.wallet-orders,.wallet-ledger>div,.wallet-orders>div) { border-color: var(--studio-line) !important; }
html body.reference-ui-shell[data-studio-ui] .wallet-section { margin-top: 28px !important; }
html body.reference-ui-shell[data-studio-ui] .identity-wallet-card .wallet-amount-input input { padding-left: 34px !important; }
html body.reference-ui-shell[data-studio-ui] .wallet-channels button[aria-pressed="true"] { border-color: var(--studio-accent) !important; background: color-mix(in srgb,var(--studio-accent) 5%,var(--studio-surface)) !important; }
html body.reference-ui-shell[data-studio-ui] .identity-wallet-card [data-wallet-close] { min-height: 32px !important; height: 32px !important; padding: 0 !important; background: var(--studio-soft) !important; border: 0 !important; font-size: 23px !important; }

/* States and small screens. No added visibility rules: hidden/inert remain owned by the app. */
/* Review pass: remove oversized list previews and surplus outer frames. */
html body.reference-ui-shell[data-studio-ui] :is(.project-manager,.project-main,.project-dashboard,.project-table-panel,.project-table,.asset-library-main,.asset-library-layout) { border: 0 !important; background: transparent !important; box-shadow: none !important; }
html body.reference-ui-shell[data-studio-ui] .project-manager { padding: 0 !important; }
html body.reference-ui-shell[data-studio-ui] .project-cover-fallback { font-family: inherit !important; font-size: 30px !important; font-weight: 500 !important; color: var(--studio-muted) !important; opacity: .7 !important; }
html body.reference-ui-shell[data-studio-ui] .project-cover:not(:has(img)) { background: var(--studio-soft) !important; }
html body.reference-ui-shell[data-studio-ui] :is(.project-eyebrow,.project-pin,.help-orbit,.help-kicker,.model-table,.project-stat-card,.job-meta,.asset-library-categories b) { font-family: inherit !important; }
html body.reference-ui-shell[data-studio-ui] :is(#jobBoard[data-view-mode="list"],.project-work-grid.is-list) .job-row { min-height: 154px !important; padding: 12px !important; display: grid !important; grid-template-columns: 216px minmax(0,1fr) !important; grid-template-rows: minmax(0,1fr) auto !important; gap: 0 20px !important; }
html body.reference-ui-shell[data-studio-ui] :is(#jobBoard[data-view-mode="list"],.project-work-grid.is-list) .job-row .thumb { grid-column: 1 !important; grid-row: 1/3 !important; width: 216px !important; height: 136px !important; min-height: 0 !important; border-radius: 9px !important; align-self: start !important; }
html body.reference-ui-shell[data-studio-ui] :is(#jobBoard[data-view-mode="list"],.project-work-grid.is-list) .job-row .job-main { display: block !important; grid-column: 2 !important; grid-row: 1 !important; padding: 6px 4px 10px !important; align-self: start !important; }
html body.reference-ui-shell[data-studio-ui] :is(#jobBoard[data-view-mode="list"],.project-work-grid.is-list) .job-row .job-actions { grid-column: 2 !important; grid-row: 2 !important; padding: 8px 4px 0 !important; border: 0 !important; align-self: end !important; justify-content: flex-start !important; }
html body.reference-ui-shell[data-studio-ui] :is(#view-work,#view-projects) .job-actions { background: transparent !important; }
html body.reference-ui-shell[data-studio-ui] :is(#jobBoard[data-view-mode="list"],.project-work-grid.is-list) .job-main h3 { margin: 2px 0 10px !important; }
html body.reference-ui-shell[data-studio-ui] :is(#jobBoard[data-view-mode="list"],.project-work-grid.is-list) :is(.job-parameter-chips,.job-status-row) { display: inline-flex !important; vertical-align: middle; margin: 0 12px 6px 0 !important; }
html body.reference-ui-shell[data-studio-ui] :is(#jobBoard[data-view-mode="list"],.project-work-grid.is-list) .job-meta { display: inline-block !important; margin: 4px 14px 4px 0 !important; }
html body.reference-ui-shell[data-studio-ui] :is(#jobBoard[data-view-mode="list"],.project-work-grid.is-list) .progress { margin: 6px 0 !important; max-width: 280px; }
html body.reference-ui-shell[data-studio-ui] #toast { border: 1px solid var(--studio-line) !important; border-radius: 12px !important; background: var(--studio-surface) !important; color: var(--studio-text) !important; box-shadow: var(--studio-shadow) !important; font-size: 13px !important; }
html body.reference-ui-shell[data-studio-ui] :is(#view-work,#view-projects) .thumb:not(:has(img,video,audio)) { background: var(--studio-soft) !important; color: var(--studio-muted) !important; }
html body.reference-ui-shell[data-studio-ui] :is(.asset-library-kind,.asset-library-card-meta,.asset-library-status,.asset-library-result-head>span,.project-card-compact .project-name-block small,.project-table-head p,.project-panel-head p,.job-meta,.work-sub,.model-evidence,.model-compare-head p,.model-compare-head>span,.topbar-user-summary small,.topbar-popover-head small,.topbar-notification-row small,.wallet-ledger small,.wallet-orders small) { font-size: 12px !important; line-height: 1.7 !important; }
html body.reference-ui-shell[data-studio-ui] :is(.production-tool-card p,.help-step p,.model-table td,.user-popover>button,.asset-library-toolbar button,.asset-library-toolbar summary,.works-head .tools button,.project-panel-actions button,.project-hero-actions button) { font-size: 13px !important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer .asset-picker-model { padding: 6px 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer .asset-picker-grid>.empty { border: 0 !important; background: transparent !important; }
html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer .asset-picker-copy :is(p,small) { font-size: 12px !important; }
/* Conversation uses the same neutral work surface, including the former dark header. */
html body.reference-ui-shell[data-studio-ui] #view-chat { background: var(--studio-bg) !important; color: var(--studio-text) !important; }
html body.reference-ui-shell[data-studio-ui] .chat-main-head { padding: 22px 26px !important; border-color: var(--studio-line) !important; background: var(--studio-surface) !important; color: var(--studio-text) !important; box-shadow: none !important; }
html body.reference-ui-shell[data-studio-ui] .chat-main-head h2 { color: var(--studio-text) !important; font-size: 18px !important; font-weight: 600 !important; }
html body.reference-ui-shell[data-studio-ui] .chat-provider-mark { border: 0 !important; background: var(--studio-soft) !important; color: var(--studio-text) !important; border-radius: 8px !important; }
html body.reference-ui-shell[data-studio-ui] .chat-main-actions button { border-color: var(--studio-line) !important; border-radius: 9px !important; background: var(--studio-surface) !important; color: var(--studio-muted) !important; font-size: 12px !important; }
html body.reference-ui-shell[data-studio-ui] .chat-messages { background: transparent !important; }
html body.reference-ui-shell[data-studio-ui] :is(.chat-empty,.chat-empty strong,.chat-empty h3) { color: var(--studio-text) !important; }
html body.reference-ui-shell[data-studio-ui] .chat-empty :is(p,span) { color: var(--studio-muted) !important; }
html body.reference-ui-shell[data-studio-ui] .chat-composer { border: 1px solid var(--studio-line) !important; border-radius: 14px !important; background: var(--studio-surface) !important; box-shadow: none !important; }
html body.reference-ui-shell[data-studio-ui] #view-chat .chat-composer textarea { border: 0 !important; background: transparent !important; color: var(--studio-text) !important; font-size: 14px !important; line-height: 1.8 !important; box-shadow: none !important; font-family: Inter,"Segoe UI Variable Text","Segoe UI","Microsoft YaHei","PingFang SC",sans-serif !important; }
html body.reference-ui-shell[data-studio-ui] .chat-composer textarea::placeholder { color: var(--studio-muted) !important; }
html body.reference-ui-shell[data-studio-ui] .chat-attach { border-color: var(--studio-line) !important; background: var(--studio-soft) !important; color: var(--studio-muted) !important; border-radius: 9px !important; }
html body.reference-ui-shell[data-studio-ui] .chat-send { background: var(--studio-primary) !important; color: var(--studio-on-accent,#fff) !important; border-color: var(--studio-primary) !important; border-radius: 9px !important; }
@media (min-width: 1000px) {
  html body.reference-ui-shell[data-studio-ui] :is(#jobBoard[data-view-mode="list"],.project-work-grid.is-list) .job-row { grid-template-columns: 216px minmax(0,1fr) auto !important; grid-template-rows: auto !important; }
  html body.reference-ui-shell[data-studio-ui] :is(#jobBoard[data-view-mode="list"],.project-work-grid.is-list) .job-row .thumb { grid-row: 1 !important; }
  html body.reference-ui-shell[data-studio-ui] :is(#jobBoard[data-view-mode="list"],.project-work-grid.is-list) .job-row .job-main { align-self: center !important; padding: 6px 4px !important; }
  html body.reference-ui-shell[data-studio-ui] :is(#jobBoard[data-view-mode="list"],.project-work-grid.is-list) .job-row .job-actions { grid-column: 3 !important; grid-row: 1 !important; padding: 0 4px !important; align-self: center !important; flex-direction: column !important; align-items: stretch !important; gap: 6px !important; }
  html body.reference-ui-shell[data-studio-ui] :is(#jobBoard[data-view-mode="list"],.project-work-grid.is-list) .job-row .job-actions button { min-width: 90px !important; }
}
html body.reference-ui-shell[data-studio-ui] :is(#view-work,#view-projects,#view-assets,#view-tools,#view-help,#view-models,.drawer,.app-dialog,.topbar-popover,.identity-wallet-card) :is(button,input,select,textarea,a,summary,[tabindex]):focus-visible {
  outline: 2px solid var(--studio-accent) !important; outline-offset: 3px !important;
}
html body.reference-ui-shell[data-studio-ui] :is(#view-work,#view-projects,#view-assets,#view-tools,#view-help,#view-models,.drawer,.app-dialog,.identity-wallet-card) button:disabled { opacity: .45 !important; cursor: not-allowed !important; filter: none !important; transform: none !important; }
html body.reference-ui-shell[data-studio-ui] :is(#view-work,#view-projects,#view-assets,.drawer,.app-dialog,.card-menu,.asset-library-more-menu,.asset-library-context-menu,.project-context-menu) button.danger { color: var(--studio-danger) !important; border-color: color-mix(in srgb,var(--studio-danger) 28%,var(--studio-line)) !important; background: color-mix(in srgb,var(--studio-danger) 5%,var(--studio-surface)) !important; }
@media (max-width: 1100px) {
  html body.reference-ui-shell[data-studio-ui] .production-tool-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  html body.reference-ui-shell[data-studio-ui] .works-head .tools { width: 100%; }
  html body.reference-ui-shell[data-studio-ui] .works-head .search { flex: 1 1 220px !important; }
  html body.reference-ui-shell[data-studio-ui] .works-head .filter { flex: 1 1 110px !important; width: auto !important; }
  html body.reference-ui-shell[data-studio-ui] .project-topline { flex-wrap: wrap; }
}
@media (max-width: 700px) {
  html body.reference-ui-shell[data-studio-ui] :is(.content-head,.works-head) { margin-bottom: 22px !important; gap: 14px !important; }
  html body.reference-ui-shell[data-studio-ui] :is(.content-head h2,.works-head h2) { font-size: 24px !important; }
  html body.reference-ui-shell[data-studio-ui] .content-head p { font-size: 12px !important; }
  html body.reference-ui-shell[data-studio-ui] .project-dashboard .project-table { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 12px !important; }
  html body.reference-ui-shell[data-studio-ui] .project-dashboard .project-card-compact .project-name-block strong { font-size: 13px !important; }
  html body.reference-ui-shell[data-studio-ui] .project-dashboard .project-card-compact .project-name-block small { font-size: 11px !important; }
  html body.reference-ui-shell[data-studio-ui] .project-topline { padding: 18px !important; }
  html body.reference-ui-shell[data-studio-ui] .project-stat-card { padding: 16px 13px !important; }
  html body.reference-ui-shell[data-studio-ui] .project-stat-card strong { font-size: 24px !important; }
  html body.reference-ui-shell[data-studio-ui] .project-detail-tabs { gap: 22px !important; overflow-x: auto; }
  html body.reference-ui-shell[data-studio-ui] .project-detail-tabs button { white-space: nowrap; flex-shrink: 0; }
  html body.reference-ui-shell[data-studio-ui] :is(.project-table-head,.project-panel-head) { flex-wrap: wrap; }
  html body.reference-ui-shell[data-studio-ui] .asset-library-toolbar { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; padding: 0 0 20px !important; gap: 8px !important; }
  html body.reference-ui-shell[data-studio-ui] .asset-library-toolbar>* { max-width: 100% !important; min-width: 0 !important; width: 100% !important; }
  html body.reference-ui-shell[data-studio-ui] .asset-library-toolbar>.search { grid-column: 1/-1 !important; }
  html body.reference-ui-shell[data-studio-ui] .asset-library-saved-views { display: grid !important; grid-template-columns: minmax(0,1fr) auto auto !important; grid-column: 1/-1 !important; padding: 0 !important; border: 0 !important; }
  html body.reference-ui-shell[data-studio-ui] .asset-library-saved-views select { min-width: 0 !important; width: 100% !important; }
  html body.reference-ui-shell[data-studio-ui] .asset-library-saved-views .icon { padding: 0 !important; width: 38px !important; }
  html body.reference-ui-shell[data-studio-ui] .asset-library-filter-more>summary { justify-content: center !important; }
  html body.reference-ui-shell[data-studio-ui] :is(#jobBoard[data-view-mode="list"],.project-work-grid.is-list) .job-row { grid-template-columns: 108px minmax(0,1fr) !important; gap: 10px 12px !important; }
  html body.reference-ui-shell[data-studio-ui] :is(#jobBoard[data-view-mode="list"],.project-work-grid.is-list) .job-row .thumb { width: 108px !important; height: 96px !important; grid-row: 1 !important; }
  html body.reference-ui-shell[data-studio-ui] :is(#jobBoard[data-view-mode="list"],.project-work-grid.is-list) .job-row .job-main { padding: 0 !important; }
  html body.reference-ui-shell[data-studio-ui] :is(#jobBoard[data-view-mode="list"],.project-work-grid.is-list) .job-row .job-actions { grid-column: 1/-1 !important; padding: 8px 0 0 !important; border-top: 1px solid var(--studio-line) !important; }
  html body.reference-ui-shell[data-studio-ui] .chat-main-head { flex-wrap: wrap !important; padding: 16px !important; gap: 12px !important; }
  html body.reference-ui-shell[data-studio-ui] .asset-library-categories { gap: 5px !important; }
  html body.reference-ui-shell[data-studio-ui] .asset-library-categories button { padding: 10px 12px !important; font-size: 12px !important; }
  html body.reference-ui-shell[data-studio-ui] :is(#view-assets,.project-assets-panel) .asset-library-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 12px !important; }
  html body.reference-ui-shell[data-studio-ui] :is(#view-assets,.project-assets-panel) .asset-library-card-body { padding: 11px !important; }
  html body.reference-ui-shell[data-studio-ui] :is(#view-assets,.project-assets-panel) .asset-library-card-title strong { font-size: 13px !important; }
  html body.reference-ui-shell[data-studio-ui] :is(#view-assets,.project-assets-panel) :is(.asset-library-card-actions>button,.asset-library-more>summary) { min-height: 38px !important; height: 38px !important; }
  html body.reference-ui-shell[data-studio-ui] .production-tool-grid { gap: 12px !important; }
  html body.reference-ui-shell[data-studio-ui] .production-tool-card { padding: 20px !important; min-height: 214px !important; grid-template-columns: 36px minmax(0,1fr) !important; gap: 12px !important; }
  html body.reference-ui-shell[data-studio-ui] .production-tool-icon { width: 36px !important; height: 36px !important; }
  html body.reference-ui-shell[data-studio-ui] .help-hero { padding: 24px !important; gap: 24px !important; }
  html body.reference-ui-shell[data-studio-ui] .help-steps { grid-template-columns: 1fr !important; }
  html body.reference-ui-shell[data-studio-ui] .help-step { padding: 20px !important; }
  html body.reference-ui-shell[data-studio-ui] .help-step>span { margin-bottom: 14px; }
  html body.reference-ui-shell[data-studio-ui] .help-troubleshoot .mini-row { flex-direction: column; gap: 8px !important; padding: 16px 0 !important; }
  html body.reference-ui-shell[data-studio-ui] .drawer-head { min-height: 68px !important; padding: 18px !important; }
  html body.reference-ui-shell[data-studio-ui] .drawer-body { padding: 18px !important; }
  html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer { border-radius: 15px !important; }
  html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer>.drawer-head { padding: 18px !important; min-height: 68px !important; flex-basis: 68px !important; }
  html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer>.drawer-body { padding: 14px 14px 0 !important; }
  html body.reference-ui-shell[data-studio-ui] #detailDrawer.asset-picker-drawer .asset-picker-footer { margin: 0 -14px !important; padding: 14px !important; }
  html body.reference-ui-shell[data-studio-ui] .app-dialog { padding: 24px !important; }
  html body.reference-ui-shell[data-studio-ui] .identity-wallet-card { padding: 24px !important; }
}
@media (max-width: 480px) {
  html body.reference-ui-shell[data-studio-ui] .production-tool-grid { grid-template-columns: minmax(0,1fr) !important; }
  html body.reference-ui-shell[data-studio-ui] .production-tool-card { min-height: 190px !important; }
  html body.reference-ui-shell[data-studio-ui] :is(#view-assets,.project-assets-panel) .asset-library-grid { grid-template-columns: minmax(0,1fr) !important; }
  html body.reference-ui-shell[data-studio-ui] .project-dashboard .project-table { grid-template-columns: minmax(0,1fr) !important; }
  html body.reference-ui-shell[data-studio-ui] .project-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  html body.reference-ui-shell[data-studio-ui] .project-stat-card:nth-child(2) { border-right: 0 !important; }
  html body.reference-ui-shell[data-studio-ui] .project-stat-card:nth-child(-n+2) { border-bottom: 1px solid var(--studio-line) !important; }
  html body.reference-ui-shell[data-studio-ui] .asset-library-toolbar :is(input,select,button) { min-height: 42px !important; }
  html body.reference-ui-shell[data-studio-ui] .wallet-balance>strong { font-size: 40px !important; }
  html body.reference-ui-shell[data-studio-ui] .user-popover>button { min-height: 44px !important; }
}
@media (prefers-reduced-motion: reduce) {
  html body.reference-ui-shell[data-studio-ui] :is(.project-card-compact,.production-tool-card,.asset-library-card,.app-dialog,.asset-picker-drawer) { transition: none !important; animation: none !important; }
}

/* 2026-11-16 notifications: unread finished/failed jobs of the member only. */
html body.reference-ui-shell .notification-count { background:var(--studio-accent,#315bff) !important; color:#fff !important; }
html body.reference-ui-shell .notification-count.has-attention { background:#e5484d !important; color:#fff !important; }
html body.reference-ui-shell[data-studio-ui] .topbar-notification-section { padding:10px 12px 4px; color:var(--studio-muted); font-size:11px; letter-spacing:.02em; }
html body.reference-ui-shell[data-studio-ui] .topbar-notification-section span { font-variant-numeric:tabular-nums; }
html body.reference-ui-shell[data-studio-ui] .topbar-notification-row.done .topbar-notification-dot { background:#2f9e6b !important; box-shadow:none !important; }
html body.reference-ui-shell[data-studio-ui] .topbar-notification-row.attention .topbar-notification-dot { background:#e5484d !important; }
html body.reference-ui-shell[data-studio-ui] .topbar-notification-row.active .topbar-notification-dot { background:var(--studio-accent,#315bff) !important; }
html body.reference-ui-shell[data-studio-ui] .topbar-notification-row:not(.unread) .topbar-notification-dot { opacity:.45; }
html body.reference-ui-shell[data-studio-ui] .topbar-notification-row.active .topbar-notification-dot { opacity:1; }
html body.reference-ui-shell[data-studio-ui] .topbar-notification-row.unread { background:var(--studio-soft) !important; }
html body.reference-ui-shell[data-studio-ui] .topbar-notification-row.unread strong { font-weight:700; }
html body.reference-ui-shell[data-studio-ui] .topbar-notification-row small.topbar-notification-hint { color:var(--studio-text) !important; white-space:normal; }

/* Job detail: the failure, its next step and the exact reason come first.
   Same specificity as the generic .detail-block rules above, later in the file. */
html body.reference-ui-shell[data-studio-ui] .detail-block.detail-failure { border-color: rgba(229,72,77,.45) !important; background: rgba(229,72,77,.07) !important; }
html body.reference-ui-shell[data-studio-ui] .detail-block.detail-failure.verifying { border-color: rgba(49,91,255,.4) !important; background: rgba(49,91,255,.07) !important; }
html body.reference-ui-shell[data-studio-ui] .detail-block.detail-failure h3 { margin-bottom: 8px !important; color: #e5484d !important; font-size: 14px !important; }
html body.reference-ui-shell[data-studio-ui] .detail-block.detail-failure.verifying h3 { color: var(--studio-accent,#315bff) !important; }
html body.reference-ui-shell[data-studio-ui] .detail-block.detail-failure .detail-failure-hint { margin: 0 0 6px !important; color: var(--studio-text) !important; font-weight: 600 !important; }
html body.reference-ui-shell[data-studio-ui] .detail-block.detail-failure .detail-failure-reason { margin: 0 !important; font-size: 12px !important; line-height: 1.7 !important; overflow-wrap: anywhere; }
