/* ShamVerse workspace design system. Application chrome only; media stays intact. */
#appShell {
  --sv-font: "Segoe UI Variable", "Segoe UI", Inter, system-ui, sans-serif;
  --sv-mono: "Cascadia Code", Consolas, monospace;
  --sv-bg: #141615;
  --sv-rail: #101211;
  --sv-surface: #1b1e1c;
  --sv-hover: #252a27;
  --sv-line: #303632;
  --sv-text: #eef1ee;
  --sv-muted: #9aa69d;
  --sv-accent: #a9d9c0;
  --sv-accent-ink: #14281d;
  --sv-accent-soft: #253b2f;
  --sv-danger: #f2a3a3;
  --bg: var(--sv-bg); --bg-deep: var(--sv-rail); --rail: var(--sv-rail);
  --surface: var(--sv-surface); --surface-2: var(--sv-hover); --surface-3: var(--sv-hover);
  --text: var(--sv-text); --text-soft: var(--sv-text); --muted: var(--sv-muted); --muted-2: var(--sv-muted);
  --line: var(--sv-line); --line-soft: var(--sv-line); --blue: var(--sv-accent);
  --danger: var(--sv-danger); --rail-width: 228px;
  font: 14px/1.5 var(--sv-font);
}
html[data-color-mode="light"] #appShell, html[data-theme="light"] #appShell {
  --sv-bg: #fafbf9; --sv-rail: #f1f3ef; --sv-surface: #fff; --sv-hover: #edf1eb;
  --sv-line: #dce3d9; --sv-text: #202a23; --sv-muted: #626e65;
  --sv-accent: #285f43; --sv-accent-ink: #fff; --sv-accent-soft: #e3eee5; --sv-danger: #ac3535;
}
#appShell .sv-shell { background: var(--sv-bg); color: var(--sv-text); }
#appShell .sv-main { grid-template-columns: minmax(0, 1fr); }
#appShell :is(.sv-sidebar, .sv-main, .page-stage, .topbar) { background: var(--sv-bg) !important; color: var(--sv-text) !important; }
#appShell .sv-sidebar { background: var(--sv-rail) !important; border-right: 1px solid var(--sv-line); }
#appShell :is(button, input, select, textarea, p, h1, h2, h3, h4, h5, h6, strong, b, small, label, summary, a, span, em, div, article, section) {
  font-family: var(--sv-font) !important;
  letter-spacing: normal;
}
#appShell :is(pre, code, kbd, pre *, code *, .native-terminal-input, .native-terminal-input *) { font-family: var(--sv-mono) !important; }
#appShell :is(h1, h2, h3, h4, strong, b) { color: inherit; }
#appShell :is(h1, h2, h3, h4) { font-weight: 600 !important; letter-spacing: -.025em !important; }
#appShell h1 { font-size: 20px; } #appShell h2 { font-size: 24px; } #appShell h3 { font-size: 16px; }
#appShell :is(button, .button, .mini-button) { box-shadow: none !important; text-shadow: none !important; font-weight: 500; }
#appShell button:not(:disabled):focus-visible, #appShell :is(input, textarea, select, summary):focus-visible {
  outline: 2px solid var(--sv-accent) !important; outline-offset: 3px;
}
#appShell button:disabled { opacity: .45; cursor: not-allowed; }
#appShell :is(button, .button, .mini-button, select) { min-height: 32px; border-radius: 7px; }
#appShell :where(input, textarea, select):not(:where([type="range"], [type="color"], [type="checkbox"], [type="radio"], [type="hidden"])) {
  color: var(--sv-text) !important; background: var(--sv-surface) !important;
  border: 1px solid var(--sv-line) !important; border-radius: 8px !important;
  box-shadow: none !important; font-size: 13px !important;
}
#appShell :is(input, textarea)::placeholder { color: var(--sv-muted) !important; opacity: .85; }
#appShell textarea { line-height: 1.65 !important; padding: 14px !important; }
#appShell :is(input, select) { padding: 8px 10px; }
#appShell :is([type="checkbox"], [type="radio"], [type="range"]) { accent-color: var(--sv-accent); }
#appShell option { background: var(--sv-surface); color: var(--sv-text); }
#appShell svg:not([viewBox="0 0 760 500"]):not(.brain-graph-canvas svg) { stroke-width: 1.6; }
#appShell button > svg { width: 16px; height: 16px; flex-shrink: 0; }
#appShell :is(.button, .mini-button, .rts-start-button, .vsa-start-button, .gan-run-button, .voice-start-button, .voice-studio-run, .cut-export-button, .cc-run-button, .experimental-tool-open) {
  min-height: 36px; padding: 8px 13px; border: 1px solid var(--sv-line) !important;
  border-radius: 8px !important; background: var(--sv-surface) !important; color: var(--sv-text) !important;
  font-size: 12px !important; box-shadow: none !important;
}
#appShell :is(.light-action, .button.primary, .button.light, .rts-start-button, .vsa-start-button, .gan-run-button, .voice-start-button, .voice-studio-run, .cut-export-button, .cc-run-button) {
  background: var(--sv-accent) !important; border-color: var(--sv-accent) !important; color: var(--sv-accent-ink) !important;
}
#appShell :is(.light-action, .button.primary, .rts-start-button, .vsa-start-button, .gan-run-button, .voice-start-button, .voice-studio-run, .cut-export-button, .cc-run-button) :is(span, strong, small, svg) { color: inherit !important; }
#appShell :is(.danger, .danger-outline, .terminal-inline-error, [role="alert"]) { color: var(--sv-danger) !important; }
#appShell :is(.page-stage, .settings-content) { scrollbar-color: var(--sv-line) transparent; }
#appShell .topbar { height: 60px; min-height: 60px; padding: 0 28px; border-bottom: 1px solid var(--sv-line); }
#appShell .topbar h1 { font-size: 14px !important; font-weight: 500 !important; }
#appShell .topbar .credit-pill { border: 0; background: transparent; color: var(--sv-muted); font-size: 12px; }
#appShell .topbar-model-select { max-width: 280px; }
#appShell .brand-button strong { font-size: 18px; font-weight: 600; }
#appShell .sv-sidebar :is(.nav-item, nav > button) { font-size: 12px; min-height: 36px; border-radius: 7px; }
#appShell .sv-sidebar .nav-item.is-active { color: var(--sv-text); background: var(--sv-hover); }
#appShell .sv-sidebar .usage-mini { display: none; }
#appShell .sv-sidebar :is(.rail-empty, .thread-title) { font-size: 12px; }
#appShell .page-stage { padding: 0; }
#appShell .page-stage > :is(section, div):not(.home-center):not(.home-browser-preview):not(.thread-layout) { min-width: 0; }
#appShell .page-stage :is(.content-wide, .web-intelligence-page, .gan-lab-page, .videoseeask-page, .experimental-hub-page, .remote-access-v4, .schedule-surface, .agent-brain-page, .creator-live-page, .teleprompter-page, .voice-mode-production-page) {
  width: min(1400px, 100%) !important; margin: 0 auto !important; padding: 28px !important;
  background: transparent !important; color: var(--sv-text) !important;
}
#appShell .sv-feature-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; margin-bottom: 24px; padding: 0 !important; border: 0 !important; background: transparent !important; }
#appShell .sv-feature-heading h2 { margin: 0 0 6px; font-size: 25px !important; line-height: 1.25; }
#appShell .sv-feature-heading p { margin: 0; max-width: 620px; color: var(--sv-muted) !important; font-size: 13px !important; line-height: 1.6; }
#appShell .sv-feature-actions { display: flex !important; flex-wrap: wrap; align-items: center !important; justify-content: flex-end; gap: 8px !important; min-width: 0 !important; }
#appShell .surface-kicker { color: var(--sv-muted) !important; font-size: 11px !important; text-transform: none !important; letter-spacing: 0 !important; }
#appShell .experimental-tool-return { margin: 0; padding: 10px 28px; background: transparent; border: 0; }
#appShell .experimental-tool-return > span { display: none; }
#appShell .experimental-tool-return button { font-size: 11px; color: var(--sv-muted); }
#appShell .experimental-tool-content { padding: 0; }

/* A shared split between the person’s input and the resulting work. */
#appShell :is(.web-intelligence-layout, .gan-lab-workspace, .text-to-agent-workspace, .teleprompter-layout, .voice-studio-workbench) {
  display: grid !important; grid-template-columns: minmax(280px, .85fr) minmax(0, 1.4fr) !important;
  align-items: start; gap: 28px !important; background: transparent !important;
}
#appShell :is(.web-intelligence-form, .web-intelligence-output, .gan-compose-panel, .gan-result-panel, .text-to-agent-form, .text-to-result-panel, .voice-studio-controls, .voice-studio-result, .teleprompter-editor, .teleprompter-stage) {
  min-width: 0; padding: 0 !important; border: 0 !important; border-radius: 0 !important;
  box-shadow: none !important; background: transparent !important; color: var(--sv-text) !important;
}
#appShell .sv-region-label { display: flex; align-items: center; min-height: 35px; margin-bottom: 16px; border-bottom: 1px solid var(--sv-line); color: var(--sv-muted); font: 500 11px/1.4 var(--sv-font); }
#appShell .sv-work-region > header { padding: 0 0 14px !important; border: 0 !important; background: transparent !important; }
#appShell .sv-work-region > header :is(small, p) { display: none; }
#appShell .sv-work-region > header h3 { font-size: 14px !important; }
#appShell .web-intelligence-form > header, #appShell .gan-compose-panel > header, #appShell .teleprompter-editor-head { display: none; }
#appShell .web-intelligence-form > label > span { font-size: 12px; color: var(--sv-muted); }
#appShell .web-intelligence-form > label > textarea { min-height: 170px; }
#appShell .web-intelligence-form { display: flex; flex-direction: column; gap: 14px; }
#appShell :is(.web-intelligence-empty, .text-to-result-empty, .gan-result-empty, .voice-studio-empty, .agent-brain-empty) {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 320px !important; gap: 12px; padding: 32px !important; text-align: center;
  border: 1px dashed var(--sv-line) !important; border-radius: 12px !important;
  background: transparent !important; box-shadow: none !important; color: var(--sv-muted) !important;
}
#appShell :is(.web-intelligence-empty, .text-to-result-empty, .gan-result-empty, .voice-studio-empty) strong { color: var(--sv-text); font-size: 14px; font-weight: 500; }
#appShell :is(.web-intelligence-empty, .text-to-result-empty, .gan-result-empty, .voice-studio-empty) p { max-width: 290px; color: var(--sv-muted); font-size: 12px; }
#appShell :is(.web-intelligence-empty, .text-to-result-empty, .gan-result-empty, .voice-studio-empty) svg { width: 24px; height: 24px; color: var(--sv-muted); }

/* Disclosures keep secondary controls in the original form and keyboard order. */
#appShell .sv-disclosure { display: block; min-width: 0; margin: 8px 0; border: 0 !important; border-top: 1px solid var(--sv-line) !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
#appShell .sv-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; color: var(--sv-muted); font-size: 12px; font-weight: 500; cursor: pointer; list-style: none; }
#appShell .sv-disclosure > summary::-webkit-details-marker { display: none; }
#appShell .sv-disclosure > summary::after { content: "+"; font-size: 16px; color: var(--sv-muted); }
#appShell .sv-disclosure[open] > summary::after { content: "−"; }
#appShell .sv-disclosure-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; padding: 4px 0 16px; }
#appShell .sv-disclosure-body > * { width: 100%; margin: 0; }
#appShell .sv-action-menu { position: relative; border: 0 !important; margin: 0; }
#appShell .sv-action-menu > summary { border: 1px solid var(--sv-line); border-radius: 8px; padding: 8px 12px; min-height: 36px; }
#appShell .sv-action-menu[open] > .sv-disclosure-body { position: absolute; z-index: 80; right: 0; top: 42px; width: 230px; padding: 12px; background: var(--sv-surface); border: 1px solid var(--sv-line); border-radius: 10px; box-shadow: 0 12px 40px #0003; }
#appShell .sv-select-nav { display: flex; align-items: center; gap: 10px; width: max-content; max-width: 100%; color: var(--sv-muted); font-size: 12px; margin: 0 0 16px; }
#appShell .sv-select-nav select { min-width: 150px; max-width: 260px; }
#appShell [hidden] { display: none !important; }

/* Directories are quiet rows with one clear open action. */
#appShell :is(.agents-directory-grid, .experimental-tool-grid) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 0 28px !important; }
#appShell :is(.agent-directory-card, .experimental-tool-card) {
  position: relative; display: flex; flex-direction: column; min-height: 0 !important;
  padding: 20px 0 !important; border: 0 !important; border-bottom: 1px solid var(--sv-line) !important;
  border-radius: 0 !important; background: transparent !important; box-shadow: none !important; transform: none !important;
}
#appShell :is(.agent-directory-card, .experimental-tool-card)::before, #appShell :is(.agent-directory-card, .experimental-tool-card)::after { display: none !important; }
#appShell :is(.agent-directory-card, .experimental-tool-card):hover { background: transparent !important; }
#appShell :is(.agent-directory-card, .experimental-tool-card) :is(strong, h3) { color: var(--sv-text); font-size: 14px; }
#appShell :is(.agent-directory-card, .experimental-tool-card) p { margin: 10px 0 12px !important; color: var(--sv-muted) !important; font-size: 12px !important; line-height: 1.6 !important; }
#appShell :is(.agent-directory-card, .experimental-tool-card) footer { border: 0 !important; padding: 0 !important; margin-top: auto; min-height: 34px; }
#appShell :is(.agent-directory-card, .experimental-tool-card) footer > span { color: var(--sv-muted); font-size: 11px; }
#appShell :is(.agent-directory-orb, .experimental-tool-icon, .panel-icon, .knowledge-file-icon) { width: 32px !important; height: 32px !important; border: 0 !important; border-radius: 8px !important; background: var(--sv-hover) !important; color: var(--sv-muted) !important; box-shadow: none !important; }
#appShell .experimental-tool-card > header { position: absolute; left: 0; top: 18px; }
#appShell .experimental-tool-copy h3 { padding-left: 44px; min-height: 32px; display: flex; align-items: center; }
#appShell .experimental-tool-copy { margin: 0; }
#appShell .experimental-tool-open { border: 0 !important; background: transparent !important; color: var(--sv-accent) !important; min-height: 30px; padding: 4px 0; }
#appShell .experimental-tool-card footer strong { font-size: 11px; color: var(--sv-muted); font-weight: 400; }
#appShell .agents-directory-toolbar { display: flex; align-items: center; gap: 16px; padding: 0 0 8px; background: transparent; border: 0; }
#appShell .agents-directory-toolbar .sv-select-nav { margin: 0; }
#appShell .agent-search-field { flex: 1; border: 0; background: transparent; }
#appShell .agent-catalog-heading { margin: 14px 0 0; }
#appShell .agent-catalog-heading strong { display: none; }
#appShell .agent-catalog-heading span { color: var(--sv-muted); font-size: 11px; font-weight: 400; text-transform: none; }
#appShell .agent-directory-card > header { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
#appShell .agent-directory-card > header > div { min-width: 0; }
#appShell .agent-directory-card > header small { font-size: 10px; }
#appShell .agent-readiness-dot { font-size: 10px; padding: 3px 6px; }
#appShell :is(.agent-readiness-dot, .experimental-status-dot) { box-shadow: none; }

/* Shared neutral surfaces replace feature-specific chrome and gradients. */
#appShell :is(.automation-workbench, .automation-run-history, .scheduled-card, .schedule-card, .plugin-marketplace, .plugin-card, .plugin-card-v2, .connector-card, .remote-v4-panel, .remote-v4-pairing, .remote-v4-policy, .remote-v4-danger, .knowledge-source-library, .knowledge-chat-panel, .agent-messenger-shell, .messenger-channel-rail, .messenger-context-rail, .agent-brain-index, .agent-brain-reader, .vsa-source-panel, .vsa-projects, .vsa-workspace, .vsa-query-column, .vsa-memory-column, .live-avatar-control-deck, .live-vision-control-deck, .avatar-control-section, .live-vision-control-section, .cc-inspector, .cc-inspector > section, .voice-production-suite, .voice-live-experience, .voice-studio-workbench, .rts-page, .rts-session-panel, .rts-conversation, .native-computer-run, .computer-preview, .computer-file-tree, .computer-file-preview, .cinema-workspace, .cinema-stage-card, .cinema-deck, .settings-modal, .settings-panel, .settings-content, .settings-sidebar) {
  background: var(--sv-surface) !important; color: var(--sv-text) !important; border-color: var(--sv-line) !important;
  border-radius: 10px; box-shadow: none !important; background-image: none !important;
}
#appShell :is(.remote-v4-panel, .avatar-control-section, .live-vision-control-section, .cc-inspector > section) { border: 0 !important; border-bottom: 1px solid var(--sv-line) !important; border-radius: 0 !important; }
#appShell :is(.remote-v4-panel, .remote-v4-pairing, .knowledge-source-library, .knowledge-chat-panel, .messenger-channel-rail, .agent-brain-index, .agent-brain-reader, .plugin-marketplace) { padding: 18px; }
#appShell :is(.automation-workbench-head, .plugin-marketplace-head, .messenger-thread-head, .knowledge-chat-header, .vsa-project-head, .cc-topbar, .cut-appbar, .rts-topbar, .voice-live-header, .agent-studio-head) { background: transparent !important; border-color: var(--sv-line) !important; }
#appShell :is(.knowledge-v2-workspace, .agent-brain-layout) { grid-template-columns: minmax(240px, .65fr) minmax(0, 1.5fr) !important; gap: 24px; }
#appShell .sv-two-column-chat { grid-template-columns: 200px minmax(0, 1fr) !important; gap: 20px; }
#appShell .sv-two-column-chat > .sv-disclosure { grid-column: 1 / -1; }
#appShell .knowledge-product-tabs { padding: 0 0 16px; margin: 0; background: transparent; border: 0; gap: 8px; }
#appShell .knowledge-product-tabs button { padding: 8px 12px; border-radius: 8px; background: transparent; border: 0; }
#appShell .knowledge-product-tabs button small { display: none; }
#appShell .private-knowledge-tabs button.is-active { background: var(--sv-accent-soft); color: var(--sv-accent); }
#appShell :is(.plugin-toolbar, .plugin-marketplace-head, .library-toolbar) { margin-bottom: 16px; border: 0; }
#appShell :is(.remote-v4-grid, .remote-v4-grid.lower) { gap: 24px; }
#appShell .remote-v4-pairing { border-radius: 10px; padding: 24px; }
#appShell .remote-v4-pair-steps { gap: 10px; }
#appShell .vsa-shell { grid-template-columns: 200px minmax(0, 1fr); gap: 24px; }
#appShell .vsa-source-panel { padding: 24px; border: 1px solid var(--sv-line); }
#appShell .vsa-source-panel > header h3 { font-size: 17px; }
#appShell .vsa-source-panel > header p, #appShell .vsa-private-pill, #appShell .vsa-field-note { display: none; }
#appShell .vsa-pipeline-config > summary { padding: 12px 0; }
#appShell .gan-lab-page > .sv-select-nav { margin-bottom: 20px; }
#appShell .gan-source-grid { gap: 12px; }
#appShell .gan-source-slot { background: var(--sv-surface); border: 1px dashed var(--sv-line); border-radius: 10px; }
#appShell .gan-run-button small { display: none; }
#appShell .teleprompter-reader { background: var(--sv-rail); border-radius: 10px; padding: 32px; }
#appShell .teleprompter-reader p { font-family: var(--sv-font) !important; }
#appShell .teleprompter-editor .teleprompter-script-field textarea { min-height: 340px; }
#appShell :is(.live-avatar-workspace, .live-vision-workspace) { grid-template-columns: minmax(0, 1.5fr) minmax(290px, .8fr); gap: 24px; }
#appShell :is(.live-avatar-control-deck, .live-vision-control-deck) { padding: 16px; }
#appShell :is(.avatar-control-section, .live-vision-control-section) header > span { display: none; }
#appShell :is(.avatar-control-section, .live-vision-control-section) header h3 { font-size: 13px; }
#appShell :is(.avatar-control-section, .live-vision-control-section) header p { display: none; }
#appShell .creator-live-stage { min-height: 400px; background: var(--sv-rail); border: 1px solid var(--sv-line); border-radius: 10px; }
#appShell :is(.live-stage-empty, .live-avatar-stage-empty) { background: var(--sv-rail); color: var(--sv-muted); }
#appShell :is(.live-stage-empty, .live-avatar-stage-empty) > span { color: var(--sv-muted); background: transparent; border: 0; box-shadow: none; }
#appShell .live-stage-status { background: var(--sv-surface); border-color: var(--sv-line); }
#appShell .live-stage-status small { display: none; }
#appShell .live-vision-source-note { display: none; }
#appShell .voice-mode-production-page { display: grid; gap: 28px; }
#appShell .voice-live-experience.is-integrated { min-height: 300px; border: 1px solid var(--sv-line); }
#appShell .voice-live-stage { padding: 20px; min-height: 180px; background: transparent; }
#appShell .voice-live-orb { width: 76px; height: 76px; background: var(--sv-accent-soft) !important; color: var(--sv-accent); border: 1px solid var(--sv-line); box-shadow: none !important; }
#appShell .voice-live-orb::before, #appShell .voice-live-orb::after { display: none; }
#appShell .voice-live-state strong { font-size: 19px; }
#appShell .voice-live-state p { max-width: 440px; color: var(--sv-muted); font-size: 12px; }
#appShell .voice-production-suite { padding: 0; background: transparent !important; border: 0; }
#appShell .voice-production-header { margin-bottom: 20px; border: 0; }
#appShell .voice-production-header :is(p, small), #appShell .voice-production-header > span { display: none; }
#appShell .voice-production-header h2 { font-size: 20px; }
#appShell .rts-page { width: 100%; min-height: calc(100dvh - 120px); border-radius: 0; }
#appShell .rts-welcome { min-height: 480px; padding: 56px 24px; }
#appShell .rts-welcome h1 { font-size: 30px !important; line-height: 1.2; }
#appShell .rts-welcome > p { font-size: 13px; max-width: 410px; color: var(--sv-muted); }
#appShell .rts-welcome .sv-disclosure { width: min(420px, 100%); text-align: left; }
#appShell .rts-start-options { padding: 0; border: 0; background: transparent; }
#appShell .rts-welcome > .rts-browser-note { max-width: 420px; font-size: 11px; }

/* Creative workspaces keep their canvas and timeline; controls share the shell. */
#appShell :is(.shamverse-cut-page, .creator-canvas-page) { padding: 12px !important; width: 100% !important; max-width: none; }
#appShell :is(.cut-appbar, .cc-topbar) { border-radius: 0; padding: 12px; background: var(--sv-bg) !important; }
#appShell :is(.cut-library, .cut-properties, .cut-command-deck, .cut-preview, .cut-timeline, .cut-library-header, .cut-properties-header, .cut-preview-toolbar, .cut-timeline-toolbar, .cc-stage-shell, .cc-inspector) { background: var(--sv-surface) !important; color: var(--sv-text) !important; border-color: var(--sv-line) !important; box-shadow: none !important; border-radius: 8px; }
#appShell .cut-workspace { gap: 12px; grid-template-columns: 200px minmax(320px, 1fr) 235px; }
#appShell .cc-workspace { gap: 16px; grid-template-columns: minmax(0, 1fr) 300px; }
#appShell :is(.cut-command-deck, .cc-inspector) :is(p, small) { color: var(--sv-muted); font-size: 11px; }
#appShell .cut-command-deck { padding: 12px 16px; border: 1px solid var(--sv-line); margin: 10px 0; }
#appShell .cut-status-rail { border: 0; background: transparent; }
#appShell .cc-floating-tools { background: var(--sv-surface); border: 1px solid var(--sv-line); border-radius: 10px; box-shadow: 0 6px 24px #0002; }
#appShell .cc-floating-tools :is(button, label) { color: var(--sv-muted); }
#appShell .cc-floating-tools button.active { color: var(--sv-accent); background: var(--sv-accent-soft); }
#appShell .cc-footer { padding: 10px 0; border: 0; background: transparent; }
#appShell .cc-inspector { padding: 16px; }
#appShell .agent-studio-overlay { --studio-line: var(--sv-line); background: var(--sv-bg); color: var(--sv-text); }
#appShell :is(.agent-studio-head, .agent-studio-command-deck, .agent-studio-zone-rail, .agent-studio-task-list > *, .agent-studio-agent-list > *, .agent-studio-command-deck > header, .agent-studio-command-deck > nav) { background: var(--sv-surface) !important; border-color: var(--sv-line) !important; color: var(--sv-text) !important; }
#appShell .agent-studio-title strong { font-size: 19px; }
#appShell .agent-studio-title > span, #appShell .agent-studio-metrics small { color: var(--sv-muted); }
#appShell .agent-studio-task-list > *, #appShell .agent-studio-agent-list > * { border-radius: 8px; box-shadow: none; }

/* Composer, execution surfaces, and dialogs use the same palette. */
#appShell .home-center { width: min(720px, calc(100% - 48px)); }
#appShell .home-center .plan-pill { display: none; }
#appShell .home-center h2 { margin-bottom: 28px; font-size: 30px !important; font-weight: 500 !important; }
#appShell .task-composer, #appShell .task-composer.is-coworker { background: var(--sv-surface) !important; border: 1px solid var(--sv-line) !important; border-radius: 14px !important; box-shadow: none !important; }
#appShell .task-composer.is-coworker { border-color: color-mix(in srgb, var(--sv-accent) 45%, var(--sv-line)) !important; }
#appShell .task-composer textarea { background: transparent !important; border: 0 !important; min-height: 108px; }
#appShell .task-composer .composer-input-shell { border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; }
#appShell .composer-tools { border: 0; padding: 8px 10px; }
#appShell :is(.composer-runtime-summary, .permission-pill, .round-tool) { background: transparent !important; color: var(--sv-muted); border: 0 !important; box-shadow: none !important; }
#appShell .round-tool.send { background: var(--sv-accent) !important; color: var(--sv-accent-ink) !important; }
#appShell :is(.composer-menu, .composer-runtime-panel, .notification-panel, .modal-card, .connector-dialog, .task-overflow-menu) { background: var(--sv-surface) !important; border: 1px solid var(--sv-line) !important; color: var(--sv-text); border-radius: 10px !important; box-shadow: 0 14px 40px #0003 !important; }
#appShell :is(.composer-menu, .composer-runtime-panel) button { color: var(--sv-text); }
#appShell .composer-runtime-grid button.selected { background: var(--sv-hover); }
#appShell :is(.computer-preview > header, .computer-surface-bar, .computer-browser-toolbar, .computer-browser-nav, .native-computer-body, .native-computer-trustbar, .native-computer-start) { color: var(--sv-text) !important; background: var(--sv-surface) !important; border-color: var(--sv-line) !important; box-shadow: none !important; }
#appShell .computer-preview { border: 1px solid var(--sv-line); }
#appShell .computer-surface-bar select { min-height: 28px; padding: 4px 8px; }
#appShell .native-terminal-screen, #appShell .native-terminal-input { background: #0c0e0d !important; color: #ecefec !important; }
#appShell .native-terminal-input input { color: #ecefec !important; background: transparent !important; border: 0 !important; padding: 0 !important; }
#appShell .terminal-statusbar, #appShell .integrated-terminal-tabs { background: var(--sv-rail); color: var(--sv-muted); border-color: var(--sv-line); }
#appShell .settings-modal :is(.settings-section, .settings-card, .setting-row, .settings-section > header) { border-color: var(--sv-line) !important; background: transparent !important; box-shadow: none !important; }
#appShell .settings-modal h2 { font-size: 22px; }
#appShell .settings-modal h3 { font-size: 15px; }
#appShell .settings-modal :is(p, small) { color: var(--sv-muted); }

/* Specialist inputs follow the same layout, including song and dance tools. */
#appShell .agent-workspace-header { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 0 0 24px; border: 0; background: transparent; }
#appShell .agent-workspace-header > div { flex: 1; }
#appShell .agent-workspace-header h2 { margin: 0; font-size: 23px; }
#appShell .agent-workspace-header :is(.surface-kicker, p) { display: none; }
#appShell .agent-workspace-back { border: 0; background: transparent; color: var(--sv-muted); font-size: 12px; }
#appShell .agent-generic-workspace, #appShell .text-to-agent-lab { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
#appShell :is(.agent-generic-overview, .agent-output-contract, .text-to-agent-form-card, .text-to-result-card) { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
#appShell .agent-generic-overview > :is(.agent-directory-orb, .surface-kicker, h3), #appShell .text-to-agent-kicker, #appShell .text-to-agent-form-card > p { display: none; }
#appShell .agent-generic-overview p { color: var(--sv-muted); font-size: 13px; }
#appShell .text-to-agent-form textarea { min-height: 200px; }
#appShell .agent-output-contract { justify-content: center; border-left: 1px solid var(--sv-line); padding-left: 28px; color: var(--sv-text); }
#appShell .agent-tool-list { margin: 14px 0; }
#appShell .agent-tool-list span { border: 0; background: transparent; padding: 4px 0; color: var(--sv-muted); }
#appShell #agentBriefForm { display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
#appShell #agentBriefForm > button { align-self: flex-start; }
#appShell #agentBriefForm textarea { width: 100%; resize: vertical; min-height: 220px; }
#appShell #agentBriefForm label { color: var(--sv-text); font-size: 13px; }
#appShell .sv-input-note { margin: 0 0 8px; color: var(--sv-muted); font-size: 11px; }
#appShell .agent-output-contract { min-height: 320px; align-items: stretch; justify-content: flex-start; }
#appShell .agent-output-contract > strong { font-size: 15px; }
#appShell .agent-output-contract :is(p, span) { font-size: 12px; color: var(--sv-muted); }
#appShell .automation-workbench { padding: 0; border: 0; background: transparent !important; }
#appShell .automation-workbench-head { padding: 12px 0; border: 0; }
#appShell .automation-workbench-head > div > span, #appShell .automation-workbench-head small, #appShell .automation-workbench-head > div > div > span { display: none; }
#appShell .automation-cards { display: grid; grid-template-columns: 1fr; gap: 0; padding: 0; }
#appShell .automation-card { border: 0; border-bottom: 1px solid var(--sv-line); border-radius: 0; background: transparent; padding: 20px 0; box-shadow: none; }
#appShell .automation-card > p { font-size: 12px; color: var(--sv-muted); margin: 10px 0; }
#appShell .automation-card header { grid-template-columns: 32px minmax(0, 1fr) auto; }
#appShell .automation-card header small { display: none; }
#appShell .automation-card-icon { width: 28px; height: 28px; background: transparent; color: var(--sv-muted); }
#appShell .automation-meta { display: flex; flex-wrap: wrap; gap: 12px; }
#appShell .automation-meta span { min-height: 0; padding: 0; background: transparent; border: 0; font-size: 11px; color: var(--sv-muted); }
#appShell .automation-meta span:nth-child(3) { display: none; }
#appShell .automation-card footer { border: 0; padding: 8px 0 0; }
#appShell .feature-readiness { background: transparent !important; border: 1px solid var(--sv-line); border-radius: 8px; box-shadow: none; }
#appShell .feature-readiness p { font-size: 12px; color: var(--sv-muted); }
#appShell .sv-specialist-workbench { display: grid !important; grid-template-columns: minmax(250px, .9fr) minmax(0, 1.1fr) !important; align-items: start; gap: 28px; padding: 0; border: 0; background: transparent; }
#appShell .sv-specialist-panel { display: block !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
#appShell .sv-output-empty { min-height: 320px; display: flex; flex-direction: column; justify-content: center; color: var(--sv-muted); }
#appShell .sv-output-empty .sv-region-label { align-self: stretch; }
#appShell .sv-output-empty p { font-size: 12px; color: var(--sv-muted); }
#appShell :is(.sv-specialist-form, .sv-specialist-output) { min-width: 0; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none; }
#appShell .sv-specialist-form { display: flex; flex-direction: column; gap: 14px; }
#appShell .sv-specialist-form textarea { min-height: 160px; }
#appShell .sv-specialist-output { color: var(--sv-text); }
#appShell :is(.motion-review-card, .video-review-card, .audio-review-card, .caption-review-card, .youtube-report-section) { background: var(--sv-surface); color: var(--sv-text); border: 1px solid var(--sv-line); border-radius: 8px; box-shadow: none; }
#appShell .plugin-marketplace { border: 0; background: transparent !important; padding: 0; }
#appShell .plugin-marketplace-head { padding: 12px 0; }
#appShell .plugin-marketplace-head small, #appShell .plugin-section > .section-head p { display: none; }
#appShell .plugin-grid, #appShell .plugin-category-items { gap: 0 24px; }
#appShell .plugin-row { border: 0 !important; border-bottom: 1px solid var(--sv-line) !important; border-radius: 0 !important; padding: 18px 0; background: transparent !important; box-shadow: none !important; }
#appShell .plugin-row::before { display: none; }
#appShell .plugin-row p { color: var(--sv-muted); font-size: 12px; }
#appShell .plugin-row .connector-meta { display: none; }
#appShell .plugin-row :is(.connector-manage-button, .connector-connect-button) { color: var(--sv-text); border: 1px solid var(--sv-line); background: var(--sv-surface); }
#appShell .plugin-category-group h3 { font-size: 12px; color: var(--sv-muted); }
#appShell .plugin-section h2 { font-size: 17px; }
#appShell .plugin-view-toggle { flex-wrap: wrap; }
#appShell .search-row { background: transparent; border: 0; padding: 0; }
#appShell .shamverse-cut-page { --cut-bg: var(--sv-bg); --cut-panel: var(--sv-surface); --cut-panel-2: var(--sv-hover); --cut-text: var(--sv-text); --cut-muted: var(--sv-muted); --cut-line: var(--sv-line); --cut-line-strong: var(--sv-line); --cut-accent: var(--sv-accent); }
#appShell .cut-command-deck { display: flex; flex-direction: column; gap: 8px; padding: 14px; }
#appShell .cut-command-lead > span, #appShell .cut-command-lead :is(small, p) { display: none; }
#appShell .cut-command-lead { display: block; }
#appShell .cut-command-lead strong { font-size: 12px; font-weight: 500; }
#appShell .cut-command-form { padding: 0; border: 0; background: transparent; }
#appShell .cut-command-form textarea { height: 46px; min-height: 46px; max-height: 120px; }
#appShell .cut-command-form > button, #appShell .cut-play-button { background: var(--sv-accent); color: var(--sv-accent-ink); font-size: 12px; border: 0; }
#appShell .cut-command-controls { justify-content: flex-start; gap: 12px; flex-wrap: wrap; }
#appShell .cut-command-controls button { font-size: 11px; }
#appShell .cut-library-panel { display: flex; flex-direction: column; min-width: 0; background: var(--sv-surface); border: 1px solid var(--sv-line); border-radius: 8px; }
#appShell .cut-library-tabs { display: flex; flex-direction: row; flex-wrap: wrap; width: 100%; padding: 4px; border: 0; border-bottom: 1px solid var(--sv-line); background: transparent; gap: 2px; }
#appShell .cut-library-tabs button { flex: 1 0 40px; padding: 6px 2px; font-size: 10px; min-height: 42px; }
#appShell .cut-library-content { min-width: 0; padding: 10px; }
#appShell .cut-library-intro, #appShell .cut-empty-library { display: none; }
#appShell .cut-import-zone { min-height: 100px; padding: 12px; }
#appShell .cut-import-zone span:last-child { display: none; }
#appShell .cut-import-zone strong { font-size: 12px; }
#appShell .cut-import-zone span { font-size: 11px; }
#appShell :is(.cut-stage-panel, .cut-transport, .cut-program-empty) { background: var(--sv-rail); border-color: var(--sv-line); color: var(--sv-text); }
#appShell .cut-program-empty { border: 0; box-shadow: none; }
#appShell .cut-program-empty > span { background: transparent; border: 0; color: var(--sv-muted); box-shadow: none; }
#appShell .cut-program-empty p { color: var(--sv-muted); }
#appShell .cut-brand > span { color: var(--sv-muted); background: transparent; }
#appShell .agent-messenger-shell { min-width: 0; display: flex; flex-direction: column; height: calc(100dvh - 250px); min-height: 470px; }
#appShell .agent-messenger-thread { flex: 1; min-height: 0; overflow-y: auto; background: transparent !important; }
#appShell .messenger-channel-rail { background: transparent !important; padding: 12px; }
#appShell .agent-messenger-composer { margin: 12px; }
#appShell .remote-v4-toggle { display: flex; align-items: center; gap: 12px; padding: 14px 0; }
#appShell .remote-v4-toggle > div { flex: 1; min-width: 0; }
#appShell .remote-v4-toggle > div strong { font-size: 13px; }
#appShell .remote-v4-toggle > div small { font-size: 12px; }
#appShell .remote-v4-policy { padding: 16px 0; background: transparent !important; }
#appShell .knowledge-v2-workspace { min-height: 480px; height: calc(100dvh - 270px); }
#appShell .knowledge-source-library { display: flex; flex-direction: column; min-height: 0; padding: 14px; background: transparent !important; border: 0; border-right: 1px solid var(--sv-line); border-radius: 0; }
#appShell .knowledge-source-library > header { padding: 0 0 12px; border: 0; }
#appShell .knowledge-source-library > header > div > span, #appShell .knowledge-source-library > footer { display: none; }
#appShell .knowledge-source-list { flex: 1; min-height: 0; max-height: none; overflow-y: auto; padding-right: 4px; }
#appShell .knowledge-source-list > article { border: 0; border-bottom: 1px solid var(--sv-line); border-radius: 0; padding: 8px 0; background: transparent; }
#appShell .knowledge-source-search { border: 0; background: transparent; padding: 0; margin-bottom: 14px; }
#appShell .knowledge-chat-panel { display: flex; flex-direction: column; min-height: 0; padding: 0; border: 0; background: transparent !important; }
#appShell .knowledge-chat-panel > .knowledge-chat-workspace { display: flex; flex-direction: column; flex: 1; min-height: 0; }
#appShell .knowledge-chat-info { padding: 0 0 12px; background: transparent; border: 0; }
#appShell .agent-brain-view-switch button { background: transparent; border: 1px solid var(--sv-line); color: var(--sv-muted); }
#appShell .agent-brain-view-switch button.is-active { background: var(--sv-accent-soft); color: var(--sv-accent); border-color: var(--sv-line); }
#appShell .brain-graph-empty svg { color: var(--sv-muted); }
#appShell .library-group h2 { font-size: 14px; font-weight: 500; }
#appShell .library-group { margin-bottom: 24px; }
#appShell .library-item-icon { background: var(--sv-hover); color: var(--sv-muted); }
#appShell .gan-output-stage { min-height: 0; background: var(--sv-rail); border-radius: 8px; }
#appShell .gan-output-stage :is(img, video) { display: block; width: 100%; height: auto; max-height: 320px; object-fit: contain; }
#appShell .gan-proof-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 14px 0; }
#appShell .gan-proof-grid article { border: 0; background: transparent; padding: 0; }
#appShell .gan-proof-grid strong { font-size: 12px; }
#appShell .gan-result-card { border: 0; background: transparent; }
#appShell .gan-result-card > header { padding: 8px 0 14px; }
#appShell .gan-result-card > header > span { background: var(--sv-accent-soft); color: var(--sv-accent); }
#appShell .gan-empty-art, #appShell .gan-result-empty > span { color: var(--sv-muted); background: transparent; border: 0; box-shadow: none; }
#appShell .sv-setup-notice { font-size: 12px; color: var(--sv-muted); padding: 12px 0; border-bottom: 1px solid var(--sv-line); }
#appShell .intelligence-progress.idle { display: none; }
#appShell .intelligence-progress { background: var(--sv-hover); border-color: var(--sv-line); }
#appShell .intelligence-progress em { color: var(--sv-accent); }
#appShell :is(.intelligence-agent-report, .intelligence-source-card, .intelligence-result-summary article) { background: transparent; border-color: var(--sv-line); box-shadow: none; }
#appShell .knowledge-chat-log { flex: 1; min-height: 0; overflow-y: auto; background: transparent; border: 0; }
#appShell .knowledge-chat-empty { padding: 30px; border: 0; background: transparent; min-height: 220px; }
#appShell .knowledge-chat-form { margin-top: auto; padding: 12px 0 0; background: transparent; border: 0; }
#appShell .knowledge-chat-form textarea { min-height: 96px; max-height: 200px; }
#appShell .knowledge-chat-form :is(button, .round-tool) { color: var(--sv-muted); }
#appShell .knowledge-chat-form button[type="submit"] { background: var(--sv-accent); color: var(--sv-accent-ink); }
#appShell .agent-brain-index nav { max-height: calc(100dvh - 420px); overflow: auto; }

@media (max-width: 1100px) {
  #appShell { --rail-width: 204px; }
  #appShell .cut-workspace { grid-template-columns: 160px minmax(280px, 1fr); }
  #appShell .cut-properties { grid-column: 1 / -1; max-height: 350px; overflow: auto; }
  #appShell .sv-feature-header { align-items: flex-start; }
  #appShell :is(.web-intelligence-layout, .gan-lab-workspace, .text-to-agent-workspace, .voice-studio-workbench) { gap: 20px !important; grid-template-columns: minmax(250px, .9fr) minmax(0, 1.2fr) !important; }
}
@media (max-width: 820px) {
  #appShell .topbar { min-width: 0; max-width: 100%; padding: 0 12px; gap: 8px; }
  #appShell .topbar-model-select { min-width: 0; max-width: 210px; }
  #appShell .page-stage :is(.content-wide, .web-intelligence-page, .gan-lab-page, .videoseeask-page, .experimental-hub-page, .remote-access-v4, .schedule-surface, .agent-brain-page, .creator-live-page, .teleprompter-page, .voice-mode-production-page) { padding: 20px !important; }
  #appShell .sv-feature-header { flex-direction: column; gap: 16px; margin-bottom: 20px; }
  #appShell .sv-feature-heading h2 { font-size: 23px !important; }
  #appShell .sv-feature-actions { justify-content: flex-start; }
  #appShell :is(.web-intelligence-layout, .gan-lab-workspace, .text-to-agent-workspace, .teleprompter-layout, .voice-studio-workbench, .knowledge-v2-workspace, .agent-brain-layout, .live-avatar-workspace, .live-vision-workspace, .vsa-shell, .cc-workspace) { grid-template-columns: minmax(0, 1fr) !important; }
  #appShell :is(.agents-directory-grid, .experimental-tool-grid, .agent-generic-workspace, .text-to-agent-lab, .sv-specialist-workbench) { grid-template-columns: 1fr !important; }
  #appShell .sv-two-column-chat { grid-template-columns: minmax(0, 1fr) !important; }
  #appShell .messenger-channel-rail { max-height: 230px; overflow: auto; }
  #appShell .cc-stage-shell { min-height: 480px; }
  #appShell .agents-directory-toolbar { flex-wrap: wrap; }
  #appShell .agent-search-field { flex-basis: 100%; }
  #appShell .sv-action-menu[open] > .sv-disclosure-body { left: 0; right: auto; }
}
@media (prefers-reduced-motion: reduce) { #appShell *, #appShell *::before, #appShell *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (max-width: 520px) {
  #appShell .sidebar-collapsed .topbar { padding-left: 58px; }
  #appShell .topbar .credit-pill { display: none; }
  #appShell .home-center { width: 100%; min-width: 0; padding-left: 16px; padding-right: 16px; }
}
#appShell .intelligence-progress > span { background: var(--sv-accent-soft) !important; }
#appShell .intelligence-progress.completed { display: none; }
#appShell .vsa-workspace-grid { grid-template-columns: minmax(0, 1fr); }
#appShell .vsa-query-column > header p { display: none; }
#appShell .vsa-summary p { max-height: 240px; overflow: auto; }
#appShell .vsa-citations { max-height: 340px; overflow: auto; }
#appShell :is(.vsa-query-column form button, .teleprompter-primary, .voice-studio-run) { background: var(--sv-accent) !important; color: var(--sv-accent-ink) !important; border: 0 !important; }
#appShell .vsa-progress-card i { background: var(--sv-accent) !important; }
#appShell .vsa-answer-copy { font-size: 14px !important; line-height: 1.65; }
#appShell .vsa-citations article > p { font-size: 12px !important; line-height: 1.6; }
#appShell .vsa-query-column h3 { font-size: 17px; }
@media (min-width: 1101px) {
  #appShell .shamverse-cut-page { padding: 0 !important; }
  #appShell .cut-command-deck { gap: 4px; margin: 6px 0; padding: 8px 12px; }
  #appShell .cut-command-deck .sv-disclosure { margin: 0; }
  #appShell .cut-command-deck summary { min-height: 24px; padding: 4px 0; }
  #appShell .cut-workspace { min-height: 440px; height: calc(100dvh - 288px); grid-template-columns: 172px minmax(300px, 1fr) 205px; }
  #appShell .cut-editor-center { min-height: 0; grid-template-rows: minmax(240px, 1fr) 180px; }
  #appShell .cut-stage-panel { min-height: 0; }
  #appShell .cut-program-wrap { min-height: 0; padding: 8px; }
  #appShell .cut-program { max-height: 100%; }
  #appShell .cut-properties-panel, #appShell .cut-library-content { min-height: 0; overflow: auto; }
}
