/* Native TOKAI appearance. Theme state belongs to html[data-studio-theme].
   Color tokens only for shared OS surfaces; static layout is scoped to its native mount.
   Photos, generated ads, video, canvas and customer logos are never filtered or inverted. */
:root,
html[data-studio-theme="dark"]{
  color-scheme:dark;
  --studio-color-scheme:dark;
  --studio-bg:#101011;--studio-surface:#18181b;--studio-raised:#202024;
  --studio-inset:#141416;--studio-hover:#2a2a30;--studio-rail:#151517;
  --studio-line:#303037;--studio-line-strong:#4b4b56;
  --studio-text:#f1f1f5;--studio-muted:#acacb8;--studio-subtle:#9696a3;
  --studio-primary:#efeff3;--studio-primary-hover:#fff;--studio-primary-text:#17171b;
  --studio-selected:#2c2c34;--studio-selected-line:#666676;--studio-selected-text:#fff;
  --studio-disabled:#242429;--studio-disabled-text:#a5a5b1;
  --studio-success-bg:#203029;--studio-success-line:#3c604a;--studio-success:#baddc7;
  --studio-warning-bg:#322d22;--studio-warning-line:#695736;--studio-warning:#ead2a1;
  --studio-error-bg:#35232a;--studio-error-line:#71424e;--studio-error:#ffc1ce;
  --studio-info-bg:#232a35;--studio-info-line:#465670;--studio-info:#cedcf3;
  --studio-canvas:#121215;--studio-wall-opacity:.16;
  --studio-backdrop:#050509b8;--studio-popover-shadow:0 18px 65px #0008;
  --studio-control-radius:7px;--studio-panel-radius:11px;
  --studio-focus:#c3cbea;--studio-logo-filter:invert(1);
  --studio-native-topbar-height:72px;
  --bg:var(--studio-bg);--surface:var(--studio-surface);--raised:var(--studio-raised);
  --line:var(--studio-line);--text:var(--studio-text);--muted:var(--studio-muted);
  --faint:var(--studio-subtle);--accent:var(--studio-focus);--danger:var(--studio-error);
}
html[data-studio-theme="light"]{
  color-scheme:light;
  --studio-color-scheme:light;
  --studio-bg:#f7f7f8;--studio-surface:#fff;--studio-raised:#f1f1f4;
  --studio-inset:#fff;--studio-hover:#eaeaf0;--studio-rail:#fff;
  --studio-line:#dfdfe5;--studio-line-strong:#bfc0cb;
  --studio-text:#202027;--studio-muted:#62626e;--studio-subtle:#70707b;
  --studio-primary:#222226;--studio-primary-hover:#36363d;--studio-primary-text:#fff;
  --studio-selected:#ececf1;--studio-selected-line:#b9b9c5;--studio-selected-text:#202027;
  --studio-disabled:#e9e9ee;--studio-disabled-text:#666671;
  --studio-success-bg:#edf7f0;--studio-success-line:#c8e1d1;--studio-success:#2f6845;
  --studio-warning-bg:#fcf6e9;--studio-warning-line:#e6d7b4;--studio-warning:#795b23;
  --studio-error-bg:#fff0ed;--studio-error-line:#edc8c0;--studio-error:#a42e24;
  --studio-info-bg:#edf2fb;--studio-info-line:#ccd8eb;--studio-info:#3d567b;
  --studio-canvas:#f5f5f6;--studio-wall-opacity:.22;
  --studio-backdrop:#1b1b294d;--studio-popover-shadow:0 15px 48px #25253220;
  --studio-focus:#4d526b;--studio-logo-filter:none;
}

/* Shared authenticated shell and ordinary route components. */
html[data-studio-theme] body{background:var(--studio-bg);color:var(--studio-text)}
html[data-studio-theme] .shell{background:var(--studio-bg);color:var(--studio-text)}
html[data-studio-theme] .rail{background:var(--studio-rail);border-color:var(--studio-line);color:var(--studio-text)}
html[data-studio-theme] .main{background:var(--studio-bg);color:var(--studio-text)}
html[data-studio-theme] .topbar{background:var(--studio-bg);border-color:var(--studio-line);color:var(--studio-text)}
html[data-studio-theme] :is(.breadcrumb,.brand-select label,.nav-label,.account-name span){color:var(--studio-subtle)}
html[data-studio-theme] .account{border-color:var(--studio-line)}
html[data-studio-theme] .account-avatar{background:var(--studio-raised);border-color:var(--studio-line-strong)}
html[data-studio-theme] :is(.logo img,.account-avatar img,.boot-state img)[src$="/tokai-logo.svg"]{filter:var(--studio-logo-filter)}
html[data-studio-theme] .rail .nav-link{background:transparent;border-color:transparent;color:var(--studio-muted)}
html[data-studio-theme] .rail .nav-link .icon{color:var(--studio-subtle)}
html[data-studio-theme] .rail .nav-link:hover{background:var(--studio-raised);color:var(--studio-text)}
html[data-studio-theme] .rail .nav-link.active{background:var(--studio-selected);border-color:var(--studio-line-strong);color:var(--studio-selected-text)}
html[data-studio-theme] .rail .nav-link.active .icon{color:var(--studio-selected-text)}
html[data-studio-theme] .rail .static-subnav-link{font-size:13px;min-height:36px;padding:7px 10px 7px 35px;margin-top:-1px;gap:9px}
html[data-studio-theme] .rail .static-subnav-link .icon{width:15px;height:15px;flex:none}
html[data-studio-theme] .rail .static-subnav-link.active{border-color:transparent;background:var(--studio-raised)}
html[data-studio-theme] .shell :is(p,small,.muted,.faint,.inline-note,.rich-text,.list-toolbar>span,.form-actions>span,.page-footer){color:var(--studio-muted)}
html[data-studio-theme] .shell :is(label,legend){color:var(--studio-text)}
html[data-studio-theme] .shell :is(.eyebrow,.section-heading>span,.item-card>header,.item-card footer>span,.settings-row>span,.context-stats>div>span){color:var(--studio-subtle)}
html[data-studio-theme] .shell :is(.section-card,.item-card,.tool-card,.home-context,.file-detail-preview,.product-image-list>div){background:var(--studio-surface);border-color:var(--studio-line);color:var(--studio-text)}
html[data-studio-theme] .shell .tool-card:hover{border-color:var(--studio-line-strong)}
html[data-studio-theme] .shell :is(.tool-copy p,.tool-copy small,.home-intro h1 span){color:var(--studio-muted)}
html[data-studio-theme] .shell :is(.tabs button,.auth-tabs button){background:transparent;border-color:transparent;color:var(--studio-muted)}
html[data-studio-theme] .shell :is(.tabs button,.auth-tabs button)[aria-selected=true]{background:var(--studio-selected);border-color:var(--studio-line-strong);color:var(--studio-selected-text)}
html[data-studio-theme] .shell .empty{background:var(--studio-inset);border-color:var(--studio-line-strong);color:var(--studio-muted)}
html[data-studio-theme] .shell .empty .icon{color:var(--studio-subtle)}
html[data-studio-theme] :is(.shell,dialog) button{background-color:var(--studio-raised);color:var(--studio-text);border-color:var(--studio-line)}
html[data-studio-theme] :is(.shell,dialog) button:hover:not(:disabled){background-color:var(--studio-hover);border-color:var(--studio-line-strong);color:var(--studio-text)}
html[data-studio-theme] :is(.shell,dialog) button.primary{background:var(--studio-primary);border-color:var(--studio-primary);color:var(--studio-primary-text)}
html[data-studio-theme] :is(.shell,dialog) button.primary:hover:not(:disabled){background:var(--studio-primary-hover);border-color:var(--studio-primary-hover);color:var(--studio-primary-text)}
html[data-studio-theme] :is(.shell,dialog) button:disabled{background-color:var(--studio-disabled);border-color:var(--studio-line);color:var(--studio-disabled-text);opacity:1}
html[data-studio-theme] :is(.shell,dialog) :is(button.link,button.icon-button){background:transparent;border-color:transparent;color:var(--studio-muted)}
html[data-studio-theme] :is(.shell,dialog) button.icon-button:hover:not(:disabled){background:var(--studio-hover);color:var(--studio-text)}
html[data-studio-theme] :is(.shell,dialog) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=hidden]),select,textarea){background-color:var(--studio-inset)!important;color:var(--studio-text)!important;border-color:var(--studio-line-strong)!important}
html[data-studio-theme] :is(.shell,dialog) :is(input,textarea)::placeholder{color:var(--studio-subtle)!important;opacity:1}
html[data-studio-theme] :is(.shell,dialog) :is(input[type=checkbox],input[type=radio],input[type=range]){accent-color:var(--studio-primary)}
html[data-studio-theme] :is(.shell,dialog) :is(button,a,input,select,textarea,summary):focus-visible{outline:2px solid var(--studio-focus);outline-offset:3px}
html[data-studio-theme] :is(.shell,dialog) .badge{background:var(--studio-raised);color:var(--studio-muted);border-color:var(--studio-line-strong)}
html[data-studio-theme] :is(.shell,dialog) :is(.badge.available,.success){background:var(--studio-success-bg);color:var(--studio-success);border-color:var(--studio-success-line)}
html[data-studio-theme] :is(.shell,dialog) .error{background:var(--studio-error-bg);color:var(--studio-error);border-color:var(--studio-error-line)}
html[data-studio-theme] :is(.shell,dialog) .notice{background:var(--studio-info-bg);color:var(--studio-info);border-color:var(--studio-info-line)}
html[data-studio-theme] :is(.shell,dialog) .step-label{color:var(--studio-muted)}
html[data-studio-theme] :is(.shell,dialog) .step-label>span{border-color:var(--studio-line-strong)}
html[data-studio-theme] .toast{background:var(--studio-raised);border-color:var(--studio-line-strong);color:var(--studio-text);box-shadow:var(--studio-popover-shadow)}
html[data-studio-theme] dialog{background:var(--studio-surface);color:var(--studio-text);border-color:var(--studio-line-strong)}
html[data-studio-theme] dialog::backdrop{background:var(--studio-backdrop)}
html[data-studio-theme] dialog :is(.dialog-header,.dialog-body){background:var(--studio-surface);color:var(--studio-text);border-color:var(--studio-line)}
html[data-studio-theme] dialog :is(p,small,.rich-text){color:var(--studio-muted)}
html[data-studio-theme] .shell :is(.bk-section,.bk-overview,.bk-memory,.bk-fact-editor,.intake-status,.intake-presets){background:var(--studio-surface);border-color:var(--studio-line);color:var(--studio-text)}
html[data-studio-theme] .shell :is(.bk-caption,.bk-prose,.bk-notice,.intake-status p){color:var(--studio-muted)}

/* Native topbar controls: visible at every supported viewport. */
html[data-studio-theme] .studio-chrome-tools{display:flex;align-items:center;gap:6px;flex:none;margin-left:3px}
html[data-studio-theme] .studio-chrome-tools :is(.studio-chrome-theme,.studio-chrome-faq){display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;height:34px;min-width:34px;padding:6px 9px;border:1px solid var(--studio-line);border-radius:7px;background:transparent;color:var(--studio-muted);font-size:12px;line-height:1}
html[data-studio-theme] .studio-chrome-tools :is(.studio-chrome-theme,.studio-chrome-faq):hover{background:var(--studio-raised);border-color:var(--studio-line-strong);color:var(--studio-text)}
html[data-studio-theme] .studio-chrome-tools .icon{width:16px;height:16px;flex:none;color:inherit}
html[data-studio-theme] .studio-chrome-theme[aria-pressed=true]{background:var(--studio-selected);color:var(--studio-selected-text);border-color:var(--studio-selected-line)}
html[data-studio-theme] .studio-chrome-tools button:focus-visible{outline-color:var(--studio-focus)}

/* Native Static mount. Existing OS rail/topbar retain ownership of their geometry. */
html[data-studio-theme] .studio-static-workspace{max-width:none;margin:0;color:var(--studio-text);background:var(--studio-bg)}
html[data-studio-theme] .studio-static-workspace.static-studio-root:has(.static-designer-shell){display:flex;flex-direction:column;padding:0;height:calc(100dvh - var(--studio-native-topbar-height));min-height:0;max-height:none;overflow:hidden}
html[data-studio-theme] .studio-static-workspace.static-studio-root:not(:has(.static-designer-shell)){min-height:calc(100dvh - var(--studio-native-topbar-height));height:auto;padding:22px 30px 36px;overflow:visible}
html[data-studio-theme] :is(.static-studio-root,.static-studio-dialog){
  color-scheme:var(--studio-color-scheme);
  --static-paper:var(--studio-surface);--static-canvas:var(--studio-canvas);
  --static-ink:var(--studio-text);--static-muted:var(--studio-muted);
  --static-line:var(--studio-line);--static-focus:var(--studio-focus);
  --bg:var(--studio-bg);--surface:var(--studio-surface);--raised:var(--studio-raised);
  --text:var(--studio-text);--muted:var(--studio-muted);--faint:var(--studio-subtle);--line:var(--studio-line);
  background:var(--studio-surface);color:var(--studio-text);
}
html[data-studio-theme] .studio-static-workspace :is(.static-designer-heading,.static-designer-tabs){display:none}
html[data-studio-theme] .static-context-toolbar{display:flex;align-items:center;justify-content:space-between;flex:0 0 44px;min-height:44px;gap:16px;padding:5px 24px;margin:0;border-bottom:1px solid var(--studio-line);background:var(--studio-bg);color:var(--studio-muted)}
html[data-studio-theme] .static-context-links{display:flex;align-items:center;gap:4px;min-width:0}
html[data-studio-theme] .static-context-toolbar button{min-height:30px;padding:5px 11px;border-radius:var(--studio-control-radius);font-size:12px;line-height:1.4;border:1px solid transparent;background:transparent;color:var(--studio-muted);white-space:nowrap}
html[data-studio-theme] .static-context-toolbar button:hover{background:var(--studio-raised);color:var(--studio-text)}
html[data-studio-theme] .static-context-toolbar button[aria-selected=true],html[data-studio-theme] .static-context-toolbar button[aria-pressed=true]{background:var(--studio-selected);border-color:var(--studio-line);color:var(--studio-selected-text)}
html[data-studio-theme] .static-context-toolbar :is(.static-context-actions,.toolbar-buttons){display:flex;gap:8px;align-items:center;flex:none}
html[data-studio-theme] .static-studio-root .static-designer-shell{flex:1 1 auto;min-height:0;height:auto;max-height:none;border:0;border-radius:0;box-shadow:none;background:var(--studio-surface)}
html[data-studio-theme] .static-studio-root .static-designer-sidebar{background:var(--studio-surface);border-color:var(--studio-line);color:var(--studio-text)}
html[data-studio-theme] .static-studio-root .static-designer-controls{background:var(--studio-surface);scrollbar-color:var(--studio-line-strong) var(--studio-surface)}
html[data-studio-theme] .static-studio-root .static-designer-section{background:var(--studio-surface);border-color:var(--studio-line);color:var(--studio-text)}
html[data-studio-theme] .static-studio-root .static-designer-section :is(h2,h3,label,legend){color:var(--studio-text)}
html[data-studio-theme] .static-studio-root .static-designer-section :is(p,small,.inline-note,.static-designer-control-help){color:var(--studio-muted)}
html[data-studio-theme] .static-studio-root .static-designer-section :is(input:not([type=checkbox]):not([type=radio]),select,textarea){border-radius:var(--studio-control-radius);color-scheme:var(--studio-color-scheme)}
html[data-studio-theme] .static-studio-root .static-designer-section :is(button,summary){border-radius:var(--studio-control-radius);color:var(--studio-muted);border-color:var(--studio-line-strong)}
html[data-studio-theme] .static-studio-root .static-designer-section button{background-color:var(--studio-inset)}
html[data-studio-theme] .static-studio-root .static-designer-section button:hover:not(:disabled){background:var(--studio-raised);border-color:var(--studio-line-strong);color:var(--studio-text)}
html[data-studio-theme] .static-studio-root .static-designer-section button[aria-pressed=true]{background:var(--studio-selected);border-color:var(--studio-selected-line);color:var(--studio-selected-text)}
html[data-studio-theme] .static-studio-root .static-designer-section button[aria-pressed=true]:hover{background:var(--studio-hover);color:var(--studio-selected-text)}
html[data-studio-theme] .static-studio-root .static-designer-section button:disabled{background:var(--studio-disabled);border-color:var(--studio-line);color:var(--studio-disabled-text);opacity:1}
html[data-studio-theme] .static-studio-root :is(.static-style-picker,.static-designer-project-picker>summary){background:var(--studio-inset);border-color:var(--studio-line-strong);color:var(--studio-text);border-radius:var(--studio-control-radius)}
html[data-studio-theme] .static-studio-root .static-style-picker :is(b,strong){color:var(--studio-text)}
html[data-studio-theme] .static-studio-root :is(.static-style-picker small,.static-style-picker>.icon,.static-designer-project-picker small,.static-designer-project-picker svg){color:var(--studio-subtle)}
html[data-studio-theme] .static-studio-root .static-designer-project-picker[open]>.static-designer-project-selects{background:var(--studio-inset);border-color:var(--studio-line-strong)}
html[data-studio-theme] .static-studio-root .static-designer-format-button{background:var(--studio-inset);border-color:var(--studio-line-strong);color:var(--studio-muted);border-radius:var(--studio-control-radius)}
html[data-studio-theme] .static-studio-root .static-designer-format-button[aria-pressed=true]{background:var(--studio-selected);border-color:var(--studio-selected-line);color:var(--studio-selected-text)}
html[data-studio-theme] .static-studio-root .static-designer-format-recommended{background:var(--studio-primary);color:var(--studio-primary-text);border-radius:3px}
html[data-studio-theme] .static-studio-root .static-designer-aspect-icon{color:var(--studio-subtle)}
html[data-studio-theme] .static-studio-root .static-designer-format-button[aria-pressed=true] .static-designer-aspect-icon{color:var(--studio-selected-text)}
html[data-studio-theme] .static-studio-root .static-designer-more-ratios>summary{background:var(--studio-inset);color:var(--studio-muted);border-color:var(--studio-line-strong)}
html[data-studio-theme] .static-studio-root .static-designer-more-ratios-menu{background:var(--studio-surface);border-color:var(--studio-line)}
html[data-studio-theme] .static-studio-root .static-designer-switch input+span{border-color:var(--studio-line-strong);background:var(--studio-disabled);border-radius:2px}
html[data-studio-theme] .static-studio-root .static-designer-switch input+span:before{background:var(--studio-subtle);border-color:var(--studio-line-strong);border-radius:1px}
html[data-studio-theme] .static-studio-root .static-designer-switch input:checked+span{background:var(--studio-selected);border-color:var(--studio-selected-line)}
html[data-studio-theme] .static-studio-root .static-designer-switch input:checked+span:before{background:var(--studio-primary);border-color:var(--studio-primary)}
html[data-studio-theme] .static-studio-root .static-designer-switch:has(input:focus-visible){outline-color:var(--studio-focus)}
html[data-studio-theme] .static-studio-root .static-designer-switch input:disabled+span{background:var(--studio-disabled);border-color:var(--studio-line)}
html[data-studio-theme] .static-studio-root .static-designer-switch:has(input:disabled){color:var(--studio-disabled-text)}
html[data-studio-theme] .static-studio-root .static-designer-section input[type=range]{background:transparent!important;border:0!important;accent-color:var(--studio-primary)}
html[data-studio-theme] .static-studio-root .static-designer-section input[type=range]::-webkit-slider-runnable-track{background:var(--studio-line-strong)}
html[data-studio-theme] .static-studio-root .static-designer-section input[type=range]::-webkit-slider-thumb{background:var(--studio-primary);border-color:var(--studio-primary)}
html[data-studio-theme] .static-studio-root .static-designer-section input[type=range]::-moz-range-track{background:var(--studio-line-strong)}
html[data-studio-theme] .static-studio-root .static-designer-section input[type=range]::-moz-range-thumb{background:var(--studio-primary);border-color:var(--studio-primary)}
html[data-studio-theme] .static-studio-root :is(.static-designer-experiment-label,.static-designer-experiment-label>b,.static-designer-info,.static-designer-awareness>summary){color:var(--studio-muted);border-color:var(--studio-line)}
html[data-studio-theme] .static-studio-root .static-designer-asset-strip>img{background:var(--studio-inset);border-color:var(--studio-line-strong)}
html[data-studio-theme] .static-studio-root .static-brain-summary{background:transparent;color:var(--studio-muted);border-color:var(--studio-line)}
html[data-studio-theme] .static-studio-root .static-brain-state>b{color:var(--studio-text)}
html[data-studio-theme] .static-studio-root .static-brain-state>:is(p,small,button){color:var(--studio-muted)}
html[data-studio-theme] .static-studio-root .static-brain-state[data-brain-status=review]>b{color:var(--studio-warning)}
html[data-studio-theme] .static-studio-root .static-designer-footer{background:var(--studio-surface);border-color:var(--studio-line);color:var(--studio-text)}
html[data-studio-theme] .static-studio-root .static-designer-footer button.primary{background:var(--studio-primary);border-color:var(--studio-primary);color:var(--studio-primary-text);border-radius:var(--studio-control-radius)}
html[data-studio-theme] .static-studio-root .static-designer-footer button.primary:hover:not(:disabled){background:var(--studio-primary-hover);border-color:var(--studio-primary-hover);color:var(--studio-primary-text)}
html[data-studio-theme] .static-studio-root .static-designer-footer button.primary:disabled{background:var(--studio-disabled);border-color:var(--studio-line-strong);color:var(--studio-disabled-text);opacity:1}
html[data-studio-theme] .static-studio-root .static-designer-footer button.primary small{color:inherit;opacity:.8}
html[data-studio-theme] .static-studio-root .static-designer-footer :is(.static-designer-cost-note,.static-builder-missing){color:var(--studio-muted)!important}
html[data-studio-theme] .static-studio-root .static-designer-footer-links>button{color:var(--studio-subtle);background:transparent}
html[data-studio-theme] .static-studio-root .static-designer-canvas{background:var(--studio-canvas);color:var(--studio-text)}
html[data-studio-theme] .static-studio-root .static-designer-showcase-wall{opacity:var(--studio-wall-opacity)}
html[data-studio-theme] .static-studio-root .static-designer-welcome-overlay{background:var(--studio-surface);border-color:var(--studio-line-strong);color:var(--studio-text);border-radius:var(--studio-panel-radius);box-shadow:var(--studio-popover-shadow)}
html[data-studio-theme] .static-studio-root .static-designer-welcome-overlay>header{border-color:var(--studio-line)}
html[data-studio-theme] .static-studio-root .static-designer-welcome-overlay :is(h2,h3,li b){color:var(--studio-text)}
html[data-studio-theme] .static-studio-root .static-designer-welcome-overlay :is(p,h4,small){color:var(--studio-muted)}
html[data-studio-theme] .static-studio-root .static-designer-welcome-overlay>header>span,html[data-studio-theme] .static-studio-root .static-designer-welcome-overlay>ol>li>span{background:var(--studio-raised);color:var(--studio-muted)}
html[data-studio-theme] .static-studio-root .static-designer-clone-reference>figcaption{color:var(--studio-muted)}
html[data-studio-theme] .static-studio-root :is(.static-reference-empty,.static-designer-dropzone,.static-designer-reference>button){background:var(--studio-inset);border-color:var(--studio-line-strong);color:var(--studio-muted);border-radius:var(--studio-control-radius)}
html[data-studio-theme] .static-studio-root .static-designer-reference-actions button{background:var(--studio-raised);border-color:var(--studio-line);color:var(--studio-muted)}

/* Existing campaigns, template gallery, matrix, editor and result components. */
html[data-studio-theme] :is(.static-studio-root,.static-studio-dialog) :is(.static-recipe-card,.static-campaign-card,.static-variant-card,.static-plan-card,.static-concept-card,.static-job-card,.static-tools-card,.static-summary-panel,.static-brief-summary){background:var(--studio-surface);color:var(--studio-text);border-color:var(--studio-line);border-radius:var(--studio-panel-radius)}
html[data-studio-theme] :is(.static-studio-root,.static-studio-dialog) :is(.static-recipe-card,.static-variant-card,.static-concept-card)[data-selected=true]{border-color:var(--studio-selected-line);box-shadow:0 0 0 1px var(--studio-selected-line)}
html[data-studio-theme] :is(.static-studio-root,.static-studio-dialog) .static-recipe-card>button{background:transparent;border:0;color:var(--studio-text)}
html[data-studio-theme] :is(.static-studio-root,.static-studio-dialog) .static-recipe-card>button:hover{background:var(--studio-raised)}
html[data-studio-theme] :is(.static-studio-root,.static-studio-dialog) :is(.static-recipe-copy h3,.static-campaign-card h3,.static-concept-copy h3,.static-job-body h3,.static-summary-row>b,.static-tools-card h3){color:var(--studio-text)}
html[data-studio-theme] :is(.static-studio-root,.static-studio-dialog) :is(.static-recipe-copy p,.static-recipe-copy>small,.static-schematic-label,.static-campaign-card p,.static-campaign-card footer,.static-campaign-card footer>span,.static-concept-copy>p,.static-concept-meta,.static-job-status,.static-summary-row>span,.static-tools-card p){color:var(--studio-muted);border-color:var(--studio-line)}
html[data-studio-theme] :is(.static-studio-root,.static-studio-dialog) :is(.static-plan-card>header,.static-plan-card .form-actions,.static-concept-select,.static-results-selection,.static-selection-actions,.static-template-pages,.static-brief-summary,.static-form-footer){background:var(--studio-surface);color:var(--studio-muted);border-color:var(--studio-line)}
html[data-studio-theme] :is(.static-studio-root,.static-studio-dialog) :is(.static-concept-select label,.static-plan-card>header p,.static-form-footer>span){color:var(--studio-muted)}
html[data-studio-theme] .static-studio-root :is(.static-job-preview,.static-concept-reference,.static-concept-editor-layout>aside){background:var(--studio-inset);border-color:var(--studio-line)}
html[data-studio-theme] .static-studio-root .static-concept-reference>span{background:var(--studio-surface);color:var(--studio-muted);border-color:var(--studio-line)}
html[data-studio-theme] .static-studio-root .static-selected-mark{background:var(--studio-primary);color:var(--studio-primary-text)}
html[data-studio-theme] .static-studio-root .static-selection-footer{background:var(--studio-surface);border-color:var(--studio-line-strong);box-shadow:0 -5px 22px #0000000a;color:var(--studio-text)}
html[data-studio-theme] .static-studio-root .static-selection-footer span{color:var(--studio-muted)}
html[data-studio-theme] .static-studio-root .static-job-body footer{border-color:var(--studio-line)}
html[data-studio-theme] .static-studio-root .static-job-body footer :is(button,a){color:var(--studio-muted)}
html[data-studio-theme] .static-studio-root .static-job-body footer button.primary{color:var(--studio-primary-text);background:var(--studio-primary)}
html[data-studio-theme] .static-studio-root .static-result-select{background:var(--studio-surface);color:var(--studio-muted);border-color:var(--studio-line-strong)}
html[data-studio-theme] .static-studio-root .static-result-select>span{color:var(--studio-muted)}
html[data-studio-theme] .static-studio-root :is(.static-inline-status,.static-version-note,.static-provider-note,.static-source-note,.static-layout-help){color:var(--studio-muted)}
html[data-studio-theme] .static-studio-root .static-notice-warning{background:var(--studio-warning-bg);border-color:var(--studio-warning-line);color:var(--studio-warning)}
html[data-studio-theme] .static-studio-root .static-planning-status{background:var(--studio-info-bg);border-color:var(--studio-info-line);color:var(--studio-info)}
html[data-studio-theme] .static-studio-root .static-planning-status span{color:var(--studio-info)}
html[data-studio-theme] .static-studio-root .static-planning-status.complete{background:var(--studio-success-bg);border-color:var(--studio-success-line);color:var(--studio-success)}
html[data-studio-theme] .static-studio-root :is(.static-builder-brief,.static-builder-workspace,.static-builder-plan-header,.static-template-library,.static-reference-match,.static-plan-preview,.static-output-count,.static-product-option,.static-product-image-picker){background:var(--studio-surface);border-color:var(--studio-line);color:var(--studio-text)}
html[data-studio-theme] .static-studio-root .static-product-option[data-selected=true]{background:var(--studio-selected);border-color:var(--studio-selected-line)}
html[data-studio-theme] .static-studio-root :is(.static-product-option small,.static-plan-preview small,.static-plan-preview-note,.static-builder-plan-header p,.static-builder-missing){color:var(--studio-muted)!important}
html[data-studio-theme] .static-studio-root :is(.static-product-option-art,.static-product-image-picker label){background:var(--studio-inset);border-color:var(--studio-line-strong);color:var(--studio-muted)}
html[data-studio-theme] .static-studio-root .static-plan-preview th{background:var(--studio-raised);color:var(--studio-muted);border-color:var(--studio-line)}
html[data-studio-theme] .static-studio-root .static-plan-preview td{background:var(--studio-surface);color:var(--studio-text);border-color:var(--studio-line)}
html[data-studio-theme] .static-studio-root :is(.static-stage-step,.static-stage-step>span){color:var(--studio-muted);background:transparent;border-color:var(--studio-line-strong)}
html[data-studio-theme] .static-studio-root .static-stage-step.active{color:var(--studio-text)}
html[data-studio-theme] .static-studio-root .static-stage-step.active>span{background:var(--studio-primary);border-color:var(--studio-primary);color:var(--studio-primary-text)}
html[data-studio-theme] .static-studio-root .static-stage-step.done>span{background:var(--studio-success-bg);border-color:var(--studio-success-line);color:var(--studio-success)}
html[data-studio-theme] .static-studio-root .static-stage-step+.static-stage-step:before{background:var(--studio-line)}
html[data-studio-theme] .static-studio-root .static-copy-cta{background:var(--studio-raised);color:var(--studio-text);border-color:var(--studio-line)}

/* Body-mounted static style picker/detail dialogs and native FAQ. */
html[data-studio-theme] .static-studio-dialog{background:var(--studio-surface);color:var(--studio-text);border-color:var(--studio-line-strong);border-radius:var(--studio-panel-radius);box-shadow:var(--studio-popover-shadow)}
html[data-studio-theme] .static-studio-dialog :is(.dialog-header,.dialog-body){background:var(--studio-surface);color:var(--studio-text);border-color:var(--studio-line)}
html[data-studio-theme] .static-studio-dialog .dialog-header :is(h2,h3){color:var(--studio-text)}
html[data-studio-theme] .static-studio-dialog .dialog-body :is(p,small,.static-source-note,.inline-note){color:var(--studio-muted)}
html[data-studio-theme] .static-studio-dialog .static-style-list>[role=option]{background:var(--studio-surface);border-color:transparent;color:var(--studio-text);border-radius:var(--studio-control-radius)}
html[data-studio-theme] .static-studio-dialog .static-style-list>[role=option]:hover{background:var(--studio-raised);border-color:var(--studio-line)}
html[data-studio-theme] .static-studio-dialog .static-style-list>[role=option][aria-selected=true]{background:var(--studio-selected);border-color:var(--studio-selected-line);color:var(--studio-selected-text)}
html[data-studio-theme] .static-studio-dialog .static-style-list :is(b,strong){color:var(--studio-text)}
html[data-studio-theme] .static-studio-dialog .static-style-list :is(p,small){color:var(--studio-muted)}
html[data-studio-theme] .static-studio-dialog .static-style-preview{background:var(--studio-inset);border-color:var(--studio-line);color:var(--studio-text)}
html[data-studio-theme] .static-studio-dialog .static-style-preview :is(h3,p,small){color:var(--studio-muted)}
html[data-studio-theme] .static-studio-dialog .static-style-preview h3{color:var(--studio-text)}
html[data-studio-theme] .static-studio-dialog :is(.static-cost-box,.static-approval-option,.static-tools-text){background:var(--studio-inset);border-color:var(--studio-line-strong);color:var(--studio-text)}
html[data-studio-theme] .static-studio-dialog .static-cost-box>b{color:var(--studio-text)}
html[data-studio-theme] .static-studio-dialog .static-approval-option small{color:var(--studio-muted)}
html[data-studio-theme] .static-style-popover{border-radius:var(--studio-control-radius);box-shadow:var(--studio-popover-shadow)}
html[data-studio-theme] .studio-faq-dialog{width:min(680px,calc(100% - 32px));max-height:calc(100dvh - 40px);padding:0;border:1px solid var(--studio-line-strong);border-radius:var(--studio-panel-radius);background:var(--studio-surface);color:var(--studio-text);box-shadow:var(--studio-popover-shadow)}
html[data-studio-theme] .studio-faq-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:22px 25px;border-bottom:1px solid var(--studio-line)}
html[data-studio-theme] .studio-faq-dialog>header h2{font-size:21px;line-height:1.3;letter-spacing:-.5px;margin:0;color:var(--studio-text)}
html[data-studio-theme] .studio-faq-dialog :is(.studio-faq-body,.dialog-body){padding:22px 25px 27px}
html[data-studio-theme] .studio-faq-dialog details{border-bottom:1px solid var(--studio-line);padding:0;margin:0}
html[data-studio-theme] .studio-faq-dialog details:last-child{border-bottom:0}
html[data-studio-theme] .studio-faq-dialog summary{padding:15px 0;min-height:48px;font-size:14px;font-weight:550;line-height:1.4;cursor:pointer;color:var(--studio-text)}
html[data-studio-theme] .studio-faq-dialog details p{margin:0 0 17px;color:var(--studio-muted);font-size:13px;line-height:1.7}
html[data-studio-theme] .studio-faq-dialog button{border-radius:var(--studio-control-radius)}

@media(max-width:1100px){
  html[data-studio-theme] .static-context-toolbar{padding-left:18px;padding-right:18px}
}
@media(max-width:1000px){
  html[data-studio-theme] .studio-static-workspace.static-studio-root:has(.static-designer-shell){height:auto;min-height:calc(100dvh - var(--studio-native-topbar-height));overflow:visible}
  html[data-studio-theme] .static-studio-root .static-designer-shell{height:auto;min-height:0;flex:none;overflow:visible}
  html[data-studio-theme] .static-studio-root .static-designer-controls{overflow:visible}
  html[data-studio-theme] .static-studio-root .static-designer-canvas{height:620px;min-height:500px}
}
@media(max-width:900px){
  :root{--studio-native-topbar-height:66px}
  html[data-studio-theme] .rail .static-subnav-link{min-height:39px;font-size:14px}
  html[data-studio-theme] .studio-chrome-tools{gap:5px}
}
@media(max-width:600px){
  html[data-studio-theme] .studio-chrome-tools :is(.studio-chrome-theme,.studio-chrome-faq){display:inline-flex!important;min-width:33px;width:33px;min-height:33px;height:33px;padding:7px}
  html[data-studio-theme] .studio-chrome-tools .studio-chrome-theme>span{display:none}
  html[data-studio-theme] .studio-chrome-tools .icon{width:16px;height:16px}
  html[data-studio-theme] .static-context-toolbar{gap:7px;padding:6px 12px;flex-wrap:wrap;min-height:44px;flex-basis:auto}
  html[data-studio-theme] .static-context-links{gap:1px;max-width:100%;overflow-x:auto}
  html[data-studio-theme] .static-context-toolbar button{font-size:11px;padding:5px 8px;min-height:30px}
  html[data-studio-theme] .studio-static-workspace.static-studio-root:not(:has(.static-designer-shell)){padding:18px 15px 30px}
  html[data-studio-theme] .studio-faq-dialog{width:calc(100% - 22px);max-height:calc(100dvh - 25px)}
  html[data-studio-theme] .studio-faq-dialog>header{padding:18px}
  html[data-studio-theme] .studio-faq-dialog :is(.studio-faq-body,.dialog-body){padding:17px 18px 22px}
}
@media(prefers-reduced-motion:reduce){
  html[data-studio-theme] .studio-chrome-tools button{transition:none}
}

/* Final native hooks and related knowledge/auth surfaces. */
html[data-studio-theme] .static-context-toolbar button[aria-current=page]{background:var(--studio-selected);border-color:var(--studio-line);color:var(--studio-selected-text)}
html[data-studio-theme] .static-context-toolbar .static-context-new{flex:none;margin-left:auto}
html[data-studio-theme] .shell .bk-facts-approved{background:var(--studio-success-bg);border-color:var(--studio-success-line);color:var(--studio-text)}
html[data-studio-theme] .shell .bk-unapproved{background:var(--studio-inset);border-color:var(--studio-line);color:var(--studio-text)}
html[data-studio-theme] .shell :is(.bk-status,.bk-tags>span,.bk-source,.bk-text-block){background:var(--studio-raised);border-color:var(--studio-line);color:var(--studio-muted)}
html[data-studio-theme] .shell .bk-status-approved{background:var(--studio-success-bg);border-color:var(--studio-success-line);color:var(--studio-success)}
html[data-studio-theme] .shell .bk-status-warning{background:var(--studio-warning-bg);border-color:var(--studio-warning-line);color:var(--studio-warning)}
html[data-studio-theme] .shell .bk-prose{background:transparent;color:var(--studio-muted)}
html[data-studio-theme] .auth-screen :is(.auth-layout,.auth-card){background:var(--studio-surface);border-color:var(--studio-line);color:var(--studio-text)}
html[data-studio-theme] .auth-screen .auth-showcase{background:var(--studio-inset);border-color:var(--studio-line);color:var(--studio-text)}
html[data-studio-theme] .auth-screen .auth-showcase footer{color:var(--studio-subtle)}
html[data-studio-theme] .auth-screen .auth-form :is(input,select,textarea){background:var(--studio-inset);color:var(--studio-text);border-color:var(--studio-line-strong)}
html[data-studio-theme] .auth-screen .auth-email{color:var(--studio-text)}
@media(max-width:900px){html[data-studio-theme]{--studio-native-topbar-height:66px}}

/* Native-height refinements: quiet dividers and an initially reachable style picker. */
html[data-studio-theme] .static-studio-root .static-designer-section:not(:last-child)::after{background:var(--studio-line)}
html[data-studio-theme] .static-studio-root .static-designer-section :is(details,.static-advanced){border-color:var(--studio-line)}
html[data-studio-theme] .static-studio-root .static-designer-control-heading .static-designer-info{color:var(--studio-subtle);border-color:var(--studio-line)}
@media(min-width:1001px) and (max-height:840px){
  html[data-studio-theme] .static-studio-root .static-designer-section:nth-of-type(-n+4){padding-top:22px;padding-bottom:12px}
  html[data-studio-theme] .static-studio-root .static-designer-section:first-of-type{padding-top:18px}
  html[data-studio-theme] .static-studio-root .static-designer-section:nth-of-type(-n+4)>p,html[data-studio-theme] .static-studio-root .static-designer-section:nth-of-type(-n+4) .static-designer-control-help{margin-top:4px;margin-bottom:9px}
  html[data-studio-theme] .static-studio-root .static-designer-variation-options{margin-top:10px}
  html[data-studio-theme] .static-studio-root .static-designer-format-options{margin-top:10px}
}
@media(min-width:1001px) and (max-height:720px){
  html[data-studio-theme] .static-studio-root .static-designer-section:nth-of-type(-n+4){padding-top:16px;padding-bottom:10px}
  html[data-studio-theme] .static-studio-root .static-designer-section:first-of-type{padding-top:14px}
}

/* Selected form options retain the approved light-mode hierarchy. */
html[data-studio-theme="dark"]{--studio-choice-bg:#303039;--studio-choice-line:#b4b4c8;--studio-choice-text:#fff}
html[data-studio-theme="light"]{--studio-choice-bg:#222;--studio-choice-line:#222;--studio-choice-text:#fff}
html[data-studio-theme] .studio-static-workspace.static-studio-root .static-designer-section :is(.static-designer-format-button,.static-designer-variation-options>button){background:var(--studio-inset);border-color:var(--studio-line-strong);color:var(--studio-muted)}
html[data-studio-theme] .studio-static-workspace.static-studio-root .static-designer-section :is(.static-designer-format-button,.static-designer-variation-options>button)[aria-pressed=true]{background:var(--studio-choice-bg);border-color:var(--studio-choice-line);color:var(--studio-choice-text)}
html[data-studio-theme] .studio-static-workspace.static-studio-root .static-designer-section :is(.static-designer-format-button,.static-designer-variation-options>button)[aria-pressed=true]:hover{background:var(--studio-choice-bg);border-color:var(--studio-choice-line);color:var(--studio-choice-text)}
html[data-studio-theme] .studio-static-workspace.static-studio-root .static-designer-format-button[aria-pressed=true] .static-designer-aspect-icon{color:var(--studio-choice-text)}
html[data-studio-theme] .studio-faq-dialog .studio-faq-questions{padding:7px 25px 18px}
@media(max-width:600px){html[data-studio-theme] .studio-faq-dialog .studio-faq-questions{padding:5px 18px 15px}}
html[data-studio-theme] :is(.shell,dialog) :is(input[type=file],input[type=color]){background-color:var(--studio-inset);color:var(--studio-text);border-color:var(--studio-line-strong)}
html[data-studio-theme] :is(.shell,dialog) input[type=file]::file-selector-button{background:var(--studio-raised);color:var(--studio-text);border:1px solid var(--studio-line-strong);border-radius:var(--studio-control-radius);padding:6px 10px;margin-right:10px;font:inherit;cursor:pointer}

/* A shrinking breadcrumb must never enlarge or overlap the native mobile topbar. */
html[data-studio-theme] .shell>.main{min-width:0}
html[data-studio-theme] .topbar{min-width:0;flex-wrap:nowrap}
html[data-studio-theme] .topbar #breadcrumb{display:block;flex:1 1 auto;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.4}
html[data-studio-theme] .topbar .top-actions{display:flex;align-items:center;flex:0 0 auto;min-width:0;gap:8px}
html[data-studio-theme] .topbar>.mobile-menu{flex:0 0 34px;min-width:34px}
html[data-studio-theme] .topbar .studio-chrome-tools{flex:0 0 auto}
@media(max-width:600px){
  html[data-studio-theme] .topbar{gap:10px;height:var(--studio-native-topbar-height);min-height:var(--studio-native-topbar-height);padding-left:14px;padding-right:14px}
  html[data-studio-theme] .topbar #breadcrumb{font-size:13px;line-height:18px}
  html[data-studio-theme] .topbar #breadcrumb:has(.studio-crumb-page){font-size:0;line-height:18px}
  html[data-studio-theme] .topbar #breadcrumb .studio-crumb-scope,html[data-studio-theme] .topbar #breadcrumb .studio-crumb-brand{display:none}
  html[data-studio-theme] .topbar #breadcrumb .studio-crumb-page{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:18px;vertical-align:middle;color:var(--studio-text)}
  html[data-studio-theme] .topbar .top-actions{gap:7px}
  html[data-studio-theme] .topbar .top-actions>button[data-new-project]:not([hidden]){display:inline-flex;align-items:center;justify-content:center;flex:0 0 34px;min-width:34px;width:34px;max-width:34px;min-height:34px;height:34px;max-height:34px;padding:7px;gap:0;font-size:0;line-height:1;white-space:nowrap;overflow:hidden}
  html[data-studio-theme] .topbar .top-actions>button[data-new-project]>.icon{display:block;flex:none;width:18px;height:18px;margin:0}
  html[data-studio-theme] .topbar .top-actions>button[data-new-project]>span{font-size:0}
  html[data-studio-theme] .topbar .top-actions .studio-chrome-tools{gap:5px;margin-left:0}
}
@media(max-width:380px){
  html[data-studio-theme] .topbar{gap:7px;padding-left:11px;padding-right:11px}
  html[data-studio-theme] .topbar .top-actions{gap:6px}
}
